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,"&").replace(//g,">").replace(/"/g,"""):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;j0&&(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",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;Z0&&"<"!=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+=""):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-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{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}; //# sourceMappingURL=jsx.module.js.map