import{options as t,Fragment as e}from"preact";if("function"!=typeof Symbol){var n=0;Symbol=function(t){return"@@"+t+ ++n},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 e=String(t);return o.test(e)?e.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""):e}var a=function(t,e){return String(t).replace(/(\n+)/g,"$1"+(e||"\t"))},c=function(t,e,n){return String(t).length>(e||40)||!n&&-1!==String(t).indexOf("\n")||-1!==String(t).indexOf("<")},u={};function l(t){var e="";for(var n in t){var o=t[n];null!=o&&""!==o&&(e&&(e+=" "),e+="-"==n[0]?n:u[n]||(u[n]=n.replace(/([A-Z])/g,"-$1").toLowerCase()),e+=": ",e+=o,"number"==typeof o&&!1===r.test(n)&&(e+="px"),e+=";")}return e||void 0}function f(t,e){for(var n in e)t[n]=e[n];return t}function s(t,e){return Array.isArray(e)?e.reduce(s,t):null!=e&&!1!==e&&t.push(e),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<>]/;function b(){this.__d=!0}_.render=_;var m=[];function _(e,n,r){n=n||{},r=r||{};var o=t.__s;t.__s=!0;var i=v(e,n,r);return t.__c&&t.__c(e,m),m.length=0,t.__s=o,i}function v(n,r,o,u,p,m){if(null==n||"boolean"==typeof n)return"";if("object"!=typeof n)return i(n);var _=o.pretty,h=_&&"string"==typeof _?_:"\t";if(Array.isArray(n)){for(var x="",j=0;j0&&(x+="\n"),x+=v(n[j],r,o,u,p,m);return x}var S,A=n.type,O=n.props,w=!1;if("function"==typeof A){if(w=!0,!o.shallow||!u&&!1!==o.renderRootComponent){if(A===e){var k=[];return s(k,n.props.children),v(k,r,o,!1!==o.shallowHighOrder,p,m)}var F,E=n.__c={__v:n,context:r,props:n.props,setState:b,forceUpdate:b,__d:!0,__h:[]};t.__b&&t.__b(n);var C=t.__r;if(A.prototype&&"function"==typeof A.prototype.render){var M=A.contextType,N=M&&r[M.__c],D=null!=M?N?N.props.value:M.__:r;(E=n.__c=new A(O,D)).__v=n,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=D,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),C&&C(n),F=E.render(E.props,E.state,E.context)}else for(var H=A.contextType,I=H&&r[H.__c],$=null!=H?I?I.props.value:H.__:r,U=0;E.__d&&U++<25;)E.__d=!1,C&&C(n),F=A.call(n.__c,O,$);return E.getChildContext&&(r=f(f({},r),E.getChildContext())),t.diffed&&t.diffed(n),v(F,r,o,!1!==o.shallowHighOrder,p,m)}A=(S=A).displayName||S!==Function&&S.name||function(t){var e=(Function.prototype.toString.call(t).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!e){for(var n=-1,r=y.length;r--;)if(y[r]===t){n=r;break}n<0&&(n=y.push(t)-1),e="UnnamedComponent"+n}return e}(S)}var W,L,P="<"+A;if(O){var T=Object.keys(O);o&&!0===o.sortAttributes&&T.sort();for(var R=0;R",d.test(A))throw new Error(A+" is not a valid HTML tag name in "+P);var B,G=g.test(A)||o.voidElements&&o.voidElements.test(A),Z=[];if(L)_&&c(L)&&(L="\n"+h+a(L,h)),P+=L;else if(null!=W&&s(B=[],W).length){for(var K=_&&~P.indexOf("\n"),Q=!1,X=0;X0&&"<"!=tt[0];Q&&et?Z[Z.length-1]+=tt:Z.push(tt),Q=et}else Z.push(tt)}}if(_&&K)for(var nt=Z.length;nt--;)Z[nt]="\n"+h+a(Z[nt],h)}if(Z.length||L)P+=Z.join("");else if(o&&o.xml)return P.substring(0,P.length-1)+" />";return!G||B||L?(_&&~P.indexOf("\n")&&(P+="\n"),P+=""):P=P.replace(/>$/," />"),P}_.shallowRender=function(t,e){return _(t,e,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 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 C(t);if("symbol"===e)return M(t);const n=x.call(t);return"[object WeakMap]"===n?"WeakMap {}":"[object WeakSet]"===n?"WeakSet {}":"[object Function]"===n||"[object GeneratorFunction]"===n?C(t,min):"[object Symbol]"===n?M(t):"[object Date]"===n?j.call(t):"[object Error]"===n?N(t):"[object RegExp]"===n?A.call(t):"[object Arguments]"===n&&0===t.length?"Arguments []":E(n)&&0===t.length?t.constructor.name+" []":t instanceof Error&&N(t)}function H(t,e,n,r,o,i,a,c,u,l){let f="";if(t.length){f+=o;const s=n+e;for(let n=0;n-1)return"[Circular]";i.push(t);const f=++c>a;if(!f&&t.toJSON&&"function"==typeof t.toJSON)return U(t.toJSON(),e,n,r,o,i,a,c,u,l);const s=x.call(t);return"[object Arguments]"===s?f?"[Arguments]":function(t,e,n,r,o,i,a,c,u,l){return(l?"":"Arguments ")+H(t,e,n,r,o,i,a,c,u,l)}(t,e,n,r,o,i,a,c,u,l):E(s)?f?"[Array]":function(t,e,n,r,o,i,a,c,u,l){return(l?"":t.constructor.name+" ")+H(t,e,n,r,o,i,a,c,u,l)}(t,e,n,r,o,i,a,c,u,l):"[object Map]"===s?f?"[Map]":function(t,e,n,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=n+e;for(;!p.done;)f+=t+U(p.value[0],e,t,r,o,i,a,c,u,l)+" => "+U(p.value[1],e,t,r,o,i,a,c,u,l),p=s.next(),p.done||(f+=","+r);f+=o+n}return f+"}"}(t,e,n,r,o,i,a,c,u,l):"[object Set]"===s?f?"[Set]":function(t,e,n,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=n+e;for(;!p.done;)f+=t+U(p.value[1],e,t,r,o,i,a,c,u,l),p=s.next(),p.done||(f+=","+r);f+=o+n}return f+"}"}(t,e,n,r,o,i,a,c,u,l):"object"==typeof t?f?"[Object]":function(t,e,n,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=n+e;for(let n=0;n{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")}(e),e=function(t){const e={};return Object.keys(W).forEach(n=>e[n]=t.hasOwnProperty(n)?t[n]:W[n]),e.min&&(e.indent=0),e}(e)):e=W;const o=e.min?" ":"\n",i=e.min?"":"\n";if(e&&e.plugins.length){n=L(e.indent),r=[];var a=$(t,n,"",o,i,r,e.maxDepth,0,e.plugins,e.min);if(a)return a}return D(t)||(n||(n=L(e.indent)),r||(r=[]),I(t,n,"",o,i,r,e.maxDepth,0,e.plugins,e.min))}(e,T)).indexOf("\n")&&(e=a("\n"+e,u)+"\n")):e="Function",a("\n"+t+"={"+e+"}",u)):"\n"+u+t+'="'+i(e)+'"'},jsx:!0,xml:!1,functions:!0,functionNames:!0,skipFalseAttributes:!0,pretty:" "};function J(t,e,n,r){return _(t,e,n=f(f({},R),n||{}))}export default J;export{J as render}; //# sourceMappingURL=jsx.module.js.map