New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

preact

Package Overview
Dependencies
Maintainers
12
Versions
251
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

preact - npm Package Compare versions

Comparing version 10.6.6 to 11.0.0-experimental.0

compat/dist/compat.mjs.map

2

compat/dist/compat.js

@@ -1,2 +0,2 @@

var n=require("preact/hooks"),t=require("preact");function e(n,t){for(var e in t)n[e]=t[e];return n}function r(n,t){for(var e in n)if("__source"!==e&&!(e in t))return!0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return!0;return!1}function o(n){this.props=n}function u(n,e){function o(n){var t=this.props.ref,o=t==n.ref;return!o&&t&&(t.call?t(null):t.current=null),e?!e(this.props,n)||!o:r(this.props,n)}function u(e){return this.shouldComponentUpdate=o,t.createElement(n,e)}return u.displayName="Memo("+(n.displayName||n.name)+")",u.prototype.isReactComponent=!0,u.__f=!0,u}(o.prototype=new t.Component).isPureReactComponent=!0,o.prototype.shouldComponentUpdate=function(n,t){return r(this.props,n)||r(this.state,t)};var i=t.options.__b;t.options.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),i&&i(n)};var l="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function c(n){function t(t,r){var o=e({},t);return delete o.ref,n(o,(r=t.ref||r)&&("object"!=typeof r||"current"in r)?r:null)}return t.$$typeof=l,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(n.displayName||n.name)+")",t}var f=function(n,e){return null==n?null:t.toChildArray(t.toChildArray(n).map(e))},a={map:f,forEach:f,count:function(n){return n?t.toChildArray(n).length:0},only:function(n){var e=t.toChildArray(n);if(1!==e.length)throw"Children.only";return e[0]},toArray:t.toChildArray},s=t.options.__e;t.options.__e=function(n,t,e){if(n.then)for(var r,o=t;o=o.__;)if((r=o.__c)&&r.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),r.__c(n,t);s(n,t,e)};var p=t.options.unmount;function h(){this.__u=0,this.t=null,this.__b=null}function v(n){var t=n.__.__c;return t&&t.__e&&t.__e(n)}function d(n){var e,r,o;function u(u){if(e||(e=n()).then(function(n){r=n.default||n},function(n){o=n}),o)throw o;if(!r)throw e;return t.createElement(r,u)}return u.displayName="Lazy",u.__f=!0,u}function m(){this.o=null,this.u=null}t.options.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&!0===n.__h&&(n.type=null),p&&p(n)},(h.prototype=new t.Component).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var o=v(r.__v),u=!1,i=function(){u||(u=!0,e.__R=null,o?o(l):l())};e.__R=i;var l=function(){if(!--r.__u){if(r.state.__e){var n=r.state.__e;r.__v.__k[0]=function n(t,e,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return n(t,e,r)}),t.__c&&t.__c.__P===e&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__e:r.__b=r.__v.__k[0]}),n.then(i,i)},h.prototype.componentWillUnmount=function(){this.t=[]},h.prototype.render=function(n,r){if(this.__b){if(this.__v.__k){var o=document.createElement("div"),u=this.__v.__k[0].__c;this.__v.__k[0]=function n(t,r,o){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c()}),t.__c.__H=null),null!=(t=e({},t)).__c&&(t.__c.__P===o&&(t.__c.__P=r),t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return n(t,r,o)})),t}(this.__b,o,u.__O=u.__P)}this.__b=null}var i=r.__e&&t.createElement(t.Fragment,null,n.fallback);return i&&(i.__h=null),[t.createElement(t.Fragment,null,r.__e?null:n.children),i]};var x=function(n,t,e){if(++e[1]===e[0]&&n.u.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.u.size))for(e=n.o;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.o=e=e[2]}};function y(n){return this.getChildContext=function(){return n.context},n.children}function b(n){var e=this,r=n.i;e.componentWillUnmount=function(){t.render(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),n.__v?(e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),e.i.appendChild(n)},insertBefore:function(n,t){this.childNodes.push(n),e.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.i.removeChild(n)}}),t.render(t.createElement(y,{context:e.context},n.__v),e.l)):e.l&&e.componentWillUnmount()}function _(n,e){return t.createElement(b,{__v:n,i:e})}(m.prototype=new t.Component).__e=function(n){var t=this,e=v(t.__v),r=t.u.get(n);return r[0]++,function(o){var u=function(){t.props.revealOrder?(r.push(o),x(t,n,r)):o()};e?e(u):u()}},m.prototype.render=function(n){this.o=null,this.u=new Map;var e=t.toChildArray(n.children);n.revealOrder&&"b"===n.revealOrder[0]&&e.reverse();for(var r=e.length;r--;)this.u.set(e[r],this.o=[1,0,this.o]);return n.children},m.prototype.componentDidUpdate=m.prototype.componentDidMount=function(){var n=this;this.u.forEach(function(t,e){x(n,e,t)})};var S="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,C=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,w="undefined"!=typeof document,g=function(n){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(n)};function E(n,e,r){return null==e.__k&&(e.textContent=""),t.render(n,e),"function"==typeof r&&r(),n?n.__c:null}function R(n,e,r){return t.hydrate(n,e),"function"==typeof r&&r(),n?n.__c:null}t.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(n){Object.defineProperty(t.Component.prototype,n,{configurable:!0,get:function(){return this["UNSAFE_"+n]},set:function(t){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:t})}})});var N=t.options.event;function O(){}function k(){return this.cancelBubble}function A(){return this.defaultPrevented}t.options.event=function(n){return N&&(n=N(n)),n.persist=O,n.isPropagationStopped=k,n.isDefaultPrevented=A,n.nativeEvent=n};var L,U={configurable:!0,get:function(){return this.class}},M=t.options.vnode;t.options.vnode=function(n){var e=n.type,r=n.props,o=r;if("string"==typeof e){var u=-1===e.indexOf("-");for(var i in o={},r){var l=r[i];w&&"children"===i&&"noscript"===e||"value"===i&&"defaultValue"in r&&null==l||("defaultValue"===i&&"value"in r&&null==r.value?i="value":"download"===i&&!0===l?l="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+e)&&!g(r.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():u&&C.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===l&&(l=void 0),o[i]=l)}"select"==e&&o.multiple&&Array.isArray(o.value)&&(o.value=t.toChildArray(r.children).forEach(function(n){n.props.selected=-1!=o.value.indexOf(n.props.value)})),"select"==e&&null!=o.defaultValue&&(o.value=t.toChildArray(r.children).forEach(function(n){n.props.selected=o.multiple?-1!=o.defaultValue.indexOf(n.props.value):o.defaultValue==n.props.value})),n.props=o,r.class!=r.className&&(U.enumerable="className"in r,null!=r.className&&(o.class=r.className),Object.defineProperty(o,"className",U))}n.$$typeof=S,M&&M(n)};var T=t.options.__r;t.options.__r=function(n){T&&T(n),L=n.__c};var j={ReactCurrentDispatcher:{current:{readContext:function(n){return L.__n[n.__c].props.value}}}};function D(n){return t.createElement.bind(null,n)}function F(n){return!!n&&n.$$typeof===S}function I(n){return F(n)?t.cloneElement.apply(null,arguments):n}function W(n){return!!n.__k&&(t.render(null,n),!0)}function P(n){return n&&(n.base||1===n.nodeType&&n)||null}var V=function(n,t){return n(t)},z=function(n,t){return n(t)},B=t.Fragment,$={useState:n.useState,useReducer:n.useReducer,useEffect:n.useEffect,useLayoutEffect:n.useLayoutEffect,useRef:n.useRef,useImperativeHandle:n.useImperativeHandle,useMemo:n.useMemo,useCallback:n.useCallback,useContext:n.useContext,useDebugValue:n.useDebugValue,version:"17.0.2",Children:a,render:E,hydrate:R,unmountComponentAtNode:W,createPortal:_,createElement:t.createElement,createContext:t.createContext,createFactory:D,cloneElement:I,createRef:t.createRef,Fragment:t.Fragment,isValidElement:F,findDOMNode:P,Component:t.Component,PureComponent:o,memo:u,forwardRef:c,flushSync:z,unstable_batchedUpdates:V,StrictMode:B,Suspense:h,SuspenseList:m,lazy:d,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:j};Object.keys(n).forEach(function(t){exports[t]=n[t]}),exports.createElement=t.createElement,exports.createContext=t.createContext,exports.createRef=t.createRef,exports.Fragment=t.Fragment,exports.Component=t.Component,exports.version="17.0.2",exports.Children=a,exports.render=E,exports.hydrate=R,exports.unmountComponentAtNode=W,exports.createPortal=_,exports.createFactory=D,exports.cloneElement=I,exports.isValidElement=F,exports.findDOMNode=P,exports.PureComponent=o,exports.memo=u,exports.forwardRef=c,exports.flushSync=z,exports.unstable_batchedUpdates=V,exports.StrictMode=B,exports.Suspense=h,exports.SuspenseList=m,exports.lazy=d,exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j,exports.default=$;
var e=require("preact"),t=require("preact/hooks"),n=/^(-|f[lo].*[^se]$|g.{5,}[^ps]$|z|o[pr]|(W.{5})?[lL]i.*(t|mp)$|an|(bo|s).{4}Im|sca|m.{6}[ds]|ta|c.*[st]$|wido|ini)/;function r(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function o(e){this.props=e}function u(t,n){function o(){}return o.prototype=new e.Component,o.displayName="Memo("+(t.displayName||t.name)+")",o.prototype.render=function(n){return e.createElement(t,n)},o.prototype.shouldComponentUpdate=function(e){var t=this.props.ref,o=t==e.ref;return!o&&t&&(t.call?t(null):t.current=null),n?!n(this.props,e)||!o:r(this.props,e)},o.prototype.isReactComponent=!0,o.__f=!0,o}(o.prototype=new e.Component).isPureReactComponent=!0,o.prototype.shouldComponentUpdate=function(e,t){return r(this.props,e)||r(this.state,t)};var i=e.options.__b;e.options.__b=(e,t)=>{e.type&&e.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null,e.ref=null),i&&i(e,t)};var l="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function a(e){function t(t,n){var r=Object.assign({},t);return delete r.ref,e(r,!(n=t.ref||n)||"object"==typeof n&&!("current"in n)?null:n)}return t.$$typeof=l,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var c=(t,n)=>null==t?null:e.toChildArray(e.toChildArray(t).map(n)),f={map:c,forEach:c,count:t=>t?e.toChildArray(t).length:0,only(t){var n=e.toChildArray(t);if(1!==n.length)throw"Children.only";return n[0]},toArray:e.toChildArray};Promise.prototype.then.bind(Promise.resolve());var s=e=>28&e.flags&&(!(16&e.flags)||e.props.__P==h(e.__));function p(e,t){if(null==e.__k)return null;for(t=t||0;t<e.__k.length;t++){var n=e.__k[t];if(null!=n){if(3&n.flags)return n.__e;if(s(n)){var r=p(n);if(r)return r}}}return null}function h(e){for(var t=16&e.flags?e.props.__P:null,n=e.__;null==t&&n;)16&n.flags?t=n.props.__P:2&n.flags&&(t=n.__e),n=n.__;return t}var m=e.options.__e;e.options.__e=function(e,t){if(e.then)for(var n,r=t;r=r.__;)if((n=r.__c)&&n.__c)return n.__c(e,t);m(e,t)};var v=e.options.unmount;function b(){this.__u=0,this.t=null,this.__P=null,this.o=0}function d(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function x(t){var n,r,o;function u(u){if(n||(n=t()).then(e=>{r=e.default||e},e=>{o=e}),o)throw o;if(!r)throw n;return e.createElement(r,u)}return u.displayName="Lazy",u.__f=!0,u}function y(){this.u=null,this.i=null}e.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32==(32&e.flags)&&(e.flags|=2),v&&v(e)},(b.prototype=new e.Component).__c=function(e,t){var n=t.__c;if(null==n.__R){var r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=d(r.__i),u=!1,i=()=>{u||(u=!0,n.__R=null,o?o(l):l())};n.__R=i;var l=()=>{var e;if(!--r.__u)for(this.__P=null,r.setState({__e:!1});e=r.t.pop();)e.forceUpdate()},a=32==(32&t.flags);r.__u++||a||(this.__P=document.createElement("div"),r.setState({__e:!0})),e.then(i,i)}},b.prototype.componentWillUnmount=function(){this.t=[],this.__P=null},b.prototype.render=function(t,n){null==this.__P&&(this.__P=h(this.__i));var r=n.__e&&e.createElement(e.Fragment,null,t.fallback),o=e.createPortal(t.children,this.__P);return n.__e?o.__v=this.o:this.o=o.__v,[o,r]};var g=(e,t,n)=>{if(++n[1]===n[0]&&e.i.delete(t.props),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.i.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};(y.prototype=new e.Component).__e=function(e){var t=this,n=d(t.__i),r=t.i.get(e.props);return r[0]++,o=>{var u=()=>{t.props.revealOrder?(r.push(o),g(t,e,r)):o()};n?n(u):u()}},y.prototype.render=function(t){this.u=null,this.i=new Map;var n=e.toChildArray(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&n.reverse();for(var r=n.length;r--;)this.i.set(n[r].props,this.u=[1,0,this.u]);return t.children},y.prototype.componentDidUpdate=y.prototype.componentDidMount=function(){this.i.forEach((e,t)=>{g(this,{props:t},e)})};var _="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,O=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,S="undefined"!=typeof document,j=e=>("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e);function w(t,n,r){null==n.__k&&(n.textContent=""),e.render(t,n),"function"==typeof r&&r();var o=n.__k.__k[0];return o?o.__c:null}function C(t,n,r){return e.hydrate(t,n),"function"==typeof r&&r(),t?t.__c:null}e.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(t=>{Object.defineProperty(e.Component.prototype,t,{configurable:!0,get(){return this["UNSAFE_"+t]},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var R=e.options.event;function E(){}function k(){return this.cancelBubble}function A(){return this.defaultPrevented}e.options.event=e=>(R&&(e=R(e)),e.persist=E,e.isPropagationStopped=k,e.isDefaultPrevented=A,e.nativeEvent=e);var L,N={configurable:!0,get(){return this.class}},P=e.options.vnode;e.options.vnode=t=>{var r,o=t.type,u=t.props,i=u;if("string"==typeof o){var l=-1===o.indexOf("-");i={};var a=u.style;if("object"==typeof a)for(r in a)"number"!=typeof a[r]||n.test(r)||(a[r]+="px");for(r in u){var c=u[r];S&&"children"===r&&"noscript"===o||"value"===r&&"defaultValue"in u&&null==c||("defaultValue"===r&&"value"in u&&null==u.value?r="value":"download"===r&&!0===c?c="":/ondoubleclick/i.test(r)?r="ondblclick":/^onchange(textarea|input)/i.test(r+o)&&!j(u.type)?r="oninput":/^onfocus$/i.test(r)?r="onfocusin":/^onblur$/i.test(r)?r="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(r)?r=r.toLowerCase():l&&O.test(r)?r=r.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===c&&(c=void 0),i[r]=c)}"select"==o&&i.multiple&&Array.isArray(i.value)&&(i.value=e.toChildArray(u.children).forEach(e=>{e.props.selected=-1!=i.value.indexOf(e.props.value)})),"select"==o&&null!=i.defaultValue&&(i.value=e.toChildArray(u.children).forEach(e=>{e.props.selected=i.multiple?-1!=i.defaultValue.indexOf(e.props.value):i.defaultValue==e.props.value})),t.props=i,o&&u.class!=u.className&&(N.enumerable="className"in u,null!=u.className&&(i.class=u.className),Object.defineProperty(i,"className",N))}else if("function"==typeof o&&o.defaultProps)for(r in o.defaultProps)void 0===i[r]&&(i[r]=o.defaultProps[r]);t.$$typeof=_,P&&P(t)};var U=e.options.__r;e.options.__r=function(e){U&&U(e),L=function(e){for(var t=e.c,n=e.__;null==t&&n;)t=n.c,n=n.__;return t}(e)};var $={ReactCurrentDispatcher:{current:{readContext:e=>L[e.__c].props.value}}},D="object"==typeof performance&&"function"==typeof performance.now?performance.now.bind(performance):()=>Date.now();function F(t){return e.createElement.bind(null,t)}function I(e){return!!e&&e.$$typeof===_}function M(t){return I(t)?e.cloneElement.apply(null,arguments):t}function W(t){return!!t.__k&&(e.render(null,t),!0)}function T(e){return null==e?null:1==e.nodeType?e:p(e.__i)}var z=(e,t)=>e(t),V=e.Fragment,q=(e,t)=>e(t),B={useState:t.useState,useReducer:t.useReducer,flushSync:q,useEffect:t.useEffect,useLayoutEffect:t.useLayoutEffect,useRef:t.useRef,useImperativeHandle:t.useImperativeHandle,useMemo:t.useMemo,useCallback:t.useCallback,useContext:t.useContext,useDebugValue:t.useDebugValue,version:"17.0.2",Children:f,render:w,hydrate:C,unmountComponentAtNode:W,createPortal:e.createPortal,createElement:e.createElement,createContext:e.createContext,createFactory:F,cloneElement:M,createRef:e.createRef,Fragment:e.Fragment,isValidElement:I,findDOMNode:T,Component:e.Component,PureComponent:o,memo:u,forwardRef:a,unstable_batchedUpdates:z,StrictMode:V,Suspense:b,SuspenseList:y,lazy:x,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:$,createRoot:e.createRoot};Object.defineProperty(exports,"Component",{enumerable:!0,get:function(){return e.Component}}),Object.defineProperty(exports,"Fragment",{enumerable:!0,get:function(){return e.Fragment}}),Object.defineProperty(exports,"createContext",{enumerable:!0,get:function(){return e.createContext}}),Object.defineProperty(exports,"createElement",{enumerable:!0,get:function(){return e.createElement}}),Object.defineProperty(exports,"createPortal",{enumerable:!0,get:function(){return e.createPortal}}),Object.defineProperty(exports,"createRef",{enumerable:!0,get:function(){return e.createRef}}),Object.defineProperty(exports,"createRoot",{enumerable:!0,get:function(){return e.createRoot}}),exports.Children=f,exports.PureComponent=o,exports.StrictMode=V,exports.Suspense=b,exports.SuspenseList=y,exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$,exports.cloneElement=M,exports.createFactory=F,exports.default=B,exports.findDOMNode=T,exports.flushSync=q,exports.forwardRef=a,exports.hydrate=C,exports.isValidElement=I,exports.lazy=x,exports.memo=u,exports.render=w,exports.unmountComponentAtNode=W,exports.unstable_IdlePriority=5,exports.unstable_ImmediatePriority=1,exports.unstable_LowPriority=4,exports.unstable_NormalPriority=3,exports.unstable_UserBlockingPriority=2,exports.unstable_batchedUpdates=z,exports.unstable_now=D,exports.unstable_runWithPriority=function(e,t){return t()},exports.version="17.0.2",Object.keys(t).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return t[e]}})});
//# sourceMappingURL=compat.js.map

@@ -1,2 +0,2 @@

!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("preact/hooks"),require("preact")):"function"==typeof define&&define.amd?define(["exports","preact/hooks","preact"],t):t(n.preactCompat={},n.preactHooks,n.preact)}(this,function(n,t,e){function r(n,t){for(var e in t)n[e]=t[e];return n}function u(n,t){for(var e in n)if("__source"!==e&&!(e in t))return!0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return!0;return!1}function o(n){this.props=n}function i(n,t){function r(n){var e=this.props.ref,r=e==n.ref;return!r&&e&&(e.call?e(null):e.current=null),t?!t(this.props,n)||!r:u(this.props,n)}function o(t){return this.shouldComponentUpdate=r,e.createElement(n,t)}return o.displayName="Memo("+(n.displayName||n.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o}(o.prototype=new e.Component).isPureReactComponent=!0,o.prototype.shouldComponentUpdate=function(n,t){return u(this.props,n)||u(this.state,t)};var l=e.options.__b;e.options.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),l&&l(n)};var f="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function c(n){function t(t,e){var u=r({},t);return delete u.ref,n(u,(e=t.ref||e)&&("object"!=typeof e||"current"in e)?e:null)}return t.$$typeof=f,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(n.displayName||n.name)+")",t}var a=function(n,t){return null==n?null:e.toChildArray(e.toChildArray(n).map(t))},s={map:a,forEach:a,count:function(n){return n?e.toChildArray(n).length:0},only:function(n){var t=e.toChildArray(n);if(1!==t.length)throw"Children.only";return t[0]},toArray:e.toChildArray},h=e.options.__e;e.options.__e=function(n,t,e){if(n.then)for(var r,u=t;u=u.__;)if((r=u.__c)&&r.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),r.__c(n,t);h(n,t,e)};var d=e.options.unmount;function v(){this.__u=0,this.t=null,this.__b=null}function p(n){var t=n.__.__c;return t&&t.__e&&t.__e(n)}function m(n){var t,r,u;function o(o){if(t||(t=n()).then(function(n){r=n.default||n},function(n){u=n}),u)throw u;if(!r)throw t;return e.createElement(r,o)}return o.displayName="Lazy",o.__f=!0,o}function y(){this.u=null,this.o=null}e.options.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&!0===n.__h&&(n.type=null),d&&d(n)},(v.prototype=new e.Component).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=p(r.__v),o=!1,i=function(){o||(o=!0,e.__R=null,u?u(l):l())};e.__R=i;var l=function(){if(!--r.__u){if(r.state.__e){var n=r.state.__e;r.__v.__k[0]=function n(t,e,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return n(t,e,r)}),t.__c&&t.__c.__P===e&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate()}},f=!0===t.__h;r.__u++||f||r.setState({__e:r.__b=r.__v.__k[0]}),n.then(i,i)},v.prototype.componentWillUnmount=function(){this.t=[]},v.prototype.render=function(n,t){if(this.__b){if(this.__v.__k){var u=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=function n(t,e,u){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c()}),t.__c.__H=null),null!=(t=r({},t)).__c&&(t.__c.__P===u&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return n(t,e,u)})),t}(this.__b,u,o.__O=o.__P)}this.__b=null}var i=t.__e&&e.createElement(e.Fragment,null,n.fallback);return i&&(i.__h=null),[e.createElement(e.Fragment,null,t.__e?null:n.children),i]};var b=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.u=e=e[2]}};function _(n){return this.getChildContext=function(){return n.context},n.children}function S(n){var t=this,r=n.i;t.componentWillUnmount=function(){e.render(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),n.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,e){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),e.render(e.createElement(_,{context:t.context},n.__v),t.l)):t.l&&t.componentWillUnmount()}function C(n,t){return e.createElement(S,{__v:n,i:t})}(y.prototype=new e.Component).__e=function(n){var t=this,e=p(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),b(t,n,r)):u()};e?e(o):o()}},y.prototype.render=function(n){this.u=null,this.o=new Map;var t=e.toChildArray(n.children);n.revealOrder&&"b"===n.revealOrder[0]&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return n.children},y.prototype.componentDidUpdate=y.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){b(n,e,t)})};var w="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,g=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,E="undefined"!=typeof document,R=function(n){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(n)};function x(n,t,r){return null==t.__k&&(t.textContent=""),e.render(n,t),"function"==typeof r&&r(),n?n.__c:null}function N(n,t,r){return e.hydrate(n,t),"function"==typeof r&&r(),n?n.__c:null}e.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(n){Object.defineProperty(e.Component.prototype,n,{configurable:!0,get:function(){return this["UNSAFE_"+n]},set:function(t){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:t})}})});var k=e.options.event;function O(){}function A(){return this.cancelBubble}function L(){return this.defaultPrevented}e.options.event=function(n){return k&&(n=k(n)),n.persist=O,n.isPropagationStopped=A,n.isDefaultPrevented=L,n.nativeEvent=n};var U,j={configurable:!0,get:function(){return this.class}},M=e.options.vnode;e.options.vnode=function(n){var t=n.type,r=n.props,u=r;if("string"==typeof t){var o=-1===t.indexOf("-");for(var i in u={},r){var l=r[i];E&&"children"===i&&"noscript"===t||"value"===i&&"defaultValue"in r&&null==l||("defaultValue"===i&&"value"in r&&null==r.value?i="value":"download"===i&&!0===l?l="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+t)&&!R(r.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():o&&g.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===l&&(l=void 0),u[i]=l)}"select"==t&&u.multiple&&Array.isArray(u.value)&&(u.value=e.toChildArray(r.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value)})),"select"==t&&null!=u.defaultValue&&(u.value=e.toChildArray(r.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value})),n.props=u,r.class!=r.className&&(j.enumerable="className"in r,null!=r.className&&(u.class=r.className),Object.defineProperty(u,"className",j))}n.$$typeof=w,M&&M(n)};var T=e.options.__r;e.options.__r=function(n){T&&T(n),U=n.__c};var D={ReactCurrentDispatcher:{current:{readContext:function(n){return U.__n[n.__c].props.value}}}};function F(n){return e.createElement.bind(null,n)}function I(n){return!!n&&n.$$typeof===w}function W(n){return I(n)?e.cloneElement.apply(null,arguments):n}function P(n){return!!n.__k&&(e.render(null,n),!0)}function V(n){return n&&(n.base||1===n.nodeType&&n)||null}var z=function(n,t){return n(t)},B=function(n,t){return n(t)},$=e.Fragment,q={useState:t.useState,useReducer:t.useReducer,useEffect:t.useEffect,useLayoutEffect:t.useLayoutEffect,useRef:t.useRef,useImperativeHandle:t.useImperativeHandle,useMemo:t.useMemo,useCallback:t.useCallback,useContext:t.useContext,useDebugValue:t.useDebugValue,version:"17.0.2",Children:s,render:x,hydrate:N,unmountComponentAtNode:P,createPortal:C,createElement:e.createElement,createContext:e.createContext,createFactory:F,cloneElement:W,createRef:e.createRef,Fragment:e.Fragment,isValidElement:I,findDOMNode:V,Component:e.Component,PureComponent:o,memo:i,forwardRef:c,flushSync:B,unstable_batchedUpdates:z,StrictMode:$,Suspense:v,SuspenseList:y,lazy:m,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:D};Object.keys(t).forEach(function(e){n[e]=t[e]}),n.createElement=e.createElement,n.createContext=e.createContext,n.createRef=e.createRef,n.Fragment=e.Fragment,n.Component=e.Component,n.version="17.0.2",n.Children=s,n.render=x,n.hydrate=N,n.unmountComponentAtNode=P,n.createPortal=C,n.createFactory=F,n.cloneElement=W,n.isValidElement=I,n.findDOMNode=V,n.PureComponent=o,n.memo=i,n.forwardRef=c,n.flushSync=B,n.unstable_batchedUpdates=z,n.StrictMode=$,n.Suspense=v,n.SuspenseList=y,n.lazy=m,n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=D,n.default=q});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("preact"),require("preact/hooks")):"function"==typeof define&&define.amd?define(["exports","preact","preact/hooks"],n):n((e||self).preactCompat={},e.preact,e.hooks)}(this,function(e,n,t){var r=/^(-|f[lo].*[^se]$|g.{5,}[^ps]$|z|o[pr]|(W.{5})?[lL]i.*(t|mp)$|an|(bo|s).{4}Im|sca|m.{6}[ds]|ta|c.*[st]$|wido|ini)/;function o(e,n){for(var t in e)if("__source"!==t&&!(t in n))return!0;for(var r in n)if("__source"!==r&&e[r]!==n[r])return!0;return!1}function u(e){this.props=e}function i(e,t){function r(){}return r.prototype=new n.Component,r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.render=function(t){return n.createElement(e,t)},r.prototype.shouldComponentUpdate=function(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:o(this.props,e)},r.prototype.isReactComponent=!0,r.__f=!0,r}(u.prototype=new n.Component).isPureReactComponent=!0,u.prototype.shouldComponentUpdate=function(e,n){return o(this.props,e)||o(this.state,n)};var l=n.options.__b;n.options.__b=(e,n)=>{e.type&&e.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null,e.ref=null),l&&l(e,n)};var f="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function a(e){function n(n,t){var r=Object.assign({},n);return delete r.ref,e(r,!(t=n.ref||t)||"object"==typeof t&&!("current"in t)?null:t)}return n.$$typeof=f,n.render=n,n.prototype.isReactComponent=n.__f=!0,n.displayName="ForwardRef("+(e.displayName||e.name)+")",n}var c=(e,t)=>null==e?null:n.toChildArray(n.toChildArray(e).map(t)),s={map:c,forEach:c,count:e=>e?n.toChildArray(e).length:0,only(e){var t=n.toChildArray(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:n.toChildArray};Promise.prototype.then.bind(Promise.resolve());var p=e=>28&e.flags&&(!(16&e.flags)||e.props.__P==m(e.__));function h(e,n){if(null==e.__k)return null;for(n=n||0;n<e.__k.length;n++){var t=e.__k[n];if(null!=t){if(3&t.flags)return t.__e;if(p(t)){var r=h(t);if(r)return r}}}return null}function m(e){for(var n=16&e.flags?e.props.__P:null,t=e.__;null==n&&t;)16&t.flags?n=t.props.__P:2&t.flags&&(n=t.__e),t=t.__;return n}var d=n.options.__e;n.options.__e=function(e,n){if(e.then)for(var t,r=n;r=r.__;)if((t=r.__c)&&t.__c)return t.__c(e,n);d(e,n)};var v=n.options.unmount;function b(){this.__u=0,this.t=null,this.__P=null,this.o=0}function y(e){var n=e.__.__c;return n&&n.__e&&n.__e(e)}function g(e){var t,r,o;function u(u){if(t||(t=e()).then(e=>{r=e.default||e},e=>{o=e}),o)throw o;if(!r)throw t;return n.createElement(r,u)}return u.displayName="Lazy",u.__f=!0,u}function _(){this.u=null,this.i=null}n.options.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&32==(32&e.flags)&&(e.flags|=2),v&&v(e)},(b.prototype=new n.Component).__c=function(e,n){var t=n.__c;if(null==t.__R){var r=this;null==r.t&&(r.t=[]),r.t.push(t);var o=y(r.__i),u=!1,i=()=>{u||(u=!0,t.__R=null,o?o(l):l())};t.__R=i;var l=()=>{var e;if(!--r.__u)for(this.__P=null,r.setState({__e:!1});e=r.t.pop();)e.forceUpdate()},f=32==(32&n.flags);r.__u++||f||(this.__P=document.createElement("div"),r.setState({__e:!0})),e.then(i,i)}},b.prototype.componentWillUnmount=function(){this.t=[],this.__P=null},b.prototype.render=function(e,t){null==this.__P&&(this.__P=m(this.__i));var r=t.__e&&n.createElement(n.Fragment,null,e.fallback),o=n.createPortal(e.children,this.__P);return t.__e?o.__v=this.o:this.o=o.__v,[o,r]};var O=(e,n,t)=>{if(++t[1]===t[0]&&e.i.delete(n.props),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.i.size))for(t=e.u;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;e.u=t=t[2]}};(_.prototype=new n.Component).__e=function(e){var n=this,t=y(n.__i),r=n.i.get(e.props);return r[0]++,o=>{var u=()=>{n.props.revealOrder?(r.push(o),O(n,e,r)):o()};t?t(u):u()}},_.prototype.render=function(e){this.u=null,this.i=new Map;var t=n.toChildArray(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var r=t.length;r--;)this.i.set(t[r].props,this.u=[1,0,this.u]);return e.children},_.prototype.componentDidUpdate=_.prototype.componentDidMount=function(){this.i.forEach((e,n)=>{O(this,{props:n},e)})};var j="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,S=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,w="undefined"!=typeof document,C=e=>("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e);function R(e,t,r){null==t.__k&&(t.textContent=""),n.render(e,t),"function"==typeof r&&r();var o=t.__k.__k[0];return o?o.__c:null}function E(e,t,r){return n.hydrate(e,t),"function"==typeof r&&r(),e?e.__c:null}n.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(e=>{Object.defineProperty(n.Component.prototype,e,{configurable:!0,get(){return this["UNSAFE_"+e]},set(n){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:n})}})});var x=n.options.event;function k(){}function A(){return this.cancelBubble}function L(){return this.defaultPrevented}n.options.event=e=>(x&&(e=x(e)),e.persist=k,e.isPropagationStopped=A,e.isDefaultPrevented=L,e.nativeEvent=e);var N,P={configurable:!0,get(){return this.class}},T=n.options.vnode;n.options.vnode=e=>{var t,o=e.type,u=e.props,i=u;if("string"==typeof o){var l=-1===o.indexOf("-");i={};var f=u.style;if("object"==typeof f)for(t in f)"number"!=typeof f[t]||r.test(t)||(f[t]+="px");for(t in u){var a=u[t];w&&"children"===t&&"noscript"===o||"value"===t&&"defaultValue"in u&&null==a||("defaultValue"===t&&"value"in u&&null==u.value?t="value":"download"===t&&!0===a?a="":/ondoubleclick/i.test(t)?t="ondblclick":/^onchange(textarea|input)/i.test(t+o)&&!C(u.type)?t="oninput":/^onfocus$/i.test(t)?t="onfocusin":/^onblur$/i.test(t)?t="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(t)?t=t.toLowerCase():l&&S.test(t)?t=t.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===a&&(a=void 0),i[t]=a)}"select"==o&&i.multiple&&Array.isArray(i.value)&&(i.value=n.toChildArray(u.children).forEach(e=>{e.props.selected=-1!=i.value.indexOf(e.props.value)})),"select"==o&&null!=i.defaultValue&&(i.value=n.toChildArray(u.children).forEach(e=>{e.props.selected=i.multiple?-1!=i.defaultValue.indexOf(e.props.value):i.defaultValue==e.props.value})),e.props=i,o&&u.class!=u.className&&(P.enumerable="className"in u,null!=u.className&&(i.class=u.className),Object.defineProperty(i,"className",P))}else if("function"==typeof o&&o.defaultProps)for(t in o.defaultProps)void 0===i[t]&&(i[t]=o.defaultProps[t]);e.$$typeof=j,T&&T(e)};var U=n.options.__r;n.options.__r=function(e){U&&U(e),N=function(e){for(var n=e.c,t=e.__;null==n&&t;)n=t.c,t=t.__;return n}(e)};var $={ReactCurrentDispatcher:{current:{readContext:e=>N[e.__c].props.value}}},D="object"==typeof performance&&"function"==typeof performance.now?performance.now.bind(performance):()=>Date.now(),F="17.0.2";function I(e){return n.createElement.bind(null,e)}function M(e){return!!e&&e.$$typeof===j}function W(e){return M(e)?n.cloneElement.apply(null,arguments):e}function z(e){return!!e.__k&&(n.render(null,e),!0)}function V(e){return null==e?null:1==e.nodeType?e:h(e.__i)}var q=(e,n)=>e(n),B=n.Fragment,H=(e,n)=>e(n),Z={useState:t.useState,useReducer:t.useReducer,flushSync:H,useEffect:t.useEffect,useLayoutEffect:t.useLayoutEffect,useRef:t.useRef,useImperativeHandle:t.useImperativeHandle,useMemo:t.useMemo,useCallback:t.useCallback,useContext:t.useContext,useDebugValue:t.useDebugValue,version:F,Children:s,render:R,hydrate:E,unmountComponentAtNode:z,createPortal:n.createPortal,createElement:n.createElement,createContext:n.createContext,createFactory:I,cloneElement:W,createRef:n.createRef,Fragment:n.Fragment,isValidElement:M,findDOMNode:V,Component:n.Component,PureComponent:u,memo:i,forwardRef:a,unstable_batchedUpdates:q,StrictMode:B,Suspense:b,SuspenseList:_,lazy:g,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:$,createRoot:n.createRoot};Object.defineProperty(e,"Component",{enumerable:!0,get:function(){return n.Component}}),Object.defineProperty(e,"Fragment",{enumerable:!0,get:function(){return n.Fragment}}),Object.defineProperty(e,"createContext",{enumerable:!0,get:function(){return n.createContext}}),Object.defineProperty(e,"createElement",{enumerable:!0,get:function(){return n.createElement}}),Object.defineProperty(e,"createPortal",{enumerable:!0,get:function(){return n.createPortal}}),Object.defineProperty(e,"createRef",{enumerable:!0,get:function(){return n.createRef}}),Object.defineProperty(e,"createRoot",{enumerable:!0,get:function(){return n.createRoot}}),e.Children=s,e.PureComponent=u,e.StrictMode=B,e.Suspense=b,e.SuspenseList=_,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$,e.cloneElement=W,e.createFactory=I,e.default=Z,e.findDOMNode=V,e.flushSync=H,e.forwardRef=a,e.hydrate=E,e.isValidElement=M,e.lazy=g,e.memo=i,e.render=R,e.unmountComponentAtNode=z,e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_UserBlockingPriority=2,e.unstable_batchedUpdates=q,e.unstable_now=D,e.unstable_runWithPriority=function(e,n){return n()},e.version=F,Object.keys(t).forEach(function(n){"default"===n||e.hasOwnProperty(n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})})});
//# sourceMappingURL=compat.umd.js.map

@@ -1,3 +0,1 @@

require('preact/compat');
module.exports = require('preact/jsx-runtime');

@@ -1,3 +0,1 @@

require('preact/compat');
module.exports = require('preact/jsx-runtime');

@@ -7,4 +7,5 @@ {

"description": "A React compatibility layer for Preact",
"exports": "./dist/compat.mjs",
"module": "dist/compat.mjs",
"main": "dist/compat.js",
"module": "dist/compat.module.js",
"umd:main": "dist/compat.umd.js",

@@ -11,0 +12,0 @@ "source": "src/index.js",

@@ -0,0 +0,0 @@ /* eslint-disable */

@@ -0,0 +0,0 @@ import { toChildArray } from 'preact';

import { options } from 'preact';
import { assign } from './util';
let oldDiffHook = options._diff;
options._diff = vnode => {
if (vnode.type && vnode.type._forwarded && vnode.ref) {
options._diff = (internal, vnode) => {
if (internal.type && internal.type._forwarded && vnode.ref) {
vnode.props.ref = vnode.ref;
vnode.ref = null;
internal.ref = null;
}
if (oldDiffHook) oldDiffHook(vnode);
if (oldDiffHook) oldDiffHook(internal, vnode);
};

@@ -31,3 +31,3 @@

function Forwarded(props, ref) {
let clone = assign({}, props);
let clone = Object.assign({}, props);
delete clone.ref;

@@ -34,0 +34,0 @@ ref = props.ref || ref;

@@ -7,2 +7,13 @@ import * as _hooks from '../../hooks';

declare module 'preact' {
export namespace preact {
interface FunctionComponent<P = {}> {
defaultProps?: Partial<P>;
}
interface ComponentClass<P = {}, S = {}> {
defaultProps?: Partial<P>;
}
}
}
// export default React;

@@ -54,2 +65,4 @@ export = React;

export function flushSync(cb: (arg: any) => any, arg: any): void;
export function createPortal(

@@ -56,0 +69,0 @@ vnode: preact.VNode,

@@ -8,3 +8,5 @@ import {

createContext,
Fragment
Fragment,
createRoot,
createPortal
} from 'preact';

@@ -29,3 +31,2 @@ import {

import { SuspenseList } from './suspense-list';
import { createPortal } from './portals';
import {

@@ -37,2 +38,4 @@ hydrate,

} from './render';
import { getChildDom } from '../../src/tree';
export * from './scheduler';

@@ -89,7 +92,9 @@ const version = '17.0.2'; // trick libraries to think we are react

function findDOMNode(component) {
return (
(component &&
(component.base || (component.nodeType === 1 && component))) ||
null
);
if (component == null) {
return null;
} else if (component.nodeType == 1) {
return component;
}
return getChildDom(component._internal);
}

@@ -108,2 +113,8 @@

/**
* Strict Mode is not implemented in Preact, so we provide a stand-in for it
* that just renders its children without imposing any restrictions.
*/
const StrictMode = Fragment;
/**
* In React, `flushSync` flushes the entire tree and forces a rerender. It's

@@ -119,8 +130,2 @@ * implmented here as a no-op.

/**
* Strict Mode is not implemented in Preact, so we provide a stand-in for it
* that just renders its children without imposing any restrictions.
*/
const StrictMode = Fragment;
export * from 'preact/hooks';

@@ -131,2 +136,3 @@ export {

render,
flushSync,
hydrate,

@@ -147,3 +153,2 @@ unmountComponentAtNode,

forwardRef,
flushSync,
// eslint-disable-next-line camelcase

@@ -155,3 +160,4 @@ unstable_batchedUpdates,

lazy,
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
createRoot
};

@@ -163,2 +169,3 @@

useReducer,
flushSync,
useEffect,

@@ -190,3 +197,2 @@ useLayoutEffect,

forwardRef,
flushSync,
unstable_batchedUpdates,

@@ -197,3 +203,4 @@ StrictMode,

lazy,
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
createRoot
};
import {
Component as PreactComponent,
VNode as PreactVNode,
FunctionComponent as PreactFunctionComponent
FunctionComponent as PreactFunctionComponent,
Internal as PreactInternal
} from '../../src/internal';

@@ -12,3 +13,12 @@ import { SuspenseProps } from './suspense';

export interface Internal<P = {}> extends PreactInternal<P> {
// Override some of Internal's properties with compat types (namely _component)
_parent: Internal;
_children: Internal[];
_component: Component;
}
export interface Component<P = {}, S = {}> extends PreactComponent<P, S> {
_internal?: Internal<P> | null;
isReactComponent?: object;

@@ -22,2 +32,4 @@ isPureReactComponent?: true;

_onResolve?(): void;
_parentDom?: PreactElement;
_originalParentDom?: PreactElement;

@@ -41,10 +53,10 @@ // Portal internal properties

export interface SuspenseState {
_suspended?: null | VNode<any>;
_suspended?: boolean;
}
export interface SuspenseComponent
extends PreactComponent<SuspenseProps, SuspenseState> {
extends Component<SuspenseProps, SuspenseState> {
_pendingSuspensionCount: number;
_suspenders: Component[];
_detachOnNextRender: null | VNode<any>;
_portalVNodeId: number | null;
}

@@ -1,2 +0,2 @@

import { createElement } from 'preact';
import { createElement, Component } from 'preact';
import { shallowDiffers } from './util';

@@ -12,3 +12,12 @@

export function memo(c, comparer) {
function shouldUpdate(nextProps) {
function Memoed() {}
Memoed.prototype = new Component();
Memoed.displayName = 'Memo(' + (c.displayName || c.name) + ')';
// eslint-disable-next-line
Memoed.prototype.render = function(props) {
return createElement(c, props);
};
Memoed.prototype.shouldComponentUpdate = function(nextProps) {
let ref = this.props.ref;

@@ -25,9 +34,4 @@ let updateRef = ref == nextProps.ref;

return !comparer(this.props, nextProps) || !updateRef;
}
};
function Memoed(props) {
this.shouldComponentUpdate = shouldUpdate;
return createElement(c, props);
}
Memoed.displayName = 'Memo(' + (c.displayName || c.name) + ')';
Memoed.prototype.isReactComponent = true;

@@ -34,0 +38,0 @@ Memoed._forwarded = true;

@@ -0,0 +0,0 @@ import { Component } from 'preact';

@@ -8,2 +8,4 @@ import {

} from 'preact';
import { getParentContext } from '../../src/tree';
import { IS_NON_DIMENSIONAL } from './util';

@@ -15,3 +17,2 @@ export const REACT_ELEMENT_TYPE =

const CAMEL_PROPS = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;
const IS_DOM = typeof document !== 'undefined';

@@ -75,3 +76,4 @@

return vnode ? vnode._component : null;
const internal = parent._children._children[0];
return internal ? internal._component : null;
}

@@ -114,4 +116,6 @@

options.vnode = vnode => {
let i;
let type = vnode.type;
let props = vnode.props;
/** @type {any} */
let normalizedProps = props;

@@ -124,3 +128,12 @@

for (let i in props) {
let style = props.style;
if (typeof style === 'object') {
for (i in style) {
if (typeof style[i] === 'number' && !IS_NON_DIMENSIONAL.test(i)) {
style[i] += 'px';
}
}
}
for (i in props) {
let value = props[i];

@@ -200,3 +213,3 @@

if (props.class != props.className) {
if (type && props.class != props.className) {
classNameDescriptor.enumerable = 'className' in props;

@@ -206,2 +219,8 @@ if (props.className != null) normalizedProps.class = props.className;

}
} else if (typeof type === 'function' && type.defaultProps) {
for (i in type.defaultProps) {
if (normalizedProps[i] === undefined) {
normalizedProps[i] = type.defaultProps[i];
}
}
}

@@ -215,9 +234,9 @@

// Only needed for react-relay
let currentComponent;
let currentContext;
const oldBeforeRender = options._render;
options._render = function(vnode) {
options._render = function(internal) {
if (oldBeforeRender) {
oldBeforeRender(vnode);
oldBeforeRender(internal);
}
currentComponent = vnode._component;
currentContext = getParentContext(internal);
};

@@ -233,3 +252,3 @@

readContext(context) {
return currentComponent._globalContext[context._id].props.value;
return currentContext[context._id].props.value;
}

@@ -236,0 +255,0 @@ }

@@ -0,0 +0,0 @@ import { Component, ComponentChild, ComponentChildren } from '../../src';

import { Component, toChildArray } from 'preact';
import { suspended } from './suspense.js';
import { suspended } from './suspense';

@@ -26,3 +26,3 @@ // Indexes to linked list nodes (nodes are stored as arrays to save bytes).

// resolved when revealOrder is 'together'.
list._map.delete(child);
list._map.delete(child.props);
}

@@ -63,5 +63,4 @@

const list = this;
const delegated = suspended(list._vnode);
let node = list._map.get(child);
const delegated = suspended(list._internal);
const node = list._map.get(child.props);
node[SUSPENDED_COUNT]++;

@@ -80,2 +79,3 @@

};
if (delegated) {

@@ -114,3 +114,3 @@ delegated(wrappedUnsuspend);

// [suspended_count, resolved_count, next_node, callback_0, callback_1, ...]
this._map.set(children[i], (this._next = [1, 0, this._next]));
this._map.set(children[i].props, (this._next = [1, 0, this._next]));
}

@@ -128,4 +128,4 @@ return props.children;

this._map.forEach((node, child) => {
resolve(this, child, node);
resolve(this, { props: child }, node);
});
};

@@ -0,0 +0,0 @@ import { Component, ComponentChild, ComponentChildren } from '../../src';

@@ -1,29 +0,28 @@

import { Component, createElement, options, Fragment } from 'preact';
import { assign } from './util';
import { Component, createElement, options, Fragment, createPortal } from 'preact';
import { TYPE_ELEMENT, MODE_HYDRATE } from '../../src/constants';
import { getParentDom } from '../../src/tree';
const oldCatchError = options._catchError;
options._catchError = function(error, newVNode, oldVNode) {
/** @type {(error: any, internal: import('./internal').Internal) => void} */
options._catchError = function(error, internal) {
if (error.then) {
/** @type {import('./internal').Component} */
let component;
let vnode = newVNode;
let handler = internal;
for (; (vnode = vnode._parent); ) {
if ((component = vnode._component) && component._childDidSuspend) {
if (newVNode._dom == null) {
newVNode._dom = oldVNode._dom;
newVNode._children = oldVNode._children;
}
for (; (handler = handler._parent); ) {
if ((component = handler._component) && component._childDidSuspend) {
// Don't call oldCatchError if we found a Suspense
return component._childDidSuspend(error, newVNode);
return component._childDidSuspend(error, internal);
}
}
}
oldCatchError(error, newVNode, oldVNode);
oldCatchError(error, internal);
};
const oldUnmount = options.unmount;
options.unmount = function(vnode) {
/** @type {(internal: import('./internal').Internal) => void} */
options.unmount = function(internal) {
/** @type {import('./internal').Component} */
const component = vnode._component;
const component = internal._component;
if (component && component._onResolve) {

@@ -33,64 +32,14 @@ component._onResolve();

// if the component is still hydrating
// most likely it is because the component is suspended
// we set the vnode.type as `null` so that it is not a typeof function
// so the unmount will remove the vnode._dom
if (component && vnode._hydrating === true) {
vnode.type = null;
// If a component suspended while it was hydrating and is now being unmounted,
// update it's flags so it appears to be of TYPE_ELEMENT, causing `unmount`
// to remove the DOM nodes that were awaiting hydration (which are stored on
// this internal's _dom property).
const wasHydrating = (internal.flags & MODE_HYDRATE) === MODE_HYDRATE;
if (component && wasHydrating) {
internal.flags |= TYPE_ELEMENT;
}
if (oldUnmount) oldUnmount(vnode);
if (oldUnmount) oldUnmount(internal);
};
function detachedClone(vnode, detachedParent, parentDom) {
if (vnode) {
if (vnode._component && vnode._component.__hooks) {
vnode._component.__hooks._list.forEach(effect => {
if (typeof effect._cleanup == 'function') effect._cleanup();
});
vnode._component.__hooks = null;
}
vnode = assign({}, vnode);
if (vnode._component != null) {
if (vnode._component._parentDom === parentDom) {
vnode._component._parentDom = detachedParent;
}
vnode._component = null;
}
vnode._children =
vnode._children &&
vnode._children.map(child =>
detachedClone(child, detachedParent, parentDom)
);
}
return vnode;
}
function removeOriginal(vnode, detachedParent, originalParent) {
if (vnode) {
vnode._original = null;
vnode._children =
vnode._children &&
vnode._children.map(child =>
removeOriginal(child, detachedParent, originalParent)
);
if (vnode._component) {
if (vnode._component._parentDom === detachedParent) {
if (vnode._dom) {
originalParent.insertBefore(vnode._dom, vnode._nextDom);
}
vnode._component._force = true;
vnode._component._parentDom = originalParent;
}
}
}
return vnode;
}
// having custom inheritance instead of a class here saves a lot of bytes

@@ -100,4 +49,8 @@ export function Suspense() {

this._pendingSuspensionCount = 0;
/** @type {Array<import('./internal').Internal>} */
this._suspenders = null;
this._detachOnNextRender = null;
/** @type {import('./internal').PreactElement} */
this._parentDom = null;
/** @type {number} */
this._portalVNodeId = 0;
}

@@ -113,6 +66,11 @@

* @param {Promise} promise The thrown promise
* @param {import('./internal').VNode<any, any>} suspendingVNode The suspending component
* @param {import('./internal').Internal} suspendingInternal The suspending component
*/
Suspense.prototype._childDidSuspend = function(promise, suspendingVNode) {
const suspendingComponent = suspendingVNode._component;
Suspense.prototype._childDidSuspend = function(promise, suspendingInternal) {
const suspendingComponent = suspendingInternal._component;
if (suspendingComponent._onResolve != null) {
// This component has already been handled by a Suspense component. Do
// nothing
return;
}

@@ -127,3 +85,3 @@ /** @type {import('./internal').SuspenseComponent} */

const resolve = suspended(c._vnode);
const resolve = suspended(c._internal);

@@ -148,15 +106,5 @@ let resolved = false;

if (!--c._pendingSuspensionCount) {
// If the suspension was during hydration we don't need to restore the
// suspended children into the _children array
if (c.state._suspended) {
const suspendedVNode = c.state._suspended;
c._vnode._children[0] = removeOriginal(
suspendedVNode,
suspendedVNode._component._parentDom,
suspendedVNode._component._originalParentDom
);
}
this._parentDom = null;
c.setState({ _suspended: false });
c.setState({ _suspended: (c._detachOnNextRender = null) });
let suspended;

@@ -172,8 +120,12 @@ while ((suspended = c._suspenders.pop())) {

* to remain on screen and hydrate it when the suspense actually gets resolved.
* While in non-hydration cases the usual fallback -> component flow would occour.
* While in non-hydration cases the usual fallback -> component flow would occur.
*/
const wasHydrating = suspendingVNode._hydrating === true;
const wasHydrating =
(suspendingInternal.flags & MODE_HYDRATE) === MODE_HYDRATE;
if (!c._pendingSuspensionCount++ && !wasHydrating) {
c.setState({ _suspended: (c._detachOnNextRender = c._vnode._children[0]) });
this._parentDom = document.createElement('div');
c.setState({ _suspended: true });
}
promise.then(onResolved, onResolved);

@@ -184,2 +136,3 @@ };

this._suspenders = [];
this._parentDom = null;
};

@@ -193,29 +146,20 @@

Suspense.prototype.render = function(props, state) {
if (this._detachOnNextRender) {
// When the Suspense's _vnode was created by a call to createVNode
// (i.e. due to a setState further up in the tree)
// it's _children prop is null, in this case we "forget" about the parked vnodes to detach
if (this._vnode._children) {
const detachedParent = document.createElement('div');
const detachedComponent = this._vnode._children[0]._component;
this._vnode._children[0] = detachedClone(
this._detachOnNextRender,
detachedParent,
(detachedComponent._originalParentDom = detachedComponent._parentDom)
);
}
this._detachOnNextRender = null;
if (this._parentDom == null) {
this._parentDom = getParentDom(this._internal);
}
// Wrap fallback tree in a VNode that prevents itself from being marked as aborting mid-hydration:
/** @type {import('./internal').VNode} */
const fallback =
state._suspended && createElement(Fragment, null, props.fallback);
if (fallback) fallback._hydrating = null;
return [
createElement(Fragment, null, state._suspended ? null : props.children),
fallback
];
const portal = createPortal(props.children, this._parentDom);
if (state._suspended) {
// If we are suspended, don't rerender all of the portal's children. Instead
// just reorder the Portal's children
portal._vnodeId = this._portalVNodeId;
} else {
this._portalVNodeId = portal._vnodeId;
}
return [portal, fallback];
};

@@ -225,21 +169,20 @@

* Checks and calls the parent component's _suspended method, passing in the
* suspended vnode. This is a way for a parent (e.g. SuspenseList) to get notified
* that one of its children/descendants suspended.
* suspended Internal. This is a way for a parent (e.g. SuspenseList) to get
* notified that one of its children/descendants suspended.
*
* The parent MAY return a callback. The callback will get called when the
* suspension resolves, notifying the parent of the fact.
* Moreover, the callback gets function `unsuspend` as a parameter. The resolved
* child descendant will not actually get unsuspended until `unsuspend` gets called.
* This is a way for the parent to delay unsuspending.
* suspension resolves, notifying the parent of the fact. Moreover, the callback
* gets function `unsuspend` as a parameter. The resolved child descendant will
* not actually get unsuspended until `unsuspend` gets called. This is a way for
* the parent to delay unsuspending.
*
* If the parent does not return a callback then the resolved vnode
* gets unsuspended immediately when it resolves.
* If the parent does not return a callback then the resolved Internal gets
* unsuspended immediately when it resolves.
*
* @param {import('./internal').VNode} vnode
* @param {import('./internal').Internal} internal
* @returns {((unsuspend: () => void) => void)?}
*/
export function suspended(vnode) {
/** @type {import('./internal').Component} */
let component = vnode._parent._component;
return component && component._suspended && component._suspended(vnode);
export function suspended(internal) {
let component = internal._parent._component;
return component && component._suspended && component._suspended(internal);
}

@@ -246,0 +189,0 @@

@@ -1,12 +0,2 @@

/**
* Assign properties from `props` to `obj`
* @template O, P The obj and props types
* @param {O} obj The object to copy properties to
* @param {P} props The object to copy properties from
* @returns {O & P}
*/
export function assign(obj, props) {
for (let i in props) obj[i] = props[i];
return /** @type {O & P} */ (obj);
}
export const IS_NON_DIMENSIONAL = /^(-|f[lo].*[^se]$|g.{5,}[^ps]$|z|o[pr]|(W.{5})?[lL]i.*(t|mp)$|an|(bo|s).{4}Im|sca|m.{6}[ds]|ta|c.*[st]$|wido|ini)/;

@@ -24,6 +14,1 @@ /**

}
export function removeNode(node) {
let parentNode = node.parentNode;
if (parentNode) parentNode.removeChild(node);
}
module.exports = require('preact/test-utils');

@@ -1,2 +0,2 @@

var n=require("preact");require("preact/devtools");var e={};function t(e){return e.type===n.Fragment?"Fragment":"function"==typeof e.type?e.type.displayName||e.type.name:"string"==typeof e.type?e.type:"#text"}var o=[],r=[];function a(){return o.length>0?o[o.length-1]:null}var i=!1;function s(e){return"function"==typeof e.type&&e.type!=n.Fragment}function c(n){for(var e=[n],o=n;null!=o.__o;)e.push(o.__o),o=o.__o;return e.reduce(function(n,e){n+=" in "+t(e);var o=e.__source;return o?n+=" (at "+o.fileName+":"+o.lineNumber+")":i||(i=!0,console.warn("Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons.")),n+"\n"},"")}var l="function"==typeof WeakMap,u=n.Component.prototype.setState;n.Component.prototype.setState=function(n,e){return null==this.__v?null==this.state&&console.warn('Calling "this.setState" inside the constructor of a component is a no-op and might be a bug in your application. Instead, set "this.state = {}" directly.\n\n'+c(a())):null==this.__P&&console.warn('Can\'t call "this.setState" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.\n\n'+c(this.__v)),u.call(this,n,e)};var f=n.Component.prototype.forceUpdate;function p(n){var e=n.props,o=t(n),r="";for(var a in e)if(e.hasOwnProperty(a)&&"children"!==a){var i=e[a];"function"==typeof i&&(i="function "+(i.displayName||i.name)+"() {}"),i=Object(i)!==i||i.toString?i+"":Object.prototype.toString.call(i),r+=" "+a+"="+JSON.stringify(i)}var s=e.children;return"<"+o+r+(s&&s.length?">..</"+o+">":" />")}n.Component.prototype.forceUpdate=function(n){return null==this.__v?console.warn('Calling "this.forceUpdate" inside the constructor of a component is a no-op and might be a bug in your application.\n\n'+c(a())):null==this.__P&&console.warn('Can\'t call "this.forceUpdate" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.\n\n'+c(this.__v)),f.call(this,n)},function(){!function(){var e=n.options.__b,t=n.options.diffed,a=n.options.__,i=n.options.vnode,c=n.options.__r;n.options.diffed=function(n){s(n)&&r.pop(),o.pop(),t&&t(n)},n.options.__b=function(n){s(n)&&o.push(n),e&&e(n)},n.options.__=function(n,e){r=[],a&&a(n,e)},n.options.vnode=function(n){n.__o=r.length>0?r[r.length-1]:null,i&&i(n)},n.options.__r=function(n){s(n)&&r.push(n),c&&c(n)}}();var a=!1,i=n.options.__b,u=n.options.diffed,f=n.options.vnode,d=n.options.__e,h=n.options.__,y=n.options.__h,v=l?{useEffect:new WeakMap,useLayoutEffect:new WeakMap,lazyPropTypes:new WeakMap}:null,m=[];n.options.__e=function(n,e,o){if(e&&e.__c&&"function"==typeof n.then){var r=n;n=new Error("Missing Suspense. The throwing component was: "+t(e));for(var a=e;a;a=a.__)if(a.__c&&a.__c.__c){n=r;break}if(n instanceof Error)throw n}try{d(n,e,o),"function"!=typeof n.then&&setTimeout(function(){throw n})}catch(n){throw n}},n.options.__=function(n,e){if(!e)throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");var o;switch(e.nodeType){case 1:case 11:case 9:o=!0;break;default:o=!1}if(!o){var r=t(n);throw new Error("Expected a valid HTML node as a second argument to render.\tReceived "+e+" instead: render(<"+r+" />, "+e+");")}h&&h(n,e)},n.options.__b=function(n){var o=n.type,r=function n(e){return e?"function"==typeof e.type?n(e.__):e:{}}(n.__);if(a=!0,void 0===o)throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports"+p(n)+"\n\n"+c(n));if(null!=o&&"object"==typeof o){if(void 0!==o.__k&&void 0!==o.__e)throw new Error("Invalid type passed to createElement(): "+o+"\n\nDid you accidentally pass a JSX literal as JSX twice?\n\n let My"+t(n)+" = "+p(o)+";\n let vnode = <My"+t(n)+" />;\n\nThis usually happens when you export a JSX literal and not the component.\n\n"+c(n));throw new Error("Invalid type passed to createElement(): "+(Array.isArray(o)?"array":o))}if("thead"!==o&&"tfoot"!==o&&"tbody"!==o||"table"===r.type?"tr"===o&&"thead"!==r.type&&"tfoot"!==r.type&&"tbody"!==r.type&&"table"!==r.type?console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot/table> parent."+p(n)+"\n\n"+c(n)):"td"===o&&"tr"!==r.type?console.error("Improper nesting of table. Your <td> should have a <tr> parent."+p(n)+"\n\n"+c(n)):"th"===o&&"tr"!==r.type&&console.error("Improper nesting of table. Your <th> should have a <tr>."+p(n)+"\n\n"+c(n)):console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent."+p(n)+"\n\n"+c(n)),void 0!==n.ref&&"function"!=typeof n.ref&&"object"!=typeof n.ref&&!("$$typeof"in n))throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got ['+typeof n.ref+"] instead\n"+p(n)+"\n\n"+c(n));if("string"==typeof n.type)for(var s in n.props)if("o"===s[0]&&"n"===s[1]&&"function"!=typeof n.props[s]&&null!=n.props[s])throw new Error("Component's \""+s+'" property should be a function, but got ['+typeof n.props[s]+"] instead\n"+p(n)+"\n\n"+c(n));if("function"==typeof n.type&&n.type.propTypes){if("Lazy"===n.type.displayName&&v&&!v.lazyPropTypes.has(n.type)){var l="PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try{var u=n.type();v.lazyPropTypes.set(n.type,!0),console.warn(l+"Component wrapped in lazy() is "+t(u))}catch(n){console.warn(l+"We will log the wrapped component's name once it is loaded.")}}var f=n.props;n.type.__f&&delete(f=function(n,e){for(var t in e)n[t]=e[t];return n}({},f)).ref,function(n,t,o,r,a){Object.keys(n).forEach(function(o){var i;try{i=n[o](t,o,r,"prop",null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(n){i=n}!i||i.message in e||(e[i.message]=!0,console.error("Failed prop type: "+i.message+(a&&"\n"+a()||"")))})}(n.type.propTypes,f,0,t(n),function(){return c(n)})}i&&i(n)},n.options.__h=function(n,e,t){if(!n||!a)throw new Error("Hook can only be invoked from render methods.");y&&y(n,e,t)};var b=function(n,e){return{get:function(){var t="get"+n+e;m&&m.indexOf(t)<0&&(m.push(t),console.warn("getting vnode."+n+" is deprecated, "+e))},set:function(){var t="set"+n+e;m&&m.indexOf(t)<0&&(m.push(t),console.warn("setting vnode."+n+" is not allowed, "+e))}}},w={nodeName:b("nodeName","use vnode.type"),attributes:b("attributes","use vnode.props"),children:b("children","use vnode.props.children")},g=Object.create({},w);n.options.vnode=function(n){var e=n.props;if(null!==n.type&&null!=e&&("__source"in e||"__self"in e)){var t=n.props={};for(var o in e){var r=e[o];"__source"===o?n.__source=r:"__self"===o?n.__self=r:t[o]=r}}n.__proto__=g,f&&f(n)},n.options.diffed=function(n){if(n.__k&&n.__k.forEach(function(e){if(e&&void 0===e.type){delete e.__,delete e.__b;var t=Object.keys(e).join(",");throw new Error("Objects are not valid as a child. Encountered an object with the keys {"+t+"}.\n\n"+c(n))}}),a=!1,u&&u(n),null!=n.__k)for(var e=[],t=0;t<n.__k.length;t++){var o=n.__k[t];if(o&&null!=o.key){var r=o.key;if(-1!==e.indexOf(r)){console.error('Following component has two or more children with the same key attribute: "'+r+'". This may cause glitches and misbehavior in rendering process. Component: \n\n'+p(n)+"\n\n"+c(n));break}e.push(r)}}}}(),exports.resetPropWarnings=function(){e={}};
var e=require("preact"),n=require("preact/src/constants"),t=require("preact/compat/src/util");require("preact/devtools");var o={};function r(n){return n.type===e.Fragment?"Fragment":"function"==typeof n.type?n.type.displayName||n.type.name:"string"==typeof n.type?n.type:"#text"}var a=[],i=[];function s(){return a.length>0?a[a.length-1]:null}var c=!1;function l(n){return"function"==typeof n.type&&n.type!=e.Fragment}function p(e){for(var n=[e],t=e;null!=t.__o;)n.push(t.__o),t=t.__o;return n.reduce((e,n)=>{e+=" in "+r(n);var t=n.props&&n.props.__source;return t?e+=" (at "+t.fileName+":"+t.lineNumber+")":c||(c=!0,console.warn("Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons.")),e+"\n"},"")}var u="function"==typeof WeakMap;function d(e){return e?"function"==typeof e.type?d(e.__):e:{}}var f=e.Component.prototype.setState;e.Component.prototype.setState=function(e,t){return null==this.__i?null==this.state&&console.warn('Calling "this.setState" inside the constructor of a component is a no-op and might be a bug in your application. Instead, set "this.state = {}" directly.\n\n'+p(s())):this.__i.flags&n.MODE_UNMOUNTING&&console.warn('Can\'t call "this.setState" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.\n\n'+p(this.__i)),f.call(this,e,t)};var h=e.Component.prototype.forceUpdate;function y(e){var{props:n}=e,t=r(e),o="";for(var a in n)if(n.hasOwnProperty(a)&&"children"!==a){var i=n[a];"function"==typeof i&&(i="function "+(i.displayName||i.name)+"() {}"),i=Object(i)!==i||i.toString?i+"":Object.prototype.toString.call(i),o+=" "+a+"="+JSON.stringify(i)}var s=n.children;return"<"+t+o+(s&&s.length?">..</"+t+">":" />")}e.Component.prototype.forceUpdate=function(e){return null==this.__i?console.warn('Calling "this.forceUpdate" inside the constructor of a component is a no-op and might be a bug in your application.\n\n'+p(s())):this.__i.flags&n.MODE_UNMOUNTING&&console.warn('Can\'t call "this.forceUpdate" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.\n\n'+p(this.__i)),h.call(this,e)},function(){!function(){var n=e.options.__b,t=e.options.diffed,o=e.options.__,r=e.options.vnode,s=e.options.__i,c=e.options.__r;e.options.diffed=e=>{l(e)&&i.pop(),a.pop(),t&&t(e)},e.options.__b=(e,t)=>{l(e)&&a.push(e),n&&n(e,t)},e.options.__=(e,n)=>{i=[],o&&o(e,n)},e.options.vnode=e=>{e.__o=i.length>0?i[i.length-1]:null,r&&r(e)},e.options.__i=(e,n)=>{null!==e.type&&(e.__o=n.__o),s&&s(e,n)},e.options.__r=e=>{l(e)&&i.push(e),c&&c(e)}}();var n=!1,s=e.options.__b,c=e.options.diffed,f=e.options.vnode,h=e.options.__e,m=e.options.__,v=e.options.__h,b=u?{useEffect:new WeakMap,useLayoutEffect:new WeakMap,lazyPropTypes:new WeakMap}:null,w=[];e.options.__e=(e,n,t)=>{if(n&&n.__c&&"function"==typeof e.then){var o=e;e=new Error("Missing Suspense. The throwing component was: "+r(n));for(var a=n;a;a=a.__)if(a.__c&&a.__c.__c){e=o;break}if(e instanceof Error)throw e}try{h(e,n,t),"function"!=typeof e.then&&setTimeout(()=>{throw e})}catch(e){throw e}},e.options.__=(e,n)=>{if(!n)throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");var t;switch(n.nodeType){case 1:case 11:case 9:t=!0;break;default:t=!1}if(!t){var o=r(e);throw new Error("Expected a valid HTML node as a second argument to render.\tReceived "+n+" instead: render(<"+o+" />, "+n+");")}m&&m(e,n)},e.options.__b=(e,a)=>{if(null!==a&&"object"==typeof a){if(void 0!==a.constructor){var i=Object.keys(a).join(",");throw new Error("Objects are not valid as a child. Encountered an object with the keys {"+i+"}.\n\n"+p(e))}var{type:c,__:l}=e;if(void 0===c)throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports"+y(a)+"\n\n"+p(e));if(null!=c&&"object"==typeof c){if(void 0===c.constructor)throw new Error("Invalid type passed to createElement(): "+c+"\n\nDid you accidentally pass a JSX literal as JSX twice?\n\n let My"+r(e)+" = "+y(c)+";\n let vnode = <My"+r(e)+" />;\n\nThis usually happens when you export a JSX literal and not the component.\n\n"+p(e));throw new Error("Invalid type passed to createElement(): "+(Array.isArray(c)?"array":c))}var u=d(l);n=!0,"thead"!==c&&"tfoot"!==c&&"tbody"!==c||"table"===u.type?"tr"===c&&"thead"!==u.type&&"tfoot"!==u.type&&"tbody"!==u.type&&"table"!==u.type?console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot/table> parent."+y(e)+"\n\n"+p(e)):"td"===c&&"tr"!==u.type?console.error("Improper nesting of table. Your <td> should have a <tr> parent."+y(e)+"\n\n"+p(e)):"th"===c&&"tr"!==u.type&&console.error("Improper nesting of table. Your <th> should have a <tr>."+y(e)+"\n\n"+p(e)):console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent."+y(e)+"\n\n"+p(e));var f="$$typeof"in a;if(void 0!==e.ref&&"function"!=typeof e.ref&&"object"!=typeof e.ref&&!f)throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got ['+typeof e.ref+"] instead\n"+y(e)+"\n\n"+p(e));if("string"==typeof e.type)for(var h in a.props){if("o"===h[0]&&"n"===h[1]&&"function"!=typeof a.props[h]&&null!=a.props[h])throw new Error("Component's \""+h+'" property should be a function, but got ['+typeof a.props[h]+"] instead\n"+y(a)+"\n\n"+p(e));if(!f&&"style"===h&&null!==a.props[h]&&"object"==typeof a.props[h]){var m=a.props[h];for(var v in m)"number"!=typeof m[v]||t.IS_NON_DIMENSIONAL.test(v)||console.warn('Numeric CSS property value is missing a "px" unit: '+v+": "+m[v]+'"\n'+y(a)+"\n\n"+p(a))}}if("function"==typeof e.type&&e.type.propTypes){if("Lazy"===e.type.displayName&&b&&!b.lazyPropTypes.has(e.type)){var w="PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try{var g=e.type();b.lazyPropTypes.set(e.type,!0),console.warn(w+"Component wrapped in lazy() is "+r(g))}catch(e){console.warn(w+"We will log the wrapped component's name once it is loaded.")}}var E=a?a.props:e.props;e.type.__f&&delete(E=Object.assign({},E)).ref,function(e,n,t,r,a){Object.keys(e).forEach(t=>{var i;try{i=e[t](n,t,r,"prop",null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){i=e}i&&!(i.message in o)&&(o[i.message]=!0,console.error("Failed prop type: "+i.message+(a&&"\n"+a()||"")))})}(e.type.propTypes,E,0,r(e),()=>p(e))}s&&s(e,a)}},e.options.__h=(e,t,o)=>{if(!e||!n)throw new Error("Hook can only be invoked from render methods.");v&&v(e,t,o)};var g=(e,n)=>({get(){var t="get"+e+n;w&&w.indexOf(t)<0&&(w.push(t),console.warn("getting vnode."+e+" is deprecated, "+n))},set(){var t="set"+e+n;w&&w.indexOf(t)<0&&(w.push(t),console.warn("setting vnode."+e+" is not allowed, "+n))}}),E={nodeName:g("nodeName","use vnode.type"),attributes:g("attributes","use vnode.props"),children:g("children","use vnode.props.children")},_={__source:{enumerable:!1},__self:{enumerable:!1}},k=Object.create({},E);e.options.vnode=e=>{var n=e.props;null!=n&&("__source"in n||"__self"in n)&&(Object.defineProperties(n,_),e.__source=n.__source,e.__self=n.__self),e.__proto__=k,f&&f(e)},e.options.diffed=e=>{if(n=!1,c&&c(e),null!=e.__k)for(var t=[],o=0;o<e.__k.length;o++){var r=e.__k[o];if(r&&null!=r.key){var a=r.key;if(-1!==t.indexOf(a)){console.error('Following component has two or more children with the same key attribute: "'+a+'". This may cause glitches and misbehavior in rendering process. Component: \n\n'+y(e)+"\n\n"+p(e));break}t.push(a)}}}}(),exports.resetPropWarnings=function(){o={}};
//# sourceMappingURL=debug.js.map

@@ -1,2 +0,2 @@

!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("preact"),require("preact/devtools")):"function"==typeof define&&define.amd?define(["exports","preact","preact/devtools"],e):e(n.preactDebug={},n.preact)}(this,function(n,e){var t={};function o(n){return n.type===e.Fragment?"Fragment":"function"==typeof n.type?n.type.displayName||n.type.name:"string"==typeof n.type?n.type:"#text"}var r=[],i=[];function a(){return r.length>0?r[r.length-1]:null}var s=!1;function c(n){return"function"==typeof n.type&&n.type!=e.Fragment}function u(n){for(var e=[n],t=n;null!=t.__o;)e.push(t.__o),t=t.__o;return e.reduce(function(n,e){n+=" in "+o(e);var t=e.__source;return t?n+=" (at "+t.fileName+":"+t.lineNumber+")":s||(s=!0,console.warn("Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons.")),n+"\n"},"")}var l="function"==typeof WeakMap,f=e.Component.prototype.setState;e.Component.prototype.setState=function(n,e){return null==this.__v?null==this.state&&console.warn('Calling "this.setState" inside the constructor of a component is a no-op and might be a bug in your application. Instead, set "this.state = {}" directly.\n\n'+u(a())):null==this.__P&&console.warn('Can\'t call "this.setState" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.\n\n'+u(this.__v)),f.call(this,n,e)};var p=e.Component.prototype.forceUpdate;function d(n){var e=n.props,t=o(n),r="";for(var i in e)if(e.hasOwnProperty(i)&&"children"!==i){var a=e[i];"function"==typeof a&&(a="function "+(a.displayName||a.name)+"() {}"),a=Object(a)!==a||a.toString?a+"":Object.prototype.toString.call(a),r+=" "+i+"="+JSON.stringify(a)}var s=e.children;return"<"+t+r+(s&&s.length?">..</"+t+">":" />")}e.Component.prototype.forceUpdate=function(n){return null==this.__v?console.warn('Calling "this.forceUpdate" inside the constructor of a component is a no-op and might be a bug in your application.\n\n'+u(a())):null==this.__P&&console.warn('Can\'t call "this.forceUpdate" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.\n\n'+u(this.__v)),p.call(this,n)},function(){!function(){var n=e.options.__b,t=e.options.diffed,o=e.options.__,a=e.options.vnode,s=e.options.__r;e.options.diffed=function(n){c(n)&&i.pop(),r.pop(),t&&t(n)},e.options.__b=function(e){c(e)&&r.push(e),n&&n(e)},e.options.__=function(n,e){i=[],o&&o(n,e)},e.options.vnode=function(n){n.__o=i.length>0?i[i.length-1]:null,a&&a(n)},e.options.__r=function(n){c(n)&&i.push(n),s&&s(n)}}();var n=!1,a=e.options.__b,s=e.options.diffed,f=e.options.vnode,p=e.options.__e,h=e.options.__,y=e.options.__h,v=l?{useEffect:new WeakMap,useLayoutEffect:new WeakMap,lazyPropTypes:new WeakMap}:null,m=[];e.options.__e=function(n,e,t){if(e&&e.__c&&"function"==typeof n.then){var r=n;n=new Error("Missing Suspense. The throwing component was: "+o(e));for(var i=e;i;i=i.__)if(i.__c&&i.__c.__c){n=r;break}if(n instanceof Error)throw n}try{p(n,e,t),"function"!=typeof n.then&&setTimeout(function(){throw n})}catch(n){throw n}},e.options.__=function(n,e){if(!e)throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");var t;switch(e.nodeType){case 1:case 11:case 9:t=!0;break;default:t=!1}if(!t){var r=o(n);throw new Error("Expected a valid HTML node as a second argument to render.\tReceived "+e+" instead: render(<"+r+" />, "+e+");")}h&&h(n,e)},e.options.__b=function(e){var r=e.type,i=function n(e){return e?"function"==typeof e.type?n(e.__):e:{}}(e.__);if(n=!0,void 0===r)throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports"+d(e)+"\n\n"+u(e));if(null!=r&&"object"==typeof r){if(void 0!==r.__k&&void 0!==r.__e)throw new Error("Invalid type passed to createElement(): "+r+"\n\nDid you accidentally pass a JSX literal as JSX twice?\n\n let My"+o(e)+" = "+d(r)+";\n let vnode = <My"+o(e)+" />;\n\nThis usually happens when you export a JSX literal and not the component.\n\n"+u(e));throw new Error("Invalid type passed to createElement(): "+(Array.isArray(r)?"array":r))}if("thead"!==r&&"tfoot"!==r&&"tbody"!==r||"table"===i.type?"tr"===r&&"thead"!==i.type&&"tfoot"!==i.type&&"tbody"!==i.type&&"table"!==i.type?console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot/table> parent."+d(e)+"\n\n"+u(e)):"td"===r&&"tr"!==i.type?console.error("Improper nesting of table. Your <td> should have a <tr> parent."+d(e)+"\n\n"+u(e)):"th"===r&&"tr"!==i.type&&console.error("Improper nesting of table. Your <th> should have a <tr>."+d(e)+"\n\n"+u(e)):console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent."+d(e)+"\n\n"+u(e)),void 0!==e.ref&&"function"!=typeof e.ref&&"object"!=typeof e.ref&&!("$$typeof"in e))throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got ['+typeof e.ref+"] instead\n"+d(e)+"\n\n"+u(e));if("string"==typeof e.type)for(var s in e.props)if("o"===s[0]&&"n"===s[1]&&"function"!=typeof e.props[s]&&null!=e.props[s])throw new Error("Component's \""+s+'" property should be a function, but got ['+typeof e.props[s]+"] instead\n"+d(e)+"\n\n"+u(e));if("function"==typeof e.type&&e.type.propTypes){if("Lazy"===e.type.displayName&&v&&!v.lazyPropTypes.has(e.type)){var c="PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try{var l=e.type();v.lazyPropTypes.set(e.type,!0),console.warn(c+"Component wrapped in lazy() is "+o(l))}catch(n){console.warn(c+"We will log the wrapped component's name once it is loaded.")}}var f=e.props;e.type.__f&&delete(f=function(n,e){for(var t in e)n[t]=e[t];return n}({},f)).ref,function(n,e,o,r,i){Object.keys(n).forEach(function(o){var a;try{a=n[o](e,o,r,"prop",null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(n){a=n}!a||a.message in t||(t[a.message]=!0,console.error("Failed prop type: "+a.message+(i&&"\n"+i()||"")))})}(e.type.propTypes,f,0,o(e),function(){return u(e)})}a&&a(e)},e.options.__h=function(e,t,o){if(!e||!n)throw new Error("Hook can only be invoked from render methods.");y&&y(e,t,o)};var b=function(n,e){return{get:function(){var t="get"+n+e;m&&m.indexOf(t)<0&&(m.push(t),console.warn("getting vnode."+n+" is deprecated, "+e))},set:function(){var t="set"+n+e;m&&m.indexOf(t)<0&&(m.push(t),console.warn("setting vnode."+n+" is not allowed, "+e))}}},w={nodeName:b("nodeName","use vnode.type"),attributes:b("attributes","use vnode.props"),children:b("children","use vnode.props.children")},g=Object.create({},w);e.options.vnode=function(n){var e=n.props;if(null!==n.type&&null!=e&&("__source"in e||"__self"in e)){var t=n.props={};for(var o in e){var r=e[o];"__source"===o?n.__source=r:"__self"===o?n.__self=r:t[o]=r}}n.__proto__=g,f&&f(n)},e.options.diffed=function(e){if(e.__k&&e.__k.forEach(function(n){if(n&&void 0===n.type){delete n.__,delete n.__b;var t=Object.keys(n).join(",");throw new Error("Objects are not valid as a child. Encountered an object with the keys {"+t+"}.\n\n"+u(e))}}),n=!1,s&&s(e),null!=e.__k)for(var t=[],o=0;o<e.__k.length;o++){var r=e.__k[o];if(r&&null!=r.key){var i=r.key;if(-1!==t.indexOf(i)){console.error('Following component has two or more children with the same key attribute: "'+i+'". This may cause glitches and misbehavior in rendering process. Component: \n\n'+d(e)+"\n\n"+u(e));break}t.push(i)}}}}(),n.resetPropWarnings=function(){t={}}});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("preact"),require("preact/src/constants"),require("preact/compat/src/util"),require("preact/devtools")):"function"==typeof define&&define.amd?define(["exports","preact","preact/src/constants","preact/compat/src/util","preact/devtools"],n):n((e||self).preactDebug={},e.preact,e.constants,e.util)}(this,function(e,n,t,o){var r={};function a(e){return e.type===n.Fragment?"Fragment":"function"==typeof e.type?e.type.displayName||e.type.name:"string"==typeof e.type?e.type:"#text"}var i=[],s=[];function c(){return i.length>0?i[i.length-1]:null}var l=!1;function p(e){return"function"==typeof e.type&&e.type!=n.Fragment}function u(e){for(var n=[e],t=e;null!=t.__o;)n.push(t.__o),t=t.__o;return n.reduce((e,n)=>{e+=" in "+a(n);var t=n.props&&n.props.__source;return t?e+=" (at "+t.fileName+":"+t.lineNumber+")":l||(l=!0,console.warn("Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons.")),e+"\n"},"")}var d="function"==typeof WeakMap;function f(e){return e?"function"==typeof e.type?f(e.__):e:{}}var h=n.Component.prototype.setState;n.Component.prototype.setState=function(e,n){return null==this.__i?null==this.state&&console.warn('Calling "this.setState" inside the constructor of a component is a no-op and might be a bug in your application. Instead, set "this.state = {}" directly.\n\n'+u(c())):this.__i.flags&t.MODE_UNMOUNTING&&console.warn('Can\'t call "this.setState" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.\n\n'+u(this.__i)),h.call(this,e,n)};var y=n.Component.prototype.forceUpdate;function m(e){var{props:n}=e,t=a(e),o="";for(var r in n)if(n.hasOwnProperty(r)&&"children"!==r){var i=n[r];"function"==typeof i&&(i="function "+(i.displayName||i.name)+"() {}"),i=Object(i)!==i||i.toString?i+"":Object.prototype.toString.call(i),o+=" "+r+"="+JSON.stringify(i)}var s=n.children;return"<"+t+o+(s&&s.length?">..</"+t+">":" />")}n.Component.prototype.forceUpdate=function(e){return null==this.__i?console.warn('Calling "this.forceUpdate" inside the constructor of a component is a no-op and might be a bug in your application.\n\n'+u(c())):this.__i.flags&t.MODE_UNMOUNTING&&console.warn('Can\'t call "this.forceUpdate" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.\n\n'+u(this.__i)),y.call(this,e)},function(){!function(){var e=n.options.__b,t=n.options.diffed,o=n.options.__,r=n.options.vnode,a=n.options.__i,c=n.options.__r;n.options.diffed=e=>{p(e)&&s.pop(),i.pop(),t&&t(e)},n.options.__b=(n,t)=>{p(n)&&i.push(n),e&&e(n,t)},n.options.__=(e,n)=>{s=[],o&&o(e,n)},n.options.vnode=e=>{e.__o=s.length>0?s[s.length-1]:null,r&&r(e)},n.options.__i=(e,n)=>{null!==e.type&&(e.__o=n.__o),a&&a(e,n)},n.options.__r=e=>{p(e)&&s.push(e),c&&c(e)}}();var e=!1,t=n.options.__b,c=n.options.diffed,l=n.options.vnode,h=n.options.__e,y=n.options.__,v=n.options.__h,b=d?{useEffect:new WeakMap,useLayoutEffect:new WeakMap,lazyPropTypes:new WeakMap}:null,w=[];n.options.__e=(e,n,t)=>{if(n&&n.__c&&"function"==typeof e.then){var o=e;e=new Error("Missing Suspense. The throwing component was: "+a(n));for(var r=n;r;r=r.__)if(r.__c&&r.__c.__c){e=o;break}if(e instanceof Error)throw e}try{h(e,n,t),"function"!=typeof e.then&&setTimeout(()=>{throw e})}catch(e){throw e}},n.options.__=(e,n)=>{if(!n)throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");var t;switch(n.nodeType){case 1:case 11:case 9:t=!0;break;default:t=!1}if(!t){var o=a(e);throw new Error("Expected a valid HTML node as a second argument to render.\tReceived "+n+" instead: render(<"+o+" />, "+n+");")}y&&y(e,n)},n.options.__b=(n,i)=>{if(null!==i&&"object"==typeof i){if(void 0!==i.constructor){var s=Object.keys(i).join(",");throw new Error("Objects are not valid as a child. Encountered an object with the keys {"+s+"}.\n\n"+u(n))}var{type:c,__:l}=n;if(void 0===c)throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports"+m(i)+"\n\n"+u(n));if(null!=c&&"object"==typeof c){if(void 0===c.constructor)throw new Error("Invalid type passed to createElement(): "+c+"\n\nDid you accidentally pass a JSX literal as JSX twice?\n\n let My"+a(n)+" = "+m(c)+";\n let vnode = <My"+a(n)+" />;\n\nThis usually happens when you export a JSX literal and not the component.\n\n"+u(n));throw new Error("Invalid type passed to createElement(): "+(Array.isArray(c)?"array":c))}var p=f(l);e=!0,"thead"!==c&&"tfoot"!==c&&"tbody"!==c||"table"===p.type?"tr"===c&&"thead"!==p.type&&"tfoot"!==p.type&&"tbody"!==p.type&&"table"!==p.type?console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot/table> parent."+m(n)+"\n\n"+u(n)):"td"===c&&"tr"!==p.type?console.error("Improper nesting of table. Your <td> should have a <tr> parent."+m(n)+"\n\n"+u(n)):"th"===c&&"tr"!==p.type&&console.error("Improper nesting of table. Your <th> should have a <tr>."+m(n)+"\n\n"+u(n)):console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent."+m(n)+"\n\n"+u(n));var d="$$typeof"in i;if(void 0!==n.ref&&"function"!=typeof n.ref&&"object"!=typeof n.ref&&!d)throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got ['+typeof n.ref+"] instead\n"+m(n)+"\n\n"+u(n));if("string"==typeof n.type)for(var h in i.props){if("o"===h[0]&&"n"===h[1]&&"function"!=typeof i.props[h]&&null!=i.props[h])throw new Error("Component's \""+h+'" property should be a function, but got ['+typeof i.props[h]+"] instead\n"+m(i)+"\n\n"+u(n));if(!d&&"style"===h&&null!==i.props[h]&&"object"==typeof i.props[h]){var y=i.props[h];for(var v in y)"number"!=typeof y[v]||o.IS_NON_DIMENSIONAL.test(v)||console.warn('Numeric CSS property value is missing a "px" unit: '+v+": "+y[v]+'"\n'+m(i)+"\n\n"+u(i))}}if("function"==typeof n.type&&n.type.propTypes){if("Lazy"===n.type.displayName&&b&&!b.lazyPropTypes.has(n.type)){var w="PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try{var g=n.type();b.lazyPropTypes.set(n.type,!0),console.warn(w+"Component wrapped in lazy() is "+a(g))}catch(e){console.warn(w+"We will log the wrapped component's name once it is loaded.")}}var E=i?i.props:n.props;n.type.__f&&delete(E=Object.assign({},E)).ref,function(e,n,t,o,a){Object.keys(e).forEach(t=>{var i;try{i=e[t](n,t,o,"prop",null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){i=e}i&&!(i.message in r)&&(r[i.message]=!0,console.error("Failed prop type: "+i.message+(a&&"\n"+a()||"")))})}(n.type.propTypes,E,0,a(n),()=>u(n))}t&&t(n,i)}},n.options.__h=(n,t,o)=>{if(!n||!e)throw new Error("Hook can only be invoked from render methods.");v&&v(n,t,o)};var g=(e,n)=>({get(){var t="get"+e+n;w&&w.indexOf(t)<0&&(w.push(t),console.warn("getting vnode."+e+" is deprecated, "+n))},set(){var t="set"+e+n;w&&w.indexOf(t)<0&&(w.push(t),console.warn("setting vnode."+e+" is not allowed, "+n))}}),E={nodeName:g("nodeName","use vnode.type"),attributes:g("attributes","use vnode.props"),children:g("children","use vnode.props.children")},_={__source:{enumerable:!1},__self:{enumerable:!1}},k=Object.create({},E);n.options.vnode=e=>{var n=e.props;null!=n&&("__source"in n||"__self"in n)&&(Object.defineProperties(n,_),e.__source=n.__source,e.__self=n.__self),e.__proto__=k,l&&l(e)},n.options.diffed=n=>{if(e=!1,c&&c(n),null!=n.__k)for(var t=[],o=0;o<n.__k.length;o++){var r=n.__k[o];if(r&&null!=r.key){var a=r.key;if(-1!==t.indexOf(a)){console.error('Following component has two or more children with the same key attribute: "'+a+'". This may cause glitches and misbehavior in rendering process. Component: \n\n'+m(n)+"\n\n"+u(n));break}t.push(a)}}}}(),e.resetPropWarnings=function(){r={}}});
//# sourceMappingURL=debug.umd.js.map

@@ -7,4 +7,5 @@ {

"description": "Preact extensions for development",
"exports": "./dist/debug.mjs",
"module": "dist/debug.mjs",
"main": "dist/debug.js",
"module": "dist/debug.module.js",
"umd:main": "dist/debug.umd.js",

@@ -11,0 +12,0 @@ "source": "src/index.js",

@@ -0,0 +0,0 @@ const ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';

@@ -48,6 +48,6 @@ import { options, Fragment } from 'preact';

/**
* Get the currently rendered `vnode`
* @returns {import('./internal').VNode | null}
* Get the currently rendered instance
* @returns {import('./internal').Internal | null}
*/
export function getCurrentVNode() {
export function getCurrentInternal() {
return renderStack.length > 0 ? renderStack[renderStack.length - 1] : null;

@@ -66,6 +66,6 @@ }

* Check if a `vnode` is a possible owner.
* @param {import('./internal').VNode} vnode
* @param {import('./internal').Internal} internal
*/
function isPossibleOwner(vnode) {
return typeof vnode.type == 'function' && vnode.type != Fragment;
function isPossibleOwner(internal) {
return typeof internal.type == 'function' && internal.type != Fragment;
}

@@ -75,8 +75,8 @@

* Return the component stack that was captured up to this point.
* @param {import('./internal').VNode} vnode
* @param {import('./internal').Internal} internal
* @returns {string}
*/
export function getOwnerStack(vnode) {
const stack = [vnode];
let next = vnode;
export function getOwnerStack(internal) {
const stack = [internal];
let next = internal;
while (next._owner != null) {

@@ -90,3 +90,3 @@ stack.push(next._owner);

const source = owner.__source;
const source = owner.props && owner.props.__source;
if (source) {

@@ -115,17 +115,18 @@ acc += ` (at ${source.fileName}:${source.lineNumber})`;

let oldVNode = options.vnode;
let oldInternal = options._internal;
let oldRender = options._render;
options.diffed = vnode => {
if (isPossibleOwner(vnode)) {
options.diffed = internal => {
if (isPossibleOwner(internal)) {
ownerStack.pop();
}
renderStack.pop();
if (oldDiffed) oldDiffed(vnode);
if (oldDiffed) oldDiffed(internal);
};
options._diff = vnode => {
if (isPossibleOwner(vnode)) {
renderStack.push(vnode);
options._diff = (internal, vnode) => {
if (isPossibleOwner(internal)) {
renderStack.push(internal);
}
if (oldDiff) oldDiff(vnode);
if (oldDiff) oldDiff(internal, vnode);
};

@@ -144,2 +145,9 @@

options._internal = (internal, vnode) => {
if (internal.type !== null) {
internal._owner = vnode._owner;
}
if (oldInternal) oldInternal(internal, vnode);
};
options._render = vnode => {

@@ -146,0 +154,0 @@ if (isPossibleOwner(vnode)) {

export const ELEMENT_NODE = 1;
export const DOCUMENT_NODE = 9;
export const DOCUMENT_FRAGMENT_NODE = 11;

@@ -11,6 +11,7 @@ import { checkPropTypes } from './check-props';

setupComponentStack,
getCurrentVNode,
getCurrentInternal,
getDisplayName
} from './component-stack';
import { assign } from './util';
import { MODE_UNMOUNTING } from 'preact/src/constants';
import { IS_NON_DIMENSIONAL } from 'preact/compat/src/util';

@@ -116,7 +117,17 @@ const isWeakMapSupported = typeof WeakMap == 'function';

options._diff = vnode => {
let { type, _parent: parent } = vnode;
let parentVNode = getClosestDomNodeParent(parent);
options._diff = (internal, vnode) => {
if (vnode === null || typeof vnode !== 'object') return;
// Check if the user passed plain objects as children. Note that we cannot
// move this check into `options.vnode` because components can receive
// children in any shape they want (e.g.
// `<MyJSONFormatter>{{ foo: 123, bar: "abc" }}</MyJSONFormatter>`).
if (vnode.constructor !== undefined) {
const keys = Object.keys(vnode).join(',');
throw new Error(
`Objects are not valid as a child. Encountered an object with the keys {${keys}}.` +
`\n\n${getOwnerStack(internal)}`
);
}
hooksAllowed = true;
let { type, _parent: parent } = internal;

@@ -128,13 +139,13 @@ if (type === undefined) {

serializeVNode(vnode) +
`\n\n${getOwnerStack(vnode)}`
`\n\n${getOwnerStack(internal)}`
);
} else if (type != null && typeof type == 'object') {
if (type._children !== undefined && type._dom !== undefined) {
if (type.constructor === undefined) {
throw new Error(
`Invalid type passed to createElement(): ${type}\n\n` +
'Did you accidentally pass a JSX literal as JSX twice?\n\n' +
` let My${getDisplayName(vnode)} = ${serializeVNode(type)};\n` +
` let vnode = <My${getDisplayName(vnode)} />;\n\n` +
` let My${getDisplayName(internal)} = ${serializeVNode(type)};\n` +
` let vnode = <My${getDisplayName(internal)} />;\n\n` +
'This usually happens when you export a JSX literal and not the component.' +
`\n\n${getOwnerStack(vnode)}`
`\n\n${getOwnerStack(internal)}`
);

@@ -149,2 +160,6 @@ }

let parentVNode = getClosestDomNodeParent(parent);
hooksAllowed = true;
if (

@@ -156,4 +171,4 @@ (type === 'thead' || type === 'tfoot' || type === 'tbody') &&

'Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent.' +
serializeVNode(vnode) +
`\n\n${getOwnerStack(vnode)}`
serializeVNode(internal) +
`\n\n${getOwnerStack(internal)}`
);

@@ -169,4 +184,4 @@ } else if (

'Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot/table> parent.' +
serializeVNode(vnode) +
`\n\n${getOwnerStack(vnode)}`
serializeVNode(internal) +
`\n\n${getOwnerStack(internal)}`
);

@@ -176,4 +191,4 @@ } else if (type === 'td' && parentVNode.type !== 'tr') {

'Improper nesting of table. Your <td> should have a <tr> parent.' +
serializeVNode(vnode) +
`\n\n${getOwnerStack(vnode)}`
serializeVNode(internal) +
`\n\n${getOwnerStack(internal)}`
);

@@ -183,22 +198,22 @@ } else if (type === 'th' && parentVNode.type !== 'tr') {

'Improper nesting of table. Your <th> should have a <tr>.' +
serializeVNode(vnode) +
`\n\n${getOwnerStack(vnode)}`
serializeVNode(internal) +
`\n\n${getOwnerStack(internal)}`
);
}
let isCompatNode = '$$typeof' in vnode;
if (
vnode.ref !== undefined &&
typeof vnode.ref != 'function' &&
typeof vnode.ref != 'object' &&
!('$$typeof' in vnode) // allow string refs when preact-compat is installed
internal.ref !== undefined &&
typeof internal.ref != 'function' &&
typeof internal.ref != 'object' &&
!isCompatNode // allow string refs when preact-compat is installed
) {
throw new Error(
`Component's "ref" property should be a function, or an object created ` +
`by createRef(), but got [${typeof vnode.ref}] instead\n` +
serializeVNode(vnode) +
`\n\n${getOwnerStack(vnode)}`
`by createRef(), but got [${typeof internal.ref}] instead\n` +
serializeVNode(internal) +
`\n\n${getOwnerStack(internal)}`
);
}
if (typeof vnode.type == 'string') {
if (typeof internal.type == 'string') {
for (const key in vnode.props) {

@@ -215,4 +230,20 @@ if (

serializeVNode(vnode) +
`\n\n${getOwnerStack(vnode)}`
`\n\n${getOwnerStack(internal)}`
);
} else if (
!isCompatNode &&
key === 'style' &&
vnode.props[key] !== null &&
typeof vnode.props[key] === 'object'
) {
const style = vnode.props[key];
for (let i in style) {
if (typeof style[i] === 'number' && !IS_NON_DIMENSIONAL.test(i)) {
console.warn(
`Numeric CSS property value is missing a "px" unit: ${i}: ${style[i]}"\n` +
serializeVNode(vnode) +
`\n\n${getOwnerStack(vnode)}`
);
}
}
}

@@ -223,7 +254,7 @@ }

// Check prop-types if available
if (typeof vnode.type == 'function' && vnode.type.propTypes) {
if (typeof internal.type == 'function' && internal.type.propTypes) {
if (
vnode.type.displayName === 'Lazy' &&
internal.type.displayName === 'Lazy' &&
warnedComponents &&
!warnedComponents.lazyPropTypes.has(vnode.type)
!warnedComponents.lazyPropTypes.has(internal.type)
) {

@@ -233,4 +264,4 @@ const m =

try {
const lazyVNode = vnode.type();
warnedComponents.lazyPropTypes.set(vnode.type, true);
const lazyVNode = internal.type();
warnedComponents.lazyPropTypes.set(internal.type, true);
console.warn(

@@ -246,5 +277,6 @@ m + `Component wrapped in lazy() is ${getDisplayName(lazyVNode)}`

let values = vnode.props;
if (vnode.type._forwarded) {
values = assign({}, values);
// If vnode is not present we're mounting
let values = vnode ? vnode.props : internal.props;
if (internal.type._forwarded) {
values = Object.assign({}, values);
delete values.ref;

@@ -254,19 +286,19 @@ }

checkPropTypes(
vnode.type.propTypes,
internal.type.propTypes,
values,
'prop',
getDisplayName(vnode),
() => getOwnerStack(vnode)
getDisplayName(internal),
() => getOwnerStack(internal)
);
}
if (oldBeforeDiff) oldBeforeDiff(vnode);
if (oldBeforeDiff) oldBeforeDiff(internal, vnode);
};
options._hook = (comp, index, type) => {
if (!comp || !hooksAllowed) {
options._hook = (internal, index, type) => {
if (!internal || !hooksAllowed) {
throw new Error('Hook can only be invoked from render methods.');
}
if (oldHook) oldHook(comp, index, type);
if (oldHook) oldHook(internal, index, type);
};

@@ -301,2 +333,11 @@

// Property descriptor: preserve a property's value but make it non-enumerable:
const debugProps = {
__source: { enumerable: false },
__self: { enumerable: false }
};
// If it's acceptable to inject debug properties onto the
// prototype, __proto__ is faster than defineProperties():
// https://esbench.com/bench/6021ebd7d9c27600a7bfdba3
const deprecatedProto = Object.create({}, deprecatedAttributes);

@@ -306,14 +347,6 @@

const props = vnode.props;
if (
vnode.type !== null &&
props != null &&
('__source' in props || '__self' in props)
) {
const newProps = (vnode.props = {});
for (let i in props) {
const v = props[i];
if (i === '__source') vnode.__source = v;
else if (i === '__self') vnode.__self = v;
else newProps[i] = v;
}
if (props != null && ('__source' in props || '__self' in props)) {
Object.defineProperties(props, debugProps);
vnode.__source = props.__source;
vnode.__self = props.__self;
}

@@ -327,24 +360,2 @@

options.diffed = vnode => {
// Check if the user passed plain objects as children. Note that we cannot
// move this check into `options.vnode` because components can receive
// children in any shape they want (e.g.
// `<MyJSONFormatter>{{ foo: 123, bar: "abc" }}</MyJSONFormatter>`).
// Putting this check in `options.diffed` ensures that
// `vnode._children` is set and that we only validate the children
// that were actually rendered.
if (vnode._children) {
vnode._children.forEach(child => {
if (child && child.type === undefined) {
// Remove internal vnode keys that will always be patched
delete child._parent;
delete child._depth;
const keys = Object.keys(child).join(',');
throw new Error(
`Objects are not valid as a child. Encountered an object with the keys {${keys}}.` +
`\n\n${getOwnerStack(vnode)}`
);
}
});
}
hooksAllowed = false;

@@ -381,5 +392,7 @@

const setState = Component.prototype.setState;
/** @this {import('../../src/internal').Component} */
Component.prototype.setState = function(update, callback) {
if (this._vnode == null) {
// `this._vnode` will be `null` during componentWillMount. But it
if (this._internal == null) {
// `this._internal` will be `null` during componentWillMount. But it
// is perfectly valid to call `setState` during cWM. So we

@@ -392,6 +405,8 @@ // need an additional check to verify that we are dealing with a

`no-op and might be a bug in your application. Instead, set ` +
`"this.state = {}" directly.\n\n${getOwnerStack(getCurrentVNode())}`
`"this.state = {}" directly.\n\n${getOwnerStack(
getCurrentInternal()
)}`
);
}
} else if (this._parentDom == null) {
} else if (this._internal.flags & MODE_UNMOUNTING) {
console.warn(

@@ -401,3 +416,3 @@ `Can't call "this.setState" on an unmounted component. This is a no-op, ` +

`subscriptions and asynchronous tasks in the componentWillUnmount method.` +
`\n\n${getOwnerStack(this._vnode)}`
`\n\n${getOwnerStack(this._internal)}`
);

@@ -410,11 +425,13 @@ }

const forceUpdate = Component.prototype.forceUpdate;
/** @this {import('../../src/internal').Component} */
Component.prototype.forceUpdate = function(callback) {
if (this._vnode == null) {
if (this._internal == null) {
console.warn(
`Calling "this.forceUpdate" inside the constructor of a component is a ` +
`no-op and might be a bug in your application.\n\n${getOwnerStack(
getCurrentVNode()
getCurrentInternal()
)}`
);
} else if (this._parentDom == null) {
} else if (this._internal.flags & MODE_UNMOUNTING) {
console.warn(

@@ -424,3 +441,3 @@ `Can't call "this.forceUpdate" on an unmounted component. This is a no-op, ` +

`subscriptions and asynchronous tasks in the componentWillUnmount method.` +
`\n\n${getOwnerStack(this._vnode)}`
`\n\n${getOwnerStack(this._internal)}`
);

@@ -427,0 +444,0 @@ }

@@ -0,0 +0,0 @@ import { initDebug } from './debug';

@@ -1,4 +0,10 @@

import { Component, PreactElement, VNode, Options } from '../../src/internal';
import {
Component,
PreactElement,
VNode,
Options,
Internal
} from '../../src/internal';
export { Component, PreactElement, VNode, Options };
export { Component, PreactElement, VNode, Options, Internal };

@@ -5,0 +11,0 @@ export interface DevtoolsInjectOptions {

@@ -1,2 +0,2 @@

var n=require("preact");"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.6.6",n.options,{Fragment:n.Fragment,Component:n.Component}),exports.addHookName=function(e,o){return n.options.__a&&n.options.__a(o),e};
var e=require("preact");"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("11.0.0-experimental.0",e.options,{Fragment:e.Fragment,Component:e.Component}),exports.addHookName=function(n,r){return e.options.__a&&e.options.__a(r),n};
//# sourceMappingURL=devtools.js.map

@@ -1,2 +0,2 @@

import{options as n,Fragment as o,Component as e}from"preact";function t(o,e){return n.__a&&n.__a(e),o}"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.6.6",n,{Fragment:o,Component:e});export{t as addHookName};
import{options as n,Fragment as o,Component as e}from"preact";function t(o,e){return n.__a&&n.__a(e),o}"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.6.5",n,{Fragment:o,Component:e});export{t as addHookName};
//# sourceMappingURL=devtools.module.js.map

@@ -1,2 +0,2 @@

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],n):n(e.preactDevtools={},e.preact)}(this,function(e,n){"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.6.6",n.options,{Fragment:n.Fragment,Component:n.Component}),e.addHookName=function(e,o){return n.options.__a&&n.options.__a(o),e}});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],n):n((e||self).preactDevtools={},e.preact)}(this,function(e,n){"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("11.0.0-experimental.0",n.options,{Fragment:n.Fragment,Component:n.Component}),e.addHookName=function(e,o){return n.options.__a&&n.options.__a(o),e}});
//# sourceMappingURL=devtools.umd.js.map

@@ -7,4 +7,5 @@ {

"description": "Preact bridge for Preact devtools",
"exports": "./dist/devtools.mjs",
"module": "dist/devtools.mjs",
"main": "dist/devtools.js",
"module": "dist/devtools.module.js",
"umd:main": "dist/devtools.umd.js",

@@ -11,0 +12,0 @@ "source": "src/index.js",

@@ -5,3 +5,3 @@ import { options, Fragment, Component } from 'preact';

if (typeof window != 'undefined' && window.__PREACT_DEVTOOLS__) {
window.__PREACT_DEVTOOLS__.attachPreact('10.6.6', options, {
window.__PREACT_DEVTOOLS__.attachPreact('11.0.0-experimental.0', options, {
Fragment,

@@ -8,0 +8,0 @@ Component

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ import { options } from 'preact';

@@ -1,2 +0,2 @@

var n,l,u,t,i,o,r,f,e={},c=[],s=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function a(n,l){for(var u in l)n[u]=l[u];return n}function p(n){var l=n.parentNode;l&&l.removeChild(n)}function v(l,u,t){var i,o,r,f={};for(r in u)"key"==r?i=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return h(l,f,i,o,null)}function h(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u:r};return null==r&&null!=l.vnode&&l.vnode(f),f}function y(n){return n.children}function d(n,l){this.props=n,this.context=l}function _(n,l){if(null==l)return n.__?_(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return"function"==typeof n.type?_(n):null}function k(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return k(n)}}function x(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!b.__r++||r!==l.debounceRendering)&&((r=l.debounceRendering)||o)(b)}function b(){for(var n;b.__r=i.length;)n=i.sort(function(n,l){return n.__v.__b-l.__v.__b}),i=[],n.some(function(n){var l,u,t,i,o,r;n.__d&&(o=(i=(l=n).__v).__e,(r=l.__P)&&(u=[],(t=a({},i)).__v=i.__v+1,I(r,i,t,l.__n,void 0!==r.ownerSVGElement,null!=i.__h?[o]:null,u,null==o?_(i):o,i.__h),T(u,i),i.__e!=o&&k(i)))})}function m(n,l,u,t,i,o,r,f,s,a){var p,v,d,k,x,b,m,A=t&&t.__k||c,P=A.length;for(u.__k=[],p=0;p<l.length;p++)if(null!=(k=u.__k[p]=null==(k=l[p])||"boolean"==typeof k?null:"string"==typeof k||"number"==typeof k||"bigint"==typeof k?h(null,k,null,null,k):Array.isArray(k)?h(y,{children:k},null,null,null):k.__b>0?h(k.type,k.props,k.key,null,k.__v):k)){if(k.__=u,k.__b=u.__b+1,null===(d=A[p])||d&&k.key==d.key&&k.type===d.type)A[p]=void 0;else for(v=0;v<P;v++){if((d=A[v])&&k.key==d.key&&k.type===d.type){A[v]=void 0;break}d=null}I(n,k,d=d||e,i,o,r,f,s,a),x=k.__e,(v=k.ref)&&d.ref!=v&&(m||(m=[]),d.ref&&m.push(d.ref,null,k),m.push(v,k.__c||x,k)),null!=x?(null==b&&(b=x),"function"==typeof k.type&&k.__k===d.__k?k.__d=s=g(k,s,n):s=w(n,k,d,A,x,s),"function"==typeof u.type&&(u.__d=s)):s&&d.__e==s&&s.parentNode!=n&&(s=_(d))}for(u.__e=b,p=P;p--;)null!=A[p]&&("function"==typeof u.type&&null!=A[p].__e&&A[p].__e==u.__d&&(u.__d=_(t,p+1)),L(A[p],A[p]));if(m)for(p=0;p<m.length;p++)z(m[p],m[++p],m[++p])}function g(n,l,u){for(var t,i=n.__k,o=0;i&&o<i.length;o++)(t=i[o])&&(t.__=n,l="function"==typeof t.type?g(t,l,u):w(u,t,t,i,t.__e,l));return l}function w(n,l,u,t,i,o){var r,f,e;if(void 0!==l.__d)r=l.__d,l.__d=void 0;else if(null==u||i!=o||null==i.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(i),r=null;else{for(f=o,e=0;(f=f.nextSibling)&&e<t.length;e+=2)if(f==i)break n;n.insertBefore(i,o),r=o}return void 0!==r?r:i.nextSibling}function A(n,l,u,t,i){var o;for(o in u)"children"===o||"key"===o||o in l||C(n,o,null,u[o],t);for(o in l)i&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||C(n,o,l[o],u[o],t)}function P(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||s.test(l)?u:u+"px"}function C(n,l,u,t,i){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else{if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||P(n.style,l,"");if(u)for(l in u)t&&u[l]===t[l]||P(n.style,l,u[l])}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t||n.addEventListener(l,o?H:$,o):n.removeEventListener(l,o?H:$,o);else if("dangerouslySetInnerHTML"!==l){if(i)l=l.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null!=u&&(!1!==u||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,u):n.removeAttribute(l))}}function $(n){this.l[n.type+!1](l.event?l.event(n):n)}function H(n){this.l[n.type+!0](l.event?l.event(n):n)}function I(n,u,t,i,o,r,f,e,c){var s,p,v,h,_,k,x,b,g,w,A,P=u.type;if(void 0!==u.constructor)return null;null!=t.__h&&(c=t.__h,e=u.__e=t.__e,u.__h=null,r=[e]),(s=l.__b)&&s(u);try{n:if("function"==typeof P){if(b=u.props,g=(s=P.contextType)&&i[s.__c],w=s?g?g.props.value:s.__:i,t.__c?x=(p=u.__c=t.__c).__=p.__E:("prototype"in P&&P.prototype.render?u.__c=p=new P(b,w):(u.__c=p=new d(b,w),p.constructor=P,p.render=M),g&&g.sub(p),p.props=b,p.state||(p.state={}),p.context=w,p.__n=i,v=p.__d=!0,p.__h=[]),null==p.__s&&(p.__s=p.state),null!=P.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=a({},p.__s)),a(p.__s,P.getDerivedStateFromProps(b,p.__s))),h=p.props,_=p.state,v)null==P.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==P.getDerivedStateFromProps&&b!==h&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(b,w),!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(b,p.__s,w)||u.__v===t.__v){p.props=b,p.state=p.__s,u.__v!==t.__v&&(p.__d=!1),p.__v=u,u.__e=t.__e,u.__k=t.__k,u.__k.forEach(function(n){n&&(n.__=u)}),p.__h.length&&f.push(p);break n}null!=p.componentWillUpdate&&p.componentWillUpdate(b,p.__s,w),null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(h,_,k)})}p.context=w,p.props=b,p.state=p.__s,(s=l.__r)&&s(u),p.__d=!1,p.__v=u,p.__P=n,s=p.render(p.props,p.state,p.context),p.state=p.__s,null!=p.getChildContext&&(i=a(a({},i),p.getChildContext())),v||null==p.getSnapshotBeforeUpdate||(k=p.getSnapshotBeforeUpdate(h,_)),A=null!=s&&s.type===y&&null==s.key?s.props.children:s,m(n,Array.isArray(A)?A:[A],u,t,i,o,r,f,e,c),p.base=u.__e,u.__h=null,p.__h.length&&f.push(p),x&&(p.__E=p.__=null),p.__e=!1}else null==r&&u.__v===t.__v?(u.__k=t.__k,u.__e=t.__e):u.__e=j(t.__e,u,t,i,o,r,f,c);(s=l.diffed)&&s(u)}catch(n){u.__v=null,(c||null!=r)&&(u.__e=e,u.__h=!!c,r[r.indexOf(e)]=null),l.__e(n,u,t)}}function T(n,u){l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function j(l,u,t,i,o,r,f,c){var s,a,v,h=t.props,y=u.props,d=u.type,k=0;if("svg"===d&&(o=!0),null!=r)for(;k<r.length;k++)if((s=r[k])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,r[k]=null;break}if(null==l){if(null===d)return document.createTextNode(y);l=o?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,y.is&&y),r=null,c=!1}if(null===d)h===y||c&&l.data===y||(l.data=y);else{if(r=r&&n.call(l.childNodes),a=(h=t.props||e).dangerouslySetInnerHTML,v=y.dangerouslySetInnerHTML,!c){if(null!=r)for(h={},k=0;k<l.attributes.length;k++)h[l.attributes[k].name]=l.attributes[k].value;(v||a)&&(v&&(a&&v.__html==a.__html||v.__html===l.innerHTML)||(l.innerHTML=v&&v.__html||""))}if(A(l,y,h,o,c),v)u.__k=[];else if(k=u.props.children,m(l,Array.isArray(k)?k:[k],u,t,i,o&&"foreignObject"!==d,r,f,r?r[0]:t.__k&&_(t,0),c),null!=r)for(k=r.length;k--;)null!=r[k]&&p(r[k]);c||("value"in y&&void 0!==(k=y.value)&&(k!==l.value||"progress"===d&&!k||"option"===d&&k!==h.value)&&C(l,"value",k,h.value,!1),"checked"in y&&void 0!==(k=y.checked)&&k!==l.checked&&C(l,"checked",k,h.checked,!1))}return l}function z(n,u,t){try{"function"==typeof n?n(u):n.current=u}catch(n){l.__e(n,t)}}function L(n,u,t){var i,o;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||z(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,u)}i.base=i.__P=null}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&L(i[o],u,"function"!=typeof n.type);t||null==n.__e||p(n.__e),n.__e=n.__d=void 0}function M(n,l,u){return this.constructor(n,u)}function N(u,t,i){var o,r,f;l.__&&l.__(u,t),r=(o="function"==typeof i)?null:i&&i.__k||t.__k,f=[],I(t,u=(!o&&i||t).__k=v(y,null,[u]),r||e,e,void 0!==t.ownerSVGElement,!o&&i?[i]:r?null:t.firstChild?n.call(t.childNodes):null,f,!o&&i?i:r?r.__e:t.firstChild,o),T(f,u)}n=c.slice,l={__e:function(n,l){for(var u,t,i;l=l.__;)if((u=l.__c)&&!u.__)try{if((t=u.constructor)&&null!=t.getDerivedStateFromError&&(u.setState(t.getDerivedStateFromError(n)),i=u.__d),null!=u.componentDidCatch&&(u.componentDidCatch(n),i=u.__d),i)return u.__E=u}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&void 0===n.constructor},d.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=a({},this.state),"function"==typeof n&&(n=n(a({},u),this.props)),n&&a(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),x(this))},d.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),x(this))},d.prototype.render=y,i=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,b.__r=0,f=0,exports.render=N,exports.hydrate=function n(l,u){N(l,u,n)},exports.createElement=v,exports.h=v,exports.Fragment=y,exports.createRef=function(){return{current:null}},exports.isValidElement=t,exports.Component=d,exports.cloneElement=function(l,u,t){var i,o,r,f=a({},l.props);for(r in u)"key"==r?i=u[r]:"ref"==r?o=u[r]:f[r]=u[r];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),h(l.type,f,i||l.key,o||l.ref,null)},exports.createContext=function(n,l){var u={__c:l="__cC"+f++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,t;return this.getChildContext||(u=[],(t={})[l]=this,this.getChildContext=function(){return t},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(x)},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u},exports.toChildArray=function n(l,u){return u=u||[],null==l||"boolean"==typeof l||(Array.isArray(l)?l.some(function(l){n(l,u)}):u.push(l)),u},exports.options=l;
var n,l,r,t,u,e,i,o,f,c,s,a,h=[];function v(n,l){null==n.__h&&(n.__h=[]),n.__h.push(l)}function y(l,r){n.__c&&n.__c(r,l),l.some(r=>{try{for(l=r.__h.length;l--;)r.__h.shift()()}catch(l){n.__e(l,r)}})}function p(n,l,r){var t,u,e,i={};for(e in l)"key"==e?t=l[e]:"ref"==e?u=l[e]:i[e]=l[e];if(arguments.length>3)for(r=[r],e=3;arguments.length>e;e++)r.push(arguments[e]);return arguments.length>2&&(i.children=r),d(n,i,t,u,0)}function d(r,t,u,e,i){var o={type:r,props:t,key:u,ref:e,constructor:void 0,__v:i||++l};return null!=n.vnode&&n.vnode(o),o}function _(n){return null==n||"boolean"==typeof n?null:"object"==typeof n?Array.isArray(n)?d(b,{children:n},null,null,0):n:"function"==typeof n?n:n+""}function b(n){return n.children}function x(l,r,t,u){if(l!==r){l&&x(null,l,null,u);try{"function"==typeof r?r(t):r&&(r.current=t)}catch(l){n.__e(l,u)}}}function k(n,l,r){"-"===l[0]?n.style.setProperty(l,r):n.style[l]=null==r?"":r}function g(n,l,r,t,u){var e;n:if("style"===l)if("string"==typeof r)k(n,"cssText",r);else{if("string"==typeof t&&k(n,"cssText",t=""),t)for(l in t)r&&l in r||k(n,l,"");for(l in r)t&&r[l]===t[l]||k(n,l,r[l])}else if("o"===l[0]&&"n"===l[1])e=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+e]=r,r?t||n.addEventListener(l,e?w:j,e):n.removeEventListener(l,e?w:j,e);else if("dangerouslySetInnerHTML"!==l){if(u)l=l.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==r?"":r;break n}catch(n){}"function"==typeof r||(null!=r&&(!1!==r||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,r):n.removeAttribute(l))}}function j(l){this.l[l.type+!1](n.event?n.event(l):l),this.t&&(null==this.value||"input"!==l.type&&"change"!==l.type||(this.value=this.u),null!=this.checked&&"change"===l.type&&(this.checked=this.u))}function w(l){this.l[l.type+!0](n.event?n.event(l):l)}function O(l,r,t,u){var e,i,o,f=r.type,c=l?l.props:r.props;if(r&&r.__c?e=r.__c:(r.__c=e={props:c,context:u,forceUpdate:r.rerender.bind(null,r)},r.flags|=16384),l&&l.__v===r.__v)return e.props=c,void(r.flags|=32768);for(e.context=u,r.props=e.props=c,e.__i=r,o=0;25>o;)o++,r.flags&=-16385,(i=n.__r)&&i(r),i=f.call(e,e.props,e.context),16384&r.flags||(o=25);return r.flags&=-16385,null!=e.getChildContext&&(r.c=Object.assign({},t,e.getChildContext())),i}function m(l,r,t,u){var e,i,o,f,c,s,a=r.type,h=l?l.props:r.props;if(r&&r.__c?e=r.__c:(r.__c=e=new a(h,u),e.state||(e.state={}),i=!0,r.flags|=16384),null==e.__s&&(e.__s=e.state),null!=a.getDerivedStateFromProps&&(e.__s==e.state&&(e.__s=Object.assign({},e.__s)),Object.assign(e.__s,a.getDerivedStateFromProps(h,e.__s))),o=e.props,f=e.state,i)null==a.getDerivedStateFromProps&&null!=e.componentWillMount&&e.componentWillMount(),null!=e.componentDidMount&&v(r,e.componentDidMount.bind(e));else{if(null==a.getDerivedStateFromProps&&h!==o&&null!=e.componentWillReceiveProps&&e.componentWillReceiveProps(h,u),!(8192&r.flags)&&null!=e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(h,e.__s,u)||l&&l.__v===r.__v)return e.props=h,e.state=e.__s,void(r.flags|=32768);null!=e.componentWillUpdate&&e.componentWillUpdate(h,e.__s,u)}return e.context=u,r.props=e.props=h,e.state=e.__s,(s=n.__r)&&s(r),r.flags&=-16385,e.__i=r,s=e.render(e.props,e.state,e.context),e.state=e.__s,null!=e.getChildContext&&(r.c=Object.assign({},t,e.getChildContext())),i||(null!=e.getSnapshotBeforeUpdate&&(c=e.getSnapshotBeforeUpdate(o,f)),null!=e.componentDidUpdate&&v(r,()=>{e.componentDidUpdate(o,f,c)})),s}function A(l,r,t){var u,i=0;if(n.unmount&&n.unmount(l),l.flags|=2048,(u=l.ref)&&(u.current&&u.current!==l.__e||x(null,u,null,r)),(u=l.__c)&&(e(l),u.componentWillUnmount))try{u.componentWillUnmount()}catch(l){n.__e(l,r)}if(u=l.__k)for(;u.length>i;i++)u[i]&&A(u[i],r,t?16&~l.flags:3&l.flags);!t&&3&l.flags&&l.__e.remove(),l.__e=null}function S(n,l,r,t){var u,e,i,o,f,c,s,a,v,y,p,d=r.__k&&r.__k.slice()||h,b=d.length,k=b,g=0,j=[];for(u=0;l.length>u;u++)if(null!=(f=_(l[u]))){c=void 0,-1===(a=T(f,d,s=u+g,k))?o=void 0:(o=d[a],d[a]=void 0,k--),(v=null==o)?B(n,f,o=N(f,r),t,$(r,s)):160==(160&o.flags)?(c=o.ref,B(n,f,o,t,o.__e)):(c=o.ref,I(n,f,o,t)),e=o.__e,(f.ref||c)&&(i||(i=[]),o.ref=f.ref,i.push(c,f.ref,28&o.flags&&o.__c||e,o));n:if(v)-1==a&&g--,3&o.flags&&(y=$(r,s),n.insertBefore(o.__e,y));else if(a!==s){if(a===s+1){g++;break n}if(a>s){if(k>l.length-s){g+=a-s;break n}g--}else g=s>a&&a==s-1?a-s:0;if(s=u+g,a==u)break n;p=$(r,s+1),3&o.flags?n.insertBefore(o.__e,p):H(o,p,n)}j[u]=o}else j[u]=null;if(r.__k=j,k>0)for(u=b;u--;)null!=d[u]&&A(d[u],d[u]);if(i)for(u=0;i.length>u;u++)x(i[u],i[++u],i[++u],i[++u])}function T(n,l,r,t){var u="string"==typeof n?null:n.type,e=null!==u?n.key:void 0,i=-1,o=r-1,f=r+1,c=l[r];if(null===c||null!=c&&c.type===u&&c.key==e)i=r;else if(t>(null!=c?1:0))for(;;){if(o>=0){if(null!=(c=l[o])&&c.type===u&&c.key==e){i=o;break}o--}if(l.length>f){if(null!=(c=l[f])&&c.type===u&&c.key==e){i=f;break}f++}else if(0>o)break}return i}function H(n,l,r){var t,u;if(null!=n.__k)for(t=0;n.__k.length>t;t++)(u=n.__k[t])&&(u.__=n,28&u.flags?H(u,l,r):u.__e!=l&&r.insertBefore(u.__e,l))}function I(l,r,t,u){var e,i,o,f,c,s,a,h,v=t.__e,y=t.flags;if(1&y)r!==t.props&&(v.data=r,t.props=r);else{if(void 0!==r.constructor)return null;n.__b&&n.__b(t,r),2&y&&(r.__v!==t.__v&&(P(v,r,t,u),t.__v=r.__v),n.diffed&&n.diffed(t),t.flags&=-42465),i=l,16&y&&(l=r.props.__P,t.props.__P!==r.props.__P&&H(t,l==i?$(t):null,l));try{512&t.flags&&(t.flags^=1536),o=q(t),c=(f=r.type.contextType)&&o[f.__c],s=f?c?c.props.value:f.__:o,a=!t||!t.__c,e=4&t.flags?m(r,t,o,s):O(r,t,o,s),32768&t.flags?(t.props=r.props,t.flags&=-32769,r&&r.__v!==t.__v&&(t.flags&=-16385)):(h=null!=e&&e.type===b&&null==e.key?e.props.children:e,null==t.__k?E(l,Array.isArray(h)?h:[h],t,u,160==(160&t.flags)?t.__e:a||32&t.flags?null:$(t)):S(l,Array.isArray(h)?h:[h],t,u)),null!=t.__h&&t.__h.length&&u.push(t)}catch(l){t.flags|=l.then?128:256,n.__e(l,t)}n.diffed&&n.diffed(t),t.flags&=-42465,t.__v=r.__v}}function P(n,l,r,t){var u,e,i,o,f,c,s=r.props,a=r.props=l.props,h=4096&r.flags;for(u in s)e=s[u],"key"===u||"children"===u||("dangerouslySetInnerHTML"===u?f=e:u in a||g(n,u,null,e,h));for(u in a)e=a[u],"key"===u||("children"===u?c=e:"dangerouslySetInnerHTML"===u?o=e:e===(i=s[u])&&("checked"!==u&&"value"!==u||null==e||e===n[u])||g(n,u,e,i,h));o?(e=o.__html,(!f||e!==f.__html&&e!==n.innerHTML)&&(n.innerHTML=e),r.__k=null):(f&&(n.innerHTML=""),S(n,c&&Array.isArray(c)?c:[c],r,t)),null!=a.value&&n.t?n.u=a.value:null!=a.checked&&n.t&&(n.u=a.checked)}function L(n,l){this.props=n,this.context=l}function M(l){(16384&l.flags||!(l.flags|=16384)||!o.push(l)||C.__r++)&&f===n.debounceRendering||((f=n.debounceRendering)||c)(C)}function C(){for(;s=C.__r=o.length;)for(o.sort((n,l)=>n.__b-l.__b);s--;)l=void 0,2048&~(n=o.shift()).flags&&16384&n.flags&&(I(z(n),d(n.type,n.props,n.key,n.ref,0),n,l=[]),y(l,n));var n,l}function N(l,r){var t,u,e,i,o=null,f=r?4192&r.flags:0,c=NaN;return"string"==typeof l?(f|=1,t=l):void 0!==l.constructor?(f|=1,t=""):(t=l.props||{},u=l.key,e=l.ref,c=l.__v,2&(f|="function"==typeof(o=l.type)?o.prototype&&"render"in o.prototype?4:t.__P?16:8:2)&&"svg"===o?f|=4096:r&&4096&r.flags&&"foreignObject"===r.type&&(f&=-4097)),i={type:o,props:t,key:u,ref:e,data:"function"==typeof o?{}:null,rerender:M,flags:f,__k:null,__:r,__v:c,__e:null,__c:null,c:null,__b:r?r.__b+1:0},n.__i&&n.__i(i,l),i}function $(n,l){return null==l?$(n.__,n.__.__k.indexOf(n)+1):U(n,l)||(n.__&&a(n)?$(n):null)}function U(n,l){var r,t;if(null==n.__k)return null;for(l=l||0;n.__k.length>l;l++)if(null!=(r=n.__k[l])){if(3&r.flags)return r.__e;if(a(r)&&(t=U(r)))return t}return null}function q(n){for(var l=n.c,r=n.__;null==l&&r;)l=r.c,r=r.__;return l}function z(n){for(var l=16&n.flags?n.props.__P:null,r=n.__;null==l&&r;)16&r.flags?l=r.props.__P:2&r.flags&&(l=r.__e),r=r.__;return l}function B(l,r,t,u,e){var i,o,f,c,s,a,h,v;n.__b&&n.__b(t,r);try{28&t.flags?(o=e,f=l,16&t.flags&&(l=r.props.__P)!==f&&(e=null),c=q(t),a=(s=r.type.contextType)&&c[s.__c],h=s?a?a.props.value:s.__:c,a&&a.s.add(t),i=4&t.flags?m(null,t,c,h):O(null,t,c,h),i=E(l,Array.isArray(v=null!=i&&i.type===b&&null==i.key?i.props.children:i)?v:[v],t,u,e),null!=t.__h&&t.__h.length&&u.push(t),16&t.flags&&f!==l&&(i=o)):i=D(96&t.flags?e:null,t,u),n.diffed&&n.diffed(t),t.flags&=-42465}catch(l){t.__v=0,t.flags|=l.then?128:256,32&t.flags&&(i=e&&e.nextSibling,t.__e=e),n.__e(l,t)}return i}function D(n,l,r){var t,u,e,i,o,f,c=l.props,s=l.type,a=l.flags,h=4096&a,v=32&~a;if(96&a)for(;n&&(s?n.localName!==s:3!==n.nodeType);)n=n.nextSibling;if(e=null==n,1&a)e?n=document.createTextNode(c):n.data!==c&&(n.data=c),l.__e=n;else{if(e&&(n=h?document.createElementNS("http://www.w3.org/2000/svg",s):document.createElement(s,c.is&&c),l.flags=a&=-42465,v=1),64&a)for(t=0;n.attributes.length>t;t++)(u=n.attributes[t].name)in c||n.removeAttribute(u);for(t in"input"!==l.type&&"textarea"!==l.type&&"select"!==l.type||!c.onInput&&!c.onChange||(null!=c.value?(n.t=!0,n.u=c.value):null!=c.checked&&(n.t=!0,n.u=c.checked)),c)u=c[t],"key"===t||("children"===t?f=u:"dangerouslySetInnerHTML"===t?i=u:"value"===t?o=u:null==u||!v&&"function"!=typeof u||g(n,t,u,null,h));l.__e=n,i?(v&&i.__html&&(n.innerHTML=i.__html),l.__k=null):null!=f&&E(n,f&&Array.isArray(f)?f:[f],l,r,e?null:n.firstChild),v&&null!=o&&g(n,"value",o,null,0)}return e?null:n.nextSibling}function E(n,l,r,t,u){var e,i,o,f,c,s=r.__k=[];for(e=0;l.length>e;e++)null!=(i=_(l[e]))?(o=N(i,r),s[e]=o,c=B(n,i,o,t,u),f=o.__e,28&o.flags||f==u?u=c:null!=f&&n.insertBefore(f,u),o.ref&&x(null,o.ref,o.__c||f,o)):s[e]=null;if(96&r.flags&&2&r.flags)for(;u;)e=u,u=u.nextSibling,e.remove();return u}function F(l){var r,t,u,e=0;function i(i){n.__&&n.__(i,l),i=p(b,{__P:l},[i]),u=l.firstChild,t=[],r?I(l,i,r,t):(r=N(i),l.__k=r,u&&(e=e||64),void 0!==l.ownerSVGElement&&(e|=4096),r.flags|=e,r.c={},B(l,i,r,t,u)),y(t,r)}return{hydrate(n){e|=32,i(n)},render:i}}function G(n){return n.children}n={__e:function(n,l){for(;l=l.__;)if(28&l.flags&&1024&~l.flags)try{if(l.type.getDerivedStateFromError&&l.__c.setState(l.type.getDerivedStateFromError(n)),l.__c.componentDidCatch&&l.__c.componentDidCatch(n),16384&l.flags)return void(l.flags|=512)}catch(l){n=l}throw n}},l=0,r=n=>null!=n&&void 0===n.constructor,t=0,u=new Set,e=n=>{u.delete(n)||u.forEach(l=>{l.__c.s.delete(n)})},i=(n,l)=>{var r={__c:l="__cC"+t++,__:n,Consumer:(n,l)=>n.children(l),Provider(n,r){return this.s?n.value!==this.p&&this.s.forEach(M):(this.s=new Set,(r={})[l]=this,this.getChildContext=()=>r,u.add(this.__i)),this.p=n.value,n.children}};return r.Provider.__=r.Consumer.contextType=r},L.prototype.setState=function(n,l){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Object.assign({},this.state),"function"==typeof n&&(n=n(Object.assign({},r),this.props)),n&&Object.assign(r,n),null!=n&&this.__i&&(l&&v(this.__i,l.bind(this)),this.__i.rerender(this.__i))},L.prototype.forceUpdate=function(n){this.__i&&(this.__i.flags|=8192,n&&v(this.__i,n.bind(this)),this.__i.rerender(this.__i))},L.prototype.render=b,o=[],c=Promise.prototype.then.bind(Promise.resolve()),s=C.__r=0,a=n=>28&n.flags&&(!(16&n.flags)||n.props.__P==z(n.__)),exports.Component=L,exports.Fragment=b,exports.cloneElement=function(n,l,r){var t,u,e,i=Object.assign({},n.props);for(e in l)"key"==e?t=l[e]:"ref"==e?u=l[e]:i[e]=l[e];if(arguments.length>3)for(r=[r],e=3;arguments.length>e;e++)r.push(arguments[e]);return arguments.length>2&&(i.children=r),d(n.type,i,t||n.key,u||n.ref,0)},exports.createContext=i,exports.createElement=p,exports.createPortal=function(n,l){return p(G,{__P:l},n)},exports.createRef=function(){return{current:null}},exports.createRoot=F,exports.h=p,exports.hydrate=function(n,l){var r=l&&l.__;r||(r=F(l)),r.hydrate(n),l.__=r},exports.isValidElement=r,exports.options=n,exports.render=function(n,l){var r=l&&l.__;r||(r=F(l)),r.render(n),l.__=r},exports.toChildArray=function n(l,r){if(r=r||[],null==l||"boolean"==typeof l);else if(Array.isArray(l))for(l of l)n(l,r);else r.push(l);return r};
//# sourceMappingURL=preact.js.map

@@ -1,2 +0,2 @@

!function(){var n,l,u,t,i,o,r,e,f,c={},s=[],a=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(n,l){for(var u in l)n[u]=l[u];return n}function v(n){var l=n.parentNode;l&&l.removeChild(n)}function y(l,u,t){var i,o,r,e={};for(r in u)"key"==r?i=u[r]:"ref"==r?o=u[r]:e[r]=u[r];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===e[r]&&(e[r]=l.defaultProps[r]);return d(l,e,i,o,null)}function d(n,t,i,o,r){var e={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u:r};return null==r&&null!=l.vnode&&l.vnode(e),e}function p(n){return n.children}function _(n,l){this.props=n,this.context=l}function m(n,l){if(null==l)return n.__?m(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return"function"==typeof n.type?m(n):null}function k(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return k(n)}}function b(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!g.__r++||r!==l.debounceRendering)&&((r=l.debounceRendering)||o)(g)}function g(){for(var n;g.__r=i.length;)n=i.sort(function(n,l){return n.__v.__b-l.__v.__b}),i=[],n.some(function(n){var l,u,t,i,o,r;n.__d&&(o=(i=(l=n).__v).__e,(r=l.__P)&&(u=[],(t=h({},i)).__v=i.__v+1,I(r,i,t,l.__n,void 0!==r.ownerSVGElement,null!=i.__h?[o]:null,u,null==o?m(i):o,i.__h),T(u,i),i.__e!=o&&k(i)))})}function w(n,l,u,t,i,o,r,e,f,a){var h,v,y,_,k,b,g,w=t&&t.__k||s,x=w.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(_=u.__k[h]=null==(_=l[h])||"boolean"==typeof _?null:"string"==typeof _||"number"==typeof _||"bigint"==typeof _?d(null,_,null,null,_):Array.isArray(_)?d(p,{children:_},null,null,null):_.__b>0?d(_.type,_.props,_.key,null,_.__v):_)){if(_.__=u,_.__b=u.__b+1,null===(y=w[h])||y&&_.key==y.key&&_.type===y.type)w[h]=void 0;else for(v=0;v<x;v++){if((y=w[v])&&_.key==y.key&&_.type===y.type){w[v]=void 0;break}y=null}I(n,_,y=y||c,i,o,r,e,f,a),k=_.__e,(v=_.ref)&&y.ref!=v&&(g||(g=[]),y.ref&&g.push(y.ref,null,_),g.push(v,_.__c||k,_)),null!=k?(null==b&&(b=k),"function"==typeof _.type&&_.__k===y.__k?_.__d=f=A(_,f,n):f=C(n,_,y,w,k,f),"function"==typeof u.type&&(u.__d=f)):f&&y.__e==f&&f.parentNode!=n&&(f=m(y))}for(u.__e=b,h=x;h--;)null!=w[h]&&("function"==typeof u.type&&null!=w[h].__e&&w[h].__e==u.__d&&(u.__d=m(t,h+1)),F(w[h],w[h]));if(g)for(h=0;h<g.length;h++)z(g[h],g[++h],g[++h])}function A(n,l,u){for(var t,i=n.__k,o=0;i&&o<i.length;o++)(t=i[o])&&(t.__=n,l="function"==typeof t.type?A(t,l,u):C(u,t,t,i,t.__e,l));return l}function C(n,l,u,t,i,o){var r,e,f;if(void 0!==l.__d)r=l.__d,l.__d=void 0;else if(null==u||i!=o||null==i.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(i),r=null;else{for(e=o,f=0;(e=e.nextSibling)&&f<t.length;f+=2)if(e==i)break n;n.insertBefore(i,o),r=o}return void 0!==r?r:i.nextSibling}function x(n,l,u,t,i){var o;for(o in u)"children"===o||"key"===o||o in l||E(n,o,null,u[o],t);for(o in l)i&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||E(n,o,l[o],u[o],t)}function P(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||a.test(l)?u:u+"px"}function E(n,l,u,t,i){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else{if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||P(n.style,l,"");if(u)for(l in u)t&&u[l]===t[l]||P(n.style,l,u[l])}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t||n.addEventListener(l,o?H:$,o):n.removeEventListener(l,o?H:$,o);else if("dangerouslySetInnerHTML"!==l){if(i)l=l.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null!=u&&(!1!==u||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,u):n.removeAttribute(l))}}function $(n){this.l[n.type+!1](l.event?l.event(n):n)}function H(n){this.l[n.type+!0](l.event?l.event(n):n)}function I(n,u,t,i,o,r,e,f,c){var s,a,v,y,d,m,k,b,g,A,C,x=u.type;if(void 0!==u.constructor)return null;null!=t.__h&&(c=t.__h,f=u.__e=t.__e,u.__h=null,r=[f]),(s=l.__b)&&s(u);try{n:if("function"==typeof x){if(b=u.props,g=(s=x.contextType)&&i[s.__c],A=s?g?g.props.value:s.__:i,t.__c?k=(a=u.__c=t.__c).__=a.__E:("prototype"in x&&x.prototype.render?u.__c=a=new x(b,A):(u.__c=a=new _(b,A),a.constructor=x,a.render=L),g&&g.sub(a),a.props=b,a.state||(a.state={}),a.context=A,a.__n=i,v=a.__d=!0,a.__h=[]),null==a.__s&&(a.__s=a.state),null!=x.getDerivedStateFromProps&&(a.__s==a.state&&(a.__s=h({},a.__s)),h(a.__s,x.getDerivedStateFromProps(b,a.__s))),y=a.props,d=a.state,v)null==x.getDerivedStateFromProps&&null!=a.componentWillMount&&a.componentWillMount(),null!=a.componentDidMount&&a.__h.push(a.componentDidMount);else{if(null==x.getDerivedStateFromProps&&b!==y&&null!=a.componentWillReceiveProps&&a.componentWillReceiveProps(b,A),!a.__e&&null!=a.shouldComponentUpdate&&!1===a.shouldComponentUpdate(b,a.__s,A)||u.__v===t.__v){a.props=b,a.state=a.__s,u.__v!==t.__v&&(a.__d=!1),a.__v=u,u.__e=t.__e,u.__k=t.__k,u.__k.forEach(function(n){n&&(n.__=u)}),a.__h.length&&e.push(a);break n}null!=a.componentWillUpdate&&a.componentWillUpdate(b,a.__s,A),null!=a.componentDidUpdate&&a.__h.push(function(){a.componentDidUpdate(y,d,m)})}a.context=A,a.props=b,a.state=a.__s,(s=l.__r)&&s(u),a.__d=!1,a.__v=u,a.__P=n,s=a.render(a.props,a.state,a.context),a.state=a.__s,null!=a.getChildContext&&(i=h(h({},i),a.getChildContext())),v||null==a.getSnapshotBeforeUpdate||(m=a.getSnapshotBeforeUpdate(y,d)),C=null!=s&&s.type===p&&null==s.key?s.props.children:s,w(n,Array.isArray(C)?C:[C],u,t,i,o,r,e,f,c),a.base=u.__e,u.__h=null,a.__h.length&&e.push(a),k&&(a.__E=a.__=null),a.__e=!1}else null==r&&u.__v===t.__v?(u.__k=t.__k,u.__e=t.__e):u.__e=j(t.__e,u,t,i,o,r,e,c);(s=l.diffed)&&s(u)}catch(n){u.__v=null,(c||null!=r)&&(u.__e=f,u.__h=!!c,r[r.indexOf(f)]=null),l.__e(n,u,t)}}function T(n,u){l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function j(l,u,t,i,o,r,e,f){var s,a,h,y=t.props,d=u.props,p=u.type,_=0;if("svg"===p&&(o=!0),null!=r)for(;_<r.length;_++)if((s=r[_])&&"setAttribute"in s==!!p&&(p?s.localName===p:3===s.nodeType)){l=s,r[_]=null;break}if(null==l){if(null===p)return document.createTextNode(d);l=o?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,d.is&&d),r=null,f=!1}if(null===p)y===d||f&&l.data===d||(l.data=d);else{if(r=r&&n.call(l.childNodes),a=(y=t.props||c).dangerouslySetInnerHTML,h=d.dangerouslySetInnerHTML,!f){if(null!=r)for(y={},_=0;_<l.attributes.length;_++)y[l.attributes[_].name]=l.attributes[_].value;(h||a)&&(h&&(a&&h.__html==a.__html||h.__html===l.innerHTML)||(l.innerHTML=h&&h.__html||""))}if(x(l,d,y,o,f),h)u.__k=[];else if(_=u.props.children,w(l,Array.isArray(_)?_:[_],u,t,i,o&&"foreignObject"!==p,r,e,r?r[0]:t.__k&&m(t,0),f),null!=r)for(_=r.length;_--;)null!=r[_]&&v(r[_]);f||("value"in d&&void 0!==(_=d.value)&&(_!==l.value||"progress"===p&&!_||"option"===p&&_!==y.value)&&E(l,"value",_,y.value,!1),"checked"in d&&void 0!==(_=d.checked)&&_!==l.checked&&E(l,"checked",_,y.checked,!1))}return l}function z(n,u,t){try{"function"==typeof n?n(u):n.current=u}catch(n){l.__e(n,t)}}function F(n,u,t){var i,o;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||z(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,u)}i.base=i.__P=null}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&F(i[o],u,"function"!=typeof n.type);t||null==n.__e||v(n.__e),n.__e=n.__d=void 0}function L(n,l,u){return this.constructor(n,u)}function M(u,t,i){var o,r,e;l.__&&l.__(u,t),r=(o="function"==typeof i)?null:i&&i.__k||t.__k,e=[],I(t,u=(!o&&i||t).__k=y(p,null,[u]),r||c,c,void 0!==t.ownerSVGElement,!o&&i?[i]:r?null:t.firstChild?n.call(t.childNodes):null,e,!o&&i?i:r?r.__e:t.firstChild,o),T(e,u)}n=s.slice,l={__e:function(n,l){for(var u,t,i;l=l.__;)if((u=l.__c)&&!u.__)try{if((t=u.constructor)&&null!=t.getDerivedStateFromError&&(u.setState(t.getDerivedStateFromError(n)),i=u.__d),null!=u.componentDidCatch&&(u.componentDidCatch(n),i=u.__d),i)return u.__E=u}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&void 0===n.constructor},_.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof n&&(n=n(h({},u),this.props)),n&&h(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),b(this))},_.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),b(this))},_.prototype.render=p,i=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,g.__r=0,e=0,f={render:M,hydrate:function n(l,u){M(l,u,n)},createElement:y,h:y,Fragment:p,createRef:function(){return{current:null}},isValidElement:t,Component:_,cloneElement:function(l,u,t){var i,o,r,e=h({},l.props);for(r in u)"key"==r?i=u[r]:"ref"==r?o=u[r]:e[r]=u[r];return arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),d(l.type,e,i||l.key,o||l.ref,null)},createContext:function(n,l){var u={__c:l="__cC"+e++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,t;return this.getChildContext||(u=[],(t={})[l]=this,this.getChildContext=function(){return t},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(b)},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u},toChildArray:function n(l,u){return u=u||[],null==l||"boolean"==typeof l||(Array.isArray(l)?l.some(function(l){n(l,u)}):u.push(l)),u},options:l},typeof module<"u"?module.exports=f:self.preact=f}();
!function(){var n,l,t,r,u,e,i,f,o,c,a,s,h,y=16,v=28,d=4096,p=16384,_=32768,b=-42465,k=[],g=void 0;function m(n,l){null==n.__h&&(n.__h=[]),n.__h.push(l)}function j(l,t){n.__c&&n.__c(t,l),l.some(t=>{try{for(l=t.__h.length;l--;)t.__h.shift()()}catch(l){n.__e(l,t)}})}function w(n,l,t){var r,u,e,i={};for(e in l)"key"==e?r=l[e]:"ref"==e?u=l[e]:i[e]=l[e];if(arguments.length>3)for(t=[t],e=3;arguments.length>e;e++)t.push(arguments[e]);return arguments.length>2&&(i.children=t),O(n,i,r,u,0)}function O(t,r,u,e,i){var f={type:t,props:r,key:u,ref:e,constructor:void 0,__v:i||++l};return null!=n.vnode&&n.vnode(f),f}function A(n){return null==n||"boolean"==typeof n?null:"object"==typeof n?Array.isArray(n)?O(x,{children:n},null,null,0):n:"function"==typeof n?n:n+""}function x(n){return n.children}function C(l,t,r,u){if(l!==t){l&&C(null,l,null,u);try{"function"==typeof t?t(r):t&&(t.current=r)}catch(l){n.__e(l,u)}}}function P(n,l,t){"-"===l[0]?n.style.setProperty(l,t):n.style[l]=null==t?"":t}function S(n,l,t,r,u){var e;n:if("style"===l)if("string"==typeof t)P(n,"cssText",t);else{if("string"==typeof r&&P(n,"cssText",r=""),r)for(l in r)t&&l in t||P(n,l,"");for(l in t)r&&t[l]===r[l]||P(n,l,t[l])}else if("o"===l[0]&&"n"===l[1])e=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+e]=t,t?r||n.addEventListener(l,e?H:T,e):n.removeEventListener(l,e?H:T,e);else if("dangerouslySetInnerHTML"!==l){if(u)l=l.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==t?"":t;break n}catch(n){}"function"==typeof t||(null!=t&&(!1!==t||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,t):n.removeAttribute(l))}}function T(l){this.l[l.type+!1](n.event?n.event(l):l),this.t&&(null==this.value||"input"!==l.type&&"change"!==l.type||(this.value=this.u),null!=this.checked&&"change"===l.type&&(this.checked=this.u))}function H(l){this.l[l.type+!0](n.event?n.event(l):l)}function I(l,t,r,u){var e,i,f,o=t.type,c=l?l.props:t.props;if(t&&t.__c?e=t.__c:(t.__c=e={props:c,context:u,forceUpdate:t.rerender.bind(null,t)},t.flags|=p),l&&l.__v===t.__v)return e.props=c,void(t.flags|=_);for(e.context=u,t.props=e.props=c,e.__i=t,f=0;25>f;)f++,t.flags&=-16385,(i=n.__r)&&i(t),i=o.call(e,e.props,e.context),t.flags&p||(f=25);return t.flags&=-16385,null!=e.getChildContext&&(t.c=Object.assign({},r,e.getChildContext())),i}function L(l,t,r,u){var e,i,f,o,c,a,s=t.type,h=l?l.props:t.props;if(t&&t.__c?e=t.__c:(t.__c=e=new s(h,u),e.state||(e.state={}),i=!0,t.flags|=p),null==e.__s&&(e.__s=e.state),null!=s.getDerivedStateFromProps&&(e.__s==e.state&&(e.__s=Object.assign({},e.__s)),Object.assign(e.__s,s.getDerivedStateFromProps(h,e.__s))),f=e.props,o=e.state,i)null==s.getDerivedStateFromProps&&null!=e.componentWillMount&&e.componentWillMount(),null!=e.componentDidMount&&m(t,e.componentDidMount.bind(e));else{if(null==s.getDerivedStateFromProps&&h!==f&&null!=e.componentWillReceiveProps&&e.componentWillReceiveProps(h,u),!(8192&t.flags)&&null!=e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(h,e.__s,u)||l&&l.__v===t.__v)return e.props=h,e.state=e.__s,void(t.flags|=_);null!=e.componentWillUpdate&&e.componentWillUpdate(h,e.__s,u)}return e.context=u,t.props=e.props=h,e.state=e.__s,(a=n.__r)&&a(t),t.flags&=-16385,e.__i=t,a=e.render(e.props,e.state,e.context),e.state=e.__s,null!=e.getChildContext&&(t.c=Object.assign({},r,e.getChildContext())),i||(null!=e.getSnapshotBeforeUpdate&&(c=e.getSnapshotBeforeUpdate(f,o)),null!=e.componentDidUpdate&&m(t,()=>{e.componentDidUpdate(f,o,c)})),a}function M(l,t,r){var u,i=0;if(n.unmount&&n.unmount(l),l.flags|=2048,(u=l.ref)&&(u.current&&u.current!==l.__e||C(null,u,null,t)),(u=l.__c)&&(e(l),u.componentWillUnmount))try{u.componentWillUnmount()}catch(l){n.__e(l,t)}if(u=l.__k)for(;u.length>i;i++)u[i]&&M(u[i],t,r?~l.flags&y:3&l.flags);!r&&3&l.flags&&l.__e.remove(),l.__e=null}function E(n,l,t,r){var u,e,i,f,o,c,a,s,h,y,d,p=t.__k&&t.__k.slice()||k,_=p.length,b=_,m=0,j=[];for(u=0;l.length>u;u++)if(null!=(o=A(l[u]))){c=void 0,-1===(s=N(o,p,a=u+m,b))?f=g:(f=p[s],p[s]=g,b--),(h=null==f)?K(n,o,f=z(o,t),r,B(t,a)):160==(160&f.flags)?(c=f.ref,K(n,o,f,r,f.__e)):(c=f.ref,$(n,o,f,r)),e=f.__e,(o.ref||c)&&(i||(i=[]),f.ref=o.ref,i.push(c,o.ref,f.flags&v&&f.__c||e,f));n:if(h)-1==s&&m--,3&f.flags&&(y=B(t,a),n.insertBefore(f.__e,y));else if(s!==a){if(s===a+1){m++;break n}if(s>a){if(b>l.length-a){m+=s-a;break n}m--}else m=a>s&&s==a-1?s-a:0;if(a=u+m,s==u)break n;d=B(t,a+1),3&f.flags?n.insertBefore(f.__e,d):R(f,d,n)}j[u]=f}else j[u]=null;if(t.__k=j,b>0)for(u=_;u--;)null!=p[u]&&M(p[u],p[u]);if(i)for(u=0;i.length>u;u++)C(i[u],i[++u],i[++u],i[++u])}function N(n,l,t,r){var u="string"==typeof n?null:n.type,e=null!==u?n.key:g,i=-1,f=t-1,o=t+1,c=l[t];if(null===c||null!=c&&c.type===u&&c.key==e)i=t;else if(r>(null!=c?1:0))for(;;){if(f>=0){if(null!=(c=l[f])&&c.type===u&&c.key==e){i=f;break}f--}if(l.length>o){if(null!=(c=l[o])&&c.type===u&&c.key==e){i=o;break}o++}else if(0>f)break}return i}function R(n,l,t){var r,u;if(null!=n.__k)for(r=0;n.__k.length>r;r++)(u=n.__k[r])&&(u.__=n,u.flags&v?R(u,l,t):u.__e!=l&&t.insertBefore(u.__e,l))}function $(l,t,r,u){var e,i,f,o,c,a,s,h,v=r.__e,d=r.flags;if(1&d)t!==r.props&&(v.data=t,r.props=t);else{if(t.constructor!==g)return null;n.__b&&n.__b(r,t),2&d&&(t.__v!==r.__v&&(F(v,t,r,u),r.__v=t.__v),n.diffed&&n.diffed(r),r.flags&=b),i=l,d&y&&(l=t.props.__P,r.props.__P!==t.props.__P&&R(r,l==i?B(r):null,l));try{512&r.flags&&(r.flags^=1536),f=G(r),c=(o=t.type.contextType)&&f[o.__c],a=o?c?c.props.value:o.__:f,s=!r||!r.__c,e=4&r.flags?L(t,r,f,a):I(t,r,f,a),r.flags&_?(r.props=t.props,r.flags&=-32769,t&&t.__v!==r.__v&&(r.flags&=-16385)):(h=null!=e&&e.type===x&&null==e.key?e.props.children:e,null==r.__k?W(l,Array.isArray(h)?h:[h],r,u,160==(160&r.flags)?r.__e:s||32&r.flags?null:B(r)):E(l,Array.isArray(h)?h:[h],r,u)),null!=r.__h&&r.__h.length&&u.push(r)}catch(l){r.flags|=l.then?128:256,n.__e(l,r)}n.diffed&&n.diffed(r),r.flags&=b,r.__v=t.__v}}function F(n,l,t,r){var u,e,i,f,o,c,a=t.props,s=t.props=l.props,h=t.flags&d;for(u in a)e=a[u],"key"===u||"children"===u||("dangerouslySetInnerHTML"===u?o=e:u in s||S(n,u,null,e,h));for(u in s)e=s[u],"key"===u||("children"===u?c=e:"dangerouslySetInnerHTML"===u?f=e:e===(i=a[u])&&("checked"!==u&&"value"!==u||null==e||e===n[u])||S(n,u,e,i,h));f?(e=f.__html,(!o||e!==o.__html&&e!==n.innerHTML)&&(n.innerHTML=e),t.__k=null):(o&&(n.innerHTML=""),E(n,c&&Array.isArray(c)?c:[c],t,r)),null!=s.value&&n.t?n.u=s.value:null!=s.checked&&n.t&&(n.u=s.checked)}function U(n,l){this.props=n,this.context=l}function V(l){(l.flags&p||!(l.flags|=p)||!f.push(l)||q.__r++)&&o===n.debounceRendering||((o=n.debounceRendering)||c)(q)}function q(){for(;a=q.__r=f.length;)for(f.sort((n,l)=>n.__b-l.__b);a--;)l=void 0,2048&~(n=f.shift()).flags&&n.flags&p&&($(J(n),O(n.type,n.props,n.key,n.ref,0),n,l=[]),j(l,n));var n,l}function z(l,t){var r,u,e,i,f=null,o=t?4192&t.flags:0,c=NaN;return"string"==typeof l?(o|=1,r=l):l.constructor!==g?(o|=1,r=""):(r=l.props||{},u=l.key,e=l.ref,c=l.__v,2&(o|="function"==typeof(f=l.type)?f.prototype&&"render"in f.prototype?4:r.__P?y:8:2)&&"svg"===f?o|=d:t&&t.flags&d&&"foreignObject"===t.type&&(o&=-4097)),i={type:f,props:r,key:u,ref:e,data:"function"==typeof f?{}:null,rerender:V,flags:o,__k:null,__:t,__v:c,__e:null,__c:null,c:null,__b:t?t.__b+1:0},n.__i&&n.__i(i,l),i}function B(n,l){return null==l?B(n.__,n.__.__k.indexOf(n)+1):D(n,l)||(n.__&&s(n)?B(n):null)}function D(n,l){var t,r;if(null==n.__k)return null;for(l=l||0;n.__k.length>l;l++)if(null!=(t=n.__k[l])){if(3&t.flags)return t.__e;if(s(t)&&(r=D(t)))return r}return null}function G(n){for(var l=n.c,t=n.__;null==l&&t;)l=t.c,t=t.__;return l}function J(n){for(var l=n.flags&y?n.props.__P:null,t=n.__;null==l&&t;)t.flags&y?l=t.props.__P:2&t.flags&&(l=t.__e),t=t.__;return l}function K(l,t,r,u,e){var i,f,o,c,a,s,h,d;n.__b&&n.__b(r,t);try{r.flags&v?(f=e,o=l,r.flags&y&&(l=t.props.__P)!==o&&(e=null),c=G(r),s=(a=t.type.contextType)&&c[a.__c],h=a?s?s.props.value:a.__:c,s&&s.s.add(r),i=4&r.flags?L(null,r,c,h):I(null,r,c,h),i=W(l,Array.isArray(d=null!=i&&i.type===x&&null==i.key?i.props.children:i)?d:[d],r,u,e),null!=r.__h&&r.__h.length&&u.push(r),r.flags&y&&o!==l&&(i=f)):i=Q(96&r.flags?e:null,r,u),n.diffed&&n.diffed(r),r.flags&=b}catch(l){r.__v=0,r.flags|=l.then?128:256,32&r.flags&&(i=e&&e.nextSibling,r.__e=e),n.__e(l,r)}return i}function Q(n,l,t){var r,u,e,i,f,o,c=l.props,a=l.type,s=l.flags,h=s&d,y=32&~s;if(96&s)for(;n&&(a?n.localName!==a:3!==n.nodeType);)n=n.nextSibling;if(e=null==n,1&s)e?n=document.createTextNode(c):n.data!==c&&(n.data=c),l.__e=n;else{if(e&&(n=h?document.createElementNS("http://www.w3.org/2000/svg",a):document.createElement(a,c.is&&c),l.flags=s&=b,y=1),64&s)for(r=0;n.attributes.length>r;r++)(u=n.attributes[r].name)in c||n.removeAttribute(u);for(r in"input"!==l.type&&"textarea"!==l.type&&"select"!==l.type||!c.onInput&&!c.onChange||(null!=c.value?(n.t=!0,n.u=c.value):null!=c.checked&&(n.t=!0,n.u=c.checked)),c)u=c[r],"key"===r||("children"===r?o=u:"dangerouslySetInnerHTML"===r?i=u:"value"===r?f=u:null==u||!y&&"function"!=typeof u||S(n,r,u,null,h));l.__e=n,i?(y&&i.__html&&(n.innerHTML=i.__html),l.__k=null):null!=o&&W(n,o&&Array.isArray(o)?o:[o],l,t,e?null:n.firstChild),y&&null!=f&&S(n,"value",f,null,0)}return e?null:n.nextSibling}function W(n,l,t,r,u){var e,i,f,o,c,a=t.__k=[];for(e=0;l.length>e;e++)null!=(i=A(l[e]))?(f=z(i,t),a[e]=f,c=K(n,i,f,r,u),o=f.__e,f.flags&v||o==u?u=c:null!=o&&n.insertBefore(o,u),f.ref&&C(null,f.ref,f.__c||o,f)):a[e]=null;if(96&t.flags&&2&t.flags)for(;u;)e=u,u=u.nextSibling,e.remove();return u}function X(l){var t,r,u,e=0;function i(i){n.__&&n.__(i,l),i=w(x,{__P:l},[i]),u=l.firstChild,r=[],t?$(l,i,t,r):(t=z(i),l.__k=t,u&&(e=e||64),l.ownerSVGElement!==g&&(e|=d),t.flags|=e,t.c={},K(l,i,t,r,u)),j(r,t)}return{hydrate(n){e|=32,i(n)},render:i}}function Y(n){return n.children}n={__e:function(n,l){for(;l=l.__;)if(l.flags&v&&1024&~l.flags)try{if(l.type.getDerivedStateFromError&&l.__c.setState(l.type.getDerivedStateFromError(n)),l.__c.componentDidCatch&&l.__c.componentDidCatch(n),l.flags&p)return void(l.flags|=512)}catch(l){n=l}throw n}},l=0,t=n=>null!=n&&n.constructor===g,r=0,u=new Set,e=n=>{u.delete(n)||u.forEach(l=>{l.__c.s.delete(n)})},i=(n,l)=>{var t={__c:l="__cC"+r++,__:n,Consumer:(n,l)=>n.children(l),Provider(n,t){return this.s?n.value!==this.p&&this.s.forEach(V):(this.s=new Set,(t={})[l]=this,this.getChildContext=()=>t,u.add(this.__i)),this.p=n.value,n.children}};return t.Provider.__=t.Consumer.contextType=t},U.prototype.setState=function(n,l){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Object.assign({},this.state),"function"==typeof n&&(n=n(Object.assign({},t),this.props)),n&&Object.assign(t,n),null!=n&&this.__i&&(l&&m(this.__i,l.bind(this)),this.__i.rerender(this.__i))},U.prototype.forceUpdate=function(n){this.__i&&(this.__i.flags|=8192,n&&m(this.__i,n.bind(this)),this.__i.rerender(this.__i))},U.prototype.render=x,f=[],c=Promise.prototype.then.bind(Promise.resolve()),a=q.__r=0,s=n=>n.flags&v&&(!(n.flags&y)||n.props.__P==J(n.__)),h={__proto__:null,render:function(n,l){var t=l&&l.__;t||(t=X(l)),t.render(n),l.__=t},hydrate:function(n,l){var t=l&&l.__;t||(t=X(l)),t.hydrate(n),l.__=t},createElement:w,h:w,Fragment:x,createRef:function(){return{current:null}},isValidElement:t,createRoot:X,Component:U,cloneElement:function(n,l,t){var r,u,e,i=Object.assign({},n.props);for(e in l)"key"==e?r=l[e]:"ref"==e?u=l[e]:i[e]=l[e];if(arguments.length>3)for(t=[t],e=3;arguments.length>e;e++)t.push(arguments[e]);return arguments.length>2&&(i.children=t),O(n.type,i,r||n.key,u||n.ref,0)},createContext:i,toChildArray:function n(l,t){if(t=t||[],null==l||"boolean"==typeof l);else if(Array.isArray(l))for(l of l)n(l,t);else t.push(l);return t},options:n,createPortal:function(n,l){return w(Y,{__P:l},n)}},"u">typeof module?module.exports=h:self.preact=h}();
//# sourceMappingURL=preact.min.js.map

@@ -1,2 +0,2 @@

var n,l,u,i,t,o,r,f,e={},c=[],s=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function a(n,l){for(var u in l)n[u]=l[u];return n}function h(n){var l=n.parentNode;l&&l.removeChild(n)}function v(l,u,i){var t,o,r,f={};for(r in u)"key"==r?t=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return y(l,f,t,o,null)}function y(n,i,t,o,r){var f={type:n,props:i,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u:r};return null==r&&null!=l.vnode&&l.vnode(f),f}function p(){return{current:null}}function d(n){return n.children}function _(n,l){this.props=n,this.context=l}function k(n,l){if(null==l)return n.__?k(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return"function"==typeof n.type?k(n):null}function b(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return b(n)}}function m(n){(!n.__d&&(n.__d=!0)&&t.push(n)&&!g.__r++||r!==l.debounceRendering)&&((r=l.debounceRendering)||o)(g)}function g(){for(var n;g.__r=t.length;)n=t.sort(function(n,l){return n.__v.__b-l.__v.__b}),t=[],n.some(function(n){var l,u,i,t,o,r;n.__d&&(o=(t=(l=n).__v).__e,(r=l.__P)&&(u=[],(i=a({},t)).__v=t.__v+1,j(r,t,i,l.__n,void 0!==r.ownerSVGElement,null!=t.__h?[o]:null,u,null==o?k(t):o,t.__h),z(u,t),t.__e!=o&&b(t)))})}function w(n,l,u,i,t,o,r,f,s,a){var h,v,p,_,b,m,g,w=i&&i.__k||c,A=w.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(_=u.__k[h]=null==(_=l[h])||"boolean"==typeof _?null:"string"==typeof _||"number"==typeof _||"bigint"==typeof _?y(null,_,null,null,_):Array.isArray(_)?y(d,{children:_},null,null,null):_.__b>0?y(_.type,_.props,_.key,null,_.__v):_)){if(_.__=u,_.__b=u.__b+1,null===(p=w[h])||p&&_.key==p.key&&_.type===p.type)w[h]=void 0;else for(v=0;v<A;v++){if((p=w[v])&&_.key==p.key&&_.type===p.type){w[v]=void 0;break}p=null}j(n,_,p=p||e,t,o,r,f,s,a),b=_.__e,(v=_.ref)&&p.ref!=v&&(g||(g=[]),p.ref&&g.push(p.ref,null,_),g.push(v,_.__c||b,_)),null!=b?(null==m&&(m=b),"function"==typeof _.type&&_.__k===p.__k?_.__d=s=x(_,s,n):s=P(n,_,p,w,b,s),"function"==typeof u.type&&(u.__d=s)):s&&p.__e==s&&s.parentNode!=n&&(s=k(p))}for(u.__e=m,h=A;h--;)null!=w[h]&&("function"==typeof u.type&&null!=w[h].__e&&w[h].__e==u.__d&&(u.__d=k(i,h+1)),N(w[h],w[h]));if(g)for(h=0;h<g.length;h++)M(g[h],g[++h],g[++h])}function x(n,l,u){for(var i,t=n.__k,o=0;t&&o<t.length;o++)(i=t[o])&&(i.__=n,l="function"==typeof i.type?x(i,l,u):P(u,i,i,t,i.__e,l));return l}function A(n,l){return l=l||[],null==n||"boolean"==typeof n||(Array.isArray(n)?n.some(function(n){A(n,l)}):l.push(n)),l}function P(n,l,u,i,t,o){var r,f,e;if(void 0!==l.__d)r=l.__d,l.__d=void 0;else if(null==u||t!=o||null==t.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(t),r=null;else{for(f=o,e=0;(f=f.nextSibling)&&e<i.length;e+=2)if(f==t)break n;n.insertBefore(t,o),r=o}return void 0!==r?r:t.nextSibling}function C(n,l,u,i,t){var o;for(o in u)"children"===o||"key"===o||o in l||H(n,o,null,u[o],i);for(o in l)t&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||H(n,o,l[o],u[o],i)}function $(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||s.test(l)?u:u+"px"}function H(n,l,u,i,t){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else{if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||$(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||$(n.style,l,u[l])}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?i||n.addEventListener(l,o?T:I,o):n.removeEventListener(l,o?T:I,o);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null!=u&&(!1!==u||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,u):n.removeAttribute(l))}}function I(n){this.l[n.type+!1](l.event?l.event(n):n)}function T(n){this.l[n.type+!0](l.event?l.event(n):n)}function j(n,u,i,t,o,r,f,e,c){var s,h,v,y,p,k,b,m,g,x,A,P=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(s=l.__b)&&s(u);try{n:if("function"==typeof P){if(m=u.props,g=(s=P.contextType)&&t[s.__c],x=s?g?g.props.value:s.__:t,i.__c?b=(h=u.__c=i.__c).__=h.__E:("prototype"in P&&P.prototype.render?u.__c=h=new P(m,x):(u.__c=h=new _(m,x),h.constructor=P,h.render=O),g&&g.sub(h),h.props=m,h.state||(h.state={}),h.context=x,h.__n=t,v=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=P.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=a({},h.__s)),a(h.__s,P.getDerivedStateFromProps(m,h.__s))),y=h.props,p=h.state,v)null==P.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==P.getDerivedStateFromProps&&m!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,x),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,x)||u.__v===i.__v){h.props=m,h.state=h.__s,u.__v!==i.__v&&(h.__d=!1),h.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u)}),h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,x),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,p,k)})}h.context=x,h.props=m,h.state=h.__s,(s=l.__r)&&s(u),h.__d=!1,h.__v=u,h.__P=n,s=h.render(h.props,h.state,h.context),h.state=h.__s,null!=h.getChildContext&&(t=a(a({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(k=h.getSnapshotBeforeUpdate(y,p)),A=null!=s&&s.type===d&&null==s.key?s.props.children:s,w(n,Array.isArray(A)?A:[A],u,i,t,o,r,f,e,c),h.base=u.__e,u.__h=null,h.__h.length&&f.push(h),b&&(h.__E=h.__=null),h.__e=!1}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=L(i.__e,u,i,t,o,r,f,c);(s=l.diffed)&&s(u)}catch(n){u.__v=null,(c||null!=r)&&(u.__e=e,u.__h=!!c,r[r.indexOf(e)]=null),l.__e(n,u,i)}}function z(n,u){l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function L(l,u,i,t,o,r,f,c){var s,a,v,y=i.props,p=u.props,d=u.type,_=0;if("svg"===d&&(o=!0),null!=r)for(;_<r.length;_++)if((s=r[_])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,r[_]=null;break}if(null==l){if(null===d)return document.createTextNode(p);l=o?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,p.is&&p),r=null,c=!1}if(null===d)y===p||c&&l.data===p||(l.data=p);else{if(r=r&&n.call(l.childNodes),a=(y=i.props||e).dangerouslySetInnerHTML,v=p.dangerouslySetInnerHTML,!c){if(null!=r)for(y={},_=0;_<l.attributes.length;_++)y[l.attributes[_].name]=l.attributes[_].value;(v||a)&&(v&&(a&&v.__html==a.__html||v.__html===l.innerHTML)||(l.innerHTML=v&&v.__html||""))}if(C(l,p,y,o,c),v)u.__k=[];else if(_=u.props.children,w(l,Array.isArray(_)?_:[_],u,i,t,o&&"foreignObject"!==d,r,f,r?r[0]:i.__k&&k(i,0),c),null!=r)for(_=r.length;_--;)null!=r[_]&&h(r[_]);c||("value"in p&&void 0!==(_=p.value)&&(_!==l.value||"progress"===d&&!_||"option"===d&&_!==y.value)&&H(l,"value",_,y.value,!1),"checked"in p&&void 0!==(_=p.checked)&&_!==l.checked&&H(l,"checked",_,y.checked,!1))}return l}function M(n,u,i){try{"function"==typeof n?n(u):n.current=u}catch(n){l.__e(n,i)}}function N(n,u,i){var t,o;if(l.unmount&&l.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||M(t,null,u)),null!=(t=n.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount()}catch(n){l.__e(n,u)}t.base=t.__P=null}if(t=n.__k)for(o=0;o<t.length;o++)t[o]&&N(t[o],u,"function"!=typeof n.type);i||null==n.__e||h(n.__e),n.__e=n.__d=void 0}function O(n,l,u){return this.constructor(n,u)}function S(u,i,t){var o,r,f;l.__&&l.__(u,i),r=(o="function"==typeof t)?null:t&&t.__k||i.__k,f=[],j(i,u=(!o&&t||i).__k=v(d,null,[u]),r||e,e,void 0!==i.ownerSVGElement,!o&&t?[t]:r?null:i.firstChild?n.call(i.childNodes):null,f,!o&&t?t:r?r.__e:i.firstChild,o),z(f,u)}function q(n,l){S(n,l,q)}function B(l,u,i){var t,o,r,f=a({},l.props);for(r in u)"key"==r?t=u[r]:"ref"==r?o=u[r]:f[r]=u[r];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),y(l.type,f,t||l.key,o||l.ref,null)}function D(n,l){var u={__c:l="__cC"+f++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(m)},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=c.slice,l={__e:function(n,l){for(var u,i,t;l=l.__;)if((u=l.__c)&&!u.__)try{if((i=u.constructor)&&null!=i.getDerivedStateFromError&&(u.setState(i.getDerivedStateFromError(n)),t=u.__d),null!=u.componentDidCatch&&(u.componentDidCatch(n),t=u.__d),t)return u.__E=u}catch(l){n=l}throw n}},u=0,i=function(n){return null!=n&&void 0===n.constructor},_.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=a({},this.state),"function"==typeof n&&(n=n(a({},u),this.props)),n&&a(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),m(this))},_.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),m(this))},_.prototype.render=d,t=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,g.__r=0,f=0;export{S as render,q as hydrate,v as createElement,v as h,d as Fragment,p as createRef,i as isValidElement,_ as Component,B as cloneElement,D as createContext,A as toChildArray,l as options};
var n,l,u,i,t,r,o,f,e={},c=[],s=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function a(n,l){for(var u in l)n[u]=l[u];return n}function h(n){var l=n.parentNode;l&&l.removeChild(n)}function v(l,u,i){var t,r,o,f={};for(o in u)"key"==o?t=u[o]:"ref"==o?r=u[o]:f[o]=u[o];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===f[o]&&(f[o]=l.defaultProps[o]);return y(l,f,t,r,null)}function y(n,i,t,r,o){var f={type:n,props:i,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++u:o};return null==o&&null!=l.vnode&&l.vnode(f),f}function p(){return{current:null}}function d(n){return n.children}function _(n,l){this.props=n,this.context=l}function k(n,l){if(null==l)return n.__?k(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return"function"==typeof n.type?k(n):null}function b(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return b(n)}}function m(n){(!n.__d&&(n.__d=!0)&&t.push(n)&&!g.__r++||o!==l.debounceRendering)&&((o=l.debounceRendering)||r)(g)}function g(){for(var n;g.__r=t.length;)n=t.sort(function(n,l){return n.__v.__b-l.__v.__b}),t=[],n.some(function(n){var l,u,i,t,r,o;n.__d&&(r=(t=(l=n).__v).__e,(o=l.__P)&&(u=[],(i=a({},t)).__v=t.__v+1,j(o,t,i,l.__n,void 0!==o.ownerSVGElement,null!=t.__h?[r]:null,u,null==r?k(t):r,t.__h),z(u,t),t.__e!=r&&b(t)))})}function w(n,l,u,i,t,r,o,f,s,a){var h,v,p,_,b,m,g,w=i&&i.__k||c,A=w.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(_=u.__k[h]=null==(_=l[h])||"boolean"==typeof _?null:"string"==typeof _||"number"==typeof _||"bigint"==typeof _?y(null,_,null,null,_):Array.isArray(_)?y(d,{children:_},null,null,null):_.__b>0?y(_.type,_.props,_.key,null,_.__v):_)){if(_.__=u,_.__b=u.__b+1,null===(p=w[h])||p&&_.key==p.key&&_.type===p.type)w[h]=void 0;else for(v=0;v<A;v++){if((p=w[v])&&_.key==p.key&&_.type===p.type){w[v]=void 0;break}p=null}j(n,_,p=p||e,t,r,o,f,s,a),b=_.__e,(v=_.ref)&&p.ref!=v&&(g||(g=[]),p.ref&&g.push(p.ref,null,_),g.push(v,_.__c||b,_)),null!=b?(null==m&&(m=b),"function"==typeof _.type&&_.__k===p.__k?_.__d=s=x(_,s,n):s=P(n,_,p,w,b,s),"function"==typeof u.type&&(u.__d=s)):s&&p.__e==s&&s.parentNode!=n&&(s=k(p))}for(u.__e=m,h=A;h--;)null!=w[h]&&("function"==typeof u.type&&null!=w[h].__e&&w[h].__e==u.__d&&(u.__d=k(i,h+1)),N(w[h],w[h]));if(g)for(h=0;h<g.length;h++)M(g[h],g[++h],g[++h])}function x(n,l,u){for(var i,t=n.__k,r=0;t&&r<t.length;r++)(i=t[r])&&(i.__=n,l="function"==typeof i.type?x(i,l,u):P(u,i,i,t,i.__e,l));return l}function A(n,l){return l=l||[],null==n||"boolean"==typeof n||(Array.isArray(n)?n.some(function(n){A(n,l)}):l.push(n)),l}function P(n,l,u,i,t,r){var o,f,e;if(void 0!==l.__d)o=l.__d,l.__d=void 0;else if(null==u||t!=r||null==t.parentNode)n:if(null==r||r.parentNode!==n)n.appendChild(t),o=null;else{for(f=r,e=0;(f=f.nextSibling)&&e<i.length;e+=2)if(f==t)break n;n.insertBefore(t,r),o=r}return void 0!==o?o:t.nextSibling}function C(n,l,u,i,t){var r;for(r in u)"children"===r||"key"===r||r in l||H(n,r,null,u[r],i);for(r in l)t&&"function"!=typeof l[r]||"children"===r||"key"===r||"value"===r||"checked"===r||u[r]===l[r]||H(n,r,l[r],u[r],i)}function $(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||s.test(l)?u:u+"px"}function H(n,l,u,i,t){var r;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else{if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||$(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||$(n.style,l,u[l])}else if("o"===l[0]&&"n"===l[1])r=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?i||n.addEventListener(l,r?T:I,r):n.removeEventListener(l,r?T:I,r);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null!=u&&(!1!==u||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,u):n.removeAttribute(l))}}function I(n){this.l[n.type+!1](l.event?l.event(n):n)}function T(n){this.l[n.type+!0](l.event?l.event(n):n)}function j(n,u,i,t,r,o,f,e,c){var s,h,v,y,p,k,b,m,g,x,A,P=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,o=[e]),(s=l.__b)&&s(u);try{n:if("function"==typeof P){if(m=u.props,g=(s=P.contextType)&&t[s.__c],x=s?g?g.props.value:s.__:t,i.__c?b=(h=u.__c=i.__c).__=h.__E:("prototype"in P&&P.prototype.render?u.__c=h=new P(m,x):(u.__c=h=new _(m,x),h.constructor=P,h.render=O),g&&g.sub(h),h.props=m,h.state||(h.state={}),h.context=x,h.__n=t,v=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=P.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=a({},h.__s)),a(h.__s,P.getDerivedStateFromProps(m,h.__s))),y=h.props,p=h.state,v)null==P.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==P.getDerivedStateFromProps&&m!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,x),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,x)||u.__v===i.__v){h.props=m,h.state=h.__s,u.__v!==i.__v&&(h.__d=!1),h.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u)}),h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,x),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,p,k)})}h.context=x,h.props=m,h.state=h.__s,(s=l.__r)&&s(u),h.__d=!1,h.__v=u,h.__P=n,s=h.render(h.props,h.state,h.context),h.state=h.__s,null!=h.getChildContext&&(t=a(a({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(k=h.getSnapshotBeforeUpdate(y,p)),A=null!=s&&s.type===d&&null==s.key?s.props.children:s,w(n,Array.isArray(A)?A:[A],u,i,t,r,o,f,e,c),h.base=u.__e,u.__h=null,h.__h.length&&f.push(h),b&&(h.__E=h.__=null),h.__e=!1}else null==o&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=L(i.__e,u,i,t,r,o,f,c);(s=l.diffed)&&s(u)}catch(n){u.__v=null,(c||null!=o)&&(u.__e=e,u.__h=!!c,o[o.indexOf(e)]=null),l.__e(n,u,i)}}function z(n,u){l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function L(l,u,i,t,r,o,f,c){var s,a,v,y=i.props,p=u.props,d=u.type,_=0;if("svg"===d&&(r=!0),null!=o)for(;_<o.length;_++)if((s=o[_])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,o[_]=null;break}if(null==l){if(null===d)return document.createTextNode(p);l=r?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,p.is&&p),o=null,c=!1}if(null===d)y===p||c&&l.data===p||(l.data=p);else{if(o=o&&n.call(l.childNodes),a=(y=i.props||e).dangerouslySetInnerHTML,v=p.dangerouslySetInnerHTML,!c){if(null!=o)for(y={},_=0;_<l.attributes.length;_++)y[l.attributes[_].name]=l.attributes[_].value;(v||a)&&(v&&(a&&v.__html==a.__html||v.__html===l.innerHTML)||(l.innerHTML=v&&v.__html||""))}if(C(l,p,y,r,c),v)u.__k=[];else if(_=u.props.children,w(l,Array.isArray(_)?_:[_],u,i,t,r&&"foreignObject"!==d,o,f,o?o[0]:i.__k&&k(i,0),c),null!=o)for(_=o.length;_--;)null!=o[_]&&h(o[_]);c||("value"in p&&void 0!==(_=p.value)&&(_!==y.value||_!==l.value||"progress"===d&&!_)&&H(l,"value",_,y.value,!1),"checked"in p&&void 0!==(_=p.checked)&&_!==l.checked&&H(l,"checked",_,y.checked,!1))}return l}function M(n,u,i){try{"function"==typeof n?n(u):n.current=u}catch(n){l.__e(n,i)}}function N(n,u,i){var t,r;if(l.unmount&&l.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||M(t,null,u)),null!=(t=n.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount()}catch(n){l.__e(n,u)}t.base=t.__P=null}if(t=n.__k)for(r=0;r<t.length;r++)t[r]&&N(t[r],u,"function"!=typeof n.type);i||null==n.__e||h(n.__e),n.__e=n.__d=void 0}function O(n,l,u){return this.constructor(n,u)}function S(u,i,t){var r,o,f;l.__&&l.__(u,i),o=(r="function"==typeof t)?null:t&&t.__k||i.__k,f=[],j(i,u=(!r&&t||i).__k=v(d,null,[u]),o||e,e,void 0!==i.ownerSVGElement,!r&&t?[t]:o?null:i.firstChild?n.call(i.childNodes):null,f,!r&&t?t:o?o.__e:i.firstChild,r),z(f,u)}function q(n,l){S(n,l,q)}function B(l,u,i){var t,r,o,f=a({},l.props);for(o in u)"key"==o?t=u[o]:"ref"==o?r=u[o]:f[o]=u[o];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),y(l.type,f,t||l.key,r||l.ref,null)}function D(n,l){var u={__c:l="__cC"+f++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(m)},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=c.slice,l={__e:function(n,l){for(var u,i,t;l=l.__;)if((u=l.__c)&&!u.__)try{if((i=u.constructor)&&null!=i.getDerivedStateFromError&&(u.setState(i.getDerivedStateFromError(n)),t=u.__d),null!=u.componentDidCatch&&(u.componentDidCatch(n),t=u.__d),t)return u.__E=u}catch(l){n=l}throw n}},u=0,i=function(n){return null!=n&&void 0===n.constructor},_.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=a({},this.state),"function"==typeof n&&(n=n(a({},u),this.props)),n&&a(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),m(this))},_.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),m(this))},_.prototype.render=d,t=[],r="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,g.__r=0,f=0;export{S as render,q as hydrate,v as createElement,v as h,d as Fragment,p as createRef,i as isValidElement,_ as Component,B as cloneElement,D as createContext,A as toChildArray,l as options};
//# sourceMappingURL=preact.module.js.map

@@ -1,2 +0,2 @@

!function(n,l){"object"==typeof exports&&"undefined"!=typeof module?l(exports):"function"==typeof define&&define.amd?define(["exports"],l):l(n.preact={})}(this,function(n){var l,u,i,t,o,f,r,e,c={},s=[],a=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(n,l){for(var u in l)n[u]=l[u];return n}function v(n){var l=n.parentNode;l&&l.removeChild(n)}function y(n,u,i){var t,o,f,r={};for(f in u)"key"==f?t=u[f]:"ref"==f?o=u[f]:r[f]=u[f];if(arguments.length>2&&(r.children=arguments.length>3?l.call(arguments,2):i),"function"==typeof n&&null!=n.defaultProps)for(f in n.defaultProps)void 0===r[f]&&(r[f]=n.defaultProps[f]);return p(n,r,t,o,null)}function p(n,l,t,o,f){var r={type:n,props:l,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==f?++i:f};return null==f&&null!=u.vnode&&u.vnode(r),r}function d(n){return n.children}function _(n,l){this.props=n,this.context=l}function b(n,l){if(null==l)return n.__?b(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return"function"==typeof n.type?b(n):null}function k(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return k(n)}}function m(n){(!n.__d&&(n.__d=!0)&&o.push(n)&&!g.__r++||r!==u.debounceRendering)&&((r=u.debounceRendering)||f)(g)}function g(){for(var n;g.__r=o.length;)n=o.sort(function(n,l){return n.__v.__b-l.__v.__b}),o=[],n.some(function(n){var l,u,i,t,o,f;n.__d&&(o=(t=(l=n).__v).__e,(f=l.__P)&&(u=[],(i=h({},t)).__v=t.__v+1,I(f,t,i,l.__n,void 0!==f.ownerSVGElement,null!=t.__h?[o]:null,u,null==o?b(t):o,t.__h),T(u,t),t.__e!=o&&k(t)))})}function w(n,l,u,i,t,o,f,r,e,a){var h,v,y,_,k,m,g,w=i&&i.__k||s,P=w.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(_=u.__k[h]=null==(_=l[h])||"boolean"==typeof _?null:"string"==typeof _||"number"==typeof _||"bigint"==typeof _?p(null,_,null,null,_):Array.isArray(_)?p(d,{children:_},null,null,null):_.__b>0?p(_.type,_.props,_.key,null,_.__v):_)){if(_.__=u,_.__b=u.__b+1,null===(y=w[h])||y&&_.key==y.key&&_.type===y.type)w[h]=void 0;else for(v=0;v<P;v++){if((y=w[v])&&_.key==y.key&&_.type===y.type){w[v]=void 0;break}y=null}I(n,_,y=y||c,t,o,f,r,e,a),k=_.__e,(v=_.ref)&&y.ref!=v&&(g||(g=[]),y.ref&&g.push(y.ref,null,_),g.push(v,_.__c||k,_)),null!=k?(null==m&&(m=k),"function"==typeof _.type&&_.__k===y.__k?_.__d=e=x(_,e,n):e=A(n,_,y,w,k,e),"function"==typeof u.type&&(u.__d=e)):e&&y.__e==e&&e.parentNode!=n&&(e=b(y))}for(u.__e=m,h=P;h--;)null!=w[h]&&("function"==typeof u.type&&null!=w[h].__e&&w[h].__e==u.__d&&(u.__d=b(i,h+1)),M(w[h],w[h]));if(g)for(h=0;h<g.length;h++)L(g[h],g[++h],g[++h])}function x(n,l,u){for(var i,t=n.__k,o=0;t&&o<t.length;o++)(i=t[o])&&(i.__=n,l="function"==typeof i.type?x(i,l,u):A(u,i,i,t,i.__e,l));return l}function A(n,l,u,i,t,o){var f,r,e;if(void 0!==l.__d)f=l.__d,l.__d=void 0;else if(null==u||t!=o||null==t.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(t),f=null;else{for(r=o,e=0;(r=r.nextSibling)&&e<i.length;e+=2)if(r==t)break n;n.insertBefore(t,o),f=o}return void 0!==f?f:t.nextSibling}function P(n,l,u,i,t){var o;for(o in u)"children"===o||"key"===o||o in l||$(n,o,null,u[o],i);for(o in l)t&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||$(n,o,l[o],u[o],i)}function C(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||a.test(l)?u:u+"px"}function $(n,l,u,i,t){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else{if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||C(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||C(n.style,l,u[l])}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?i||n.addEventListener(l,o?H:j,o):n.removeEventListener(l,o?H:j,o);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null!=u&&(!1!==u||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,u):n.removeAttribute(l))}}function j(n){this.l[n.type+!1](u.event?u.event(n):n)}function H(n){this.l[n.type+!0](u.event?u.event(n):n)}function I(n,l,i,t,o,f,r,e,c){var s,a,v,y,p,b,k,m,g,x,A,P=l.type;if(void 0!==l.constructor)return null;null!=i.__h&&(c=i.__h,e=l.__e=i.__e,l.__h=null,f=[e]),(s=u.__b)&&s(l);try{n:if("function"==typeof P){if(m=l.props,g=(s=P.contextType)&&t[s.__c],x=s?g?g.props.value:s.__:t,i.__c?k=(a=l.__c=i.__c).__=a.__E:("prototype"in P&&P.prototype.render?l.__c=a=new P(m,x):(l.__c=a=new _(m,x),a.constructor=P,a.render=N),g&&g.sub(a),a.props=m,a.state||(a.state={}),a.context=x,a.__n=t,v=a.__d=!0,a.__h=[]),null==a.__s&&(a.__s=a.state),null!=P.getDerivedStateFromProps&&(a.__s==a.state&&(a.__s=h({},a.__s)),h(a.__s,P.getDerivedStateFromProps(m,a.__s))),y=a.props,p=a.state,v)null==P.getDerivedStateFromProps&&null!=a.componentWillMount&&a.componentWillMount(),null!=a.componentDidMount&&a.__h.push(a.componentDidMount);else{if(null==P.getDerivedStateFromProps&&m!==y&&null!=a.componentWillReceiveProps&&a.componentWillReceiveProps(m,x),!a.__e&&null!=a.shouldComponentUpdate&&!1===a.shouldComponentUpdate(m,a.__s,x)||l.__v===i.__v){a.props=m,a.state=a.__s,l.__v!==i.__v&&(a.__d=!1),a.__v=l,l.__e=i.__e,l.__k=i.__k,l.__k.forEach(function(n){n&&(n.__=l)}),a.__h.length&&r.push(a);break n}null!=a.componentWillUpdate&&a.componentWillUpdate(m,a.__s,x),null!=a.componentDidUpdate&&a.__h.push(function(){a.componentDidUpdate(y,p,b)})}a.context=x,a.props=m,a.state=a.__s,(s=u.__r)&&s(l),a.__d=!1,a.__v=l,a.__P=n,s=a.render(a.props,a.state,a.context),a.state=a.__s,null!=a.getChildContext&&(t=h(h({},t),a.getChildContext())),v||null==a.getSnapshotBeforeUpdate||(b=a.getSnapshotBeforeUpdate(y,p)),A=null!=s&&s.type===d&&null==s.key?s.props.children:s,w(n,Array.isArray(A)?A:[A],l,i,t,o,f,r,e,c),a.base=l.__e,l.__h=null,a.__h.length&&r.push(a),k&&(a.__E=a.__=null),a.__e=!1}else null==f&&l.__v===i.__v?(l.__k=i.__k,l.__e=i.__e):l.__e=z(i.__e,l,i,t,o,f,r,c);(s=u.diffed)&&s(l)}catch(n){l.__v=null,(c||null!=f)&&(l.__e=e,l.__h=!!c,f[f.indexOf(e)]=null),u.__e(n,l,i)}}function T(n,l){u.__c&&u.__c(l,n),n.some(function(l){try{n=l.__h,l.__h=[],n.some(function(n){n.call(l)})}catch(n){u.__e(n,l.__v)}})}function z(n,u,i,t,o,f,r,e){var s,a,h,y=i.props,p=u.props,d=u.type,_=0;if("svg"===d&&(o=!0),null!=f)for(;_<f.length;_++)if((s=f[_])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){n=s,f[_]=null;break}if(null==n){if(null===d)return document.createTextNode(p);n=o?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,p.is&&p),f=null,e=!1}if(null===d)y===p||e&&n.data===p||(n.data=p);else{if(f=f&&l.call(n.childNodes),a=(y=i.props||c).dangerouslySetInnerHTML,h=p.dangerouslySetInnerHTML,!e){if(null!=f)for(y={},_=0;_<n.attributes.length;_++)y[n.attributes[_].name]=n.attributes[_].value;(h||a)&&(h&&(a&&h.__html==a.__html||h.__html===n.innerHTML)||(n.innerHTML=h&&h.__html||""))}if(P(n,p,y,o,e),h)u.__k=[];else if(_=u.props.children,w(n,Array.isArray(_)?_:[_],u,i,t,o&&"foreignObject"!==d,f,r,f?f[0]:i.__k&&b(i,0),e),null!=f)for(_=f.length;_--;)null!=f[_]&&v(f[_]);e||("value"in p&&void 0!==(_=p.value)&&(_!==n.value||"progress"===d&&!_||"option"===d&&_!==y.value)&&$(n,"value",_,y.value,!1),"checked"in p&&void 0!==(_=p.checked)&&_!==n.checked&&$(n,"checked",_,y.checked,!1))}return n}function L(n,l,i){try{"function"==typeof n?n(l):n.current=l}catch(n){u.__e(n,i)}}function M(n,l,i){var t,o;if(u.unmount&&u.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||L(t,null,l)),null!=(t=n.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount()}catch(n){u.__e(n,l)}t.base=t.__P=null}if(t=n.__k)for(o=0;o<t.length;o++)t[o]&&M(t[o],l,"function"!=typeof n.type);i||null==n.__e||v(n.__e),n.__e=n.__d=void 0}function N(n,l,u){return this.constructor(n,u)}function O(n,i,t){var o,f,r;u.__&&u.__(n,i),f=(o="function"==typeof t)?null:t&&t.__k||i.__k,r=[],I(i,n=(!o&&t||i).__k=y(d,null,[n]),f||c,c,void 0!==i.ownerSVGElement,!o&&t?[t]:f?null:i.firstChild?l.call(i.childNodes):null,r,!o&&t?t:f?f.__e:i.firstChild,o),T(r,n)}l=s.slice,u={__e:function(n,l){for(var u,i,t;l=l.__;)if((u=l.__c)&&!u.__)try{if((i=u.constructor)&&null!=i.getDerivedStateFromError&&(u.setState(i.getDerivedStateFromError(n)),t=u.__d),null!=u.componentDidCatch&&(u.componentDidCatch(n),t=u.__d),t)return u.__E=u}catch(l){n=l}throw n}},i=0,t=function(n){return null!=n&&void 0===n.constructor},_.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof n&&(n=n(h({},u),this.props)),n&&h(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),m(this))},_.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),m(this))},_.prototype.render=d,o=[],f="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,g.__r=0,e=0,n.render=O,n.hydrate=function n(l,u){O(l,u,n)},n.createElement=y,n.h=y,n.Fragment=d,n.createRef=function(){return{current:null}},n.isValidElement=t,n.Component=_,n.cloneElement=function(n,u,i){var t,o,f,r=h({},n.props);for(f in u)"key"==f?t=u[f]:"ref"==f?o=u[f]:r[f]=u[f];return arguments.length>2&&(r.children=arguments.length>3?l.call(arguments,2):i),p(n.type,r,t||n.key,o||n.ref,null)},n.createContext=function(n,l){var u={__c:l="__cC"+e++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(m)},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u},n.toChildArray=function n(l,u){return u=u||[],null==l||"boolean"==typeof l||(Array.isArray(l)?l.some(function(l){n(l,u)}):u.push(l)),u},n.options=u});
!function(n,l){"object"==typeof exports&&"undefined"!=typeof module?l(exports):"function"==typeof define&&define.amd?define(["exports"],l):l((n||self).preact={})}(this,function(n){var l,t,u,r,e,i,f,o,c,s,a,h,y=16,v=28,d=4096,p=16384,_=32768,b=-42465,g=[],k=void 0;function j(n,l){null==n.__h&&(n.__h=[]),n.__h.push(l)}function m(n,t){l.__c&&l.__c(t,n),n.some(t=>{try{for(n=t.__h.length;n--;)t.__h.shift()()}catch(n){l.__e(n,t)}})}function w(n,l,t){var u,r,e,i={};for(e in l)"key"==e?u=l[e]:"ref"==e?r=l[e]:i[e]=l[e];if(arguments.length>3)for(t=[t],e=3;arguments.length>e;e++)t.push(arguments[e]);return arguments.length>2&&(i.children=t),x(n,i,u,r,0)}function x(n,u,r,e,i){var f={type:n,props:u,key:r,ref:e,constructor:void 0,__v:i||++t};return null!=l.vnode&&l.vnode(f),f}function O(n){return null==n||"boolean"==typeof n?null:"object"==typeof n?Array.isArray(n)?x(T,{children:n},null,null,0):n:"function"==typeof n?n:n+""}function T(n){return n.children}function A(n,t,u,r){if(n!==t){n&&A(null,n,null,r);try{"function"==typeof t?t(u):t&&(t.current=u)}catch(n){l.__e(n,r)}}}function S(n,l,t){"-"===l[0]?n.style.setProperty(l,t):n.style[l]=null==t?"":t}function H(n,l,t,u,r){var e;n:if("style"===l)if("string"==typeof t)S(n,"cssText",t);else{if("string"==typeof u&&S(n,"cssText",u=""),u)for(l in u)t&&l in t||S(n,l,"");for(l in t)u&&t[l]===u[l]||S(n,l,t[l])}else if("o"===l[0]&&"n"===l[1])e=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+e]=t,t?u||n.addEventListener(l,e?P:I,e):n.removeEventListener(l,e?P:I,e);else if("dangerouslySetInnerHTML"!==l){if(r)l=l.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==t?"":t;break n}catch(n){}"function"==typeof t||(null!=t&&(!1!==t||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,t):n.removeAttribute(l))}}function I(n){this.l[n.type+!1](l.event?l.event(n):n),this.t&&(null==this.value||"input"!==n.type&&"change"!==n.type||(this.value=this.u),null!=this.checked&&"change"===n.type&&(this.checked=this.u))}function P(n){this.l[n.type+!0](l.event?l.event(n):n)}function L(n,t,u,r){var e,i,f,o=t.type,c=n?n.props:t.props;if(t&&t.__c?e=t.__c:(t.__c=e={props:c,context:r,forceUpdate:t.rerender.bind(null,t)},t.flags|=p),n&&n.__v===t.__v)return e.props=c,void(t.flags|=_);for(e.context=r,t.props=e.props=c,e.__i=t,f=0;25>f;)f++,t.flags&=-16385,(i=l.__r)&&i(t),i=o.call(e,e.props,e.context),t.flags&p||(f=25);return t.flags&=-16385,null!=e.getChildContext&&(t.c=Object.assign({},u,e.getChildContext())),i}function M(n,t,u,r){var e,i,f,o,c,s,a=t.type,h=n?n.props:t.props;if(t&&t.__c?e=t.__c:(t.__c=e=new a(h,r),e.state||(e.state={}),i=!0,t.flags|=p),null==e.__s&&(e.__s=e.state),null!=a.getDerivedStateFromProps&&(e.__s==e.state&&(e.__s=Object.assign({},e.__s)),Object.assign(e.__s,a.getDerivedStateFromProps(h,e.__s))),f=e.props,o=e.state,i)null==a.getDerivedStateFromProps&&null!=e.componentWillMount&&e.componentWillMount(),null!=e.componentDidMount&&j(t,e.componentDidMount.bind(e));else{if(null==a.getDerivedStateFromProps&&h!==f&&null!=e.componentWillReceiveProps&&e.componentWillReceiveProps(h,r),!(8192&t.flags)&&null!=e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(h,e.__s,r)||n&&n.__v===t.__v)return e.props=h,e.state=e.__s,void(t.flags|=_);null!=e.componentWillUpdate&&e.componentWillUpdate(h,e.__s,r)}return e.context=r,t.props=e.props=h,e.state=e.__s,(s=l.__r)&&s(t),t.flags&=-16385,e.__i=t,s=e.render(e.props,e.state,e.context),e.state=e.__s,null!=e.getChildContext&&(t.c=Object.assign({},u,e.getChildContext())),i||(null!=e.getSnapshotBeforeUpdate&&(c=e.getSnapshotBeforeUpdate(f,o)),null!=e.componentDidUpdate&&j(t,()=>{e.componentDidUpdate(f,o,c)})),s}function C(n,t,u){var r,e=0;if(l.unmount&&l.unmount(n),n.flags|=2048,(r=n.ref)&&(r.current&&r.current!==n.__e||A(null,r,null,t)),(r=n.__c)&&(i(n),r.componentWillUnmount))try{r.componentWillUnmount()}catch(n){l.__e(n,t)}if(r=n.__k)for(;r.length>e;e++)r[e]&&C(r[e],t,u?~n.flags&y:3&n.flags);!u&&3&n.flags&&n.__e.remove(),n.__e=null}function N(n,l,t,u){var r,e,i,f,o,c,s,a,h,y,d,p=t.__k&&t.__k.slice()||g,_=p.length,b=_,j=0,m=[];for(r=0;l.length>r;r++)if(null!=(o=O(l[r]))){c=void 0,-1===(a=$(o,p,s=r+j,b))?f=k:(f=p[a],p[a]=k,b--),(h=null==f)?R(n,o,f=F(o,t),u,G(t,s)):160==(160&f.flags)?(c=f.ref,R(n,o,f,u,f.__e)):(c=f.ref,q(n,o,f,u)),e=f.__e,(o.ref||c)&&(i||(i=[]),f.ref=o.ref,i.push(c,o.ref,f.flags&v&&f.__c||e,f));n:if(h)-1==a&&j--,3&f.flags&&(y=G(t,s),n.insertBefore(f.__e,y));else if(a!==s){if(a===s+1){j++;break n}if(a>s){if(b>l.length-s){j+=a-s;break n}j--}else j=s>a&&a==s-1?a-s:0;if(s=r+j,a==r)break n;d=G(t,s+1),3&f.flags?n.insertBefore(f.__e,d):U(f,d,n)}m[r]=f}else m[r]=null;if(t.__k=m,b>0)for(r=_;r--;)null!=p[r]&&C(p[r],p[r]);if(i)for(r=0;i.length>r;r++)A(i[r],i[++r],i[++r],i[++r])}function $(n,l,t,u){var r="string"==typeof n?null:n.type,e=null!==r?n.key:k,i=-1,f=t-1,o=t+1,c=l[t];if(null===c||null!=c&&c.type===r&&c.key==e)i=t;else if(u>(null!=c?1:0))for(;;){if(f>=0){if(null!=(c=l[f])&&c.type===r&&c.key==e){i=f;break}f--}if(l.length>o){if(null!=(c=l[o])&&c.type===r&&c.key==e){i=o;break}o++}else if(0>f)break}return i}function U(n,l,t){var u,r;if(null!=n.__k)for(u=0;n.__k.length>u;u++)(r=n.__k[u])&&(r.__=n,r.flags&v?U(r,l,t):r.__e!=l&&t.insertBefore(r.__e,l))}function q(n,t,u,r){var e,i,f,o,c,s,a,h,v=u.__e,d=u.flags;if(1&d)t!==u.props&&(v.data=t,u.props=t);else{if(t.constructor!==k)return null;l.__b&&l.__b(u,t),2&d&&(t.__v!==u.__v&&(z(v,t,u,r),u.__v=t.__v),l.diffed&&l.diffed(u),u.flags&=b),i=n,d&y&&(n=t.props.__P,u.props.__P!==t.props.__P&&U(u,n==i?G(u):null,n));try{512&u.flags&&(u.flags^=1536),f=K(u),c=(o=t.type.contextType)&&f[o.__c],s=o?c?c.props.value:o.__:f,a=!u||!u.__c,e=4&u.flags?M(t,u,f,s):L(t,u,f,s),u.flags&_?(u.props=t.props,u.flags&=-32769,t&&t.__v!==u.__v&&(u.flags&=-16385)):(h=null!=e&&e.type===T&&null==e.key?e.props.children:e,null==u.__k?W(n,Array.isArray(h)?h:[h],u,r,160==(160&u.flags)?u.__e:a||32&u.flags?null:G(u)):N(n,Array.isArray(h)?h:[h],u,r)),null!=u.__h&&u.__h.length&&r.push(u)}catch(n){u.flags|=n.then?128:256,l.__e(n,u)}l.diffed&&l.diffed(u),u.flags&=b,u.__v=t.__v}}function z(n,l,t,u){var r,e,i,f,o,c,s=t.props,a=t.props=l.props,h=t.flags&d;for(r in s)e=s[r],"key"===r||"children"===r||("dangerouslySetInnerHTML"===r?o=e:r in a||H(n,r,null,e,h));for(r in a)e=a[r],"key"===r||("children"===r?c=e:"dangerouslySetInnerHTML"===r?f=e:e===(i=s[r])&&("checked"!==r&&"value"!==r||null==e||e===n[r])||H(n,r,e,i,h));f?(e=f.__html,(!o||e!==o.__html&&e!==n.innerHTML)&&(n.innerHTML=e),t.__k=null):(o&&(n.innerHTML=""),N(n,c&&Array.isArray(c)?c:[c],t,u)),null!=a.value&&n.t?n.u=a.value:null!=a.checked&&n.t&&(n.u=a.checked)}function B(n,l){this.props=n,this.context=l}function D(n){(n.flags&p||!(n.flags|=p)||!o.push(n)||E.__r++)&&c===l.debounceRendering||((c=l.debounceRendering)||s)(E)}function E(){for(;a=E.__r=o.length;)for(o.sort((n,l)=>n.__b-l.__b);a--;)l=void 0,2048&~(n=o.shift()).flags&&n.flags&p&&(q(Q(n),x(n.type,n.props,n.key,n.ref,0),n,l=[]),m(l,n));var n,l}function F(n,t){var u,r,e,i,f=null,o=t?4192&t.flags:0,c=NaN;return"string"==typeof n?(o|=1,u=n):n.constructor!==k?(o|=1,u=""):(u=n.props||{},r=n.key,e=n.ref,c=n.__v,2&(o|="function"==typeof(f=n.type)?f.prototype&&"render"in f.prototype?4:u.__P?y:8:2)&&"svg"===f?o|=d:t&&t.flags&d&&"foreignObject"===t.type&&(o&=-4097)),i={type:f,props:u,key:r,ref:e,data:"function"==typeof f?{}:null,rerender:D,flags:o,__k:null,__:t,__v:c,__e:null,__c:null,c:null,__b:t?t.__b+1:0},l.__i&&l.__i(i,n),i}function G(n,l){return null==l?G(n.__,n.__.__k.indexOf(n)+1):J(n,l)||(n.__&&h(n)?G(n):null)}function J(n,l){var t,u;if(null==n.__k)return null;for(l=l||0;n.__k.length>l;l++)if(null!=(t=n.__k[l])){if(3&t.flags)return t.__e;if(h(t)&&(u=J(t)))return u}return null}function K(n){for(var l=n.c,t=n.__;null==l&&t;)l=t.c,t=t.__;return l}function Q(n){for(var l=n.flags&y?n.props.__P:null,t=n.__;null==l&&t;)t.flags&y?l=t.props.__P:2&t.flags&&(l=t.__e),t=t.__;return l}function R(n,t,u,r,e){var i,f,o,c,s,a,h,d;l.__b&&l.__b(u,t);try{u.flags&v?(f=e,o=n,u.flags&y&&(n=t.props.__P)!==o&&(e=null),c=K(u),a=(s=t.type.contextType)&&c[s.__c],h=s?a?a.props.value:s.__:c,a&&a.s.add(u),i=4&u.flags?M(null,u,c,h):L(null,u,c,h),i=W(n,Array.isArray(d=null!=i&&i.type===T&&null==i.key?i.props.children:i)?d:[d],u,r,e),null!=u.__h&&u.__h.length&&r.push(u),u.flags&y&&o!==n&&(i=f)):i=V(96&u.flags?e:null,u,r),l.diffed&&l.diffed(u),u.flags&=b}catch(n){u.__v=0,u.flags|=n.then?128:256,32&u.flags&&(i=e&&e.nextSibling,u.__e=e),l.__e(n,u)}return i}function V(n,l,t){var u,r,e,i,f,o,c=l.props,s=l.type,a=l.flags,h=a&d,y=32&~a;if(96&a)for(;n&&(s?n.localName!==s:3!==n.nodeType);)n=n.nextSibling;if(e=null==n,1&a)e?n=document.createTextNode(c):n.data!==c&&(n.data=c),l.__e=n;else{if(e&&(n=h?document.createElementNS("http://www.w3.org/2000/svg",s):document.createElement(s,c.is&&c),l.flags=a&=b,y=1),64&a)for(u=0;n.attributes.length>u;u++)(r=n.attributes[u].name)in c||n.removeAttribute(r);for(u in"input"!==l.type&&"textarea"!==l.type&&"select"!==l.type||!c.onInput&&!c.onChange||(null!=c.value?(n.t=!0,n.u=c.value):null!=c.checked&&(n.t=!0,n.u=c.checked)),c)r=c[u],"key"===u||("children"===u?o=r:"dangerouslySetInnerHTML"===u?i=r:"value"===u?f=r:null==r||!y&&"function"!=typeof r||H(n,u,r,null,h));l.__e=n,i?(y&&i.__html&&(n.innerHTML=i.__html),l.__k=null):null!=o&&W(n,o&&Array.isArray(o)?o:[o],l,t,e?null:n.firstChild),y&&null!=f&&H(n,"value",f,null,0)}return e?null:n.nextSibling}function W(n,l,t,u,r){var e,i,f,o,c,s=t.__k=[];for(e=0;l.length>e;e++)null!=(i=O(l[e]))?(f=F(i,t),s[e]=f,c=R(n,i,f,u,r),o=f.__e,f.flags&v||o==r?r=c:null!=o&&n.insertBefore(o,r),f.ref&&A(null,f.ref,f.__c||o,f)):s[e]=null;if(96&t.flags&&2&t.flags)for(;r;)e=r,r=r.nextSibling,e.remove();return r}function X(n){var t,u,r,e=0;function i(i){l.__&&l.__(i,n),i=w(T,{__P:n},[i]),r=n.firstChild,u=[],t?q(n,i,t,u):(t=F(i),n.__k=t,r&&(e=e||64),n.ownerSVGElement!==k&&(e|=d),t.flags|=e,t.c={},R(n,i,t,u,r)),m(u,t)}return{hydrate(n){e|=32,i(n)},render:i}}function Y(n){return n.children}l={__e:function(n,l){for(;l=l.__;)if(l.flags&v&&1024&~l.flags)try{if(l.type.getDerivedStateFromError&&l.__c.setState(l.type.getDerivedStateFromError(n)),l.__c.componentDidCatch&&l.__c.componentDidCatch(n),l.flags&p)return void(l.flags|=512)}catch(l){n=l}throw n}},t=0,u=n=>null!=n&&n.constructor===k,r=0,e=new Set,i=n=>{e.delete(n)||e.forEach(l=>{l.__c.s.delete(n)})},f=(n,l)=>{var t={__c:l="__cC"+r++,__:n,Consumer:(n,l)=>n.children(l),Provider(n,t){return this.s?n.value!==this.p&&this.s.forEach(D):(this.s=new Set,(t={})[l]=this,this.getChildContext=()=>t,e.add(this.__i)),this.p=n.value,n.children}};return t.Provider.__=t.Consumer.contextType=t},B.prototype.setState=function(n,l){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Object.assign({},this.state),"function"==typeof n&&(n=n(Object.assign({},t),this.props)),n&&Object.assign(t,n),null!=n&&this.__i&&(l&&j(this.__i,l.bind(this)),this.__i.rerender(this.__i))},B.prototype.forceUpdate=function(n){this.__i&&(this.__i.flags|=8192,n&&j(this.__i,n.bind(this)),this.__i.rerender(this.__i))},B.prototype.render=T,o=[],s=Promise.prototype.then.bind(Promise.resolve()),a=E.__r=0,h=n=>n.flags&v&&(!(n.flags&y)||n.props.__P==Q(n.__)),n.Component=B,n.Fragment=T,n.cloneElement=function(n,l,t){var u,r,e,i=Object.assign({},n.props);for(e in l)"key"==e?u=l[e]:"ref"==e?r=l[e]:i[e]=l[e];if(arguments.length>3)for(t=[t],e=3;arguments.length>e;e++)t.push(arguments[e]);return arguments.length>2&&(i.children=t),x(n.type,i,u||n.key,r||n.ref,0)},n.createContext=f,n.createElement=w,n.createPortal=function(n,l){return w(Y,{__P:l},n)},n.createRef=function(){return{current:null}},n.createRoot=X,n.h=w,n.hydrate=function(n,l){var t=l&&l.__;t||(t=X(l)),t.hydrate(n),l.__=t},n.isValidElement=u,n.options=l,n.render=function(n,l){var t=l&&l.__;t||(t=X(l)),t.render(n),l.__=t},n.toChildArray=function n(l,t){if(t=t||[],null==l||"boolean"==typeof l);else if(Array.isArray(l))for(l of l)n(l,t);else t.push(l);return t}});
//# sourceMappingURL=preact.umd.js.map

@@ -1,2 +0,2 @@

var n,t,r,o=require("preact"),u=0,i=[],c=o.options.__b,e=o.options.__r,f=o.options.diffed,a=o.options.__c,v=o.options.unmount;function p(n,r){o.options.__h&&o.options.__h(t,n,u||r),u=0;var i=t.__H||(t.__H={__:[],__h:[]});return n>=i.__.length&&i.__.push({}),i.__[n]}function s(n){return u=1,x(A,n)}function x(r,o,u){var i=p(n++,2);return i.t=r,i.__c||(i.__=[u?u(o):A(void 0,o),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}))}],i.__c=t),i.__}function l(r,u){var i=p(n++,4);!o.options.__s&&q(i.__H,u)&&(i.__=r,i.__H=u,t.__h.push(i))}function m(t,r){var o=p(n++,7);return q(o.__H,r)&&(o.__=t(),o.__H=r,o.__h=t),o.__}function y(){for(var n;n=i.shift();)if(n.__P)try{n.__H.__h.forEach(_),n.__H.__h.forEach(d),n.__H.__h=[]}catch(t){n.__H.__h=[],o.options.__e(t,n.__v)}}o.options.__b=function(n){t=null,c&&c(n)},o.options.__r=function(r){e&&e(r),n=0;var o=(t=r.__c).__H;o&&(o.__h.forEach(_),o.__h.forEach(d),o.__h=[])},o.options.diffed=function(n){f&&f(n);var u=n.__c;u&&u.__H&&u.__H.__h.length&&(1!==i.push(u)&&r===o.options.requestAnimationFrame||((r=o.options.requestAnimationFrame)||function(n){var t,r=function(){clearTimeout(o),h&&cancelAnimationFrame(t),setTimeout(n)},o=setTimeout(r,100);h&&(t=requestAnimationFrame(r))})(y)),t=null},o.options.__c=function(n,t){t.some(function(n){try{n.__h.forEach(_),n.__h=n.__h.filter(function(n){return!n.__||d(n)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],o.options.__e(r,n.__v)}}),a&&a(n,t)},o.options.unmount=function(n){v&&v(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{_(n)}catch(n){t=n}}),t&&o.options.__e(t,r.__v))};var h="function"==typeof requestAnimationFrame;function _(n){var r=t,o=n.__c;"function"==typeof o&&(n.__c=void 0,o()),t=r}function d(n){var r=t;n.__c=n.__(),t=r}function q(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function A(n,t){return"function"==typeof t?t(n):t}exports.useState=s,exports.useReducer=x,exports.useEffect=function(r,u){var i=p(n++,3);!o.options.__s&&q(i.__H,u)&&(i.__=r,i.__H=u,t.__H.__h.push(i))},exports.useLayoutEffect=l,exports.useRef=function(n){return u=5,m(function(){return{current:n}},[])},exports.useImperativeHandle=function(n,t,r){u=6,l(function(){"function"==typeof n?n(t()):n&&(n.current=t())},null==r?r:r.concat(n))},exports.useMemo=m,exports.useCallback=function(n,t){return u=8,m(function(){return n},t)},exports.useContext=function(r){var o=t.context[r.__c],u=p(n++,9);return u.c=r,o?(null==u.__&&(u.__=!0,o.sub(t)),o.props.value):r.__},exports.useDebugValue=function(n,t){o.options.useDebugValue&&o.options.useDebugValue(t?t(n):n)},exports.useErrorBoundary=function(r){var o=p(n++,10),u=s();return o.__=r,t.componentDidCatch||(t.componentDidCatch=function(n){o.__&&o.__(n),u[1](n)}),[u[0],function(){u[1](void 0)}]};
var n,r,t,o=require("preact");Promise.prototype.then.bind(Promise.resolve());var i,u=0,e=[],c=o.options.__b,f=o.options.__r,a=o.options.diffed,v=o.options.__c,s=o.options.unmount;function p(n,t){o.options.__h&&o.options.__h(r,n,u||t),u=0;var i=r.data.__H||(r.data.__H={__:[],__h:[]});return n>=i.__.length&&i.__.push({}),i.__[n]}function l(n){return u=1,m(P,n)}function m(t,o,i){var u=p(n++,2);return u.t=t,u.__i||(u.__=[i?i(o):P(void 0,o),n=>{var r=u.t(u.__[0],n);u.__[0]!==r&&(u.__=[r,u.__[1]],u.__i.rerender(u.__i))}],u.__i=r),u.__}function x(t,i){var u=p(n++,4);!o.options.__s&&T(u.__H,i)&&(u.__=t,u.o=i,null==r.__h&&(r.__h=[]),r.__h.push(u))}function d(r,t){var o=p(n++,7);return T(o.__H,t)?(o.i=r(),o.o=t,o.__h=r,o.i):o.__}o.options.__b=(n,t)=>{r=null,c&&c(n,t)},o.options.__r=o=>{f&&f(o),n=0,(r=o).data&&r.data.__H&&(t===r?(r.data.__H.__h=[],r.__h=[],r.data.__H.__.forEach(n=>{n.o&&(n.o=void 0),n.i&&(n.i=void 0)})):(o.data&&o.data.__H&&o.data&&o.data.__H.__.forEach(n=>{n.o&&(n.__H=n.o,n.o=void 0),n.i&&(n.__=n.i,n.i=void 0)}),r.data.__H.__h.forEach(A),r.data.__H.__h.forEach(F),r.data.__H.__h=[])),t=o},o.options.diffed=n=>{a&&a(n),t=void 0,n.data&&n.data.__H&&n.data.__H.__h.length&&(1!==e.push(n)&&i===o.options.requestAnimationFrame||((i=o.options.requestAnimationFrame)||q)(h))},o.options.__c=(n,r)=>{r.some(n=>{try{n.data&&n.data.__H&&n.data&&n.data.__H.__.forEach(n=>{n.o&&(n.__H=n.o,n.o=void 0),n.i&&(n.__=n.i,n.i=void 0)}),n.__h.forEach(A),n.__h=n.__h.filter(n=>!n.__||F(n))}catch(t){r.some(n=>{n.__h&&(n.__h=[])}),r=[],o.options.__e(t,n)}}),v&&v(n,r)},o.options.unmount=n=>{var r;s&&s(n),n.data&&n.data.__H&&(n.data.__H.__.forEach(n=>{try{A(n)}catch(n){r=n}}),r&&o.options.__e(r,n))};var y=o.options.__e;function h(){for(var n;n=e.shift();)if(2048&~n.flags)try{n.data.__H.__h.forEach(A),n.data.__H.__h.forEach(F),n.data.__H.__h=[]}catch(r){n.data.__H.__h=[],o.options.__e(r,n)}}o.options.__e=function(n,r){for(var t=r;t=t.__;)if(t.data&&t.data.__e)return t.data.__e(n,r);y(n,r)};var _="function"==typeof requestAnimationFrame;function q(n){var r,t=()=>{clearTimeout(o),_&&cancelAnimationFrame(r),setTimeout(n)},o=setTimeout(t,100);_&&(r=requestAnimationFrame(t))}function A(n){var t=r,o=n.__c;"function"==typeof o&&(n.__c=void 0,o()),r=t}function F(n){var t=r;n.__c=n.__(),r=t}function T(n,r){return!n||n.length!==r.length||r.some((r,t)=>r!==n[t])}function P(n,r){return"function"==typeof r?r(n):r}exports.useCallback=function(n,r){return u=8,d(()=>n,r)},exports.useContext=function(t){var o=function(n){for(var t=r.c,o=r.__;null==t&&o;)t=o.c,o=o.__;return t}()[t.__c],i=p(n++,9);return i.c=t,o?(null==i.__&&(i.__=!0,o.s.add(r)),o.props.value):t.__},exports.useDebugValue=function(n,r){o.options.useDebugValue&&o.options.useDebugValue(r?r(n):n)},exports.useEffect=function(t,i){var u=p(n++,3);!o.options.__s&&T(u.__H,i)&&(u.__=t,u.o=i,r.data.__H.__h.push(u))},exports.useErrorBoundary=function(t){var o=p(n++,10),i=l();return o.__=t,r.data.__e||(r.data.__e=n=>{o.__&&o.__(n),i[1](n)}),[i[0],()=>{i[1](void 0)}]},exports.useImperativeHandle=function(n,r,t){u=6,x(()=>{"function"==typeof n?n(r()):n&&(n.current=r())},null==t?t:t.concat(n))},exports.useLayoutEffect=x,exports.useMemo=d,exports.useReducer=m,exports.useRef=function(n){return u=5,m(F,{current:n})[0]},exports.useState=l;
//# sourceMappingURL=hooks.js.map

@@ -1,2 +0,2 @@

!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],t):t(n.preactHooks={},n.preact)}(this,function(n,t){var u,o,r,i=0,c=[],f=t.options.__b,e=t.options.__r,a=t.options.diffed,v=t.options.__c,p=t.options.unmount;function l(n,u){t.options.__h&&t.options.__h(o,n,i||u),i=0;var r=o.__H||(o.__H={__:[],__h:[]});return n>=r.__.length&&r.__.push({}),r.__[n]}function m(n){return i=1,y(F,n)}function y(n,t,r){var i=l(u++,2);return i.t=n,i.__c||(i.__=[r?r(t):F(void 0,t),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}))}],i.__c=o),i.__}function d(n,r){var i=l(u++,4);!t.options.__s&&A(i.__H,r)&&(i.__=n,i.__H=r,o.__h.push(i))}function s(n,t){var o=l(u++,7);return A(o.__H,t)&&(o.__=n(),o.__H=t,o.__h=n),o.__}function h(){for(var n;n=c.shift();)if(n.__P)try{n.__H.__h.forEach(q),n.__H.__h.forEach(x),n.__H.__h=[]}catch(u){n.__H.__h=[],t.options.__e(u,n.__v)}}t.options.__b=function(n){o=null,f&&f(n)},t.options.__r=function(n){e&&e(n),u=0;var t=(o=n.__c).__H;t&&(t.__h.forEach(q),t.__h.forEach(x),t.__h=[])},t.options.diffed=function(n){a&&a(n);var u=n.__c;u&&u.__H&&u.__H.__h.length&&(1!==c.push(u)&&r===t.options.requestAnimationFrame||((r=t.options.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(o),_&&cancelAnimationFrame(t),setTimeout(n)},o=setTimeout(u,100);_&&(t=requestAnimationFrame(u))})(h)),o=null},t.options.__c=function(n,u){u.some(function(n){try{n.__h.forEach(q),n.__h=n.__h.filter(function(n){return!n.__||x(n)})}catch(o){u.some(function(n){n.__h&&(n.__h=[])}),u=[],t.options.__e(o,n.__v)}}),v&&v(n,u)},t.options.unmount=function(n){p&&p(n);var u,o=n.__c;o&&o.__H&&(o.__H.__.forEach(function(n){try{q(n)}catch(n){u=n}}),u&&t.options.__e(u,o.__v))};var _="function"==typeof requestAnimationFrame;function q(n){var t=o,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),o=t}function x(n){var t=o;n.__c=n.__(),o=t}function A(n,t){return!n||n.length!==t.length||t.some(function(t,u){return t!==n[u]})}function F(n,t){return"function"==typeof t?t(n):t}n.useState=m,n.useReducer=y,n.useEffect=function(n,r){var i=l(u++,3);!t.options.__s&&A(i.__H,r)&&(i.__=n,i.__H=r,o.__H.__h.push(i))},n.useLayoutEffect=d,n.useRef=function(n){return i=5,s(function(){return{current:n}},[])},n.useImperativeHandle=function(n,t,u){i=6,d(function(){"function"==typeof n?n(t()):n&&(n.current=t())},null==u?u:u.concat(n))},n.useMemo=s,n.useCallback=function(n,t){return i=8,s(function(){return n},t)},n.useContext=function(n){var t=o.context[n.__c],r=l(u++,9);return r.c=n,t?(null==r.__&&(r.__=!0,t.sub(o)),t.props.value):n.__},n.useDebugValue=function(n,u){t.options.useDebugValue&&t.options.useDebugValue(u?u(n):n)},n.useErrorBoundary=function(n){var t=l(u++,10),r=m();return t.__=n,o.componentDidCatch||(o.componentDidCatch=function(n){t.__&&t.__(n),r[1](n)}),[r[0],function(){r[1](void 0)}]}});
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],t):t((n||self).preactHooks={},n.preact)}(this,function(n,t){var r,o,i;Promise.prototype.then.bind(Promise.resolve());var e,u=0,f=[],c=t.options.__b,a=t.options.__r,v=t.options.diffed,d=t.options.__c,l=t.options.unmount;function p(n,r){t.options.__h&&t.options.__h(o,n,u||r),u=0;var i=o.data.__H||(o.data.__H={__:[],__h:[]});return n>=i.__.length&&i.__.push({}),i.__[n]}function s(n){return u=1,m(g,n)}function m(n,t,i){var e=p(r++,2);return e.t=n,e.__i||(e.__=[i?i(t):g(void 0,t),n=>{var t=e.t(e.__[0],n);e.__[0]!==t&&(e.__=[t,e.__[1]],e.__i.rerender(e.__i))}],e.__i=o),e.__}function y(n,i){var e=p(r++,4);!t.options.__s&&F(e.__H,i)&&(e.__=n,e.o=i,null==o.__h&&(o.__h=[]),o.__h.push(e))}function h(n,t){var o=p(r++,7);return F(o.__H,t)?(o.i=n(),o.o=t,o.__h=n,o.i):o.__}t.options.__b=(n,t)=>{o=null,c&&c(n,t)},t.options.__r=n=>{a&&a(n),r=0,(o=n).data&&o.data.__H&&(i===o?(o.data.__H.__h=[],o.__h=[],o.data.__H.__.forEach(n=>{n.o&&(n.o=void 0),n.i&&(n.i=void 0)})):(n.data&&n.data.__H&&n.data&&n.data.__H.__.forEach(n=>{n.o&&(n.__H=n.o,n.o=void 0),n.i&&(n.__=n.i,n.i=void 0)}),o.data.__H.__h.forEach(x),o.data.__H.__h.forEach(A),o.data.__H.__h=[])),i=n},t.options.diffed=n=>{v&&v(n),i=void 0,n.data&&n.data.__H&&n.data.__H.__h.length&&(1!==f.push(n)&&e===t.options.requestAnimationFrame||((e=t.options.requestAnimationFrame)||q)(_))},t.options.__c=(n,r)=>{r.some(n=>{try{n.data&&n.data.__H&&n.data&&n.data.__H.__.forEach(n=>{n.o&&(n.__H=n.o,n.o=void 0),n.i&&(n.__=n.i,n.i=void 0)}),n.__h.forEach(x),n.__h=n.__h.filter(n=>!n.__||A(n))}catch(o){r.some(n=>{n.__h&&(n.__h=[])}),r=[],t.options.__e(o,n)}}),d&&d(n,r)},t.options.unmount=n=>{var r;l&&l(n),n.data&&n.data.__H&&(n.data.__H.__.forEach(n=>{try{x(n)}catch(n){r=n}}),r&&t.options.__e(r,n))};var T=t.options.__e;function _(){for(var n;n=f.shift();)if(2048&~n.flags)try{n.data.__H.__h.forEach(x),n.data.__H.__h.forEach(A),n.data.__H.__h=[]}catch(r){n.data.__H.__h=[],t.options.__e(r,n)}}t.options.__e=function(n,t){for(var r=t;r=r.__;)if(r.data&&r.data.__e)return r.data.__e(n,t);T(n,t)};var b="function"==typeof requestAnimationFrame;function q(n){var t,r=()=>{clearTimeout(o),b&&cancelAnimationFrame(t),setTimeout(n)},o=setTimeout(r,100);b&&(t=requestAnimationFrame(r))}function x(n){var t=o,r=n.__c;"function"==typeof r&&(n.__c=void 0,r()),o=t}function A(n){var t=o;n.__c=n.__(),o=t}function F(n,t){return!n||n.length!==t.length||t.some((t,r)=>t!==n[r])}function g(n,t){return"function"==typeof t?t(n):t}n.useCallback=function(n,t){return u=8,h(()=>n,t)},n.useContext=function(n){var t=function(n){for(var t=n.c,r=n.__;null==t&&r;)t=r.c,r=r.__;return t}(o)[n.__c],i=p(r++,9);return i.c=n,t?(null==i.__&&(i.__=!0,t.s.add(o)),t.props.value):n.__},n.useDebugValue=function(n,r){t.options.useDebugValue&&t.options.useDebugValue(r?r(n):n)},n.useEffect=function(n,i){var e=p(r++,3);!t.options.__s&&F(e.__H,i)&&(e.__=n,e.o=i,o.data.__H.__h.push(e))},n.useErrorBoundary=function(n){var t=p(r++,10),i=s();return t.__=n,o.data.__e||(o.data.__e=n=>{t.__&&t.__(n),i[1](n)}),[i[0],()=>{i[1](void 0)}]},n.useImperativeHandle=function(n,t,r){u=6,y(()=>{"function"==typeof n?n(t()):n&&(n.current=t())},null==r?r:r.concat(n))},n.useLayoutEffect=y,n.useMemo=h,n.useReducer=m,n.useRef=function(n){return u=5,m(A,{current:n})[0]},n.useState=s});
//# sourceMappingURL=hooks.umd.js.map

@@ -7,4 +7,5 @@ {

"description": "Hook addon for Preact",
"exports": "./dist/hooks.mjs",
"module": "dist/hooks.mjs",
"main": "dist/hooks.js",
"module": "dist/hooks.module.js",
"umd:main": "dist/hooks.umd.js",

@@ -11,0 +12,0 @@ "source": "src/index.js",

@@ -0,0 +0,0 @@ import { PreactContext, Ref as PreactRef } from '../..';

import { options } from 'preact';
import { getParentContext } from '../../src/tree';
import { MODE_UNMOUNTING } from '../../src/constants';

@@ -6,5 +8,8 @@ /** @type {number} */

/** @type {import('./internal').Component} */
let currentComponent;
/** @type {import('./internal').Internal} */
let currentInternal;
/** @type {import('./internal').Internal} */
let previousInternal;
/** @type {number} */

@@ -25,57 +30,94 @@ let currentHook = 0;

options._diff = vnode => {
currentComponent = null;
if (oldBeforeDiff) oldBeforeDiff(vnode);
options._diff = (internal, vnode) => {
currentInternal = null;
if (oldBeforeDiff) oldBeforeDiff(internal, vnode);
};
options._render = vnode => {
if (oldBeforeRender) oldBeforeRender(vnode);
options._render = internal => {
if (oldBeforeRender) oldBeforeRender(internal);
currentComponent = vnode._component;
currentInternal = internal;
currentIndex = 0;
const hooks = currentComponent.__hooks;
if (hooks) {
hooks._pendingEffects.forEach(invokeCleanup);
hooks._pendingEffects.forEach(invokeEffect);
hooks._pendingEffects = [];
if (currentInternal.data && currentInternal.data.__hooks) {
if (previousInternal === currentInternal) {
currentInternal.data.__hooks._pendingEffects = [];
currentInternal._commitCallbacks = [];
currentInternal.data.__hooks._list.forEach(hookItem => {
if (hookItem._pendingArgs) hookItem._pendingArgs = undefined;
if (hookItem._pendingValue) hookItem._pendingValue = undefined;
});
} else {
if (internal.data && internal.data.__hooks) {
internal.data &&
internal.data.__hooks._list.forEach(hookItem => {
if (hookItem._pendingArgs) {
hookItem._args = hookItem._pendingArgs;
hookItem._pendingArgs = undefined;
}
if (hookItem._pendingValue) {
hookItem._value = hookItem._pendingValue;
hookItem._pendingValue = undefined;
}
});
}
currentInternal.data.__hooks._pendingEffects.forEach(invokeCleanup);
currentInternal.data.__hooks._pendingEffects.forEach(invokeEffect);
currentInternal.data.__hooks._pendingEffects = [];
}
}
previousInternal = internal;
};
options.diffed = vnode => {
if (oldAfterDiff) oldAfterDiff(vnode);
options.diffed = internal => {
if (oldAfterDiff) oldAfterDiff(internal);
const c = vnode._component;
if (c && c.__hooks && c.__hooks._pendingEffects.length) {
afterPaint(afterPaintEffects.push(c));
previousInternal = undefined;
if (
internal.data &&
internal.data.__hooks &&
internal.data.__hooks._pendingEffects.length
) {
afterPaint(afterPaintEffects.push(internal));
}
currentComponent = null;
};
options._commit = (vnode, commitQueue) => {
commitQueue.some(component => {
options._commit = (internal, commitQueue) => {
commitQueue.some(internal => {
try {
component._renderCallbacks.forEach(invokeCleanup);
component._renderCallbacks = component._renderCallbacks.filter(cb =>
if (internal.data && internal.data.__hooks) {
internal.data &&
internal.data.__hooks._list.forEach(hookItem => {
if (hookItem._pendingArgs) {
hookItem._args = hookItem._pendingArgs;
hookItem._pendingArgs = undefined;
}
if (hookItem._pendingValue) {
hookItem._value = hookItem._pendingValue;
hookItem._pendingValue = undefined;
}
});
}
internal._commitCallbacks.forEach(invokeCleanup);
internal._commitCallbacks = internal._commitCallbacks.filter(cb =>
cb._value ? invokeEffect(cb) : true
);
} catch (e) {
commitQueue.some(c => {
if (c._renderCallbacks) c._renderCallbacks = [];
commitQueue.some(i => {
if (i._commitCallbacks) i._commitCallbacks = [];
});
commitQueue = [];
options._catchError(e, component._vnode);
options._catchError(e, internal);
}
});
if (oldCommit) oldCommit(vnode, commitQueue);
if (oldCommit) oldCommit(internal, commitQueue);
};
options.unmount = vnode => {
if (oldBeforeUnmount) oldBeforeUnmount(vnode);
options.unmount = internal => {
if (oldBeforeUnmount) oldBeforeUnmount(internal);
const c = vnode._component;
if (c && c.__hooks) {
if (internal.data && internal.data.__hooks) {
let hasErrored;
c.__hooks._list.forEach(s => {
internal.data.__hooks._list.forEach(s => {
try {

@@ -87,3 +129,3 @@ invokeCleanup(s);

});
if (hasErrored) options._catchError(hasErrored, c._vnode);
if (hasErrored) options._catchError(hasErrored, internal);
}

@@ -100,3 +142,3 @@ };

if (options._hook) {
options._hook(currentComponent, index, currentHook || type);
options._hook(currentInternal, index, currentHook || type);
}

@@ -111,4 +153,4 @@ currentHook = 0;

const hooks =
currentComponent.__hooks ||
(currentComponent.__hooks = {
currentInternal.data.__hooks ||
(currentInternal.data.__hooks = {
_list: [],

@@ -142,3 +184,3 @@ _pendingEffects: []

hookState._reducer = reducer;
if (!hookState._component) {
if (!hookState._internal) {
hookState._value = [

@@ -151,3 +193,3 @@ !init ? invokeOrReturn(undefined, initialState) : init(initialState),

hookState._value = [nextValue, hookState._value[1]];
hookState._component.setState({});
hookState._internal.rerender(hookState._internal);
}

@@ -157,3 +199,3 @@ }

hookState._component = currentComponent;
hookState._internal = currentInternal;
}

@@ -173,5 +215,5 @@

state._value = callback;
state._args = args;
state._pendingArgs = args;
currentComponent.__hooks._pendingEffects.push(state);
currentInternal.data.__hooks._pendingEffects.push(state);
}

@@ -189,5 +231,8 @@ }

state._value = callback;
state._args = args;
state._pendingArgs = args;
currentComponent._renderCallbacks.push(state);
if (currentInternal._commitCallbacks == null) {
currentInternal._commitCallbacks = [];
}
currentInternal._commitCallbacks.push(state);
}

@@ -198,3 +243,3 @@ }

currentHook = 5;
return useMemo(() => ({ current: initialValue }), []);
return useReducer(invokeEffect, { current: initialValue })[0];
}

@@ -226,5 +271,6 @@

if (argsChanged(state._args, args)) {
state._value = factory();
state._args = args;
state._pendingValue = factory();
state._pendingArgs = args;
state._factory = factory;
return state._pendingValue;
}

@@ -248,3 +294,3 @@

export function useContext(context) {
const provider = currentComponent.context[context._id];
const provider = getParentContext(currentInternal)[context._id];
// We could skip this call here, but than we'd not call

@@ -263,3 +309,3 @@ // `options._hook`. We need to do that in order to make

state._value = true;
provider.sub(currentComponent);
provider._subs.add(currentInternal);
}

@@ -279,2 +325,19 @@ return provider.props.value;

const oldCatchError = options._catchError;
// TODO: this double traverses now in combination with the root _catchError
// however when we split Component up this shouldn't be needed
// there can be a better solution to this if we just do a single iteration
// as a combination of suspsense + hooks + component (compat) would be 3 tree-iterations
options._catchError = function(error, internal) {
/** @type {import('./internal').Component} */
let handler = internal;
for (; (handler = handler._parent); ) {
if (handler.data && handler.data._catchError) {
return handler.data._catchError(error, internal);
}
}
oldCatchError(error, internal);
};
/**

@@ -288,4 +351,5 @@ * @param {(error: any) => void} cb

state._value = cb;
if (!currentComponent.componentDidCatch) {
currentComponent.componentDidCatch = err => {
if (!currentInternal.data._catchError) {
currentInternal.data._catchError = err => {
if (state._value) state._value(err);

@@ -307,12 +371,13 @@ errState[1](err);

function flushAfterPaintEffects() {
let component;
while ((component = afterPaintEffects.shift())) {
if (!component._parentDom) continue;
try {
component.__hooks._pendingEffects.forEach(invokeCleanup);
component.__hooks._pendingEffects.forEach(invokeEffect);
component.__hooks._pendingEffects = [];
} catch (e) {
component.__hooks._pendingEffects = [];
options._catchError(e, component._vnode);
let internal;
while ((internal = afterPaintEffects.shift())) {
if (~internal.flags & MODE_UNMOUNTING) {
try {
internal.data.__hooks._pendingEffects.forEach(invokeCleanup);
internal.data.__hooks._pendingEffects.forEach(invokeEffect);
internal.data.__hooks._pendingEffects = [];
} catch (e) {
internal.data.__hooks._pendingEffects = [];
options._catchError(e, internal);
}
}

@@ -367,4 +432,4 @@ }

// A hook cleanup can introduce a call to render which creates a new root, this will call options.vnode
// and move the currentComponent away.
const comp = currentComponent;
// and move the currentInternal away.
const internal = currentInternal;
let cleanup = hook._cleanup;

@@ -375,3 +440,3 @@ if (typeof cleanup == 'function') {

}
currentComponent = comp;
currentInternal = internal;
}

@@ -385,6 +450,6 @@

// A hook call can introduce a call to render which creates a new root, this will call options.vnode
// and move the currentComponent away.
const comp = currentComponent;
// and move the currentInternal away.
const internal = currentInternal;
hook._cleanup = hook._value();
currentComponent = comp;
currentInternal = internal;
}

@@ -391,0 +456,0 @@

import {
Component as PreactComponent,
PreactContext
PreactContext,
Internal as PreactInternal
} from '../../src/internal';

@@ -9,2 +10,8 @@ import { Reducer } from '.';

export interface Internal extends PreactInternal {
data: PreactInternal.data & {
__hooks: ComponentHooks;
};
}
/**

@@ -53,2 +60,3 @@ * The type of arguments passed to a Hook function. While this type is not

_args?: any[];
_pendingArgs?: any[];
_cleanup?: Cleanup | void;

@@ -59,3 +67,5 @@ }

_value?: any;
_pendingValue?: any;
_args?: any[];
_pendingArgs?: any[];
_factory?: () => any;

@@ -66,3 +76,3 @@ }

_value?: any;
_component?: Component;
_internal?: Internal;
_reducer?: Reducer<any, any>;

@@ -69,0 +79,0 @@ }

@@ -1,2 +0,2 @@

var r=require("preact"),_=0;function e(e,o,n,t,l){var u,f,i={};for(f in o)"ref"==f?u=o[f]:i[f]=o[f];var p={type:e,props:i,key:n,ref:u,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--_,__source:t,__self:l};if("function"==typeof e&&(u=e.defaultProps))for(f in u)void 0===i[f]&&(i[f]=u[f]);return r.options.vnode&&r.options.vnode(p),p}exports.Fragment=r.Fragment,exports.jsx=e,exports.jsxs=e,exports.jsxDEV=e;
var r=require("preact"),e=0;function t(t,o,n,f,i){var p={};for(var u in o)"ref"!=u&&(p[u]=o[u]);var c,s,a={type:t,props:p,key:n,ref:o&&o.ref,constructor:void 0,__v:--e,__source:f,__self:i};if("function"==typeof t&&(c=t.defaultProps))for(s in c)void 0===p[s]&&(p[s]=c[s]);return r.options.vnode&&r.options.vnode(a),a}Object.defineProperty(exports,"Fragment",{enumerable:!0,get:function(){return r.Fragment}}),exports.jsx=t,exports.jsxDEV=t,exports.jsxs=t;
//# sourceMappingURL=jsxRuntime.js.map

@@ -1,2 +0,2 @@

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],n):n(e.jsxRuntime={},e.preact)}(this,function(e,n){var o=0;function r(e,r,t,_,f){var i,u,c={};for(u in r)"ref"==u?i=r[u]:c[u]=r[u];var l={type:e,props:c,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--o,__source:_,__self:f};if("function"==typeof e&&(i=e.defaultProps))for(u in i)void 0===c[u]&&(c[u]=i[u]);return n.options.vnode&&n.options.vnode(l),l}e.Fragment=n.Fragment,e.jsx=r,e.jsxs=r,e.jsxDEV=r});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],n):n((e||self).jsxRuntime={},e.preact)}(this,function(e,n){var o=0;function t(e,t,r,f,i){var u={};for(var c in t)"ref"!=c&&(u[c]=t[c]);var p,s,a={type:e,props:u,key:r,ref:t&&t.ref,constructor:void 0,__v:--o,__source:f,__self:i};if("function"==typeof e&&(p=e.defaultProps))for(s in p)void 0===u[s]&&(u[s]=p[s]);return n.options.vnode&&n.options.vnode(a),a}Object.defineProperty(e,"Fragment",{enumerable:!0,get:function(){return n.Fragment}}),e.jsx=t,e.jsxDEV=t,e.jsxs=t});
//# sourceMappingURL=jsxRuntime.umd.js.map

@@ -7,4 +7,5 @@ {

"description": "Preact JSX runtime",
"exports": "./dist/jsxRuntime.mjs",
"module": "dist/jsxRuntime.mjs",
"main": "dist/jsxRuntime.js",
"module": "dist/jsxRuntime.module.js",
"umd:main": "dist/jsxRuntime.umd.js",

@@ -11,0 +12,0 @@ "source": "src/index.js",

@@ -0,0 +0,0 @@ export { Fragment } from '../../';

@@ -30,9 +30,5 @@ import { options, Fragment } from 'preact';

// a separate PR.
let normalizedProps = {},
ref,
i;
for (i in props) {
if (i == 'ref') {
ref = props[i];
} else {
let normalizedProps = {};
for (let i in props) {
if (i != 'ref') {
normalizedProps[i] = props[i];

@@ -46,12 +42,5 @@ }

key,
ref,
_children: null,
_parent: null,
_depth: 0,
_dom: null,
_nextDom: undefined,
_component: null,
_hydrating: null,
ref: props && props.ref,
constructor: undefined,
_original: --vnodeId,
_vnodeId: --vnodeId,
__source,

@@ -63,6 +52,7 @@ __self

// Note: `type` is often a String, and can be `undefined` in development.
if (typeof type === 'function' && (ref = type.defaultProps)) {
for (i in ref)
if (typeof normalizedProps[i] === 'undefined') {
normalizedProps[i] = ref[i];
let defaults, i;
if (typeof type === 'function' && (defaults = type.defaultProps)) {
for (i in defaults)
if (normalizedProps[i] === undefined) {
normalizedProps[i] = defaults[i];
}

@@ -69,0 +59,0 @@ }

{
"name": "preact",
"amdName": "preact",
"version": "10.6.6",
"version": "11.0.0-experimental.0",
"private": false,
"description": "Fast 3kb React-compatible Virtual DOM library.",
"main": "dist/preact.js",
"module": "dist/preact.module.js",
"module": "dist/preact.mjs",
"umd:main": "dist/preact.umd.js",
"unpkg": "dist/preact.min.js",
"source": "src/index.js",
"browserslist": [
"Firefox>=60",
"chrome>=61",
"and_chr>=61",
"Safari>=10.1",
"iOS>=10.3",
"edge>=16",
"opera>=48",
"op_mob>=48",
"Samsung>=8.2",
"not dead"
],
"exports": {
".": {
"browser": "./dist/preact.module.js",
"umd": "./dist/preact.umd.js",
"module": "./dist/preact.mjs",
"import": "./dist/preact.mjs",
"require": "./dist/preact.js"
"require": "./dist/preact.js",
"umd": "./dist/preact.umd.js"
},
"./compat": {
"browser": "./compat/dist/compat.module.js",
"umd": "./compat/dist/compat.umd.js",
"module": "./compat/dist/compat.mjs",
"import": "./compat/dist/compat.mjs",
"require": "./compat/dist/compat.js",
"import": "./compat/dist/compat.mjs"
"umd": "./compat/dist/compat.umd.js"
},
"./debug": {
"browser": "./debug/dist/debug.module.js",
"umd": "./debug/dist/debug.umd.js",
"module": "./debug/dist/debug.mjs",
"import": "./debug/dist/debug.mjs",
"require": "./debug/dist/debug.js",
"import": "./debug/dist/debug.mjs"
"umd": "./debug/dist/debug.umd.js"
},
"./devtools": {
"browser": "./devtools/dist/devtools.module.js",
"umd": "./devtools/dist/devtools.umd.js",
"module": "./devtools/dist/devtools.mjs",
"import": "./devtools/dist/devtools.mjs",
"require": "./devtools/dist/devtools.js",
"import": "./devtools/dist/devtools.mjs"
"umd": "./devtools/dist/devtools.umd.js"
},
"./hooks": {
"browser": "./hooks/dist/hooks.module.js",
"umd": "./hooks/dist/hooks.umd.js",
"module": "./hooks/dist/hooks.mjs",
"import": "./hooks/dist/hooks.mjs",
"require": "./hooks/dist/hooks.js",
"import": "./hooks/dist/hooks.mjs"
"umd": "./hooks/dist/hooks.umd.js"
},
"./test-utils": {
"browser": "./test-utils/dist/testUtils.module.js",
"umd": "./test-utils/dist/testUtils.umd.js",
"module": "./test-utils/dist/testUtils.mjs",
"import": "./test-utils/dist/testUtils.mjs",
"require": "./test-utils/dist/testUtils.js",
"import": "./test-utils/dist/testUtils.mjs"
"umd": "./test-utils/dist/testUtils.umd.js"
},
"./jsx-runtime": {
"browser": "./jsx-runtime/dist/jsxRuntime.module.js",
"umd": "./jsx-runtime/dist/jsxRuntime.umd.js",
"module": "./jsx-runtime/dist/jsxRuntime.mjs",
"import": "./jsx-runtime/dist/jsxRuntime.mjs",
"require": "./jsx-runtime/dist/jsxRuntime.js",
"import": "./jsx-runtime/dist/jsxRuntime.mjs"
"umd": "./jsx-runtime/dist/jsxRuntime.umd.js"
},
"./jsx-dev-runtime": {
"browser": "./jsx-runtime/dist/jsxRuntime.module.js",
"umd": "./jsx-runtime/dist/jsxRuntime.umd.js",
"module": "./jsx-runtime/dist/jsxRuntime.mjs",
"import": "./jsx-runtime/dist/jsxRuntime.mjs",
"require": "./jsx-runtime/dist/jsxRuntime.js",
"import": "./jsx-runtime/dist/jsxRuntime.mjs"
"umd": "./jsx-runtime/dist/jsxRuntime.umd.js"
},
"./compat/server": {
"require": "./compat/server.js",
"import": "./compat/server.mjs"
"module": "./compat/server.mjs",
"import": "./compat/server.mjs",
"require": "./compat/server.js"
},
"./compat/jsx-runtime": {
"require": "./compat/jsx-runtime.js",
"import": "./compat/jsx-runtime.mjs"
},
"./compat/jsx-dev-runtime": {
"require": "./compat/jsx-dev-runtime.js",
"import": "./compat/jsx-dev-runtime.mjs"
},
"./compat/scheduler": {
"require": "./compat/scheduler.js",
"import": "./compat/scheduler.mjs"
},
"./package.json": "./package.json",

@@ -94,14 +95,15 @@ "./compat/package.json": "./compat/package.json",

"build": "npm-run-all --parallel build:*",
"build:core": "microbundle build --raw",
"build:core-min": "microbundle build --raw -f iife src/cjs.js -o dist/preact.min.js",
"build:debug": "microbundle build --raw --cwd debug",
"build:devtools": "microbundle build --raw --cwd devtools",
"build:hooks": "microbundle build --raw --cwd hooks",
"build:test-utils": "microbundle build --raw --cwd test-utils",
"build:compat": "microbundle build src/index.js src/scheduler.js --raw --cwd compat --globals 'preact/hooks=preactHooks'",
"build:jsx": "microbundle build --raw --cwd jsx-runtime",
"postbuild": "node ./config/node-13-exports.js && node ./config/compat-entries.js",
"dev": "microbundle watch --raw --format cjs",
"dev:hooks": "microbundle watch --raw --format cjs --cwd hooks",
"dev:compat": "microbundle watch --raw --format cjs --cwd compat --globals 'preact/hooks=preactHooks'",
"_bundle": "microbundle build --raw -f modern,cjs,umd --no-generateTypes",
"build:core": "npm run -s _bundle",
"build:core-min": "microbundle build --raw -f iife src/cjs.js -o dist/preact.min.js --no-generateTypes",
"build:debug": "npm run -s _bundle -- --cwd debug",
"build:devtools": "npm run -s _bundle -- --cwd devtools",
"build:hooks": "npm run -s _bundle -- --cwd hooks",
"build:test-utils": "npm run -s _bundle -- --cwd test-utils",
"build:compat": "npm run -s _bundle -- --cwd compat --globals 'preact/hooks=preactHooks'",
"build:jsx": "npm run -s _bundle -- --cwd jsx-runtime",
"postbuild": "node ./config/compat-entries.js",
"dev": "microbundle watch --raw --format cjs --no-generateTypes",
"dev:hooks": "microbundle watch --raw --format cjs --cwd hooks --no-generateTypes",
"dev:compat": "microbundle watch --raw --format cjs --cwd compat --globals 'preact/hooks=preactHooks' --no-generateTypes",
"test": "npm-run-all build lint test:unit",

@@ -148,3 +150,3 @@ "test:unit": "run-p test:mocha test:karma:minify test:ts",

"args": "none",
"varsIgnorePattern": "^h|React$"
"varsIgnorePattern": "^h|React|_[0-9]?$"
}

@@ -161,6 +163,2 @@ ],

"jest/no-disabled-tests": 0,
"jest/no-test-callback": 0,
"jest/expect-expect": 0,
"jest/no-standalone-expect": 0,
"jest/no-export": 0,
"react/no-find-dom-node": 0

@@ -198,4 +196,2 @@ }

"compat/server.mjs",
"compat/scheduler.js",
"compat/scheduler.mjs",
"compat/test-utils.js",

@@ -242,4 +238,2 @@ "compat/jsx-runtime.js",

"devDependencies": {
"@actions/github": "^5.0.0",
"@actions/glob": "^0.2.0",
"@babel/core": "^7.7.0",

@@ -251,3 +245,5 @@ "@babel/plugin-proposal-object-rest-spread": "^7.6.2",

"@babel/register": "^7.7.0",
"@types/chai": "^4.1.2",
"@changesets/changelog-github": "^0.4.2",
"@changesets/cli": "^2.18.1",
"@types/chai": "^4.3.0",
"@types/mocha": "^5.0.0",

@@ -259,10 +255,10 @@ "@types/node": "^14.14.10",

"benchmark": "^2.1.4",
"chai": "^4.1.2",
"chai": "^4.3.4",
"check-export-map": "^1.2.0",
"coveralls": "^3.0.0",
"cross-env": "^7.0.2",
"coveralls": "^3.1.1",
"cross-env": "^7.0.3",
"csstype": "^3.0.5",
"diff": "^5.0.0",
"errorstacks": "^2.3.0",
"esbuild": "^0.12.24",
"errorstacks": "^2.3.2",
"esbuild": "^0.11.21",
"eslint": "5.15.1",

@@ -273,16 +269,16 @@ "eslint-config-developit": "^1.1.1",

"husky": "^4.3.0",
"karma": "^6.3.4",
"karma": "^5.2.3",
"karma-chai-sinon": "^0.1.5",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage": "^2.0.3",
"karma-coverage": "^2.1.0",
"karma-esbuild": "^2.2.0",
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-sauce-launcher": "^4.3.4",
"karma-sauce-launcher": "^4.3.6",
"karma-sinon": "^1.0.5",
"karma-sourcemap-loader": "^0.3.7",
"kolorist": "^1.2.10",
"kolorist": "^1.5.1",
"lint-staged": "^10.5.2",
"lodash": "^4.17.20",
"microbundle": "^0.11.0",
"lodash": "^4.17.21",
"microbundle": "^0.14.2",
"mocha": "^8.2.1",

@@ -293,8 +289,6 @@ "npm-merge-driver-install": "^1.1.1",

"prop-types": "^15.7.2",
"sade": "^1.7.4",
"sinon": "^9.2.3",
"sinon-chai": "^3.5.0",
"typescript": "4.4.2",
"undici": "^4.12.0"
"sinon-chai": "^3.7.0",
"typescript": "3.5.3"
}
}

@@ -55,3 +55,3 @@ <p align="center">

The easiest way to get started with Preact is to use [Preact CLI](https://github.com/preactjs/preact-cli). This simple command-line tool wraps up the best possible tooling for you, and even keeps things like Webpack and Babel up-to-date as they change. Best of all, it's easy to understand! Start a project or compile for production in a single command (`preact build`), with no configuration needed and best practices baked in! 🙌
The easiest way to get started with Preact is to install [Preact CLI](https://github.com/preactjs/preact-cli). This simple command-line tool wraps up the best possible tooling for you, and even keeps things like Webpack and Babel up-to-date as they change. Best of all, it's easy to understand! Start a project or compile for production in a single command (`preact build`), with no configuration needed and best practices baked in! 🙌

@@ -93,3 +93,3 @@ #### Tutorial: Building UI with Preact

<p>Do you agree to the statement: "Preact is awesome"?</p>
<input value={input} onInput={e => setInput(e.target.value)} />
<input value={input} onChange={e => setInput(e.target.value)} />
</div>

@@ -96,0 +96,0 @@ )

import * as preact from './index.js';
if (typeof module < 'u') module.exports = preact;
else self.preact = preact;

@@ -1,2 +0,1 @@

import { assign, slice } from './util';
import { createVNode } from './create-element';

@@ -12,6 +11,7 @@

export function cloneElement(vnode, props, children) {
let normalizedProps = assign({}, vnode.props),
let normalizedProps = Object.assign({}, vnode.props),
key,
ref,
i;
for (i in props) {

@@ -23,5 +23,11 @@ if (i == 'key') key = props[i];

if (arguments.length > 3) {
children = [children];
for (i = 3; i < arguments.length; i++) {
children.push(arguments[i]);
}
}
if (arguments.length > 2) {
normalizedProps.children =
arguments.length > 3 ? slice.call(arguments, 2) : children;
normalizedProps.children = children;
}

@@ -34,4 +40,4 @@

ref || vnode.ref,
null
0
);
}

@@ -1,5 +0,7 @@

import { assign } from './util';
import { diff, commitRoot } from './diff/index';
import { addCommitCallback, commitRoot } from './diff/commit';
import options from './options';
import { Fragment } from './create-element';
import { createVNode, Fragment } from './create-element';
import { patch } from './diff/patch';
import { DIRTY_BIT, FORCE_UPDATE, MODE_UNMOUNTING } from './constants';
import { getParentDom } from './tree';

@@ -33,3 +35,3 @@ /**

} else {
s = this._nextState = assign({}, this.state);
s = this._nextState = Object.assign({}, this.state);
}

@@ -40,7 +42,7 @@

// preventing us from mutating it, so we need to clone it. See #2716
update = update(assign({}, s), this.props);
update = update(Object.assign({}, s), this.props);
}
if (update) {
assign(s, update);
Object.assign(s, update);
}

@@ -51,5 +53,5 @@

if (this._vnode) {
if (callback) this._renderCallbacks.push(callback);
enqueueRender(this);
if (this._internal) {
if (callback) addCommitCallback(this._internal, callback.bind(this));
this._internal.rerender(this._internal);
}

@@ -65,9 +67,9 @@ };

Component.prototype.forceUpdate = function(callback) {
if (this._vnode) {
if (this._internal) {
// Set render mode so that we can differentiate where the render request
// is coming from. We need this because forceUpdate should never call
// shouldComponentUpdate
this._force = true;
if (callback) this._renderCallbacks.push(callback);
enqueueRender(this);
this._internal.flags |= FORCE_UPDATE;
if (callback) addCommitCallback(this._internal, callback.bind(this));
this._internal.rerender(this._internal);
}

@@ -89,63 +91,19 @@ };

/**
* @param {import('./internal').VNode} vnode
* @param {number | null} [childIndex]
* @param {import('./internal').Internal} internal The internal to rerender
*/
export function getDomSibling(vnode, childIndex) {
if (childIndex == null) {
// Use childIndex==null as a signal to resume the search from the vnode's sibling
return vnode._parent
? getDomSibling(vnode._parent, vnode._parent._children.indexOf(vnode) + 1)
: null;
}
function rerender(internal) {
if (~internal.flags & MODE_UNMOUNTING && internal.flags & DIRTY_BIT) {
let parentDom = getParentDom(internal);
let sibling;
for (; childIndex < vnode._children.length; childIndex++) {
sibling = vnode._children[childIndex];
if (sibling != null && sibling._dom != null) {
// Since updateParentDomPointers keeps _dom pointer correct,
// we can rely on _dom to tell us if this subtree contains a
// rendered DOM node, and what the first rendered DOM node is
return sibling._dom;
}
}
// If we get here, we have not found a DOM node in this vnode's children.
// We must resume from this vnode's sibling (in it's parent _children array)
// Only climb up and search the parent if we aren't searching through a DOM
// VNode (meaning we reached the DOM parent of the original vnode that began
// the search)
return typeof vnode.type == 'function' ? getDomSibling(vnode) : null;
}
/**
* Trigger in-place re-rendering of a component.
* @param {import('./internal').Component} component The component to rerender
*/
function renderComponent(component) {
let vnode = component._vnode,
oldDom = vnode._dom,
parentDom = component._parentDom;
if (parentDom) {
let commitQueue = [];
const oldVNode = assign({}, vnode);
oldVNode._original = vnode._original + 1;
diff(
parentDom,
vnode,
oldVNode,
component._globalContext,
parentDom.ownerSVGElement !== undefined,
vnode._hydrating != null ? [oldDom] : null,
commitQueue,
oldDom == null ? getDomSibling(vnode) : oldDom,
vnode._hydrating
const vnode = createVNode(
internal.type,
internal.props,
internal.key, // @TODO we shouldn't need to actually pass these
internal.ref, // since the mode flag should bypass key/ref handling
0
);
commitRoot(commitQueue, vnode);
if (vnode._dom != oldDom) {
updateParentDomPointers(vnode);
}
const commitQueue = [];
patch(parentDom, vnode, internal, commitQueue);
commitRoot(commitQueue, internal);
}

@@ -155,36 +113,7 @@ }

/**
* @param {import('./internal').VNode} vnode
*/
function updateParentDomPointers(vnode) {
if ((vnode = vnode._parent) != null && vnode._component != null) {
vnode._dom = vnode._component.base = null;
for (let i = 0; i < vnode._children.length; i++) {
let child = vnode._children[i];
if (child != null && child._dom != null) {
vnode._dom = vnode._component.base = child._dom;
break;
}
}
return updateParentDomPointers(vnode);
}
}
/**
* The render queue
* @type {Array<import('./internal').Component>}
* @type {Array<import('./internal').Internal>}
*/
let rerenderQueue = [];
/**
* Asynchronously schedule a callback
* @type {(cb: () => void) => void}
*/
/* istanbul ignore next */
// Note the following line isn't tree-shaken by rollup cuz of rollup/rollup#2566
const defer =
typeof Promise == 'function'
? Promise.prototype.then.bind(Promise.resolve())
: setTimeout;
/*

@@ -201,11 +130,13 @@ * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is

const defer = Promise.prototype.then.bind(Promise.resolve());
/**
* Enqueue a rerender of a component
* @param {import('./internal').Component} c The component to rerender
* Enqueue a rerender of an internal
* @param {import('./internal').Internal} internal The internal to rerender
*/
export function enqueueRender(c) {
export function enqueueRender(internal) {
if (
(!c._dirty &&
(c._dirty = true) &&
rerenderQueue.push(c) &&
(!(internal.flags & DIRTY_BIT) &&
(internal.flags |= DIRTY_BIT) &&
rerenderQueue.push(internal) &&
!process._rerenderCount++) ||

@@ -221,13 +152,9 @@ prevDebounce !== options.debounceRendering

function process() {
let queue;
while ((process._rerenderCount = rerenderQueue.length)) {
queue = rerenderQueue.sort((a, b) => a._vnode._depth - b._vnode._depth);
rerenderQueue = [];
// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary
// process() calls from getting scheduled while `queue` is still being consumed.
queue.some(c => {
if (c._dirty) renderComponent(c);
});
while ((len = process._rerenderCount = rerenderQueue.length)) {
rerenderQueue.sort((a, b) => a._depth - b._depth);
while (len--) {
rerender(rerenderQueue.shift());
}
}
}
process._rerenderCount = 0;
let len = (process._rerenderCount = 0);

@@ -1,3 +0,66 @@

export const EMPTY_OBJ = {};
// Internal.flags bitfield constants
export const TYPE_TEXT = 1 << 0;
export const TYPE_ELEMENT = 1 << 1;
export const TYPE_CLASS = 1 << 2;
export const TYPE_FUNCTION = 1 << 3;
/** Signals this internal has a _parentDom prop that should change the parent
* DOM node of it's children */
export const TYPE_ROOT = 1 << 4;
/** Any type of internal representing DOM */
export const TYPE_DOM = TYPE_TEXT | TYPE_ELEMENT;
/** Any type of component */
export const TYPE_COMPONENT = TYPE_CLASS | TYPE_FUNCTION | TYPE_ROOT;
// Modes of rendering
/** Normal hydration that attaches to a DOM tree but does not diff it. */
export const MODE_HYDRATE = 1 << 5;
/** Top level render unspecified behaviour (old replaceNode parameter to render) */
export const MODE_MUTATIVE_HYDRATE = 1 << 6;
/** Signifies this VNode suspended on the previous render */
export const MODE_SUSPENDED = 1 << 7;
/** Signifies this VNode errored on the previous render */
export const MODE_ERRORED = 1 << 8;
/** Signifies an error has been thrown and this component will be attempting to
* handle & rerender the error on next render. In other words, on the next
* render of this component, unset this mode and set the MODE_RERENDERING_ERROR.
* This flag is distinct from MODE_RERENDERING_ERROR so that a component can
* catch multiple errors thrown by its children in one render pass (see test
* "should handle double child throws").
*/
export const MODE_PENDING_ERROR = 1 << 9;
/** Signifies this Internal is attempting to "handle" an error and is
* rerendering. This mode tracks that a component's last rerender was trying to
* handle an error. As such, if another error is thrown while a component has
* this flag set, it should not handle the newly thrown error since it failed to
* successfully rerender the original error. This prevents error handling
* infinite render loops */
export const MODE_RERENDERING_ERROR = 1 << 10;
/** Signals this internal has been unmounted */
export const MODE_UNMOUNTING = 1 << 11;
/** This Internal is rendered in an SVG tree */
export const MODE_SVG = 1 << 12;
/** Signifies that bailout checks will be bypassed */
export const FORCE_UPDATE = 1 << 13;
/** Signifies that a node needs to be updated */
export const DIRTY_BIT = 1 << 14;
/** Signals the component can skip children due to a non-update */
export const SKIP_CHILDREN = 1 << 15;
/** Reset all mode flags */
export const RESET_MODE = ~(
MODE_HYDRATE |
MODE_MUTATIVE_HYDRATE |
MODE_SUSPENDED |
MODE_ERRORED |
MODE_RERENDERING_ERROR |
FORCE_UPDATE |
SKIP_CHILDREN
);
/** Modes a child internal inherits from their parent */
export const INHERITED_MODES = MODE_HYDRATE | MODE_MUTATIVE_HYDRATE | MODE_SVG;
export const EMPTY_ARR = [];
export const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
export const UNDEFINED = undefined;
import { enqueueRender } from './component';
export let i = 0;
let nextContextId = 0;
export function createContext(defaultValue, contextId) {
contextId = '__cC' + i++;
const providers = new Set();
export const unsubscribeFromContext = internal => {
// if this was a context provider, delete() returns true and we exit:
if (providers.delete(internal)) return;
// ... otherwise, unsubscribe from any contexts:
providers.forEach(p => {
p._component._subs.delete(internal);
});
};
export const createContext = (defaultValue, contextId) => {
contextId = '__cC' + nextContextId++;
const context = {

@@ -19,39 +30,16 @@ _id: contextId,

/** @type {import('./internal').FunctionComponent} */
Provider(props) {
if (!this.getChildContext) {
let subs = [];
let ctx = {};
Provider(props, ctx) {
// initial setup:
if (!this._subs) {
this._subs = new Set();
ctx = {};
ctx[contextId] = this;
this.getChildContext = () => ctx;
this.shouldComponentUpdate = function(_props) {
if (this.props.value !== _props.value) {
// I think the forced value propagation here was only needed when `options.debounceRendering` was being bypassed:
// https://github.com/preactjs/preact/commit/4d339fb803bea09e9f198abf38ca1bf8ea4b7771#diff-54682ce380935a717e41b8bfc54737f6R358
// In those cases though, even with the value corrected, we're double-rendering all nodes.
// It might be better to just tell folks not to use force-sync mode.
// Currently, using `useContext()` in a class component will overwrite its `this.context` value.
// subs.some(c => {
// c.context = _props.value;
// enqueueRender(c);
// });
// subs.some(c => {
// c.context[contextId] = _props.value;
// enqueueRender(c);
// });
subs.some(enqueueRender);
}
};
this.sub = c => {
subs.push(c);
let old = c.componentWillUnmount;
c.componentWillUnmount = () => {
subs.splice(subs.indexOf(c), 1);
if (old) old.call(c);
};
};
providers.add(this._internal);
}
// re-render subscribers in response to value change
else if (props.value !== this._prev) {
this._subs.forEach(enqueueRender);
}
this._prev = props.value;

@@ -69,2 +57,2 @@ return props.children;

return (context.Provider._contextRef = context.Consumer.contextType = context);
}
};

@@ -1,2 +0,2 @@

import { slice } from './util';
import { UNDEFINED } from './constants';
import options from './options';

@@ -25,18 +25,15 @@

if (arguments.length > 2) {
normalizedProps.children =
arguments.length > 3 ? slice.call(arguments, 2) : children;
if (arguments.length > 3) {
children = [children];
// https://github.com/preactjs/preact/issues/1916
for (i = 3; i < arguments.length; i++) {
children.push(arguments[i]);
}
}
// If a Component VNode, check for and apply defaultProps
// Note: type may be undefined in development, must never error here.
if (typeof type == 'function' && type.defaultProps != null) {
for (i in type.defaultProps) {
if (normalizedProps[i] === undefined) {
normalizedProps[i] = type.defaultProps[i];
}
}
if (arguments.length > 2) {
normalizedProps.children = children;
}
return createVNode(type, normalizedProps, key, ref, null);
return createVNode(type, normalizedProps, key, ref, 0);
}

@@ -64,19 +61,7 @@

ref,
_children: null,
_parent: null,
_depth: 0,
_dom: null,
// _nextDom must be initialized to undefined b/c it will eventually
// be set to dom.nextSibling which can return `null` and it is important
// to be able to distinguish between an uninitialized _nextDom and
// a _nextDom that has been set to `null`
_nextDom: undefined,
_component: null,
_hydrating: null,
constructor: undefined,
_original: original == null ? ++vnodeId : original
_vnodeId: original || ++vnodeId
};
// Only invoke the vnode hook if this was *not* a direct copy:
if (original == null && options.vnode != null) options.vnode(vnode);
if (options.vnode != null) options.vnode(vnode);

@@ -86,2 +71,23 @@ return vnode;

/**
* @param {import('./internal').ComponentChildren} childVNode
* @returns {import('./internal').VNode | string | null}
*/
export function normalizeToVNode(childVNode) {
if (childVNode == null || typeof childVNode == 'boolean') {
return null;
}
if (typeof childVNode === 'object') {
return Array.isArray(childVNode)
? createVNode(Fragment, { children: childVNode }, null, null, 0)
: childVNode;
}
// If this newVNode is being reused (e.g. <div>{reuse}{reuse}</div>) in the same diff,
// or we are rendering a component (e.g. setState) copy the oldVNodes so it can have
// it's own DOM & etc. pointers
return typeof childVNode === 'function' ? childVNode : childVNode + '';
}
export function createRef() {

@@ -101,2 +107,2 @@ return { current: null };

export const isValidElement = vnode =>
vnode != null && vnode.constructor === undefined;
vnode != null && vnode.constructor === UNDEFINED;

@@ -0,30 +1,38 @@

import {
DIRTY_BIT,
MODE_RERENDERING_ERROR,
MODE_PENDING_ERROR,
TYPE_COMPONENT
} from '../constants';
/**
* Find the closest error boundary to a thrown error and call it
* @param {object} error The thrown value
* @param {import('../internal').VNode} vnode The vnode that threw
* @param {import('../internal').Internal} internal The Internal node that threw
* the error that was caught (except for unmounting when this parameter
* is the highest parent that was being unmounted)
*/
export function _catchError(error, vnode) {
/** @type {import('../internal').Component} */
let component, ctor, handled;
for (; (vnode = vnode._parent); ) {
if ((component = vnode._component) && !component._processingException) {
export function _catchError(error, internal) {
while ((internal = internal._parent)) {
if (
internal.flags & TYPE_COMPONENT &&
~internal.flags & MODE_RERENDERING_ERROR
) {
try {
ctor = component.constructor;
if (ctor && ctor.getDerivedStateFromError != null) {
component.setState(ctor.getDerivedStateFromError(error));
handled = component._dirty;
if (internal.type.getDerivedStateFromError) {
internal._component.setState(
internal.type.getDerivedStateFromError(error)
);
}
if (component.componentDidCatch != null) {
component.componentDidCatch(error);
handled = component._dirty;
if (internal._component.componentDidCatch) {
internal._component.componentDidCatch(error);
}
// This is an error boundary. Mark it as having bailed out, and whether it was mid-hydration.
if (handled) {
return (component._pendingError = component);
// NOTE: We're checking that any component in the stack got marked as dirty, even if it did so prior to this loop,
// which is technically incorrect. However, there is no way for a component to mark itself as dirty during rendering.
// The only way for a component to falsely intercept error bubbling would be to manually sets its internal dirty flag.
if (internal.flags & DIRTY_BIT) {
internal.flags |= MODE_PENDING_ERROR;
return;
}

@@ -31,0 +39,0 @@ } catch (e) {

@@ -1,5 +0,15 @@

import { diff, unmount, applyRef } from './index';
import { createVNode, Fragment } from '../create-element';
import { EMPTY_OBJ, EMPTY_ARR } from '../constants';
import { getDomSibling } from '../component';
import { applyRef } from './refs';
import { normalizeToVNode } from '../create-element';
import {
TYPE_COMPONENT,
MODE_HYDRATE,
MODE_SUSPENDED,
EMPTY_ARR,
TYPE_DOM,
UNDEFINED
} from '../constants';
import { mount } from './mount';
import { patch } from './patch';
import { unmount } from './unmount';
import { createInternal, getDomSibling } from '../tree';

@@ -11,16 +21,6 @@ /**

* @param {import('../internal').ComponentChildren[]} renderResult
* @param {import('../internal').VNode} newParentVNode The new virtual
* node whose children should be diff'ed against oldParentVNode
* @param {import('../internal').VNode} oldParentVNode The old virtual
* node whose children should be diff'ed against newParentVNode
* @param {object} globalContext The current context object - modified by getChildContext
* @param {boolean} isSvg Whether or not this DOM node is an SVG node
* @param {Array<import('../internal').PreactElement>} excessDomChildren
* @param {Array<import('../internal').Component>} commitQueue List of components
* which have callbacks to invoke in commitRoot
* @param {import('../internal').PreactElement} oldDom The current attached DOM
* element any new dom elements should be placed around. Likely `null` on first
* render (except when hydrating). Can be a sibling DOM element when diffing
* Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.
* @param {boolean} isHydrating Whether or not we are in hydration
* @param {import('../internal').Internal} parentInternal The Internal node
* whose children should be diff'ed against newParentVNode
* @param {import('../internal').CommitQueue} commitQueue List of
* components which have callbacks to invoke in commitRoot
*/

@@ -30,193 +30,159 @@ export function diffChildren(

renderResult,
newParentVNode,
oldParentVNode,
globalContext,
isSvg,
excessDomChildren,
commitQueue,
oldDom,
isHydrating
parentInternal,
commitQueue
) {
let i, j, oldVNode, childVNode, newDom, firstChildDom, refs;
let oldChildren =
(parentInternal._children && parentInternal._children.slice()) || EMPTY_ARR;
// This is a compression of oldParentVNode!=null && oldParentVNode != EMPTY_OBJ && oldParentVNode._children || EMPTY_ARR
// as EMPTY_OBJ._children should be `undefined`.
let oldChildren = (oldParentVNode && oldParentVNode._children) || EMPTY_ARR;
let oldChildrenLength = oldChildren.length;
let remainingOldChildren = oldChildrenLength;
newParentVNode._children = [];
let skew = 0;
let i, newDom, refs;
/** @type {import('../internal').Internal} */
let childInternal;
/** @type {import('../internal').VNode | string} */
let childVNode;
const newChildren = [];
for (i = 0; i < renderResult.length; i++) {
childVNode = renderResult[i];
childVNode = normalizeToVNode(renderResult[i]);
if (childVNode == null || typeof childVNode == 'boolean') {
childVNode = newParentVNode._children[i] = null;
}
// If this newVNode is being reused (e.g. <div>{reuse}{reuse}</div>) in the same diff,
// or we are rendering a component (e.g. setState) copy the oldVNodes so it can have
// it's own DOM & etc. pointers
else if (
typeof childVNode == 'string' ||
typeof childVNode == 'number' ||
// eslint-disable-next-line valid-typeof
typeof childVNode == 'bigint'
) {
childVNode = newParentVNode._children[i] = createVNode(
null,
childVNode,
null,
null,
childVNode
);
} else if (Array.isArray(childVNode)) {
childVNode = newParentVNode._children[i] = createVNode(
Fragment,
{ children: childVNode },
null,
null,
null
);
} else if (childVNode._depth > 0) {
// VNode is already in use, clone it. This can happen in the following
// scenario:
// const reuse = <div />
// <div>{reuse}<span />{reuse}</div>
childVNode = newParentVNode._children[i] = createVNode(
childVNode.type,
childVNode.props,
childVNode.key,
null,
childVNode._original
);
} else {
childVNode = newParentVNode._children[i] = childVNode;
}
// Terser removes the `continue` here and wraps the loop body
// in a `if (childVNode) { ... } condition
if (childVNode == null) {
newChildren[i] = null;
continue;
}
childVNode._parent = newParentVNode;
childVNode._depth = newParentVNode._depth + 1;
let oldVNodeRef;
// Check if we find a corresponding element in oldChildren.
// If found, delete the array item by setting to `undefined`.
// We use `undefined`, as `null` is reserved for empty placeholders
// (holes).
oldVNode = oldChildren[i];
let skewedIndex = i + skew;
if (
oldVNode === null ||
(oldVNode &&
childVNode.key == oldVNode.key &&
childVNode.type === oldVNode.type)
) {
oldChildren[i] = undefined;
/// TODO: Reconsider if we should bring back the "not moving text nodes" logic?
let matchingIndex = findMatchingIndex(
childVNode,
oldChildren,
skewedIndex,
remainingOldChildren
);
if (matchingIndex === -1) {
childInternal = UNDEFINED;
} else {
// Either oldVNode === undefined or oldChildrenLength > 0,
// so after this loop oldVNode == null or oldVNode is a valid value.
for (j = 0; j < oldChildrenLength; j++) {
oldVNode = oldChildren[j];
// If childVNode is unkeyed, we only match similarly unkeyed nodes, otherwise we match by key.
// We always match by type (in either case).
if (
oldVNode &&
childVNode.key == oldVNode.key &&
childVNode.type === oldVNode.type
) {
oldChildren[j] = undefined;
break;
}
oldVNode = null;
}
childInternal = oldChildren[matchingIndex];
oldChildren[matchingIndex] = UNDEFINED;
remainingOldChildren--;
}
oldVNode = oldVNode || EMPTY_OBJ;
let mountingChild = childInternal == null;
// Morph the old element into the new one, but don't append it to the dom yet
diff(
parentDom,
childVNode,
oldVNode,
globalContext,
isSvg,
excessDomChildren,
commitQueue,
oldDom,
isHydrating
);
if (mountingChild) {
childInternal = createInternal(childVNode, parentInternal);
newDom = childVNode._dom;
// We are mounting a new VNode
mount(
parentDom,
childVNode,
childInternal,
commitQueue,
getDomSibling(parentInternal, skewedIndex)
);
}
// If this node suspended during hydration, and no other flags are set:
// @TODO: might be better to explicitly check for MODE_ERRORED here.
else if (
(childInternal.flags & (MODE_HYDRATE | MODE_SUSPENDED)) ===
(MODE_HYDRATE | MODE_SUSPENDED)
) {
// We are resuming the hydration of a VNode
oldVNodeRef = childInternal.ref;
if ((j = childVNode.ref) && oldVNode.ref != j) {
mount(
parentDom,
childVNode,
childInternal,
commitQueue,
childInternal._dom
);
} else {
oldVNodeRef = childInternal.ref;
// Morph the old element into the new one, but don't append it to the dom yet
patch(parentDom, childVNode, childInternal, commitQueue);
}
newDom = childInternal._dom;
if (childVNode.ref || oldVNodeRef) {
if (!refs) refs = [];
if (oldVNode.ref) refs.push(oldVNode.ref, null, childVNode);
refs.push(j, childVNode._component || newDom, childVNode);
childInternal.ref = childVNode.ref;
refs.push(
oldVNodeRef,
childVNode.ref,
childInternal.flags & TYPE_COMPONENT
? childInternal._component || newDom
: newDom,
childInternal
);
}
if (newDom != null) {
if (firstChildDom == null) {
firstChildDom = newDom;
go: if (mountingChild) {
if (matchingIndex == -1) {
skew--;
}
if (
typeof childVNode.type == 'function' &&
childVNode._children === oldVNode._children
) {
childVNode._nextDom = oldDom = reorderChildren(
childVNode,
oldDom,
parentDom
);
// Perform insert of new dom
if (childInternal.flags & TYPE_DOM) {
let nextSibling = getDomSibling(parentInternal, skewedIndex);
parentDom.insertBefore(childInternal._dom, nextSibling);
}
} else if (matchingIndex !== skewedIndex) {
// Move this DOM into its correct place
if (matchingIndex === skewedIndex + 1) {
skew++;
break go;
} else if (matchingIndex > skewedIndex) {
if (remainingOldChildren > renderResult.length - skewedIndex) {
skew += matchingIndex - skewedIndex;
break go;
} else {
// ### Change from keyed: I think this was missing from the algo...
skew--;
}
} else if (matchingIndex < skewedIndex) {
if (matchingIndex == skewedIndex - 1) {
skew = matchingIndex - skewedIndex;
} else {
skew = 0;
}
} else {
oldDom = placeChild(
parentDom,
childVNode,
oldVNode,
oldChildren,
newDom,
oldDom
);
skew = 0;
}
if (typeof newParentVNode.type == 'function') {
// Because the newParentVNode is Fragment-like, we need to set it's
// _nextDom property to the nextSibling of its last child DOM node.
//
// `oldDom` contains the correct value here because if the last child
// is a Fragment-like, then oldDom has already been set to that child's _nextDom.
// If the last child is a DOM VNode, then oldDom will be set to that DOM
// node's nextSibling.
newParentVNode._nextDom = oldDom;
skewedIndex = i + skew;
if (matchingIndex == i) break go;
let nextSibling = getDomSibling(parentInternal, skewedIndex + 1);
if (childInternal.flags & TYPE_DOM) {
parentDom.insertBefore(childInternal._dom, nextSibling);
} else {
insertComponentDom(childInternal, nextSibling, parentDom);
}
} else if (
oldDom &&
oldVNode._dom == oldDom &&
oldDom.parentNode != parentDom
) {
// The above condition is to handle null placeholders. See test in placeholder.test.js:
// `efficiently replace null placeholders in parent rerenders`
oldDom = getDomSibling(oldVNode);
}
newChildren[i] = childInternal;
}
newParentVNode._dom = firstChildDom;
parentInternal._children = newChildren;
// Remove remaining oldChildren if there are any.
for (i = oldChildrenLength; i--; ) {
if (oldChildren[i] != null) {
if (
typeof newParentVNode.type == 'function' &&
oldChildren[i]._dom != null &&
oldChildren[i]._dom == newParentVNode._nextDom
) {
// If the newParentVNode.__nextDom points to a dom node that is about to
// be unmounted, then get the next sibling of that vnode and set
// _nextDom to it
newParentVNode._nextDom = getDomSibling(oldParentVNode, i + 1);
if (remainingOldChildren > 0) {
for (i = oldChildrenLength; i--; ) {
if (oldChildren[i] != null) {
unmount(oldChildren[i], oldChildren[i]);
}
unmount(oldChildren[i], oldChildren[i]);
}

@@ -228,3 +194,3 @@ }

for (i = 0; i < refs.length; i++) {
applyRef(refs[i], refs[++i], refs[++i]);
applyRef(refs[i], refs[++i], refs[++i], refs[++i]);
}

@@ -234,34 +200,82 @@ }

function reorderChildren(childVNode, oldDom, parentDom) {
// Note: VNodes in nested suspended trees may be missing _children.
let c = childVNode._children;
let tmp = 0;
for (; c && tmp < c.length; tmp++) {
let vnode = c[tmp];
if (vnode) {
// We typically enter this code path on sCU bailout, where we copy
// oldVNode._children to newVNode._children. If that is the case, we need
// to update the old children's _parent pointer to point to the newVNode
// (childVNode here).
vnode._parent = childVNode;
/**
* @param {import('../internal').VNode | string} childVNode
* @param {import('../internal').Internal[]} oldChildren
* @param {number} skewedIndex
* @param {number} remainingOldChildren
* @returns {number}
*/
function findMatchingIndex(
childVNode,
oldChildren,
skewedIndex,
remainingOldChildren
) {
const type = typeof childVNode === 'string' ? null : childVNode.type;
const key = type !== null ? childVNode.key : UNDEFINED;
let match = -1;
let x = skewedIndex - 1; // i - 1;
let y = skewedIndex + 1; // i + 1;
let oldChild = oldChildren[skewedIndex]; // i
if (typeof vnode.type == 'function') {
oldDom = reorderChildren(vnode, oldDom, parentDom);
} else {
oldDom = placeChild(
parentDom,
vnode,
vnode,
c,
vnode._dom,
oldDom
);
if (
// ### Change from keyed: support for matching null placeholders
oldChild === null ||
(oldChild != null && oldChild.type === type && oldChild.key == key)
) {
match = skewedIndex; // i
}
// If there are any unused children left (ignoring an available in-place child which we just checked)
else if (remainingOldChildren > (oldChild != null ? 1 : 0)) {
// eslint-disable-next-line no-constant-condition
while (true) {
if (x >= 0) {
oldChild = oldChildren[x];
if (oldChild != null && oldChild.type === type && oldChild.key == key) {
match = x;
break;
}
x--;
}
if (y < oldChildren.length) {
oldChild = oldChildren[y];
if (oldChild != null && oldChild.type === type && oldChild.key == key) {
match = y;
break;
}
y++;
} else if (x < 0) {
break;
}
}
}
return oldDom;
return match;
}
/**
* @param {import('../internal').Internal} internal
* @param {import('../internal').PreactNode} nextSibling
* @param {import('../internal').PreactNode} parentDom
*/
export function insertComponentDom(internal, nextSibling, parentDom) {
if (internal._children == null) {
return;
}
for (let i = 0; i < internal._children.length; i++) {
let childInternal = internal._children[i];
if (childInternal) {
childInternal._parent = internal;
if (childInternal.flags & TYPE_COMPONENT) {
insertComponentDom(childInternal, nextSibling, parentDom);
} else if (childInternal._dom != nextSibling) {
parentDom.insertBefore(childInternal._dom, nextSibling);
}
}
}
}
/**
* Flatten and loop through the children of a virtual node

@@ -276,5 +290,5 @@ * @param {import('../index').ComponentChildren} children The unflattened

} else if (Array.isArray(children)) {
children.some(child => {
toChildArray(child, out);
});
for (children of children) {
toChildArray(children, out);
}
} else {

@@ -285,57 +299,1 @@ out.push(children);

}
function placeChild(
parentDom,
childVNode,
oldVNode,
oldChildren,
newDom,
oldDom
) {
let nextDom;
if (childVNode._nextDom !== undefined) {
// Only Fragments or components that return Fragment like VNodes will
// have a non-undefined _nextDom. Continue the diff from the sibling
// of last DOM child of this child VNode
nextDom = childVNode._nextDom;
// Eagerly cleanup _nextDom. We don't need to persist the value because
// it is only used by `diffChildren` to determine where to resume the diff after
// diffing Components and Fragments. Once we store it the nextDOM local var, we
// can clean up the property
childVNode._nextDom = undefined;
} else if (
oldVNode == null ||
newDom != oldDom ||
newDom.parentNode == null
) {
outer: if (oldDom == null || oldDom.parentNode !== parentDom) {
parentDom.appendChild(newDom);
nextDom = null;
} else {
// `j<oldChildrenLength; j+=2` is an alternative to `j++<oldChildrenLength/2`
for (
let sibDom = oldDom, j = 0;
(sibDom = sibDom.nextSibling) && j < oldChildren.length;
j += 2
) {
if (sibDom == newDom) {
break outer;
}
}
parentDom.insertBefore(newDom, oldDom);
nextDom = oldDom;
}
}
// If we have pre-calculated the nextDOM node, use it. Else calculate it now
// Strictly check for `undefined` here cuz `null` is a valid value of `nextDom`.
// See more detail in create-element.js:createVNode
if (nextDom !== undefined) {
oldDom = nextDom;
} else {
oldDom = newDom.nextSibling;
}
return oldDom;
}

@@ -1,45 +0,8 @@

import { IS_NON_DIMENSIONAL } from '../constants';
import options from '../options';
/**
* Diff the old and new properties of a VNode and apply changes to the DOM node
* @param {import('../internal').PreactElement} dom The DOM node to apply
* changes to
* @param {object} newProps The new props
* @param {object} oldProps The old props
* @param {boolean} isSvg Whether or not this node is an SVG node
* @param {boolean} hydrate Whether or not we are in hydration mode
*/
export function diffProps(dom, newProps, oldProps, isSvg, hydrate) {
let i;
for (i in oldProps) {
if (i !== 'children' && i !== 'key' && !(i in newProps)) {
setProperty(dom, i, null, oldProps[i], isSvg);
}
}
for (i in newProps) {
if (
(!hydrate || typeof newProps[i] == 'function') &&
i !== 'children' &&
i !== 'key' &&
i !== 'value' &&
i !== 'checked' &&
oldProps[i] !== newProps[i]
) {
setProperty(dom, i, newProps[i], oldProps[i], isSvg);
}
}
}
function setStyle(style, key, value) {
function setStyle(dom, key, value) {
if (key[0] === '-') {
style.setProperty(key, value);
} else if (value == null) {
style[key] = '';
} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {
style[key] = value;
dom.style.setProperty(key, value);
} else {
style[key] = value + 'px';
dom.style[key] = value == null ? '' : value;
}

@@ -54,3 +17,3 @@ }

* @param {*} oldValue The old value the property had
* @param {boolean} isSvg Whether or not this DOM node is an SVG node or not
* @param {number} isSvg 0 if not an SVG element, else it is an SVG element
*/

@@ -62,6 +25,6 @@ export function setProperty(dom, name, value, oldValue, isSvg) {

if (typeof value == 'string') {
dom.style.cssText = value;
setStyle(dom, 'cssText', value);
} else {
if (typeof oldValue == 'string') {
dom.style.cssText = oldValue = '';
setStyle(dom, 'cssText', (oldValue = ''));
}

@@ -71,4 +34,4 @@

for (name in oldValue) {
if (!(value && name in value)) {
setStyle(dom.style, name, '');
if (!value || !(name in value)) {
setStyle(dom, name, '');
}

@@ -78,7 +41,5 @@ }

if (value) {
for (name in value) {
if (!oldValue || value[name] !== oldValue[name]) {
setStyle(dom.style, name, value[name]);
}
for (name in value) {
if (!oldValue || value[name] !== oldValue[name]) {
setStyle(dom, name, value[name]);
}

@@ -158,2 +119,10 @@ }

this._listeners[e.type + false](options.event ? options.event(e) : e);
if (this._isControlled) {
if (this.value != null && (e.type === 'input' || e.type === 'change')) {
this.value = this._prevValue;
}
if (this.checked != null && e.type === 'change') {
this.checked = this._prevValue;
}
}
}

@@ -160,0 +129,0 @@

@@ -88,3 +88,2 @@ export as namespace preact;

displayName?: string;
defaultProps?: Partial<P>;
}

@@ -96,3 +95,2 @@ export interface FunctionalComponent<P = {}> extends FunctionComponent<P> {}

displayName?: string;
defaultProps?: Partial<P>;
contextType?: Context<any>;

@@ -108,2 +106,7 @@ getDerivedStateFromProps?(

export function createPortal(
vnode: VNode,
container: Element
): VNode<any>;
// Type alias for a component instance considered generally, whether stateless or stateful.

@@ -143,3 +146,2 @@ export type AnyComponent<P = {}, S = {}> =

static displayName?: string;
static defaultProps?: any;
static contextType?: Context<any>;

@@ -254,3 +256,2 @@

// TODO: Revisit what the public type of this is...
export const Fragment: FunctionComponent<{}>;

@@ -257,0 +258,0 @@

@@ -9,2 +9,3 @@ export { render, hydrate } from './render';

} from './create-element';
export { createRoot } from './create-root';
export { Component } from './component';

@@ -15,1 +16,2 @@ export { cloneElement } from './clone-element';

export { default as options } from './options';
export { createPortal } from './create-portal';

@@ -24,2 +24,6 @@ import * as preact from './index';

export interface Options extends preact.Options {
/** Attach a hook that is invoked immediately before a vnode is unmounted. */
unmount?(internal: Internal): void;
/** Attach a hook that is invoked after a vnode has rendered. */
diffed?(internal: Internal): void;
/** Attach a hook that is invoked before render, mainly to check the arguments. */

@@ -31,7 +35,7 @@ _root?(

/** Attach a hook that is invoked before a vnode is diffed. */
_diff?(vnode: VNode): void;
_diff?(internal: Internal, vnode?: VNode): void;
/** Attach a hook that is invoked after a tree was mounted or was updated. */
_commit?(vnode: VNode, commitQueue: Component[]): void;
_commit?(internal: Internal, commitQueue: CommitQueue): void;
/** Attach a hook that is invoked before a vnode has rendered. */
_render?(vnode: VNode): void;
_render?(internal: Internal): void;
/** Attach a hook that is invoked before a hook's state is queried. */

@@ -42,5 +46,13 @@ _hook?(component: Component, index: number, type: HookType): void;

/** Attach a hook that is invoked after an error is caught in a component but before calling lifecycle hooks */
_catchError(error: any, vnode: VNode, oldVNode?: VNode | undefined): void;
_catchError?(error: any, internal: Internal): void;
_internal?(internal: Internal, vnode: VNode | string): void;
}
export type CommitQueue = Internal[];
// Redefine ComponentFactory using our new internal FunctionalComponent interface above
export type ComponentFactory<P> =
| preact.ComponentClass<P>
| FunctionalComponent<P>;
export type ComponentChild =

@@ -80,4 +92,10 @@ | VNode<any>

export type Root = {
render: preact.render;
hydrate: preact.hydrate;
};
export interface PreactElement extends HTMLElement {
_children?: VNode<any> | null;
_children?: Internal<any> | null;
_root?: Root | null;
/** Event listeners to support event delegation */

@@ -94,2 +112,4 @@ _listeners?: Record<string, (e: Event) => void>;

export type PreactNode = PreactElement | Text;
// We use the `current` property to differentiate between the two kinds of Refs so

@@ -105,18 +125,47 @@ // internally we'll define `current` on both to make TypeScript happy

props: P & { children: ComponentChildren };
ref?: Ref<any> | null;
_children: Array<VNode<any>> | null;
_parent: VNode | null;
_depth: number | null;
/**
* The [first (for Fragments)] DOM child of a VNode
* Internal GUID for this VNode, used for fast equality checks.
* Note: h() allocates monotonic positive integer IDs, jsx() allocates negative.
* @private
*/
_dom: PreactElement | null;
_vnodeId: number;
}
/**
* An Internal is a persistent backing node within Preact's virtual DOM tree.
* Think of an Internal like a long-lived VNode with stored data and tree linkages.
*/
export interface Internal<P = {}> {
type: string | ComponentType<P>;
/** The props object for Elements/Components, and the string contents for Text */
props: (P & { children: ComponentChildren }) | string | number;
key: any;
ref: Ref<any> | null;
/** Bitfield containing information about the Internal or its component. */
flags: number;
/** Polymorphic property to store extensions like hooks on */
data: object;
/** The function that triggers in-place re-renders for an internal */
rerender: (internal: Internal) => void;
/** children Internal nodes */
_children: Internal[];
/** next sibling Internal node */
_parent: Internal;
/** most recent vnode ID */
_vnodeId: number;
/**
* The last dom child of a Fragment, or components that return a Fragment
* Associated DOM element for the Internal, or its nearest realized descendant.
* For Fragments, this is the first DOM child.
*/
_nextDom: PreactElement | null;
_dom: PreactNode;
/** The component instance for which this is a backing Internal node */
_component: Component | null;
_hydrating: boolean | null;
constructor: undefined;
_original: number;
/** most recent context object passed down to this Internal from its parent */
_context: any;
/** This Internal's distance from the tree root */
_depth: number | null;
/** Callbacks to invoke when this internal commits */
_commitCallbacks: Array<() => void>;
}

@@ -128,21 +177,6 @@

state: S; // Override Component["state"] to not be readonly for internal use, specifically Hooks
base?: PreactElement;
_dirty: boolean;
_force?: boolean;
_renderCallbacks: Array<() => void>; // Only class components
_globalContext?: any;
_vnode?: VNode<P> | null;
_internal?: Internal<P> | null;
_nextState?: S | null; // Only class components
/** Only used in the devtools to later dirty check if state has changed */
_prevState?: S | null;
/**
* Pointer to the parent dom node. This is only needed for top-level Fragment
* components or array returns.
*/
_parentDom?: PreactElement | null;
// Always read, set only when handling error
_processingException?: Component<any, any> | null;
// Always read, set only when handling error. This is used to indicate at diffTime to set _processingException
_pendingError?: Component<any, any> | null;
}

@@ -149,0 +183,0 @@

@@ -736,3 +736,2 @@ // Users who only use Preact for SSR might not specify "dom" in their lib in tsconfig.json

readonly?: boolean;
readOnly?: boolean;
referrerpolicy?:

@@ -749,3 +748,2 @@ | 'no-referrer'

required?: boolean;
reversed?: boolean;
role?: string;

@@ -766,3 +764,2 @@ rows?: number;

spellcheck?: boolean;
spellCheck?: boolean;
src?: string;

@@ -789,16 +786,3 @@ srcset?: string;

// Non-standard Attributes
autocapitalize?:
| 'off'
| 'none'
| 'on'
| 'sentences'
| 'words'
| 'characters';
autoCapitalize?:
| 'off'
| 'none'
| 'on'
| 'sentences'
| 'words'
| 'characters';
autocapitalize?: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';
disablePictureInPicture?: boolean;

@@ -805,0 +789,0 @@ results?: number;

@@ -0,0 +0,0 @@ import { _catchError } from './diff/catch-error';

@@ -1,6 +0,2 @@

import { EMPTY_OBJ } from './constants';
import { commitRoot, diff } from './diff/index';
import { createElement, Fragment } from './create-element';
import options from './options';
import { slice } from './util';
import { createRoot } from './create-root';

@@ -12,55 +8,10 @@ /**

* render into
* @param {import('./internal').PreactElement | object} [replaceNode] Optional: Attempt to re-use an
* existing DOM tree rooted at `replaceNode`
*/
export function render(vnode, parentDom, replaceNode) {
if (options._root) options._root(vnode, parentDom);
// We abuse the `replaceNode` parameter in `hydrate()` to signal if we are in
// hydration mode or not by passing the `hydrate` function instead of a DOM
// element..
let isHydrating = typeof replaceNode === 'function';
// To be able to support calling `render()` multiple times on the same
// DOM node, we need to obtain a reference to the previous tree. We do
// this by assigning a new `_children` property to DOM nodes which points
// to the last rendered tree. By default this property is not present, which
// means that we are mounting a new tree for the first time.
let oldVNode = isHydrating
? null
: (replaceNode && replaceNode._children) || parentDom._children;
vnode = (
(!isHydrating && replaceNode) ||
parentDom
)._children = createElement(Fragment, null, [vnode]);
// List of effects that need to be called after diffing.
let commitQueue = [];
diff(
parentDom,
// Determine the new vnode tree and store it on the DOM element on
// our custom `_children` property.
vnode,
oldVNode || EMPTY_OBJ,
EMPTY_OBJ,
parentDom.ownerSVGElement !== undefined,
!isHydrating && replaceNode
? [replaceNode]
: oldVNode
? null
: parentDom.firstChild
? slice.call(parentDom.childNodes)
: null,
commitQueue,
!isHydrating && replaceNode
? replaceNode
: oldVNode
? oldVNode._dom
: parentDom.firstChild,
isHydrating
);
// Flush all queued effects
commitRoot(commitQueue, vnode);
export function render(vnode, parentDom) {
let root = parentDom && parentDom._root;
if (!root) {
root = createRoot(parentDom);
}
root.render(vnode);
parentDom._root = root;
}

@@ -75,3 +26,8 @@

export function hydrate(vnode, parentDom) {
render(vnode, parentDom, hydrate);
let root = parentDom && parentDom._root;
if (!root) {
root = createRoot(parentDom);
}
root.hydrate(vnode);
parentDom._root = root;
}

@@ -1,2 +0,2 @@

var r=require("preact");function n(){return r.options.t=r.options.debounceRendering,r.options.debounceRendering=function(n){return r.options.o=n},function(){return r.options.o&&r.options.o()}}var t=function(r){return null!=r&&"function"==typeof r.then},e=0;function o(){r.options.o&&(r.options.o(),delete r.options.o),void 0!==r.options.t?(r.options.debounceRendering=r.options.t,delete r.options.t):r.options.debounceRendering=void 0}exports.setupRerender=n,exports.act=function(u){if(++e>1){var i=u();return t(i)?i.then(function(){--e}):(--e,Promise.resolve())}var c,f,a=r.options.requestAnimationFrame,v=n();r.options.requestAnimationFrame=function(r){return c=r};var l,p,s=function(){try{for(v();c;)f=c,c=null,f(),v();o()}catch(r){l||(l=r)}r.options.requestAnimationFrame=a,--e};try{p=u()}catch(r){l=r}if(t(p))return p.then(s,function(r){throw s(),r});if(s(),l)throw l;return Promise.resolve()},exports.teardown=o;
var r=require("preact");function t(){return r.options.t=r.options.debounceRendering,r.options.debounceRendering=t=>r.options.o=t,()=>r.options.o&&r.options.o()}var e=r=>null!=r&&"function"==typeof r.then,o=0;function n(){r.options.o&&(r.options.o(),delete r.options.o),void 0!==r.options.t?(r.options.debounceRendering=r.options.t,delete r.options.t):r.options.debounceRendering=void 0}exports.act=function(i){if(++o>1){var u=i();return e(u)?u.then(()=>{--o}):(--o,Promise.resolve())}var c,f,a=r.options.requestAnimationFrame,v=t();r.options.requestAnimationFrame=r=>c=r;var l,p,s=()=>{try{for(v();c;)f=c,c=null,f(),v();n()}catch(r){l||(l=r)}r.options.requestAnimationFrame=a,--o};try{p=i()}catch(r){l=r}if(e(p))return p.then(s,r=>{throw s(),r});if(s(),l)throw l;return Promise.resolve()},exports.setupRerender=t,exports.teardown=n;
//# sourceMappingURL=testUtils.js.map

@@ -1,2 +0,2 @@

!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],t):t(n.preactTestUtils={},n.preact)}(this,function(n,t){function e(){return t.options.t=t.options.debounceRendering,t.options.debounceRendering=function(n){return t.options.o=n},function(){return t.options.o&&t.options.o()}}var r=function(n){return null!=n&&"function"==typeof n.then},o=0;function i(){t.options.o&&(t.options.o(),delete t.options.o),void 0!==t.options.t?(t.options.debounceRendering=t.options.t,delete t.options.t):t.options.debounceRendering=void 0}n.setupRerender=e,n.act=function(n){if(++o>1){var u=n();return r(u)?u.then(function(){--o}):(--o,Promise.resolve())}var f,c,d=t.options.requestAnimationFrame,p=e();t.options.requestAnimationFrame=function(n){return f=n};var a,l,s=function(){try{for(p();f;)c=f,f=null,c(),p();i()}catch(n){a||(a=n)}t.options.requestAnimationFrame=d,--o};try{l=n()}catch(n){a=n}if(r(l))return l.then(s,function(n){throw s(),n});if(s(),a)throw a;return Promise.resolve()},n.teardown=i});
!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).preactTestUtils={},e.preact)}(this,function(e,t){function n(){return t.options.t=t.options.debounceRendering,t.options.debounceRendering=e=>t.options.o=e,()=>t.options.o&&t.options.o()}var o=e=>null!=e&&"function"==typeof e.then,r=0;function i(){t.options.o&&(t.options.o(),delete t.options.o),void 0!==t.options.t?(t.options.debounceRendering=t.options.t,delete t.options.t):t.options.debounceRendering=void 0}e.act=function(e){if(++r>1){var f=e();return o(f)?f.then(()=>{--r}):(--r,Promise.resolve())}var u,c,d=t.options.requestAnimationFrame,l=n();t.options.requestAnimationFrame=e=>u=e;var a,p,s=()=>{try{for(l();u;)c=u,u=null,c(),l();i()}catch(e){a||(a=e)}t.options.requestAnimationFrame=d,--r};try{p=e()}catch(e){a=e}if(o(p))return p.then(s,e=>{throw s(),e});if(s(),a)throw a;return Promise.resolve()},e.setupRerender=n,e.teardown=i});
//# sourceMappingURL=testUtils.umd.js.map

@@ -7,4 +7,5 @@ {

"description": "Test-utils for Preact",
"exports": "./dist/testUtils.mjs",
"module": "dist/testUtils.mjs",
"main": "dist/testUtils.js",
"module": "dist/testUtils.module.js",
"umd:main": "dist/testUtils.umd.js",

@@ -11,0 +12,0 @@ "source": "src/index.js",

export function setupRerender(): () => void;
export function act(callback: () => void | Promise<void>): Promise<void>;
export function teardown(): void;

@@ -0,0 +0,0 @@ import { options } from 'preact';

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

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc