preact-render-to-string
Advanced tools
Comparing version
@@ -1,2 +0,2 @@ | ||
var e=require("preact"),t=/[\s\n\\/='"\0<>]/,r=/^(xlink|xmlns|xml)(:|[A-Z])/,o=/^accessK|^auto[A-Z]|^ch|^col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|readO|rowS|spellC|src[A-Z]|tabI|item[A-Z]/,n=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,a=/["&<]/;function i(e){if(0===e.length||!1===a.test(e))return e;for(var t=0,r=0,o="",n="";r<e.length;r++){switch(e.charCodeAt(r)){case 34:n=""";break;case 38:n="&";break;case 60:n="<";break;default:continue}r!==t&&(o+=e.slice(t,r)),o+=n,t=r+1}return r!==t&&(o+=e.slice(t,r)),o}var s={},l=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),c=/[A-Z]/g;function p(e){var t="";for(var r in e){var o=e[r];if(null!=o&&""!==o){var n="-"==r[0]?r:s[r]||(s[r]=r.replace(c,"-$&").toLowerCase()),a=";";"number"!=typeof o||n.startsWith("--")||l.has(n)||(a="px;"),t=t+n+":"+o+a}}return t||void 0}var u,_,d,f,h=[],m=Array.isArray,g=Object.assign;function v(t,r){var o=e.options.__s;e.options.__s=!0,u=e.options.__b,_=e.options.diffed,d=e.options.__r,f=e.options.unmount;var n=e.h(e.Fragment,null);n.__k=[t];try{return x(t,r||b,!1,void 0,n)}finally{e.options.__c&&e.options.__c(t,h),e.options.__s=o,h.length=0}}function y(){this.__d=!0}var b={};function k(e,t){var r,o=e.type,n=!0;return e.__c?(n=!1,(r=e.__c).state=r.__s):r=new o(e.props,t),e.__c=r,r.__v=e,r.props=e.props,r.context=t,r.__d=!0,null==r.state&&(r.state=b),null==r.__s&&(r.__s=r.state),o.getDerivedStateFromProps?r.state=g({},r.state,o.getDerivedStateFromProps(r.props,r.state)):n&&r.componentWillMount?(r.componentWillMount(),r.state=r.__s!==r.state?r.__s:r.state):!n&&r.componentWillUpdate&&r.componentWillUpdate(),d&&d(e),r.render(r.props,r.state,t)}function x(a,s,l,c,h){if(null==a||!0===a||!1===a||""===a)return"";if("object"!=typeof a)return"function"==typeof a?"":i(a+"");if(m(a)){var v="";h.__k=a;for(var b=0;b<a.length;b++){var C=a[b];null!=C&&"boolean"!=typeof C&&(v+=x(C,s,l,c,h))}return v}if(void 0!==a.constructor)return"";a.__=h,u&&u(a);var S,A,L,F=a.type,T=a.props,D=s;if("function"==typeof F){if(F===e.Fragment){if(T.UNSTABLE_comment)return"\x3c!--"+i(T.UNSTABLE_comment||"")+"--\x3e";A=T.children}else{if(null!=(S=F.contextType)){var E=s[S.__c];D=E?E.props.value:S.__}if(F.prototype&&"function"==typeof F.prototype.render)A=k(a,D),L=a.__c;else{a.__c=L={__v:a,props:T,context:D,setState:y,forceUpdate:y,__d:!0,__h:[]};for(var Z=0;L.__d&&Z++<25;)L.__d=!1,d&&d(a),A=F.call(L,T,D);L.__d=!0}if(null!=L.getChildContext&&(s=g({},s,L.getChildContext())),(F.getDerivedStateFromError||L.componentDidCatch)&&e.options.errorBoundaries){var M="";A=null!=A&&A.type===e.Fragment&&null==A.key?A.props.children:A;try{return M=x(A,s,l,c,a)}catch(t){return F.getDerivedStateFromError&&(L.__s=F.getDerivedStateFromError(t)),L.componentDidCatch&&L.componentDidCatch(t,{}),L.__d&&(A=k(a,s),null!=(L=a.__c).getChildContext&&(s=g({},s,L.getChildContext())),M=x(A=null!=A&&A.type===e.Fragment&&null==A.key?A.props.children:A,s,l,c,a)),M}finally{_&&_(a),a.__=void 0,f&&f(a)}}}var U=x(A=null!=A&&A.type===e.Fragment&&null==A.key?A.props.children:A,s,l,c,a);return _&&_(a),a.__=void 0,f&&f(a),U}var W,$="<"+F,j="";for(var q in T){var z=T[q];switch(q){case"children":W=z;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in T)continue;q="for";break;case"className":if("class"in T)continue;q="class";break;case"defaultChecked":q="checked";break;case"defaultSelected":q="selected";break;case"defaultValue":case"value":switch(q="value",F){case"textarea":W=z;continue;case"select":c=z;continue;case"option":c!=z||"selected"in T||($+=" selected")}break;case"dangerouslySetInnerHTML":j=z&&z.__html;continue;case"style":"object"==typeof z&&(z=p(z));break;case"acceptCharset":q="accept-charset";break;case"httpEquiv":q="http-equiv";break;default:if(r.test(q))q=q.replace(r,"$1:$2").toLowerCase();else{if(t.test(q))continue;"-"!==q[4]&&"draggable"!==q||null==z?l?n.test(q)&&(q="panose1"===q?"panose-1":q.replace(/([A-Z])/g,"-$1").toLowerCase()):o.test(q)&&(q=q.toLowerCase()):z+=""}}null!=z&&!1!==z&&"function"!=typeof z&&($=!0===z||""===z?$+" "+q:$+" "+q+'="'+i(z+"")+'"')}if(t.test(F))throw new Error(F+" is not a valid HTML tag name in "+$+">");return j||("string"==typeof W?j=i(W):null!=W&&!1!==W&&!0!==W&&(j=x(W,s,"svg"===F||"foreignObject"!==F&&l,c,a))),_&&_(a),a.__=void 0,f&&f(a),!j&&w.has(F)?$+"/>":$+">"+j+"</"+F+">"}var w=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),C=v,S=v;exports.default=v,exports.render=C,exports.renderToStaticMarkup=S,exports.renderToString=v; | ||
var e=require("preact"),t=/[\s\n\\/='"\0<>]/,r=/^(xlink|xmlns|xml)([A-Z])/,o=/^accessK|^auto[A-Z]|^ch|^col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|readO|rowS|spellC|src[A-Z]|tabI|item[A-Z]/,n=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,a=/["&<]/;function i(e){if(0===e.length||!1===a.test(e))return e;for(var t=0,r=0,o="",n="";r<e.length;r++){switch(e.charCodeAt(r)){case 34:n=""";break;case 38:n="&";break;case 60:n="<";break;default:continue}r!==t&&(o+=e.slice(t,r)),o+=n,t=r+1}return r!==t&&(o+=e.slice(t,r)),o}var s={},l=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),c=/[A-Z]/g;function p(e){var t="";for(var r in e){var o=e[r];if(null!=o&&""!==o){var n="-"==r[0]?r:s[r]||(s[r]=r.replace(c,"-$&").toLowerCase()),a=";";"number"!=typeof o||n.startsWith("--")||l.has(n)||(a="px;"),t=t+n+":"+o+a}}return t||void 0}var u,_,d,f,h=[],m=Array.isArray,g=Object.assign;function v(t,r){var o=e.options.__s;e.options.__s=!0,u=e.options.__b,_=e.options.diffed,d=e.options.__r,f=e.options.unmount;var n=e.h(e.Fragment,null);n.__k=[t];try{return x(t,r||b,!1,void 0,n)}finally{e.options.__c&&e.options.__c(t,h),e.options.__s=o,h.length=0}}function y(){this.__d=!0}var b={};function k(e,t){var r,o=e.type,n=!0;return e.__c?(n=!1,(r=e.__c).state=r.__s):r=new o(e.props,t),e.__c=r,r.__v=e,r.props=e.props,r.context=t,r.__d=!0,null==r.state&&(r.state=b),null==r.__s&&(r.__s=r.state),o.getDerivedStateFromProps?r.state=g({},r.state,o.getDerivedStateFromProps(r.props,r.state)):n&&r.componentWillMount?(r.componentWillMount(),r.state=r.__s!==r.state?r.__s:r.state):!n&&r.componentWillUpdate&&r.componentWillUpdate(),d&&d(e),r.render(r.props,r.state,t)}function x(a,s,l,c,h){if(null==a||!0===a||!1===a||""===a)return"";if("object"!=typeof a)return"function"==typeof a?"":i(a+"");if(m(a)){var v="";h.__k=a;for(var b=0;b<a.length;b++){var C=a[b];null!=C&&"boolean"!=typeof C&&(v+=x(C,s,l,c,h))}return v}if(void 0!==a.constructor)return"";a.__=h,u&&u(a);var S,A,L,F=a.type,T=a.props,D=s;if("function"==typeof F){if(F===e.Fragment){if(T.UNSTABLE_comment)return"\x3c!--"+i(T.UNSTABLE_comment||"")+"--\x3e";A=T.children}else{if(null!=(S=F.contextType)){var E=s[S.__c];D=E?E.props.value:S.__}if(F.prototype&&"function"==typeof F.prototype.render)A=k(a,D),L=a.__c;else{a.__c=L={__v:a,props:T,context:D,setState:y,forceUpdate:y,__d:!0,__h:[]};for(var Z=0;L.__d&&Z++<25;)L.__d=!1,d&&d(a),A=F.call(L,T,D);L.__d=!0}if(null!=L.getChildContext&&(s=g({},s,L.getChildContext())),(F.getDerivedStateFromError||L.componentDidCatch)&&e.options.errorBoundaries){var M="";A=null!=A&&A.type===e.Fragment&&null==A.key?A.props.children:A;try{return M=x(A,s,l,c,a)}catch(t){return F.getDerivedStateFromError&&(L.__s=F.getDerivedStateFromError(t)),L.componentDidCatch&&L.componentDidCatch(t,{}),L.__d&&(A=k(a,s),null!=(L=a.__c).getChildContext&&(s=g({},s,L.getChildContext())),M=x(A=null!=A&&A.type===e.Fragment&&null==A.key?A.props.children:A,s,l,c,a)),M}finally{_&&_(a),a.__=void 0,f&&f(a)}}}var U=x(A=null!=A&&A.type===e.Fragment&&null==A.key?A.props.children:A,s,l,c,a);return _&&_(a),a.__=void 0,f&&f(a),U}var W,$="<"+F,j="";for(var q in T){var z=T[q];switch(q){case"children":W=z;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in T)continue;q="for";break;case"className":if("class"in T)continue;q="class";break;case"defaultChecked":q="checked";break;case"defaultSelected":q="selected";break;case"defaultValue":case"value":switch(q="value",F){case"textarea":W=z;continue;case"select":c=z;continue;case"option":c!=z||"selected"in T||($+=" selected")}break;case"dangerouslySetInnerHTML":j=z&&z.__html;continue;case"style":"object"==typeof z&&(z=p(z));break;case"acceptCharset":q="accept-charset";break;case"httpEquiv":q="http-equiv";break;default:if(r.test(q))q=q.replace(r,"$1:$2").toLowerCase();else{if(t.test(q))continue;"-"!==q[4]&&"draggable"!==q||null==z?l?n.test(q)&&(q="panose1"===q?"panose-1":q.replace(/([A-Z])/g,"-$1").toLowerCase()):o.test(q)&&(q=q.toLowerCase()):z+=""}}null!=z&&!1!==z&&"function"!=typeof z&&($=!0===z||""===z?$+" "+q:$+" "+q+'="'+i(z+"")+'"')}if(t.test(F))throw new Error(F+" is not a valid HTML tag name in "+$+">");return j||("string"==typeof W?j=i(W):null!=W&&!1!==W&&!0!==W&&(j=x(W,s,"svg"===F||"foreignObject"!==F&&l,c,a))),_&&_(a),a.__=void 0,f&&f(a),!j&&w.has(F)?$+"/>":$+">"+j+"</"+F+">"}var w=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),C=v,S=v;exports.default=v,exports.render=C,exports.renderToStaticMarkup=S,exports.renderToString=v; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import{options as e,h as t,Fragment as r}from"preact";var o=/[\s\n\\/='"\0<>]/,a=/^(xlink|xmlns|xml)(:|[A-Z])/,n=/^accessK|^auto[A-Z]|^ch|^col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|readO|rowS|spellC|src[A-Z]|tabI|item[A-Z]/,i=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,l=/["&<]/;function s(e){if(0===e.length||!1===l.test(e))return e;for(var t=0,r=0,o="",a="";r<e.length;r++){switch(e.charCodeAt(r)){case 34:a=""";break;case 38:a="&";break;case 60:a="<";break;default:continue}r!==t&&(o+=e.slice(t,r)),o+=a,t=r+1}return r!==t&&(o+=e.slice(t,r)),o}var c={},p=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),u=/[A-Z]/g;function _(e){var t="";for(var r in e){var o=e[r];if(null!=o&&""!==o){var a="-"==r[0]?r:c[r]||(c[r]=r.replace(u,"-$&").toLowerCase()),n=";";"number"!=typeof o||a.startsWith("--")||p.has(a)||(n="px;"),t=t+a+":"+o+n}}return t||void 0}var d,f,h,m,v=[],g=Array.isArray,y=Object.assign;function b(o,a){var n=e.__s;e.__s=!0,d=e.__b,f=e.diffed,h=e.__r,m=e.unmount;var i=t(r,null);i.__k=[o];try{return C(o,a||x,!1,void 0,i)}finally{e.__c&&e.__c(o,v),e.__s=n,v.length=0}}function k(){this.__d=!0}var x={};function w(e,t){var r,o=e.type,a=!0;return e.__c?(a=!1,(r=e.__c).state=r.__s):r=new o(e.props,t),e.__c=r,r.__v=e,r.props=e.props,r.context=t,r.__d=!0,null==r.state&&(r.state=x),null==r.__s&&(r.__s=r.state),o.getDerivedStateFromProps?r.state=y({},r.state,o.getDerivedStateFromProps(r.props,r.state)):a&&r.componentWillMount?(r.componentWillMount(),r.state=r.__s!==r.state?r.__s:r.state):!a&&r.componentWillUpdate&&r.componentWillUpdate(),h&&h(e),r.render(r.props,r.state,t)}function C(t,l,c,p,u){if(null==t||!0===t||!1===t||""===t)return"";if("object"!=typeof t)return"function"==typeof t?"":s(t+"");if(g(t)){var v="";u.__k=t;for(var b=0;b<t.length;b++){var x=t[b];null!=x&&"boolean"!=typeof x&&(v+=C(x,l,c,p,u))}return v}if(void 0!==t.constructor)return"";t.__=u,d&&d(t);var A,L,D,E=t.type,T=t.props,Z=l;if("function"==typeof E){if(E===r){if(T.UNSTABLE_comment)return"\x3c!--"+s(T.UNSTABLE_comment||"")+"--\x3e";L=T.children}else{if(null!=(A=E.contextType)){var F=l[A.__c];Z=F?F.props.value:A.__}if(E.prototype&&"function"==typeof E.prototype.render)L=w(t,Z),D=t.__c;else{t.__c=D={__v:t,props:T,context:Z,setState:k,forceUpdate:k,__d:!0,__h:[]};for(var U=0;D.__d&&U++<25;)D.__d=!1,h&&h(t),L=E.call(D,T,Z);D.__d=!0}if(null!=D.getChildContext&&(l=y({},l,D.getChildContext())),(E.getDerivedStateFromError||D.componentDidCatch)&&e.errorBoundaries){var W="";L=null!=L&&L.type===r&&null==L.key?L.props.children:L;try{return W=C(L,l,c,p,t)}catch(e){return E.getDerivedStateFromError&&(D.__s=E.getDerivedStateFromError(e)),D.componentDidCatch&&D.componentDidCatch(e,{}),D.__d&&(L=w(t,l),null!=(D=t.__c).getChildContext&&(l=y({},l,D.getChildContext())),W=C(L=null!=L&&L.type===r&&null==L.key?L.props.children:L,l,c,p,t)),W}finally{f&&f(t),t.__=void 0,m&&m(t)}}}var $=C(L=null!=L&&L.type===r&&null==L.key?L.props.children:L,l,c,p,t);return f&&f(t),t.__=void 0,m&&m(t),$}var M,j="<"+E,z="";for(var H in T){var q=T[H];switch(H){case"children":M=q;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in T)continue;H="for";break;case"className":if("class"in T)continue;H="class";break;case"defaultChecked":H="checked";break;case"defaultSelected":H="selected";break;case"defaultValue":case"value":switch(H="value",E){case"textarea":M=q;continue;case"select":p=q;continue;case"option":p!=q||"selected"in T||(j+=" selected")}break;case"dangerouslySetInnerHTML":z=q&&q.__html;continue;case"style":"object"==typeof q&&(q=_(q));break;case"acceptCharset":H="accept-charset";break;case"httpEquiv":H="http-equiv";break;default:if(a.test(H))H=H.replace(a,"$1:$2").toLowerCase();else{if(o.test(H))continue;"-"!==H[4]&&"draggable"!==H||null==q?c?i.test(H)&&(H="panose1"===H?"panose-1":H.replace(/([A-Z])/g,"-$1").toLowerCase()):n.test(H)&&(H=H.toLowerCase()):q+=""}}null!=q&&!1!==q&&"function"!=typeof q&&(j=!0===q||""===q?j+" "+H:j+" "+H+'="'+s(q+"")+'"')}if(o.test(E))throw new Error(E+" is not a valid HTML tag name in "+j+">");return z||("string"==typeof M?z=s(M):null!=M&&!1!==M&&!0!==M&&(z=C(M,l,"svg"===E||"foreignObject"!==E&&c,p,t))),f&&f(t),t.__=void 0,m&&m(t),!z&&S.has(E)?j+"/>":j+">"+z+"</"+E+">"}var S=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),A=b,L=b;export default b;export{A as render,L as renderToStaticMarkup,b as renderToString}; | ||
import{options as e,h as t,Fragment as r}from"preact";var o=/[\s\n\\/='"\0<>]/,a=/^(xlink|xmlns|xml)([A-Z])/,n=/^accessK|^auto[A-Z]|^ch|^col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|readO|rowS|spellC|src[A-Z]|tabI|item[A-Z]/,i=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,l=/["&<]/;function s(e){if(0===e.length||!1===l.test(e))return e;for(var t=0,r=0,o="",a="";r<e.length;r++){switch(e.charCodeAt(r)){case 34:a=""";break;case 38:a="&";break;case 60:a="<";break;default:continue}r!==t&&(o+=e.slice(t,r)),o+=a,t=r+1}return r!==t&&(o+=e.slice(t,r)),o}var c={},p=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),u=/[A-Z]/g;function _(e){var t="";for(var r in e){var o=e[r];if(null!=o&&""!==o){var a="-"==r[0]?r:c[r]||(c[r]=r.replace(u,"-$&").toLowerCase()),n=";";"number"!=typeof o||a.startsWith("--")||p.has(a)||(n="px;"),t=t+a+":"+o+n}}return t||void 0}var d,f,h,m,v=[],g=Array.isArray,y=Object.assign;function b(o,a){var n=e.__s;e.__s=!0,d=e.__b,f=e.diffed,h=e.__r,m=e.unmount;var i=t(r,null);i.__k=[o];try{return C(o,a||x,!1,void 0,i)}finally{e.__c&&e.__c(o,v),e.__s=n,v.length=0}}function k(){this.__d=!0}var x={};function w(e,t){var r,o=e.type,a=!0;return e.__c?(a=!1,(r=e.__c).state=r.__s):r=new o(e.props,t),e.__c=r,r.__v=e,r.props=e.props,r.context=t,r.__d=!0,null==r.state&&(r.state=x),null==r.__s&&(r.__s=r.state),o.getDerivedStateFromProps?r.state=y({},r.state,o.getDerivedStateFromProps(r.props,r.state)):a&&r.componentWillMount?(r.componentWillMount(),r.state=r.__s!==r.state?r.__s:r.state):!a&&r.componentWillUpdate&&r.componentWillUpdate(),h&&h(e),r.render(r.props,r.state,t)}function C(t,l,c,p,u){if(null==t||!0===t||!1===t||""===t)return"";if("object"!=typeof t)return"function"==typeof t?"":s(t+"");if(g(t)){var v="";u.__k=t;for(var b=0;b<t.length;b++){var x=t[b];null!=x&&"boolean"!=typeof x&&(v+=C(x,l,c,p,u))}return v}if(void 0!==t.constructor)return"";t.__=u,d&&d(t);var A,L,D,E=t.type,T=t.props,Z=l;if("function"==typeof E){if(E===r){if(T.UNSTABLE_comment)return"\x3c!--"+s(T.UNSTABLE_comment||"")+"--\x3e";L=T.children}else{if(null!=(A=E.contextType)){var F=l[A.__c];Z=F?F.props.value:A.__}if(E.prototype&&"function"==typeof E.prototype.render)L=w(t,Z),D=t.__c;else{t.__c=D={__v:t,props:T,context:Z,setState:k,forceUpdate:k,__d:!0,__h:[]};for(var U=0;D.__d&&U++<25;)D.__d=!1,h&&h(t),L=E.call(D,T,Z);D.__d=!0}if(null!=D.getChildContext&&(l=y({},l,D.getChildContext())),(E.getDerivedStateFromError||D.componentDidCatch)&&e.errorBoundaries){var W="";L=null!=L&&L.type===r&&null==L.key?L.props.children:L;try{return W=C(L,l,c,p,t)}catch(e){return E.getDerivedStateFromError&&(D.__s=E.getDerivedStateFromError(e)),D.componentDidCatch&&D.componentDidCatch(e,{}),D.__d&&(L=w(t,l),null!=(D=t.__c).getChildContext&&(l=y({},l,D.getChildContext())),W=C(L=null!=L&&L.type===r&&null==L.key?L.props.children:L,l,c,p,t)),W}finally{f&&f(t),t.__=void 0,m&&m(t)}}}var $=C(L=null!=L&&L.type===r&&null==L.key?L.props.children:L,l,c,p,t);return f&&f(t),t.__=void 0,m&&m(t),$}var M,j="<"+E,z="";for(var H in T){var q=T[H];switch(H){case"children":M=q;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in T)continue;H="for";break;case"className":if("class"in T)continue;H="class";break;case"defaultChecked":H="checked";break;case"defaultSelected":H="selected";break;case"defaultValue":case"value":switch(H="value",E){case"textarea":M=q;continue;case"select":p=q;continue;case"option":p!=q||"selected"in T||(j+=" selected")}break;case"dangerouslySetInnerHTML":z=q&&q.__html;continue;case"style":"object"==typeof q&&(q=_(q));break;case"acceptCharset":H="accept-charset";break;case"httpEquiv":H="http-equiv";break;default:if(a.test(H))H=H.replace(a,"$1:$2").toLowerCase();else{if(o.test(H))continue;"-"!==H[4]&&"draggable"!==H||null==q?c?i.test(H)&&(H="panose1"===H?"panose-1":H.replace(/([A-Z])/g,"-$1").toLowerCase()):n.test(H)&&(H=H.toLowerCase()):q+=""}}null!=q&&!1!==q&&"function"!=typeof q&&(j=!0===q||""===q?j+" "+H:j+" "+H+'="'+s(q+"")+'"')}if(o.test(E))throw new Error(E+" is not a valid HTML tag name in "+j+">");return z||("string"==typeof M?z=s(M):null!=M&&!1!==M&&!0!==M&&(z=C(M,l,"svg"===E||"foreignObject"!==E&&c,p,t))),f&&f(t),t.__=void 0,m&&m(t),!z&&S.has(E)?j+"/>":j+">"+z+"</"+E+">"}var S=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),A=b,L=b;export default b;export{A as render,L as renderToStaticMarkup,b as renderToString}; | ||
//# sourceMappingURL=index.module.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],t):t((e||self).preactRenderToString={},e.preact)}(this,function(e,t){var r=/[\s\n\\/='"\0<>]/,o=/^(xlink|xmlns|xml)(:|[A-Z])/,n=/^accessK|^auto[A-Z]|^ch|^col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|readO|rowS|spellC|src[A-Z]|tabI|item[A-Z]/,a=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,i=/["&<]/;function s(e){if(0===e.length||!1===i.test(e))return e;for(var t=0,r=0,o="",n="";r<e.length;r++){switch(e.charCodeAt(r)){case 34:n=""";break;case 38:n="&";break;case 60:n="<";break;default:continue}r!==t&&(o+=e.slice(t,r)),o+=n,t=r+1}return r!==t&&(o+=e.slice(t,r)),o}var l={},c=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),p=/[A-Z]/g;function u(e){var t="";for(var r in e){var o=e[r];if(null!=o&&""!==o){var n="-"==r[0]?r:l[r]||(l[r]=r.replace(p,"-$&").toLowerCase()),a=";";"number"!=typeof o||n.startsWith("--")||c.has(n)||(a="px;"),t=t+n+":"+o+a}}return t||void 0}var d,f,_,h,m=[],g=Array.isArray,v=Object.assign;function y(e,r){var o=t.options.__s;t.options.__s=!0,d=t.options.__b,f=t.options.diffed,_=t.options.__r,h=t.options.unmount;var n=t.h(t.Fragment,null);n.__k=[e];try{return w(e,r||k,!1,void 0,n)}finally{t.options.__c&&t.options.__c(e,m),t.options.__s=o,m.length=0}}function b(){this.__d=!0}var k={};function x(e,t){var r,o=e.type,n=!0;return e.__c?(n=!1,(r=e.__c).state=r.__s):r=new o(e.props,t),e.__c=r,r.__v=e,r.props=e.props,r.context=t,r.__d=!0,null==r.state&&(r.state=k),null==r.__s&&(r.__s=r.state),o.getDerivedStateFromProps?r.state=v({},r.state,o.getDerivedStateFromProps(r.props,r.state)):n&&r.componentWillMount?(r.componentWillMount(),r.state=r.__s!==r.state?r.__s:r.state):!n&&r.componentWillUpdate&&r.componentWillUpdate(),_&&_(e),r.render(r.props,r.state,t)}function w(e,i,l,c,p){if(null==e||!0===e||!1===e||""===e)return"";if("object"!=typeof e)return"function"==typeof e?"":s(e+"");if(g(e)){var m="";p.__k=e;for(var y=0;y<e.length;y++){var k=e[y];null!=k&&"boolean"!=typeof k&&(m+=w(k,i,l,c,p))}return m}if(void 0!==e.constructor)return"";e.__=p,d&&d(e);var S,A,L,T=e.type,F=e.props,D=i;if("function"==typeof T){if(T===t.Fragment){if(F.UNSTABLE_comment)return"\x3c!--"+s(F.UNSTABLE_comment||"")+"--\x3e";A=F.children}else{if(null!=(S=T.contextType)){var E=i[S.__c];D=E?E.props.value:S.__}if(T.prototype&&"function"==typeof T.prototype.render)A=x(e,D),L=e.__c;else{e.__c=L={__v:e,props:F,context:D,setState:b,forceUpdate:b,__d:!0,__h:[]};for(var Z=0;L.__d&&Z++<25;)L.__d=!1,_&&_(e),A=T.call(L,F,D);L.__d=!0}if(null!=L.getChildContext&&(i=v({},i,L.getChildContext())),(T.getDerivedStateFromError||L.componentDidCatch)&&t.options.errorBoundaries){var M="";A=null!=A&&A.type===t.Fragment&&null==A.key?A.props.children:A;try{return M=w(A,i,l,c,e)}catch(r){return T.getDerivedStateFromError&&(L.__s=T.getDerivedStateFromError(r)),L.componentDidCatch&&L.componentDidCatch(r,{}),L.__d&&(A=x(e,i),null!=(L=e.__c).getChildContext&&(i=v({},i,L.getChildContext())),M=w(A=null!=A&&A.type===t.Fragment&&null==A.key?A.props.children:A,i,l,c,e)),M}finally{f&&f(e),e.__=void 0,h&&h(e)}}}var U=w(A=null!=A&&A.type===t.Fragment&&null==A.key?A.props.children:A,i,l,c,e);return f&&f(e),e.__=void 0,h&&h(e),U}var W,$="<"+T,j="";for(var q in F){var z=F[q];switch(q){case"children":W=z;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in F)continue;q="for";break;case"className":if("class"in F)continue;q="class";break;case"defaultChecked":q="checked";break;case"defaultSelected":q="selected";break;case"defaultValue":case"value":switch(q="value",T){case"textarea":W=z;continue;case"select":c=z;continue;case"option":c!=z||"selected"in F||($+=" selected")}break;case"dangerouslySetInnerHTML":j=z&&z.__html;continue;case"style":"object"==typeof z&&(z=u(z));break;case"acceptCharset":q="accept-charset";break;case"httpEquiv":q="http-equiv";break;default:if(o.test(q))q=q.replace(o,"$1:$2").toLowerCase();else{if(r.test(q))continue;"-"!==q[4]&&"draggable"!==q||null==z?l?a.test(q)&&(q="panose1"===q?"panose-1":q.replace(/([A-Z])/g,"-$1").toLowerCase()):n.test(q)&&(q=q.toLowerCase()):z+=""}}null!=z&&!1!==z&&"function"!=typeof z&&($=!0===z||""===z?$+" "+q:$+" "+q+'="'+s(z+"")+'"')}if(r.test(T))throw new Error(T+" is not a valid HTML tag name in "+$+">");return j||("string"==typeof W?j=s(W):null!=W&&!1!==W&&!0!==W&&(j=w(W,i,"svg"===T||"foreignObject"!==T&&l,c,e))),f&&f(e),e.__=void 0,h&&h(e),!j&&C.has(T)?$+"/>":$+">"+j+"</"+T+">"}var C=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),S=y,A=y;e.default=y,e.render=S,e.renderToStaticMarkup=A,e.renderToString=y}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],t):t((e||self).preactRenderToString={},e.preact)}(this,function(e,t){var r=/[\s\n\\/='"\0<>]/,o=/^(xlink|xmlns|xml)([A-Z])/,n=/^accessK|^auto[A-Z]|^ch|^col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|readO|rowS|spellC|src[A-Z]|tabI|item[A-Z]/,a=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,i=/["&<]/;function s(e){if(0===e.length||!1===i.test(e))return e;for(var t=0,r=0,o="",n="";r<e.length;r++){switch(e.charCodeAt(r)){case 34:n=""";break;case 38:n="&";break;case 60:n="<";break;default:continue}r!==t&&(o+=e.slice(t,r)),o+=n,t=r+1}return r!==t&&(o+=e.slice(t,r)),o}var l={},c=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),p=/[A-Z]/g;function u(e){var t="";for(var r in e){var o=e[r];if(null!=o&&""!==o){var n="-"==r[0]?r:l[r]||(l[r]=r.replace(p,"-$&").toLowerCase()),a=";";"number"!=typeof o||n.startsWith("--")||c.has(n)||(a="px;"),t=t+n+":"+o+a}}return t||void 0}var d,f,_,h,m=[],g=Array.isArray,v=Object.assign;function y(e,r){var o=t.options.__s;t.options.__s=!0,d=t.options.__b,f=t.options.diffed,_=t.options.__r,h=t.options.unmount;var n=t.h(t.Fragment,null);n.__k=[e];try{return w(e,r||k,!1,void 0,n)}finally{t.options.__c&&t.options.__c(e,m),t.options.__s=o,m.length=0}}function b(){this.__d=!0}var k={};function x(e,t){var r,o=e.type,n=!0;return e.__c?(n=!1,(r=e.__c).state=r.__s):r=new o(e.props,t),e.__c=r,r.__v=e,r.props=e.props,r.context=t,r.__d=!0,null==r.state&&(r.state=k),null==r.__s&&(r.__s=r.state),o.getDerivedStateFromProps?r.state=v({},r.state,o.getDerivedStateFromProps(r.props,r.state)):n&&r.componentWillMount?(r.componentWillMount(),r.state=r.__s!==r.state?r.__s:r.state):!n&&r.componentWillUpdate&&r.componentWillUpdate(),_&&_(e),r.render(r.props,r.state,t)}function w(e,i,l,c,p){if(null==e||!0===e||!1===e||""===e)return"";if("object"!=typeof e)return"function"==typeof e?"":s(e+"");if(g(e)){var m="";p.__k=e;for(var y=0;y<e.length;y++){var k=e[y];null!=k&&"boolean"!=typeof k&&(m+=w(k,i,l,c,p))}return m}if(void 0!==e.constructor)return"";e.__=p,d&&d(e);var S,A,L,T=e.type,F=e.props,D=i;if("function"==typeof T){if(T===t.Fragment){if(F.UNSTABLE_comment)return"\x3c!--"+s(F.UNSTABLE_comment||"")+"--\x3e";A=F.children}else{if(null!=(S=T.contextType)){var E=i[S.__c];D=E?E.props.value:S.__}if(T.prototype&&"function"==typeof T.prototype.render)A=x(e,D),L=e.__c;else{e.__c=L={__v:e,props:F,context:D,setState:b,forceUpdate:b,__d:!0,__h:[]};for(var Z=0;L.__d&&Z++<25;)L.__d=!1,_&&_(e),A=T.call(L,F,D);L.__d=!0}if(null!=L.getChildContext&&(i=v({},i,L.getChildContext())),(T.getDerivedStateFromError||L.componentDidCatch)&&t.options.errorBoundaries){var M="";A=null!=A&&A.type===t.Fragment&&null==A.key?A.props.children:A;try{return M=w(A,i,l,c,e)}catch(r){return T.getDerivedStateFromError&&(L.__s=T.getDerivedStateFromError(r)),L.componentDidCatch&&L.componentDidCatch(r,{}),L.__d&&(A=x(e,i),null!=(L=e.__c).getChildContext&&(i=v({},i,L.getChildContext())),M=w(A=null!=A&&A.type===t.Fragment&&null==A.key?A.props.children:A,i,l,c,e)),M}finally{f&&f(e),e.__=void 0,h&&h(e)}}}var U=w(A=null!=A&&A.type===t.Fragment&&null==A.key?A.props.children:A,i,l,c,e);return f&&f(e),e.__=void 0,h&&h(e),U}var W,$="<"+T,j="";for(var q in F){var z=F[q];switch(q){case"children":W=z;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in F)continue;q="for";break;case"className":if("class"in F)continue;q="class";break;case"defaultChecked":q="checked";break;case"defaultSelected":q="selected";break;case"defaultValue":case"value":switch(q="value",T){case"textarea":W=z;continue;case"select":c=z;continue;case"option":c!=z||"selected"in F||($+=" selected")}break;case"dangerouslySetInnerHTML":j=z&&z.__html;continue;case"style":"object"==typeof z&&(z=u(z));break;case"acceptCharset":q="accept-charset";break;case"httpEquiv":q="http-equiv";break;default:if(o.test(q))q=q.replace(o,"$1:$2").toLowerCase();else{if(r.test(q))continue;"-"!==q[4]&&"draggable"!==q||null==z?l?a.test(q)&&(q="panose1"===q?"panose-1":q.replace(/([A-Z])/g,"-$1").toLowerCase()):n.test(q)&&(q=q.toLowerCase()):z+=""}}null!=z&&!1!==z&&"function"!=typeof z&&($=!0===z||""===z?$+" "+q:$+" "+q+'="'+s(z+"")+'"')}if(r.test(T))throw new Error(T+" is not a valid HTML tag name in "+$+">");return j||("string"==typeof W?j=s(W):null!=W&&!1!==W&&!0!==W&&(j=w(W,i,"svg"===T||"foreignObject"!==T&&l,c,e))),f&&f(e),e.__=void 0,h&&h(e),!j&&C.has(T)?$+"/>":$+">"+j+"</"+T+">"}var C=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),S=y,A=y;e.default=y,e.render=S,e.renderToStaticMarkup=A,e.renderToString=y}); | ||
//# sourceMappingURL=index.umd.js.map |
@@ -1,2 +0,2 @@ | ||
var t=require("preact");if("function"!=typeof Symbol){var e=0;Symbol=function(t){return"@@"+t+ ++e},Symbol.for=function(t){return"@@"+t}}var n=/^(?:area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,r=/[\s\n\\/='"\0<>]/,o=/^(xlink|xmlns|xml)(:|[A-Z])/,i=/^accessK|^auto[A-Z]|^ch|^col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|readO|rowS|spellC|src[A-Z]|tabI|item[A-Z]/,a=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,c=/["&<]/;function l(t){if(0===t.length||!1===c.test(t))return t;for(var e=0,n=0,r="",o="";n<t.length;n++){switch(t.charCodeAt(n)){case 34:o=""";break;case 38:o="&";break;case 60:o="<";break;default:continue}n!==e&&(r+=t.slice(e,n)),r+=o,e=n+1}return n!==e&&(r+=t.slice(e,n)),r}var s=function(t,e){return String(t).replace(/(\n+)/g,"$1"+(e||"\t"))},u=function(t,e,n){return String(t).length>(e||40)||!n&&-1!==String(t).indexOf("\n")||-1!==String(t).indexOf("<")},f={},p=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),d=/[A-Z]/g;function g(t){var e="";for(var n in t){var r=t[n];if(null!=r&&""!==r){var o="-"==n[0]?n:f[n]||(f[n]=n.replace(d,"-$&").toLowerCase()),i=";";"number"!=typeof r||o.startsWith("--")||p.has(o)||(i="px;"),e=e+o+":"+r+i}}return e||void 0}function y(t,e){return Array.isArray(e)?e.reduce(y,t):null!=e&&!1!==e&&t.push(e),t}function b(){this.__d=!0}function v(t,e){return{__v:t,context:e,props:t.props,setState:b,forceUpdate:b,__d:!0,__h:[]}}var m=[],h=[];function _(e,n,r,o){var i=t.options.__s;t.options.__s=!0;try{return x(e,n||{},r,o)}finally{t.options.__c&&t.options.__c(e,h),t.options.__s=i,h.length=0}}function x(e,c,f,p,d,b){if(null==e||"boolean"==typeof e)return"";if("object"!=typeof e)return"function"==typeof e?"":l(e+"");var m=f.pretty,h=m&&"string"==typeof m?m:"\t";if(Array.isArray(e)){for(var _="",S=0;S<e.length;S++)m&&S>0&&(_+="\n"),_+=x(e[S],c,f,p,d,b);return _}if(void 0!==e.constructor)return"";t.options.__b&&t.options.__b(e);var k,w=e.type,A=e.props,O=!1;if("function"==typeof w){if(O=!0,!f.shallow||!p&&!1!==f.renderRootComponent){if(w===t.Fragment){var C=[];return y(C,e.props.children),x(C,c,f,!1!==f.shallowHighOrder,d,b)}var F,E=e.__c=v(e,c),$=t.options.__r,H=c,L=w.contextType;if(null!=L){var M=c[L.__c];H=M?M.props.value:L.__}if(w.prototype&&"function"==typeof w.prototype.render)(E=e.__c=new w(A,H)).__v=e,E._dirty=E.__d=!0,E.props=A,null==E.state&&(E.state={}),null==E._nextState&&null==E.__s&&(E._nextState=E.__s=E.state),E.context=H,w.getDerivedStateFromProps?E.state=Object.assign({},E.state,w.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),$&&$(e),F=E.render(E.props,E.state,E.context);else for(var I=0;E.__d&&I++<25;)E.__d=!1,$&&$(e),F=w.call(e.__c,A,H);E.getChildContext&&(c=Object.assign({},c,E.getChildContext()));var N=x(F,c,f,!1!==f.shallowHighOrder,d,b);return t.options.diffed&&t.options.diffed(e),N}w=(k=w).displayName||k!==Function&&k.name||j(k)}var D,W,U="<"+w;if(A){var Z=Object.keys(A);f&&!0===f.sortAttributes&&Z.sort();for(var P=0;P<Z.length;P++){var R=Z[P],T=A[R];if("children"!==R){if(!r.test(R)&&(f&&f.allAttributes||"key"!==R&&"ref"!==R&&"__self"!==R&&"__source"!==R)){if("defaultValue"===R)R="value";else if("defaultChecked"===R)R="checked";else if("defaultSelected"===R)R="selected";else if("className"===R){if(void 0!==A.class)continue;R="class"}else"acceptCharset"===R?R="accept-charset":"httpEquiv"===R?R="http-equiv":o.test(R)?R=R.replace(o,"$1:$2").toLowerCase():d?a.test(R)&&(R="panose1"===R?"panose-1":R.replace(/([A-Z])/g,"-$1").toLowerCase()):i.test(R)&&(R=R.toLowerCase());if("htmlFor"===R){if(A.for)continue;R="for"}"style"===R&&T&&"object"==typeof T&&(T=g(T)),"a"===R[0]&&"r"===R[1]&&"boolean"==typeof T&&(T=String(T));var q=f.attributeHook&&f.attributeHook(R,T,c,f,O);if(q||""===q)U+=q;else if("dangerouslySetInnerHTML"===R)W=T&&T.__html;else if("textarea"===w&&"value"===R)D=T;else if((T||0===T||""===T)&&"function"!=typeof T){if(!(!0!==T&&""!==T||(T=R,f&&f.xml))){U=U+" "+R;continue}if("value"===R){if("select"===w){b=T;continue}"option"===w&&b==T&&void 0===A.selected&&(U+=" selected")}U=U+" "+R+'="'+l(T+"")+'"'}}}else D=T}}if(m){var z=U.replace(/\n\s*/," ");z===U||~z.indexOf("\n")?m&&~U.indexOf("\n")&&(U+="\n"):U=z}if(U+=">",r.test(w))throw new Error(w+" is not a valid HTML tag name in "+U);var J,V=n.test(w)||f.voidElements&&f.voidElements.test(w),B=[];if(W)m&&u(W)&&(W="\n"+h+s(W,h)),U+=W;else if(null!=D&&y(J=[],D).length){for(var G=m&&~U.indexOf("\n"),K=!1,Q=0;Q<J.length;Q++){var X=J[Q];if(null!=X&&!1!==X){var Y=x(X,c,f,!0,"svg"===w||"foreignObject"!==w&&d,b);if(m&&!G&&u(Y)&&(G=!0),Y)if(m){var tt=Y.length>0&&"<"!=Y[0];K&&tt?B[B.length-1]+=Y:B.push(Y),K=tt}else B.push(Y)}}if(m&&G)for(var et=B.length;et--;)B[et]="\n"+h+s(B[et],h)}if(t.options.diffed&&t.options.diffed(e),B.length||W)U+=B.join("");else if(f&&f.xml)return U.substring(0,U.length-1)+" />";return!V||J||W?(m&&~U.indexOf("\n")&&(U+="\n"),U=U+"</"+w+">"):U=U.replace(/>$/," />"),U}function j(t){var e=(Function.prototype.toString.call(t).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!e){for(var n=-1,r=m.length;r--;)if(m[r]===t){n=r;break}n<0&&(n=m.push(t)-1),e="UnnamedComponent"+n}return e}var S=/(\\|\"|\')/g,k=function(t){return t.replace(S,"\\$1")},w=Object.prototype.toString,A=Date.prototype.toISOString,O=Error.prototype.toString,C=RegExp.prototype.toString,F=Symbol.prototype.toString,E=/^Symbol\((.*)\)(.*)$/,$=/\n/gi,H=Object.getOwnPropertySymbols||function(t){return[]};function L(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 M(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}function I(t){return""===t.name?"[Function anonymous]":"[Function "+t.name+"]"}function N(t){return F.call(t).replace(E,"Symbol($1)")}function D(t){return"["+O.call(t)+"]"}function W(t){if(!0===t||!1===t)return""+t;if(void 0===t)return"undefined";if(null===t)return"null";var e=typeof t;if("number"===e)return M(t);if("string"===e)return'"'+k(t)+'"';if("function"===e)return I(t);if("symbol"===e)return N(t);var n=w.call(t);return"[object WeakMap]"===n?"WeakMap {}":"[object WeakSet]"===n?"WeakSet {}":"[object Function]"===n||"[object GeneratorFunction]"===n?I(t,min):"[object Symbol]"===n?N(t):"[object Date]"===n?A.call(t):"[object Error]"===n?D(t):"[object RegExp]"===n?C.call(t):"[object Arguments]"===n&&0===t.length?"Arguments []":L(n)&&0===t.length?t.constructor.name+" []":t instanceof Error&&D(t)}function U(t,e,n,r,o,i,a,c,l,s){var u="";if(t.length){u+=o;for(var f=n+e,p=0;p<t.length;p++)u+=f+V(t[p],e,f,r,o,i,a,c,l,s),p<t.length-1&&(u+=","+r);u+=o+n}return"["+u+"]"}function Z(t,e,n,r,o,i,a,c,l,s){return(s?"":"Arguments ")+U(t,e,n,r,o,i,a,c,l,s)}function P(t,e,n,r,o,i,a,c,l,s){return(s?"":t.constructor.name+" ")+U(t,e,n,r,o,i,a,c,l,s)}function R(t,e,n,r,o,i,a,c,l,s){var u="Map {",f=t.entries(),p=f.next();if(!p.done){u+=o;for(var d=n+e;!p.done;)u+=d+V(p.value[0],e,d,r,o,i,a,c,l,s)+" => "+V(p.value[1],e,d,r,o,i,a,c,l,s),(p=f.next()).done||(u+=","+r);u+=o+n}return u+"}"}function T(t,e,n,r,o,i,a,c,l,s){var u=(s?"":t.constructor?t.constructor.name+" ":"Object ")+"{",f=Object.keys(t).sort(),p=H(t);if(p.length&&(f=f.filter(function(t){return!("symbol"==typeof t||"[object Symbol]"===w.call(t))}).concat(p)),f.length){u+=o;for(var d=n+e,g=0;g<f.length;g++){var y=f[g];u+=d+V(y,e,d,r,o,i,a,c,l,s)+": "+V(t[y],e,d,r,o,i,a,c,l,s),g<f.length-1&&(u+=","+r)}u+=o+n}return u+"}"}function q(t,e,n,r,o,i,a,c,l,s){var u="Set {",f=t.entries(),p=f.next();if(!p.done){u+=o;for(var d=n+e;!p.done;)u+=d+V(p.value[1],e,d,r,o,i,a,c,l,s),(p=f.next()).done||(u+=","+r);u+=o+n}return u+"}"}function z(t,e,n,r,o,i,a,c,l,s){if((i=i.slice()).indexOf(t)>-1)return"[Circular]";i.push(t);var u=++c>a;if(!u&&t.toJSON&&"function"==typeof t.toJSON)return V(t.toJSON(),e,n,r,o,i,a,c,l,s);var f=w.call(t);return"[object Arguments]"===f?u?"[Arguments]":Z(t,e,n,r,o,i,a,c,l,s):L(f)?u?"[Array]":P(t,e,n,r,o,i,a,c,l,s):"[object Map]"===f?u?"[Map]":R(t,e,n,r,o,i,a,c,l,s):"[object Set]"===f?u?"[Set]":q(t,e,n,r,o,i,a,c,l,s):"object"==typeof t?u?"[Object]":T(t,e,n,r,o,i,a,c,l,s):void 0}function J(t,e,n,r,o,i,a,c,l,s){for(var u,f=!1,p=0;p<l.length;p++)if((u=l[p]).test(t)){f=!0;break}return!!f&&u.print(t,function(t){return V(t,e,n,r,o,i,a,c,l,s)},function(t){var r=n+e;return r+t.replace($,"\n"+r)},{edgeSpacing:o,spacing:r})}function V(t,e,n,r,o,i,a,c,l,s){return W(t)||J(t,e,n,r,o,i,a,c,l,s)||z(t,e,n,r,o,i,a,c,l,s)}var B={indent:2,min:!1,maxDepth:Infinity,plugins:[]};function G(t){if(Object.keys(t).forEach(function(t){if(!B.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")}function K(t){var e={};return Object.keys(B).forEach(function(n){return e[n]=t.hasOwnProperty(n)?t[n]:B[n]}),e.min&&(e.indent=0),e}function Q(t){return new Array(t+1).join(" ")}var X=function(t,e){var n,r;e?(G(e),e=K(e)):e=B;var o=e.min?" ":"\n",i=e.min?"":"\n";if(e&&e.plugins.length){var a=J(t,n=Q(e.indent),"",o,i,r=[],e.maxDepth,0,e.plugins,e.min);if(a)return a}return W(t)||(n||(n=Q(e.indent)),r||(r=[]),z(t,n,"",o,i,r,e.maxDepth,0,e.plugins,e.min))},Y={test:function(t){return t&&"object"==typeof t&&"type"in t&&"props"in t&&"key"in t},print:function(t,e,n){return _(t,Y.context,Y.opts,!0)}},tt={plugins:[Y]},et={attributeHook:function(t,e,n,r,o){var i=typeof e;if("dangerouslySetInnerHTML"===t)return!1;if(null==e||"function"===i&&!r.functions)return"";if(r.skipFalseAttributes&&!o&&(!1===e||("class"===t||"style"===t)&&""===e))return"";var a="string"==typeof r.pretty?r.pretty:"\t";return"string"!==i?("function"!==i||r.functionNames?(Y.context=n,Y.opts=r,~(e=X(e,tt)).indexOf("\n")&&(e=s("\n"+e,a)+"\n")):e="Function",s("\n"+t+"={"+e+"}",a)):"\n"+a+t+'="'+l(e)+'"'},jsx:!0,xml:!1,functions:!0,functionNames:!0,skipFalseAttributes:!0,pretty:" "};function nt(t,e,n){var r=Object.assign({},et,n||{});return r.jsx||(r.attributeHook=null),_(t,e,r)}var rt={shallow:!0};exports.default=nt,exports.render=nt,exports.shallowRender=function(t,e,n){return nt(t,e,Object.assign({},rt,n||{}))}; | ||
var t=require("preact");if("function"!=typeof Symbol){var e=0;Symbol=function(t){return"@@"+t+ ++e},Symbol.for=function(t){return"@@"+t}}var n=/^(?:area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,r=/[\s\n\\/='"\0<>]/,o=/^(xlink|xmlns|xml)([A-Z])/,i=/^accessK|^auto[A-Z]|^ch|^col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|readO|rowS|spellC|src[A-Z]|tabI|item[A-Z]/,a=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,c=/["&<]/;function l(t){if(0===t.length||!1===c.test(t))return t;for(var e=0,n=0,r="",o="";n<t.length;n++){switch(t.charCodeAt(n)){case 34:o=""";break;case 38:o="&";break;case 60:o="<";break;default:continue}n!==e&&(r+=t.slice(e,n)),r+=o,e=n+1}return n!==e&&(r+=t.slice(e,n)),r}var s=function(t,e){return String(t).replace(/(\n+)/g,"$1"+(e||"\t"))},u=function(t,e,n){return String(t).length>(e||40)||!n&&-1!==String(t).indexOf("\n")||-1!==String(t).indexOf("<")},f={},p=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),d=/[A-Z]/g;function g(t){var e="";for(var n in t){var r=t[n];if(null!=r&&""!==r){var o="-"==n[0]?n:f[n]||(f[n]=n.replace(d,"-$&").toLowerCase()),i=";";"number"!=typeof r||o.startsWith("--")||p.has(o)||(i="px;"),e=e+o+":"+r+i}}return e||void 0}function y(t,e){return Array.isArray(e)?e.reduce(y,t):null!=e&&!1!==e&&t.push(e),t}function b(){this.__d=!0}function v(t,e){return{__v:t,context:e,props:t.props,setState:b,forceUpdate:b,__d:!0,__h:[]}}var m=[],h=[];function _(e,n,r,o){var i=t.options.__s;t.options.__s=!0;try{return x(e,n||{},r,o)}finally{t.options.__c&&t.options.__c(e,h),t.options.__s=i,h.length=0}}function x(e,c,f,p,d,b){if(null==e||"boolean"==typeof e)return"";if("object"!=typeof e)return"function"==typeof e?"":l(e+"");var m=f.pretty,h=m&&"string"==typeof m?m:"\t";if(Array.isArray(e)){for(var _="",S=0;S<e.length;S++)m&&S>0&&(_+="\n"),_+=x(e[S],c,f,p,d,b);return _}if(void 0!==e.constructor)return"";t.options.__b&&t.options.__b(e);var k,w=e.type,A=e.props,O=!1;if("function"==typeof w){if(O=!0,!f.shallow||!p&&!1!==f.renderRootComponent){if(w===t.Fragment){var C=[];return y(C,e.props.children),x(C,c,f,!1!==f.shallowHighOrder,d,b)}var F,E=e.__c=v(e,c),$=t.options.__r,H=c,L=w.contextType;if(null!=L){var M=c[L.__c];H=M?M.props.value:L.__}if(w.prototype&&"function"==typeof w.prototype.render)(E=e.__c=new w(A,H)).__v=e,E._dirty=E.__d=!0,E.props=A,null==E.state&&(E.state={}),null==E._nextState&&null==E.__s&&(E._nextState=E.__s=E.state),E.context=H,w.getDerivedStateFromProps?E.state=Object.assign({},E.state,w.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),$&&$(e),F=E.render(E.props,E.state,E.context);else for(var I=0;E.__d&&I++<25;)E.__d=!1,$&&$(e),F=w.call(e.__c,A,H);E.getChildContext&&(c=Object.assign({},c,E.getChildContext()));var N=x(F,c,f,!1!==f.shallowHighOrder,d,b);return t.options.diffed&&t.options.diffed(e),N}w=(k=w).displayName||k!==Function&&k.name||j(k)}var D,W,U="<"+w;if(A){var Z=Object.keys(A);f&&!0===f.sortAttributes&&Z.sort();for(var P=0;P<Z.length;P++){var R=Z[P],T=A[R];if("children"!==R){if(!r.test(R)&&(f&&f.allAttributes||"key"!==R&&"ref"!==R&&"__self"!==R&&"__source"!==R)){if("defaultValue"===R)R="value";else if("defaultChecked"===R)R="checked";else if("defaultSelected"===R)R="selected";else if("className"===R){if(void 0!==A.class)continue;R="class"}else"acceptCharset"===R?R="accept-charset":"httpEquiv"===R?R="http-equiv":o.test(R)?R=R.replace(o,"$1:$2").toLowerCase():d?a.test(R)&&(R="panose1"===R?"panose-1":R.replace(/([A-Z])/g,"-$1").toLowerCase()):i.test(R)&&(R=R.toLowerCase());if("htmlFor"===R){if(A.for)continue;R="for"}"style"===R&&T&&"object"==typeof T&&(T=g(T)),"a"===R[0]&&"r"===R[1]&&"boolean"==typeof T&&(T=String(T));var q=f.attributeHook&&f.attributeHook(R,T,c,f,O);if(q||""===q)U+=q;else if("dangerouslySetInnerHTML"===R)W=T&&T.__html;else if("textarea"===w&&"value"===R)D=T;else if((T||0===T||""===T)&&"function"!=typeof T){if(!(!0!==T&&""!==T||(T=R,f&&f.xml))){U=U+" "+R;continue}if("value"===R){if("select"===w){b=T;continue}"option"===w&&b==T&&void 0===A.selected&&(U+=" selected")}U=U+" "+R+'="'+l(T+"")+'"'}}}else D=T}}if(m){var z=U.replace(/\n\s*/," ");z===U||~z.indexOf("\n")?m&&~U.indexOf("\n")&&(U+="\n"):U=z}if(U+=">",r.test(w))throw new Error(w+" is not a valid HTML tag name in "+U);var J,V=n.test(w)||f.voidElements&&f.voidElements.test(w),B=[];if(W)m&&u(W)&&(W="\n"+h+s(W,h)),U+=W;else if(null!=D&&y(J=[],D).length){for(var G=m&&~U.indexOf("\n"),K=!1,Q=0;Q<J.length;Q++){var X=J[Q];if(null!=X&&!1!==X){var Y=x(X,c,f,!0,"svg"===w||"foreignObject"!==w&&d,b);if(m&&!G&&u(Y)&&(G=!0),Y)if(m){var tt=Y.length>0&&"<"!=Y[0];K&&tt?B[B.length-1]+=Y:B.push(Y),K=tt}else B.push(Y)}}if(m&&G)for(var et=B.length;et--;)B[et]="\n"+h+s(B[et],h)}if(t.options.diffed&&t.options.diffed(e),B.length||W)U+=B.join("");else if(f&&f.xml)return U.substring(0,U.length-1)+" />";return!V||J||W?(m&&~U.indexOf("\n")&&(U+="\n"),U=U+"</"+w+">"):U=U.replace(/>$/," />"),U}function j(t){var e=(Function.prototype.toString.call(t).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!e){for(var n=-1,r=m.length;r--;)if(m[r]===t){n=r;break}n<0&&(n=m.push(t)-1),e="UnnamedComponent"+n}return e}var S=/(\\|\"|\')/g,k=function(t){return t.replace(S,"\\$1")},w=Object.prototype.toString,A=Date.prototype.toISOString,O=Error.prototype.toString,C=RegExp.prototype.toString,F=Symbol.prototype.toString,E=/^Symbol\((.*)\)(.*)$/,$=/\n/gi,H=Object.getOwnPropertySymbols||function(t){return[]};function L(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 M(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}function I(t){return""===t.name?"[Function anonymous]":"[Function "+t.name+"]"}function N(t){return F.call(t).replace(E,"Symbol($1)")}function D(t){return"["+O.call(t)+"]"}function W(t){if(!0===t||!1===t)return""+t;if(void 0===t)return"undefined";if(null===t)return"null";var e=typeof t;if("number"===e)return M(t);if("string"===e)return'"'+k(t)+'"';if("function"===e)return I(t);if("symbol"===e)return N(t);var n=w.call(t);return"[object WeakMap]"===n?"WeakMap {}":"[object WeakSet]"===n?"WeakSet {}":"[object Function]"===n||"[object GeneratorFunction]"===n?I(t,min):"[object Symbol]"===n?N(t):"[object Date]"===n?A.call(t):"[object Error]"===n?D(t):"[object RegExp]"===n?C.call(t):"[object Arguments]"===n&&0===t.length?"Arguments []":L(n)&&0===t.length?t.constructor.name+" []":t instanceof Error&&D(t)}function U(t,e,n,r,o,i,a,c,l,s){var u="";if(t.length){u+=o;for(var f=n+e,p=0;p<t.length;p++)u+=f+V(t[p],e,f,r,o,i,a,c,l,s),p<t.length-1&&(u+=","+r);u+=o+n}return"["+u+"]"}function Z(t,e,n,r,o,i,a,c,l,s){return(s?"":"Arguments ")+U(t,e,n,r,o,i,a,c,l,s)}function P(t,e,n,r,o,i,a,c,l,s){return(s?"":t.constructor.name+" ")+U(t,e,n,r,o,i,a,c,l,s)}function R(t,e,n,r,o,i,a,c,l,s){var u="Map {",f=t.entries(),p=f.next();if(!p.done){u+=o;for(var d=n+e;!p.done;)u+=d+V(p.value[0],e,d,r,o,i,a,c,l,s)+" => "+V(p.value[1],e,d,r,o,i,a,c,l,s),(p=f.next()).done||(u+=","+r);u+=o+n}return u+"}"}function T(t,e,n,r,o,i,a,c,l,s){var u=(s?"":t.constructor?t.constructor.name+" ":"Object ")+"{",f=Object.keys(t).sort(),p=H(t);if(p.length&&(f=f.filter(function(t){return!("symbol"==typeof t||"[object Symbol]"===w.call(t))}).concat(p)),f.length){u+=o;for(var d=n+e,g=0;g<f.length;g++){var y=f[g];u+=d+V(y,e,d,r,o,i,a,c,l,s)+": "+V(t[y],e,d,r,o,i,a,c,l,s),g<f.length-1&&(u+=","+r)}u+=o+n}return u+"}"}function q(t,e,n,r,o,i,a,c,l,s){var u="Set {",f=t.entries(),p=f.next();if(!p.done){u+=o;for(var d=n+e;!p.done;)u+=d+V(p.value[1],e,d,r,o,i,a,c,l,s),(p=f.next()).done||(u+=","+r);u+=o+n}return u+"}"}function z(t,e,n,r,o,i,a,c,l,s){if((i=i.slice()).indexOf(t)>-1)return"[Circular]";i.push(t);var u=++c>a;if(!u&&t.toJSON&&"function"==typeof t.toJSON)return V(t.toJSON(),e,n,r,o,i,a,c,l,s);var f=w.call(t);return"[object Arguments]"===f?u?"[Arguments]":Z(t,e,n,r,o,i,a,c,l,s):L(f)?u?"[Array]":P(t,e,n,r,o,i,a,c,l,s):"[object Map]"===f?u?"[Map]":R(t,e,n,r,o,i,a,c,l,s):"[object Set]"===f?u?"[Set]":q(t,e,n,r,o,i,a,c,l,s):"object"==typeof t?u?"[Object]":T(t,e,n,r,o,i,a,c,l,s):void 0}function J(t,e,n,r,o,i,a,c,l,s){for(var u,f=!1,p=0;p<l.length;p++)if((u=l[p]).test(t)){f=!0;break}return!!f&&u.print(t,function(t){return V(t,e,n,r,o,i,a,c,l,s)},function(t){var r=n+e;return r+t.replace($,"\n"+r)},{edgeSpacing:o,spacing:r})}function V(t,e,n,r,o,i,a,c,l,s){return W(t)||J(t,e,n,r,o,i,a,c,l,s)||z(t,e,n,r,o,i,a,c,l,s)}var B={indent:2,min:!1,maxDepth:Infinity,plugins:[]};function G(t){if(Object.keys(t).forEach(function(t){if(!B.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")}function K(t){var e={};return Object.keys(B).forEach(function(n){return e[n]=t.hasOwnProperty(n)?t[n]:B[n]}),e.min&&(e.indent=0),e}function Q(t){return new Array(t+1).join(" ")}var X=function(t,e){var n,r;e?(G(e),e=K(e)):e=B;var o=e.min?" ":"\n",i=e.min?"":"\n";if(e&&e.plugins.length){var a=J(t,n=Q(e.indent),"",o,i,r=[],e.maxDepth,0,e.plugins,e.min);if(a)return a}return W(t)||(n||(n=Q(e.indent)),r||(r=[]),z(t,n,"",o,i,r,e.maxDepth,0,e.plugins,e.min))},Y={test:function(t){return t&&"object"==typeof t&&"type"in t&&"props"in t&&"key"in t},print:function(t,e,n){return _(t,Y.context,Y.opts,!0)}},tt={plugins:[Y]},et={attributeHook:function(t,e,n,r,o){var i=typeof e;if("dangerouslySetInnerHTML"===t)return!1;if(null==e||"function"===i&&!r.functions)return"";if(r.skipFalseAttributes&&!o&&(!1===e||("class"===t||"style"===t)&&""===e))return"";var a="string"==typeof r.pretty?r.pretty:"\t";return"string"!==i?("function"!==i||r.functionNames?(Y.context=n,Y.opts=r,~(e=X(e,tt)).indexOf("\n")&&(e=s("\n"+e,a)+"\n")):e="Function",s("\n"+t+"={"+e+"}",a)):"\n"+a+t+'="'+l(e)+'"'},jsx:!0,xml:!1,functions:!0,functionNames:!0,skipFalseAttributes:!0,pretty:" "};function nt(t,e,n){var r=Object.assign({},et,n||{});return r.jsx||(r.attributeHook=null),_(t,e,r)}var rt={shallow:!0};exports.default=nt,exports.render=nt,exports.shallowRender=function(t,e,n){return nt(t,e,Object.assign({},rt,n||{}))}; | ||
//# sourceMappingURL=jsx.js.map |
@@ -1,2 +0,2 @@ | ||
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=/^(?:area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,o=/[\s\n\\/='"\0<>]/,i=/^(xlink|xmlns|xml)(:|[A-Z])/,a=/^accessK|^auto[A-Z]|^ch|^col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|readO|rowS|spellC|src[A-Z]|tabI|item[A-Z]/,c=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,l=/["&<]/;function s(t){if(0===t.length||!1===l.test(t))return t;for(var e=0,n=0,r="",o="";n<t.length;n++){switch(t.charCodeAt(n)){case 34:o=""";break;case 38:o="&";break;case 60:o="<";break;default:continue}n!==e&&(r+=t.slice(e,n)),r+=o,e=n+1}return n!==e&&(r+=t.slice(e,n)),r}var u=function(t,e){return String(t).replace(/(\n+)/g,"$1"+(e||"\t"))},f=function(t,e,n){return String(t).length>(e||40)||!n&&-1!==String(t).indexOf("\n")||-1!==String(t).indexOf("<")},p={},d=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),g=/[A-Z]/g;function y(t){var e="";for(var n in t){var r=t[n];if(null!=r&&""!==r){var o="-"==n[0]?n:p[n]||(p[n]=n.replace(g,"-$&").toLowerCase()),i=";";"number"!=typeof r||o.startsWith("--")||d.has(o)||(i="px;"),e=e+o+":"+r+i}}return e||void 0}function b(t,e){return Array.isArray(e)?e.reduce(b,t):null!=e&&!1!==e&&t.push(e),t}function m(){this.__d=!0}function h(t,e){return{__v:t,context:e,props:t.props,setState:m,forceUpdate:m,__d:!0,__h:[]}}var v=[],_=[];function x(e,n,r,o){var i=t.__s;t.__s=!0;try{return j(e,n||{},r,o)}finally{t.__c&&t.__c(e,_),t.__s=i,_.length=0}}function j(n,l,p,d,g,m){if(null==n||"boolean"==typeof n)return"";if("object"!=typeof n)return"function"==typeof n?"":s(n+"");var v=p.pretty,_=v&&"string"==typeof v?v:"\t";if(Array.isArray(n)){for(var x="",k=0;k<n.length;k++)v&&k>0&&(x+="\n"),x+=j(n[k],l,p,d,g,m);return x}if(void 0!==n.constructor)return"";t.__b&&t.__b(n);var A,w=n.type,O=n.props,C=!1;if("function"==typeof w){if(C=!0,!p.shallow||!d&&!1!==p.renderRootComponent){if(w===e){var F=[];return b(F,n.props.children),j(F,l,p,!1!==p.shallowHighOrder,g,m)}var E,$=n.__c=h(n,l),H=t.__r,L=l,M=w.contextType;if(null!=M){var I=l[M.__c];L=I?I.props.value:M.__}if(w.prototype&&"function"==typeof w.prototype.render)($=n.__c=new w(O,L)).__v=n,$._dirty=$.__d=!0,$.props=O,null==$.state&&($.state={}),null==$._nextState&&null==$.__s&&($._nextState=$.__s=$.state),$.context=L,w.getDerivedStateFromProps?$.state=Object.assign({},$.state,w.getDerivedStateFromProps($.props,$.state)):$.componentWillMount&&($.componentWillMount(),$.state=$._nextState!==$.state?$._nextState:$.__s!==$.state?$.__s:$.state),H&&H(n),E=$.render($.props,$.state,$.context);else for(var N=0;$.__d&&N++<25;)$.__d=!1,H&&H(n),E=w.call(n.__c,O,L);$.getChildContext&&(l=Object.assign({},l,$.getChildContext()));var D=j(E,l,p,!1!==p.shallowHighOrder,g,m);return t.diffed&&t.diffed(n),D}w=(A=w).displayName||A!==Function&&A.name||S(A)}var W,U,Z="<"+w;if(O){var P=Object.keys(O);p&&!0===p.sortAttributes&&P.sort();for(var T=0;T<P.length;T++){var R=P[T],z=O[R];if("children"!==R){if(!o.test(R)&&(p&&p.allAttributes||"key"!==R&&"ref"!==R&&"__self"!==R&&"__source"!==R)){if("defaultValue"===R)R="value";else if("defaultChecked"===R)R="checked";else if("defaultSelected"===R)R="selected";else if("className"===R){if(void 0!==O.class)continue;R="class"}else"acceptCharset"===R?R="accept-charset":"httpEquiv"===R?R="http-equiv":i.test(R)?R=R.replace(i,"$1:$2").toLowerCase():g?c.test(R)&&(R="panose1"===R?"panose-1":R.replace(/([A-Z])/g,"-$1").toLowerCase()):a.test(R)&&(R=R.toLowerCase());if("htmlFor"===R){if(O.for)continue;R="for"}"style"===R&&z&&"object"==typeof z&&(z=y(z)),"a"===R[0]&&"r"===R[1]&&"boolean"==typeof z&&(z=String(z));var q=p.attributeHook&&p.attributeHook(R,z,l,p,C);if(q||""===q)Z+=q;else if("dangerouslySetInnerHTML"===R)U=z&&z.__html;else if("textarea"===w&&"value"===R)W=z;else if((z||0===z||""===z)&&"function"!=typeof z){if(!(!0!==z&&""!==z||(z=R,p&&p.xml))){Z=Z+" "+R;continue}if("value"===R){if("select"===w){m=z;continue}"option"===w&&m==z&&void 0===O.selected&&(Z+=" selected")}Z=Z+" "+R+'="'+s(z+"")+'"'}}}else W=z}}if(v){var J=Z.replace(/\n\s*/," ");J===Z||~J.indexOf("\n")?v&&~Z.indexOf("\n")&&(Z+="\n"):Z=J}if(Z+=">",o.test(w))throw new Error(w+" is not a valid HTML tag name in "+Z);var V,B=r.test(w)||p.voidElements&&p.voidElements.test(w),G=[];if(U)v&&f(U)&&(U="\n"+_+u(U,_)),Z+=U;else if(null!=W&&b(V=[],W).length){for(var K=v&&~Z.indexOf("\n"),Q=!1,X=0;X<V.length;X++){var Y=V[X];if(null!=Y&&!1!==Y){var tt=j(Y,l,p,!0,"svg"===w||"foreignObject"!==w&&g,m);if(v&&!K&&f(tt)&&(K=!0),tt)if(v){var et=tt.length>0&&"<"!=tt[0];Q&&et?G[G.length-1]+=tt:G.push(tt),Q=et}else G.push(tt)}}if(v&&K)for(var nt=G.length;nt--;)G[nt]="\n"+_+u(G[nt],_)}if(t.diffed&&t.diffed(n),G.length||U)Z+=G.join("");else if(p&&p.xml)return Z.substring(0,Z.length-1)+" />";return!B||V||U?(v&&~Z.indexOf("\n")&&(Z+="\n"),Z=Z+"</"+w+">"):Z=Z.replace(/>$/," />"),Z}function S(t){var e=(Function.prototype.toString.call(t).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!e){for(var n=-1,r=v.length;r--;)if(v[r]===t){n=r;break}n<0&&(n=v.push(t)-1),e="UnnamedComponent"+n}return e}const k=/(\\|\"|\')/g;var A=function(t){return t.replace(k,"\\$1")};const w=Object.prototype.toString,O=Date.prototype.toISOString,C=Error.prototype.toString,F=RegExp.prototype.toString,E=Symbol.prototype.toString,$=/^Symbol\((.*)\)(.*)$/,H=/\n/gi,L=Object.getOwnPropertySymbols||(t=>[]);function M(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 I(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}function N(t){return""===t.name?"[Function anonymous]":"[Function "+t.name+"]"}function D(t){return E.call(t).replace($,"Symbol($1)")}function W(t){return"["+C.call(t)+"]"}function U(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 I(t);if("string"===e)return'"'+A(t)+'"';if("function"===e)return N(t);if("symbol"===e)return D(t);const n=w.call(t);return"[object WeakMap]"===n?"WeakMap {}":"[object WeakSet]"===n?"WeakSet {}":"[object Function]"===n||"[object GeneratorFunction]"===n?N(t,min):"[object Symbol]"===n?D(t):"[object Date]"===n?O.call(t):"[object Error]"===n?W(t):"[object RegExp]"===n?F.call(t):"[object Arguments]"===n&&0===t.length?"Arguments []":M(n)&&0===t.length?t.constructor.name+" []":t instanceof Error&&W(t)}function Z(t,e,n,r,o,i,a,c,l,s){let u="";if(t.length){u+=o;const f=n+e;for(let n=0;n<t.length;n++)u+=f+B(t[n],e,f,r,o,i,a,c,l,s),n<t.length-1&&(u+=","+r);u+=o+n}return"["+u+"]"}function P(t,e,n,r,o,i,a,c,l,s){return(s?"":"Arguments ")+Z(t,e,n,r,o,i,a,c,l,s)}function T(t,e,n,r,o,i,a,c,l,s){return(s?"":t.constructor.name+" ")+Z(t,e,n,r,o,i,a,c,l,s)}function R(t,e,n,r,o,i,a,c,l,s){let u="Map {";const f=t.entries();let p=f.next();if(!p.done){u+=o;const t=n+e;for(;!p.done;)u+=t+B(p.value[0],e,t,r,o,i,a,c,l,s)+" => "+B(p.value[1],e,t,r,o,i,a,c,l,s),p=f.next(),p.done||(u+=","+r);u+=o+n}return u+"}"}function z(t,e,n,r,o,i,a,c,l,s){let u=(s?"":t.constructor?t.constructor.name+" ":"Object ")+"{",f=Object.keys(t).sort();const p=L(t);if(p.length&&(f=f.filter(t=>!("symbol"==typeof t||"[object Symbol]"===w.call(t))).concat(p)),f.length){u+=o;const p=n+e;for(let n=0;n<f.length;n++){const d=f[n];u+=p+B(d,e,p,r,o,i,a,c,l,s)+": "+B(t[d],e,p,r,o,i,a,c,l,s),n<f.length-1&&(u+=","+r)}u+=o+n}return u+"}"}function q(t,e,n,r,o,i,a,c,l,s){let u="Set {";const f=t.entries();let p=f.next();if(!p.done){u+=o;const t=n+e;for(;!p.done;)u+=t+B(p.value[1],e,t,r,o,i,a,c,l,s),p=f.next(),p.done||(u+=","+r);u+=o+n}return u+"}"}function J(t,e,n,r,o,i,a,c,l,s){if((i=i.slice()).indexOf(t)>-1)return"[Circular]";i.push(t);const u=++c>a;if(!u&&t.toJSON&&"function"==typeof t.toJSON)return B(t.toJSON(),e,n,r,o,i,a,c,l,s);const f=w.call(t);return"[object Arguments]"===f?u?"[Arguments]":P(t,e,n,r,o,i,a,c,l,s):M(f)?u?"[Array]":T(t,e,n,r,o,i,a,c,l,s):"[object Map]"===f?u?"[Map]":R(t,e,n,r,o,i,a,c,l,s):"[object Set]"===f?u?"[Set]":q(t,e,n,r,o,i,a,c,l,s):"object"==typeof t?u?"[Object]":z(t,e,n,r,o,i,a,c,l,s):void 0}function V(t,e,n,r,o,i,a,c,l,s){let u,f=!1;for(let e=0;e<l.length;e++)if(u=l[e],u.test(t)){f=!0;break}return!!f&&u.print(t,function(t){return B(t,e,n,r,o,i,a,c,l,s)},function(t){const r=n+e;return r+t.replace(H,"\n"+r)},{edgeSpacing:o,spacing:r})}function B(t,e,n,r,o,i,a,c,l,s){return U(t)||V(t,e,n,r,o,i,a,c,l,s)||J(t,e,n,r,o,i,a,c,l,s)}const G={indent:2,min:!1,maxDepth:Infinity,plugins:[]};function K(t){if(Object.keys(t).forEach(t=>{if(!G.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")}function Q(t){const e={};return Object.keys(G).forEach(n=>e[n]=t.hasOwnProperty(n)?t[n]:G[n]),e.min&&(e.indent=0),e}function X(t){return new Array(t+1).join(" ")}var Y=function(t,e){let n,r;e?(K(e),e=Q(e)):e=G;const o=e.min?" ":"\n",i=e.min?"":"\n";if(e&&e.plugins.length){n=X(e.indent),r=[];var a=V(t,n,"",o,i,r,e.maxDepth,0,e.plugins,e.min);if(a)return a}return U(t)||(n||(n=X(e.indent)),r||(r=[]),J(t,n,"",o,i,r,e.maxDepth,0,e.plugins,e.min))},tt={test:function(t){return t&&"object"==typeof t&&"type"in t&&"props"in t&&"key"in t},print:function(t,e,n){return x(t,tt.context,tt.opts,!0)}},et={plugins:[tt]},nt={attributeHook:function(t,e,n,r,o){var i=typeof e;if("dangerouslySetInnerHTML"===t)return!1;if(null==e||"function"===i&&!r.functions)return"";if(r.skipFalseAttributes&&!o&&(!1===e||("class"===t||"style"===t)&&""===e))return"";var a="string"==typeof r.pretty?r.pretty:"\t";return"string"!==i?("function"!==i||r.functionNames?(tt.context=n,tt.opts=r,~(e=Y(e,et)).indexOf("\n")&&(e=u("\n"+e,a)+"\n")):e="Function",u("\n"+t+"={"+e+"}",a)):"\n"+a+t+'="'+s(e)+'"'},jsx:!0,xml:!1,functions:!0,functionNames:!0,skipFalseAttributes:!0,pretty:" "};function rt(t,e,n){var r=Object.assign({},nt,n||{});return r.jsx||(r.attributeHook=null),x(t,e,r)}var ot={shallow:!0};function it(t,e,n){return rt(t,e,Object.assign({},ot,n||{}))}export default rt;export{rt as render,it as shallowRender}; | ||
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=/^(?:area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,o=/[\s\n\\/='"\0<>]/,i=/^(xlink|xmlns|xml)([A-Z])/,a=/^accessK|^auto[A-Z]|^ch|^col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|readO|rowS|spellC|src[A-Z]|tabI|item[A-Z]/,c=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,l=/["&<]/;function s(t){if(0===t.length||!1===l.test(t))return t;for(var e=0,n=0,r="",o="";n<t.length;n++){switch(t.charCodeAt(n)){case 34:o=""";break;case 38:o="&";break;case 60:o="<";break;default:continue}n!==e&&(r+=t.slice(e,n)),r+=o,e=n+1}return n!==e&&(r+=t.slice(e,n)),r}var u=function(t,e){return String(t).replace(/(\n+)/g,"$1"+(e||"\t"))},f=function(t,e,n){return String(t).length>(e||40)||!n&&-1!==String(t).indexOf("\n")||-1!==String(t).indexOf("<")},p={},d=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),g=/[A-Z]/g;function y(t){var e="";for(var n in t){var r=t[n];if(null!=r&&""!==r){var o="-"==n[0]?n:p[n]||(p[n]=n.replace(g,"-$&").toLowerCase()),i=";";"number"!=typeof r||o.startsWith("--")||d.has(o)||(i="px;"),e=e+o+":"+r+i}}return e||void 0}function b(t,e){return Array.isArray(e)?e.reduce(b,t):null!=e&&!1!==e&&t.push(e),t}function m(){this.__d=!0}function h(t,e){return{__v:t,context:e,props:t.props,setState:m,forceUpdate:m,__d:!0,__h:[]}}var v=[],_=[];function x(e,n,r,o){var i=t.__s;t.__s=!0;try{return j(e,n||{},r,o)}finally{t.__c&&t.__c(e,_),t.__s=i,_.length=0}}function j(n,l,p,d,g,m){if(null==n||"boolean"==typeof n)return"";if("object"!=typeof n)return"function"==typeof n?"":s(n+"");var v=p.pretty,_=v&&"string"==typeof v?v:"\t";if(Array.isArray(n)){for(var x="",k=0;k<n.length;k++)v&&k>0&&(x+="\n"),x+=j(n[k],l,p,d,g,m);return x}if(void 0!==n.constructor)return"";t.__b&&t.__b(n);var A,w=n.type,O=n.props,C=!1;if("function"==typeof w){if(C=!0,!p.shallow||!d&&!1!==p.renderRootComponent){if(w===e){var F=[];return b(F,n.props.children),j(F,l,p,!1!==p.shallowHighOrder,g,m)}var E,$=n.__c=h(n,l),H=t.__r,L=l,M=w.contextType;if(null!=M){var I=l[M.__c];L=I?I.props.value:M.__}if(w.prototype&&"function"==typeof w.prototype.render)($=n.__c=new w(O,L)).__v=n,$._dirty=$.__d=!0,$.props=O,null==$.state&&($.state={}),null==$._nextState&&null==$.__s&&($._nextState=$.__s=$.state),$.context=L,w.getDerivedStateFromProps?$.state=Object.assign({},$.state,w.getDerivedStateFromProps($.props,$.state)):$.componentWillMount&&($.componentWillMount(),$.state=$._nextState!==$.state?$._nextState:$.__s!==$.state?$.__s:$.state),H&&H(n),E=$.render($.props,$.state,$.context);else for(var N=0;$.__d&&N++<25;)$.__d=!1,H&&H(n),E=w.call(n.__c,O,L);$.getChildContext&&(l=Object.assign({},l,$.getChildContext()));var D=j(E,l,p,!1!==p.shallowHighOrder,g,m);return t.diffed&&t.diffed(n),D}w=(A=w).displayName||A!==Function&&A.name||S(A)}var W,U,Z="<"+w;if(O){var P=Object.keys(O);p&&!0===p.sortAttributes&&P.sort();for(var T=0;T<P.length;T++){var R=P[T],z=O[R];if("children"!==R){if(!o.test(R)&&(p&&p.allAttributes||"key"!==R&&"ref"!==R&&"__self"!==R&&"__source"!==R)){if("defaultValue"===R)R="value";else if("defaultChecked"===R)R="checked";else if("defaultSelected"===R)R="selected";else if("className"===R){if(void 0!==O.class)continue;R="class"}else"acceptCharset"===R?R="accept-charset":"httpEquiv"===R?R="http-equiv":i.test(R)?R=R.replace(i,"$1:$2").toLowerCase():g?c.test(R)&&(R="panose1"===R?"panose-1":R.replace(/([A-Z])/g,"-$1").toLowerCase()):a.test(R)&&(R=R.toLowerCase());if("htmlFor"===R){if(O.for)continue;R="for"}"style"===R&&z&&"object"==typeof z&&(z=y(z)),"a"===R[0]&&"r"===R[1]&&"boolean"==typeof z&&(z=String(z));var q=p.attributeHook&&p.attributeHook(R,z,l,p,C);if(q||""===q)Z+=q;else if("dangerouslySetInnerHTML"===R)U=z&&z.__html;else if("textarea"===w&&"value"===R)W=z;else if((z||0===z||""===z)&&"function"!=typeof z){if(!(!0!==z&&""!==z||(z=R,p&&p.xml))){Z=Z+" "+R;continue}if("value"===R){if("select"===w){m=z;continue}"option"===w&&m==z&&void 0===O.selected&&(Z+=" selected")}Z=Z+" "+R+'="'+s(z+"")+'"'}}}else W=z}}if(v){var J=Z.replace(/\n\s*/," ");J===Z||~J.indexOf("\n")?v&&~Z.indexOf("\n")&&(Z+="\n"):Z=J}if(Z+=">",o.test(w))throw new Error(w+" is not a valid HTML tag name in "+Z);var V,B=r.test(w)||p.voidElements&&p.voidElements.test(w),G=[];if(U)v&&f(U)&&(U="\n"+_+u(U,_)),Z+=U;else if(null!=W&&b(V=[],W).length){for(var K=v&&~Z.indexOf("\n"),Q=!1,X=0;X<V.length;X++){var Y=V[X];if(null!=Y&&!1!==Y){var tt=j(Y,l,p,!0,"svg"===w||"foreignObject"!==w&&g,m);if(v&&!K&&f(tt)&&(K=!0),tt)if(v){var et=tt.length>0&&"<"!=tt[0];Q&&et?G[G.length-1]+=tt:G.push(tt),Q=et}else G.push(tt)}}if(v&&K)for(var nt=G.length;nt--;)G[nt]="\n"+_+u(G[nt],_)}if(t.diffed&&t.diffed(n),G.length||U)Z+=G.join("");else if(p&&p.xml)return Z.substring(0,Z.length-1)+" />";return!B||V||U?(v&&~Z.indexOf("\n")&&(Z+="\n"),Z=Z+"</"+w+">"):Z=Z.replace(/>$/," />"),Z}function S(t){var e=(Function.prototype.toString.call(t).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!e){for(var n=-1,r=v.length;r--;)if(v[r]===t){n=r;break}n<0&&(n=v.push(t)-1),e="UnnamedComponent"+n}return e}const k=/(\\|\"|\')/g;var A=function(t){return t.replace(k,"\\$1")};const w=Object.prototype.toString,O=Date.prototype.toISOString,C=Error.prototype.toString,F=RegExp.prototype.toString,E=Symbol.prototype.toString,$=/^Symbol\((.*)\)(.*)$/,H=/\n/gi,L=Object.getOwnPropertySymbols||(t=>[]);function M(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 I(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}function N(t){return""===t.name?"[Function anonymous]":"[Function "+t.name+"]"}function D(t){return E.call(t).replace($,"Symbol($1)")}function W(t){return"["+C.call(t)+"]"}function U(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 I(t);if("string"===e)return'"'+A(t)+'"';if("function"===e)return N(t);if("symbol"===e)return D(t);const n=w.call(t);return"[object WeakMap]"===n?"WeakMap {}":"[object WeakSet]"===n?"WeakSet {}":"[object Function]"===n||"[object GeneratorFunction]"===n?N(t,min):"[object Symbol]"===n?D(t):"[object Date]"===n?O.call(t):"[object Error]"===n?W(t):"[object RegExp]"===n?F.call(t):"[object Arguments]"===n&&0===t.length?"Arguments []":M(n)&&0===t.length?t.constructor.name+" []":t instanceof Error&&W(t)}function Z(t,e,n,r,o,i,a,c,l,s){let u="";if(t.length){u+=o;const f=n+e;for(let n=0;n<t.length;n++)u+=f+B(t[n],e,f,r,o,i,a,c,l,s),n<t.length-1&&(u+=","+r);u+=o+n}return"["+u+"]"}function P(t,e,n,r,o,i,a,c,l,s){return(s?"":"Arguments ")+Z(t,e,n,r,o,i,a,c,l,s)}function T(t,e,n,r,o,i,a,c,l,s){return(s?"":t.constructor.name+" ")+Z(t,e,n,r,o,i,a,c,l,s)}function R(t,e,n,r,o,i,a,c,l,s){let u="Map {";const f=t.entries();let p=f.next();if(!p.done){u+=o;const t=n+e;for(;!p.done;)u+=t+B(p.value[0],e,t,r,o,i,a,c,l,s)+" => "+B(p.value[1],e,t,r,o,i,a,c,l,s),p=f.next(),p.done||(u+=","+r);u+=o+n}return u+"}"}function z(t,e,n,r,o,i,a,c,l,s){let u=(s?"":t.constructor?t.constructor.name+" ":"Object ")+"{",f=Object.keys(t).sort();const p=L(t);if(p.length&&(f=f.filter(t=>!("symbol"==typeof t||"[object Symbol]"===w.call(t))).concat(p)),f.length){u+=o;const p=n+e;for(let n=0;n<f.length;n++){const d=f[n];u+=p+B(d,e,p,r,o,i,a,c,l,s)+": "+B(t[d],e,p,r,o,i,a,c,l,s),n<f.length-1&&(u+=","+r)}u+=o+n}return u+"}"}function q(t,e,n,r,o,i,a,c,l,s){let u="Set {";const f=t.entries();let p=f.next();if(!p.done){u+=o;const t=n+e;for(;!p.done;)u+=t+B(p.value[1],e,t,r,o,i,a,c,l,s),p=f.next(),p.done||(u+=","+r);u+=o+n}return u+"}"}function J(t,e,n,r,o,i,a,c,l,s){if((i=i.slice()).indexOf(t)>-1)return"[Circular]";i.push(t);const u=++c>a;if(!u&&t.toJSON&&"function"==typeof t.toJSON)return B(t.toJSON(),e,n,r,o,i,a,c,l,s);const f=w.call(t);return"[object Arguments]"===f?u?"[Arguments]":P(t,e,n,r,o,i,a,c,l,s):M(f)?u?"[Array]":T(t,e,n,r,o,i,a,c,l,s):"[object Map]"===f?u?"[Map]":R(t,e,n,r,o,i,a,c,l,s):"[object Set]"===f?u?"[Set]":q(t,e,n,r,o,i,a,c,l,s):"object"==typeof t?u?"[Object]":z(t,e,n,r,o,i,a,c,l,s):void 0}function V(t,e,n,r,o,i,a,c,l,s){let u,f=!1;for(let e=0;e<l.length;e++)if(u=l[e],u.test(t)){f=!0;break}return!!f&&u.print(t,function(t){return B(t,e,n,r,o,i,a,c,l,s)},function(t){const r=n+e;return r+t.replace(H,"\n"+r)},{edgeSpacing:o,spacing:r})}function B(t,e,n,r,o,i,a,c,l,s){return U(t)||V(t,e,n,r,o,i,a,c,l,s)||J(t,e,n,r,o,i,a,c,l,s)}const G={indent:2,min:!1,maxDepth:Infinity,plugins:[]};function K(t){if(Object.keys(t).forEach(t=>{if(!G.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")}function Q(t){const e={};return Object.keys(G).forEach(n=>e[n]=t.hasOwnProperty(n)?t[n]:G[n]),e.min&&(e.indent=0),e}function X(t){return new Array(t+1).join(" ")}var Y=function(t,e){let n,r;e?(K(e),e=Q(e)):e=G;const o=e.min?" ":"\n",i=e.min?"":"\n";if(e&&e.plugins.length){n=X(e.indent),r=[];var a=V(t,n,"",o,i,r,e.maxDepth,0,e.plugins,e.min);if(a)return a}return U(t)||(n||(n=X(e.indent)),r||(r=[]),J(t,n,"",o,i,r,e.maxDepth,0,e.plugins,e.min))},tt={test:function(t){return t&&"object"==typeof t&&"type"in t&&"props"in t&&"key"in t},print:function(t,e,n){return x(t,tt.context,tt.opts,!0)}},et={plugins:[tt]},nt={attributeHook:function(t,e,n,r,o){var i=typeof e;if("dangerouslySetInnerHTML"===t)return!1;if(null==e||"function"===i&&!r.functions)return"";if(r.skipFalseAttributes&&!o&&(!1===e||("class"===t||"style"===t)&&""===e))return"";var a="string"==typeof r.pretty?r.pretty:"\t";return"string"!==i?("function"!==i||r.functionNames?(tt.context=n,tt.opts=r,~(e=Y(e,et)).indexOf("\n")&&(e=u("\n"+e,a)+"\n")):e="Function",u("\n"+t+"={"+e+"}",a)):"\n"+a+t+'="'+s(e)+'"'},jsx:!0,xml:!1,functions:!0,functionNames:!0,skipFalseAttributes:!0,pretty:" "};function rt(t,e,n){var r=Object.assign({},nt,n||{});return r.jsx||(r.attributeHook=null),x(t,e,r)}var ot={shallow:!0};function it(t,e,n){return rt(t,e,Object.assign({},ot,n||{}))}export default rt;export{rt as render,it as shallowRender}; | ||
//# sourceMappingURL=jsx.module.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],e):e((t||self).preactRenderToString={},t.preact)}(this,function(t,e){if("function"!=typeof Symbol){var n=0;Symbol=function(t){return"@@"+t+ ++n},Symbol.for=function(t){return"@@"+t}}var r=/^(?:area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,o=/[\s\n\\/='"\0<>]/,i=/^(xlink|xmlns|xml)(:|[A-Z])/,a=/^accessK|^auto[A-Z]|^ch|^col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|readO|rowS|spellC|src[A-Z]|tabI|item[A-Z]/,c=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,s=/["&<]/;function l(t){if(0===t.length||!1===s.test(t))return t;for(var e=0,n=0,r="",o="";n<t.length;n++){switch(t.charCodeAt(n)){case 34:o=""";break;case 38:o="&";break;case 60:o="<";break;default:continue}n!==e&&(r+=t.slice(e,n)),r+=o,e=n+1}return n!==e&&(r+=t.slice(e,n)),r}var u=function(t,e){return String(t).replace(/(\n+)/g,"$1"+(e||"\t"))},f=function(t,e,n){return String(t).length>(e||40)||!n&&-1!==String(t).indexOf("\n")||-1!==String(t).indexOf("<")},p={},d=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),g=/[A-Z]/g;function y(t){var e="";for(var n in t){var r=t[n];if(null!=r&&""!==r){var o="-"==n[0]?n:p[n]||(p[n]=n.replace(g,"-$&").toLowerCase()),i=";";"number"!=typeof r||o.startsWith("--")||d.has(o)||(i="px;"),e=e+o+":"+r+i}}return e||void 0}function b(t,e){return Array.isArray(e)?e.reduce(b,t):null!=e&&!1!==e&&t.push(e),t}function h(){this.__d=!0}function m(t,e){return{__v:t,context:e,props:t.props,setState:h,forceUpdate:h,__d:!0,__h:[]}}var v=[],_=[];function x(t,n,r,o){var i=e.options.__s;e.options.__s=!0;try{return j(t,n||{},r,o)}finally{e.options.__c&&e.options.__c(t,_),e.options.__s=i,_.length=0}}function j(t,n,s,p,d,g){if(null==t||"boolean"==typeof t)return"";if("object"!=typeof t)return"function"==typeof t?"":l(t+"");var h=s.pretty,v=h&&"string"==typeof h?h:"\t";if(Array.isArray(t)){for(var _="",x=0;x<t.length;x++)h&&x>0&&(_+="\n"),_+=j(t[x],n,s,p,d,g);return _}if(void 0!==t.constructor)return"";e.options.__b&&e.options.__b(t);var k,w=t.type,A=t.props,O=!1;if("function"==typeof w){if(O=!0,!s.shallow||!p&&!1!==s.renderRootComponent){if(w===e.Fragment){var C=[];return b(C,t.props.children),j(C,n,s,!1!==s.shallowHighOrder,d,g)}var F,E=t.__c=m(t,n),$=e.options.__r,H=n,L=w.contextType;if(null!=L){var M=n[L.__c];H=M?M.props.value:L.__}if(w.prototype&&"function"==typeof w.prototype.render)(E=t.__c=new w(A,H)).__v=t,E._dirty=E.__d=!0,E.props=A,null==E.state&&(E.state={}),null==E._nextState&&null==E.__s&&(E._nextState=E.__s=E.state),E.context=H,w.getDerivedStateFromProps?E.state=Object.assign({},E.state,w.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),$&&$(t),F=E.render(E.props,E.state,E.context);else for(var I=0;E.__d&&I++<25;)E.__d=!1,$&&$(t),F=w.call(t.__c,A,H);E.getChildContext&&(n=Object.assign({},n,E.getChildContext()));var N=j(F,n,s,!1!==s.shallowHighOrder,d,g);return e.options.diffed&&e.options.diffed(t),N}w=(k=w).displayName||k!==Function&&k.name||S(k)}var T,D,W="<"+w;if(A){var R=Object.keys(A);s&&!0===s.sortAttributes&&R.sort();for(var U=0;U<R.length;U++){var Z=R[U],P=A[Z];if("children"!==Z){if(!o.test(Z)&&(s&&s.allAttributes||"key"!==Z&&"ref"!==Z&&"__self"!==Z&&"__source"!==Z)){if("defaultValue"===Z)Z="value";else if("defaultChecked"===Z)Z="checked";else if("defaultSelected"===Z)Z="selected";else if("className"===Z){if(void 0!==A.class)continue;Z="class"}else"acceptCharset"===Z?Z="accept-charset":"httpEquiv"===Z?Z="http-equiv":i.test(Z)?Z=Z.replace(i,"$1:$2").toLowerCase():d?c.test(Z)&&(Z="panose1"===Z?"panose-1":Z.replace(/([A-Z])/g,"-$1").toLowerCase()):a.test(Z)&&(Z=Z.toLowerCase());if("htmlFor"===Z){if(A.for)continue;Z="for"}"style"===Z&&P&&"object"==typeof P&&(P=y(P)),"a"===Z[0]&&"r"===Z[1]&&"boolean"==typeof P&&(P=String(P));var q=s.attributeHook&&s.attributeHook(Z,P,n,s,O);if(q||""===q)W+=q;else if("dangerouslySetInnerHTML"===Z)D=P&&P.__html;else if("textarea"===w&&"value"===Z)T=P;else if((P||0===P||""===P)&&"function"!=typeof P){if(!(!0!==P&&""!==P||(P=Z,s&&s.xml))){W=W+" "+Z;continue}if("value"===Z){if("select"===w){g=P;continue}"option"===w&&g==P&&void 0===A.selected&&(W+=" selected")}W=W+" "+Z+'="'+l(P+"")+'"'}}}else T=P}}if(h){var z=W.replace(/\n\s*/," ");z===W||~z.indexOf("\n")?h&&~W.indexOf("\n")&&(W+="\n"):W=z}if(W+=">",o.test(w))throw new Error(w+" is not a valid HTML tag name in "+W);var J,V=r.test(w)||s.voidElements&&s.voidElements.test(w),B=[];if(D)h&&f(D)&&(D="\n"+v+u(D,v)),W+=D;else if(null!=T&&b(J=[],T).length){for(var G=h&&~W.indexOf("\n"),K=!1,Q=0;Q<J.length;Q++){var X=J[Q];if(null!=X&&!1!==X){var Y=j(X,n,s,!0,"svg"===w||"foreignObject"!==w&&d,g);if(h&&!G&&f(Y)&&(G=!0),Y)if(h){var tt=Y.length>0&&"<"!=Y[0];K&&tt?B[B.length-1]+=Y:B.push(Y),K=tt}else B.push(Y)}}if(h&&G)for(var et=B.length;et--;)B[et]="\n"+v+u(B[et],v)}if(e.options.diffed&&e.options.diffed(t),B.length||D)W+=B.join("");else if(s&&s.xml)return W.substring(0,W.length-1)+" />";return!V||J||D?(h&&~W.indexOf("\n")&&(W+="\n"),W=W+"</"+w+">"):W=W.replace(/>$/," />"),W}function S(t){var e=(Function.prototype.toString.call(t).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!e){for(var n=-1,r=v.length;r--;)if(v[r]===t){n=r;break}n<0&&(n=v.push(t)-1),e="UnnamedComponent"+n}return e}const k=/(\\|\"|\')/g;var w=function(t){return t.replace(k,"\\$1")};const A=Object.prototype.toString,O=Date.prototype.toISOString,C=Error.prototype.toString,F=RegExp.prototype.toString,E=Symbol.prototype.toString,$=/^Symbol\((.*)\)(.*)$/,H=/\n/gi,L=Object.getOwnPropertySymbols||(t=>[]);function M(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 I(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}function N(t){return""===t.name?"[Function anonymous]":"[Function "+t.name+"]"}function T(t){return E.call(t).replace($,"Symbol($1)")}function D(t){return"["+C.call(t)+"]"}function W(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 I(t);if("string"===e)return'"'+w(t)+'"';if("function"===e)return N(t);if("symbol"===e)return T(t);const n=A.call(t);return"[object WeakMap]"===n?"WeakMap {}":"[object WeakSet]"===n?"WeakSet {}":"[object Function]"===n||"[object GeneratorFunction]"===n?N(t,min):"[object Symbol]"===n?T(t):"[object Date]"===n?O.call(t):"[object Error]"===n?D(t):"[object RegExp]"===n?F.call(t):"[object Arguments]"===n&&0===t.length?"Arguments []":M(n)&&0===t.length?t.constructor.name+" []":t instanceof Error&&D(t)}function R(t,e,n,r,o,i,a,c,s,l){let u="";if(t.length){u+=o;const f=n+e;for(let n=0;n<t.length;n++)u+=f+B(t[n],e,f,r,o,i,a,c,s,l),n<t.length-1&&(u+=","+r);u+=o+n}return"["+u+"]"}function U(t,e,n,r,o,i,a,c,s,l){return(l?"":"Arguments ")+R(t,e,n,r,o,i,a,c,s,l)}function Z(t,e,n,r,o,i,a,c,s,l){return(l?"":t.constructor.name+" ")+R(t,e,n,r,o,i,a,c,s,l)}function P(t,e,n,r,o,i,a,c,s,l){let u="Map {";const f=t.entries();let p=f.next();if(!p.done){u+=o;const t=n+e;for(;!p.done;)u+=t+B(p.value[0],e,t,r,o,i,a,c,s,l)+" => "+B(p.value[1],e,t,r,o,i,a,c,s,l),p=f.next(),p.done||(u+=","+r);u+=o+n}return u+"}"}function q(t,e,n,r,o,i,a,c,s,l){let u=(l?"":t.constructor?t.constructor.name+" ":"Object ")+"{",f=Object.keys(t).sort();const p=L(t);if(p.length&&(f=f.filter(t=>!("symbol"==typeof t||"[object Symbol]"===A.call(t))).concat(p)),f.length){u+=o;const p=n+e;for(let n=0;n<f.length;n++){const d=f[n];u+=p+B(d,e,p,r,o,i,a,c,s,l)+": "+B(t[d],e,p,r,o,i,a,c,s,l),n<f.length-1&&(u+=","+r)}u+=o+n}return u+"}"}function z(t,e,n,r,o,i,a,c,s,l){let u="Set {";const f=t.entries();let p=f.next();if(!p.done){u+=o;const t=n+e;for(;!p.done;)u+=t+B(p.value[1],e,t,r,o,i,a,c,s,l),p=f.next(),p.done||(u+=","+r);u+=o+n}return u+"}"}function J(t,e,n,r,o,i,a,c,s,l){if((i=i.slice()).indexOf(t)>-1)return"[Circular]";i.push(t);const u=++c>a;if(!u&&t.toJSON&&"function"==typeof t.toJSON)return B(t.toJSON(),e,n,r,o,i,a,c,s,l);const f=A.call(t);return"[object Arguments]"===f?u?"[Arguments]":U(t,e,n,r,o,i,a,c,s,l):M(f)?u?"[Array]":Z(t,e,n,r,o,i,a,c,s,l):"[object Map]"===f?u?"[Map]":P(t,e,n,r,o,i,a,c,s,l):"[object Set]"===f?u?"[Set]":z(t,e,n,r,o,i,a,c,s,l):"object"==typeof t?u?"[Object]":q(t,e,n,r,o,i,a,c,s,l):void 0}function V(t,e,n,r,o,i,a,c,s,l){let u,f=!1;for(let e=0;e<s.length;e++)if(u=s[e],u.test(t)){f=!0;break}return!!f&&u.print(t,function(t){return B(t,e,n,r,o,i,a,c,s,l)},function(t){const r=n+e;return r+t.replace(H,"\n"+r)},{edgeSpacing:o,spacing:r})}function B(t,e,n,r,o,i,a,c,s,l){return W(t)||V(t,e,n,r,o,i,a,c,s,l)||J(t,e,n,r,o,i,a,c,s,l)}const G={indent:2,min:!1,maxDepth:Infinity,plugins:[]};function K(t){if(Object.keys(t).forEach(t=>{if(!G.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")}function Q(t){const e={};return Object.keys(G).forEach(n=>e[n]=t.hasOwnProperty(n)?t[n]:G[n]),e.min&&(e.indent=0),e}function X(t){return new Array(t+1).join(" ")}var Y=function(t,e){let n,r;e?(K(e),e=Q(e)):e=G;const o=e.min?" ":"\n",i=e.min?"":"\n";if(e&&e.plugins.length){n=X(e.indent),r=[];var a=V(t,n,"",o,i,r,e.maxDepth,0,e.plugins,e.min);if(a)return a}return W(t)||(n||(n=X(e.indent)),r||(r=[]),J(t,n,"",o,i,r,e.maxDepth,0,e.plugins,e.min))},tt={test:function(t){return t&&"object"==typeof t&&"type"in t&&"props"in t&&"key"in t},print:function(t,e,n){return x(t,tt.context,tt.opts,!0)}},et={plugins:[tt]},nt={attributeHook:function(t,e,n,r,o){var i=typeof e;if("dangerouslySetInnerHTML"===t)return!1;if(null==e||"function"===i&&!r.functions)return"";if(r.skipFalseAttributes&&!o&&(!1===e||("class"===t||"style"===t)&&""===e))return"";var a="string"==typeof r.pretty?r.pretty:"\t";return"string"!==i?("function"!==i||r.functionNames?(tt.context=n,tt.opts=r,~(e=Y(e,et)).indexOf("\n")&&(e=u("\n"+e,a)+"\n")):e="Function",u("\n"+t+"={"+e+"}",a)):"\n"+a+t+'="'+l(e)+'"'},jsx:!0,xml:!1,functions:!0,functionNames:!0,skipFalseAttributes:!0,pretty:" "};function rt(t,e,n){var r=Object.assign({},nt,n||{});return r.jsx||(r.attributeHook=null),x(t,e,r)}var ot={shallow:!0};t.default=rt,t.render=rt,t.shallowRender=function(t,e,n){return rt(t,e,Object.assign({},ot,n||{}))}}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],e):e((t||self).preactRenderToString={},t.preact)}(this,function(t,e){if("function"!=typeof Symbol){var n=0;Symbol=function(t){return"@@"+t+ ++n},Symbol.for=function(t){return"@@"+t}}var r=/^(?:area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,o=/[\s\n\\/='"\0<>]/,i=/^(xlink|xmlns|xml)([A-Z])/,a=/^accessK|^auto[A-Z]|^ch|^col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|readO|rowS|spellC|src[A-Z]|tabI|item[A-Z]/,c=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,s=/["&<]/;function l(t){if(0===t.length||!1===s.test(t))return t;for(var e=0,n=0,r="",o="";n<t.length;n++){switch(t.charCodeAt(n)){case 34:o=""";break;case 38:o="&";break;case 60:o="<";break;default:continue}n!==e&&(r+=t.slice(e,n)),r+=o,e=n+1}return n!==e&&(r+=t.slice(e,n)),r}var u=function(t,e){return String(t).replace(/(\n+)/g,"$1"+(e||"\t"))},f=function(t,e,n){return String(t).length>(e||40)||!n&&-1!==String(t).indexOf("\n")||-1!==String(t).indexOf("<")},p={},d=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),g=/[A-Z]/g;function y(t){var e="";for(var n in t){var r=t[n];if(null!=r&&""!==r){var o="-"==n[0]?n:p[n]||(p[n]=n.replace(g,"-$&").toLowerCase()),i=";";"number"!=typeof r||o.startsWith("--")||d.has(o)||(i="px;"),e=e+o+":"+r+i}}return e||void 0}function b(t,e){return Array.isArray(e)?e.reduce(b,t):null!=e&&!1!==e&&t.push(e),t}function h(){this.__d=!0}function m(t,e){return{__v:t,context:e,props:t.props,setState:h,forceUpdate:h,__d:!0,__h:[]}}var v=[],_=[];function x(t,n,r,o){var i=e.options.__s;e.options.__s=!0;try{return j(t,n||{},r,o)}finally{e.options.__c&&e.options.__c(t,_),e.options.__s=i,_.length=0}}function j(t,n,s,p,d,g){if(null==t||"boolean"==typeof t)return"";if("object"!=typeof t)return"function"==typeof t?"":l(t+"");var h=s.pretty,v=h&&"string"==typeof h?h:"\t";if(Array.isArray(t)){for(var _="",x=0;x<t.length;x++)h&&x>0&&(_+="\n"),_+=j(t[x],n,s,p,d,g);return _}if(void 0!==t.constructor)return"";e.options.__b&&e.options.__b(t);var k,w=t.type,A=t.props,O=!1;if("function"==typeof w){if(O=!0,!s.shallow||!p&&!1!==s.renderRootComponent){if(w===e.Fragment){var C=[];return b(C,t.props.children),j(C,n,s,!1!==s.shallowHighOrder,d,g)}var F,E=t.__c=m(t,n),$=e.options.__r,H=n,L=w.contextType;if(null!=L){var M=n[L.__c];H=M?M.props.value:L.__}if(w.prototype&&"function"==typeof w.prototype.render)(E=t.__c=new w(A,H)).__v=t,E._dirty=E.__d=!0,E.props=A,null==E.state&&(E.state={}),null==E._nextState&&null==E.__s&&(E._nextState=E.__s=E.state),E.context=H,w.getDerivedStateFromProps?E.state=Object.assign({},E.state,w.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),$&&$(t),F=E.render(E.props,E.state,E.context);else for(var I=0;E.__d&&I++<25;)E.__d=!1,$&&$(t),F=w.call(t.__c,A,H);E.getChildContext&&(n=Object.assign({},n,E.getChildContext()));var N=j(F,n,s,!1!==s.shallowHighOrder,d,g);return e.options.diffed&&e.options.diffed(t),N}w=(k=w).displayName||k!==Function&&k.name||S(k)}var T,D,W="<"+w;if(A){var R=Object.keys(A);s&&!0===s.sortAttributes&&R.sort();for(var U=0;U<R.length;U++){var Z=R[U],P=A[Z];if("children"!==Z){if(!o.test(Z)&&(s&&s.allAttributes||"key"!==Z&&"ref"!==Z&&"__self"!==Z&&"__source"!==Z)){if("defaultValue"===Z)Z="value";else if("defaultChecked"===Z)Z="checked";else if("defaultSelected"===Z)Z="selected";else if("className"===Z){if(void 0!==A.class)continue;Z="class"}else"acceptCharset"===Z?Z="accept-charset":"httpEquiv"===Z?Z="http-equiv":i.test(Z)?Z=Z.replace(i,"$1:$2").toLowerCase():d?c.test(Z)&&(Z="panose1"===Z?"panose-1":Z.replace(/([A-Z])/g,"-$1").toLowerCase()):a.test(Z)&&(Z=Z.toLowerCase());if("htmlFor"===Z){if(A.for)continue;Z="for"}"style"===Z&&P&&"object"==typeof P&&(P=y(P)),"a"===Z[0]&&"r"===Z[1]&&"boolean"==typeof P&&(P=String(P));var q=s.attributeHook&&s.attributeHook(Z,P,n,s,O);if(q||""===q)W+=q;else if("dangerouslySetInnerHTML"===Z)D=P&&P.__html;else if("textarea"===w&&"value"===Z)T=P;else if((P||0===P||""===P)&&"function"!=typeof P){if(!(!0!==P&&""!==P||(P=Z,s&&s.xml))){W=W+" "+Z;continue}if("value"===Z){if("select"===w){g=P;continue}"option"===w&&g==P&&void 0===A.selected&&(W+=" selected")}W=W+" "+Z+'="'+l(P+"")+'"'}}}else T=P}}if(h){var z=W.replace(/\n\s*/," ");z===W||~z.indexOf("\n")?h&&~W.indexOf("\n")&&(W+="\n"):W=z}if(W+=">",o.test(w))throw new Error(w+" is not a valid HTML tag name in "+W);var J,V=r.test(w)||s.voidElements&&s.voidElements.test(w),B=[];if(D)h&&f(D)&&(D="\n"+v+u(D,v)),W+=D;else if(null!=T&&b(J=[],T).length){for(var G=h&&~W.indexOf("\n"),K=!1,Q=0;Q<J.length;Q++){var X=J[Q];if(null!=X&&!1!==X){var Y=j(X,n,s,!0,"svg"===w||"foreignObject"!==w&&d,g);if(h&&!G&&f(Y)&&(G=!0),Y)if(h){var tt=Y.length>0&&"<"!=Y[0];K&&tt?B[B.length-1]+=Y:B.push(Y),K=tt}else B.push(Y)}}if(h&&G)for(var et=B.length;et--;)B[et]="\n"+v+u(B[et],v)}if(e.options.diffed&&e.options.diffed(t),B.length||D)W+=B.join("");else if(s&&s.xml)return W.substring(0,W.length-1)+" />";return!V||J||D?(h&&~W.indexOf("\n")&&(W+="\n"),W=W+"</"+w+">"):W=W.replace(/>$/," />"),W}function S(t){var e=(Function.prototype.toString.call(t).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!e){for(var n=-1,r=v.length;r--;)if(v[r]===t){n=r;break}n<0&&(n=v.push(t)-1),e="UnnamedComponent"+n}return e}const k=/(\\|\"|\')/g;var w=function(t){return t.replace(k,"\\$1")};const A=Object.prototype.toString,O=Date.prototype.toISOString,C=Error.prototype.toString,F=RegExp.prototype.toString,E=Symbol.prototype.toString,$=/^Symbol\((.*)\)(.*)$/,H=/\n/gi,L=Object.getOwnPropertySymbols||(t=>[]);function M(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 I(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}function N(t){return""===t.name?"[Function anonymous]":"[Function "+t.name+"]"}function T(t){return E.call(t).replace($,"Symbol($1)")}function D(t){return"["+C.call(t)+"]"}function W(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 I(t);if("string"===e)return'"'+w(t)+'"';if("function"===e)return N(t);if("symbol"===e)return T(t);const n=A.call(t);return"[object WeakMap]"===n?"WeakMap {}":"[object WeakSet]"===n?"WeakSet {}":"[object Function]"===n||"[object GeneratorFunction]"===n?N(t,min):"[object Symbol]"===n?T(t):"[object Date]"===n?O.call(t):"[object Error]"===n?D(t):"[object RegExp]"===n?F.call(t):"[object Arguments]"===n&&0===t.length?"Arguments []":M(n)&&0===t.length?t.constructor.name+" []":t instanceof Error&&D(t)}function R(t,e,n,r,o,i,a,c,s,l){let u="";if(t.length){u+=o;const f=n+e;for(let n=0;n<t.length;n++)u+=f+B(t[n],e,f,r,o,i,a,c,s,l),n<t.length-1&&(u+=","+r);u+=o+n}return"["+u+"]"}function U(t,e,n,r,o,i,a,c,s,l){return(l?"":"Arguments ")+R(t,e,n,r,o,i,a,c,s,l)}function Z(t,e,n,r,o,i,a,c,s,l){return(l?"":t.constructor.name+" ")+R(t,e,n,r,o,i,a,c,s,l)}function P(t,e,n,r,o,i,a,c,s,l){let u="Map {";const f=t.entries();let p=f.next();if(!p.done){u+=o;const t=n+e;for(;!p.done;)u+=t+B(p.value[0],e,t,r,o,i,a,c,s,l)+" => "+B(p.value[1],e,t,r,o,i,a,c,s,l),p=f.next(),p.done||(u+=","+r);u+=o+n}return u+"}"}function q(t,e,n,r,o,i,a,c,s,l){let u=(l?"":t.constructor?t.constructor.name+" ":"Object ")+"{",f=Object.keys(t).sort();const p=L(t);if(p.length&&(f=f.filter(t=>!("symbol"==typeof t||"[object Symbol]"===A.call(t))).concat(p)),f.length){u+=o;const p=n+e;for(let n=0;n<f.length;n++){const d=f[n];u+=p+B(d,e,p,r,o,i,a,c,s,l)+": "+B(t[d],e,p,r,o,i,a,c,s,l),n<f.length-1&&(u+=","+r)}u+=o+n}return u+"}"}function z(t,e,n,r,o,i,a,c,s,l){let u="Set {";const f=t.entries();let p=f.next();if(!p.done){u+=o;const t=n+e;for(;!p.done;)u+=t+B(p.value[1],e,t,r,o,i,a,c,s,l),p=f.next(),p.done||(u+=","+r);u+=o+n}return u+"}"}function J(t,e,n,r,o,i,a,c,s,l){if((i=i.slice()).indexOf(t)>-1)return"[Circular]";i.push(t);const u=++c>a;if(!u&&t.toJSON&&"function"==typeof t.toJSON)return B(t.toJSON(),e,n,r,o,i,a,c,s,l);const f=A.call(t);return"[object Arguments]"===f?u?"[Arguments]":U(t,e,n,r,o,i,a,c,s,l):M(f)?u?"[Array]":Z(t,e,n,r,o,i,a,c,s,l):"[object Map]"===f?u?"[Map]":P(t,e,n,r,o,i,a,c,s,l):"[object Set]"===f?u?"[Set]":z(t,e,n,r,o,i,a,c,s,l):"object"==typeof t?u?"[Object]":q(t,e,n,r,o,i,a,c,s,l):void 0}function V(t,e,n,r,o,i,a,c,s,l){let u,f=!1;for(let e=0;e<s.length;e++)if(u=s[e],u.test(t)){f=!0;break}return!!f&&u.print(t,function(t){return B(t,e,n,r,o,i,a,c,s,l)},function(t){const r=n+e;return r+t.replace(H,"\n"+r)},{edgeSpacing:o,spacing:r})}function B(t,e,n,r,o,i,a,c,s,l){return W(t)||V(t,e,n,r,o,i,a,c,s,l)||J(t,e,n,r,o,i,a,c,s,l)}const G={indent:2,min:!1,maxDepth:Infinity,plugins:[]};function K(t){if(Object.keys(t).forEach(t=>{if(!G.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")}function Q(t){const e={};return Object.keys(G).forEach(n=>e[n]=t.hasOwnProperty(n)?t[n]:G[n]),e.min&&(e.indent=0),e}function X(t){return new Array(t+1).join(" ")}var Y=function(t,e){let n,r;e?(K(e),e=Q(e)):e=G;const o=e.min?" ":"\n",i=e.min?"":"\n";if(e&&e.plugins.length){n=X(e.indent),r=[];var a=V(t,n,"",o,i,r,e.maxDepth,0,e.plugins,e.min);if(a)return a}return W(t)||(n||(n=X(e.indent)),r||(r=[]),J(t,n,"",o,i,r,e.maxDepth,0,e.plugins,e.min))},tt={test:function(t){return t&&"object"==typeof t&&"type"in t&&"props"in t&&"key"in t},print:function(t,e,n){return x(t,tt.context,tt.opts,!0)}},et={plugins:[tt]},nt={attributeHook:function(t,e,n,r,o){var i=typeof e;if("dangerouslySetInnerHTML"===t)return!1;if(null==e||"function"===i&&!r.functions)return"";if(r.skipFalseAttributes&&!o&&(!1===e||("class"===t||"style"===t)&&""===e))return"";var a="string"==typeof r.pretty?r.pretty:"\t";return"string"!==i?("function"!==i||r.functionNames?(tt.context=n,tt.opts=r,~(e=Y(e,et)).indexOf("\n")&&(e=u("\n"+e,a)+"\n")):e="Function",u("\n"+t+"={"+e+"}",a)):"\n"+a+t+'="'+l(e)+'"'},jsx:!0,xml:!1,functions:!0,functionNames:!0,skipFalseAttributes:!0,pretty:" "};function rt(t,e,n){var r=Object.assign({},nt,n||{});return r.jsx||(r.attributeHook=null),x(t,e,r)}var ot={shallow:!0};t.default=rt,t.render=rt,t.shallowRender=function(t,e,n){return rt(t,e,Object.assign({},ot,n||{}))}}); | ||
//# sourceMappingURL=jsx.umd.js.map |
{ | ||
"name": "preact-render-to-string", | ||
"amdName": "preactRenderToString", | ||
"version": "6.2.1", | ||
"version": "6.2.2", | ||
"description": "Render JSX to an HTML string, with support for Preact components.", | ||
@@ -6,0 +6,0 @@ "main": "dist/index.js", |
export const VOID_ELEMENTS = /^(?:area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/; | ||
export const UNSAFE_NAME = /[\s\n\\/='"\0<>]/; | ||
export const NAMESPACE_REPLACE_REGEX = /^(xlink|xmlns|xml)(:|[A-Z])/; | ||
export const NAMESPACE_REPLACE_REGEX = /^(xlink|xmlns|xml)([A-Z])/; | ||
export const HTML_LOWER_CASE = /^accessK|^auto[A-Z]|^ch|^col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|readO|rowS|spellC|src[A-Z]|tabI|item[A-Z]/; | ||
@@ -5,0 +5,0 @@ export const SVG_CAMEL_CASE = /^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
382446
-16.85%37
-7.5%1409
-2.76%