UNPKG

@fairfox/standalone-web

Version:

A single, standalone version of Preact, HTM and Preact Signals. No external dependencies, just one single file.

3 lines (2 loc) 24.4 kB
var N0,C,M0,G0,y,p0,v0,d0,s0,L0,K0,Z0,j0,f={},k0=[],F1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,c=Array.isArray;function B(N,I){for(var R in I)N[R]=I[R];return N}function Q0(N){N&&N.parentNode&&N.parentNode.removeChild(N)}function h(N,I,R){var E,W,O,X={};for(O in I)O=="key"?E=I[O]:O=="ref"?W=I[O]:X[O]=I[O];if(arguments.length>2&&(X.children=arguments.length>3?N0.call(arguments,2):R),typeof N=="function"&&N.defaultProps!=null)for(O in N.defaultProps)X[O]===void 0&&(X[O]=N.defaultProps[O]);return n(N,X,E,W,null)}function n(N,I,R,E,W){var O={type:N,props:I,key:R,ref:E,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:W==null?++M0:W,__i:-1,__u:0};return W==null&&C.vnode!=null&&C.vnode(O),O}function G1(){return{current:null}}function T(N){return N.children}function x(N,I){this.props=N,this.context=I}function s(N,I){if(I==null)return N.__?s(N.__,N.__i+1):null;for(var R;I<N.__k.length;I++)if((R=N.__k[I])!=null&&R.__e!=null)return R.__e;return typeof N.type=="function"?s(N):null}function b0(N){var I,R;if((N=N.__)!=null&&N.__c!=null){for(N.__e=N.__c.base=null,I=0;I<N.__k.length;I++)if((R=N.__k[I])!=null&&R.__e!=null){N.__e=N.__c.base=R.__e;break}return b0(N)}}function C0(N){(!N.__d&&(N.__d=!0)&&y.push(N)&&!I0.__r++||p0!=C.debounceRendering)&&((p0=C.debounceRendering)||v0)(I0)}function I0(){for(var N,I,R,E,W,O,X,A=1;y.length;)y.length>A&&y.sort(d0),N=y.shift(),A=y.length,N.__d&&(R=void 0,W=(E=(I=N).__v).__e,O=[],X=[],I.__P&&((R=B({},E)).__v=E.__v+1,C.vnode&&C.vnode(R),m0(I.__P,R,E,I.__n,I.__P.namespaceURI,32&E.__u?[W]:null,O,W==null?s(E):W,!!(32&E.__u),X),R.__v=E.__v,R.__.__k[R.__i]=R,a0(O,R,X),R.__e!=W&&b0(R)));I0.__r=0}function _0(N,I,R,E,W,O,X,A,V,g,J){var Y,Z,K,D,U,S,L=E&&E.__k||k0,Q=I.length;for(V=L1(R,I,L,V,Q),Y=0;Y<Q;Y++)(K=R.__k[Y])!=null&&(Z=K.__i==-1?f:L[K.__i]||f,K.__i=Y,S=m0(N,K,Z,W,O,X,A,V,g,J),D=K.__e,K.ref&&Z.ref!=K.ref&&(Z.ref&&q0(Z.ref,null,K),J.push(K.ref,K.__c||D,K)),U==null&&D!=null&&(U=D),4&K.__u||Z.__k===K.__k?V=e0(K,V,N):typeof K.type=="function"&&S!==void 0?V=S:D&&(V=D.nextSibling),K.__u&=-7);return R.__e=U,V}function L1(N,I,R,E,W){var O,X,A,V,g,J=R.length,Y=J,Z=0;for(N.__k=new Array(W),O=0;O<W;O++)(X=I[O])!=null&&typeof X!="boolean"&&typeof X!="function"?(V=O+Z,(X=N.__k[O]=typeof X=="string"||typeof X=="number"||typeof X=="bigint"||X.constructor==String?n(null,X,null,null,null):c(X)?n(T,{children:X},null,null,null):X.constructor==null&&X.__b>0?n(X.type,X.props,X.key,X.ref?X.ref:null,X.__v):X).__=N,X.__b=N.__b+1,A=null,(g=X.__i=m1(X,R,V,Y))!=-1&&(Y--,(A=R[g])&&(A.__u|=2)),A==null||A.__v==null?(g==-1&&(W>J?Z--:W<J&&Z++),typeof X.type!="function"&&(X.__u|=4)):g!=V&&(g==V-1?Z--:g==V+1?Z++:(g>V?Z--:Z++,X.__u|=4))):N.__k[O]=null;if(Y)for(O=0;O<J;O++)(A=R[O])!=null&&(2&A.__u)==0&&(A.__e==E&&(E=s(A)),c0(A,A));return E}function e0(N,I,R){var E,W;if(typeof N.type=="function"){for(E=N.__k,W=0;E&&W<E.length;W++)E[W]&&(E[W].__=N,I=e0(E[W],I,R));return I}N.__e!=I&&(I&&N.type&&!R.contains(I)&&(I=s(N)),R.insertBefore(N.__e,I||null),I=N.__e);do I=I&&I.nextSibling;while(I!=null&&I.nodeType==8);return I}function Q1(N,I){return I=I||[],N==null||typeof N=="boolean"||(c(N)?N.some(function(R){Q1(R,I)}):I.push(N)),I}function m1(N,I,R,E){var W,O,X,A=N.key,V=N.type,g=I[R],J=g!=null&&(2&g.__u)==0;if(g===null&&N.key==null||J&&A==g.key&&V==g.type)return R;if(E>(J?1:0)){for(W=R-1,O=R+1;W>=0||O<I.length;)if((g=I[X=W>=0?W--:O++])!=null&&(2&g.__u)==0&&A==g.key&&V==g.type)return X}return-1}function y0(N,I,R){I[0]=="-"?N.setProperty(I,R==null?"":R):N[I]=R==null?"":typeof R!="number"||F1.test(I)?R:R+"px"}function t(N,I,R,E,W){var O,X;I:if(I=="style")if(typeof R=="string")N.style.cssText=R;else{if(typeof E=="string"&&(N.style.cssText=E=""),E)for(I in E)R&&I in R||y0(N.style,I,"");if(R)for(I in R)E&&R[I]==E[I]||y0(N.style,I,R[I])}else if(I[0]=="o"&&I[1]=="n")O=I!=(I=I.replace(s0,"$1")),X=I.toLowerCase(),I=X in N||I=="onFocusOut"||I=="onFocusIn"?X.slice(2):I.slice(2),N.l||(N.l={}),N.l[I+O]=R,R?E?R.u=E.u:(R.u=L0,N.addEventListener(I,O?Z0:K0,O)):N.removeEventListener(I,O?Z0:K0,O);else{if(W=="http://www.w3.org/2000/svg")I=I.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(I!="width"&&I!="height"&&I!="href"&&I!="list"&&I!="form"&&I!="tabIndex"&&I!="download"&&I!="rowSpan"&&I!="colSpan"&&I!="role"&&I!="popover"&&I in N)try{N[I]=R==null?"":R;break I}catch(A){}typeof R=="function"||(R==null||R===!1&&I[4]!="-"?N.removeAttribute(I):N.setAttribute(I,I=="popover"&&R==1?"":R))}}function x0(N){return function(I){if(this.l){var R=this.l[I.type+N];if(I.t==null)I.t=L0++;else if(I.t<R.u)return;return R(C.event?C.event(I):I)}}}function m0(N,I,R,E,W,O,X,A,V,g){var J,Y,Z,K,D,U,S,L,Q,_,$,i,e,$0,u,a,J0,w=I.type;if(I.constructor!=null)return null;128&R.__u&&(V=!!(32&R.__u),O=[A=I.__e=R.__e]),(J=C.__b)&&J(I);I:if(typeof w=="function")try{if(L=I.props,Q="prototype"in w&&w.prototype.render,_=(J=w.contextType)&&E[J.__c],$=J?_?_.props.value:J.__:E,R.__c?S=(Y=I.__c=R.__c).__=Y.__E:(Q?I.__c=Y=new w(L,$):(I.__c=Y=new x(L,$),Y.constructor=w,Y.render=D1),_&&_.sub(Y),Y.props=L,Y.state||(Y.state={}),Y.context=$,Y.__n=E,Z=Y.__d=!0,Y.__h=[],Y._sb=[]),Q&&Y.__s==null&&(Y.__s=Y.state),Q&&w.getDerivedStateFromProps!=null&&(Y.__s==Y.state&&(Y.__s=B({},Y.__s)),B(Y.__s,w.getDerivedStateFromProps(L,Y.__s))),K=Y.props,D=Y.state,Y.__v=I,Z)Q&&w.getDerivedStateFromProps==null&&Y.componentWillMount!=null&&Y.componentWillMount(),Q&&Y.componentDidMount!=null&&Y.__h.push(Y.componentDidMount);else{if(Q&&w.getDerivedStateFromProps==null&&L!==K&&Y.componentWillReceiveProps!=null&&Y.componentWillReceiveProps(L,$),!Y.__e&&Y.shouldComponentUpdate!=null&&Y.shouldComponentUpdate(L,Y.__s,$)===!1||I.__v==R.__v){for(I.__v!=R.__v&&(Y.props=L,Y.state=Y.__s,Y.__d=!1),I.__e=R.__e,I.__k=R.__k,I.__k.some(function(d){d&&(d.__=I)}),i=0;i<Y._sb.length;i++)Y.__h.push(Y._sb[i]);Y._sb=[],Y.__h.length&&X.push(Y);break I}Y.componentWillUpdate!=null&&Y.componentWillUpdate(L,Y.__s,$),Q&&Y.componentDidUpdate!=null&&Y.__h.push(function(){Y.componentDidUpdate(K,D,U)})}if(Y.context=$,Y.props=L,Y.__P=N,Y.__e=!1,e=C.__r,$0=0,Q){for(Y.state=Y.__s,Y.__d=!1,e&&e(I),J=Y.render(Y.props,Y.state,Y.context),u=0;u<Y._sb.length;u++)Y.__h.push(Y._sb[u]);Y._sb=[]}else do Y.__d=!1,e&&e(I),J=Y.render(Y.props,Y.state,Y.context),Y.state=Y.__s;while(Y.__d&&++$0<25);Y.state=Y.__s,Y.getChildContext!=null&&(E=B(B({},E),Y.getChildContext())),Q&&!Z&&Y.getSnapshotBeforeUpdate!=null&&(U=Y.getSnapshotBeforeUpdate(K,D)),a=J,J!=null&&J.type===T&&J.key==null&&(a=f0(J.props.children)),A=_0(N,c(a)?a:[a],I,R,E,W,O,X,A,V,g),Y.base=I.__e,I.__u&=-161,Y.__h.length&&X.push(Y),S&&(Y.__E=Y.__=null)}catch(d){if(I.__v=null,V||O!=null)if(d.then){for(I.__u|=V?160:128;A&&A.nodeType==8&&A.nextSibling;)A=A.nextSibling;O[O.indexOf(A)]=null,I.__e=A}else{for(J0=O.length;J0--;)Q0(O[J0]);F0(I)}else I.__e=R.__e,I.__k=R.__k,d.then||F0(I);C.__e(d,I,R)}else O==null&&I.__v==R.__v?(I.__k=R.__k,I.__e=R.__e):A=I.__e=q1(R.__e,I,R,E,W,O,X,V,g);return(J=C.diffed)&&J(I),128&I.__u?void 0:A}function F0(N){N&&N.__c&&(N.__c.__e=!0),N&&N.__k&&N.__k.forEach(F0)}function a0(N,I,R){for(var E=0;E<R.length;E++)q0(R[E],R[++E],R[++E]);C.__c&&C.__c(I,N),N.some(function(W){try{N=W.__h,W.__h=[],N.some(function(O){O.call(W)})}catch(O){C.__e(O,W.__v)}})}function f0(N){return typeof N!="object"||N==null||N.__b&&N.__b>0?N:c(N)?N.map(f0):B({},N)}function q1(N,I,R,E,W,O,X,A,V){var g,J,Y,Z,K,D,U,S=R.props,L=I.props,Q=I.type;if(Q=="svg"?W="http://www.w3.org/2000/svg":Q=="math"?W="http://www.w3.org/1998/Math/MathML":W||(W="http://www.w3.org/1999/xhtml"),O!=null){for(g=0;g<O.length;g++)if((K=O[g])&&"setAttribute"in K==!!Q&&(Q?K.localName==Q:K.nodeType==3)){N=K,O[g]=null;break}}if(N==null){if(Q==null)return document.createTextNode(L);N=document.createElementNS(W,Q,L.is&&L),A&&(C.__m&&C.__m(I,O),A=!1),O=null}if(Q==null)S===L||A&&N.data==L||(N.data=L);else{if(O=O&&N0.call(N.childNodes),S=R.props||f,!A&&O!=null)for(S={},g=0;g<N.attributes.length;g++)S[(K=N.attributes[g]).name]=K.value;for(g in S)if(K=S[g],g=="children");else if(g=="dangerouslySetInnerHTML")Y=K;else if(!(g in L)){if(g=="value"&&"defaultValue"in L||g=="checked"&&"defaultChecked"in L)continue;t(N,g,null,K,W)}for(g in L)K=L[g],g=="children"?Z=K:g=="dangerouslySetInnerHTML"?J=K:g=="value"?D=K:g=="checked"?U=K:A&&typeof K!="function"||S[g]===K||t(N,g,K,S[g],W);if(J)A||Y&&(J.__html==Y.__html||J.__html==N.innerHTML)||(N.innerHTML=J.__html),I.__k=[];else if(Y&&(N.innerHTML=""),_0(I.type=="template"?N.content:N,c(Z)?Z:[Z],I,R,E,Q=="foreignObject"?"http://www.w3.org/1999/xhtml":W,O,X,O?O[0]:R.__k&&s(R,0),A,V),O!=null)for(g=O.length;g--;)Q0(O[g]);A||(g="value",Q=="progress"&&D==null?N.removeAttribute("value"):D!=null&&(D!==N[g]||Q=="progress"&&!D||Q=="option"&&D!=S[g])&&t(N,g,D,S[g],W),g="checked",U!=null&&U!=N[g]&&t(N,g,U,S[g],W))}return N}function q0(N,I,R){try{if(typeof N=="function"){var E=typeof N.__u=="function";E&&N.__u(),E&&I==null||(N.__u=N(I))}else N.current=I}catch(W){C.__e(W,R)}}function c0(N,I,R){var E,W;if(C.unmount&&C.unmount(N),(E=N.ref)&&(E.current&&E.current!=N.__e||q0(E,null,I)),(E=N.__c)!=null){if(E.componentWillUnmount)try{E.componentWillUnmount()}catch(O){C.__e(O,I)}E.base=E.__P=null}if(E=N.__k)for(W=0;W<E.length;W++)E[W]&&c0(E[W],I,R||typeof N.type!="function");R||Q0(N.__e),N.__c=N.__=N.__e=void 0}function D1(N,I,R){return this.constructor(N,R)}function h0(N,I,R){var E,W,O,X;I==document&&(I=document.documentElement),C.__&&C.__(N,I),W=(E=typeof R=="function")?null:R&&R.__k||I.__k,O=[],X=[],m0(I,N=(!E&&R||I).__k=h(T,null,[N]),W||f,f,I.namespaceURI,!E&&R?[R]:W?null:I.firstChild?N0.call(I.childNodes):null,O,!E&&R?R:W?W.__e:I.firstChild,E,X),a0(O,N,X)}function o0(N,I){h0(N,I,o0)}function S1(N){function I(R){var E,W;return this.getChildContext||(E=new Set,(W={})[I.__c]=this,this.getChildContext=function(){return W},this.componentWillUnmount=function(){E=null},this.shouldComponentUpdate=function(O){this.props.value!=O.value&&E.forEach(function(X){X.__e=!0,C0(X)})},this.sub=function(O){E.add(O);var X=O.componentWillUnmount;O.componentWillUnmount=function(){E&&E.delete(O),X&&X.call(O)}}),R.children}return I.__c="__cC"+j0++,I.__=N,I.Provider=I.__l=(I.Consumer=function(R,E){return R.children(E)}).contextType=I,I}N0=k0.slice,C={__e:function(N,I,R,E){for(var W,O,X;I=I.__;)if((W=I.__c)&&!W.__)try{if((O=W.constructor)&&O.getDerivedStateFromError!=null&&(W.setState(O.getDerivedStateFromError(N)),X=W.__d),W.componentDidCatch!=null&&(W.componentDidCatch(N,E||{}),X=W.__d),X)return W.__E=W}catch(A){N=A}throw N}},M0=0,G0=function(N){return N!=null&&N.constructor==null},x.prototype.setState=function(N,I){var R;R=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=B({},this.state),typeof N=="function"&&(N=N(B({},R),this.props)),N&&B(R,N),N!=null&&this.__v&&(I&&this._sb.push(I),C0(this))},x.prototype.forceUpdate=function(N){this.__v&&(this.__e=!0,N&&this.__h.push(N),C0(this))},x.prototype.render=T,y=[],v0=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,d0=function(N,I){return N.__v.__b-I.__v.__b},I0.__r=0,s0=/(PointerCapture)$|Capture$/i,L0=0,K0=x0(!1),Z0=x0(!0),j0=0;var H,G,D0,l0,o=0,R1=[],m=C,r0=m.__b,i0=m.__r,u0=m.diffed,t0=m.__c,n0=m.unmount,I1=m.__;function M(N,I){m.__h&&m.__h(G,N,o||I),o=0;var R=G.__H||(G.__H={__:[],__h:[]});return N>=R.__.length&&R.__.push({}),R.__[N]}function U1(N){return o=1,w1(E1,N)}function w1(N,I,R){var E=M(H++,2);if(E.t=N,!E.__c&&(E.__=[R?R(I):E1(void 0,I),function(A){var V=E.__N?E.__N[0]:E.__[0],g=E.t(V,A);V!==g&&(E.__N=[g,E.__[1]],E.__c.setState({}))}],E.__c=G,!G.__f)){var W=function(A,V,g){if(!E.__c.__H)return!0;var J=E.__c.__H.__.filter(function(Z){return!!Z.__c});if(J.every(function(Z){return!Z.__N}))return!O||O.call(this,A,V,g);var Y=E.__c.props!==A;return J.forEach(function(Z){if(Z.__N){var K=Z.__[0];Z.__=Z.__N,Z.__N=void 0,K!==Z.__[0]&&(Y=!0)}}),O&&O.call(this,A,V,g)||Y};G.__f=!0;var{shouldComponentUpdate:O,componentWillUpdate:X}=G;G.componentWillUpdate=function(A,V,g){if(this.__e){var J=O;O=void 0,W(A,V,g),O=J}X&&X.call(this,A,V,g)},G.shouldComponentUpdate=W}return E.__N||E.__}function U0(N,I){var R=M(H++,3);!m.__s&&w0(R.__H,I)&&(R.__=N,R.u=I,G.__H.__h.push(R))}function B1(N,I){var R=M(H++,4);!m.__s&&w0(R.__H,I)&&(R.__=N,R.u=I,G.__h.push(R))}function E0(N){return o=5,z(function(){return{current:N}},[])}function z(N,I){var R=M(H++,7);return w0(R.__H,I)&&(R.__=N(),R.__H=I,R.__h=N),R.__}function T1(N,I){return o=8,z(function(){return N},I)}function H1(N){var I=G.context[N.__c],R=M(H++,9);return R.c=N,I?(R.__==null&&(R.__=!0,I.sub(G)),I.props.value):N.__}function z1(N){var I=M(H++,10),R=U1();return I.__=N,G.componentDidCatch||(G.componentDidCatch=function(E,W){I.__&&I.__(E,W),R[1](E)}),[R[0],function(){R[1](void 0)}]}function o1(){var N=M(H++,11);if(!N.__){for(var I=G.__v;I!==null&&!I.__m&&I.__!==null;)I=I.__;var R=I.__m||(I.__m=[0,0]);N.__="P"+R[0]+"-"+R[1]++}return N.__}function P1(){for(var N;N=R1.shift();)if(N.__P&&N.__H)try{N.__H.__h.forEach(R0),N.__H.__h.forEach(S0),N.__H.__h=[]}catch(I){N.__H.__h=[],m.__e(I,N.__v)}}m.__b=function(N){G=null,r0&&r0(N)},m.__=function(N,I){N&&I.__k&&I.__k.__m&&(N.__m=I.__k.__m),I1&&I1(N,I)},m.__r=function(N){i0&&i0(N),H=0;var I=(G=N.__c).__H;I&&(D0===G?(I.__h=[],G.__h=[],I.__.forEach(function(R){R.__N&&(R.__=R.__N),R.u=R.__N=void 0})):(I.__h.forEach(R0),I.__h.forEach(S0),I.__h=[],H=0)),D0=G},m.diffed=function(N){u0&&u0(N);var I=N.__c;I&&I.__H&&(I.__H.__h.length&&(R1.push(I)!==1&&l0===m.requestAnimationFrame||((l0=m.requestAnimationFrame)||$1)(P1)),I.__H.__.forEach(function(R){R.u&&(R.__H=R.u),R.u=void 0})),D0=G=null},m.__c=function(N,I){I.some(function(R){try{R.__h.forEach(R0),R.__h=R.__h.filter(function(E){return!E.__||S0(E)})}catch(E){I.some(function(W){W.__h&&(W.__h=[])}),I=[],m.__e(E,R.__v)}}),t0&&t0(N,I)},m.unmount=function(N){n0&&n0(N);var I,R=N.__c;R&&R.__H&&(R.__H.__.forEach(function(E){try{R0(E)}catch(W){I=W}}),R.__H=void 0,I&&m.__e(I,R.__v))};var N1=typeof requestAnimationFrame=="function";function $1(N){var I,R=function(){clearTimeout(E),N1&&cancelAnimationFrame(I),setTimeout(N)},E=setTimeout(R,35);N1&&(I=requestAnimationFrame(R))}function R0(N){var I=G,R=N.__c;typeof R=="function"&&(N.__c=void 0,R()),G=I}function S0(N){var I=G;N.__c=N.__(),G=I}function w0(N,I){return!N||N.length!==I.length||I.some(function(R,E){return R!==N[E]})}function E1(N,I){return typeof I=="function"?I(N):I}var p1=Symbol.for("preact-signals");function W0(){if(!(p>1)){var N,I=!1;while(l!==void 0){var R=l;l=void 0,B0++;while(R!==void 0){var E=R.o;if(R.o=void 0,R.f&=-3,!(8&R.f)&&W1(R))try{R.c()}catch(W){if(!I)N=W,I=!0}R=E}}if(B0=0,p--,I)throw N}else p--}function X0(N){if(p>0)return N();p++;try{return N()}finally{W0()}}var F=void 0;function Y0(N){var I=F;F=void 0;try{return N()}finally{F=I}}var l=void 0,p=0,B0=0,O0=0;function O1(N){if(F!==void 0){var I=N.n;if(I===void 0||I.t!==F){if(I={i:0,S:N,p:F.s,n:void 0,t:F,e:void 0,x:void 0,r:I},F.s!==void 0)F.s.n=I;if(F.s=I,N.n=I,32&F.f)N.S(I);return I}else if(I.i===-1){if(I.i=0,I.n!==void 0){if(I.n.p=I.p,I.p!==void 0)I.p.n=I.n;I.p=F.s,I.n=void 0,F.s.n=I,F.s=I}return I}}}function q(N,I){this.v=N,this.i=0,this.n=void 0,this.t=void 0,this.W=I==null?void 0:I.watched,this.Z=I==null?void 0:I.unwatched}q.prototype.brand=p1;q.prototype.h=function(){return!0};q.prototype.S=function(N){var I=this,R=this.t;if(R!==N&&N.e===void 0)if(N.x=R,this.t=N,R!==void 0)R.e=N;else Y0(function(){var E;(E=I.W)==null||E.call(I)})};q.prototype.U=function(N){var I=this;if(this.t!==void 0){var{e:R,x:E}=N;if(R!==void 0)R.x=E,N.e=void 0;if(E!==void 0)E.e=R,N.x=void 0;if(N===this.t){if(this.t=E,E===void 0)Y0(function(){var W;(W=I.Z)==null||W.call(I)})}}};q.prototype.subscribe=function(N){var I=this;return P(function(){var R=I.value,E=F;F=void 0;try{N(R)}finally{F=E}})};q.prototype.valueOf=function(){return this.value};q.prototype.toString=function(){return this.value+""};q.prototype.toJSON=function(){return this.value};q.prototype.peek=function(){var N=F;F=void 0;try{return this.value}finally{F=N}};Object.defineProperty(q.prototype,"value",{get:function(){var N=O1(this);if(N!==void 0)N.i=this.i;return this.v},set:function(N){if(N!==this.v){if(B0>100)throw new Error("Cycle detected");this.v=N,this.i++,O0++,p++;try{for(var I=this.t;I!==void 0;I=I.x)I.t.N()}finally{W0()}}}});function r(N,I){return new q(N,I)}function W1(N){for(var I=N.s;I!==void 0;I=I.n)if(I.S.i!==I.i||!I.S.h()||I.S.i!==I.i)return!0;return!1}function X1(N){for(var I=N.s;I!==void 0;I=I.n){var R=I.S.n;if(R!==void 0)I.r=R;if(I.S.n=I,I.i=-1,I.n===void 0){N.s=I;break}}}function Y1(N){var I=N.s,R=void 0;while(I!==void 0){var E=I.p;if(I.i===-1){if(I.S.U(I),E!==void 0)E.n=I.n;if(I.n!==void 0)I.n.p=E}else R=I;if(I.S.n=I.r,I.r!==void 0)I.r=void 0;I=E}N.s=R}function v(N,I){q.call(this,void 0),this.x=N,this.s=void 0,this.g=O0-1,this.f=4,this.W=I==null?void 0:I.watched,this.Z=I==null?void 0:I.unwatched}v.prototype=new q;v.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32)return!0;if(this.f&=-5,this.g===O0)return!0;if(this.g=O0,this.f|=1,this.i>0&&!W1(this))return this.f&=-2,!0;var N=F;try{X1(this),F=this;var I=this.x();if(16&this.f||this.v!==I||this.i===0)this.v=I,this.f&=-17,this.i++}catch(R){this.v=R,this.f|=16,this.i++}return F=N,Y1(this),this.f&=-2,!0};v.prototype.S=function(N){if(this.t===void 0){this.f|=36;for(var I=this.s;I!==void 0;I=I.n)I.S.S(I)}q.prototype.S.call(this,N)};v.prototype.U=function(N){if(this.t!==void 0){if(q.prototype.U.call(this,N),this.t===void 0){this.f&=-33;for(var I=this.s;I!==void 0;I=I.n)I.S.U(I)}}};v.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var N=this.t;N!==void 0;N=N.x)N.t.N()}};Object.defineProperty(v.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var N=O1(this);if(this.h(),N!==void 0)N.i=this.i;if(16&this.f)throw this.v;return this.v}});function j(N,I){return new v(N,I)}function g1(N){var I=N.u;if(N.u=void 0,typeof I=="function"){p++;var R=F;F=void 0;try{I()}catch(E){throw N.f&=-2,N.f|=8,T0(N),E}finally{F=R,W0()}}}function T0(N){for(var I=N.s;I!==void 0;I=I.n)I.S.U(I);N.x=void 0,N.s=void 0,g1(N)}function y1(N){if(F!==this)throw new Error("Out-of-order effect");if(Y1(this),F=N,this.f&=-2,8&this.f)T0(this);W0()}function k(N){this.x=N,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}k.prototype.c=function(){var N=this.S();try{if(8&this.f)return;if(this.x===void 0)return;var I=this.x();if(typeof I=="function")this.u=I}finally{N()}};k.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,g1(this),X1(this),p++;var N=F;return F=this,y1.bind(this,N)};k.prototype.N=function(){if(!(2&this.f))this.f|=2,this.o=l,l=this};k.prototype.d=function(){if(this.f|=8,!(1&this.f))T0(this)};k.prototype.dispose=function(){this.d()};function P(N){var I=new k(N);try{I.c()}catch(E){throw I.d(),E}var R=I.d.bind(I);return R[Symbol.dispose]=R,R}var z0,A0,H0,A1=[],V1=[];P(function(){z0=this.N})();function b(N,I){C[N]=I.bind(null,C[N]||function(){})}function g0(N){if(H0)H0();H0=N&&N.S()}function J1(N){var I=this,R=N.data,E=V0(R);E.value=R;var W=z(function(){var A=I,V=I.__v;while(V=V.__)if(V.__c){V.__c.__$f|=4;break}var g=j(function(){var K=E.value.value;return K===0?0:K===!0?"":K||""}),J=j(function(){return!Array.isArray(g.value)&&!G0(g.value)}),Y=P(function(){if(this.N=K1,J.value){var K=g.value;if(A.__v&&A.__v.__e&&A.__v.__e.nodeType===3)A.__v.__e.data=K}}),Z=I.__$u.d;return I.__$u.d=function(){Y(),Z.call(this)},[J,g]},[]),O=W[0],X=W[1];return O.value?X.peek():X.value}J1.displayName="_st";Object.defineProperties(q.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:J1},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});b("__b",function(N,I){if(typeof I.type=="string"){var R,E=I.props;for(var W in E)if(W!=="children"){var O=E[W];if(O instanceof q){if(!R)I.__np=R={};R[W]=O,E[W]=O.peek()}}}N(I)});b("__r",function(N,I){if(I.type!==T){g0();var R,E=I.__c;if(E){if(E.__$f&=-2,(R=E.__$u)===void 0)E.__$u=R=function(W){var O;return P(function(){O=this}),O.c=function(){E.__$f|=1,E.setState({})},O}()}A0=E,g0(R)}N(I)});b("__e",function(N,I,R,E){g0(),A0=void 0,N(I,R,E)});b("diffed",function(N,I){g0(),A0=void 0;var R;if(typeof I.type=="string"&&(R=I.__e)){var{__np:E,props:W}=I;if(E){var O=R.U;if(O)for(var X in O){var A=O[X];if(A!==void 0&&!(X in E))A.d(),O[X]=void 0}else O={},R.U=O;for(var V in E){var g=O[V],J=E[V];if(g===void 0)g=x1(R,V,J,W),O[V]=g;else g.o(J,W)}}}N(I)});function x1(N,I,R,E){var W=I in N&&N.ownerSVGElement===void 0,O=r(R);return{o:function(X,A){O.value=X,E=A},d:P(function(){this.N=K1;var X=O.value.value;if(E[I]!==X)if(E[I]=X,W)N[I]=X;else if(X)N.setAttribute(I,X);else N.removeAttribute(I)})}}b("unmount",function(N,I){if(typeof I.type=="string"){var R=I.__e;if(R){var E=R.U;if(E){R.U=void 0;for(var W in E){var O=E[W];if(O)O.d()}}}}else{var X=I.__c;if(X){var A=X.__$u;if(A)X.__$u=void 0,A.d()}}N(I)});b("__h",function(N,I,R,E){if(E<3||E===9)I.__$f|=2;N(I,R,E)});x.prototype.shouldComponentUpdate=function(N,I){var R=this.__$u,E=R&&R.s!==void 0;for(var W in I)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){var O=2&this.__$f;if(!(E||O||4&this.__$f))return!0;if(1&this.__$f)return!0}else{if(!(E||4&this.__$f))return!0;if(3&this.__$f)return!0}for(var X in N)if(X!=="__source"&&N[X]!==this.props[X])return!0;for(var A in this.props)if(!(A in N))return!0;return!1};function V0(N,I){return z(function(){return r(N,I)},[])}function M1(N,I){var R=E0(N);return R.current=N,A0.__$f|=4,z(function(){return j(function(){return R.current()},I)},[])}var v1=typeof requestAnimationFrame=="undefined"?setTimeout:function(N){var I=function(){clearTimeout(R),cancelAnimationFrame(E),N()},R=setTimeout(I,35),E=requestAnimationFrame(I)},d1=function(N){queueMicrotask(function(){queueMicrotask(N)})};function s1(){X0(function(){var N;while(N=A1.shift())z0.call(N)})}function j1(){if(A1.push(this)===1)(C.requestAnimationFrame||v1)(s1)}function k1(){X0(function(){var N;while(N=V1.shift())z0.call(N)})}function K1(){if(V1.push(this)===1)(C.requestAnimationFrame||d1)(k1)}function b1(N){var I=E0(N);I.current=N,U0(function(){return P(function(){return this.N=j1,I.current()})},[])}function _1(N){var I=N.when.value;if(!I)return N.fallback||null;else return typeof N.children=="function"?N.children(I):N.children}function e1(N){var I=z(function(){return new Map},[]),R=(typeof N.each=="function"?N.each():N.each).value;if(!R.length)return N.fallback||null;var E=R.map(function(W,O){if(!I.has(W))I.set(W,N.children(W,O));return I.get(W)});return h(T,null,E)}function a1(N){var I=V0(N);if(!("current"in I))Object.defineProperty(I,"current",f1);return I}var f1={configurable:!0,get:function(){return this.value},set:function(N){this.value=N}};var C1=function(N,I,R,E){var W;I[0]=0;for(var O=1;O<I.length;O++){var X=I[O++],A=I[O]?(I[0]|=X?1:2,R[I[O++]]):I[++O];X===3?E[0]=A:X===4?E[1]=Object.assign(E[1]||{},A):X===5?(E[1]=E[1]||{})[I[++O]]=A:X===6?E[1][I[++O]]+=A+"":X?(W=N.apply(A,C1(N,A,R,["",null])),E.push(W),A[0]?I[0]|=2:(I[O-2]=0,I[O]=W)):E.push(A)}return E},Z1=new Map;function P0(N){var I=Z1.get(this);return I||(I=new Map,Z1.set(this,I)),(I=C1(this,I.get(N)||(I.set(N,I=function(R){for(var E,W,O=1,X="",A="",V=[0],g=function(Z){O===1&&(Z||(X=X.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?V.push(0,Z,X):O===3&&(Z||X)?(V.push(3,Z,X),O=2):O===2&&X==="..."&&Z?V.push(4,Z,0):O===2&&X&&!Z?V.push(5,0,!0,X):O>=5&&((X||!Z&&O===5)&&(V.push(O,0,X,W),O=6),Z&&(V.push(O,Z,0,W),O=6)),X=""},J=0;J<R.length;J++){J&&(O===1&&g(),g(J));for(var Y=0;Y<R[J].length;Y++)E=R[J][Y],O===1?E==="<"?(g(),V=[V],O=3):X+=E:O===4?X==="--"&&E===">"?(O=1,X=""):X=E+X[0]:A?E===A?A="":X+=E:E==='"'||E==="'"?A=E:E===">"?(g(),O=1):O&&(E==="="?(O=5,W=X,X=""):E==="/"&&(O<5||R[J][Y+1]===">")?(g(),O===3&&(V=V[0]),O=V,(V=V[0]).push(2,0,O),O=0):E===" "||E==="\t"||E===` `||E==="\r"?(g(),O=2):X+=E),O===3&&X==="!--"&&(O=4,V=V[0])}return g(),V}(N)),I),arguments,[])).length>1?I:I[0]}var J2=P0.bind(h);export{a1 as useSignalRef,b1 as useSignalEffect,V0 as useSignal,E0 as useRef,z as useMemo,B1 as useLayoutEffect,z1 as useErrorBoundary,U0 as useEffect,H1 as useContext,M1 as useComputed,T1 as useCallback,Y0 as untracked,r as signal,h0 as render,o0 as hydrate,J2 as html,h,P as effect,G1 as createRef,S1 as createContext,j as computed,_1 as Show,T as Fragment,e1 as For,x as Component};