-
Notifications
You must be signed in to change notification settings - Fork 0
/
hyperscript.min.js
5 lines (5 loc) · 2.01 KB
/
hyperscript.min.js
1
2
3
4
5
(function(e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).h=e()})(function(){return function(){function e(d,f,k){function l(c,a){if(!f[c]){if(!d[c]){var b="function"==typeof require&&require;if(!a&&b)return b(c,!0);if(h)return h(c,!0);b=Error("Cannot find module '"+c+"'");throw b.code="MODULE_NOT_FOUND",b;}b=f[c]=
{exports:{}};d[c][0].call(b.exports,function(a){var b=d[c][1][a];return l(b?b:a)},b,b.exports,e,d,f,k)}return f[c].exports}for(var h="function"==typeof require&&require,g=0;g<k.length;g++)l(k[g]);return l}return e}()({1:[function(e,d,f){(function(k){function l(c,a,b){if(1===arguments.length&&Array.isArray(c))return l(h.Fragment,null,c);b||"string"!==typeof a&&"number"!==typeof a&&!Array.isArray(a)?2===arguments.length&&(b=[]):(b=a,a={});a=a?Object.assign({},a):{};a.dataset&&(Object.keys(a.dataset).forEach(function(b){var c=
b.replace(/([a-z])([A-Z])/,function(a){return a[0]+"-"+a[1].toLowerCase()});a["data-"+c]=a.dataset[b]}),a.dataset=void 0);a.attributes&&(Object.keys(a.attributes).forEach(function(b){a[b]=a.attributes[b]}),a.attributes=void 0);"string"===typeof c&&(c=g(c,a));var e=[c,a].concat(b);return h.createElement.apply(h,e)}var h="undefined"!==typeof window?window.React:"undefined"!==typeof k?k.React:null,g=e("./parse-tag");d.exports=l}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?
self:"undefined"!==typeof window?window:{})},{"./parse-tag":2}],2:[function(e,d,f){var k=/([\.#]?[a-zA-Z0-9_:-]+)/,l=/^\.|#/;d.exports=function(e,g){if(!e)return"div";var c=!("id"in g),a=e.split(k),b=null;l.test(a[1])&&(b="div");var d,f;for(f=0;f<a.length;f++)if(d=a[f]){var h=d.charAt(0);if(b)if("."===h){var m=m||[];m.push(d.substring(1,d.length))}else"#"===h&&c&&(g.id=d.substring(1,d.length));else b=d}m&&(g.className&&m.push(g.className),g.className=m.join(" "));return b?b.toLowerCase():"div"}},
{}]},{},[1])(1)});