isomorfeus-preact 10.6.46 → 10.6.49

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/lib/browser/history.rb +31 -0
  3. data/lib/isomorfeus/preact/config.rb +3 -2
  4. data/lib/isomorfeus/preact_view_helper.rb +19 -24
  5. data/lib/isomorfeus/ssr.rb +49 -30
  6. data/lib/isomorfeus/top_level.rb +8 -2
  7. data/lib/isomorfeus-preact.rb +4 -1
  8. data/lib/isomorfeus_preact/preact/function_component/api.rb +12 -7
  9. data/lib/preact/component/api.rb +12 -7
  10. data/lib/preact/component/callbacks.rb +32 -25
  11. data/lib/preact/version.rb +1 -1
  12. data/lib/preact.rb +3 -3
  13. data/node_modules/.package-lock.json +3 -3
  14. data/node_modules/preact-render-to-string/README.md +1 -1
  15. data/node_modules/preact-render-to-string/dist/commonjs.js +1 -1
  16. data/node_modules/preact-render-to-string/dist/commonjs.js.map +1 -1
  17. data/node_modules/preact-render-to-string/dist/index.js.map +1 -1
  18. data/node_modules/preact-render-to-string/dist/index.mjs +1 -1
  19. data/node_modules/preact-render-to-string/dist/index.module.js +1 -1
  20. data/node_modules/preact-render-to-string/dist/index.module.js.map +1 -1
  21. data/node_modules/preact-render-to-string/dist/jsx-entry.js +1 -1
  22. data/node_modules/preact-render-to-string/dist/jsx-entry.js.map +1 -1
  23. data/node_modules/preact-render-to-string/dist/jsx.js.map +1 -1
  24. data/node_modules/preact-render-to-string/dist/jsx.mjs +1 -1
  25. data/node_modules/preact-render-to-string/dist/jsx.modern.js +1 -1
  26. data/node_modules/preact-render-to-string/dist/jsx.modern.js.map +1 -1
  27. data/node_modules/preact-render-to-string/dist/jsx.module.js +1 -1
  28. data/node_modules/preact-render-to-string/dist/jsx.module.js.map +1 -1
  29. data/node_modules/preact-render-to-string/package.json +5 -2
  30. data/node_modules/preact-render-to-string/src/index.js +7 -5
  31. data/package.json +1 -1
  32. metadata +3 -2
@@ -1 +1 @@
1
- {"version":3,"file":"jsx.js","sources":["jsx.js"],"sourcesContent":["!function(t,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?n(exports,require(\"preact\")):\"function\"==typeof define&&define.amd?define([\"exports\",\"preact\"],n):n((t||self).preactRenderToString={},t.preact)}(this,function(t,n){if(\"function\"!=typeof Symbol){var e=0;Symbol=function(t){return\"@@\"+t+ ++e},Symbol.for=function(t){return\"@@\"+t}}var r=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,o=/[&<>\"]/;function i(t){var n=String(t);return o.test(n)?n.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\"):n}var a=function(t,n){return String(t).replace(/(\\n+)/g,\"$1\"+(n||\"\\t\"))},c=function(t,n,e){return String(t).length>(n||40)||!e&&-1!==String(t).indexOf(\"\\n\")||-1!==String(t).indexOf(\"<\")},u={};function l(t){var n=\"\";for(var e in t){var o=t[e];null!=o&&\"\"!==o&&(n&&(n+=\" \"),n+=\"-\"==e[0]?e:u[e]||(u[e]=e.replace(/([A-Z])/g,\"-$1\").toLowerCase()),n+=\": \",n+=o,\"number\"==typeof o&&!1===r.test(e)&&(n+=\"px\"),n+=\";\")}return n||void 0}function s(t,n){for(var e in n)t[e]=n[e];return t}function f(t,n){return Array.isArray(n)?n.reduce(f,t):null!=n&&!1!==n&&t.push(n),t}var p={shallow:!0},y=[],g=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,d=/[\\s\\n\\\\/='\"\\0<>]/,b=function(){};h.render=h;var m=[];function h(t,e,r){e=e||{},r=r||{};var o=n.options.__s;n.options.__s=!0;var i=_(t,e,r);return n.options.__c&&n.options.__c(t,m),m.length=0,n.options.__s=o,i}function _(t,e,r,o,u,p){if(null==t||\"boolean\"==typeof t)return\"\";if(\"object\"!=typeof t)return i(t);var m=r.pretty,h=m&&\"string\"==typeof m?m:\"\\t\";if(Array.isArray(t)){for(var v=\"\",x=0;x<t.length;x++)m&&x>0&&(v+=\"\\n\"),v+=_(t[x],e,r,o,u,p);return v}var j,S=t.type,A=t.props,O=!1;if(\"function\"==typeof S){if(O=!0,!r.shallow||!o&&!1!==r.renderRootComponent){if(S===n.Fragment){var w=[];return f(w,t.props.children),_(w,e,r,!1!==r.shallowHighOrder,u,p)}var k,F=t.__c={__v:t,context:e,props:t.props,setState:b,forceUpdate:b,__h:[]};if(n.options.__b&&n.options.__b(t),n.options.__r&&n.options.__r(t),S.prototype&&\"function\"==typeof S.prototype.render){var E=S.contextType,C=E&&e[E.__c],M=null!=E?C?C.props.value:E.__:e;(F=t.__c=new S(A,M)).__v=t,F._dirty=F.__d=!0,F.props=A,null==F.state&&(F.state={}),null==F._nextState&&null==F.__s&&(F._nextState=F.__s=F.state),F.context=M,S.getDerivedStateFromProps?F.state=s(s({},F.state),S.getDerivedStateFromProps(F.props,F.state)):F.componentWillMount&&(F.componentWillMount(),F.state=F._nextState!==F.state?F._nextState:F.__s!==F.state?F.__s:F.state),k=F.render(F.props,F.state,F.context)}else{var N=S.contextType,D=N&&e[N.__c];k=S.call(t.__c,A,null!=N?D?D.props.value:N.__:e)}return F.getChildContext&&(e=s(s({},e),F.getChildContext())),n.options.diffed&&n.options.diffed(t),_(k,e,r,!1!==r.shallowHighOrder,u,p)}S=(j=S).displayName||j!==Function&&j.name||function(t){var n=(Function.prototype.toString.call(t).match(/^\\s*function\\s+([^( ]+)/)||\"\")[1];if(!n){for(var e=-1,r=y.length;r--;)if(y[r]===t){e=r;break}e<0&&(e=y.push(t)-1),n=\"UnnamedComponent\"+e}return n}(j)}var H,I,T=\"<\"+S;if(A){var $=Object.keys(A);r&&!0===r.sortAttributes&&$.sort();for(var U=0;U<$.length;U++){var W=$[U],L=A[W];if(\"children\"!==W){if(!d.test(W)&&(r&&r.allAttributes||\"key\"!==W&&\"ref\"!==W&&\"__self\"!==W&&\"__source\"!==W&&\"defaultValue\"!==W)){if(\"className\"===W){if(A.class)continue;W=\"class\"}else u&&W.match(/^xlink:?./)&&(W=W.toLowerCase().replace(/^xlink:?/,\"xlink:\"));if(\"htmlFor\"===W){if(A.for)continue;W=\"for\"}\"style\"===W&&L&&\"object\"==typeof L&&(L=l(L)),\"a\"===W[0]&&\"r\"===W[1]&&\"boolean\"==typeof L&&(L=String(L));var P=r.attributeHook&&r.attributeHook(W,L,e,r,O);if(P||\"\"===P)T+=P;else if(\"dangerouslySetInnerHTML\"===W)I=L&&L.__html;else if(\"textarea\"===S&&\"value\"===W)H=L;else if((L||0===L||\"\"===L)&&\"function\"!=typeof L){if(!(!0!==L&&\"\"!==L||(L=W,r&&r.xml))){T+=\" \"+W;continue}if(\"value\"===W){if(\"select\"===S){p=L;continue}\"option\"===S&&p==L&&(T+=\" selected\")}T+=\" \"+W+'=\"'+i(L)+'\"'}}}else H=L}}if(m){var R=T.replace(/\\n\\s*/,\" \");R===T||~R.indexOf(\"\\n\")?m&&~T.indexOf(\"\\n\")&&(T+=\"\\n\"):T=R}if(T+=\">\",d.test(S))throw new Error(S+\" is not a valid HTML tag name in \"+T);var J,q=g.test(S)||r.voidElements&&r.voidElements.test(S),V=[];if(I)m&&c(I)&&(I=\"\\n\"+h+a(I,h)),T+=I;else if(null!=H&&f(J=[],H).length){for(var z=m&&~T.indexOf(\"\\n\"),B=!1,G=0;G<J.length;G++){var Z=J[G];if(null!=Z&&!1!==Z){var K=_(Z,e,r,!0,\"svg\"===S||\"foreignObject\"!==S&&u,p);if(m&&!z&&c(K)&&(z=!0),K)if(m){var Q=K.length>0&&\"<\"!=K[0];B&&Q?V[V.length-1]+=K:V.push(K),B=Q}else V.push(K)}}if(m&&z)for(var X=V.length;X--;)V[X]=\"\\n\"+h+a(V[X],h)}if(V.length||I)T+=V.join(\"\");else if(r&&r.xml)return T.substring(0,T.length-1)+\" />\";return!q||J||I?(m&&~T.indexOf(\"\\n\")&&(T+=\"\\n\"),T+=\"</\"+S+\">\"):T=T.replace(/>$/,\" />\"),T}h.shallowRender=function(t,n){return h(t,n,p)};const v=/(\\\\|\\\"|\\')/g,x=Object.prototype.toString,j=Date.prototype.toISOString,S=Error.prototype.toString,A=RegExp.prototype.toString,O=Symbol.prototype.toString,w=/^Symbol\\((.*)\\)(.*)$/,k=/\\n/gi,F=Object.getOwnPropertySymbols||(t=>[]);function E(t){return\"[object Array]\"===t||\"[object ArrayBuffer]\"===t||\"[object DataView]\"===t||\"[object Float32Array]\"===t||\"[object Float64Array]\"===t||\"[object Int8Array]\"===t||\"[object Int16Array]\"===t||\"[object Int32Array]\"===t||\"[object Uint8Array]\"===t||\"[object Uint8ClampedArray]\"===t||\"[object Uint16Array]\"===t||\"[object Uint32Array]\"===t}function C(t){return\"\"===t.name?\"[Function anonymous]\":\"[Function \"+t.name+\"]\"}function M(t){return O.call(t).replace(w,\"Symbol($1)\")}function N(t){return\"[\"+S.call(t)+\"]\"}function D(t){if(!0===t||!1===t)return\"\"+t;if(void 0===t)return\"undefined\";if(null===t)return\"null\";const n=typeof t;if(\"number\"===n)return function(t){return t!=+t?\"NaN\":0===t&&1/t<0?\"-0\":\"\"+t}(t);if(\"string\"===n)return'\"'+function(t){return t.replace(v,\"\\\\$1\")}(t)+'\"';if(\"function\"===n)return C(t);if(\"symbol\"===n)return M(t);const e=x.call(t);return\"[object WeakMap]\"===e?\"WeakMap {}\":\"[object WeakSet]\"===e?\"WeakSet {}\":\"[object Function]\"===e||\"[object GeneratorFunction]\"===e?C(t,min):\"[object Symbol]\"===e?M(t):\"[object Date]\"===e?j.call(t):\"[object Error]\"===e?N(t):\"[object RegExp]\"===e?A.call(t):\"[object Arguments]\"===e&&0===t.length?\"Arguments []\":E(e)&&0===t.length?t.constructor.name+\" []\":t instanceof Error&&N(t)}function H(t,n,e,r,o,i,a,c,u,l){let s=\"\";if(t.length){s+=o;const f=e+n;for(let e=0;e<t.length;e++)s+=f+$(t[e],n,f,r,o,i,a,c,u,l),e<t.length-1&&(s+=\",\"+r);s+=o+e}return\"[\"+s+\"]\"}function I(t,n,e,r,o,i,a,c,u,l){if((i=i.slice()).indexOf(t)>-1)return\"[Circular]\";i.push(t);const s=++c>a;if(!s&&t.toJSON&&\"function\"==typeof t.toJSON)return $(t.toJSON(),n,e,r,o,i,a,c,u,l);const f=x.call(t);return\"[object Arguments]\"===f?s?\"[Arguments]\":function(t,n,e,r,o,i,a,c,u,l){return(l?\"\":\"Arguments \")+H(t,n,e,r,o,i,a,c,u,l)}(t,n,e,r,o,i,a,c,u,l):E(f)?s?\"[Array]\":function(t,n,e,r,o,i,a,c,u,l){return(l?\"\":t.constructor.name+\" \")+H(t,n,e,r,o,i,a,c,u,l)}(t,n,e,r,o,i,a,c,u,l):\"[object Map]\"===f?s?\"[Map]\":function(t,n,e,r,o,i,a,c,u,l){let s=\"Map {\";const f=t.entries();let p=f.next();if(!p.done){s+=o;const t=e+n;for(;!p.done;)s+=t+$(p.value[0],n,t,r,o,i,a,c,u,l)+\" => \"+$(p.value[1],n,t,r,o,i,a,c,u,l),p=f.next(),p.done||(s+=\",\"+r);s+=o+e}return s+\"}\"}(t,n,e,r,o,i,a,c,u,l):\"[object Set]\"===f?s?\"[Set]\":function(t,n,e,r,o,i,a,c,u,l){let s=\"Set {\";const f=t.entries();let p=f.next();if(!p.done){s+=o;const t=e+n;for(;!p.done;)s+=t+$(p.value[1],n,t,r,o,i,a,c,u,l),p=f.next(),p.done||(s+=\",\"+r);s+=o+e}return s+\"}\"}(t,n,e,r,o,i,a,c,u,l):\"object\"==typeof t?s?\"[Object]\":function(t,n,e,r,o,i,a,c,u,l){let s=(l?\"\":t.constructor?t.constructor.name+\" \":\"Object \")+\"{\",f=Object.keys(t).sort();const p=F(t);if(p.length&&(f=f.filter(t=>!(\"symbol\"==typeof t||\"[object Symbol]\"===x.call(t))).concat(p)),f.length){s+=o;const p=e+n;for(let e=0;e<f.length;e++){const y=f[e];s+=p+$(y,n,p,r,o,i,a,c,u,l)+\": \"+$(t[y],n,p,r,o,i,a,c,u,l),e<f.length-1&&(s+=\",\"+r)}s+=o+e}return s+\"}\"}(t,n,e,r,o,i,a,c,u,l):void 0}function T(t,n,e,r,o,i,a,c,u,l){let s,f=!1;for(let n=0;n<u.length;n++)if(s=u[n],s.test(t)){f=!0;break}return!!f&&s.print(t,function(t){return $(t,n,e,r,o,i,a,c,u,l)},function(t){const r=e+n;return r+t.replace(k,\"\\n\"+r)},{edgeSpacing:o,spacing:r})}function $(t,n,e,r,o,i,a,c,u,l){return D(t)||T(t,n,e,r,o,i,a,c,u,l)||I(t,n,e,r,o,i,a,c,u,l)}const U={indent:2,min:!1,maxDepth:Infinity,plugins:[]};function W(t){return new Array(t+1).join(\" \")}var L={test:function(t){return t&&\"object\"==typeof t&&\"type\"in t&&\"props\"in t&&\"key\"in t},print:function(t,n,e){return h(t,L.context,L.opts)}},P={plugins:[L]},R={attributeHook:function(t,n,e,r,o){var c=typeof n;if(\"dangerouslySetInnerHTML\"===t)return!1;if(null==n||\"function\"===c&&!r.functions)return\"\";if(r.skipFalseAttributes&&!o&&(!1===n||(\"class\"===t||\"style\"===t)&&\"\"===n))return\"\";var u=\"string\"==typeof r.pretty?r.pretty:\"\\t\";return\"string\"!==c?(\"function\"!==c||r.functionNames?(L.context=e,L.opts=r,~(n=function(t,n){let e,r;n?(function(t){if(Object.keys(t).forEach(t=>{if(!U.hasOwnProperty(t))throw new Error(\"prettyFormat: Invalid option: \"+t)}),t.min&&void 0!==t.indent&&0!==t.indent)throw new Error(\"prettyFormat: Cannot run with min option and indent\")}(n),n=function(t){const n={};return Object.keys(U).forEach(e=>n[e]=t.hasOwnProperty(e)?t[e]:U[e]),n.min&&(n.indent=0),n}(n)):n=U;const o=n.min?\" \":\"\\n\",i=n.min?\"\":\"\\n\";if(n&&n.plugins.length){e=W(n.indent),r=[];var a=T(t,e,\"\",o,i,r,n.maxDepth,0,n.plugins,n.min);if(a)return a}return D(t)||(e||(e=W(n.indent)),r||(r=[]),I(t,e,\"\",o,i,r,n.maxDepth,0,n.plugins,n.min))}(n,P)).indexOf(\"\\n\")&&(n=a(\"\\n\"+n,u)+\"\\n\")):n=\"Function\",a(\"\\n\"+t+\"={\"+n+\"}\",u)):\"\\n\"+u+t+'=\"'+i(n)+'\"'},jsx:!0,xml:!1,functions:!0,functionNames:!0,skipFalseAttributes:!0,pretty:\" \"};function J(t,n,e,r){return h(t,n,e=s(s({},R),e||{}))}t.default=J,t.render=J});\n//# sourceMappingURL=jsx.js.map\n"],"names":["t","Symbol","e","s","c"],"mappings":"mEAAA,SAAsBA,GAAA,MAAXC,KAAAA,KAAuBC,GACjCD,WAEAA,SAASD,GAAUG,MAClB,KAAAH,OAAkBI,EAAAA"}
1
+ {"version":3,"file":"jsx.js","sources":["jsx.js"],"sourcesContent":["!function(t,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?n(exports,require(\"preact\")):\"function\"==typeof define&&define.amd?define([\"exports\",\"preact\"],n):n((t||self).preactRenderToString={},t.preact)}(this,function(t,n){if(\"function\"!=typeof Symbol){var e=0;Symbol=function(t){return\"@@\"+t+ ++e},Symbol.for=function(t){return\"@@\"+t}}var r=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,o=/[&<>\"]/;function i(t){var n=String(t);return o.test(n)?n.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\"):n}var a=function(t,n){return String(t).replace(/(\\n+)/g,\"$1\"+(n||\"\\t\"))},c=function(t,n,e){return String(t).length>(n||40)||!e&&-1!==String(t).indexOf(\"\\n\")||-1!==String(t).indexOf(\"<\")},u={};function l(t){var n=\"\";for(var e in t){var o=t[e];null!=o&&\"\"!==o&&(n&&(n+=\" \"),n+=\"-\"==e[0]?e:u[e]||(u[e]=e.replace(/([A-Z])/g,\"-$1\").toLowerCase()),n+=\": \",n+=o,\"number\"==typeof o&&!1===r.test(e)&&(n+=\"px\"),n+=\";\")}return n||void 0}function s(t,n){for(var e in n)t[e]=n[e];return t}function f(t,n){return Array.isArray(n)?n.reduce(f,t):null!=n&&!1!==n&&t.push(n),t}var p={shallow:!0},y=[],g=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,d=/[\\s\\n\\\\/='\"\\0<>]/,b=function(){};h.render=h;var m=[];function h(t,e,r){e=e||{},r=r||{};var o=n.options.__s;n.options.__s=!0;var i=v(t,e,r);return n.options.__c&&n.options.__c(t,m),m.length=0,n.options.__s=o,i}function v(t,e,r,o,u,p){if(null==t||\"boolean\"==typeof t)return\"\";if(\"object\"!=typeof t)return i(t);var m=r.pretty,h=m&&\"string\"==typeof m?m:\"\\t\";if(Array.isArray(t)){for(var _=\"\",x=0;x<t.length;x++)m&&x>0&&(_+=\"\\n\"),_+=v(t[x],e,r,o,u,p);return _}var j,S=t.type,A=t.props,O=!1;if(\"function\"==typeof S){if(O=!0,!r.shallow||!o&&!1!==r.renderRootComponent){if(S===n.Fragment){var w=[];return f(w,t.props.children),v(w,e,r,!1!==r.shallowHighOrder,u,p)}var k,F=t.__c={__v:t,context:e,props:t.props,setState:b,forceUpdate:b,__h:[]};if(n.options.__b&&n.options.__b(t),n.options.__r&&n.options.__r(t),S.prototype&&\"function\"==typeof S.prototype.render){var E=S.contextType,C=E&&e[E.__c],M=null!=E?C?C.props.value:E.__:e;(F=t.__c=new S(A,M)).__v=t,F._dirty=F.__d=!0,F.props=A,null==F.state&&(F.state={}),null==F._nextState&&null==F.__s&&(F._nextState=F.__s=F.state),F.context=M,S.getDerivedStateFromProps?F.state=s(s({},F.state),S.getDerivedStateFromProps(F.props,F.state)):F.componentWillMount&&(F.componentWillMount(),F.state=F._nextState!==F.state?F._nextState:F.__s!==F.state?F.__s:F.state),k=F.render(F.props,F.state,F.context)}else{var N=S.contextType,D=N&&e[N.__c];k=S.call(t.__c,A,null!=N?D?D.props.value:N.__:e)}return F.getChildContext&&(e=s(s({},e),F.getChildContext())),n.options.diffed&&n.options.diffed(t),v(k,e,r,!1!==r.shallowHighOrder,u,p)}S=(j=S).displayName||j!==Function&&j.name||function(t){var n=(Function.prototype.toString.call(t).match(/^\\s*function\\s+([^( ]+)/)||\"\")[1];if(!n){for(var e=-1,r=y.length;r--;)if(y[r]===t){e=r;break}e<0&&(e=y.push(t)-1),n=\"UnnamedComponent\"+e}return n}(j)}var H,I,T=\"<\"+S;if(A){var $=Object.keys(A);r&&!0===r.sortAttributes&&$.sort();for(var U=0;U<$.length;U++){var W=$[U],L=A[W];if(\"children\"!==W){if(!d.test(W)&&(r&&r.allAttributes||\"key\"!==W&&\"ref\"!==W&&\"__self\"!==W&&\"__source\"!==W)){if(\"defaultValue\"===W)W=\"value\";else if(\"className\"===W){if(void 0!==A.class)continue;W=\"class\"}else u&&W.match(/^xlink:?./)&&(W=W.toLowerCase().replace(/^xlink:?/,\"xlink:\"));if(\"htmlFor\"===W){if(A.for)continue;W=\"for\"}\"style\"===W&&L&&\"object\"==typeof L&&(L=l(L)),\"a\"===W[0]&&\"r\"===W[1]&&\"boolean\"==typeof L&&(L=String(L));var P=r.attributeHook&&r.attributeHook(W,L,e,r,O);if(P||\"\"===P)T+=P;else if(\"dangerouslySetInnerHTML\"===W)I=L&&L.__html;else if(\"textarea\"===S&&\"value\"===W)H=L;else if((L||0===L||\"\"===L)&&\"function\"!=typeof L){if(!(!0!==L&&\"\"!==L||(L=W,r&&r.xml))){T+=\" \"+W;continue}if(\"value\"===W){if(\"select\"===S){p=L;continue}\"option\"===S&&p==L&&(T+=\" selected\")}T+=\" \"+W+'=\"'+i(L)+'\"'}}}else H=L}}if(m){var R=T.replace(/\\n\\s*/,\" \");R===T||~R.indexOf(\"\\n\")?m&&~T.indexOf(\"\\n\")&&(T+=\"\\n\"):T=R}if(T+=\">\",d.test(S))throw new Error(S+\" is not a valid HTML tag name in \"+T);var J,q=g.test(S)||r.voidElements&&r.voidElements.test(S),V=[];if(I)m&&c(I)&&(I=\"\\n\"+h+a(I,h)),T+=I;else if(null!=H&&f(J=[],H).length){for(var z=m&&~T.indexOf(\"\\n\"),B=!1,G=0;G<J.length;G++){var Z=J[G];if(null!=Z&&!1!==Z){var K=v(Z,e,r,!0,\"svg\"===S||\"foreignObject\"!==S&&u,p);if(m&&!z&&c(K)&&(z=!0),K)if(m){var Q=K.length>0&&\"<\"!=K[0];B&&Q?V[V.length-1]+=K:V.push(K),B=Q}else V.push(K)}}if(m&&z)for(var X=V.length;X--;)V[X]=\"\\n\"+h+a(V[X],h)}if(V.length||I)T+=V.join(\"\");else if(r&&r.xml)return T.substring(0,T.length-1)+\" />\";return!q||J||I?(m&&~T.indexOf(\"\\n\")&&(T+=\"\\n\"),T+=\"</\"+S+\">\"):T=T.replace(/>$/,\" />\"),T}h.shallowRender=function(t,n){return h(t,n,p)};const _=/(\\\\|\\\"|\\')/g,x=Object.prototype.toString,j=Date.prototype.toISOString,S=Error.prototype.toString,A=RegExp.prototype.toString,O=Symbol.prototype.toString,w=/^Symbol\\((.*)\\)(.*)$/,k=/\\n/gi,F=Object.getOwnPropertySymbols||(t=>[]);function E(t){return\"[object Array]\"===t||\"[object ArrayBuffer]\"===t||\"[object DataView]\"===t||\"[object Float32Array]\"===t||\"[object Float64Array]\"===t||\"[object Int8Array]\"===t||\"[object Int16Array]\"===t||\"[object Int32Array]\"===t||\"[object Uint8Array]\"===t||\"[object Uint8ClampedArray]\"===t||\"[object Uint16Array]\"===t||\"[object Uint32Array]\"===t}function C(t){return\"\"===t.name?\"[Function anonymous]\":\"[Function \"+t.name+\"]\"}function M(t){return O.call(t).replace(w,\"Symbol($1)\")}function N(t){return\"[\"+S.call(t)+\"]\"}function D(t){if(!0===t||!1===t)return\"\"+t;if(void 0===t)return\"undefined\";if(null===t)return\"null\";const n=typeof t;if(\"number\"===n)return function(t){return t!=+t?\"NaN\":0===t&&1/t<0?\"-0\":\"\"+t}(t);if(\"string\"===n)return'\"'+function(t){return t.replace(_,\"\\\\$1\")}(t)+'\"';if(\"function\"===n)return C(t);if(\"symbol\"===n)return M(t);const e=x.call(t);return\"[object WeakMap]\"===e?\"WeakMap {}\":\"[object WeakSet]\"===e?\"WeakSet {}\":\"[object Function]\"===e||\"[object GeneratorFunction]\"===e?C(t,min):\"[object Symbol]\"===e?M(t):\"[object Date]\"===e?j.call(t):\"[object Error]\"===e?N(t):\"[object RegExp]\"===e?A.call(t):\"[object Arguments]\"===e&&0===t.length?\"Arguments []\":E(e)&&0===t.length?t.constructor.name+\" []\":t instanceof Error&&N(t)}function H(t,n,e,r,o,i,a,c,u,l){let s=\"\";if(t.length){s+=o;const f=e+n;for(let e=0;e<t.length;e++)s+=f+$(t[e],n,f,r,o,i,a,c,u,l),e<t.length-1&&(s+=\",\"+r);s+=o+e}return\"[\"+s+\"]\"}function I(t,n,e,r,o,i,a,c,u,l){if((i=i.slice()).indexOf(t)>-1)return\"[Circular]\";i.push(t);const s=++c>a;if(!s&&t.toJSON&&\"function\"==typeof t.toJSON)return $(t.toJSON(),n,e,r,o,i,a,c,u,l);const f=x.call(t);return\"[object Arguments]\"===f?s?\"[Arguments]\":function(t,n,e,r,o,i,a,c,u,l){return(l?\"\":\"Arguments \")+H(t,n,e,r,o,i,a,c,u,l)}(t,n,e,r,o,i,a,c,u,l):E(f)?s?\"[Array]\":function(t,n,e,r,o,i,a,c,u,l){return(l?\"\":t.constructor.name+\" \")+H(t,n,e,r,o,i,a,c,u,l)}(t,n,e,r,o,i,a,c,u,l):\"[object Map]\"===f?s?\"[Map]\":function(t,n,e,r,o,i,a,c,u,l){let s=\"Map {\";const f=t.entries();let p=f.next();if(!p.done){s+=o;const t=e+n;for(;!p.done;)s+=t+$(p.value[0],n,t,r,o,i,a,c,u,l)+\" => \"+$(p.value[1],n,t,r,o,i,a,c,u,l),p=f.next(),p.done||(s+=\",\"+r);s+=o+e}return s+\"}\"}(t,n,e,r,o,i,a,c,u,l):\"[object Set]\"===f?s?\"[Set]\":function(t,n,e,r,o,i,a,c,u,l){let s=\"Set {\";const f=t.entries();let p=f.next();if(!p.done){s+=o;const t=e+n;for(;!p.done;)s+=t+$(p.value[1],n,t,r,o,i,a,c,u,l),p=f.next(),p.done||(s+=\",\"+r);s+=o+e}return s+\"}\"}(t,n,e,r,o,i,a,c,u,l):\"object\"==typeof t?s?\"[Object]\":function(t,n,e,r,o,i,a,c,u,l){let s=(l?\"\":t.constructor?t.constructor.name+\" \":\"Object \")+\"{\",f=Object.keys(t).sort();const p=F(t);if(p.length&&(f=f.filter(t=>!(\"symbol\"==typeof t||\"[object Symbol]\"===x.call(t))).concat(p)),f.length){s+=o;const p=e+n;for(let e=0;e<f.length;e++){const y=f[e];s+=p+$(y,n,p,r,o,i,a,c,u,l)+\": \"+$(t[y],n,p,r,o,i,a,c,u,l),e<f.length-1&&(s+=\",\"+r)}s+=o+e}return s+\"}\"}(t,n,e,r,o,i,a,c,u,l):void 0}function T(t,n,e,r,o,i,a,c,u,l){let s,f=!1;for(let n=0;n<u.length;n++)if(s=u[n],s.test(t)){f=!0;break}return!!f&&s.print(t,function(t){return $(t,n,e,r,o,i,a,c,u,l)},function(t){const r=e+n;return r+t.replace(k,\"\\n\"+r)},{edgeSpacing:o,spacing:r})}function $(t,n,e,r,o,i,a,c,u,l){return D(t)||T(t,n,e,r,o,i,a,c,u,l)||I(t,n,e,r,o,i,a,c,u,l)}const U={indent:2,min:!1,maxDepth:Infinity,plugins:[]};function W(t){return new Array(t+1).join(\" \")}var L={test:function(t){return t&&\"object\"==typeof t&&\"type\"in t&&\"props\"in t&&\"key\"in t},print:function(t,n,e){return h(t,L.context,L.opts)}},P={plugins:[L]},R={attributeHook:function(t,n,e,r,o){var c=typeof n;if(\"dangerouslySetInnerHTML\"===t)return!1;if(null==n||\"function\"===c&&!r.functions)return\"\";if(r.skipFalseAttributes&&!o&&(!1===n||(\"class\"===t||\"style\"===t)&&\"\"===n))return\"\";var u=\"string\"==typeof r.pretty?r.pretty:\"\\t\";return\"string\"!==c?(\"function\"!==c||r.functionNames?(L.context=e,L.opts=r,~(n=function(t,n){let e,r;n?(function(t){if(Object.keys(t).forEach(t=>{if(!U.hasOwnProperty(t))throw new Error(\"prettyFormat: Invalid option: \"+t)}),t.min&&void 0!==t.indent&&0!==t.indent)throw new Error(\"prettyFormat: Cannot run with min option and indent\")}(n),n=function(t){const n={};return Object.keys(U).forEach(e=>n[e]=t.hasOwnProperty(e)?t[e]:U[e]),n.min&&(n.indent=0),n}(n)):n=U;const o=n.min?\" \":\"\\n\",i=n.min?\"\":\"\\n\";if(n&&n.plugins.length){e=W(n.indent),r=[];var a=T(t,e,\"\",o,i,r,n.maxDepth,0,n.plugins,n.min);if(a)return a}return D(t)||(e||(e=W(n.indent)),r||(r=[]),I(t,e,\"\",o,i,r,n.maxDepth,0,n.plugins,n.min))}(n,P)).indexOf(\"\\n\")&&(n=a(\"\\n\"+n,u)+\"\\n\")):n=\"Function\",a(\"\\n\"+t+\"={\"+n+\"}\",u)):\"\\n\"+u+t+'=\"'+i(n)+'\"'},jsx:!0,xml:!1,functions:!0,functionNames:!0,skipFalseAttributes:!0,pretty:\" \"};function J(t,n,e,r){return h(t,n,e=s(s({},R),e||{}))}t.default=J,t.render=J});\n//# sourceMappingURL=jsx.js.map\n"],"names":["t","Symbol","e","s","c"],"mappings":"mEAAA,SAAsBA,GAAA,MAAXC,KAAAA,KAAuBC,GACjCD,WAEAA,SAASD,GAAUG,MAClB,KAAAH,OAAkBI,EAAAA"}
@@ -1,2 +1,2 @@
1
- import{options as t,Fragment as n}from"preact";if("function"!=typeof Symbol){var e=0;Symbol=function(t){return"@@"+t+ ++e},Symbol.for=function(t){return"@@"+t}}var r=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,o=/[&<>"]/;function i(t){var n=String(t);return o.test(n)?n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):n}var a=function(t,n){return String(t).replace(/(\n+)/g,"$1"+(n||"\t"))},c=function(t,n,e){return String(t).length>(n||40)||!e&&-1!==String(t).indexOf("\n")||-1!==String(t).indexOf("<")},u={};function l(t){var n="";for(var e in t){var o=t[e];null!=o&&""!==o&&(n&&(n+=" "),n+="-"==e[0]?e:u[e]||(u[e]=e.replace(/([A-Z])/g,"-$1").toLowerCase()),n+=": ",n+=o,"number"==typeof o&&!1===r.test(e)&&(n+="px"),n+=";")}return n||void 0}function f(t,n){for(var e in n)t[e]=n[e];return t}function s(t,n){return Array.isArray(n)?n.reduce(s,t):null!=n&&!1!==n&&t.push(n),t}var p={shallow:!0},y=[],g=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,b=/[\s\n\\/='"\0<>]/,m=function(){};_.render=_;var d=[];function _(n,e,r){e=e||{},r=r||{};var o=t.__s;t.__s=!0;var i=h(n,e,r);return t.__c&&t.__c(n,d),d.length=0,t.__s=o,i}function h(e,r,o,u,p,d){if(null==e||"boolean"==typeof e)return"";if("object"!=typeof e)return i(e);var _=o.pretty,v=_&&"string"==typeof _?_:"\t";if(Array.isArray(e)){for(var x="",j=0;j<e.length;j++)_&&j>0&&(x+="\n"),x+=h(e[j],r,o,u,p,d);return x}var S,A=e.type,O=e.props,w=!1;if("function"==typeof A){if(w=!0,!o.shallow||!u&&!1!==o.renderRootComponent){if(A===n){var k=[];return s(k,e.props.children),h(k,r,o,!1!==o.shallowHighOrder,p,d)}var F,E=e.__c={__v:e,context:r,props:e.props,setState:m,forceUpdate:m,__h:[]};if(t.__b&&t.__b(e),t.__r&&t.__r(e),A.prototype&&"function"==typeof A.prototype.render){var C=A.contextType,M=C&&r[C.__c],N=null!=C?M?M.props.value:C.__:r;(E=e.__c=new A(O,N)).__v=e,E._dirty=E.__d=!0,E.props=O,null==E.state&&(E.state={}),null==E._nextState&&null==E.__s&&(E._nextState=E.__s=E.state),E.context=N,A.getDerivedStateFromProps?E.state=f(f({},E.state),A.getDerivedStateFromProps(E.props,E.state)):E.componentWillMount&&(E.componentWillMount(),E.state=E._nextState!==E.state?E._nextState:E.__s!==E.state?E.__s:E.state),F=E.render(E.props,E.state,E.context)}else{var D=A.contextType,H=D&&r[D.__c];F=A.call(e.__c,O,null!=D?H?H.props.value:D.__:r)}return E.getChildContext&&(r=f(f({},r),E.getChildContext())),t.diffed&&t.diffed(e),h(F,r,o,!1!==o.shallowHighOrder,p,d)}A=(S=A).displayName||S!==Function&&S.name||function(t){var n=(Function.prototype.toString.call(t).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!n){for(var e=-1,r=y.length;r--;)if(y[r]===t){e=r;break}e<0&&(e=y.push(t)-1),n="UnnamedComponent"+e}return n}(S)}var I,$,U="<"+A;if(O){var W=Object.keys(O);o&&!0===o.sortAttributes&&W.sort();for(var L=0;L<W.length;L++){var P=W[L],T=O[P];if("children"!==P){if(!b.test(P)&&(o&&o.allAttributes||"key"!==P&&"ref"!==P&&"__self"!==P&&"__source"!==P&&"defaultValue"!==P)){if("className"===P){if(O.class)continue;P="class"}else p&&P.match(/^xlink:?./)&&(P=P.toLowerCase().replace(/^xlink:?/,"xlink:"));if("htmlFor"===P){if(O.for)continue;P="for"}"style"===P&&T&&"object"==typeof T&&(T=l(T)),"a"===P[0]&&"r"===P[1]&&"boolean"==typeof T&&(T=String(T));var R=o.attributeHook&&o.attributeHook(P,T,r,o,w);if(R||""===R)U+=R;else if("dangerouslySetInnerHTML"===P)$=T&&T.__html;else if("textarea"===A&&"value"===P)I=T;else if((T||0===T||""===T)&&"function"!=typeof T){if(!(!0!==T&&""!==T||(T=P,o&&o.xml))){U+=" "+P;continue}if("value"===P){if("select"===A){d=T;continue}"option"===A&&d==T&&(U+=" selected")}U+=" "+P+'="'+i(T)+'"'}}}else I=T}}if(_){var J=U.replace(/\n\s*/," ");J===U||~J.indexOf("\n")?_&&~U.indexOf("\n")&&(U+="\n"):U=J}if(U+=">",b.test(A))throw new Error(A+" is not a valid HTML tag name in "+U);var V,q=g.test(A)||o.voidElements&&o.voidElements.test(A),z=[];if($)_&&c($)&&($="\n"+v+a($,v)),U+=$;else if(null!=I&&s(V=[],I).length){for(var B=_&&~U.indexOf("\n"),G=!1,Z=0;Z<V.length;Z++){var K=V[Z];if(null!=K&&!1!==K){var Q=h(K,r,o,!0,"svg"===A||"foreignObject"!==A&&p,d);if(_&&!B&&c(Q)&&(B=!0),Q)if(_){var X=Q.length>0&&"<"!=Q[0];G&&X?z[z.length-1]+=Q:z.push(Q),G=X}else z.push(Q)}}if(_&&B)for(var Y=z.length;Y--;)z[Y]="\n"+v+a(z[Y],v)}if(z.length||$)U+=z.join("");else if(o&&o.xml)return U.substring(0,U.length-1)+" />";return!q||V||$?(_&&~U.indexOf("\n")&&(U+="\n"),U+="</"+A+">"):U=U.replace(/>$/," />"),U}_.shallowRender=function(t,n){return _(t,n,p)};const v=/(\\|\"|\')/g,x=Object.prototype.toString,j=Date.prototype.toISOString,S=Error.prototype.toString,A=RegExp.prototype.toString,O=Symbol.prototype.toString,w=/^Symbol\((.*)\)(.*)$/,k=/\n/gi,F=Object.getOwnPropertySymbols||(t=>[]);function E(t){return"[object Array]"===t||"[object ArrayBuffer]"===t||"[object DataView]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object Int8Array]"===t||"[object Int16Array]"===t||"[object Int32Array]"===t||"[object Uint8Array]"===t||"[object Uint8ClampedArray]"===t||"[object Uint16Array]"===t||"[object Uint32Array]"===t}function C(t){return""===t.name?"[Function anonymous]":"[Function "+t.name+"]"}function M(t){return O.call(t).replace(w,"Symbol($1)")}function N(t){return"["+S.call(t)+"]"}function D(t){if(!0===t||!1===t)return""+t;if(void 0===t)return"undefined";if(null===t)return"null";const n=typeof t;if("number"===n)return function(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}(t);if("string"===n)return'"'+function(t){return t.replace(v,"\\$1")}(t)+'"';if("function"===n)return C(t);if("symbol"===n)return M(t);const e=x.call(t);return"[object WeakMap]"===e?"WeakMap {}":"[object WeakSet]"===e?"WeakSet {}":"[object Function]"===e||"[object GeneratorFunction]"===e?C(t,min):"[object Symbol]"===e?M(t):"[object Date]"===e?j.call(t):"[object Error]"===e?N(t):"[object RegExp]"===e?A.call(t):"[object Arguments]"===e&&0===t.length?"Arguments []":E(e)&&0===t.length?t.constructor.name+" []":t instanceof Error&&N(t)}function H(t,n,e,r,o,i,a,c,u,l){let f="";if(t.length){f+=o;const s=e+n;for(let e=0;e<t.length;e++)f+=s+U(t[e],n,s,r,o,i,a,c,u,l),e<t.length-1&&(f+=","+r);f+=o+e}return"["+f+"]"}function I(t,n,e,r,o,i,a,c,u,l){if((i=i.slice()).indexOf(t)>-1)return"[Circular]";i.push(t);const f=++c>a;if(!f&&t.toJSON&&"function"==typeof t.toJSON)return U(t.toJSON(),n,e,r,o,i,a,c,u,l);const s=x.call(t);return"[object Arguments]"===s?f?"[Arguments]":function(t,n,e,r,o,i,a,c,u,l){return(l?"":"Arguments ")+H(t,n,e,r,o,i,a,c,u,l)}(t,n,e,r,o,i,a,c,u,l):E(s)?f?"[Array]":function(t,n,e,r,o,i,a,c,u,l){return(l?"":t.constructor.name+" ")+H(t,n,e,r,o,i,a,c,u,l)}(t,n,e,r,o,i,a,c,u,l):"[object Map]"===s?f?"[Map]":function(t,n,e,r,o,i,a,c,u,l){let f="Map {";const s=t.entries();let p=s.next();if(!p.done){f+=o;const t=e+n;for(;!p.done;)f+=t+U(p.value[0],n,t,r,o,i,a,c,u,l)+" => "+U(p.value[1],n,t,r,o,i,a,c,u,l),p=s.next(),p.done||(f+=","+r);f+=o+e}return f+"}"}(t,n,e,r,o,i,a,c,u,l):"[object Set]"===s?f?"[Set]":function(t,n,e,r,o,i,a,c,u,l){let f="Set {";const s=t.entries();let p=s.next();if(!p.done){f+=o;const t=e+n;for(;!p.done;)f+=t+U(p.value[1],n,t,r,o,i,a,c,u,l),p=s.next(),p.done||(f+=","+r);f+=o+e}return f+"}"}(t,n,e,r,o,i,a,c,u,l):"object"==typeof t?f?"[Object]":function(t,n,e,r,o,i,a,c,u,l){let f=(l?"":t.constructor?t.constructor.name+" ":"Object ")+"{",s=Object.keys(t).sort();const p=F(t);if(p.length&&(s=s.filter(t=>!("symbol"==typeof t||"[object Symbol]"===x.call(t))).concat(p)),s.length){f+=o;const p=e+n;for(let e=0;e<s.length;e++){const y=s[e];f+=p+U(y,n,p,r,o,i,a,c,u,l)+": "+U(t[y],n,p,r,o,i,a,c,u,l),e<s.length-1&&(f+=","+r)}f+=o+e}return f+"}"}(t,n,e,r,o,i,a,c,u,l):void 0}function $(t,n,e,r,o,i,a,c,u,l){let f,s=!1;for(let n=0;n<u.length;n++)if(f=u[n],f.test(t)){s=!0;break}return!!s&&f.print(t,function(t){return U(t,n,e,r,o,i,a,c,u,l)},function(t){const r=e+n;return r+t.replace(k,"\n"+r)},{edgeSpacing:o,spacing:r})}function U(t,n,e,r,o,i,a,c,u,l){return D(t)||$(t,n,e,r,o,i,a,c,u,l)||I(t,n,e,r,o,i,a,c,u,l)}const W={indent:2,min:!1,maxDepth:Infinity,plugins:[]};function L(t){return new Array(t+1).join(" ")}var P={test:function(t){return t&&"object"==typeof t&&"type"in t&&"props"in t&&"key"in t},print:function(t,n,e){return _(t,P.context,P.opts)}},T={plugins:[P]},R={attributeHook:function(t,n,e,r,o){var c=typeof n;if("dangerouslySetInnerHTML"===t)return!1;if(null==n||"function"===c&&!r.functions)return"";if(r.skipFalseAttributes&&!o&&(!1===n||("class"===t||"style"===t)&&""===n))return"";var u="string"==typeof r.pretty?r.pretty:"\t";return"string"!==c?("function"!==c||r.functionNames?(P.context=e,P.opts=r,~(n=function(t,n){let e,r;n?(function(t){if(Object.keys(t).forEach(t=>{if(!W.hasOwnProperty(t))throw new Error("prettyFormat: Invalid option: "+t)}),t.min&&void 0!==t.indent&&0!==t.indent)throw new Error("prettyFormat: Cannot run with min option and indent")}(n),n=function(t){const n={};return Object.keys(W).forEach(e=>n[e]=t.hasOwnProperty(e)?t[e]:W[e]),n.min&&(n.indent=0),n}(n)):n=W;const o=n.min?" ":"\n",i=n.min?"":"\n";if(n&&n.plugins.length){e=L(n.indent),r=[];var a=$(t,e,"",o,i,r,n.maxDepth,0,n.plugins,n.min);if(a)return a}return D(t)||(e||(e=L(n.indent)),r||(r=[]),I(t,e,"",o,i,r,n.maxDepth,0,n.plugins,n.min))}(n,T)).indexOf("\n")&&(n=a("\n"+n,u)+"\n")):n="Function",a("\n"+t+"={"+n+"}",u)):"\n"+u+t+'="'+i(n)+'"'},jsx:!0,xml:!1,functions:!0,functionNames:!0,skipFalseAttributes:!0,pretty:" "};function J(t,n,e,r){return _(t,n,e=f(f({},R),e||{}))}export default J;export{J as render};
1
+ import{options as t,Fragment as n}from"preact";if("function"!=typeof Symbol){var e=0;Symbol=function(t){return"@@"+t+ ++e},Symbol.for=function(t){return"@@"+t}}var r=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,o=/[&<>"]/;function i(t){var n=String(t);return o.test(n)?n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):n}var a=function(t,n){return String(t).replace(/(\n+)/g,"$1"+(n||"\t"))},c=function(t,n,e){return String(t).length>(n||40)||!e&&-1!==String(t).indexOf("\n")||-1!==String(t).indexOf("<")},u={};function l(t){var n="";for(var e in t){var o=t[e];null!=o&&""!==o&&(n&&(n+=" "),n+="-"==e[0]?e:u[e]||(u[e]=e.replace(/([A-Z])/g,"-$1").toLowerCase()),n+=": ",n+=o,"number"==typeof o&&!1===r.test(e)&&(n+="px"),n+=";")}return n||void 0}function f(t,n){for(var e in n)t[e]=n[e];return t}function s(t,n){return Array.isArray(n)?n.reduce(s,t):null!=n&&!1!==n&&t.push(n),t}var p={shallow:!0},y=[],g=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,b=/[\s\n\\/='"\0<>]/,m=function(){};v.render=v;var d=[];function v(n,e,r){e=e||{},r=r||{};var o=t.__s;t.__s=!0;var i=_(n,e,r);return t.__c&&t.__c(n,d),d.length=0,t.__s=o,i}function _(e,r,o,u,p,d){if(null==e||"boolean"==typeof e)return"";if("object"!=typeof e)return i(e);var v=o.pretty,h=v&&"string"==typeof v?v:"\t";if(Array.isArray(e)){for(var x="",j=0;j<e.length;j++)v&&j>0&&(x+="\n"),x+=_(e[j],r,o,u,p,d);return x}var S,A=e.type,O=e.props,w=!1;if("function"==typeof A){if(w=!0,!o.shallow||!u&&!1!==o.renderRootComponent){if(A===n){var k=[];return s(k,e.props.children),_(k,r,o,!1!==o.shallowHighOrder,p,d)}var F,E=e.__c={__v:e,context:r,props:e.props,setState:m,forceUpdate:m,__h:[]};if(t.__b&&t.__b(e),t.__r&&t.__r(e),A.prototype&&"function"==typeof A.prototype.render){var C=A.contextType,M=C&&r[C.__c],N=null!=C?M?M.props.value:C.__:r;(E=e.__c=new A(O,N)).__v=e,E._dirty=E.__d=!0,E.props=O,null==E.state&&(E.state={}),null==E._nextState&&null==E.__s&&(E._nextState=E.__s=E.state),E.context=N,A.getDerivedStateFromProps?E.state=f(f({},E.state),A.getDerivedStateFromProps(E.props,E.state)):E.componentWillMount&&(E.componentWillMount(),E.state=E._nextState!==E.state?E._nextState:E.__s!==E.state?E.__s:E.state),F=E.render(E.props,E.state,E.context)}else{var D=A.contextType,H=D&&r[D.__c];F=A.call(e.__c,O,null!=D?H?H.props.value:D.__:r)}return E.getChildContext&&(r=f(f({},r),E.getChildContext())),t.diffed&&t.diffed(e),_(F,r,o,!1!==o.shallowHighOrder,p,d)}A=(S=A).displayName||S!==Function&&S.name||function(t){var n=(Function.prototype.toString.call(t).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!n){for(var e=-1,r=y.length;r--;)if(y[r]===t){e=r;break}e<0&&(e=y.push(t)-1),n="UnnamedComponent"+e}return n}(S)}var I,$,U="<"+A;if(O){var W=Object.keys(O);o&&!0===o.sortAttributes&&W.sort();for(var L=0;L<W.length;L++){var P=W[L],T=O[P];if("children"!==P){if(!b.test(P)&&(o&&o.allAttributes||"key"!==P&&"ref"!==P&&"__self"!==P&&"__source"!==P)){if("defaultValue"===P)P="value";else if("className"===P){if(void 0!==O.class)continue;P="class"}else p&&P.match(/^xlink:?./)&&(P=P.toLowerCase().replace(/^xlink:?/,"xlink:"));if("htmlFor"===P){if(O.for)continue;P="for"}"style"===P&&T&&"object"==typeof T&&(T=l(T)),"a"===P[0]&&"r"===P[1]&&"boolean"==typeof T&&(T=String(T));var R=o.attributeHook&&o.attributeHook(P,T,r,o,w);if(R||""===R)U+=R;else if("dangerouslySetInnerHTML"===P)$=T&&T.__html;else if("textarea"===A&&"value"===P)I=T;else if((T||0===T||""===T)&&"function"!=typeof T){if(!(!0!==T&&""!==T||(T=P,o&&o.xml))){U+=" "+P;continue}if("value"===P){if("select"===A){d=T;continue}"option"===A&&d==T&&(U+=" selected")}U+=" "+P+'="'+i(T)+'"'}}}else I=T}}if(v){var J=U.replace(/\n\s*/," ");J===U||~J.indexOf("\n")?v&&~U.indexOf("\n")&&(U+="\n"):U=J}if(U+=">",b.test(A))throw new Error(A+" is not a valid HTML tag name in "+U);var V,q=g.test(A)||o.voidElements&&o.voidElements.test(A),z=[];if($)v&&c($)&&($="\n"+h+a($,h)),U+=$;else if(null!=I&&s(V=[],I).length){for(var B=v&&~U.indexOf("\n"),G=!1,Z=0;Z<V.length;Z++){var K=V[Z];if(null!=K&&!1!==K){var Q=_(K,r,o,!0,"svg"===A||"foreignObject"!==A&&p,d);if(v&&!B&&c(Q)&&(B=!0),Q)if(v){var X=Q.length>0&&"<"!=Q[0];G&&X?z[z.length-1]+=Q:z.push(Q),G=X}else z.push(Q)}}if(v&&B)for(var Y=z.length;Y--;)z[Y]="\n"+h+a(z[Y],h)}if(z.length||$)U+=z.join("");else if(o&&o.xml)return U.substring(0,U.length-1)+" />";return!q||V||$?(v&&~U.indexOf("\n")&&(U+="\n"),U+="</"+A+">"):U=U.replace(/>$/," />"),U}v.shallowRender=function(t,n){return v(t,n,p)};const h=/(\\|\"|\')/g,x=Object.prototype.toString,j=Date.prototype.toISOString,S=Error.prototype.toString,A=RegExp.prototype.toString,O=Symbol.prototype.toString,w=/^Symbol\((.*)\)(.*)$/,k=/\n/gi,F=Object.getOwnPropertySymbols||(t=>[]);function E(t){return"[object Array]"===t||"[object ArrayBuffer]"===t||"[object DataView]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object Int8Array]"===t||"[object Int16Array]"===t||"[object Int32Array]"===t||"[object Uint8Array]"===t||"[object Uint8ClampedArray]"===t||"[object Uint16Array]"===t||"[object Uint32Array]"===t}function C(t){return""===t.name?"[Function anonymous]":"[Function "+t.name+"]"}function M(t){return O.call(t).replace(w,"Symbol($1)")}function N(t){return"["+S.call(t)+"]"}function D(t){if(!0===t||!1===t)return""+t;if(void 0===t)return"undefined";if(null===t)return"null";const n=typeof t;if("number"===n)return function(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}(t);if("string"===n)return'"'+function(t){return t.replace(h,"\\$1")}(t)+'"';if("function"===n)return C(t);if("symbol"===n)return M(t);const e=x.call(t);return"[object WeakMap]"===e?"WeakMap {}":"[object WeakSet]"===e?"WeakSet {}":"[object Function]"===e||"[object GeneratorFunction]"===e?C(t,min):"[object Symbol]"===e?M(t):"[object Date]"===e?j.call(t):"[object Error]"===e?N(t):"[object RegExp]"===e?A.call(t):"[object Arguments]"===e&&0===t.length?"Arguments []":E(e)&&0===t.length?t.constructor.name+" []":t instanceof Error&&N(t)}function H(t,n,e,r,o,i,a,c,u,l){let f="";if(t.length){f+=o;const s=e+n;for(let e=0;e<t.length;e++)f+=s+U(t[e],n,s,r,o,i,a,c,u,l),e<t.length-1&&(f+=","+r);f+=o+e}return"["+f+"]"}function I(t,n,e,r,o,i,a,c,u,l){if((i=i.slice()).indexOf(t)>-1)return"[Circular]";i.push(t);const f=++c>a;if(!f&&t.toJSON&&"function"==typeof t.toJSON)return U(t.toJSON(),n,e,r,o,i,a,c,u,l);const s=x.call(t);return"[object Arguments]"===s?f?"[Arguments]":function(t,n,e,r,o,i,a,c,u,l){return(l?"":"Arguments ")+H(t,n,e,r,o,i,a,c,u,l)}(t,n,e,r,o,i,a,c,u,l):E(s)?f?"[Array]":function(t,n,e,r,o,i,a,c,u,l){return(l?"":t.constructor.name+" ")+H(t,n,e,r,o,i,a,c,u,l)}(t,n,e,r,o,i,a,c,u,l):"[object Map]"===s?f?"[Map]":function(t,n,e,r,o,i,a,c,u,l){let f="Map {";const s=t.entries();let p=s.next();if(!p.done){f+=o;const t=e+n;for(;!p.done;)f+=t+U(p.value[0],n,t,r,o,i,a,c,u,l)+" => "+U(p.value[1],n,t,r,o,i,a,c,u,l),p=s.next(),p.done||(f+=","+r);f+=o+e}return f+"}"}(t,n,e,r,o,i,a,c,u,l):"[object Set]"===s?f?"[Set]":function(t,n,e,r,o,i,a,c,u,l){let f="Set {";const s=t.entries();let p=s.next();if(!p.done){f+=o;const t=e+n;for(;!p.done;)f+=t+U(p.value[1],n,t,r,o,i,a,c,u,l),p=s.next(),p.done||(f+=","+r);f+=o+e}return f+"}"}(t,n,e,r,o,i,a,c,u,l):"object"==typeof t?f?"[Object]":function(t,n,e,r,o,i,a,c,u,l){let f=(l?"":t.constructor?t.constructor.name+" ":"Object ")+"{",s=Object.keys(t).sort();const p=F(t);if(p.length&&(s=s.filter(t=>!("symbol"==typeof t||"[object Symbol]"===x.call(t))).concat(p)),s.length){f+=o;const p=e+n;for(let e=0;e<s.length;e++){const y=s[e];f+=p+U(y,n,p,r,o,i,a,c,u,l)+": "+U(t[y],n,p,r,o,i,a,c,u,l),e<s.length-1&&(f+=","+r)}f+=o+e}return f+"}"}(t,n,e,r,o,i,a,c,u,l):void 0}function $(t,n,e,r,o,i,a,c,u,l){let f,s=!1;for(let n=0;n<u.length;n++)if(f=u[n],f.test(t)){s=!0;break}return!!s&&f.print(t,function(t){return U(t,n,e,r,o,i,a,c,u,l)},function(t){const r=e+n;return r+t.replace(k,"\n"+r)},{edgeSpacing:o,spacing:r})}function U(t,n,e,r,o,i,a,c,u,l){return D(t)||$(t,n,e,r,o,i,a,c,u,l)||I(t,n,e,r,o,i,a,c,u,l)}const W={indent:2,min:!1,maxDepth:Infinity,plugins:[]};function L(t){return new Array(t+1).join(" ")}var P={test:function(t){return t&&"object"==typeof t&&"type"in t&&"props"in t&&"key"in t},print:function(t,n,e){return v(t,P.context,P.opts)}},T={plugins:[P]},R={attributeHook:function(t,n,e,r,o){var c=typeof n;if("dangerouslySetInnerHTML"===t)return!1;if(null==n||"function"===c&&!r.functions)return"";if(r.skipFalseAttributes&&!o&&(!1===n||("class"===t||"style"===t)&&""===n))return"";var u="string"==typeof r.pretty?r.pretty:"\t";return"string"!==c?("function"!==c||r.functionNames?(P.context=e,P.opts=r,~(n=function(t,n){let e,r;n?(function(t){if(Object.keys(t).forEach(t=>{if(!W.hasOwnProperty(t))throw new Error("prettyFormat: Invalid option: "+t)}),t.min&&void 0!==t.indent&&0!==t.indent)throw new Error("prettyFormat: Cannot run with min option and indent")}(n),n=function(t){const n={};return Object.keys(W).forEach(e=>n[e]=t.hasOwnProperty(e)?t[e]:W[e]),n.min&&(n.indent=0),n}(n)):n=W;const o=n.min?" ":"\n",i=n.min?"":"\n";if(n&&n.plugins.length){e=L(n.indent),r=[];var a=$(t,e,"",o,i,r,n.maxDepth,0,n.plugins,n.min);if(a)return a}return D(t)||(e||(e=L(n.indent)),r||(r=[]),I(t,e,"",o,i,r,n.maxDepth,0,n.plugins,n.min))}(n,T)).indexOf("\n")&&(n=a("\n"+n,u)+"\n")):n="Function",a("\n"+t+"={"+n+"}",u)):"\n"+u+t+'="'+i(n)+'"'},jsx:!0,xml:!1,functions:!0,functionNames:!0,skipFalseAttributes:!0,pretty:" "};function J(t,n,e,r){return v(t,n,e=f(f({},R),e||{}))}export default J;export{J as render};
2
2
  //# sourceMappingURL=jsx.module.js.map
@@ -1,2 +1,2 @@
1
- import{options as t,Fragment as e}from"preact";if("function"!=typeof Symbol){let t=0;Symbol=function(e){return`@@${e}${++t}`},Symbol.for=t=>`@@${t}`}const n=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,r=/[&<>"]/;function o(t){const e=String(t);return r.test(e)?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):e}let i=(t,e)=>String(t).replace(/(\n+)/g,"$1"+(e||"\t")),l=(t,e,n)=>String(t).length>(e||40)||!n&&-1!==String(t).indexOf("\n")||-1!==String(t).indexOf("<");const c={};function u(t){let e="";for(let r in t){let o=t[r];null!=o&&""!==o&&(e&&(e+=" "),e+="-"==r[0]?r:c[r]||(c[r]=r.replace(/([A-Z])/g,"-$1").toLowerCase()),e+=": ",e+=o,"number"==typeof o&&!1===n.test(r)&&(e+="px"),e+=";")}return e||void 0}function s(t,e){for(let n in e)t[n]=e[n];return t}function a(t,e){return Array.isArray(e)?e.reduce(a,t):null!=e&&!1!==e&&t.push(e),t}const f={shallow:!0},p=[],y=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,g=/[\s\n\\/='"\0<>]/,b=()=>{};d.render=d;const m=[];function d(e,n,r){n=n||{},r=r||{};const o=t.__s;t.__s=!0;const i=_(e,n,r);return t.__c&&t.__c(e,m),m.length=0,t.__s=o,i}function _(n,r,c,f,m,d){if(null==n||"boolean"==typeof n)return"";if("object"!=typeof n)return o(n);let h=c.pretty,x=h&&"string"==typeof h?h:"\t";if(Array.isArray(n)){let t="";for(let e=0;e<n.length;e++)h&&e>0&&(t+="\n"),t+=_(n[e],r,c,f,m,d);return t}let j=n.type,S=n.props,A=!1;if("function"==typeof j){if(A=!0,!c.shallow||!f&&!1!==c.renderRootComponent){if(j===e){const t=[];return a(t,n.props.children),_(t,r,c,!1!==c.shallowHighOrder,m,d)}{let e,o=n.__c={__v:n,context:r,props:n.props,setState:b,forceUpdate:b,__h:[]};if(t.__b&&t.__b(n),t.__r&&t.__r(n),j.prototype&&"function"==typeof j.prototype.render){let t=j.contextType,i=t&&r[t.__c],l=null!=t?i?i.props.value:t.__:r;o=n.__c=new j(S,l),o.__v=n,o._dirty=o.__d=!0,o.props=S,null==o.state&&(o.state={}),null==o._nextState&&null==o.__s&&(o._nextState=o.__s=o.state),o.context=l,j.getDerivedStateFromProps?o.state=s(s({},o.state),j.getDerivedStateFromProps(o.props,o.state)):o.componentWillMount&&(o.componentWillMount(),o.state=o._nextState!==o.state?o._nextState:o.__s!==o.state?o.__s:o.state),e=o.render(o.props,o.state,o.context)}else{let t=j.contextType,o=t&&r[t.__c];e=j.call(n.__c,S,null!=t?o?o.props.value:t.__:r)}return o.getChildContext&&(r=s(s({},r),o.getChildContext())),t.diffed&&t.diffed(n),_(e,r,c,!1!==c.shallowHighOrder,m,d)}}j=(O=j).displayName||O!==Function&&O.name||function(t){let e=(Function.prototype.toString.call(t).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!e){let n=-1;for(let e=p.length;e--;)if(p[e]===t){n=e;break}n<0&&(n=p.push(t)-1),e=`UnnamedComponent${n}`}return e}(O)}var O;let w,$,k="<"+j;if(S){let t=Object.keys(S);c&&!0===c.sortAttributes&&t.sort();for(let e=0;e<t.length;e++){let n=t[e],i=S[n];if("children"===n){w=i;continue}if(g.test(n))continue;if(!(c&&c.allAttributes||"key"!==n&&"ref"!==n&&"__self"!==n&&"__source"!==n&&"defaultValue"!==n))continue;if("className"===n){if(S.class)continue;n="class"}else m&&n.match(/^xlink:?./)&&(n=n.toLowerCase().replace(/^xlink:?/,"xlink:"));if("htmlFor"===n){if(S.for)continue;n="for"}"style"===n&&i&&"object"==typeof i&&(i=u(i)),"a"===n[0]&&"r"===n[1]&&"boolean"==typeof i&&(i=String(i));let l=c.attributeHook&&c.attributeHook(n,i,r,c,A);if(l||""===l)k+=l;else if("dangerouslySetInnerHTML"===n)$=i&&i.__html;else if("textarea"===j&&"value"===n)w=i;else if((i||0===i||""===i)&&"function"!=typeof i){if(!(!0!==i&&""!==i||(i=n,c&&c.xml))){k+=" "+n;continue}if("value"===n){if("select"===j){d=i;continue}"option"===j&&d==i&&(k+=" selected")}k+=` ${n}="${o(i)}"`}}}if(h){let t=k.replace(/\n\s*/," ");t===k||~t.indexOf("\n")?h&&~k.indexOf("\n")&&(k+="\n"):k=t}if(k+=">",g.test(j))throw new Error(`${j} is not a valid HTML tag name in ${k}`);let v,F=y.test(j)||c.voidElements&&c.voidElements.test(j),E=[];if($)h&&l($)&&($="\n"+x+i($,x)),k+=$;else if(null!=w&&a(v=[],w).length){let t=h&&~k.indexOf("\n"),e=!1;for(let n=0;n<v.length;n++){let o=v[n];if(null!=o&&!1!==o){let n=_(o,r,c,!0,"svg"===j||"foreignObject"!==j&&m,d);if(h&&!t&&l(n)&&(t=!0),n)if(h){let t=n.length>0&&"<"!=n[0];e&&t?E[E.length-1]+=n:E.push(n),e=t}else E.push(n)}}if(h&&t)for(let t=E.length;t--;)E[t]="\n"+x+i(E[t],x)}if(E.length||$)k+=E.join("");else if(c&&c.xml)return k.substring(0,k.length-1)+" />";return!F||v||$?(h&&~k.indexOf("\n")&&(k+="\n"),k+=`</${j}>`):k=k.replace(/>$/," />"),k}d.shallowRender=(t,e)=>d(t,e,f);const h=/(\\|\"|\')/g,x=Object.prototype.toString,j=Date.prototype.toISOString,S=Error.prototype.toString,A=RegExp.prototype.toString,O=Symbol.prototype.toString,w=/^Symbol\((.*)\)(.*)$/,$=/\n/gi,k=Object.getOwnPropertySymbols||(t=>[]);function v(t){return"[object Array]"===t||"[object ArrayBuffer]"===t||"[object DataView]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object Int8Array]"===t||"[object Int16Array]"===t||"[object Int32Array]"===t||"[object Uint8Array]"===t||"[object Uint8ClampedArray]"===t||"[object Uint16Array]"===t||"[object Uint32Array]"===t}function F(t){return""===t.name?"[Function anonymous]":"[Function "+t.name+"]"}function E(t){return O.call(t).replace(w,"Symbol($1)")}function C(t){return"["+S.call(t)+"]"}function M(t){if(!0===t||!1===t)return""+t;if(void 0===t)return"undefined";if(null===t)return"null";const e=typeof t;if("number"===e)return function(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}(t);if("string"===e)return'"'+function(t){return t.replace(h,"\\$1")}(t)+'"';if("function"===e)return F(t);if("symbol"===e)return E(t);const n=x.call(t);return"[object WeakMap]"===n?"WeakMap {}":"[object WeakSet]"===n?"WeakSet {}":"[object Function]"===n||"[object GeneratorFunction]"===n?F(t,min):"[object Symbol]"===n?E(t):"[object Date]"===n?j.call(t):"[object Error]"===n?C(t):"[object RegExp]"===n?A.call(t):"[object Arguments]"===n&&0===t.length?"Arguments []":v(n)&&0===t.length?t.constructor.name+" []":t instanceof Error&&C(t)}function N(t,e,n,r,o,i,l,c,u,s){let a="";if(t.length){a+=o;const f=n+e;for(let n=0;n<t.length;n++)a+=f+I(t[n],e,f,r,o,i,l,c,u,s),n<t.length-1&&(a+=","+r);a+=o+n}return"["+a+"]"}function D(t,e,n,r,o,i,l,c,u,s){if((i=i.slice()).indexOf(t)>-1)return"[Circular]";i.push(t);const a=++c>l;if(!a&&t.toJSON&&"function"==typeof t.toJSON)return I(t.toJSON(),e,n,r,o,i,l,c,u,s);const f=x.call(t);return"[object Arguments]"===f?a?"[Arguments]":function(t,e,n,r,o,i,l,c,u,s){return(s?"":"Arguments ")+N(t,e,n,r,o,i,l,c,u,s)}(t,e,n,r,o,i,l,c,u,s):v(f)?a?"[Array]":function(t,e,n,r,o,i,l,c,u,s){return(s?"":t.constructor.name+" ")+N(t,e,n,r,o,i,l,c,u,s)}(t,e,n,r,o,i,l,c,u,s):"[object Map]"===f?a?"[Map]":function(t,e,n,r,o,i,l,c,u,s){let a="Map {";const f=t.entries();let p=f.next();if(!p.done){a+=o;const t=n+e;for(;!p.done;)a+=t+I(p.value[0],e,t,r,o,i,l,c,u,s)+" => "+I(p.value[1],e,t,r,o,i,l,c,u,s),p=f.next(),p.done||(a+=","+r);a+=o+n}return a+"}"}(t,e,n,r,o,i,l,c,u,s):"[object Set]"===f?a?"[Set]":function(t,e,n,r,o,i,l,c,u,s){let a="Set {";const f=t.entries();let p=f.next();if(!p.done){a+=o;const t=n+e;for(;!p.done;)a+=t+I(p.value[1],e,t,r,o,i,l,c,u,s),p=f.next(),p.done||(a+=","+r);a+=o+n}return a+"}"}(t,e,n,r,o,i,l,c,u,s):"object"==typeof t?a?"[Object]":function(t,e,n,r,o,i,l,c,u,s){let a=(s?"":t.constructor?t.constructor.name+" ":"Object ")+"{",f=Object.keys(t).sort();const p=k(t);if(p.length&&(f=f.filter(t=>!("symbol"==typeof t||"[object Symbol]"===x.call(t))).concat(p)),f.length){a+=o;const p=n+e;for(let n=0;n<f.length;n++){const y=f[n];a+=p+I(y,e,p,r,o,i,l,c,u,s)+": "+I(t[y],e,p,r,o,i,l,c,u,s),n<f.length-1&&(a+=","+r)}a+=o+n}return a+"}"}(t,e,n,r,o,i,l,c,u,s):void 0}function H(t,e,n,r,o,i,l,c,u,s){let a,f=!1;for(let e=0;e<u.length;e++)if(a=u[e],a.test(t)){f=!0;break}return!!f&&a.print(t,function(t){return I(t,e,n,r,o,i,l,c,u,s)},function(t){const r=n+e;return r+t.replace($,"\n"+r)},{edgeSpacing:o,spacing:r})}function I(t,e,n,r,o,i,l,c,u,s){return M(t)||H(t,e,n,r,o,i,l,c,u,s)||D(t,e,n,r,o,i,l,c,u,s)}const U={indent:2,min:!1,maxDepth:Infinity,plugins:[]};function W(t){return new Array(t+1).join(" ")}let L={test:t=>t&&"object"==typeof t&&"type"in t&&"props"in t&&"key"in t,print:(t,e,n)=>d(t,L.context,L.opts)},P={plugins:[L]},T={attributeHook:function(t,e,n,r,l){let c=typeof e;if("dangerouslySetInnerHTML"===t)return!1;if(null==e||"function"===c&&!r.functions)return"";if(r.skipFalseAttributes&&!l&&(!1===e||("class"===t||"style"===t)&&""===e))return"";let u="string"==typeof r.pretty?r.pretty:"\t";return"string"!==c?("function"!==c||r.functionNames?(L.context=n,L.opts=r,~(e=function(t,e){let n,r;e?(function(t){if(Object.keys(t).forEach(t=>{if(!U.hasOwnProperty(t))throw new Error("prettyFormat: Invalid option: "+t)}),t.min&&void 0!==t.indent&&0!==t.indent)throw new Error("prettyFormat: Cannot run with min option and indent")}(e),e=function(t){const e={};return Object.keys(U).forEach(n=>e[n]=t.hasOwnProperty(n)?t[n]:U[n]),e.min&&(e.indent=0),e}(e)):e=U;const o=e.min?" ":"\n",i=e.min?"":"\n";if(e&&e.plugins.length){n=W(e.indent),r=[];var l=H(t,n,"",o,i,r,e.maxDepth,0,e.plugins,e.min);if(l)return l}return M(t)||(n||(n=W(e.indent)),r||(r=[]),D(t,n,"",o,i,r,e.maxDepth,0,e.plugins,e.min))}(e,P)).indexOf("\n")&&(e=`${i("\n"+e,u)}\n`)):e="Function",i(`\n${t}={${e}}`,u)):`\n${u}${t}="${o(e)}"`},jsx:!0,xml:!1,functions:!0,functionNames:!0,skipFalseAttributes:!0,pretty:" "};function R(t,e,n,r){return d(t,e,n=s(s({},T),n||{}))}export default R;export{R as render};
1
+ import{options as t,Fragment as e}from"preact";if("function"!=typeof Symbol){let t=0;Symbol=function(e){return`@@${e}${++t}`},Symbol.for=t=>`@@${t}`}const n=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,r=/[&<>"]/;function o(t){const e=String(t);return r.test(e)?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):e}let i=(t,e)=>String(t).replace(/(\n+)/g,"$1"+(e||"\t")),l=(t,e,n)=>String(t).length>(e||40)||!n&&-1!==String(t).indexOf("\n")||-1!==String(t).indexOf("<");const c={};function u(t){let e="";for(let r in t){let o=t[r];null!=o&&""!==o&&(e&&(e+=" "),e+="-"==r[0]?r:c[r]||(c[r]=r.replace(/([A-Z])/g,"-$1").toLowerCase()),e+=": ",e+=o,"number"==typeof o&&!1===n.test(r)&&(e+="px"),e+=";")}return e||void 0}function s(t,e){for(let n in e)t[n]=e[n];return t}function a(t,e){return Array.isArray(e)?e.reduce(a,t):null!=e&&!1!==e&&t.push(e),t}const f={shallow:!0},p=[],y=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,g=/[\s\n\\/='"\0<>]/,b=()=>{};d.render=d;const m=[];function d(e,n,r){n=n||{},r=r||{};const o=t.__s;t.__s=!0;const i=_(e,n,r);return t.__c&&t.__c(e,m),m.length=0,t.__s=o,i}function _(n,r,c,f,m,d){if(null==n||"boolean"==typeof n)return"";if("object"!=typeof n)return o(n);let h=c.pretty,x=h&&"string"==typeof h?h:"\t";if(Array.isArray(n)){let t="";for(let e=0;e<n.length;e++)h&&e>0&&(t+="\n"),t+=_(n[e],r,c,f,m,d);return t}let j=n.type,S=n.props,A=!1;if("function"==typeof j){if(A=!0,!c.shallow||!f&&!1!==c.renderRootComponent){if(j===e){const t=[];return a(t,n.props.children),_(t,r,c,!1!==c.shallowHighOrder,m,d)}{let e,o=n.__c={__v:n,context:r,props:n.props,setState:b,forceUpdate:b,__h:[]};if(t.__b&&t.__b(n),t.__r&&t.__r(n),j.prototype&&"function"==typeof j.prototype.render){let t=j.contextType,i=t&&r[t.__c],l=null!=t?i?i.props.value:t.__:r;o=n.__c=new j(S,l),o.__v=n,o._dirty=o.__d=!0,o.props=S,null==o.state&&(o.state={}),null==o._nextState&&null==o.__s&&(o._nextState=o.__s=o.state),o.context=l,j.getDerivedStateFromProps?o.state=s(s({},o.state),j.getDerivedStateFromProps(o.props,o.state)):o.componentWillMount&&(o.componentWillMount(),o.state=o._nextState!==o.state?o._nextState:o.__s!==o.state?o.__s:o.state),e=o.render(o.props,o.state,o.context)}else{let t=j.contextType,o=t&&r[t.__c];e=j.call(n.__c,S,null!=t?o?o.props.value:t.__:r)}return o.getChildContext&&(r=s(s({},r),o.getChildContext())),t.diffed&&t.diffed(n),_(e,r,c,!1!==c.shallowHighOrder,m,d)}}j=(O=j).displayName||O!==Function&&O.name||function(t){let e=(Function.prototype.toString.call(t).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!e){let n=-1;for(let e=p.length;e--;)if(p[e]===t){n=e;break}n<0&&(n=p.push(t)-1),e=`UnnamedComponent${n}`}return e}(O)}var O;let v,w,$="<"+j;if(S){let t=Object.keys(S);c&&!0===c.sortAttributes&&t.sort();for(let e=0;e<t.length;e++){let n=t[e],i=S[n];if("children"===n){v=i;continue}if(g.test(n))continue;if(!(c&&c.allAttributes||"key"!==n&&"ref"!==n&&"__self"!==n&&"__source"!==n))continue;if("defaultValue"===n)n="value";else if("className"===n){if(void 0!==S.class)continue;n="class"}else m&&n.match(/^xlink:?./)&&(n=n.toLowerCase().replace(/^xlink:?/,"xlink:"));if("htmlFor"===n){if(S.for)continue;n="for"}"style"===n&&i&&"object"==typeof i&&(i=u(i)),"a"===n[0]&&"r"===n[1]&&"boolean"==typeof i&&(i=String(i));let l=c.attributeHook&&c.attributeHook(n,i,r,c,A);if(l||""===l)$+=l;else if("dangerouslySetInnerHTML"===n)w=i&&i.__html;else if("textarea"===j&&"value"===n)v=i;else if((i||0===i||""===i)&&"function"!=typeof i){if(!(!0!==i&&""!==i||(i=n,c&&c.xml))){$+=" "+n;continue}if("value"===n){if("select"===j){d=i;continue}"option"===j&&d==i&&($+=" selected")}$+=` ${n}="${o(i)}"`}}}if(h){let t=$.replace(/\n\s*/," ");t===$||~t.indexOf("\n")?h&&~$.indexOf("\n")&&($+="\n"):$=t}if($+=">",g.test(j))throw new Error(`${j} is not a valid HTML tag name in ${$}`);let k,F=y.test(j)||c.voidElements&&c.voidElements.test(j),E=[];if(w)h&&l(w)&&(w="\n"+x+i(w,x)),$+=w;else if(null!=v&&a(k=[],v).length){let t=h&&~$.indexOf("\n"),e=!1;for(let n=0;n<k.length;n++){let o=k[n];if(null!=o&&!1!==o){let n=_(o,r,c,!0,"svg"===j||"foreignObject"!==j&&m,d);if(h&&!t&&l(n)&&(t=!0),n)if(h){let t=n.length>0&&"<"!=n[0];e&&t?E[E.length-1]+=n:E.push(n),e=t}else E.push(n)}}if(h&&t)for(let t=E.length;t--;)E[t]="\n"+x+i(E[t],x)}if(E.length||w)$+=E.join("");else if(c&&c.xml)return $.substring(0,$.length-1)+" />";return!F||k||w?(h&&~$.indexOf("\n")&&($+="\n"),$+=`</${j}>`):$=$.replace(/>$/," />"),$}d.shallowRender=(t,e)=>d(t,e,f);const h=/(\\|\"|\')/g,x=Object.prototype.toString,j=Date.prototype.toISOString,S=Error.prototype.toString,A=RegExp.prototype.toString,O=Symbol.prototype.toString,v=/^Symbol\((.*)\)(.*)$/,w=/\n/gi,$=Object.getOwnPropertySymbols||(t=>[]);function k(t){return"[object Array]"===t||"[object ArrayBuffer]"===t||"[object DataView]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object Int8Array]"===t||"[object Int16Array]"===t||"[object Int32Array]"===t||"[object Uint8Array]"===t||"[object Uint8ClampedArray]"===t||"[object Uint16Array]"===t||"[object Uint32Array]"===t}function F(t){return""===t.name?"[Function anonymous]":"[Function "+t.name+"]"}function E(t){return O.call(t).replace(v,"Symbol($1)")}function C(t){return"["+S.call(t)+"]"}function M(t){if(!0===t||!1===t)return""+t;if(void 0===t)return"undefined";if(null===t)return"null";const e=typeof t;if("number"===e)return function(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}(t);if("string"===e)return'"'+function(t){return t.replace(h,"\\$1")}(t)+'"';if("function"===e)return F(t);if("symbol"===e)return E(t);const n=x.call(t);return"[object WeakMap]"===n?"WeakMap {}":"[object WeakSet]"===n?"WeakSet {}":"[object Function]"===n||"[object GeneratorFunction]"===n?F(t,min):"[object Symbol]"===n?E(t):"[object Date]"===n?j.call(t):"[object Error]"===n?C(t):"[object RegExp]"===n?A.call(t):"[object Arguments]"===n&&0===t.length?"Arguments []":k(n)&&0===t.length?t.constructor.name+" []":t instanceof Error&&C(t)}function N(t,e,n,r,o,i,l,c,u,s){let a="";if(t.length){a+=o;const f=n+e;for(let n=0;n<t.length;n++)a+=f+I(t[n],e,f,r,o,i,l,c,u,s),n<t.length-1&&(a+=","+r);a+=o+n}return"["+a+"]"}function D(t,e,n,r,o,i,l,c,u,s){if((i=i.slice()).indexOf(t)>-1)return"[Circular]";i.push(t);const a=++c>l;if(!a&&t.toJSON&&"function"==typeof t.toJSON)return I(t.toJSON(),e,n,r,o,i,l,c,u,s);const f=x.call(t);return"[object Arguments]"===f?a?"[Arguments]":function(t,e,n,r,o,i,l,c,u,s){return(s?"":"Arguments ")+N(t,e,n,r,o,i,l,c,u,s)}(t,e,n,r,o,i,l,c,u,s):k(f)?a?"[Array]":function(t,e,n,r,o,i,l,c,u,s){return(s?"":t.constructor.name+" ")+N(t,e,n,r,o,i,l,c,u,s)}(t,e,n,r,o,i,l,c,u,s):"[object Map]"===f?a?"[Map]":function(t,e,n,r,o,i,l,c,u,s){let a="Map {";const f=t.entries();let p=f.next();if(!p.done){a+=o;const t=n+e;for(;!p.done;)a+=t+I(p.value[0],e,t,r,o,i,l,c,u,s)+" => "+I(p.value[1],e,t,r,o,i,l,c,u,s),p=f.next(),p.done||(a+=","+r);a+=o+n}return a+"}"}(t,e,n,r,o,i,l,c,u,s):"[object Set]"===f?a?"[Set]":function(t,e,n,r,o,i,l,c,u,s){let a="Set {";const f=t.entries();let p=f.next();if(!p.done){a+=o;const t=n+e;for(;!p.done;)a+=t+I(p.value[1],e,t,r,o,i,l,c,u,s),p=f.next(),p.done||(a+=","+r);a+=o+n}return a+"}"}(t,e,n,r,o,i,l,c,u,s):"object"==typeof t?a?"[Object]":function(t,e,n,r,o,i,l,c,u,s){let a=(s?"":t.constructor?t.constructor.name+" ":"Object ")+"{",f=Object.keys(t).sort();const p=$(t);if(p.length&&(f=f.filter(t=>!("symbol"==typeof t||"[object Symbol]"===x.call(t))).concat(p)),f.length){a+=o;const p=n+e;for(let n=0;n<f.length;n++){const y=f[n];a+=p+I(y,e,p,r,o,i,l,c,u,s)+": "+I(t[y],e,p,r,o,i,l,c,u,s),n<f.length-1&&(a+=","+r)}a+=o+n}return a+"}"}(t,e,n,r,o,i,l,c,u,s):void 0}function H(t,e,n,r,o,i,l,c,u,s){let a,f=!1;for(let e=0;e<u.length;e++)if(a=u[e],a.test(t)){f=!0;break}return!!f&&a.print(t,function(t){return I(t,e,n,r,o,i,l,c,u,s)},function(t){const r=n+e;return r+t.replace(w,"\n"+r)},{edgeSpacing:o,spacing:r})}function I(t,e,n,r,o,i,l,c,u,s){return M(t)||H(t,e,n,r,o,i,l,c,u,s)||D(t,e,n,r,o,i,l,c,u,s)}const U={indent:2,min:!1,maxDepth:Infinity,plugins:[]};function W(t){return new Array(t+1).join(" ")}let L={test:t=>t&&"object"==typeof t&&"type"in t&&"props"in t&&"key"in t,print:(t,e,n)=>d(t,L.context,L.opts)},P={plugins:[L]},T={attributeHook:function(t,e,n,r,l){let c=typeof e;if("dangerouslySetInnerHTML"===t)return!1;if(null==e||"function"===c&&!r.functions)return"";if(r.skipFalseAttributes&&!l&&(!1===e||("class"===t||"style"===t)&&""===e))return"";let u="string"==typeof r.pretty?r.pretty:"\t";return"string"!==c?("function"!==c||r.functionNames?(L.context=n,L.opts=r,~(e=function(t,e){let n,r;e?(function(t){if(Object.keys(t).forEach(t=>{if(!U.hasOwnProperty(t))throw new Error("prettyFormat: Invalid option: "+t)}),t.min&&void 0!==t.indent&&0!==t.indent)throw new Error("prettyFormat: Cannot run with min option and indent")}(e),e=function(t){const e={};return Object.keys(U).forEach(n=>e[n]=t.hasOwnProperty(n)?t[n]:U[n]),e.min&&(e.indent=0),e}(e)):e=U;const o=e.min?" ":"\n",i=e.min?"":"\n";if(e&&e.plugins.length){n=W(e.indent),r=[];var l=H(t,n,"",o,i,r,e.maxDepth,0,e.plugins,e.min);if(l)return l}return M(t)||(n||(n=W(e.indent)),r||(r=[]),D(t,n,"",o,i,r,e.maxDepth,0,e.plugins,e.min))}(e,P)).indexOf("\n")&&(e=`${i("\n"+e,u)}\n`)):e="Function",i(`\n${t}={${e}}`,u)):`\n${u}${t}="${o(e)}"`},jsx:!0,xml:!1,functions:!0,functionNames:!0,skipFalseAttributes:!0,pretty:" "};function R(t,e,n,r){return d(t,e,n=s(s({},T),n||{}))}export default R;export{R as render};
2
2
  //# sourceMappingURL=jsx.modern.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsx.modern.js","sources":["../src/polyfills.js","../src/util.js","../src/index.js","../node_modules/pretty-format/printString.js","../node_modules/pretty-format/index.js","../src/jsx.js"],"sourcesContent":["if (typeof Symbol !== 'function') {\n\tlet c = 0;\n\t// eslint-disable-next-line\n\tSymbol = function (s) {\n\t\treturn `@@${s}${++c}`;\n\t};\n\tSymbol.for = (s) => `@@${s}`;\n}\n","// DOM properties that should NOT have \"px\" added when numeric\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i;\n\nconst ENCODED_ENTITIES = /[&<>\"]/;\n\nexport function encodeEntities(input) {\n\tconst s = String(input);\n\tif (!ENCODED_ENTITIES.test(s)) {\n\t\treturn s;\n\t}\n\treturn s\n\t\t.replace(/&/g, '&amp;')\n\t\t.replace(/</g, '&lt;')\n\t\t.replace(/>/g, '&gt;')\n\t\t.replace(/\"/g, '&quot;');\n}\n\nexport let indent = (s, char) =>\n\tString(s).replace(/(\\n+)/g, '$1' + (char || '\\t'));\n\nexport let isLargeString = (s, length, ignoreLines) =>\n\tString(s).length > (length || 40) ||\n\t(!ignoreLines && String(s).indexOf('\\n') !== -1) ||\n\tString(s).indexOf('<') !== -1;\n\nconst JS_TO_CSS = {};\n\n// Convert an Object style to a CSSText string\nexport function styleObjToCss(s) {\n\tlet str = '';\n\tfor (let prop in s) {\n\t\tlet val = s[prop];\n\t\tif (val != null && val !== '') {\n\t\t\tif (str) str += ' ';\n\t\t\t// str += jsToCss(prop);\n\t\t\tstr +=\n\t\t\t\tprop[0] == '-'\n\t\t\t\t\t? prop\n\t\t\t\t\t: JS_TO_CSS[prop] ||\n\t\t\t\t\t (JS_TO_CSS[prop] = prop.replace(/([A-Z])/g, '-$1').toLowerCase());\n\t\t\tstr += ': ';\n\t\t\tstr += val;\n\t\t\tif (typeof val === 'number' && IS_NON_DIMENSIONAL.test(prop) === false) {\n\t\t\t\tstr += 'px';\n\t\t\t}\n\t\t\tstr += ';';\n\t\t}\n\t}\n\treturn str || undefined;\n}\n\n/**\n * Copy all properties from `props` onto `obj`.\n * @param {object} obj Object onto which properties should be copied.\n * @param {object} props Object from which to copy properties.\n * @returns {object}\n * @private\n */\nexport function assign(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn obj;\n}\n\n/**\n * Get flattened children from the children prop\n * @param {Array} accumulator\n * @param {any} children A `props.children` opaque object.\n * @returns {Array} accumulator\n * @private\n */\nexport function getChildren(accumulator, children) {\n\tif (Array.isArray(children)) {\n\t\tchildren.reduce(getChildren, accumulator);\n\t} else if (children != null && children !== false) {\n\t\taccumulator.push(children);\n\t}\n\treturn accumulator;\n}\n","import {\n\tencodeEntities,\n\tindent,\n\tisLargeString,\n\tstyleObjToCss,\n\tassign,\n\tgetChildren\n} from './util';\nimport { options, Fragment } from 'preact';\n\n/** @typedef {import('preact').VNode} VNode */\n\nconst SHALLOW = { shallow: true };\n\n// components without names, kept as a hash for later comparison to return consistent UnnamedComponentXX names.\nconst UNNAMED = [];\n\nconst VOID_ELEMENTS = /^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;\n\nconst UNSAFE_NAME = /[\\s\\n\\\\/='\"\\0<>]/;\n\nconst noop = () => {};\n\n/** Render Preact JSX + Components to an HTML string.\n *\t@name render\n *\t@function\n *\t@param {VNode} vnode\tJSX VNode to render.\n *\t@param {Object} [context={}]\tOptionally pass an initial context object through the render path.\n *\t@param {Object} [options={}]\tRendering options\n *\t@param {Boolean} [options.shallow=false]\tIf `true`, renders nested Components as HTML elements (`<Foo a=\"b\" />`).\n *\t@param {Boolean} [options.xml=false]\t\tIf `true`, uses self-closing tags for elements without children.\n *\t@param {Boolean} [options.pretty=false]\t\tIf `true`, adds whitespace for readability\n *\t@param {RegExp|undefined} [options.voidElements] RegeEx that matches elements that are considered void (self-closing)\n */\nrenderToString.render = renderToString;\n\n/** Only render elements, leaving Components inline as `<ComponentName ... />`.\n *\tThis method is just a convenience alias for `render(vnode, context, { shallow:true })`\n *\t@name shallow\n *\t@function\n *\t@param {VNode} vnode\tJSX VNode to render.\n *\t@param {Object} [context={}]\tOptionally pass an initial context object through the render path.\n */\nlet shallowRender = (vnode, context) => renderToString(vnode, context, SHALLOW);\n\nconst EMPTY_ARR = [];\nfunction renderToString(vnode, context, opts) {\n\tcontext = context || {};\n\topts = opts || {};\n\n\t// Performance optimization: `renderToString` is synchronous and we\n\t// therefore don't execute any effects. To do that we pass an empty\n\t// array to `options._commit` (`__c`). But we can go one step further\n\t// and avoid a lot of dirty checks and allocations by setting\n\t// `options._skipEffects` (`__s`) too.\n\tconst previousSkipEffects = options.__s;\n\toptions.__s = true;\n\n\tconst res = _renderToString(vnode, context, opts);\n\n\t// options._commit, we don't schedule any effects in this library right now,\n\t// so we can pass an empty queue to this hook.\n\tif (options.__c) options.__c(vnode, EMPTY_ARR);\n\tEMPTY_ARR.length = 0;\n\toptions.__s = previousSkipEffects;\n\treturn res;\n}\n\n/** The default export is an alias of `render()`. */\nfunction _renderToString(vnode, context, opts, inner, isSvgMode, selectValue) {\n\tif (vnode == null || typeof vnode === 'boolean') {\n\t\treturn '';\n\t}\n\n\t// #text nodes\n\tif (typeof vnode !== 'object') {\n\t\treturn encodeEntities(vnode);\n\t}\n\n\tlet pretty = opts.pretty,\n\t\tindentChar = pretty && typeof pretty === 'string' ? pretty : '\\t';\n\n\tif (Array.isArray(vnode)) {\n\t\tlet rendered = '';\n\t\tfor (let i = 0; i < vnode.length; i++) {\n\t\t\tif (pretty && i > 0) rendered += '\\n';\n\t\t\trendered += _renderToString(\n\t\t\t\tvnode[i],\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\tinner,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue\n\t\t\t);\n\t\t}\n\t\treturn rendered;\n\t}\n\n\tlet nodeName = vnode.type,\n\t\tprops = vnode.props,\n\t\tisComponent = false;\n\n\t// components\n\tif (typeof nodeName === 'function') {\n\t\tisComponent = true;\n\t\tif (opts.shallow && (inner || opts.renderRootComponent === false)) {\n\t\t\tnodeName = getComponentName(nodeName);\n\t\t} else if (nodeName === Fragment) {\n\t\t\tconst children = [];\n\t\t\tgetChildren(children, vnode.props.children);\n\t\t\treturn _renderToString(\n\t\t\t\tchildren,\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\topts.shallowHighOrder !== false,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue\n\t\t\t);\n\t\t} else {\n\t\t\tlet rendered;\n\n\t\t\tlet c = (vnode.__c = {\n\t\t\t\t__v: vnode,\n\t\t\t\tcontext,\n\t\t\t\tprops: vnode.props,\n\t\t\t\t// silently drop state updates\n\t\t\t\tsetState: noop,\n\t\t\t\tforceUpdate: noop,\n\t\t\t\t// hooks\n\t\t\t\t__h: []\n\t\t\t});\n\n\t\t\t// options._diff\n\t\t\tif (options.__b) options.__b(vnode);\n\n\t\t\t// options._render\n\t\t\tif (options.__r) options.__r(vnode);\n\n\t\t\tif (\n\t\t\t\t!nodeName.prototype ||\n\t\t\t\ttypeof nodeName.prototype.render !== 'function'\n\t\t\t) {\n\t\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t\t// the context value as `this.context` just for this component.\n\t\t\t\tlet cxType = nodeName.contextType;\n\t\t\t\tlet provider = cxType && context[cxType.__c];\n\t\t\t\tlet cctx =\n\t\t\t\t\tcxType != null\n\t\t\t\t\t\t? provider\n\t\t\t\t\t\t\t? provider.props.value\n\t\t\t\t\t\t\t: cxType.__\n\t\t\t\t\t\t: context;\n\n\t\t\t\t// stateless functional components\n\t\t\t\trendered = nodeName.call(vnode.__c, props, cctx);\n\t\t\t} else {\n\t\t\t\t// class-based components\n\t\t\t\tlet cxType = nodeName.contextType;\n\t\t\t\tlet provider = cxType && context[cxType.__c];\n\t\t\t\tlet cctx =\n\t\t\t\t\tcxType != null\n\t\t\t\t\t\t? provider\n\t\t\t\t\t\t\t? provider.props.value\n\t\t\t\t\t\t\t: cxType.__\n\t\t\t\t\t\t: context;\n\n\t\t\t\t// c = new nodeName(props, context);\n\t\t\t\tc = vnode.__c = new nodeName(props, cctx);\n\t\t\t\tc.__v = vnode;\n\t\t\t\t// turn off stateful re-rendering:\n\t\t\t\tc._dirty = c.__d = true;\n\t\t\t\tc.props = props;\n\t\t\t\tif (c.state == null) c.state = {};\n\n\t\t\t\tif (c._nextState == null && c.__s == null) {\n\t\t\t\t\tc._nextState = c.__s = c.state;\n\t\t\t\t}\n\n\t\t\t\tc.context = cctx;\n\t\t\t\tif (nodeName.getDerivedStateFromProps)\n\t\t\t\t\tc.state = assign(\n\t\t\t\t\t\tassign({}, c.state),\n\t\t\t\t\t\tnodeName.getDerivedStateFromProps(c.props, c.state)\n\t\t\t\t\t);\n\t\t\t\telse if (c.componentWillMount) {\n\t\t\t\t\tc.componentWillMount();\n\n\t\t\t\t\t// If the user called setState in cWM we need to flush pending,\n\t\t\t\t\t// state updates. This is the same behaviour in React.\n\t\t\t\t\tc.state =\n\t\t\t\t\t\tc._nextState !== c.state\n\t\t\t\t\t\t\t? c._nextState\n\t\t\t\t\t\t\t: c.__s !== c.state\n\t\t\t\t\t\t\t? c.__s\n\t\t\t\t\t\t\t: c.state;\n\t\t\t\t}\n\n\t\t\t\trendered = c.render(c.props, c.state, c.context);\n\t\t\t}\n\n\t\t\tif (c.getChildContext) {\n\t\t\t\tcontext = assign(assign({}, context), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (options.diffed) options.diffed(vnode);\n\t\t\treturn _renderToString(\n\t\t\t\trendered,\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\topts.shallowHighOrder !== false,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue\n\t\t\t);\n\t\t}\n\t}\n\n\t// render JSX to HTML\n\tlet s = '<' + nodeName,\n\t\tpropChildren,\n\t\thtml;\n\n\tif (props) {\n\t\tlet attrs = Object.keys(props);\n\n\t\t// allow sorting lexicographically for more determinism (useful for tests, such as via preact-jsx-chai)\n\t\tif (opts && opts.sortAttributes === true) attrs.sort();\n\n\t\tfor (let i = 0; i < attrs.length; i++) {\n\t\t\tlet name = attrs[i],\n\t\t\t\tv = props[name];\n\t\t\tif (name === 'children') {\n\t\t\t\tpropChildren = v;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (UNSAFE_NAME.test(name)) continue;\n\n\t\t\tif (\n\t\t\t\t!(opts && opts.allAttributes) &&\n\t\t\t\t(name === 'key' ||\n\t\t\t\t\tname === 'ref' ||\n\t\t\t\t\tname === '__self' ||\n\t\t\t\t\tname === '__source' ||\n\t\t\t\t\tname === 'defaultValue')\n\t\t\t)\n\t\t\t\tcontinue;\n\n\t\t\tif (name === 'className') {\n\t\t\t\tif (props.class) continue;\n\t\t\t\tname = 'class';\n\t\t\t} else if (isSvgMode && name.match(/^xlink:?./)) {\n\t\t\t\tname = name.toLowerCase().replace(/^xlink:?/, 'xlink:');\n\t\t\t}\n\n\t\t\tif (name === 'htmlFor') {\n\t\t\t\tif (props.for) continue;\n\t\t\t\tname = 'for';\n\t\t\t}\n\n\t\t\tif (name === 'style' && v && typeof v === 'object') {\n\t\t\t\tv = styleObjToCss(v);\n\t\t\t}\n\n\t\t\t// always use string values instead of booleans for aria attributes\n\t\t\t// also see https://github.com/preactjs/preact/pull/2347/files\n\t\t\tif (name[0] === 'a' && name['1'] === 'r' && typeof v === 'boolean') {\n\t\t\t\tv = String(v);\n\t\t\t}\n\n\t\t\tlet hooked =\n\t\t\t\topts.attributeHook &&\n\t\t\t\topts.attributeHook(name, v, context, opts, isComponent);\n\t\t\tif (hooked || hooked === '') {\n\t\t\t\ts += hooked;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (name === 'dangerouslySetInnerHTML') {\n\t\t\t\thtml = v && v.__html;\n\t\t\t} else if (nodeName === 'textarea' && name === 'value') {\n\t\t\t\t// <textarea value=\"a&b\"> --> <textarea>a&amp;b</textarea>\n\t\t\t\tpropChildren = v;\n\t\t\t} else if ((v || v === 0 || v === '') && typeof v !== 'function') {\n\t\t\t\tif (v === true || v === '') {\n\t\t\t\t\tv = name;\n\t\t\t\t\t// in non-xml mode, allow boolean attributes\n\t\t\t\t\tif (!opts || !opts.xml) {\n\t\t\t\t\t\ts += ' ' + name;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (name === 'value') {\n\t\t\t\t\tif (nodeName === 'select') {\n\t\t\t\t\t\tselectValue = v;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (nodeName === 'option' && selectValue == v) {\n\t\t\t\t\t\ts += ` selected`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ts += ` ${name}=\"${encodeEntities(v)}\"`;\n\t\t\t}\n\t\t}\n\t}\n\n\t// account for >1 multiline attribute\n\tif (pretty) {\n\t\tlet sub = s.replace(/\\n\\s*/, ' ');\n\t\tif (sub !== s && !~sub.indexOf('\\n')) s = sub;\n\t\telse if (pretty && ~s.indexOf('\\n')) s += '\\n';\n\t}\n\n\ts += '>';\n\n\tif (UNSAFE_NAME.test(nodeName))\n\t\tthrow new Error(`${nodeName} is not a valid HTML tag name in ${s}`);\n\n\tlet isVoid =\n\t\tVOID_ELEMENTS.test(nodeName) ||\n\t\t(opts.voidElements && opts.voidElements.test(nodeName));\n\tlet pieces = [];\n\n\tlet children;\n\tif (html) {\n\t\t// if multiline, indent.\n\t\tif (pretty && isLargeString(html)) {\n\t\t\thtml = '\\n' + indentChar + indent(html, indentChar);\n\t\t}\n\t\ts += html;\n\t} else if (\n\t\tpropChildren != null &&\n\t\tgetChildren((children = []), propChildren).length\n\t) {\n\t\tlet hasLarge = pretty && ~s.indexOf('\\n');\n\t\tlet lastWasText = false;\n\n\t\tfor (let i = 0; i < children.length; i++) {\n\t\t\tlet child = children[i];\n\n\t\t\tif (child != null && child !== false) {\n\t\t\t\tlet childSvgMode =\n\t\t\t\t\t\tnodeName === 'svg'\n\t\t\t\t\t\t\t? true\n\t\t\t\t\t\t\t: nodeName === 'foreignObject'\n\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t: isSvgMode,\n\t\t\t\t\tret = _renderToString(\n\t\t\t\t\t\tchild,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\topts,\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\tchildSvgMode,\n\t\t\t\t\t\tselectValue\n\t\t\t\t\t);\n\n\t\t\t\tif (pretty && !hasLarge && isLargeString(ret)) hasLarge = true;\n\n\t\t\t\t// Skip if we received an empty string\n\t\t\t\tif (ret) {\n\t\t\t\t\tif (pretty) {\n\t\t\t\t\t\tlet isText = ret.length > 0 && ret[0] != '<';\n\n\t\t\t\t\t\t// We merge adjacent text nodes, otherwise each piece would be printed\n\t\t\t\t\t\t// on a new line.\n\t\t\t\t\t\tif (lastWasText && isText) {\n\t\t\t\t\t\t\tpieces[pieces.length - 1] += ret;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpieces.push(ret);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlastWasText = isText;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpieces.push(ret);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (pretty && hasLarge) {\n\t\t\tfor (let i = pieces.length; i--; ) {\n\t\t\t\tpieces[i] = '\\n' + indentChar + indent(pieces[i], indentChar);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (pieces.length || html) {\n\t\ts += pieces.join('');\n\t} else if (opts && opts.xml) {\n\t\treturn s.substring(0, s.length - 1) + ' />';\n\t}\n\n\tif (isVoid && !children && !html) {\n\t\ts = s.replace(/>$/, ' />');\n\t} else {\n\t\tif (pretty && ~s.indexOf('\\n')) s += '\\n';\n\t\ts += `</${nodeName}>`;\n\t}\n\n\treturn s;\n}\n\nfunction getComponentName(component) {\n\treturn (\n\t\tcomponent.displayName ||\n\t\t(component !== Function && component.name) ||\n\t\tgetFallbackComponentName(component)\n\t);\n}\n\nfunction getFallbackComponentName(component) {\n\tlet str = Function.prototype.toString.call(component),\n\t\tname = (str.match(/^\\s*function\\s+([^( ]+)/) || '')[1];\n\tif (!name) {\n\t\t// search for an existing indexed name for the given component:\n\t\tlet index = -1;\n\t\tfor (let i = UNNAMED.length; i--; ) {\n\t\t\tif (UNNAMED[i] === component) {\n\t\t\t\tindex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// not found, create a new indexed name:\n\t\tif (index < 0) {\n\t\t\tindex = UNNAMED.push(component) - 1;\n\t\t}\n\t\tname = `UnnamedComponent${index}`;\n\t}\n\treturn name;\n}\nrenderToString.shallowRender = shallowRender;\n\nexport default renderToString;\n\nexport {\n\trenderToString as render,\n\trenderToString as renderToStaticMarkup,\n\trenderToString,\n\tshallowRender\n};\n","'use strict';\n\nconst ESCAPED_CHARACTERS = /(\\\\|\\\"|\\')/g;\n\nmodule.exports = function printString(val) {\n return val.replace(ESCAPED_CHARACTERS, '\\\\$1');\n}\n","'use strict';\n\nconst printString = require('./printString');\n\nconst toString = Object.prototype.toString;\nconst toISOString = Date.prototype.toISOString;\nconst errorToString = Error.prototype.toString;\nconst regExpToString = RegExp.prototype.toString;\nconst symbolToString = Symbol.prototype.toString;\n\nconst SYMBOL_REGEXP = /^Symbol\\((.*)\\)(.*)$/;\nconst NEWLINE_REGEXP = /\\n/ig;\n\nconst getSymbols = Object.getOwnPropertySymbols || (obj => []);\n\nfunction isToStringedArrayType(toStringed) {\n return (\n toStringed === '[object Array]' ||\n toStringed === '[object ArrayBuffer]' ||\n toStringed === '[object DataView]' ||\n toStringed === '[object Float32Array]' ||\n toStringed === '[object Float64Array]' ||\n toStringed === '[object Int8Array]' ||\n toStringed === '[object Int16Array]' ||\n toStringed === '[object Int32Array]' ||\n toStringed === '[object Uint8Array]' ||\n toStringed === '[object Uint8ClampedArray]' ||\n toStringed === '[object Uint16Array]' ||\n toStringed === '[object Uint32Array]'\n );\n}\n\nfunction printNumber(val) {\n if (val != +val) return 'NaN';\n const isNegativeZero = val === 0 && (1 / val) < 0;\n return isNegativeZero ? '-0' : '' + val;\n}\n\nfunction printFunction(val) {\n if (val.name === '') {\n return '[Function anonymous]'\n } else {\n return '[Function ' + val.name + ']';\n }\n}\n\nfunction printSymbol(val) {\n return symbolToString.call(val).replace(SYMBOL_REGEXP, 'Symbol($1)');\n}\n\nfunction printError(val) {\n return '[' + errorToString.call(val) + ']';\n}\n\nfunction printBasicValue(val) {\n if (val === true || val === false) return '' + val;\n if (val === undefined) return 'undefined';\n if (val === null) return 'null';\n\n const typeOf = typeof val;\n\n if (typeOf === 'number') return printNumber(val);\n if (typeOf === 'string') return '\"' + printString(val) + '\"';\n if (typeOf === 'function') return printFunction(val);\n if (typeOf === 'symbol') return printSymbol(val);\n\n const toStringed = toString.call(val);\n\n if (toStringed === '[object WeakMap]') return 'WeakMap {}';\n if (toStringed === '[object WeakSet]') return 'WeakSet {}';\n if (toStringed === '[object Function]' || toStringed === '[object GeneratorFunction]') return printFunction(val, min);\n if (toStringed === '[object Symbol]') return printSymbol(val);\n if (toStringed === '[object Date]') return toISOString.call(val);\n if (toStringed === '[object Error]') return printError(val);\n if (toStringed === '[object RegExp]') return regExpToString.call(val);\n if (toStringed === '[object Arguments]' && val.length === 0) return 'Arguments []';\n if (isToStringedArrayType(toStringed) && val.length === 0) return val.constructor.name + ' []';\n\n if (val instanceof Error) return printError(val);\n\n return false;\n}\n\nfunction printList(list, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let body = '';\n\n if (list.length) {\n body += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n for (let i = 0; i < list.length; i++) {\n body += innerIndent + print(list[i], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n if (i < list.length - 1) {\n body += ',' + spacing;\n }\n }\n\n body += edgeSpacing + prevIndent;\n }\n\n return '[' + body + ']';\n}\n\nfunction printArguments(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n return (min ? '' : 'Arguments ') + printList(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n}\n\nfunction printArray(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n return (min ? '' : val.constructor.name + ' ') + printList(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n}\n\nfunction printMap(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let result = 'Map {';\n const iterator = val.entries();\n let current = iterator.next();\n\n if (!current.done) {\n result += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n while (!current.done) {\n const key = print(current.value[0], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n const value = print(current.value[1], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n result += innerIndent + key + ' => ' + value;\n\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + spacing;\n }\n }\n\n result += edgeSpacing + prevIndent;\n }\n\n return result + '}';\n}\n\nfunction printObject(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n const constructor = min ? '' : (val.constructor ? val.constructor.name + ' ' : 'Object ');\n let result = constructor + '{';\n let keys = Object.keys(val).sort();\n const symbols = getSymbols(val);\n\n if (symbols.length) {\n keys = keys\n .filter(key => !(typeof key === 'symbol' || toString.call(key) === '[object Symbol]'))\n .concat(symbols);\n }\n\n if (keys.length) {\n result += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const name = print(key, indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n const value = print(val[key], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n result += innerIndent + name + ': ' + value;\n\n if (i < keys.length - 1) {\n result += ',' + spacing;\n }\n }\n\n result += edgeSpacing + prevIndent;\n }\n\n return result + '}';\n}\n\nfunction printSet(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let result = 'Set {';\n const iterator = val.entries();\n let current = iterator.next();\n\n if (!current.done) {\n result += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n while (!current.done) {\n result += innerIndent + print(current.value[1], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + spacing;\n }\n }\n\n result += edgeSpacing + prevIndent;\n }\n\n return result + '}';\n}\n\nfunction printComplexValue(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n refs = refs.slice();\n if (refs.indexOf(val) > -1) {\n return '[Circular]';\n } else {\n refs.push(val);\n }\n\n currentDepth++;\n\n const hitMaxDepth = currentDepth > maxDepth;\n\n if (!hitMaxDepth && val.toJSON && typeof val.toJSON === 'function') {\n return print(val.toJSON(), indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n }\n\n const toStringed = toString.call(val);\n if (toStringed === '[object Arguments]') {\n return hitMaxDepth ? '[Arguments]' : printArguments(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (isToStringedArrayType(toStringed)) {\n return hitMaxDepth ? '[Array]' : printArray(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (toStringed === '[object Map]') {\n return hitMaxDepth ? '[Map]' : printMap(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (toStringed === '[object Set]') {\n return hitMaxDepth ? '[Set]' : printSet(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (typeof val === 'object') {\n return hitMaxDepth ? '[Object]' : printObject(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n }\n}\n\nfunction printPlugin(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let match = false;\n let plugin;\n\n for (let p = 0; p < plugins.length; p++) {\n plugin = plugins[p];\n\n if (plugin.test(val)) {\n match = true;\n break;\n }\n }\n\n if (!match) {\n return false;\n }\n\n function boundPrint(val) {\n return print(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n }\n\n function boundIndent(str) {\n const indentation = prevIndent + indent;\n return indentation + str.replace(NEWLINE_REGEXP, '\\n' + indentation);\n }\n\n return plugin.print(val, boundPrint, boundIndent, {\n edgeSpacing: edgeSpacing,\n spacing: spacing\n });\n}\n\nfunction print(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n const basic = printBasicValue(val);\n if (basic) return basic;\n\n const plugin = printPlugin(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n if (plugin) return plugin;\n\n return printComplexValue(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n}\n\nconst DEFAULTS = {\n indent: 2,\n min: false,\n maxDepth: Infinity,\n plugins: []\n};\n\nfunction validateOptions(opts) {\n Object.keys(opts).forEach(key => {\n if (!DEFAULTS.hasOwnProperty(key)) {\n throw new Error('prettyFormat: Invalid option: ' + key);\n }\n });\n\n if (opts.min && opts.indent !== undefined && opts.indent !== 0) {\n throw new Error('prettyFormat: Cannot run with min option and indent');\n }\n}\n\nfunction normalizeOptions(opts) {\n const result = {};\n\n Object.keys(DEFAULTS).forEach(key =>\n result[key] = opts.hasOwnProperty(key) ? opts[key] : DEFAULTS[key]\n );\n\n if (result.min) {\n result.indent = 0;\n }\n\n return result;\n}\n\nfunction createIndent(indent) {\n return new Array(indent + 1).join(' ');\n}\n\nfunction prettyFormat(val, opts) {\n if (!opts) {\n opts = DEFAULTS;\n } else {\n validateOptions(opts)\n opts = normalizeOptions(opts);\n }\n\n let indent;\n let refs;\n const prevIndent = '';\n const currentDepth = 0;\n const spacing = opts.min ? ' ' : '\\n';\n const edgeSpacing = opts.min ? '' : '\\n';\n\n if (opts && opts.plugins.length) {\n indent = createIndent(opts.indent);\n refs = [];\n var pluginsResult = printPlugin(val, indent, prevIndent, spacing, edgeSpacing, refs, opts.maxDepth, currentDepth, opts.plugins, opts.min);\n if (pluginsResult) return pluginsResult;\n }\n\n var basicResult = printBasicValue(val);\n if (basicResult) return basicResult;\n\n if (!indent) indent = createIndent(opts.indent);\n if (!refs) refs = [];\n return printComplexValue(val, indent, prevIndent, spacing, edgeSpacing, refs, opts.maxDepth, currentDepth, opts.plugins, opts.min);\n}\n\nmodule.exports = prettyFormat;\n","import './polyfills';\nimport renderToString from './index';\nimport { indent, encodeEntities, assign } from './util';\nimport prettyFormat from 'pretty-format';\n\n// we have to patch in Array support, Possible issue in npm.im/pretty-format\nlet preactPlugin = {\n\ttest(object) {\n\t\treturn (\n\t\t\tobject &&\n\t\t\ttypeof object === 'object' &&\n\t\t\t'type' in object &&\n\t\t\t'props' in object &&\n\t\t\t'key' in object\n\t\t);\n\t},\n\tprint(val, print, indent) {\n\t\treturn renderToString(val, preactPlugin.context, preactPlugin.opts, true);\n\t}\n};\n\nlet prettyFormatOpts = {\n\tplugins: [preactPlugin]\n};\n\nfunction attributeHook(name, value, context, opts, isComponent) {\n\tlet type = typeof value;\n\n\t// Use render-to-string's built-in handling for these properties\n\tif (name === 'dangerouslySetInnerHTML') return false;\n\n\t// always skip null & undefined values, skip false DOM attributes, skip functions if told to\n\tif (value == null || (type === 'function' && !opts.functions)) return '';\n\n\tif (\n\t\topts.skipFalseAttributes &&\n\t\t!isComponent &&\n\t\t(value === false ||\n\t\t\t((name === 'class' || name === 'style') && value === ''))\n\t)\n\t\treturn '';\n\n\tlet indentChar = typeof opts.pretty === 'string' ? opts.pretty : '\\t';\n\tif (type !== 'string') {\n\t\tif (type === 'function' && !opts.functionNames) {\n\t\t\tvalue = 'Function';\n\t\t} else {\n\t\t\tpreactPlugin.context = context;\n\t\t\tpreactPlugin.opts = opts;\n\t\t\tvalue = prettyFormat(value, prettyFormatOpts);\n\t\t\tif (~value.indexOf('\\n')) {\n\t\t\t\tvalue = `${indent('\\n' + value, indentChar)}\\n`;\n\t\t\t}\n\t\t}\n\t\treturn indent(`\\n${name}={${value}}`, indentChar);\n\t}\n\treturn `\\n${indentChar}${name}=\"${encodeEntities(value)}\"`;\n}\n\nlet defaultOpts = {\n\tattributeHook,\n\tjsx: true,\n\txml: false,\n\tfunctions: true,\n\tfunctionNames: true,\n\tskipFalseAttributes: true,\n\tpretty: ' '\n};\n\nfunction renderToJsxString(vnode, context, opts, inner) {\n\topts = assign(assign({}, defaultOpts), opts || {});\n\treturn renderToString(vnode, context, opts, inner);\n}\n\nexport default renderToJsxString;\nexport { renderToJsxString as render };\n"],"names":["Symbol","c","s","for","IS_NON_DIMENSIONAL","ENCODED_ENTITIES","encodeEntities","input","String","test","replace","indent","char","isLargeString","length","ignoreLines","indexOf","JS_TO_CSS","styleObjToCss","str","prop","val","toLowerCase","undefined","assign","obj","props","i","getChildren","accumulator","children","Array","isArray","reduce","push","SHALLOW","shallow","UNNAMED","VOID_ELEMENTS","UNSAFE_NAME","noop","renderToString","render","EMPTY_ARR","vnode","context","opts","previousSkipEffects","options","__s","res","_renderToString","__c","inner","isSvgMode","selectValue","pretty","indentChar","rendered","nodeName","type","isComponent","renderRootComponent","Fragment","shallowHighOrder","__v","setState","forceUpdate","__h","__b","__r","prototype","cxType","contextType","provider","cctx","value","__","_dirty","__d","state","_nextState","getDerivedStateFromProps","componentWillMount","call","getChildContext","diffed","component","displayName","Function","name","toString","match","index","getFallbackComponentName","propChildren","html","attrs","Object","keys","sortAttributes","sort","v","allAttributes","class","hooked","attributeHook","__html","xml","sub","Error","isVoid","voidElements","pieces","hasLarge","lastWasText","child","ret","isText","join","substring","shallowRender","ESCAPED_CHARACTERS","toISOString","Date","errorToString","regExpToString","RegExp","symbolToString","SYMBOL_REGEXP","NEWLINE_REGEXP","getSymbols","getOwnPropertySymbols","isToStringedArrayType","toStringed","printFunction","printSymbol","printError","printBasicValue","typeOf","printNumber","printString","min","constructor","printList","list","prevIndent","spacing","edgeSpacing","refs","maxDepth","currentDepth","plugins","body","innerIndent","print","printComplexValue","slice","hitMaxDepth","toJSON","printArguments","printArray","result","iterator","entries","current","next","done","printMap","printSet","symbols","filter","key","concat","printObject","printPlugin","plugin","p","indentation","DEFAULTS","Infinity","createIndent","preactPlugin","object","prettyFormatOpts","defaultOpts","functions","skipFalseAttributes","functionNames","forEach","hasOwnProperty","validateOptions","normalizeOptions","pluginsResult","prettyFormat","jsx","renderToJsxString"],"mappings":"+CAAA,GAAsB,mBAAXA,OAAuB,CACjC,IAAIC,EAAI,EAERD,OAAS,SAAUE,GAClB,MAAQ,KAAIA,MAAMD,KAEnBD,OAAOG,IAAOD,GAAO,KAAIA,UCLbE,EAAqB,kEAE5BC,EAAmB,kBAETC,EAAeC,GAC9B,MAAML,EAAIM,OAAOD,GACjB,OAAKF,EAAiBI,KAAKP,GAGpBA,EACLQ,QAAQ,KAAM,SACdA,QAAQ,KAAM,QACdA,QAAQ,KAAM,QACdA,QAAQ,KAAM,UANRR,MASES,EAAS,CAACT,EAAGU,IACvBJ,OAAON,GAAGQ,QAAQ,SAAU,MAAQE,GAAQ,OAElCC,EAAgB,CAACX,EAAGY,EAAQC,IACtCP,OAAON,GAAGY,QAAUA,GAAU,MAC5BC,IAA4C,IAA7BP,OAAON,GAAGc,QAAQ,QACP,IAA5BR,OAAON,GAAGc,QAAQ,KAEnB,MAAMC,EAAY,YAGFC,EAAchB,GAC7B,IAAIiB,EAAM,GACV,IAAK,IAAIC,KAAQlB,EAAG,CACnB,IAAImB,EAAMnB,EAAEkB,GACD,MAAPC,GAAuB,K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/polyfills.js","../src/util.js","../src/index.js","../node_modules/pretty-format/printString.js","../node_modules/pretty-format/index.js","../src/jsx.js"],"sourcesContent":["if (typeof Symbol !== 'function') {\n\tlet c = 0;\n\t// eslint-disable-next-line\n\tSymbol = function (s) {\n\t\treturn `@@${s}${++c}`;\n\t};\n\tSymbol.for = (s) => `@@${s}`;\n}\n","// DOM properties that should NOT have \"px\" added when numeric\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i;\n\nconst ENCODED_ENTITIES = /[&<>\"]/;\n\nexport function encodeEntities(input) {\n\tconst s = String(input);\n\tif (!ENCODED_ENTITIES.test(s)) {\n\t\treturn s;\n\t}\n\treturn s\n\t\t.replace(/&/g, '&amp;')\n\t\t.replace(/</g, '&lt;')\n\t\t.replace(/>/g, '&gt;')\n\t\t.replace(/\"/g, '&quot;');\n}\n\nexport let indent = (s, char) =>\n\tString(s).replace(/(\\n+)/g, '$1' + (char || '\\t'));\n\nexport let isLargeString = (s, length, ignoreLines) =>\n\tString(s).length > (length || 40) ||\n\t(!ignoreLines && String(s).indexOf('\\n') !== -1) ||\n\tString(s).indexOf('<') !== -1;\n\nconst JS_TO_CSS = {};\n\n// Convert an Object style to a CSSText string\nexport function styleObjToCss(s) {\n\tlet str = '';\n\tfor (let prop in s) {\n\t\tlet val = s[prop];\n\t\tif (val != null && val !== '') {\n\t\t\tif (str) str += ' ';\n\t\t\t// str += jsToCss(prop);\n\t\t\tstr +=\n\t\t\t\tprop[0] == '-'\n\t\t\t\t\t? prop\n\t\t\t\t\t: JS_TO_CSS[prop] ||\n\t\t\t\t\t (JS_TO_CSS[prop] = prop.replace(/([A-Z])/g, '-$1').toLowerCase());\n\t\t\tstr += ': ';\n\t\t\tstr += val;\n\t\t\tif (typeof val === 'number' && IS_NON_DIMENSIONAL.test(prop) === false) {\n\t\t\t\tstr += 'px';\n\t\t\t}\n\t\t\tstr += ';';\n\t\t}\n\t}\n\treturn str || undefined;\n}\n\n/**\n * Copy all properties from `props` onto `obj`.\n * @param {object} obj Object onto which properties should be copied.\n * @param {object} props Object from which to copy properties.\n * @returns {object}\n * @private\n */\nexport function assign(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn obj;\n}\n\n/**\n * Get flattened children from the children prop\n * @param {Array} accumulator\n * @param {any} children A `props.children` opaque object.\n * @returns {Array} accumulator\n * @private\n */\nexport function getChildren(accumulator, children) {\n\tif (Array.isArray(children)) {\n\t\tchildren.reduce(getChildren, accumulator);\n\t} else if (children != null && children !== false) {\n\t\taccumulator.push(children);\n\t}\n\treturn accumulator;\n}\n","import {\n\tencodeEntities,\n\tindent,\n\tisLargeString,\n\tstyleObjToCss,\n\tassign,\n\tgetChildren\n} from './util';\nimport { options, Fragment } from 'preact';\n\n/** @typedef {import('preact').VNode} VNode */\n\nconst SHALLOW = { shallow: true };\n\n// components without names, kept as a hash for later comparison to return consistent UnnamedComponentXX names.\nconst UNNAMED = [];\n\nconst VOID_ELEMENTS =\n\t/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;\n\nconst UNSAFE_NAME = /[\\s\\n\\\\/='\"\\0<>]/;\n\nconst noop = () => {};\n\n/** Render Preact JSX + Components to an HTML string.\n *\t@name render\n *\t@function\n *\t@param {VNode} vnode\tJSX VNode to render.\n *\t@param {Object} [context={}]\tOptionally pass an initial context object through the render path.\n *\t@param {Object} [options={}]\tRendering options\n *\t@param {Boolean} [options.shallow=false]\tIf `true`, renders nested Components as HTML elements (`<Foo a=\"b\" />`).\n *\t@param {Boolean} [options.xml=false]\t\tIf `true`, uses self-closing tags for elements without children.\n *\t@param {Boolean} [options.pretty=false]\t\tIf `true`, adds whitespace for readability\n *\t@param {RegExp|undefined} [options.voidElements] RegeEx that matches elements that are considered void (self-closing)\n */\nrenderToString.render = renderToString;\n\n/** Only render elements, leaving Components inline as `<ComponentName ... />`.\n *\tThis method is just a convenience alias for `render(vnode, context, { shallow:true })`\n *\t@name shallow\n *\t@function\n *\t@param {VNode} vnode\tJSX VNode to render.\n *\t@param {Object} [context={}]\tOptionally pass an initial context object through the render path.\n */\nlet shallowRender = (vnode, context) => renderToString(vnode, context, SHALLOW);\n\nconst EMPTY_ARR = [];\nfunction renderToString(vnode, context, opts) {\n\tcontext = context || {};\n\topts = opts || {};\n\n\t// Performance optimization: `renderToString` is synchronous and we\n\t// therefore don't execute any effects. To do that we pass an empty\n\t// array to `options._commit` (`__c`). But we can go one step further\n\t// and avoid a lot of dirty checks and allocations by setting\n\t// `options._skipEffects` (`__s`) too.\n\tconst previousSkipEffects = options.__s;\n\toptions.__s = true;\n\n\tconst res = _renderToString(vnode, context, opts);\n\n\t// options._commit, we don't schedule any effects in this library right now,\n\t// so we can pass an empty queue to this hook.\n\tif (options.__c) options.__c(vnode, EMPTY_ARR);\n\tEMPTY_ARR.length = 0;\n\toptions.__s = previousSkipEffects;\n\treturn res;\n}\n\n/** The default export is an alias of `render()`. */\nfunction _renderToString(vnode, context, opts, inner, isSvgMode, selectValue) {\n\tif (vnode == null || typeof vnode === 'boolean') {\n\t\treturn '';\n\t}\n\n\t// #text nodes\n\tif (typeof vnode !== 'object') {\n\t\treturn encodeEntities(vnode);\n\t}\n\n\tlet pretty = opts.pretty,\n\t\tindentChar = pretty && typeof pretty === 'string' ? pretty : '\\t';\n\n\tif (Array.isArray(vnode)) {\n\t\tlet rendered = '';\n\t\tfor (let i = 0; i < vnode.length; i++) {\n\t\t\tif (pretty && i > 0) rendered += '\\n';\n\t\t\trendered += _renderToString(\n\t\t\t\tvnode[i],\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\tinner,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue\n\t\t\t);\n\t\t}\n\t\treturn rendered;\n\t}\n\n\tlet nodeName = vnode.type,\n\t\tprops = vnode.props,\n\t\tisComponent = false;\n\n\t// components\n\tif (typeof nodeName === 'function') {\n\t\tisComponent = true;\n\t\tif (opts.shallow && (inner || opts.renderRootComponent === false)) {\n\t\t\tnodeName = getComponentName(nodeName);\n\t\t} else if (nodeName === Fragment) {\n\t\t\tconst children = [];\n\t\t\tgetChildren(children, vnode.props.children);\n\t\t\treturn _renderToString(\n\t\t\t\tchildren,\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\topts.shallowHighOrder !== false,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue\n\t\t\t);\n\t\t} else {\n\t\t\tlet rendered;\n\n\t\t\tlet c = (vnode.__c = {\n\t\t\t\t__v: vnode,\n\t\t\t\tcontext,\n\t\t\t\tprops: vnode.props,\n\t\t\t\t// silently drop state updates\n\t\t\t\tsetState: noop,\n\t\t\t\tforceUpdate: noop,\n\t\t\t\t// hooks\n\t\t\t\t__h: []\n\t\t\t});\n\n\t\t\t// options._diff\n\t\t\tif (options.__b) options.__b(vnode);\n\n\t\t\t// options._render\n\t\t\tif (options.__r) options.__r(vnode);\n\n\t\t\tif (\n\t\t\t\t!nodeName.prototype ||\n\t\t\t\ttypeof nodeName.prototype.render !== 'function'\n\t\t\t) {\n\t\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t\t// the context value as `this.context` just for this component.\n\t\t\t\tlet cxType = nodeName.contextType;\n\t\t\t\tlet provider = cxType && context[cxType.__c];\n\t\t\t\tlet cctx =\n\t\t\t\t\tcxType != null\n\t\t\t\t\t\t? provider\n\t\t\t\t\t\t\t? provider.props.value\n\t\t\t\t\t\t\t: cxType.__\n\t\t\t\t\t\t: context;\n\n\t\t\t\t// stateless functional components\n\t\t\t\trendered = nodeName.call(vnode.__c, props, cctx);\n\t\t\t} else {\n\t\t\t\t// class-based components\n\t\t\t\tlet cxType = nodeName.contextType;\n\t\t\t\tlet provider = cxType && context[cxType.__c];\n\t\t\t\tlet cctx =\n\t\t\t\t\tcxType != null\n\t\t\t\t\t\t? provider\n\t\t\t\t\t\t\t? provider.props.value\n\t\t\t\t\t\t\t: cxType.__\n\t\t\t\t\t\t: context;\n\n\t\t\t\t// c = new nodeName(props, context);\n\t\t\t\tc = vnode.__c = new nodeName(props, cctx);\n\t\t\t\tc.__v = vnode;\n\t\t\t\t// turn off stateful re-rendering:\n\t\t\t\tc._dirty = c.__d = true;\n\t\t\t\tc.props = props;\n\t\t\t\tif (c.state == null) c.state = {};\n\n\t\t\t\tif (c._nextState == null && c.__s == null) {\n\t\t\t\t\tc._nextState = c.__s = c.state;\n\t\t\t\t}\n\n\t\t\t\tc.context = cctx;\n\t\t\t\tif (nodeName.getDerivedStateFromProps)\n\t\t\t\t\tc.state = assign(\n\t\t\t\t\t\tassign({}, c.state),\n\t\t\t\t\t\tnodeName.getDerivedStateFromProps(c.props, c.state)\n\t\t\t\t\t);\n\t\t\t\telse if (c.componentWillMount) {\n\t\t\t\t\tc.componentWillMount();\n\n\t\t\t\t\t// If the user called setState in cWM we need to flush pending,\n\t\t\t\t\t// state updates. This is the same behaviour in React.\n\t\t\t\t\tc.state =\n\t\t\t\t\t\tc._nextState !== c.state\n\t\t\t\t\t\t\t? c._nextState\n\t\t\t\t\t\t\t: c.__s !== c.state\n\t\t\t\t\t\t\t? c.__s\n\t\t\t\t\t\t\t: c.state;\n\t\t\t\t}\n\n\t\t\t\trendered = c.render(c.props, c.state, c.context);\n\t\t\t}\n\n\t\t\tif (c.getChildContext) {\n\t\t\t\tcontext = assign(assign({}, context), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (options.diffed) options.diffed(vnode);\n\t\t\treturn _renderToString(\n\t\t\t\trendered,\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\topts.shallowHighOrder !== false,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue\n\t\t\t);\n\t\t}\n\t}\n\n\t// render JSX to HTML\n\tlet s = '<' + nodeName,\n\t\tpropChildren,\n\t\thtml;\n\n\tif (props) {\n\t\tlet attrs = Object.keys(props);\n\n\t\t// allow sorting lexicographically for more determinism (useful for tests, such as via preact-jsx-chai)\n\t\tif (opts && opts.sortAttributes === true) attrs.sort();\n\n\t\tfor (let i = 0; i < attrs.length; i++) {\n\t\t\tlet name = attrs[i],\n\t\t\t\tv = props[name];\n\t\t\tif (name === 'children') {\n\t\t\t\tpropChildren = v;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (UNSAFE_NAME.test(name)) continue;\n\n\t\t\tif (\n\t\t\t\t!(opts && opts.allAttributes) &&\n\t\t\t\t(name === 'key' ||\n\t\t\t\t\tname === 'ref' ||\n\t\t\t\t\tname === '__self' ||\n\t\t\t\t\tname === '__source')\n\t\t\t)\n\t\t\t\tcontinue;\n\n\t\t\tif (name === 'defaultValue') {\n\t\t\t\tname = 'value';\n\t\t\t} else if (name === 'className') {\n\t\t\t\tif (typeof props.class !== 'undefined') continue;\n\t\t\t\tname = 'class';\n\t\t\t} else if (isSvgMode && name.match(/^xlink:?./)) {\n\t\t\t\tname = name.toLowerCase().replace(/^xlink:?/, 'xlink:');\n\t\t\t}\n\n\t\t\tif (name === 'htmlFor') {\n\t\t\t\tif (props.for) continue;\n\t\t\t\tname = 'for';\n\t\t\t}\n\n\t\t\tif (name === 'style' && v && typeof v === 'object') {\n\t\t\t\tv = styleObjToCss(v);\n\t\t\t}\n\n\t\t\t// always use string values instead of booleans for aria attributes\n\t\t\t// also see https://github.com/preactjs/preact/pull/2347/files\n\t\t\tif (name[0] === 'a' && name['1'] === 'r' && typeof v === 'boolean') {\n\t\t\t\tv = String(v);\n\t\t\t}\n\n\t\t\tlet hooked =\n\t\t\t\topts.attributeHook &&\n\t\t\t\topts.attributeHook(name, v, context, opts, isComponent);\n\t\t\tif (hooked || hooked === '') {\n\t\t\t\ts += hooked;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (name === 'dangerouslySetInnerHTML') {\n\t\t\t\thtml = v && v.__html;\n\t\t\t} else if (nodeName === 'textarea' && name === 'value') {\n\t\t\t\t// <textarea value=\"a&b\"> --> <textarea>a&amp;b</textarea>\n\t\t\t\tpropChildren = v;\n\t\t\t} else if ((v || v === 0 || v === '') && typeof v !== 'function') {\n\t\t\t\tif (v === true || v === '') {\n\t\t\t\t\tv = name;\n\t\t\t\t\t// in non-xml mode, allow boolean attributes\n\t\t\t\t\tif (!opts || !opts.xml) {\n\t\t\t\t\t\ts += ' ' + name;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (name === 'value') {\n\t\t\t\t\tif (nodeName === 'select') {\n\t\t\t\t\t\tselectValue = v;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (nodeName === 'option' && selectValue == v) {\n\t\t\t\t\t\ts += ` selected`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ts += ` ${name}=\"${encodeEntities(v)}\"`;\n\t\t\t}\n\t\t}\n\t}\n\n\t// account for >1 multiline attribute\n\tif (pretty) {\n\t\tlet sub = s.replace(/\\n\\s*/, ' ');\n\t\tif (sub !== s && !~sub.indexOf('\\n')) s = sub;\n\t\telse if (pretty && ~s.indexOf('\\n')) s += '\\n';\n\t}\n\n\ts += '>';\n\n\tif (UNSAFE_NAME.test(nodeName))\n\t\tthrow new Error(`${nodeName} is not a valid HTML tag name in ${s}`);\n\n\tlet isVoid =\n\t\tVOID_ELEMENTS.test(nodeName) ||\n\t\t(opts.voidElements && opts.voidElements.test(nodeName));\n\tlet pieces = [];\n\n\tlet children;\n\tif (html) {\n\t\t// if multiline, indent.\n\t\tif (pretty && isLargeString(html)) {\n\t\t\thtml = '\\n' + indentChar + indent(html, indentChar);\n\t\t}\n\t\ts += html;\n\t} else if (\n\t\tpropChildren != null &&\n\t\tgetChildren((children = []), propChildren).length\n\t) {\n\t\tlet hasLarge = pretty && ~s.indexOf('\\n');\n\t\tlet lastWasText = false;\n\n\t\tfor (let i = 0; i < children.length; i++) {\n\t\t\tlet child = children[i];\n\n\t\t\tif (child != null && child !== false) {\n\t\t\t\tlet childSvgMode =\n\t\t\t\t\t\tnodeName === 'svg'\n\t\t\t\t\t\t\t? true\n\t\t\t\t\t\t\t: nodeName === 'foreignObject'\n\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t: isSvgMode,\n\t\t\t\t\tret = _renderToString(\n\t\t\t\t\t\tchild,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\topts,\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\tchildSvgMode,\n\t\t\t\t\t\tselectValue\n\t\t\t\t\t);\n\n\t\t\t\tif (pretty && !hasLarge && isLargeString(ret)) hasLarge = true;\n\n\t\t\t\t// Skip if we received an empty string\n\t\t\t\tif (ret) {\n\t\t\t\t\tif (pretty) {\n\t\t\t\t\t\tlet isText = ret.length > 0 && ret[0] != '<';\n\n\t\t\t\t\t\t// We merge adjacent text nodes, otherwise each piece would be printed\n\t\t\t\t\t\t// on a new line.\n\t\t\t\t\t\tif (lastWasText && isText) {\n\t\t\t\t\t\t\tpieces[pieces.length - 1] += ret;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpieces.push(ret);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlastWasText = isText;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpieces.push(ret);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (pretty && hasLarge) {\n\t\t\tfor (let i = pieces.length; i--; ) {\n\t\t\t\tpieces[i] = '\\n' + indentChar + indent(pieces[i], indentChar);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (pieces.length || html) {\n\t\ts += pieces.join('');\n\t} else if (opts && opts.xml) {\n\t\treturn s.substring(0, s.length - 1) + ' />';\n\t}\n\n\tif (isVoid && !children && !html) {\n\t\ts = s.replace(/>$/, ' />');\n\t} else {\n\t\tif (pretty && ~s.indexOf('\\n')) s += '\\n';\n\t\ts += `</${nodeName}>`;\n\t}\n\n\treturn s;\n}\n\nfunction getComponentName(component) {\n\treturn (\n\t\tcomponent.displayName ||\n\t\t(component !== Function && component.name) ||\n\t\tgetFallbackComponentName(component)\n\t);\n}\n\nfunction getFallbackComponentName(component) {\n\tlet str = Function.prototype.toString.call(component),\n\t\tname = (str.match(/^\\s*function\\s+([^( ]+)/) || '')[1];\n\tif (!name) {\n\t\t// search for an existing indexed name for the given component:\n\t\tlet index = -1;\n\t\tfor (let i = UNNAMED.length; i--; ) {\n\t\t\tif (UNNAMED[i] === component) {\n\t\t\t\tindex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// not found, create a new indexed name:\n\t\tif (index < 0) {\n\t\t\tindex = UNNAMED.push(component) - 1;\n\t\t}\n\t\tname = `UnnamedComponent${index}`;\n\t}\n\treturn name;\n}\nrenderToString.shallowRender = shallowRender;\n\nexport default renderToString;\n\nexport {\n\trenderToString as render,\n\trenderToString as renderToStaticMarkup,\n\trenderToString,\n\tshallowRender\n};\n","'use strict';\n\nconst ESCAPED_CHARACTERS = /(\\\\|\\\"|\\')/g;\n\nmodule.exports = function printString(val) {\n return val.replace(ESCAPED_CHARACTERS, '\\\\$1');\n}\n","'use strict';\n\nconst printString = require('./printString');\n\nconst toString = Object.prototype.toString;\nconst toISOString = Date.prototype.toISOString;\nconst errorToString = Error.prototype.toString;\nconst regExpToString = RegExp.prototype.toString;\nconst symbolToString = Symbol.prototype.toString;\n\nconst SYMBOL_REGEXP = /^Symbol\\((.*)\\)(.*)$/;\nconst NEWLINE_REGEXP = /\\n/ig;\n\nconst getSymbols = Object.getOwnPropertySymbols || (obj => []);\n\nfunction isToStringedArrayType(toStringed) {\n return (\n toStringed === '[object Array]' ||\n toStringed === '[object ArrayBuffer]' ||\n toStringed === '[object DataView]' ||\n toStringed === '[object Float32Array]' ||\n toStringed === '[object Float64Array]' ||\n toStringed === '[object Int8Array]' ||\n toStringed === '[object Int16Array]' ||\n toStringed === '[object Int32Array]' ||\n toStringed === '[object Uint8Array]' ||\n toStringed === '[object Uint8ClampedArray]' ||\n toStringed === '[object Uint16Array]' ||\n toStringed === '[object Uint32Array]'\n );\n}\n\nfunction printNumber(val) {\n if (val != +val) return 'NaN';\n const isNegativeZero = val === 0 && (1 / val) < 0;\n return isNegativeZero ? '-0' : '' + val;\n}\n\nfunction printFunction(val) {\n if (val.name === '') {\n return '[Function anonymous]'\n } else {\n return '[Function ' + val.name + ']';\n }\n}\n\nfunction printSymbol(val) {\n return symbolToString.call(val).replace(SYMBOL_REGEXP, 'Symbol($1)');\n}\n\nfunction printError(val) {\n return '[' + errorToString.call(val) + ']';\n}\n\nfunction printBasicValue(val) {\n if (val === true || val === false) return '' + val;\n if (val === undefined) return 'undefined';\n if (val === null) return 'null';\n\n const typeOf = typeof val;\n\n if (typeOf === 'number') return printNumber(val);\n if (typeOf === 'string') return '\"' + printString(val) + '\"';\n if (typeOf === 'function') return printFunction(val);\n if (typeOf === 'symbol') return printSymbol(val);\n\n const toStringed = toString.call(val);\n\n if (toStringed === '[object WeakMap]') return 'WeakMap {}';\n if (toStringed === '[object WeakSet]') return 'WeakSet {}';\n if (toStringed === '[object Function]' || toStringed === '[object GeneratorFunction]') return printFunction(val, min);\n if (toStringed === '[object Symbol]') return printSymbol(val);\n if (toStringed === '[object Date]') return toISOString.call(val);\n if (toStringed === '[object Error]') return printError(val);\n if (toStringed === '[object RegExp]') return regExpToString.call(val);\n if (toStringed === '[object Arguments]' && val.length === 0) return 'Arguments []';\n if (isToStringedArrayType(toStringed) && val.length === 0) return val.constructor.name + ' []';\n\n if (val instanceof Error) return printError(val);\n\n return false;\n}\n\nfunction printList(list, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let body = '';\n\n if (list.length) {\n body += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n for (let i = 0; i < list.length; i++) {\n body += innerIndent + print(list[i], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n if (i < list.length - 1) {\n body += ',' + spacing;\n }\n }\n\n body += edgeSpacing + prevIndent;\n }\n\n return '[' + body + ']';\n}\n\nfunction printArguments(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n return (min ? '' : 'Arguments ') + printList(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n}\n\nfunction printArray(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n return (min ? '' : val.constructor.name + ' ') + printList(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n}\n\nfunction printMap(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let result = 'Map {';\n const iterator = val.entries();\n let current = iterator.next();\n\n if (!current.done) {\n result += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n while (!current.done) {\n const key = print(current.value[0], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n const value = print(current.value[1], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n result += innerIndent + key + ' => ' + value;\n\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + spacing;\n }\n }\n\n result += edgeSpacing + prevIndent;\n }\n\n return result + '}';\n}\n\nfunction printObject(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n const constructor = min ? '' : (val.constructor ? val.constructor.name + ' ' : 'Object ');\n let result = constructor + '{';\n let keys = Object.keys(val).sort();\n const symbols = getSymbols(val);\n\n if (symbols.length) {\n keys = keys\n .filter(key => !(typeof key === 'symbol' || toString.call(key) === '[object Symbol]'))\n .concat(symbols);\n }\n\n if (keys.length) {\n result += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const name = print(key, indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n const value = print(val[key], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n result += innerIndent + name + ': ' + value;\n\n if (i < keys.length - 1) {\n result += ',' + spacing;\n }\n }\n\n result += edgeSpacing + prevIndent;\n }\n\n return result + '}';\n}\n\nfunction printSet(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let result = 'Set {';\n const iterator = val.entries();\n let current = iterator.next();\n\n if (!current.done) {\n result += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n while (!current.done) {\n result += innerIndent + print(current.value[1], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + spacing;\n }\n }\n\n result += edgeSpacing + prevIndent;\n }\n\n return result + '}';\n}\n\nfunction printComplexValue(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n refs = refs.slice();\n if (refs.indexOf(val) > -1) {\n return '[Circular]';\n } else {\n refs.push(val);\n }\n\n currentDepth++;\n\n const hitMaxDepth = currentDepth > maxDepth;\n\n if (!hitMaxDepth && val.toJSON && typeof val.toJSON === 'function') {\n return print(val.toJSON(), indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n }\n\n const toStringed = toString.call(val);\n if (toStringed === '[object Arguments]') {\n return hitMaxDepth ? '[Arguments]' : printArguments(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (isToStringedArrayType(toStringed)) {\n return hitMaxDepth ? '[Array]' : printArray(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (toStringed === '[object Map]') {\n return hitMaxDepth ? '[Map]' : printMap(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (toStringed === '[object Set]') {\n return hitMaxDepth ? '[Set]' : printSet(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (typeof val === 'object') {\n return hitMaxDepth ? '[Object]' : printObject(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n }\n}\n\nfunction printPlugin(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let match = false;\n let plugin;\n\n for (let p = 0; p < plugins.length; p++) {\n plugin = plugins[p];\n\n if (plugin.test(val)) {\n match = true;\n break;\n }\n }\n\n if (!match) {\n return false;\n }\n\n function boundPrint(val) {\n return print(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n }\n\n function boundIndent(str) {\n const indentation = prevIndent + indent;\n return indentation + str.replace(NEWLINE_REGEXP, '\\n' + indentation);\n }\n\n return plugin.print(val, boundPrint, boundIndent, {\n edgeSpacing: edgeSpacing,\n spacing: spacing\n });\n}\n\nfunction print(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n const basic = printBasicValue(val);\n if (basic) return basic;\n\n const plugin = printPlugin(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n if (plugin) return plugin;\n\n return printComplexValue(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n}\n\nconst DEFAULTS = {\n indent: 2,\n min: false,\n maxDepth: Infinity,\n plugins: []\n};\n\nfunction validateOptions(opts) {\n Object.keys(opts).forEach(key => {\n if (!DEFAULTS.hasOwnProperty(key)) {\n throw new Error('prettyFormat: Invalid option: ' + key);\n }\n });\n\n if (opts.min && opts.indent !== undefined && opts.indent !== 0) {\n throw new Error('prettyFormat: Cannot run with min option and indent');\n }\n}\n\nfunction normalizeOptions(opts) {\n const result = {};\n\n Object.keys(DEFAULTS).forEach(key =>\n result[key] = opts.hasOwnProperty(key) ? opts[key] : DEFAULTS[key]\n );\n\n if (result.min) {\n result.indent = 0;\n }\n\n return result;\n}\n\nfunction createIndent(indent) {\n return new Array(indent + 1).join(' ');\n}\n\nfunction prettyFormat(val, opts) {\n if (!opts) {\n opts = DEFAULTS;\n } else {\n validateOptions(opts)\n opts = normalizeOptions(opts);\n }\n\n let indent;\n let refs;\n const prevIndent = '';\n const currentDepth = 0;\n const spacing = opts.min ? ' ' : '\\n';\n const edgeSpacing = opts.min ? '' : '\\n';\n\n if (opts && opts.plugins.length) {\n indent = createIndent(opts.indent);\n refs = [];\n var pluginsResult = printPlugin(val, indent, prevIndent, spacing, edgeSpacing, refs, opts.maxDepth, currentDepth, opts.plugins, opts.min);\n if (pluginsResult) return pluginsResult;\n }\n\n var basicResult = printBasicValue(val);\n if (basicResult) return basicResult;\n\n if (!indent) indent = createIndent(opts.indent);\n if (!refs) refs = [];\n return printComplexValue(val, indent, prevIndent, spacing, edgeSpacing, refs, opts.maxDepth, currentDepth, opts.plugins, opts.min);\n}\n\nmodule.exports = prettyFormat;\n","import './polyfills';\nimport renderToString from './index';\nimport { indent, encodeEntities, assign } from './util';\nimport prettyFormat from 'pretty-format';\n\n// we have to patch in Array support, Possible issue in npm.im/pretty-format\nlet preactPlugin = {\n\ttest(object) {\n\t\treturn (\n\t\t\tobject &&\n\t\t\ttypeof object === 'object' &&\n\t\t\t'type' in object &&\n\t\t\t'props' in object &&\n\t\t\t'key' in object\n\t\t);\n\t},\n\tprint(val, print, indent) {\n\t\treturn renderToString(val, preactPlugin.context, preactPlugin.opts, true);\n\t}\n};\n\nlet prettyFormatOpts = {\n\tplugins: [preactPlugin]\n};\n\nfunction attributeHook(name, value, context, opts, isComponent) {\n\tlet type = typeof value;\n\n\t// Use render-to-string's built-in handling for these properties\n\tif (name === 'dangerouslySetInnerHTML') return false;\n\n\t// always skip null & undefined values, skip false DOM attributes, skip functions if told to\n\tif (value == null || (type === 'function' && !opts.functions)) return '';\n\n\tif (\n\t\topts.skipFalseAttributes &&\n\t\t!isComponent &&\n\t\t(value === false ||\n\t\t\t((name === 'class' || name === 'style') && value === ''))\n\t)\n\t\treturn '';\n\n\tlet indentChar = typeof opts.pretty === 'string' ? opts.pretty : '\\t';\n\tif (type !== 'string') {\n\t\tif (type === 'function' && !opts.functionNames) {\n\t\t\tvalue = 'Function';\n\t\t} else {\n\t\t\tpreactPlugin.context = context;\n\t\t\tpreactPlugin.opts = opts;\n\t\t\tvalue = prettyFormat(value, prettyFormatOpts);\n\t\t\tif (~value.indexOf('\\n')) {\n\t\t\t\tvalue = `${indent('\\n' + value, indentChar)}\\n`;\n\t\t\t}\n\t\t}\n\t\treturn indent(`\\n${name}={${value}}`, indentChar);\n\t}\n\treturn `\\n${indentChar}${name}=\"${encodeEntities(value)}\"`;\n}\n\nlet defaultOpts = {\n\tattributeHook,\n\tjsx: true,\n\txml: false,\n\tfunctions: true,\n\tfunctionNames: true,\n\tskipFalseAttributes: true,\n\tpretty: ' '\n};\n\nfunction renderToJsxString(vnode, context, opts, inner) {\n\topts = assign(assign({}, defaultOpts), opts || {});\n\treturn renderToString(vnode, context, opts, inner);\n}\n\nexport default renderToJsxString;\nexport { renderToJsxString as render };\n"],"names":["Symbol","c","s","for","IS_NON_DIMENSIONAL","ENCODED_ENTITIES","encodeEntities","input","String","test","replace","indent","char","isLargeString","length","ignoreLines","indexOf","JS_TO_CSS","styleObjToCss","str","prop","val","toLowerCase","undefined","assign","obj","props","i","getChildren","accumulator","children","Array","isArray","reduce","push","SHALLOW","shallow","UNNAMED","VOID_ELEMENTS","UNSAFE_NAME","noop","renderToString","render","EMPTY_ARR","vnode","context","opts","previousSkipEffects","options","__s","res","_renderToString","__c","inner","isSvgMode","selectValue","pretty","indentChar","rendered","nodeName","type","isComponent","renderRootComponent","Fragment","shallowHighOrder","__v","setState","forceUpdate","__h","__b","__r","prototype","cxType","contextType","provider","cctx","value","__","_dirty","__d","state","_nextState","getDerivedStateFromProps","componentWillMount","call","getChildContext","diffed","component","displayName","Function","name","toString","match","index","getFallbackComponentName","propChildren","html","attrs","Object","keys","sortAttributes","sort","v","allAttributes","class","hooked","attributeHook","__html","xml","sub","Error","isVoid","voidElements","pieces","hasLarge","lastWasText","child","ret","isText","join","substring","shallowRender","ESCAPED_CHARACTERS","toISOString","Date","errorToString","regExpToString","RegExp","symbolToString","SYMBOL_REGEXP","NEWLINE_REGEXP","getSymbols","getOwnPropertySymbols","isToStringedArrayType","toStringed","printFunction","printSymbol","printError","printBasicValue","typeOf","printNumber","printString","min","constructor","printList","list","prevIndent","spacing","edgeSpacing","refs","maxDepth","currentDepth","plugins","body","innerIndent","print","printComplexValue","slice","hitMaxDepth","toJSON","printArguments","printArray","result","iterator","entries","current","next","done","printMap","printSet","symbols","filter","key","concat","printObject","printPlugin","plugin","p","indentation","DEFAULTS","Infinity","createIndent","preactPlugin","object","prettyFormatOpts","defaultOpts","functions","skipFalseAttributes","functionNames","forEach","hasOwnProperty","validateOptions","normalizeOptions","pluginsResult","prettyFormat","jsx","renderToJsxString"],"mappings":"+CAAA,GAAsB,mBAAXA,OAAuB,CACjC,IAAIC,EAAI,EAERD,OAAS,SAAUE,GAClB,MAAQ,KAAIA,MAAMD,KAEnBD,OAAOG,IAAOD,GAAO,KAAIA,UCLbE,EAAqB,kEAE5BC,EAAmB,kBAETC,EAAeC,GAC9B,MAAML,EAAIM,OAAOD,GACjB,OAAKF,EAAiBI,KAAKP,GAGpBA,EACLQ,QAAQ,KAAM,SACdA,QAAQ,KAAM,QACdA,QAAQ,KAAM,QACdA,QAAQ,KAAM,UANRR,MASES,EAAS,CAACT,EAAGU,IACvBJ,OAAON,GAAGQ,QAAQ,SAAU,MAAQE,GAAQ,OAElCC,EAAgB,CAACX,EAAGY,EAAQC,IACtCP,OAAON,GAAGY,QAAUA,GAAU,MAC5BC,IAA4C,IAA7BP,OAAON,GAAGc,QAAQ,QACP,IAA5BR,OAAON,GAAGc,QAAQ,KAEnB,MAAMC,EAAY,YAGFC,EAAchB,GAC7B,IAAIiB,EAAM,GACV,IAAK,IAAIC,KAAQlB,EAAG,CACnB,IAAImB,EAAMnB,EAAEkB,GACD,MAAPC,GAAuB,KAARA,IACdF,IAAKA,GAAO,KAEhBA,GACY,KAAXC,EAAK,GACFA,EACAH,EAAUG,KACTH,EAAUG,GAAQA,EAA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@"+t}}var r=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,o=/[&<>"]/;function i(t){var n=String(t);return o.test(n)?n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):n}var a=function(t,n){return String(t).replace(/(\n+)/g,"$1"+(n||"\t"))},c=function(t,n,e){return String(t).length>(n||40)||!e&&-1!==String(t).indexOf("\n")||-1!==String(t).indexOf("<")},u={};function l(t){var n="";for(var e in t){var o=t[e];null!=o&&""!==o&&(n&&(n+=" "),n+="-"==e[0]?e:u[e]||(u[e]=e.replace(/([A-Z])/g,"-$1").toLowerCase()),n+=": ",n+=o,"number"==typeof o&&!1===r.test(e)&&(n+="px"),n+=";")}return n||void 0}function f(t,n){for(var e in n)t[e]=n[e];return t}function s(t,n){return Array.isArray(n)?n.reduce(s,t):null!=n&&!1!==n&&t.push(n),t}var p={shallow:!0},y=[],g=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,b=/[\s\n\\/='"\0<>]/,m=function(){};_.render=_;var d=[];function _(n,e,r){e=e||{},r=r||{};var o=t.__s;t.__s=!0;var i=h(n,e,r);return t.__c&&t.__c(n,d),d.length=0,t.__s=o,i}function h(e,r,o,u,p,d){if(null==e||"boolean"==typeof e)return"";if("object"!=typeof e)return i(e);var _=o.pretty,v=_&&"string"==typeof _?_:"\t";if(Array.isArray(e)){for(var x="",j=0;j<e.length;j++)_&&j>0&&(x+="\n"),x+=h(e[j],r,o,u,p,d);return x}var S,A=e.type,O=e.props,w=!1;if("function"==typeof A){if(w=!0,!o.shallow||!u&&!1!==o.renderRootComponent){if(A===n){var k=[];return s(k,e.props.children),h(k,r,o,!1!==o.shallowHighOrder,p,d)}var F,E=e.__c={__v:e,context:r,props:e.props,setState:m,forceUpdate:m,__h:[]};if(t.__b&&t.__b(e),t.__r&&t.__r(e),A.prototype&&"function"==typeof A.prototype.render){var C=A.contextType,M=C&&r[C.__c],N=null!=C?M?M.props.value:C.__:r;(E=e.__c=new A(O,N)).__v=e,E._dirty=E.__d=!0,E.props=O,null==E.state&&(E.state={}),null==E._nextState&&null==E.__s&&(E._nextState=E.__s=E.state),E.context=N,A.getDerivedStateFromProps?E.state=f(f({},E.state),A.getDerivedStateFromProps(E.props,E.state)):E.componentWillMount&&(E.componentWillMount(),E.state=E._nextState!==E.state?E._nextState:E.__s!==E.state?E.__s:E.state),F=E.render(E.props,E.state,E.context)}else{var D=A.contextType,H=D&&r[D.__c];F=A.call(e.__c,O,null!=D?H?H.props.value:D.__:r)}return E.getChildContext&&(r=f(f({},r),E.getChildContext())),t.diffed&&t.diffed(e),h(F,r,o,!1!==o.shallowHighOrder,p,d)}A=(S=A).displayName||S!==Function&&S.name||function(t){var n=(Function.prototype.toString.call(t).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!n){for(var e=-1,r=y.length;r--;)if(y[r]===t){e=r;break}e<0&&(e=y.push(t)-1),n="UnnamedComponent"+e}return n}(S)}var I,$,U="<"+A;if(O){var W=Object.keys(O);o&&!0===o.sortAttributes&&W.sort();for(var L=0;L<W.length;L++){var P=W[L],T=O[P];if("children"!==P){if(!b.test(P)&&(o&&o.allAttributes||"key"!==P&&"ref"!==P&&"__self"!==P&&"__source"!==P&&"defaultValue"!==P)){if("className"===P){if(O.class)continue;P="class"}else p&&P.match(/^xlink:?./)&&(P=P.toLowerCase().replace(/^xlink:?/,"xlink:"));if("htmlFor"===P){if(O.for)continue;P="for"}"style"===P&&T&&"object"==typeof T&&(T=l(T)),"a"===P[0]&&"r"===P[1]&&"boolean"==typeof T&&(T=String(T));var R=o.attributeHook&&o.attributeHook(P,T,r,o,w);if(R||""===R)U+=R;else if("dangerouslySetInnerHTML"===P)$=T&&T.__html;else if("textarea"===A&&"value"===P)I=T;else if((T||0===T||""===T)&&"function"!=typeof T){if(!(!0!==T&&""!==T||(T=P,o&&o.xml))){U+=" "+P;continue}if("value"===P){if("select"===A){d=T;continue}"option"===A&&d==T&&(U+=" selected")}U+=" "+P+'="'+i(T)+'"'}}}else I=T}}if(_){var J=U.replace(/\n\s*/," ");J===U||~J.indexOf("\n")?_&&~U.indexOf("\n")&&(U+="\n"):U=J}if(U+=">",b.test(A))throw new Error(A+" is not a valid HTML tag name in "+U);var V,q=g.test(A)||o.voidElements&&o.voidElements.test(A),z=[];if($)_&&c($)&&($="\n"+v+a($,v)),U+=$;else if(null!=I&&s(V=[],I).length){for(var B=_&&~U.indexOf("\n"),G=!1,Z=0;Z<V.length;Z++){var K=V[Z];if(null!=K&&!1!==K){var Q=h(K,r,o,!0,"svg"===A||"foreignObject"!==A&&p,d);if(_&&!B&&c(Q)&&(B=!0),Q)if(_){var X=Q.length>0&&"<"!=Q[0];G&&X?z[z.length-1]+=Q:z.push(Q),G=X}else z.push(Q)}}if(_&&B)for(var Y=z.length;Y--;)z[Y]="\n"+v+a(z[Y],v)}if(z.length||$)U+=z.join("");else if(o&&o.xml)return U.substring(0,U.length-1)+" />";return!q||V||$?(_&&~U.indexOf("\n")&&(U+="\n"),U+="</"+A+">"):U=U.replace(/>$/," />"),U}_.shallowRender=function(t,n){return _(t,n,p)};const v=/(\\|\"|\')/g,x=Object.prototype.toString,j=Date.prototype.toISOString,S=Error.prototype.toString,A=RegExp.prototype.toString,O=Symbol.prototype.toString,w=/^Symbol\((.*)\)(.*)$/,k=/\n/gi,F=Object.getOwnPropertySymbols||(t=>[]);function E(t){return"[object Array]"===t||"[object ArrayBuffer]"===t||"[object DataView]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object Int8Array]"===t||"[object Int16Array]"===t||"[object Int32Array]"===t||"[object Uint8Array]"===t||"[object Uint8ClampedArray]"===t||"[object Uint16Array]"===t||"[object Uint32Array]"===t}function C(t){return""===t.name?"[Function anonymous]":"[Function "+t.name+"]"}function M(t){return O.call(t).replace(w,"Symbol($1)")}function N(t){return"["+S.call(t)+"]"}function D(t){if(!0===t||!1===t)return""+t;if(void 0===t)return"undefined";if(null===t)return"null";const n=typeof t;if("number"===n)return function(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}(t);if("string"===n)return'"'+function(t){return t.replace(v,"\\$1")}(t)+'"';if("function"===n)return C(t);if("symbol"===n)return M(t);const e=x.call(t);return"[object WeakMap]"===e?"WeakMap {}":"[object WeakSet]"===e?"WeakSet {}":"[object Function]"===e||"[object GeneratorFunction]"===e?C(t,min):"[object Symbol]"===e?M(t):"[object Date]"===e?j.call(t):"[object Error]"===e?N(t):"[object RegExp]"===e?A.call(t):"[object Arguments]"===e&&0===t.length?"Arguments []":E(e)&&0===t.length?t.constructor.name+" []":t instanceof Error&&N(t)}function H(t,n,e,r,o,i,a,c,u,l){let f="";if(t.length){f+=o;const s=e+n;for(let e=0;e<t.length;e++)f+=s+U(t[e],n,s,r,o,i,a,c,u,l),e<t.length-1&&(f+=","+r);f+=o+e}return"["+f+"]"}function I(t,n,e,r,o,i,a,c,u,l){if((i=i.slice()).indexOf(t)>-1)return"[Circular]";i.push(t);const f=++c>a;if(!f&&t.toJSON&&"function"==typeof t.toJSON)return U(t.toJSON(),n,e,r,o,i,a,c,u,l);const s=x.call(t);return"[object Arguments]"===s?f?"[Arguments]":function(t,n,e,r,o,i,a,c,u,l){return(l?"":"Arguments ")+H(t,n,e,r,o,i,a,c,u,l)}(t,n,e,r,o,i,a,c,u,l):E(s)?f?"[Array]":function(t,n,e,r,o,i,a,c,u,l){return(l?"":t.constructor.name+" ")+H(t,n,e,r,o,i,a,c,u,l)}(t,n,e,r,o,i,a,c,u,l):"[object Map]"===s?f?"[Map]":function(t,n,e,r,o,i,a,c,u,l){let f="Map {";const s=t.entries();let p=s.next();if(!p.done){f+=o;const t=e+n;for(;!p.done;)f+=t+U(p.value[0],n,t,r,o,i,a,c,u,l)+" => "+U(p.value[1],n,t,r,o,i,a,c,u,l),p=s.next(),p.done||(f+=","+r);f+=o+e}return f+"}"}(t,n,e,r,o,i,a,c,u,l):"[object Set]"===s?f?"[Set]":function(t,n,e,r,o,i,a,c,u,l){let f="Set {";const s=t.entries();let p=s.next();if(!p.done){f+=o;const t=e+n;for(;!p.done;)f+=t+U(p.value[1],n,t,r,o,i,a,c,u,l),p=s.next(),p.done||(f+=","+r);f+=o+e}return f+"}"}(t,n,e,r,o,i,a,c,u,l):"object"==typeof t?f?"[Object]":function(t,n,e,r,o,i,a,c,u,l){let f=(l?"":t.constructor?t.constructor.name+" ":"Object ")+"{",s=Object.keys(t).sort();const p=F(t);if(p.length&&(s=s.filter(t=>!("symbol"==typeof t||"[object Symbol]"===x.call(t))).concat(p)),s.length){f+=o;const p=e+n;for(let e=0;e<s.length;e++){const y=s[e];f+=p+U(y,n,p,r,o,i,a,c,u,l)+": "+U(t[y],n,p,r,o,i,a,c,u,l),e<s.length-1&&(f+=","+r)}f+=o+e}return f+"}"}(t,n,e,r,o,i,a,c,u,l):void 0}function $(t,n,e,r,o,i,a,c,u,l){let f,s=!1;for(let n=0;n<u.length;n++)if(f=u[n],f.test(t)){s=!0;break}return!!s&&f.print(t,function(t){return U(t,n,e,r,o,i,a,c,u,l)},function(t){const r=e+n;return r+t.replace(k,"\n"+r)},{edgeSpacing:o,spacing:r})}function U(t,n,e,r,o,i,a,c,u,l){return D(t)||$(t,n,e,r,o,i,a,c,u,l)||I(t,n,e,r,o,i,a,c,u,l)}const W={indent:2,min:!1,maxDepth:Infinity,plugins:[]};function L(t){return new Array(t+1).join(" ")}var P={test:function(t){return t&&"object"==typeof t&&"type"in t&&"props"in t&&"key"in t},print:function(t,n,e){return _(t,P.context,P.opts)}},T={plugins:[P]},R={attributeHook:function(t,n,e,r,o){var c=typeof n;if("dangerouslySetInnerHTML"===t)return!1;if(null==n||"function"===c&&!r.functions)return"";if(r.skipFalseAttributes&&!o&&(!1===n||("class"===t||"style"===t)&&""===n))return"";var u="string"==typeof r.pretty?r.pretty:"\t";return"string"!==c?("function"!==c||r.functionNames?(P.context=e,P.opts=r,~(n=function(t,n){let e,r;n?(function(t){if(Object.keys(t).forEach(t=>{if(!W.hasOwnProperty(t))throw new Error("prettyFormat: Invalid option: "+t)}),t.min&&void 0!==t.indent&&0!==t.indent)throw new Error("prettyFormat: Cannot run with min option and indent")}(n),n=function(t){const n={};return Object.keys(W).forEach(e=>n[e]=t.hasOwnProperty(e)?t[e]:W[e]),n.min&&(n.indent=0),n}(n)):n=W;const o=n.min?" ":"\n",i=n.min?"":"\n";if(n&&n.plugins.length){e=L(n.indent),r=[];var a=$(t,e,"",o,i,r,n.maxDepth,0,n.plugins,n.min);if(a)return a}return D(t)||(e||(e=L(n.indent)),r||(r=[]),I(t,e,"",o,i,r,n.maxDepth,0,n.plugins,n.min))}(n,T)).indexOf("\n")&&(n=a("\n"+n,u)+"\n")):n="Function",a("\n"+t+"={"+n+"}",u)):"\n"+u+t+'="'+i(n)+'"'},jsx:!0,xml:!1,functions:!0,functionNames:!0,skipFalseAttributes:!0,pretty:" "};function J(t,n,e,r){return _(t,n,e=f(f({},R),e||{}))}export default J;export{J as render};
1
+ import{options as t,Fragment as n}from"preact";if("function"!=typeof Symbol){var e=0;Symbol=function(t){return"@@"+t+ ++e},Symbol.for=function(t){return"@@"+t}}var r=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,o=/[&<>"]/;function i(t){var n=String(t);return o.test(n)?n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):n}var a=function(t,n){return String(t).replace(/(\n+)/g,"$1"+(n||"\t"))},c=function(t,n,e){return String(t).length>(n||40)||!e&&-1!==String(t).indexOf("\n")||-1!==String(t).indexOf("<")},u={};function l(t){var n="";for(var e in t){var o=t[e];null!=o&&""!==o&&(n&&(n+=" "),n+="-"==e[0]?e:u[e]||(u[e]=e.replace(/([A-Z])/g,"-$1").toLowerCase()),n+=": ",n+=o,"number"==typeof o&&!1===r.test(e)&&(n+="px"),n+=";")}return n||void 0}function f(t,n){for(var e in n)t[e]=n[e];return t}function s(t,n){return Array.isArray(n)?n.reduce(s,t):null!=n&&!1!==n&&t.push(n),t}var p={shallow:!0},y=[],g=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,b=/[\s\n\\/='"\0<>]/,m=function(){};v.render=v;var d=[];function v(n,e,r){e=e||{},r=r||{};var o=t.__s;t.__s=!0;var i=_(n,e,r);return t.__c&&t.__c(n,d),d.length=0,t.__s=o,i}function _(e,r,o,u,p,d){if(null==e||"boolean"==typeof e)return"";if("object"!=typeof e)return i(e);var v=o.pretty,h=v&&"string"==typeof v?v:"\t";if(Array.isArray(e)){for(var x="",j=0;j<e.length;j++)v&&j>0&&(x+="\n"),x+=_(e[j],r,o,u,p,d);return x}var S,A=e.type,O=e.props,w=!1;if("function"==typeof A){if(w=!0,!o.shallow||!u&&!1!==o.renderRootComponent){if(A===n){var k=[];return s(k,e.props.children),_(k,r,o,!1!==o.shallowHighOrder,p,d)}var F,E=e.__c={__v:e,context:r,props:e.props,setState:m,forceUpdate:m,__h:[]};if(t.__b&&t.__b(e),t.__r&&t.__r(e),A.prototype&&"function"==typeof A.prototype.render){var C=A.contextType,M=C&&r[C.__c],N=null!=C?M?M.props.value:C.__:r;(E=e.__c=new A(O,N)).__v=e,E._dirty=E.__d=!0,E.props=O,null==E.state&&(E.state={}),null==E._nextState&&null==E.__s&&(E._nextState=E.__s=E.state),E.context=N,A.getDerivedStateFromProps?E.state=f(f({},E.state),A.getDerivedStateFromProps(E.props,E.state)):E.componentWillMount&&(E.componentWillMount(),E.state=E._nextState!==E.state?E._nextState:E.__s!==E.state?E.__s:E.state),F=E.render(E.props,E.state,E.context)}else{var D=A.contextType,H=D&&r[D.__c];F=A.call(e.__c,O,null!=D?H?H.props.value:D.__:r)}return E.getChildContext&&(r=f(f({},r),E.getChildContext())),t.diffed&&t.diffed(e),_(F,r,o,!1!==o.shallowHighOrder,p,d)}A=(S=A).displayName||S!==Function&&S.name||function(t){var n=(Function.prototype.toString.call(t).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!n){for(var e=-1,r=y.length;r--;)if(y[r]===t){e=r;break}e<0&&(e=y.push(t)-1),n="UnnamedComponent"+e}return n}(S)}var I,$,U="<"+A;if(O){var W=Object.keys(O);o&&!0===o.sortAttributes&&W.sort();for(var L=0;L<W.length;L++){var P=W[L],T=O[P];if("children"!==P){if(!b.test(P)&&(o&&o.allAttributes||"key"!==P&&"ref"!==P&&"__self"!==P&&"__source"!==P)){if("defaultValue"===P)P="value";else if("className"===P){if(void 0!==O.class)continue;P="class"}else p&&P.match(/^xlink:?./)&&(P=P.toLowerCase().replace(/^xlink:?/,"xlink:"));if("htmlFor"===P){if(O.for)continue;P="for"}"style"===P&&T&&"object"==typeof T&&(T=l(T)),"a"===P[0]&&"r"===P[1]&&"boolean"==typeof T&&(T=String(T));var R=o.attributeHook&&o.attributeHook(P,T,r,o,w);if(R||""===R)U+=R;else if("dangerouslySetInnerHTML"===P)$=T&&T.__html;else if("textarea"===A&&"value"===P)I=T;else if((T||0===T||""===T)&&"function"!=typeof T){if(!(!0!==T&&""!==T||(T=P,o&&o.xml))){U+=" "+P;continue}if("value"===P){if("select"===A){d=T;continue}"option"===A&&d==T&&(U+=" selected")}U+=" "+P+'="'+i(T)+'"'}}}else I=T}}if(v){var J=U.replace(/\n\s*/," ");J===U||~J.indexOf("\n")?v&&~U.indexOf("\n")&&(U+="\n"):U=J}if(U+=">",b.test(A))throw new Error(A+" is not a valid HTML tag name in "+U);var V,q=g.test(A)||o.voidElements&&o.voidElements.test(A),z=[];if($)v&&c($)&&($="\n"+h+a($,h)),U+=$;else if(null!=I&&s(V=[],I).length){for(var B=v&&~U.indexOf("\n"),G=!1,Z=0;Z<V.length;Z++){var K=V[Z];if(null!=K&&!1!==K){var Q=_(K,r,o,!0,"svg"===A||"foreignObject"!==A&&p,d);if(v&&!B&&c(Q)&&(B=!0),Q)if(v){var X=Q.length>0&&"<"!=Q[0];G&&X?z[z.length-1]+=Q:z.push(Q),G=X}else z.push(Q)}}if(v&&B)for(var Y=z.length;Y--;)z[Y]="\n"+h+a(z[Y],h)}if(z.length||$)U+=z.join("");else if(o&&o.xml)return U.substring(0,U.length-1)+" />";return!q||V||$?(v&&~U.indexOf("\n")&&(U+="\n"),U+="</"+A+">"):U=U.replace(/>$/," />"),U}v.shallowRender=function(t,n){return v(t,n,p)};const h=/(\\|\"|\')/g,x=Object.prototype.toString,j=Date.prototype.toISOString,S=Error.prototype.toString,A=RegExp.prototype.toString,O=Symbol.prototype.toString,w=/^Symbol\((.*)\)(.*)$/,k=/\n/gi,F=Object.getOwnPropertySymbols||(t=>[]);function E(t){return"[object Array]"===t||"[object ArrayBuffer]"===t||"[object DataView]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object Int8Array]"===t||"[object Int16Array]"===t||"[object Int32Array]"===t||"[object Uint8Array]"===t||"[object Uint8ClampedArray]"===t||"[object Uint16Array]"===t||"[object Uint32Array]"===t}function C(t){return""===t.name?"[Function anonymous]":"[Function "+t.name+"]"}function M(t){return O.call(t).replace(w,"Symbol($1)")}function N(t){return"["+S.call(t)+"]"}function D(t){if(!0===t||!1===t)return""+t;if(void 0===t)return"undefined";if(null===t)return"null";const n=typeof t;if("number"===n)return function(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}(t);if("string"===n)return'"'+function(t){return t.replace(h,"\\$1")}(t)+'"';if("function"===n)return C(t);if("symbol"===n)return M(t);const e=x.call(t);return"[object WeakMap]"===e?"WeakMap {}":"[object WeakSet]"===e?"WeakSet {}":"[object Function]"===e||"[object GeneratorFunction]"===e?C(t,min):"[object Symbol]"===e?M(t):"[object Date]"===e?j.call(t):"[object Error]"===e?N(t):"[object RegExp]"===e?A.call(t):"[object Arguments]"===e&&0===t.length?"Arguments []":E(e)&&0===t.length?t.constructor.name+" []":t instanceof Error&&N(t)}function H(t,n,e,r,o,i,a,c,u,l){let f="";if(t.length){f+=o;const s=e+n;for(let e=0;e<t.length;e++)f+=s+U(t[e],n,s,r,o,i,a,c,u,l),e<t.length-1&&(f+=","+r);f+=o+e}return"["+f+"]"}function I(t,n,e,r,o,i,a,c,u,l){if((i=i.slice()).indexOf(t)>-1)return"[Circular]";i.push(t);const f=++c>a;if(!f&&t.toJSON&&"function"==typeof t.toJSON)return U(t.toJSON(),n,e,r,o,i,a,c,u,l);const s=x.call(t);return"[object Arguments]"===s?f?"[Arguments]":function(t,n,e,r,o,i,a,c,u,l){return(l?"":"Arguments ")+H(t,n,e,r,o,i,a,c,u,l)}(t,n,e,r,o,i,a,c,u,l):E(s)?f?"[Array]":function(t,n,e,r,o,i,a,c,u,l){return(l?"":t.constructor.name+" ")+H(t,n,e,r,o,i,a,c,u,l)}(t,n,e,r,o,i,a,c,u,l):"[object Map]"===s?f?"[Map]":function(t,n,e,r,o,i,a,c,u,l){let f="Map {";const s=t.entries();let p=s.next();if(!p.done){f+=o;const t=e+n;for(;!p.done;)f+=t+U(p.value[0],n,t,r,o,i,a,c,u,l)+" => "+U(p.value[1],n,t,r,o,i,a,c,u,l),p=s.next(),p.done||(f+=","+r);f+=o+e}return f+"}"}(t,n,e,r,o,i,a,c,u,l):"[object Set]"===s?f?"[Set]":function(t,n,e,r,o,i,a,c,u,l){let f="Set {";const s=t.entries();let p=s.next();if(!p.done){f+=o;const t=e+n;for(;!p.done;)f+=t+U(p.value[1],n,t,r,o,i,a,c,u,l),p=s.next(),p.done||(f+=","+r);f+=o+e}return f+"}"}(t,n,e,r,o,i,a,c,u,l):"object"==typeof t?f?"[Object]":function(t,n,e,r,o,i,a,c,u,l){let f=(l?"":t.constructor?t.constructor.name+" ":"Object ")+"{",s=Object.keys(t).sort();const p=F(t);if(p.length&&(s=s.filter(t=>!("symbol"==typeof t||"[object Symbol]"===x.call(t))).concat(p)),s.length){f+=o;const p=e+n;for(let e=0;e<s.length;e++){const y=s[e];f+=p+U(y,n,p,r,o,i,a,c,u,l)+": "+U(t[y],n,p,r,o,i,a,c,u,l),e<s.length-1&&(f+=","+r)}f+=o+e}return f+"}"}(t,n,e,r,o,i,a,c,u,l):void 0}function $(t,n,e,r,o,i,a,c,u,l){let f,s=!1;for(let n=0;n<u.length;n++)if(f=u[n],f.test(t)){s=!0;break}return!!s&&f.print(t,function(t){return U(t,n,e,r,o,i,a,c,u,l)},function(t){const r=e+n;return r+t.replace(k,"\n"+r)},{edgeSpacing:o,spacing:r})}function U(t,n,e,r,o,i,a,c,u,l){return D(t)||$(t,n,e,r,o,i,a,c,u,l)||I(t,n,e,r,o,i,a,c,u,l)}const W={indent:2,min:!1,maxDepth:Infinity,plugins:[]};function L(t){return new Array(t+1).join(" ")}var P={test:function(t){return t&&"object"==typeof t&&"type"in t&&"props"in t&&"key"in t},print:function(t,n,e){return v(t,P.context,P.opts)}},T={plugins:[P]},R={attributeHook:function(t,n,e,r,o){var c=typeof n;if("dangerouslySetInnerHTML"===t)return!1;if(null==n||"function"===c&&!r.functions)return"";if(r.skipFalseAttributes&&!o&&(!1===n||("class"===t||"style"===t)&&""===n))return"";var u="string"==typeof r.pretty?r.pretty:"\t";return"string"!==c?("function"!==c||r.functionNames?(P.context=e,P.opts=r,~(n=function(t,n){let e,r;n?(function(t){if(Object.keys(t).forEach(t=>{if(!W.hasOwnProperty(t))throw new Error("prettyFormat: Invalid option: "+t)}),t.min&&void 0!==t.indent&&0!==t.indent)throw new Error("prettyFormat: Cannot run with min option and indent")}(n),n=function(t){const n={};return Object.keys(W).forEach(e=>n[e]=t.hasOwnProperty(e)?t[e]:W[e]),n.min&&(n.indent=0),n}(n)):n=W;const o=n.min?" ":"\n",i=n.min?"":"\n";if(n&&n.plugins.length){e=L(n.indent),r=[];var a=$(t,e,"",o,i,r,n.maxDepth,0,n.plugins,n.min);if(a)return a}return D(t)||(e||(e=L(n.indent)),r||(r=[]),I(t,e,"",o,i,r,n.maxDepth,0,n.plugins,n.min))}(n,T)).indexOf("\n")&&(n=a("\n"+n,u)+"\n")):n="Function",a("\n"+t+"={"+n+"}",u)):"\n"+u+t+'="'+i(n)+'"'},jsx:!0,xml:!1,functions:!0,functionNames:!0,skipFalseAttributes:!0,pretty:" "};function J(t,n,e,r){return v(t,n,e=f(f({},R),e||{}))}export default J;export{J as render};
2
2
  //# sourceMappingURL=jsx.module.js.map