@fluixi/core 1.0.0-alpha.93 → 1.0.0-alpha.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/dist/cdn/core.global.js +2 -2
- package/dist/src/cdn/{chunk-7XM7Q5VR.mjs → chunk-IFONZJWJ.mjs} +93 -2
- package/dist/src/cdn/core.cjs +99 -3
- package/dist/src/cdn/core.mjs +3 -3
- package/dist/src/cdn/{router-VOY43YNM.mjs → router-TU5CPI54.mjs} +1 -1
- package/dist/src/index.cjs +96 -4
- package/dist/src/index.mjs +97 -5
- package/dist/src/lib/client/{chunk-QT3RFKH6.mjs → chunk-AHNP3IWU.mjs} +1 -1
- package/dist/src/lib/client/index.cjs +100 -4
- package/dist/src/lib/client/index.mjs +4 -4
- package/dist/src/lib/client/{router-ADTS55OP.mjs → router-5C6FQJQ4.mjs} +95 -4
- package/dist/src/lib/core.cjs +95 -3
- package/dist/src/lib/core.d.ts +2 -2
- package/dist/src/lib/core.d.ts.map +1 -1
- package/dist/src/lib/core.js +1 -1
- package/dist/src/lib/core.mjs +96 -4
- package/dist/src/lib/i18n/index.cjs +1 -1
- package/dist/src/lib/i18n/index.mjs +1 -1
- package/dist/src/lib/index.cjs +1 -1
- package/dist/src/lib/index.mjs +1 -1
- package/dist/src/lib/jsx-runtime/index.cjs +1 -1
- package/dist/src/lib/jsx-runtime/index.mjs +1 -1
- package/dist/src/lib/jsx-runtime/jsx-dev-runtime.cjs +1 -1
- package/dist/src/lib/jsx-runtime/jsx-dev-runtime.mjs +1 -1
- package/dist/src/lib/plugins/index.cjs +1 -1
- package/dist/src/lib/plugins/index.mjs +1 -1
- package/dist/src/lib/render/index.cjs +1 -1
- package/dist/src/lib/render/index.mjs +1 -1
- package/dist/src/lib/render/versions.cjs +1 -1
- package/dist/src/lib/render/versions.mjs +1 -1
- package/dist/src/lib/router/index.cjs +94 -3
- package/dist/src/lib/router/index.d.ts.map +1 -1
- package/dist/src/lib/router/index.js +55 -0
- package/dist/src/lib/router/index.mjs +94 -3
- package/dist/src/lib/router/scroll.cjs +79 -0
- package/dist/src/lib/router/scroll.d.ts +19 -0
- package/dist/src/lib/router/scroll.d.ts.map +1 -0
- package/dist/src/lib/router/scroll.js +68 -0
- package/dist/src/lib/router/scroll.mjs +58 -0
- package/dist/src/lib/server/index.cjs +1 -1
- package/dist/src/lib/server/index.mjs +1 -1
- package/dist/src/lib/storage/index.cjs +1 -1
- package/dist/src/lib/storage/index.mjs +1 -1
- package/dist/src/routes.cjs +1 -1
- package/dist/src/routes.mjs +1 -1
- package/dist/src/utils.cjs +1 -1
- package/dist/src/utils.mjs +1 -1
- package/dist/src/version.generated.cjs +1 -1
- package/dist/src/version.generated.d.ts +1 -1
- package/dist/src/version.generated.js +1 -1
- package/dist/src/version.generated.mjs +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +16 -16
package/dist/cdn/core.global.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @fluixi/core v1.0.0-alpha.
|
|
2
|
-
"use strict";var Fluixi=(()=>{var nr=Object.defineProperty;var la=Object.getOwnPropertyDescriptor;var da=Object.getOwnPropertyNames;var pa=Object.prototype.hasOwnProperty;var F=(e,t)=>()=>(e&&(t=e(e=0)),t);var In=(e,t)=>{for(var r in t)nr(e,r,{get:t[r],enumerable:!0})},ya=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of da(t))!pa.call(e,o)&&o!==r&&nr(e,o,{get:()=>t[o],enumerable:!(n=la(t,o))||n.enumerable});return e};var ha=e=>ya(nr({},"__esModule",{value:!0}),e);function Bn(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:ma,onSuspend:null,onError:null,observer:null}}function ga(e){let t=Bn(),r=e;for(let n of Object.keys(t))n in e||(r[n]=t[n]);return e}function va(){let e=rt[Dn];return e?ga(e):rt[Dn]=Bn()}function Jn(){return[...new Set(rt[zn]??[])]}function wa(e){return m.observer=e,()=>{m.observer===e&&(m.observer=null)}}function fr(e){let t=m.observer;t&&t.created(e.parents===void 0?{...e,parents:U,origin:e.origin??ba,scope:e.scope??qn}:{...e,scope:e.scope??qn})}function Sa(e){return m.observer?(U.push(e),!0):!1}function Aa(){U.pop()}function xa(e){m.observer?.ran?.(e)}function ka(e,t){m.observer?.wrote?.(e,t)}function J(e,t,r,n){let o=m.observer;!o?.bound||!U.length||o.bound(U[U.length-1],e,t,r,n)}function X(e,t,r,n){let o=m.observer;!o?.directive||!U.length||o.directive(U[U.length-1],e,t,r,n)}function _a(e){m.observer?.contextCreated?.(e)}function ir(e,t,r){let n=m.observer;!n?.context||!U.length||n.context(U[U.length-1],e,t,r)}function lr(e){m.observer?.disposed?.(e)}function Xn(){return m.observer!=null}function sr(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}function Ca(e){if(m.untracked)return e();m.untracked=!0;try{return e()}finally{m.untracked=!1}}function be(e){let t=Ie(e);return e&&(e.owned??=[]).push(t),t}function Se(e,t=!0){Le(e,t)}function Zn(e){return!!e&&e.disposed===!0}function Ie(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function Y(e,t){let r=Symbol(t??"context");return _a(r),{id:r,defaultValue:e,Provider:o=>{ir(r,"provide",o.value);let s=m.owner,i=Ie(s);(i.contexts=new Map).set(r,o.value),s&&(s.owned??=[]).push(i),m.owner=i;try{return o.children}finally{m.owner=s}}}}function q(e){let t=m.owner;for(;t;){if(t.contexts&&t.contexts.has(e.id)){let r=t.contexts.get(e.id);return ir(e.id,"read",r),r}t=t.parent}return ir(e.id,"read",e.defaultValue),e.defaultValue}function Qn(e,t){let r=e;for(;r;){if(r.contexts&&r.contexts.has(t.id))return r.contexts.get(t.id);r=r.parent}return t.defaultValue}function eo(e,t,r){let n=Ie(m.owner);(n.contexts=new Map).set(e.id,t),m.owner&&(m.owner.owned??=[]).push(n);let o=m.owner;m.owner=n;try{return r()}finally{m.owner=o}}function Ra(e){m.onSuspend=e}function Pa(e){return m.onSuspend?(m.onSuspend(e,m.owner),!0):!1}function $a(e){m.onError=e}function T(){return m.owner}function to(e){let t=m.owner;return m.owner=e,t}function $(e,t){let r=m.owner;m.owner=e;try{return t()}finally{m.owner=r}}function A(e){if(m.owner){if(m.owner.disposed){e();return}(m.owner.cleanups??=[]).push(e)}}function Le(e,t=!0){if(!e.disposed){if(e.owned){for(let r=e.owned.length-1;r>=0;r--)Le(e.owned[r]);e.owned=null}if(e.cleanups){for(let r=e.cleanups.length-1;r>=0;r--)e.cleanups[r]();e.cleanups=null}t&&(e.disposed=!0)}}function D(e){let t=Ie(m.owner);m.owner&&(m.owner.owned??=[]).push(t);let r=m.owner;m.owner=t;try{return e(()=>Le(t))}finally{m.owner=r}}function Na(e){m.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Ma(e){e.queued||(e.queued=!0,m.queue.push(e),!m.scheduled&&m.batchDepth===0&&(m.scheduled=!0,m.hostSchedule(ot)))}function ot(){if(m.scheduled=!1,m.flushing)return;m.flushing=!0;let e=0;try{for(;m.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=m.queue;m.queue=[];for(let r of t)r.queued=!1,r.disposed||r.run()}}finally{m.flushing=!1}}function La(){m.batchDepth===0&&ot()}function Ia(e){m.batchDepth++;try{return e()}finally{--m.batchDepth===0&&ot()}}function dr(e,t=!1,r){let n=new Da(e,t,r);return()=>n.dispose()}function qa(e){return!!e&&typeof e.then=="function"}function b(e,t){let r=new Ea(e,{equals:t?.equals}),n=(()=>r.get()),o=(s=>{let i=typeof s=="function"?s(r.peek()):s;return r.set(i),La(),i});return Object.defineProperty(n,ro,{value:!0,enumerable:!0}),Object.defineProperty(n,Ha,{value:{get value(){return r.peek()},get version(){return r.version}},enumerable:!1}),fr({kind:"signal",node:r,handle:n,name:t?.name,set:o}),Xn()&&A(()=>lr(r)),[n,o]}function w(e,t,r){let n=t,o=T(),s=new Gn(()=>$(o,()=>{try{return n=e(n)}catch(a){if(qa(a))return Pa(a),n;throw a}}),{equals:r?.equals}),i=(()=>s.get());return Object.defineProperty(i,ro,{value:!0,enumerable:!0}),Object.defineProperty(i,Va,{value:!0,enumerable:!0}),fr({kind:"memo",node:s,handle:i,name:r?.name}),Xn()&&A(()=>lr(s)),i}function _(e,t,r){let n=t;return dr(()=>{n=e(n)},!0,r?.name)}function no(e,t){let r=t;dr(()=>{r=e(r)})}function R(e,t){let r=t;return dr(()=>{r=e(r)})}function N(e){return Ia(e)}function E(e){return Ca(e)}function oo(){return ot(),Promise.resolve()}function io(e,t,r){let n=[];return A(()=>{for(let o of n)o.dispose();n=[]}),w(()=>{let o=e()||[];return E(()=>{if(o.length===0){for(let c of n)c.dispose();return n=[],r?.fallback?r.fallback():[]}let s=new Map;for(let c of n)s.has(c.item)||s.set(c.item,c);let i=[],a=new Set;for(let c=0;c<o.length;c++){let u=o[c],f=s.get(u);if(f&&!a.has(f))f.setIndex(c),i.push(f),a.add(f);else{let l,d,h;D(p=>{h=p;let[v,S]=b(c,{name:"row index"});d=S,l=t(u,v)});let y={item:u,rendered:l,dispose:h,setIndex:d};i.push(y),a.add(y)}}for(let c of n)a.has(c)||c.dispose();return n=i,i.map(c=>c.rendered)})},void 0,{name:"mapArray"})}function so(e,t,r,n){let o=[],s=[];return A(()=>{for(let i of s)i.dispose();o=[],s=[]}),w(()=>{let i=e()||[];return E(()=>{if(i.length===0){for(let l of s)l.dispose();return o=[],s=[],n?.fallback?n.fallback():[]}let a=new Map;for(let l=0;l<o.length;l++)a.set(o[l],s[l]);let c=[],u=[],f=new Set;for(let l=0;l<i.length;l++){let d=t(i[l]),h=a.get(d);if(h&&!f.has(d))h.setIndex(l),c.push(h);else{let y,p,v;D(S=>{v=S;let[k,Q]=b(l,{name:"row index"});p=Q;let pe=w(ee=>{let se=(e()||[])[k()];return se??ee},i[l]);y=r(pe,k)}),c.push({rendered:y,dispose:v,setIndex:p})}u.push(d),f.add(d)}for(let[l,d]of a)f.has(l)||d.dispose();return o=u,s=c,c.map(l=>l.rendered)})},void 0,{name:"keyArray"})}function ao(e,t,r){let n=[];return A(()=>{for(let o of n)o.dispose();n=[]}),w(()=>{let o=e()||[];return E(()=>{if(o.length===0){for(let c of n)c.dispose();return n=[],r?.fallback?r.fallback():[]}let s=n.length,i=o.length;for(let c=s;c<i;c++){let u,f,l,d=o[c];D(h=>{l=h;let[y,p]=b(d);f=p,u=t(y,c)}),n.push({rendered:u,setItem:f,dispose:l})}for(let c=i;c<s;c++)n[c].dispose();i<s&&(n=n.slice(0,i));let a=Math.min(s,i);for(let c=0;c<a;c++)n[c].setItem(o[c]);return n.map(c=>c.rendered)})},void 0,{name:"indexArray"})}function L(e){return typeof e=="function"&&e[Ka]===!0}function Fa(e){jn&&jn(e)}function co(e){ar=e}function Ua(e){return ar?ar(e):void 0}function uo(e){cr=e}function za(){return cr?cr():void 0}function Ba(e,t){Kn&&Kn(e,t)}function Fn(){let e=new Map,t=new Map;return{get:r=>e.get(r),set:(r,n)=>{e.set(r,n)},delete:r=>{e.delete(r)},keys:()=>e.keys(),clear:()=>{e.clear(),t.clear()},inflight:t}}function it(){let e=Ja?.();return e||(typeof window>"u"?Fn():Xa??=Fn())}function fo(e,t=(r,n)=>r===n){let r=new Map;return _(()=>{let n=e();for(let[o,s]of r){let[i,a]=s,c=t(o,n);i()!==c&&a(c)}}),n=>{let o=r.get(n);if(!o){let[s,i]=b(!1);o=[s,i],r.set(n,o);let a=e();i(t(n,a))}return o[0]()}}function lo(e,t){let[r,n]=b(e(),t);return _(()=>{let o=e();t?.timeoutMs?setTimeout(()=>n(()=>o),t.timeoutMs):typeof requestIdleCallback=="function"?requestIdleCallback(()=>n(()=>o)):Promise.resolve().then(()=>n(()=>o))}),r}function po(e,t){let r,n=(...o)=>{r!==void 0&&clearTimeout(r),r=setTimeout(()=>{r=void 0,e(...o)},t)};return A(()=>{r!==void 0&&clearTimeout(r)}),n}function Ya(e){return!!e&&typeof e.then=="function"}function ae(e,t,r={}){let n,o;typeof t=="function"?(n=typeof e=="function"?e:()=>e,o=t):(n=()=>!0,o=e,t&&typeof t=="object"&&(r=t));let s=r.transport===!1?void 0:za(),i=s!==void 0?Ua(s):void 0,a=i!==void 0,[c,u]=b(i!==void 0?i.value:r.initialValue,{equals:!1}),[f,l]=b(void 0,{equals:!1}),[d,h]=b(i!==void 0||r.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[y,p]=b(void 0,{equals:!1}),[v,S]=b(void 0,{equals:!1}),k=or,Q=!1;_(()=>{let H=n();if(v(),H===!1||H===null||H===void 0){k=or,N(()=>{h("unresolved"),p(void 0),l(void 0)});return}let se=Q;if(Q=!1,k!==or&&H===k&&!se)return;if(k=H,a){a=!1;return}let et=!1;A(()=>et=!0);let Mn=E(d),fa=E(c),Ln=Mn==="ready"||Mn==="refreshing";N(()=>{h(Ln?"refreshing":"pending"),l(void 0)});try{let ye=o(H,{value:fa,refetching:Ln});Ya(ye)?(p(ye),Fa(ye),ye.then(tt=>{et||(s!==void 0&&Ba(s,tt),N(()=>{u(()=>tt),h("ready"),p(void 0)}))},tt=>{et||N(()=>{l(tt),h("errored"),p(void 0)})})):N(()=>{u(()=>ye),h("ready"),p(void 0)})}catch(ye){if(et)return;N(()=>{l(ye),h("errored"),p(void 0)})}});let pe=()=>{let H=d();return H==="pending"||H==="refreshing"},ee=(()=>{let H=f();if(H)throw H;if(pe()){let se=y();if(se)throw se}return c()});return Object.defineProperties(ee,{state:{get:d},loading:{get:pe},error:{get:f},latest:{get:c}}),Object.defineProperty(ee,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(ee,Symbol.for("signal"),{value:!0,enumerable:!0}),[ee,{mutate:u,refetch:()=>{Q=!0,S(void 0)}}]}function nt(e){if(typeof e=="function"&&!e.length){let t=e();return L(t)?t:nt(t)}if(Array.isArray(e)){let t=[];for(let r=0;r<e.length;r++){let n=nt(e[r]);Array.isArray(n)?t.push.apply(t,n):t.push(n)}return t}return e}function De(e){let t=w(e);return ja?w(()=>nt(t()),void 0,{name:"children"}):w(()=>nt(t()))}function ho(){let[e,t]=b(0),r=0;return{increment:()=>t(r+=1),decrement:()=>t(r-=1),inFallback:()=>e()>0}}function pr(e,t){return eo(yo,e,t)}function go(){let[e,t]=b(void 0,{equals:!1});return{error:e,reset:()=>t(()=>{}),setError:n=>t(()=>n)}}function vo(e,t){return eo(mo,e,t)}var ur,Un,Dn,zn,ma,rt,m,U,ba,qn,Oa,Vn,Hn,Wn,Me,Yn,Ea,Gn,Ta,Da,ro,Va,Ha,Wa,ja,Ka,jn,ar,cr,Kn,Ja,Xa,or,yo,mo,Ae,x=F(()=>{"use strict";ur="1.0.0-alpha.93",Un=ur.split(".")[0],Dn=`__fluixi_signal_state_v${Un}__`,zn=`__fluixi_signal_builds_v${Un}__`,ma=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};rt=globalThis;m=va();(rt[zn]??=[]).push(ur);U=[];Oa="__FLUIXI_DEVTOOLS_HOOK__",Vn=globalThis[Oa];if(typeof Vn?.inject=="function")try{Vn.inject({observeReactiveNodes:wa,version:ur})}catch{}Hn=0,Wn=1,Me=2,Yn=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(m.untracked)return;let e=m.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}},Ea=class extends Yn{constructor(e,t){super(),this._value=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){return this.track(),this._value}set(e){if(!this._equals(this._value,e)){if(this._value=e,this.version++,ka(this,m.consumer),this.observers)for(let t of[...this.observers])t.markDirty(Me);sr(this)}}peek(){return this._value}},Gn=class extends Yn{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=Me,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(m.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===Wn&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===Me)break}(this.state===Me||!this._initialized)&&this.recompute(),this.state=Hn}recompute(){if(this.sources){for(let a of this.sources)a.observers?.delete(this);this.sources.clear()}let e=m.consumer,t=m.untracked,r=Sa(this);m.consumer=this,m.untracked=!1;let n,o=!1,s;try{n=this._fn()}catch(a){o=!0,s=a,n=this._value}finally{m.consumer=e,m.untracked=t,r&&Aa()}let i=!this._initialized||this._threw!==o||(o?s!==this._error:!this._equals(this._value,n));if(this._initialized=!0,this._threw=o,this._error=s,this._value=n,xa(this),i){if(this.version++,this.observers)for(let a of[...this.observers])a.markDirty(Me);sr(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===Hn;if(this.state=e,t){if(this.observers)for(let r of[...this.observers])r.markDirty(Wn);sr(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};Ta=class{constructor(e){this._watched=new Set,this._pending=new Set,this._notifyFn=e}watch(...e){for(let t of e)this._watched.add(t),(t.watchers??=new Set).add(this)}unwatch(...e){for(let t of e)this._watched.delete(t),t.watchers?.delete(this),this._pending.delete(t)}getPending(){let e=[...this._pending];return this._pending.clear(),e}_notify(e){if(!this._watched.has(e)||this._pending.has(e))return;let t=this._pending.size===0;this._pending.add(e),t&&this._notifyFn()}};Da=class{constructor(e,t=!1,r){this.queued=!1,this.disposed=!1,this.owner=Ie(m.owner),m.owner&&(m.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new Gn(()=>{Le(this.owner,!1),$(this.owner,()=>{let n=e();typeof n=="function"&&(this.owner.cleanups??=[]).push(n)})}),fr({kind:"effect",node:this.computed,handle:this,internal:!t,...r?{name:r}:{}}),this.watcher=new Ta(()=>Ma(this)),this.run(),this.watcher.watch(this.computed)}run(){if(!this.disposed){this.watcher.getPending();try{this.computed.get()}catch(e){if(e&&typeof e.then=="function"&&m.onSuspend){m.onSuspend(e,this.owner);return}if(m.onError&&m.onError(e,this.owner))return;throw e}}}dispose(){this.disposed||(this.disposed=!0,lr(this.computed),this.watcher.unwatch(this.computed),Le(this.owner))}};Na(()=>{});ro=Symbol.for("signal"),Va=Symbol.for("memo"),Ha=Symbol.for("signal-node");Wa=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0,ja=typeof process>"u"?Wa:!1,Ka=Symbol.for("signal");jn=null;ar=null;cr=null;Kn=null;Ja=null;or=Symbol();yo=Y();Ra((e,t)=>{let r=Qn(t,yo);r&&(r.increment(),e.finally(()=>r.decrement()))});mo=Y();$a((e,t)=>{let r=Qn(t,mo);return r?(r.setError(e),!0):!1});Ae=Symbol.for("fluixi-proxy")});var Jo,Xo=F(()=>{"use strict";Jo="1.0.0-alpha.93"});function fi(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Hc,onSuspend:null,onError:null,observer:null}}function Wc(e){let t=fi(),r=e;for(let n of Object.keys(t))n in e||(r[n]=t[n]);return e}function jc(){let e=Or[Yo];return e?Wc(e):Or[Yo]=fi()}function Kc(e){return P.observer=e,()=>{P.observer===e&&(P.observer=null)}}function Fc(e,t){if(!P.observer)return t();let r=gt;gt=e;try{return t()}finally{gt=r}}function Uc(e){let t=P.observer;t&&t.created(e.parents===void 0?{...e,parents:he,origin:e.origin??gt,scope:e.scope??Go}:{...e,scope:e.scope??Go})}function li(e){let t=P.observer;!t?.props||!he.length||!e||t.props(he[he.length-1],e)}function zc(e){P.observer?.contextCreated?.(e)}function Bc(e,t,r){let n=P.observer;!n?.context||!he.length||n.context(he[he.length-1],e,t,r)}function Zo(e,t,r){P.observer?.moved?.(e,t,r)}function Qo(e){P.observer?.disposed?.(e)}function di(){return P.observer!=null}function Xc(e){if(P.untracked)return e();P.untracked=!0;try{return e()}finally{P.untracked=!1}}function Yc(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function pi(e,t){let r=Symbol(t??"context");return zc(r),{id:r,defaultValue:e,Provider:o=>{Bc(r,"provide",o.value);let s=P.owner,i=Yc(s);(i.contexts=new Map).set(r,o.value),s&&(s.owned??=[]).push(i),P.owner=i;try{return o.children}finally{P.owner=s}}}}function yi(e,t){let r=e;for(;r;){if(r.contexts&&r.contexts.has(t.id))return r.contexts.get(t.id);r=r.parent}return t.defaultValue}function Gc(e){P.onSuspend=e}function Zc(e){P.onError=e}function Qc(e){P.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function hi(e){return Xc(e)}function mi(e){return typeof e=="function"&&e[eu]===!0}function nu(e,t){if(!_e(e)||!di())return;let r=new Set,n=i=>{if(!(!_e(i)||r.has(i))){r.add(i);for(let a of Object.values(i))n(a)}};n(St.get(t)??t);let o=new Set,s=i=>{if(!_e(i))return;let a=i;if(r.has(a)||o.has(a))return;o.add(a);let c=Ve.get(a);if(c){for(let u of c.keys.values())Qo(u);c.all&&Qo(c.all),Ve.delete(a),Oe.delete(a),Er.delete(a)}for(let u of Object.values(a))s(u)};s(e)}function gi(e,t,r){let n=t?.owner,o=n&&r!==void 0?At(n.name,r,t?.array):void 0,[s,i]=Fc(n?.store,()=>b(e,o?{name:o}:void 0)),a=s;return a.$=i,a}function xt(e){let t=Ve.get(e);return t?t.owner||(t.owner=Oe.get(e)):Ve.set(e,t={keys:new Map,owner:Oe.get(e),array:Array.isArray(e)}),t}function ii(e,t,r){let n=e.keys.get(t);return n||e.keys.set(t,n=gi(r,e,t)),n}function ou(e,t,r,n){let o=Oe.get(e);if(o&&o.store===t&&o.name===r)return;let s={store:t,name:r};Oe.set(e,s),St.set(e,St.get(n)??n);let i=Ve.get(e);if(i&&(i.owner=s,!!di())){for(let[a,c]of i.keys)Zo(c,t,At(r,a,i.array));i.all&&Zo(i.all,t,At(r,"*",i.array))}}function si(e){let t=xt(e);(t.all||(t.all=gi(void 0,t,"*")))()}function ai(e,t){e.$(typeof t=="function"?()=>t:t)}function _e(e){if(e==null||typeof e!="object")return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function vt(e){if(!_e(e))return e;let t=Er.get(e);if(t)return t;let r=new Proxy(e,iu);return Er.set(e,r),r}function vi(e,t=new Set){if(e==null||typeof e!="object")return e;let r=e[bt]??e;if(t.has(r)||!_e(r))return r;t.add(r);let n=!1,o=i=>{let a=vi(i,t);return a!==i&&(n=!0),a};if(Array.isArray(r)){let i=r.map(o);return n?i:r}let s={};for(let i of Object.keys(r))s[i]=o(r[i]);return n?s:r}function Z(e,t,r){let n=vi(r),o=e[t];if(o===n&&(n!==void 0||t in e))return;let s=Array.isArray(e),i=s?e.length:0;n===void 0?delete e[t]:e[t]=n;let a=xt(e),c=a.keys.get(t);if(c&&ai(c,n),nu(o,e),s&&e.length!==i){let u=a.keys.get("length");u&&ai(u,e.length)}a.all&&a.all.$(void 0)}function Tr(e,t){return typeof e=="function"?e(t):e}function Cr(e,t){for(let r of Object.keys(t)){let n=t[r],o=e[r];n&&typeof n=="object"&&!Array.isArray(n)&&o&&typeof o=="object"&&!Array.isArray(o)?Cr(o,n):Z(e,r,n)}}function _t(e){let t=[],r=e.replace(/\[([^\]]*)\]/g,".$1");for(let n of r.split("."))n.length&&t.push(n);return t}function wi(e,t,r){let n=t.length-1;for(let s=0;s<n;s++){let i=t[s];if(i==="*"){let c=t.slice(s+1);if(Array.isArray(e))for(let u=0;u<e.length;u++)wi(e[u],c,r);return}let a=e[i];(a==null||typeof a!="object")&&(a=/^\d+$/.test(t[s+1])?[]:{},Z(e,i,a)),e=a}let o=t[n];if(o==="*"){if(Array.isArray(e))for(let s=0;s<e.length;s++)Z(e,s,Tr(r,e[s]));return}Z(e,o,Tr(r,e[o]))}function ci(e,t,r){wi(e,_t(t),r)}function su(e){return Array.isArray(e)&&e.length>0&&e.every(t=>Array.isArray(t)&&t.length>=2&&typeof t[0]=="string")}function wt(e,t){for(let r=e.length-1;r>=t.length;r--)Z(e,String(r),void 0);e.length!==t.length&&Z(e,"length",t.length);for(let r=0;r<t.length;r++)Z(e,String(r),t[r])}function au(e,t){let r=t[0];if(typeof r=="function"&&t.length===1){let n=r(e);n&&n!==e&&Cr(e,n);return}if(Array.isArray(r)&&t.length===1){if(su(r)){for(let n of r)ci(e,n[0],n[1]);return}if(Array.isArray(e)){wt(e,r);return}if(r.length===0)return;throw new TypeError("[fluixi] set() was given an array that is neither a batch of [path, value] pairs nor a replacement for an array root. Name the path you meant, as in set('items', [...]).")}if(r&&typeof r=="object"&&!Array.isArray(r)&&t.length===1){Cr(e,r);return}if(t.length>=3){Rr(e,t.slice(0,-1),t[t.length-1]);return}ci(e,String(r),t[1])}function cu(e,t){if(typeof t=="function"){if(!Array.isArray(e))return[];let r=[];for(let n=0;n<e.length;n++)t(e[n],n)&&r.push(n);return r}if(Array.isArray(t))return Array.isArray(e)?t.map(Number):t.map(String);if(t&&typeof t=="object"&&("from"in t||"to"in t||"by"in t)){if(!Array.isArray(e))return[];let r=t.by??1,n=t.from??0,o=t.to??e.length-1,s=[];for(let i=n;i<=o;i+=r)i>=0&&i<e.length&&s.push(i);return s}return t==="*"?Array.isArray(e)?e.map((r,n)=>n):Object.keys(e??{}):[t]}function Rr(e,t,r){if(e==null)return;let[n,...o]=t;if(typeof n=="string"){let i=_t(n);if(i.length>1){Rr(e,[...i,...o],r);return}}let s=cu(e,n);if(o.length===0){for(let i of s)Z(e,i,Tr(r,e[i]));return}for(let i of s){let a=e[i];if(a==null||typeof a!="object"){let c=o[0];a=typeof c=="number"||/^\d+$/.test(String(c))?[]:{},Z(e,i,a)}Rr(a,o,r)}}function Pr(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Pr);let t={};for(let r of Object.keys(e))t[r]=Pr(e[r]);return t}function fe(e,t){let r=e;for(let n of _t(t)){if(r==null)return;r=r[n]}return r}function fu(e,t){for(let r of uu)e[r]=t[r].bind(t);e.$=t.reactive.bind(t)}function lu(e,t={immutable:!0}){let r=new bi(e,t);return fu(r.set,r),[r.proxy,r.set]}function du(e,t={}){return new bi(e,{...t,immutable:!1})}function kt(e){if(e==null||typeof e!="object")return e;let t=e[bt];return t!==void 0?t:e}function pu(e){return E(()=>kt(e))}var $r,ui,Yo,Vc,Hc,Or,P,he,gt,Go,Jc,ei,Ll,eu,tu,ru,bt,ti,ri,ni,oi,Ve,Er,Oe,St,At,iu,bi,uu,Dl,Si=F(()=>{"use strict";x();$r="1.0.0-alpha.93",ui=$r.split(".")[0],Yo=`__fluixi_signal_state_v${ui}__`,Vc=`__fluixi_signal_builds_v${ui}__`,Hc=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};Or=globalThis;P=jc();(Or[Vc]??=[]).push($r);he=[];Jc="__FLUIXI_DEVTOOLS_HOOK__",ei=globalThis[Jc];if(typeof ei?.inject=="function")try{ei.inject({observeReactiveNodes:Kc,version:$r})}catch{}Qc(()=>{});Ll=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0,eu=Symbol.for("signal");tu=pi();Gc((e,t)=>{let r=yi(t,tu);r&&(r.increment(),e.finally(()=>r.decrement()))});ru=pi();Zc((e,t)=>{let r=yi(t,ru);return r?(r.setError(e),!0):!1});bt=Symbol("store-raw"),ti=Symbol("store-node"),ri=Symbol("store-has"),ni=Symbol("store-self"),oi=Symbol("store-track"),Ve=new WeakMap,Er=new WeakMap,Oe=new WeakMap,St=new WeakMap;At=(e,t,r)=>r?`${e}[${String(t)}]`:`${e}.${String(t)}`;iu={get(e,t,r){if(t===bt||t===ti)return e;if(t===Ae)return r;if(t===ri)return c=>c in e;if(t==="__proxy")return!0;if(t===oi||t===ni)return si(e),r;let n=e[t];if(typeof n=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return n;let o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get)return o.get.call(r);let s=xt(e),i=ii(s,t,n),a=i();return _e(a)?(s.owner&&ou(a,i,At(s.owner.name,t,s.array),e),vt(a)):a},set(){return!0},deleteProperty(e,t){return t in e&&Z(e,t,void 0),!0},has(e,t){return t===bt||t===Ae||t===ti||t===ri||t===ni||t===oi?!0:(ii(xt(e),t,e[t])(),t in e)},ownKeys(e){return si(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};bi=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...r)=>N(()=>au(this.root,r))),e&&typeof e=="object"&&(Oe.set(e,{store:this,name:t.name??"store"}),St.set(e,e)),Uc({kind:"store",node:this,handle:()=>this.root,name:t.name})}get state(){return vt(this.root)}get proxy(){return vt(this.root)}get accessor(){return(()=>vt(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return kt(this.state);let t=this.state;for(let r of _t(e)){if(t==null)return;t=t[r]}return kt(t)}select(e){return w(()=>e(this.state))}subscribe(e){return _(()=>e(this.state))}watch(e,t){let r;return _(()=>{let n=e(this.state);Object.is(n,r)||(t(n,r),r=n)})}reactive(e){return w(()=>this.state[e])}produce(e){this.set((t=>{let r=Pr(t);return e(r),r}))}reconcile(e,t={}){this.set(e)}push(e,...t){let r=fe(this.root,e);this.set(e,r.concat(t))}pop(e){let t=fe(this.root,e).slice(),r=t.pop();return this.set(e,t),r}shift(e){let t=fe(this.root,e).slice(),r=t.shift();return this.set(e,t),r}splice(e,t,r,...n){let o=fe(this.root,e).slice(),s=o.splice(t,r,...n);return this.set(e,o),s}insert(e,t,r){let n=fe(this.root,e).slice();n.splice(t,0,r),this.set(e,n)}removeAt(e,t){let r=fe(this.root,e).slice(),n=r.splice(t,1);return this.set(e,r),n}replace(e,t){if(arguments.length>=2){let n=fe(this.root,String(e)),o=t;if(Array.isArray(n)&&Array.isArray(o)){wt(n,o);return}this.set(e,o);return}let r=this.root;if(Array.isArray(r)&&Array.isArray(e)){wt(r,e);return}this.set(e)}clear(e){let t=e===void 0?this.root:fe(this.root,e);if(Array.isArray(t)){wt(t,[]);return}if(t&&typeof t=="object")for(let r of Object.keys(t))Z(t,r,void 0)}toObservable(){let[e]=b(this.state);return e.toObservable()}dispose(){}},uu=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","replace","clear","unwrap","toObservable"];Dl=Object.freeze({createStore:lu,createMutableStore:du,batch:N,unwrap:kt,untrackStore:pu})});function I(){return Ir.server}function Fr(){if(!Ir.nodes)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return Ir.nodes}function Ur(e){return e!=null&&e[Mt]===!0?!0:typeof Node<"u"&&e instanceof Node}function mu(e){return e!=null&&e[Mt]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function gu(e){return e!=null&&e[Mt]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}function vu(e){return e.localName.includes("-")}function Ai(e,t,r,n=!1){if(r==null){e.removeAttribute(t);return}if(vu(e)){if(I()){Dr(e,t,r);return}e[t]=r;return}C(e,t,r,n)}function Dr(e,t,r){let n=e[wu]??={};n[t]=r,r==null||r===!1?e.removeAttribute(t):r===!0?e.setAttribute(t,""):(typeof r=="string"||typeof r=="number")&&e.setAttribute(t,String(r))}function Nr(e){return bu.has(e)||e.startsWith("aria-")||e.startsWith("data-")}function Ri(e,...t){e.classList.add(...t)}function Pi(e,...t){e.classList.remove(...t)}function $i(e,...t){t.forEach(r=>e.classList.toggle(r))}function C(e,t,r,n=!1){if(r==null||r===!1){e.removeAttribute(t);return}if(r===!0){e.setAttribute(t,"");return}if(typeof r=="object"){e.setAttribute(t,JSON.stringify(r));return}e.setAttribute(t,String(r))}function Ni(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function Lt(e){return e instanceof Node}function Mi(e){j.core=e}function It(e){j.core&&e.setAttribute("fluixi",j.core),e.setAttribute("fx-dom",j.dom),e.setAttribute("fx-reactive",j.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=j)}function Dt(){let e=Jn();e.length>1&&console.warn(`[fluixi] ${e.length} builds of @fluixi/reactive are driving one reactive graph: ${e.join(", ")}. They share it on purpose, so signals still cross between them, but the oldest one decided what the graph looks like. Build the components on one release, or load them as shared-runtime bundles.`);let t=[j.core,j.dom,j.reactive].filter(r=>r!==void 0);new Set(t).size<=1||console.warn(`[fluixi] package versions disagree: core ${j.core??"(absent)"}, dom ${j.dom}, reactive ${j.reactive}. These ship as one release, so a mismatch usually means a stale lockfile or two copies resolved side by side. Reinstall, or check for duplicates with \`pnpm why @fluixi/dom\`.`)}function Li(e){return Object.defineProperty(e,Symbol.for("fluixi-provider"),{value:!0,enumerable:!0}),e}function Ke(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function Ii(e){return Object.defineProperty(e,Symbol.for("fluixi-suspense"),{value:!0,enumerable:!0}),e}function Au(e){return typeof e=="function"&&e[Symbol.for("fluixi-router")]===!0}function xu(e){return typeof e=="function"&&e[Symbol.for("fluixi-routes")]===!0}function ku(e){return typeof e=="function"&&e[Symbol.for("fluixi-route")]===!0}function _u(e){return typeof e=="function"&&e[Symbol.for("fluixi-outlet")]===!0}function Ou(e){return typeof e=="function"&&e[Symbol.for("fluixi-provider")]===!0}function Eu(e){return typeof e=="function"&&e[Symbol.for("fluixi-context")]===!0}function ne(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}function Tu(e){return typeof e=="function"&&e[Symbol.for("fluixi-suspense")]===!0}function Di(e){return Au(e)?{type:"router",value:e}:ku(e)?{type:"route",value:e}:xu(e)?{type:"routes",value:e}:_u(e)?{type:"outlet",value:e}:ne(e)?{type:"component",value:e}:Tu(e)?{type:"suspense",value:e}:Ou(e)?{type:"provider",value:e}:Eu(e)?{type:"context",value:e}:{type:"none",value:e}}function Pu(){return Ru.getStore()}function $u(e){qi=e}function qr(){return qi}function ki(e,t){return g.active&&t.parentNode===e}function Vi(e){let t=g.parents.lastIndexOf(e);t!==-1&&(g.parents.length=t),g.cursor=e.nextSibling}function Nu(e,t){if(!e||e.parentNode==null)return t();let r=g.active,n=g.cursor,o=g.parents;g.active=!0,g.cursor=e,g.parents=[];try{return t()}finally{g.active=r,g.cursor=n,g.parents=o}}function Hi(e){if(!g.active)return e();let t=g.cursor,r=g.parents;g.active=!1,g.parents=[];try{return e()}finally{g.active=!0,g.cursor=t,g.parents=r}}function Wi(e){if(!g.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&Vi(t)}function ji(){let e=globalThis;return e[Symbol.for("fluixi.appHydration")]??={pending:0,waiting:new Set}}function Ki(){ji().pending++}function Fi(){let e=ji();if(e.pending>0&&e.pending--,e.pending>0)return;let t=[...e.waiting];e.waiting.clear();for(let r of t)r()}function Ui(e){let t=e;for(;t;){let r=t.contexts?.get(Vr);if(r)return r;if(!t.parent){let n={id:"",next:0};return(t.contexts??=new Map).set(Vr,n),n}t=t.parent}return{id:"",next:0}}function zi(){return I()?Pu()?.hydrationKeys!==!1:g.active}function _i(e){let t=3735928559,r=1103547991;for(let n=0;n<e.length;n++){let o=e.charCodeAt(n);t=Math.imul(t^o,2654435761),r=Math.imul(r^o,1597334677)}return t=Math.imul(t^t>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),(4294967296*(2097151&r)+(t>>>0)).toString(36)}function Mu(e){if(!zi())return null;let t=Ui(T()),r=t.id+(t.next++).toString(36);return e?`${_i(r)}-${e}`:_i(r)}function Lu(e){let t=e.getAttribute(He)??"",r=t.indexOf("-");return r<0?"":t.slice(r+1)}function Bi(e){let t=e.getAttribute(He);t&&K?.get(t)===e&&K.delete(t)}function Iu(){if(!zi())return;let e=T();if(!e)return;let t=Ui(e),r={id:t.id+(t.next++).toString(36)+".",next:0};(e.contexts??=new Map).set(Vr,r)}function Du(e){K??=new Map;for(let t of e.querySelectorAll(`[${He}]`)){let r=t.getAttribute(He);K.has(r)||K.set(r,t)}}function Br(){K=null}function Ji(e){if(!K)return 0;let t=0;for(let[r,n]of K){if(!n.isConnected){K.delete(r);continue}e&&!e.contains(n)||n.parentElement?.closest("[data-fx-ssr]")||(K.delete(r),n.remove(),t++)}return t}function qu(e,t){if(!e||!K)return null;let r=K.get(e);return!r||r.localName!==t.toLowerCase()?null:(K.delete(e),r)}function Mr(e,t){return t&&(e[Hu]=t),e}function Oi(e){let t=T();t&&(e[Wu]=t)}function ge(e){if(!I())for(let t of e)Tt.has(t)||Jr.has(t)||(Tt.add(t),Hr.dispatch??=Ku,document.addEventListener(t,Hr.dispatch))}function Ku(e){let t=`$$${e.type}`,r=e.composedPath&&e.composedPath()[0]||e.target;Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>r??document});try{for(;r;){let n=r[t];if(n&&!r.disabled&&(n(e),e.cancelBubble))return;r=r.host&&r.host!==r&&r.host instanceof Element?r.host:r.parentNode}}finally{delete e.currentTarget}}function Fu(e,t,r){if(e[`$$${t}`]=r,Jr.has(t)){let n=`__fx_${t}`;if(!e[n]){let o=s=>{e[`$$${t}`]?.(s)};e.addEventListener(t,o),e[n]=o}return}Tt.has(t)||ge([t])}function Ei(e,t){delete e[`$$${t}`];let r=`__fx_${t}`,n=e[r];n&&(e.removeEventListener(t,n),delete e[r])}function de(e,t=!1){if(I())return Fr().createText(e);if(g.active&&!t){let r=qr()?.hydrateText(e);if(r)return r}return document.createTextNode(e)}function Ee(e,t=!1,r){let n=Mu();if(I()){let o=Fr().createElement(e,t);return n&&o.setAttribute(He,n),o}if(g.active){let o=qu(n,e);if(o)return qr()?.enterElement(o),e.includes("-")&&Oi(o),r?Mr(o,r):o;let s=qr()?.hydrateElement(e);if(s)return e.includes("-")&&Oi(s),r?Mr(s,r):s}return Mr(t?document.createElementNS(zr,e):document.createElement(e),r)}function zu(e,t,r,n,o){let s=n,i=new Map,a=!1;return R(()=>{let u=a&&g.active;if(a=!0,!u)return c();g.active=!1;try{return c()}finally{g.active=!0}});function c(){J(r??t,"content",void 0,e);let u;if(ne(e)&&!L(e)){if(!i.has(e)){re++;try{let f=e();i.set(e,f)}finally{re--}}for(u=i.get(e);typeof u=="function"&&L(u);)u=u()}else for(u=e();typeof u=="function"&&L(u);)u=u();{let f=0;for(;typeof u=="function"&&f++<50;)if(ne(u)){if(!i.has(u)){let l=u;re++;try{let d=l();i.set(l,d)}finally{re--}}u=i.get(u)}else if(L(u))u=u();else if(u=u(),typeof u!="function"||!L(u)&&!ne(u))break}re++;try{s=Ct(t,u,r,s,i),o(s)}finally{re--}}}function V(e,t,r,n){if(re>Uu)return console.error("[insert] Exceeded max call depth, possible infinite loop."),()=>null;r!==void 0&&!r&&(r=de("",!0),e.appendChild(r));let o=n??null,s=c=>Array.isArray(c)&&c.some(u=>typeof u=="function"),i=c=>typeof c=="function"?c:()=>c;if(typeof t!="function"&&!s(t)){re++;try{o=Ct(e,t,r,o)}finally{re--}return()=>o}let a=zu(i(t),e,r,o,c=>{o=c});return()=>(a?.(),o)}function Ct(e,t,r,n,o){if(t==null||typeof t=="boolean")return le(e,n,r);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return le(e,n,r);if(Et(t)){let i=de("",!0);return Array.isArray(n)?n.length>0?(e.replaceChild(i,n[0]),le(e,n.slice(1),r)):W(e,i,r):n?e.replaceChild(i,n):W(e,i,r),t.then(a=>{i.parentNode===e&&Ct(e,a,i.nextSibling,i)}).catch(a=>{console.error("Error resolving promise in insertExpression:",a)}),i}let s=typeof t;if(s==="string"||s==="number"){if(s==="number"&&(t=String(t)),Array.isArray(n)){if(n.length===0){let a=de(t);return W(e,a,r),a}if(n.length===1&&n[0].nodeType===3)return n[0].data=t,n;n=le(e,n,r)}if(n&&gu(n))return n.data=t,n;let i=de(t);return n&&n.parentNode===e?e.replaceChild(i,n):ki(e,i)||W(e,i,r),i}if(Ur(t))return ki(e,t)?(Vi(t),t):Array.isArray(n)?(n.length===0?W(e,t,r):n[0].parentNode===e?(e.replaceChild(t,n[0]),le(e,n.slice(1),r)):W(e,t,r),t):(n?n!==t&&(n.parentNode===e?e.replaceChild(t,n):W(e,t,r)):W(e,t,r),t);if(Array.isArray(t)){let i=[],a=Array.isArray(n)?n:n?[n]:[],c=[],u=new Set,f=()=>te(t,i,e,r,!0,o,c,u);g.active&&a.length?Nu(a[0],f):f();let l=Bu(e,u.size?a.filter(d=>!u.has(d)):a,i,r);for(let d of c){if(d.wired)continue;let h=V(e,d.sig,d.marker);A(()=>{le(e,h()),d.marker.parentNode===e&&e.removeChild(d.marker)})}return l}if(s==="object"&&t!==null&&typeof t=="object"){let i=t;if("type"in i&&"props"in i){let a=i;if(typeof a.type=="function"){let c=a.type(a.props||{});return Ct(e,c,r,n)}}}return le(e,n,r)}function te(e,t,r,n,o=!0,s,i,a){for(let c=0;c<e.length;c++){let u=e[c];if(!(u==null||typeof u=="boolean")){for(;typeof u=="function"&&!Et(u)&&!L(u)&&!ne(u)&&(u=u(),!(u==null||typeof u=="boolean")););if(!(u==null||typeof u=="boolean")){if(typeof u=="function"){let f;for(ne(u)&&!L(u)?(s||(s=new Map),s.has(u)||s.set(u,u()),f=s.get(u)):f=u();typeof f=="function"&&!Et(f)&&!L(f)&&!ne(f);)s||(s=new Map),s.has(f)||s.set(f,f()),f=s.get(f);if(f==null||typeof f=="boolean")continue;if(typeof f=="function"){if(L(f)){if(i){let d=de("",!0);if(t.push(d),g.active&&a){let h=()=>g.cursor&&g.cursor.parentNode===r?g.cursor:null;r.insertBefore(d,h());let y=V(r,f,d),p=y();for(let v of Array.isArray(p)?p:p?[p]:[])a.add(v);r.insertBefore(d,h()),A(()=>{le(r,y()),d.parentNode===r&&r.removeChild(d)}),i.push({marker:d,sig:f,wired:!0});continue}i.push({marker:d,sig:f});continue}let l=f();for(;typeof l=="function"&&L(l);)l=l();if(l==null||typeof l=="boolean")continue;Array.isArray(l)?te(l,t,r,n,o,s):te([l],t,r,n,o,s);continue}continue}Array.isArray(f)?te(f,t,r,n,o,s,i,a):te([f],t,r,n,o,s,i,a);continue}if(Et(u)){let f=de("",!0);t.push(f),u.then(l=>{if(f.parentNode){let d=[];if(te([l],d,f.parentNode,void 0,!1,s),d.length>0){f.parentNode.replaceChild(d[0],f);for(let h=1;h<d.length;h++)f.parentNode?.insertBefore(d[h],d[h-1].nextSibling)}}}).catch(l=>console.error("Error resolving promise in array:",l));continue}if(Array.isArray(u)){te(u,t,r,n,o,s,i,a);continue}if(Ur(u)){t.push(u);continue}if(typeof u=="object"&&u!==null&&"type"in u&&"props"in u){let f=u;if(typeof f.type=="function"){let l=f.type(f.props||{});Array.isArray(l)?te(l,t,r,n,!1,s):te([l],t,r,n,!1,s);continue}}if(typeof u=="string"||typeof u=="number"){let f=String(u);if(f.trim()===""&&f!==" ")continue;t.push(de(f));continue}t.push(de(String(u)))}}}}function Bu(e,t,r,n){for(let l=0;l<r.length;l++){let d=r[l].parentNode;d!==null&&d!==e&&d.nodeType!==11&&(r=r.slice(),r[l]=r[l].cloneNode(!0))}let o=r.length,s=t.length,i=o,a=0,c=0,u=s>0?t[s-1].nextSibling??void 0:n,f=null;for(;a<s||c<i;){if(t[a]===r[c]){a++,c++;continue}for(;s>a&&i>c&&t[s-1]===r[i-1];)s--,i--;if(s===a){let l=i<o?c?r[c-1].nextSibling??void 0:r[i-c]:u;for(;c<i;)W(e,r[c++],l)}else if(i===c)for(;a<s;)(!f||!f.has(t[a]))&&t[a].parentNode===e&&e.removeChild(t[a]),a++;else if(t[a]===r[i-1]&&r[c]===t[s-1]){let l=t[--s].nextSibling;W(e,r[c++],t[a++].nextSibling),W(e,r[--i],l),t[s]=t[a-1]}else{if(!f){f=new Map;let d=c;for(;d<i;)f.set(r[d],d++)}let l=f.get(t[a]);if(l!=null)if(c<l&&l<i){let d=a,h=1;for(;++d<s&&d<i&&!(!f.has(t[d])||f.get(t[d])!==l+h);)h++;if(h>l-c){let y=t[a];for(;c<l;)W(e,r[c++],y)}else t[a].parentNode===e?e.replaceChild(r[c++],t[a++]):(W(e,r[c++],u),a++)}else a++;else t[a].parentNode===e&&e.removeChild(t[a]),a++}}return r}function le(e,t,r){if(t)if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n].parentNode===e&&e.removeChild(t[n]);else t.parentNode===e&&e.removeChild(t);return null}function W(e,t,r){g.active&&t.parentNode===e||(r&&r.parentNode===e?e.insertBefore(t,r):e.appendChild(t))}function me(e,t,r){r==null?delete e[t]:e[t]=r}function Yi(e,t,r){let n=r,o;return Array.isArray(r)&&(n=r[0],o=r[1]),typeof n!="function"?()=>{}:(e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o))}function Gi(e,t){if(!t||typeof t!="function")return;let r=t[Xi]?.name;if(!r)return;let n=r.indexOf(":");n!==-1&&X(e,r.slice(0,n),r.slice(n+1),t)}function Rt(e,t,r){let n=typeof r=="function"?E(()=>r()):r;if(!(!n||typeof n!="object"))for(let o of Object.keys(n))X(e,t,o)}function Zi(e,t){let r=(n,o)=>{typeof n=="function"&&(X(e,"use",n.name||"use",o),n(e,o??(()=>{})))};if(typeof t=="function"){r(t);return}if(Array.isArray(t)){if(typeof t[0]=="function"){r(t[0],t[1]);return}for(let n of t)Array.isArray(n)?r(n[0],n[1]):r(n)}}function Wr(e,t,r,n=!1){return Gi(e,r),typeof r!="function"?(C(e,t,r,n),()=>{}):R(()=>{J(e,"attribute",t,r);let o=typeof r=="function"?r():r;C(e,t,o,n)})}function jr(e,t,r){return typeof r!="function"?(me(e,t,r),()=>{}):(Gi(e,r),R(()=>{J(e,"property",t,r);let n=typeof r=="function"?r():r;me(e,t,n)}))}function Qi(e,t,r){return typeof r!="function"?(C(e,t,!!r),()=>{}):R(()=>{J(e,"attribute",t,r);let n=r();C(e,t,!!n)})}function Pt(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){R(()=>{J(e,"attribute","class",t),Pt(e,t())});return}if(typeof t=="string"){e.setAttribute("class",t);return}if(Array.isArray(t)){e.setAttribute("class",t.filter(Boolean).join(" "));return}if(typeof t=="object"){let r=Object.keys(t).filter(n=>{let o=t[n];return typeof o=="function"?o():!!o}).join(" ");e.setAttribute("class",r);return}e.setAttribute("class",String(t))}function $t(e,t,r){if(!(!t||typeof t!="object"))for(let n in t){let o=t[n],s=n.split(/\s+/).filter(Boolean);if(typeof o=="function"&&r)r.push(R(()=>{let i=!!o();for(let a of s)e.classList.toggle(a,i)}));else{let i=!!(typeof o=="function"?o():o);for(let a of s)e.classList.toggle(a,i)}}}function Nt(e,t){let r=t;for(;typeof r=="function";)r=r();if(r==null){e.removeAttribute("style");return}if(typeof r=="string"){e.style.cssText=r;return}if(typeof r=="object")for(let n in r){let o=r[n];o==null?e.style[n]="":e.style[n]=o}}function es(e){let{element:t,props:r,prevProps:n=Vu,isSVG:o=!1,skipChildren:s=!1,isCustomElement:i,accessors:a}=e;if(!t||!mu(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!r)return console.warn("[spread] Warning: props is undefined!"),()=>{};let c=o||t.namespaceURI===zr,u=[];for(let f in r){if(s&&f==="children")continue;let l=r[f],d=n[f];if(l===d)continue;if(f==="ref"){Xr(l,t);continue}if(f==="use"){Zi(t,l);continue}if(f.startsWith("on:")){u.push(Yi(t,f.slice(3),l));continue}if(f.startsWith("prop:")){X(t,"prop",f.slice(5),l),u.push(jr(t,f.slice(5),l));continue}if(f.startsWith("attr:")){X(t,"attr",f.slice(5),l),u.push(Wr(t,f.slice(5),l,c));continue}if(f.startsWith("bool:")){X(t,"bool",f.slice(5),l),u.push(Qi(t,f.slice(5),l));continue}if(f==="class"||f==="className"){typeof l=="function"?u.push(R(()=>{J(t,"attribute","class",l),Pt(t,l())})):Pt(t,l);continue}if(f==="classList"){Rt(t,"class",l),typeof l=="function"?u.push(R(()=>{J(t,"attribute","class",l),$t(t,l())})):$t(t,l,u);continue}if(f==="style"){Rt(t,"style",l),typeof l=="function"?u.push(R(()=>{J(t,"attribute","style",l),Nt(t,l())})):Nt(t,l);continue}if(f.startsWith("on")){let v=f.slice(2).toLowerCase();d&&Ei(t,v),l&&Fu(t,v,l);continue}let h=i??t.localName.includes("-"),y=xi.has(f)||!c&&f in t||h&&!c&&!Nr(f);if(h&&!c&&!Nr(f)&&a!==void 0&&typeof l=="function"&&!a.includes(f)){I()?Dr(t,f,l):me(t,f,l);continue}if(h&&!c&&!Nr(f)&&I()){u.push(R(()=>{let v=typeof l=="function"?l():r[f];for(;typeof v=="function"&&v.length===0;)v=v();Dr(t,f,v)}));continue}typeof l=="function"?u.push(y?jr(t,f,l):Wr(t,f,l,c)):u.push(R(()=>y?me(t,f,r[f]):C(t,f,r[f],c)))}for(let f in n)if(!(f in r))if(f.startsWith("on")){let l=f.slice(2).toLowerCase();Ei(t,l)}else xi.has(f)?me(t,f,null):t.removeAttribute(f);return()=>{u.forEach(f=>f())}}function Ju(e,t,r=!1){for(let n in t){let o=t[n];if(n==="ref"){Xr(o,e);continue}if(n!=="children"){if(n==="use"){Zi(e,o);continue}if(n.startsWith("on:")){Yi(e,n.slice(3),o);continue}if(n.startsWith("prop:")){X(e,"prop",n.slice(5),o),jr(e,n.slice(5),o);continue}if(n.startsWith("attr:")){X(e,"attr",n.slice(5),o),Wr(e,n.slice(5),o,r);continue}if(n.startsWith("bool:")){X(e,"bool",n.slice(5),o),Qi(e,n.slice(5),o);continue}if(n.startsWith("on")&&n.length>2){let s=n.slice(2).toLowerCase();if(typeof o=="function")if(Jr.has(s)){e[`$$${s}`]=o;let i=`__fx_${s}`;if(!e[i]){let a=c=>{e[`$$${s}`]?.(c)};e.addEventListener(s,a),e[i]=a}}else e[`$$${s}`]=o,Tt.has(s)||ge([s]);continue}if(n==="class"||n==="className"){Pt(e,o);continue}if(n==="classList"){Rt(e,"class",o),typeof o=="function"?R(()=>{J(e,"attribute","class",o),$t(e,o())}):$t(e,o);continue}if(n==="style"){Rt(e,"style",o),typeof o=="function"?R(()=>{J(e,"attribute","style",o),Nt(e,o())}):Nt(e,o);continue}if(n==="innerHTML"){if(typeof o=="function"){let s=_(()=>{let i=o();for(;typeof i=="function";)i=i();e.innerHTML=i});A(()=>s())}else e.innerHTML=o;continue}if(n==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof o=="function"){let s=_(()=>{let i=o();for(;typeof i=="function"&&i.length===0;)i=i();document.activeElement!==e&&(e.value=i??"")});A(()=>{s()})}else R(()=>{document.activeElement!==e&&(e.value=t[n]??"")});continue}if(n==="checked"&&e.tagName==="INPUT"){if(typeof o=="function"){let s=_(()=>{let i=o();for(;typeof i=="function"&&i.length===0;)i=i();document.activeElement!==e&&(e.checked=i??"")});A(()=>{s()})}else R(()=>{document.activeElement!==e&&(e.checked=t[n]??"")});continue}if(n==="value"&&e.tagName==="SELECT"){if(typeof o=="function"){let s=!0,i=_(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();s?(s=!1,queueMicrotask(()=>{e.value=a??""})):e.value=a??""});A(()=>{i()})}else{let s=!0;R(()=>{let i=t[n];s?(s=!1,queueMicrotask(()=>{e.value=i??""})):e.value=i??""})}continue}if(typeof o=="function"){let s=_(()=>{let i=o();for(;typeof i=="function"&&i.length===0;)i=i();Ai(e,n,i,r)});A(()=>{s()})}else R(()=>Ai(e,n,t[n],r))}}}function Xr(e,t){if(!e)return;let r=e[Xi]?.name;if(X(t,"ref",r||typeof e=="function"&&e.name||"ref",e),Ur(e)){let n=t,o=e;if(!n)return;typeof n=="function"?n(o):typeof n=="object"&&"current"in n&&(n.current=o);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}function Xu(e){return e==="svg"||e==="path"||e==="circle"||e==="rect"||e==="line"||e==="polygon"||e==="polyline"||e==="ellipse"||e==="g"||e==="defs"||e==="clipPath"||e==="text"}function Et(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function Yr(e,t,r){if(!t)throw new Error("Container element is required");let n,o,s=[];return D(i=>{N(()=>{g.active||(t.textContent=""),It(t),Dt(),V(t,e)}),o=i}),()=>{o?.(),n?.(),s.forEach(i=>i()),t.textContent=""}}function z(e,t){if(Iu(),Ti.fn)return Ti.fn(e,t);t&&li(t);let r=typeof e=="function"?hi(()=>e(t)):e,n=r!=null&&(typeof r=="function"||typeof r=="object");if(n)try{r.$name=e?.name}catch{}return n&&!mi(r)?Ke(r):r}function Gr(){let e=globalThis.__FX_DATA__;if(e&&typeof e.nodeType!="number")return e;if(Lr!==void 0)return Lr;let t=null;if(typeof document<"u"){let r=document.getElementById(Gu)?.textContent;if(r)try{t=JSON.parse(r)}catch{t=null}}return Lr=t}function qt(){for(;;){for(;g.cursor&&g.cursor.nodeType===3&&g.cursor.data==="";)g.cursor=g.cursor.nextSibling;if(g.cursor!=null||!g.parents.length)return;g.cursor=g.parents.pop().nextSibling}}function je(e,t){let r=t.nodeType===1?`<${t.tagName.toLowerCase()}>`:t.nodeType===3?`text ${JSON.stringify((t.nodeValue??"").slice(0,24))}`:t.nodeType===8?"comment":"node";console.warn(`[fluixi] hydration mismatch: expected ${e} but the server DOM has ${r}. Server and client rendered different markup; recreating this node on the client. Check for non-deterministic render (Date.now(), Math.random(), browser-only branches, untransported data).`)}function rs(e){return e.localName.includes("-")?e.hasAttribute("data-fx-ssr")||e[Zu]===!0:!1}function Qu(e){qt();let t=g.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(Bi(t),ts.has(e.toLowerCase())||rs(t)?g.cursor=t.nextSibling:(g.parents.push(t),g.cursor=t.firstChild),t):(We&&t&&je(`<${e}>`,t),null)}function ef(e){ts.has(e.localName)||rs(e)?g.cursor=e.nextSibling:(g.parents.push(e),g.cursor=e.firstChild)}function tf(e,t){qt();let r=g.cursor;if(r&&r.nodeType===1&&r.tagName.toLowerCase()===e.toLowerCase()){let n=Lu(r);return t&&n&&n!==t?(We&&je(`<${e}> (another template)`,r),null):(Bi(r),g.cursor=r.nextSibling,r)}return We&&r&&je(`<${e}> (static)`,r),null}function rf(e){if(e===""){let r=g.cursor;return r&&r.nodeType===3&&r.data!==""?(g.cursor=r.nextSibling,r.data="",r):null}qt();let t=g.cursor;return t&&t.nodeType===3?(g.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(We&&t&&je(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function nf(e){qt();let t=g.cursor;return t&&t.nodeType===8&&t.data===e?(g.cursor=t.nextSibling,t):(We&&t&&je(`marker <!--${e.slice(0,24)}-->`,t),null)}function of(){Ci||(Ci=!0,$u({hydrateElement:Qu,hydrateText:rf,hydrateMarker:nf,hydrateStatic:tf,enterElement:ef}))}function Vt(e,t,r){of(),g.active=!0,g.cursor=t.firstChild,g.parents=[],Br(),Du(t);let n=Gr(),o=r?.resourceNamespace,s=0;uo(()=>o?`${o}:r${s++}`:`r${s++}`),co(n?i=>i in n?{value:n[i]}:void 0:null);try{return Yr(e,t)}finally{g.active=!1,g.cursor=null,g.parents=[]}}function ns(e,t={}){if(typeof e=="function")return z(e,t);if(typeof e!="string"||e.length===0)return null;let r=Xu(e);if(I())return Fr().createElement(e,r);let n=r?document.createElementNS(zr,e):document.createElement(e);return Ju(n,t,r),sf(n,t),n}function sf(e,t){if(!t||t.children===void 0)return;let r=De(()=>t.children),n=o=>{V(e,o,typeof o=="function"?null:void 0)};Array.isArray(r)?r.forEach(n):n(r)}function af(e){return typeof e=="function"?e:(()=>e)}function Ht(e){return()=>{let t=e();return typeof t=="function"?t():t}}function cf(e){return e!=null&&e!==!1}function uf(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}function os(e){let t=Ht(()=>e.when),r=w(t,void 0,{name:"Show.when"}),n=w(r,void 0,{name:"Show.cond"}),o=T(),s=null,i=null,a=c=>{c!==i&&(s&&Se(s),s=be(o),i=c)};return w(()=>{let c=n();return a(c?"when":"fallback"),$(s,()=>{if(c){let u=e.children;return typeof u=="function"&&!uf(u)?typeof r=="function"?E(()=>E(r)?u(r()):e.fallback):u(r):u}return e.fallback});return e.fallback??null},void 0,{name:"Show.result"})}function is(e){let t=Ht(()=>e.each),r=()=>e.fallback??null,n=(o,s)=>{let i=e.children,a=Array.isArray(i)?i.map(c=>typeof c=="function"?c(o,s):c):typeof i=="function"?i(o,s):i;return Wi(a),a};return e.by?so(t,e.by,(o,s)=>n(o,s),{fallback:r}):io(t,(o,s)=>n(o,s),{fallback:r})}function ss(e){let t=Ht(()=>e.each);return ao(t,(r,n)=>{let o=e.children(r,n);return Wi(o),o},{fallback:()=>e.fallback??null})}function as(e){return{[Kr]:!0,when:Ht(()=>e.when),get children(){return e.children}}}function cs(e){let t=Array.isArray(e.children)?e.children:[e.children],r=T(),n=null,o=-1,s=i=>{i!==o&&(n&&Se(n),n=be(r),o=i)};return w(()=>{for(let i=0;i<t.length;i+=1){let c=t[i],u=0;for(;typeof c=="function"&&!c[Kr]&&u++<10;)c=c();if(!c||typeof c!="object"||c[Kr]!==!0)continue;let f=c.when();if(cf(f))return s(i),$(n,()=>typeof c.children=="function"?c.children(f):c.children)}return s(-2),$(n,()=>e.fallback??null)},void 0,{name:"Switch"})}function us(e){let t=af(e.component),{component:r,...n}=e,o=T(),s=null,i;return w(()=>{let a=t();return a!==i&&(s&&Se(s),s=be(o),i=a),a==null?null:typeof a=="string"?{tag:a,props:n}:$(s,()=>a(n))},void 0,{name:"Dynamic"})}function fs(e){let t=()=>e.mount?typeof e.mount=="function"?e.mount():e.mount:document.body,r,n;return D(o=>{r=o,n=document.createElement("div"),n.style.display="contents",t().appendChild(n),V(n,e.children)&&Xr(e.ref,n)}),A(()=>{r(),n.remove()}),null}function Zr(e){if(I())return e.fallback??null;let t=g.active,[r,n]=b(!t);return t&&queueMicrotask(()=>n(!0)),w(()=>r()?e.children:e.fallback??null,void 0,{name:"client-only"})}function ds(e){let t=go(),r=i=>!!i&&typeof i.then=="function",n=i=>typeof e.fallback=="function"?e.fallback(i,t.reset):e.fallback,o=i=>{if(r(i))throw i;return queueMicrotask(()=>t.setError(i)),null},s=i=>{if(Array.isArray(i))return i.map(s);if(typeof i!="function")return i;let a=i;return()=>{try{return s(a())}catch(c){return o(c)}}};return w(()=>{let i=t.error();if(i!==void 0)return n(i);try{return vo(t,()=>s(typeof e.children=="function"?e.children():e.children))}catch(a){return o(a),n(a)}},void 0,{name:"ErrorBoundary"})}function ps(e){return w(()=>{let t=typeof e=="function"?e():e,r=[];for(let[n,o]of Object.entries(t)){if(!n)continue;(typeof o=="function"?o():o)&&r.push(n)}return r.join(" ")},void 0,{name:"ClassMap"})}function ff(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function ys(e){return w(()=>{let t=typeof e=="function"?e():e,r=[];for(let[n,o]of Object.entries(t)){if(!n)continue;let s=typeof o=="function"?o():o;s!=null&&r.push(`${ff(n)}: ${s}`)}return r.join("; ")},void 0,{name:"StyleMap"})}var Mt,yu,hu,Ir,zr,wu,xi,bu,Hl,Su,j,Ot,Cu,Ru,zl,Bl,g,qi,Vr,He,K,Vu,Xi,Hu,Wu,ju,Hr,Tt,Jr,re,Uu,Yu,Ti,Gu,Lr,ts,We,Zu,Ci,Kr,ls,lf,M=F(()=>{"use strict";x();Xo();x();x();x();Si();x();x();x();x();x();x();x();x();x();x();x();x();Mt=Symbol.for("fluixi.server-node"),yu=Symbol.for("fluixi.dom.server-host"),hu=globalThis,Ir=hu[yu]??={server:typeof document>"u",nodes:null};zr="http://www.w3.org/2000/svg";wu=Symbol.for("fluixi.serverProps");xi=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]),bu=new Set(["id","class","className","style","slot","part","exportparts","is","title","role","lang","dir","tabindex","hidden"]);Hl=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;Su="1.0.0-alpha.93",j={dom:Su,reactive:Jo};Cu={getStore:()=>Ot,run(e,t){let r=Ot;Ot=e;try{return t()}finally{Ot=r}}},Ru=Cu;zl=globalThis[Symbol.for("fluixi.requestLocals")]??=new WeakMap,Bl=globalThis[Symbol.for("fluixi.responseHeaders")]??=new WeakMap,g={active:!1,cursor:null,parents:[]},qi=null;Vr=Symbol.for("fluixi.hydrationKeys"),He="data-hk";K=null;Vu={},Xi="__fx_at",Hu="__fx_loc";Wu=Symbol.for("fluixi.owner");ju="__fluixi_delegated_events__",Hr=globalThis[ju]??={names:new Set},Tt=Hr.names,Jr=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);re=0,Uu=200;Yu="__fx_dom_create_component__",Ti=globalThis[Yu]??={fn:null};Gu="__FX_DATA__";ts=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),We=typeof process<"u"&&process.env&&!1;Zu=Symbol.for("fluixi.ownsContent");Ci=!1;Kr=Symbol("match");ls=Zr;lf=Mt});function ws(e){if(e!=null&&(typeof e=="object"||typeof e=="function"))try{e.$lazy=!0}catch{}return e}function Ce(e,t){let r,n,o;function s(){return n||(n=e().then(a=>r=a.default)),n}t?.preload&&s();let i=(a=>{if(r){let c=r;return ws(E(()=>c(a)))}if(!o){let[c]=ae(()=>s(),{transport:!1});if(o=c,c.error)throw c.error}return w(()=>{let c=o();return c?ws(z(c,a)):void 0})});return i.preload=()=>s().then(()=>{}),i.$lazy=!0,i.loader=e,i}var Jt=F(()=>{"use strict";M();x()});function Be(e,t){let r=Y(e,t),n=o=>r.Provider({value:o.value,get children(){return o.children},debug:o.debug});return{id:r.id,Provider:Li(n),defaultValue:e}}function Je(e){let t=q(e);return t!==void 0?t:e.defaultValue}function on(e,t,r){let n=typeof t=="function"?t():t;return e.Provider({value:n,get children(){return r.children}})}function ks(e,t){return e.reduceRight((n,[o,s])=>({get children(){return on(o,s,n)}}),t).children}function _s(e,t){for(let r=T();r;r=r.parent)if(r.contexts?.has(e.id))return Je(e);throw new Error(t??`[fluixi] No Provider for ${e.id.description??"this context"} above this component.`)}var sn=F(()=>{"use strict";M();x()});function yn(){return typeof document<"u"&&typeof document.startViewTransition=="function"}function hn(){if(typeof window>"u"||typeof window.matchMedia!="function")return!1;try{return window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}function Uf(e){return e!=="none"&&yn()&&!hn()}function Vs(e){let t=[];for(let r of e){let n=r?.preload;if(typeof n=="function")try{let o=n();o&&typeof o.then=="function"&&t.push(o.catch(()=>{}))}catch{}}return t.length?Promise.all(t).then(()=>{}):null}function mn(e,t){if(!Uf(e))return Promise.resolve(t()).then(()=>{});let r=document.startViewTransition;try{let n=r.call(document,()=>t());return n.finished?.catch(()=>{}),n.ready?.catch(()=>{}),n.updateCallbackDone.catch(()=>{})}catch{return Promise.resolve(t()).then(()=>{})}}var gn=F(()=>{"use strict"});function Yt(e,t,r={}){let{preserveStructure:n,multiple:o,throwOnError:s=!1,defaultValue:i,maxDepth:a=20}=r;if(!e||typeof e!="object")return i;if(!t)return e;if(Array.isArray(t))if(n){let f={};for(let l of t){let d=Yt(e,l,{...r,preserveStructure:!1});d!==void 0&&Bf(f,l,d)}return f}else return t.map(f=>Yt(e,f,{...r,preserveStructure:!1}));let c=vn(t,{...r,throwOnError:s});if(c.length===0)return e;if(typeof n>"u"||n===!1){let f=Jf(e,t);return o===!1&&Array.isArray(f)?f[0]:f===void 0&&i!==void 0?i:f}let u=B(e,c,0,a);return u===void 0&&i!==void 0?i:u}function Jf(e,t,r={}){let{createMissing:n=!1,add:o=!1,debug:s=!1}=r,i=vn(t),a=e,c=!1,u="",f=t;if(typeof a=="object"&&!Array.isArray(a)&&f.length>0&&a[f])return a=a[f],a;for(let l=0;l<i.length;l++){let d=i[l],h=i.length>1?l===i.length-1:!1;if(a===null&&!n)return;let y=i[l+1];switch(d.type){case"property":if(a&&typeof a=="object")if(Array.isArray(a)){if(typeof d.value=="number"){let p=d.value;if(n&&p>=a.length)for(let v=a.length;v<=p;v++)a.push(void 0);if(n&&(a[p]===null||a[p]===void 0)&&(!h||c)&&(y?a[p]=y.type==="index"||y.type==="slice"||y.type==="union"||y.type==="wildcard"?[]:{}:a[p]=null,c=!1),a=a[p],y){c=!0;continue}}else o?a.push({[String(d.value)]:null}):a=a.map(p=>p[String(d.value)]);if(y)continue;return Hs(a)}else{if(a[u]&&u.split(".").length>=2){a=a[u];continue}if(n&&(a[String(d.value)]===null||a[String(d.value)]===void 0)&&(!h||c)&&(y?a[String(d.value)]=y.type==="index"||y.type==="slice"||y.type==="union"||y.type==="wildcard"?[]:{}:a[String(d.value)]=null,c=!1,a=a[String(d.value)],y)){c=!0;continue}if(a?(!a[String(d.value)]&&n&&(a[String(d.value)]=null),a=a[String(d.value)]):a={[String(d.value)]:null},y)continue}else if(n)a={},a[String(d.value)]=y.type==="index"||y.type==="slice"||y.type==="union"||y.type==="wildcard"||r.type==="array"?[]:{},a=a[String(d.value)];else return;break;case"index":case"wildcard":if(Array.isArray(a)){if(d.type==="index"){let p=d.value;if(p<0){a=a[a.length-Math.abs(p)];continue}if(n&&(p>=a.length||a[p]==null||a[p]==null)&&!h){for(let v=a.length;v<=p;v++)a.push(void 0);y&&(a[p]=y.type==="index"||y.type==="slice"||y.type==="union"||y.type==="wildcard"?[]:{})}a=a[p]}else if(!h)continue}else if(n){let p=i[l+1];a=[];let v=d.value;for(let S=0;S<=v;S++)a.push(void 0);a[v]=p.type==="index"||p.type==="slice"||p.type==="union"||p.type==="wildcard"||r.type==="array"?[]:{},a=a[v]}else{if(d.type==="index"&&typeof a=="object"&&a&&a[String(d.value)]!==void 0){a=a[String(d.value)];continue}if(typeof a=="object"){a=Object.values(a);continue}return}break;default:return}}return Hs(a)}function Hs(e){return Array.isArray(e)?e.filter(t=>typeof t<"u"):e}var Gt,B,vn,zf,Bf,wn=F(()=>{"use strict";Gt=e=>e==null||Array.isArray(e)||typeof e=="function"||e instanceof Date||e instanceof RegExp||e instanceof Map||e instanceof Set||e instanceof Error?!1:typeof e=="object",B=(e,t,r,n)=>{if(r>n)return;if(t.length===0)return e;let o=t[0],s=t.slice(1);if(o.type==="descendant"){let i=B(e,s,r+1,n);if(i!==void 0)return i;if(e&&typeof e=="object")if(Array.isArray(e)){let a=[];for(let c=0;c<e.length;c++){let u=B(e[c],t,r+1,n);u!==void 0&&(a[c]=u)}return a.length>0?a:void 0}else{let a={};for(let c in e)if(e.hasOwnProperty(c)){let u=B(e[c],t,r+1,n);u!==void 0&&(a[c]=u)}return Object.keys(a).length>0?a:void 0}return}switch(o.type){case"property":if(Gt(e)&&o.value&&String(o.value)in e){let i=e[String(o.value)],a=B(i,s,r+1,n);if(a!==void 0)return{[String(o.value)]:a}}break;case"index":if(Array.isArray(e)){let i=o.value;if(i>=0&&i<e.length){let a=B(e[i],s,r+1,n);if(a!==void 0){let c=new Array(e.length).filter(u=>u!==void 0);return c[i]=a,c}}}else if(e&&typeof e=="object"){let i=String(o.value);if(i in e){let a=B(e[i],s,r+1,n);if(a!==void 0)return{[i]:a}}}break;case"wildcard":if(e&&typeof e=="object")if(Array.isArray(e)){let i=[],a=!1;for(let c=0;c<e.length;c++){let u=B(e[c],s,r+1,n);u!==void 0&&(i[c]=u,a=!0)}return a?i:void 0}else{let i={},a=!1;for(let c in e)if(e.hasOwnProperty(c)){let u=B(e[c],s,r+1,n);u!==void 0&&(i[c]=u,a=!0)}return a?i:void 0}break;case"slice":if(Array.isArray(e)){let[i,a]=o.value,c=Math.max(0,i),u=Math.min(e.length,a===1/0?e.length:a),f=[],l=!1;for(let d=c;d<u;d++){let h=B(e[d],s,r+1,n);h!==void 0&&(f[d]=h,l=!0)}return l?f:void 0}break;case"union":if(Array.isArray(e)){let i=o.value,a=[],c=!1;for(let u of i)if(u>=0&&u<e.length){let f=B(e[u],s,r+1,n);f!==void 0&&(a[u]=f,c=!0)}return c?a:void 0}break;case"filter":if(Array.isArray(e)){let i=o.value,a=[],c=!1;for(let u=0;u<e.length;u++)if(i(e[u])){let f=B(e[u],s,r+1,n);f!==void 0&&(a[u]=f,c=!0)}return c?a:void 0}break}},vn=(e,t={})=>{let{type:r="auto",throwOnError:n=!1}=t;if(!e||typeof e!="string")return[];let o=[],s="",i=!1,a=!1,c="",u="",f=0,d=r==="auto"?(y=>y.includes("..")?"descendant":y.includes("[?(")?"filter":y.includes("[:")||y.includes("[0:")?"slice":y.includes("[,")||y.includes("[0,1]")?"union":y.includes("[*]")||y.includes(".*.")?"wildcard":y.includes("[]")?"array-wildcard":y.includes("[")&&y.includes("]")?"bracket":"dot")(e):r,h=y=>{let p=y.trim();if(p==="*"||p==="")return{type:"wildcard",value:p===""?"[]":"*",raw:p===""?"[]":y};if(p==="[]")return{type:"wildcard",value:"[]",raw:y};if(/^-?\d+$/.test(p))return{type:"index",value:parseInt(p,10),raw:y};if(p.includes(":")){let v=p.split(":").map(Q=>Q.trim()),S=v[0]===""?0:parseInt(v[0],10),k=v[1]===""?1/0:parseInt(v[1],10);if(isNaN(S)||isNaN(k)){if(n)throw new Error(`Invalid slice notation: ${y}`);return{type:"wildcard",value:"*",raw:y}}return{type:"slice",value:[S,k],raw:y}}if(p.includes(",")){let v=p.split(",").map(S=>{let k=parseInt(S.trim(),10);return isNaN(k)?-1:k}).filter(S=>S>=0);if(v.length===0){if(n)throw new Error(`Invalid union notation: ${y}`);return{type:"wildcard",value:"*",raw:y}}return{type:"union",value:v,raw:y}}if(p.startsWith("?(")&&p.endsWith(")")){let v=p.slice(2,-1);try{return{type:"filter",value:zf(v),raw:y}}catch(S){if(n)throw S;return{type:"wildcard",value:"*",raw:y}}}return p.startsWith('"')&&p.endsWith('"')||p.startsWith("'")&&p.endsWith("'")?{type:"property",value:p.slice(1,-1),raw:y}:{type:"property",value:p,raw:y}};for(let y=0;y<e.length;y++){let p=e[y],v=e[y+1];if((p==='"'||p==="'")&&!a){a=!0,c=p;continue}else if(p===c&&a){a=!1,c="",p==='"'||p==="'"||(i?u+=p:s+=p);continue}if(a){i?u+=p:s+=p;continue}if(p==="["&&!i){s&&(o.push({type:"property",value:s,raw:s}),s=""),i=!0,u="";continue}if(p==="]"&&i&&!a){i=!1;let k=h(u);o.push(k);continue}let S=o.length>0?o[o.length-1]:null;if(p==="."&&!i&&!a){if(v==="."){let k=e.split("..")[0];o.push({type:"property",value:k,raw:k}),o.push({type:"descendant",value:"..",raw:".."}),y++}else s&&(s==="*"?o.push({type:"wildcard",value:s,raw:s}):o.push({type:"property",value:s,raw:s}),s="");continue}if(i)u+=p;else if(S&&S.type!=="descendant")s+=p;else{let k=e.split(S?.raw)[1];k!==void 0?s=k:s+=p}}return s&&o.push({type:"property",value:s,raw:s}),o.map(y=>{if(y.type==="property"&&typeof y.value=="string"&&/^-?\d+$/.test(y.value)){let p=parseInt(y.value,10);if(!isNaN(p))return{...y,type:"index",value:p}}return y})},zf=e=>{let t=e.replace(/@\.([a-zA-Z_$][\w$]*)/g,(r,n)=>`item.${n}`).replace(/@/g,"item");try{return new Function("item",`return ${t}`)}catch{throw new Error(`Invalid filter expression: ${e}`)}},Bf=(e,t,r)=>{let n=vn(t),o=e;for(let s=0;s<n.length;s++){let i=n[s],a=s===n.length-1;switch(i.type){case"property":if(a)o[String(i.value)]=r;else{if(!o[String(i.value)]){let u=n[s+1];o[String(i.value)]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{}}o=o[String(i.value)]}break;case"index":Array.isArray(o)||(o=[]);let c=i.value;if(a){if(c>=o.length)for(let u=o.length;u<=c;u++)o.push(void 0);o[c]=r}else{if(!o[c]){let u=n[s+1];o[c]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{}}o=o[c]}break;case"wildcard":if(Array.isArray(o))if(a)for(let u=0;u<o.length;u++)o[u]=r;else{let u=n[s+1];for(let f=0;f<o.length;f++)o[f]||(o[f]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{});o.length>0&&(o=o[0])}break}}}});function Xf(e,t,r){let n=new Uint8Array(t.length);e:for(let o=0;o<e.length;o++){for(let s=0;s<t.length;s++)if(!n[s]&&ve(e[o],t[s],r)){n[s]=1;continue e}return!1}return!0}var ve,Ws=F(()=>{"use strict";wn();ve=(e,t,r={})=>{if(e===t)return!0;if(e==null||t==null||typeof e!=typeof t)return!1;let n=Array.isArray(e),o=Array.isArray(t);if(n!==o)return!1;if(n&&o)return e.length!==t.length?!1:r.unordered?Xf(e,t,r):e.every((p,v)=>ve(p,t[v],r));if(typeof e!="object")return e===t;let s=e instanceof Date,i=t instanceof Date;if(s!==i)return!1;if(s)return e.getTime()===t.getTime();let a=e instanceof RegExp,c=t instanceof RegExp;if(a!==c)return!1;if(a)return e.toString()===t.toString();let u=e instanceof Map,f=t instanceof Map;if(u!==f)return!1;if(u){if(e.size!==t.size)return!1;for(let[p,v]of e)if(!t.has(p)||!ve(v,t.get(p),r))return!1;return!0}let l=e instanceof Set,d=t instanceof Set;if(l!==d)return!1;if(l){if(e.size!==t.size)return!1;let p=[...t],v=new Uint8Array(p.length);e:for(let S of e){for(let k=0;k<p.length;k++)if(!v[k]&&ve(S,p[k],r)){v[k]=1;continue e}return!1}return!0}if(!Gt(e)||!Gt(t))return!1;let h=Object.keys(e),y=Object.keys(t);if(h.length!==y.length)return!1;for(let p of h)if(!Object.prototype.hasOwnProperty.call(t,p)||!ve(e[p],t[p],r))return!1;return!0}});function Yf(e){return e.startsWith("//")?e.replace(/^\/+/,"/"):e}function Ye(e,t,r=!1){let n=[];if(e===t)return{params:{},path:t};if(!r&&e==="/"&&t.startsWith("/"))return{params:{},path:"/"};let o=e.replace(/:([a-zA-Z0-9_]+)/g,(c,u)=>(n.push(u),"([^/]+)")).replace(/\*([a-zA-Z0-9_]*)/g,(c,u)=>(u&&n.push(u),"(.*)"));o.startsWith("/")||(o="/"+o),o===""&&(o="/");let s=new RegExp(`^${o}${r?"$":"(?=/|$)"}`),i=t.match(s);if(!i)return null;let a={};return n.forEach((c,u)=>{a[c]=i[u+1]}),{params:a,path:i[0]}}function js(e){let t=e.path.split("/").filter(Boolean);if(t.length===0)return 5;let r=0;for(let n of t)n.startsWith("*")?r+=1:n.startsWith(":")?r+=10:r+=100;return r}function Gf(e){return[...e].sort((t,r)=>js(r)-js(t))}function Ge(e,t){let r=t.length>1?t.replace(/\/+$/,"")||"/":t,n=Ks(e,r);if(!n)return null;let o=[],s="",i={};for(let a of n.layers){s=Yf(Zf(s,a.consumed));let c={};for(let[u,f]of Object.entries(a.params))u in i||(c[u]=f),i[u]=f;o.push({route:a.route,component:a.route.component,params:c,pathname:s||"/"})}return{matched:o,params:i,pathname:t}}function Ks(e,t){if(!e||e.length===0)return null;let r=Gf(e);for(let n of r){let o=!!n.children&&n.children.length>0,s=Ye(n.path,t,!o);if(s){if(o){let i=Ks(n.children,t);if(i)return{layers:[{route:n,params:s.params,consumed:s.path},...i.layers]};continue}return{layers:[{route:n,params:s.params,consumed:s.path}]}}}return null}function Zf(e,t){if(!e)return t;if(t===e)return e;if(t.startsWith(e))return t;let r=e.replace(/\/$/,""),n=t.replace(/^\//,"");return`${r}/${n}`}function Qf(e){let t=e,r="",n=t.indexOf("#");n!==-1&&(r=t.slice(n),t=t.slice(0,n));let o="",s=t.indexOf("?");return s!==-1&&(o=t.slice(s),t=t.slice(0,s)),{pathname:t||"/",search:o,hash:r}}function Zt(e="/"){let t=[{path:e,state:null}],r=0,n=new Set,o=()=>n.forEach(s=>s());return{get(){let{path:s,state:i}=t[r];return{...Qf(s),state:i}},push(s,i=null){t=t.slice(0,r+1),t.push({path:s,state:i}),r=t.length-1,o()},replace(s,i=null){t[r]={path:s,state:i},o()},subscribe(s){return n.add(s),()=>n.delete(s)}}}function $e(){let e=typeof window<"u"?window:void 0,t=new Set,r=()=>t.forEach(n=>n());return e&&e.addEventListener("popstate",r),{get(){if(!e)return{pathname:"/",search:"",hash:"",state:null};let{pathname:n,search:o,hash:s}=e.location;return{pathname:n,search:o,hash:s,state:e.history.state??null}},push(n,o=null){e?.history.pushState(o,"",n),r()},replace(n,o=null){e?.history.replaceState(o,"",n),r()},subscribe(n){return t.add(n),()=>t.delete(n)}}}function el(e){let t={};return e&&new URLSearchParams(e.startsWith("?")?e.slice(1):e).forEach((n,o)=>t[o]=n),t}function tl(e,t){if(!t)return e||"/";let r=t.replace(/\/$/,"");return e===r?"/":e.startsWith(r+"/")?e.slice(r.length)||"/":e||"/"}function rl(e,t){return!t||/^https?:\/\//.test(e)?e:`${t.replace(/\/$/,"")}${e.startsWith("/")?e:"/"+e}`}function Fs(e){let{routes:t,history:r,base:n}=e,o=new Set,s=()=>{let f=r.get();return{pathname:f.pathname,search:f.search,hash:f.hash,state:f.state,query:el(f.search)}},i=f=>Ge(t,tl(f,n)),a=(()=>{let f=s();return{location:f,match:i(f.pathname)}})(),c=()=>{let f=s();a={location:f,match:i(f.pathname)},o.forEach(l=>l(a))},u=r.subscribe(c);return{state(){return a},subscribe(f){return o.add(f),()=>o.delete(f)},navigate(f,l={}){let d=rl(f,n);l.replace?r.replace(d,l.state??null):r.push(d,l.state??null)},match(f){return i(f)},destroy(){u(),o.clear()}}}var bn=F(()=>{"use strict";});function Us(e){return xn.add(e),()=>{xn.delete(e)}}function Bs(e,t,r={}){let{ttl:n=1/0,staleWhileRevalidate:o=!0}=r;return(...s)=>{let i=r.cache??it(),a=t+":"+JSON.stringify(s),c=()=>{let f=i.inflight.get(a);if(f)return f;let l=Promise.resolve(e(...s)).then(d=>(i.set(a,{value:d,timestamp:Date.now()}),i.inflight.delete(a),d),d=>{throw i.inflight.delete(a),d});return i.inflight.set(a,l),l},u=i.get(a);return u&&(n===1/0||Date.now()-u.timestamp<=n)?Promise.resolve(u.value):u&&o?(c().then(zs,()=>{}),Promise.resolve(u.value)):c()}}function Qt(e,t){let r=typeof e=="string"?[e]:Array.isArray(e)?e:null;Js(r??e,t??it()),r&&!t&&nl(r)}function Js(e,t){let r=Array.isArray(e)?n=>e.some(o=>n===o||n.startsWith(o+":")):e;for(let n of[...t.keys()])r(n)&&t.delete(n);zs()}function nl(e){try{localStorage.setItem(Xs,JSON.stringify({names:e,at:Date.now()+Math.random()}))}catch{}}function Ys(e,t){let[r]=ae(t||(()=>!0),e);return r}function Gs(e){return Sn.has(e)||Sn.set(e,b(void 0)),Sn.get(e)}function Zs(e){return An.has(e)||An.set(e,b([])),An.get(e)}function kn(e,t,r={}){let n=t||e.name||"action",o=async s=>{let[,i]=Gs(n),[,a]=Zs(n),c,u=()=>a(h=>h.filter(y=>y!==c)),f=h=>{a(y=>y.map(p=>p===c?h:p)),c=h},l=()=>{i(void 0),u()},d=()=>(u(),o(s));c={input:s,pending:!0,clear:l,retry:d},i(c),a(h=>[...h,c]);try{let h=await e(s);i({input:s,result:h,pending:!1,clear:l,retry:d}),u();let y=typeof r.invalidates=="function"?r.invalidates(h):r.invalidates;for(let p of y??[])Qt(p);return h}catch(h){let y={input:s,error:h,pending:!1,clear:l,retry:d};throw i(y),f(y),h}};return o.url=n,o.with=s=>kn((...i)=>e(s,...i),t,r),o}function Qs(e){let[t]=Gs(e.url);return t}function ea(e){let[t]=Zs(e.url);return t}function ta(e){return e}var xn,zs,Xs,Sn,An,ol,zp,_n=F(()=>{"use strict";x();x();sn();xn=new Set;zs=()=>{for(let e of[...xn])e()};Xs="fluixi:revalidate";typeof window<"u"&&window.addEventListener("storage",e=>{if(!(e.key!==Xs||!e.newValue))try{let t=JSON.parse(e.newValue).names;Array.isArray(t)&&t.every(r=>typeof r=="string")&&Js(t,it())}catch{}});globalThis[Symbol.for("fluixi.revalidate")]=e=>Qt(e);Sn=new Map;An=new Map;ol=Be(void 0,"route-data"),zp=ol.Provider});var sa={};In(sa,{A:()=>$n,Form:()=>ml,Link:()=>rr,Outlet:()=>En,Redirect:()=>Tn,Router:()=>On,action:()=>kn,cache:()=>Bs,createAsync:()=>Ys,createBrowserHistory:()=>$e,createMemoryHistory:()=>Zt,lazy:()=>Ce,matchPath:()=>Ye,matchRoutes:()=>Ge,prefersReducedMotion:()=>hn,preloadRoutes:()=>gl,revalidate:()=>Qt,runWithOwner:()=>$,select:()=>dl,supportsViewTransitions:()=>yn,useAction:()=>ta,useIsRouting:()=>cl,useLevelParams:()=>fl,useLinkNavigation:()=>pl,useLocation:()=>Qe,useMatch:()=>Rn,useNavigate:()=>tr,useParam:()=>Cn,useParamSelector:()=>ll,useParams:()=>Ze,useRouteData:()=>yl,useRouter:()=>Ne,useSearchParams:()=>Pn,useSubmission:()=>Qs,useSubmissions:()=>ea});function il(e,t,r){let n,o=e.route.data;if(typeof o=="function"){let f=!1;A(()=>{f=!0});let l=T(),d=q(we),h=!1,y=S=>{h||f||(h=!0,$(l,()=>{let k=!0;_(()=>{S(),k?k=!1:E(()=>{v()})})}))},[p,{refetch:v}]=ae(()=>{let S=o({params:r.params,location:r.location},l,()=>f,y);return d?d.trackLoad(S):S});A(Us(()=>{v()})),n=()=>{let S=p.error;if(S!=null)throw S;return p()},Object.defineProperty(n,"loading",{get:()=>p.loading}),Object.defineProperty(n,"state",{get:()=>p.state})}let s=()=>oa.Provider({value:n,get children(){return na.Provider({value:e.params,get children(){return ra.Provider({value:{depth:t,...r},get children(){return z(e.component,{})}})}})}});if(!n)return{view:s(),ready:()=>!0};let i=n,a=()=>{let f=i.state;return f===void 0?i.loading:f==="pending"||f==="unresolved"},[c,u]=b(E(()=>!a()));return _(()=>u(!a())),{view:w(()=>c()?s():null),ready:c}}function ia(e){let t=e.depth+1,[r,n]=b(E(()=>e.matched()[t]?.component));_(()=>{let u=e.matched()[t]?.component;E(r)!==u&&n(()=>u)});let o=T(),s=null,i=null,a=u=>u?.dispose();A(()=>{a(s),a(i),s=i=null});let c=w(()=>{if(!r())return null;let f=E(()=>e.matched())[t];return $(o,()=>D(l=>({...il(f,t,{matched:e.matched,params:e.params,location:e.location}),dispose:l})))});return w(()=>{let u=c();return u?(u===s||(i&&i!==u&&a(i),i=u,s&&!u.ready())||(a(s),s=u,i=null),s.view):(a(s),a(i),s=i=null,e.notFound?e.notFound():null)})}function sl(e){return e==null?al():typeof e=="function"?z(e,{}):e}function al(){let e=Ee("div");C(e,"class","fx-not-found"),C(e,"role","main"),C(e,"style","min-height:60vh;display:grid;place-content:center;gap:.25rem;text-align:center;font-family:system-ui,-apple-system,sans-serif");let t=Ee("h1");C(t,"style","margin:0;font-size:2.5rem;font-weight:700"),V(t,"404");let r=Ee("p");return C(r,"style","margin:0;opacity:.7"),V(r,"This page could not be found."),e.appendChild(t),e.appendChild(r),e}function On(e){let t=e.history??$e(),r=Fs({routes:e.routes,base:e.base,history:t}),[n,o]=b(r.state()),[s,i]=b(!1),[a,c]=b(0),u=0,f=()=>{let v=er??e.transition??"auto";return er=void 0,v},l=r.subscribe(v=>{let S=++u,k=f();i(!0);let Q=Vs((v.match?.matched??[]).map(ee=>ee.component).filter(Boolean)),pe=()=>{o(v);let ee=oo();return S===u&&i(!1),ee};if(!Q){mn(k,pe);return}Q.then(()=>{if(S===u)return mn(k,pe)})});A(()=>{l(),r.destroy(),u++});let d=w(()=>(n().match?.matched??[]).filter(v=>v.component)),h={router:r,location:w(()=>n().location),params:w(()=>n().match?.params??{}),isRouting:()=>s()||a()>0,trackLoad(v){return v&&typeof v.finally=="function"&&(c(S=>S+1),v.finally(()=>c(S=>S-1)).catch(()=>{})),v}},y={depth:-1,matched:d,params:h.params,location:h.location,notFound:()=>sl(e.notFound)},p;return we.Provider({value:h,get children(){return p??=ia(y)}})}function En(){let e=q(ra);return e?ia(e):null}function cl(e={}){let t=q(we)?.isRouting??(()=>!1),r=e.delay??0;if(r<=0)return t;let[n,o]=b(!1);return _(()=>{if(!t()){o(!1);return}let s=setTimeout(()=>o(!0),r);A(()=>clearTimeout(s))}),()=>t()&&n()}function Tn(e){let t=q(we);if(t&&typeof window<"u"){let r=!1;A(()=>r=!0),queueMicrotask(()=>{r||t.router.navigate(e.to,{replace:e.replace!==!1})})}return null}function Ne(){let e=q(we);if(e)return e;if(typeof window>"u")return ul;throw new Error("[router] useRouter must be used within <Router>")}function Ze(){let e=Ne().params;return w(()=>e(),{},{equals:(t,r)=>JSON.stringify(t)===JSON.stringify(r)})}function fl(){return q(na)??{}}function Cn(e){let t=Ze();return w(()=>t()[e])}function ll(e,t){let r=Ze();return w(()=>e(r()),void 0,t?{equals:t}:void 0)}function Rn(e){let t=Qe();return w(()=>Ye(typeof e=="function"?e():e,t.pathname))}function Pn(){let e=Qe(),t=tr();return[w(()=>e.query),(o,s)=>{let i=new URLSearchParams(e.search);for(let[c,u]of Object.entries(o))u===null?i.delete(c):i.set(c,u);let a=i.toString();t(e.pathname+(a?`?${a}`:""),s)}]}function dl(e,t){let r=(n,o)=>ve(n,o);return t!==void 0?w(()=>Yt(e(),t),void 0,{equals:r}):w(e,void 0,{equals:r})}function Qe(){let{location:e}=Ne();return new Proxy({},{get:(t,r)=>e()[r],has:(t,r)=>r in e(),ownKeys:()=>Reflect.ownKeys(e()),getOwnPropertyDescriptor:(t,r)=>Object.getOwnPropertyDescriptor(e(),r)})}function pl(e={}){let t=q(we);return r=>{if(!t||r.defaultPrevented||r.button!==0||r.metaKey||r.ctrlKey||r.shiftKey||r.altKey)return;let o=r.target?.closest?.("a");if(!o||!o.getAttribute("href")||o.target&&o.target!=="_self"||o.hasAttribute("download")||/(^|\s)external(\s|$)/.test(o.getAttribute("rel")??""))return;let s=new URL(o.href);s.protocol!=="http:"&&s.protocol!=="https:"||s.origin===window.location.origin&&(s.hash&&s.pathname===window.location.pathname&&s.search===window.location.search||e.shouldNavigate&&!e.shouldNavigate(s,o)||(r.preventDefault(),er=e.transition,t.router.navigate(s.pathname+s.search+s.hash,{replace:e.replace})))}}function tr(){let{router:e}=Ne();return(t,r)=>{er=r?.transition,e.navigate(t,r)}}function yl(){return q(oa)??(()=>{})}function rr(e){let t=q(we),r=()=>t.router.navigate(ie(e.href)??"",{replace:ie(e.replace)}),n=Ee("a");C(n,"href",ie(e.href)??""),e.slot&&C(n,"slot",ie(e.slot));for(let s of Object.keys(e)){if(hl.has(s))continue;let i=e[s];if(typeof i=="function"){if(/^on[A-Z]/.test(s))continue;let a=i,c=()=>{let u=a();u==null||u===!1?n.removeAttribute?.(s):C(n,s,String(u))};typeof n.addEventListener=="function"?_(c):c();continue}i!=null&&C(n,s,String(i))}if(typeof n.addEventListener=="function")n.addEventListener("click",s=>{s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||t&&(s.preventDefault(),r())});else{let s=ie(e.className??e.class)??"";s&&C(n,"class",s)}typeof n.addEventListener=="function"&&_(()=>{let s=ie(e.href)??"";n.setAttribute("href",s);let i=ie(e.className??e.class)??"",a=ie(e.activeClass)??"",c=ie(e.active)??t?.location().pathname===s;n.className=[i,c?a:""].filter(Boolean).join(" ")});let o=e.children;return o!=null&&V(n,o),n}function ml(e){let t=e.action,r=e.className??e.class,n=t.url??"",o=Ee("form");C(o,"method","post"),n&&C(o,"action",n),r&&C(o,"class",r);for(let i of Object.keys(e)){if(i==="action"||i==="children"||i==="class"||i==="className")continue;let a=e[i];a!=null&&typeof a!="function"&&C(o,i,String(a))}typeof o.addEventListener=="function"&&o.addEventListener("submit",i=>{i.preventDefault();let a={};new FormData(o).forEach((c,u)=>{a[u]=c}),Promise.resolve(t(a)).catch(()=>{})});let s=e.children;return s!=null&&V(o,s),o}async function gl(e,t){let r=Ge(e,t);if(!r)return;let n=[];for(let o of r.matched){let s=o.component;s&&typeof s.preload=="function"&&n.push(s.preload())}await Promise.all(n)}var we,ra,na,oa,er,ul,ie,hl,$n,Nn=F(()=>{"use strict";x();gn();M();x();wn();Ws();bn();_n();bn();_n();Jt();gn();x();we=Y(void 0,"router"),ra=Y(void 0,"outlet"),na=Y(void 0,"route-params"),oa=Y(void 0,"route-data");ul={router:{navigate:()=>{}},location:()=>({pathname:"",search:"",hash:"",query:{}}),params:()=>({}),isRouting:()=>!1,trackLoad:e=>e};ie=e=>typeof e=="function"?e():e,hl=new Set(["href","slot","class","className","active","activeClass","replace","children"]);$n=rr});var wl={};In(wl,{$component:()=>tn,A:()=>$n,ClientOnly:()=>Zr,DEV:()=>Fe,Dynamic:()=>us,ErrorBoundary:()=>ds,FRAMEWORK_NAME:()=>Ps,For:()=>is,Fragment:()=>an,Index:()=>ss,Link:()=>rr,Match:()=>as,NoSsr:()=>ls,Outlet:()=>En,Portal:()=>fs,Redirect:()=>Tn,Router:()=>On,Show:()=>os,Store:()=>mt,Suspense:()=>ze,Switch:()=>cs,VERSION:()=>Rs,addClass:()=>Ri,batch:()=>N,classMap:()=>ps,cleanupDelegation:()=>xs,composeProviders:()=>ks,createBrowserHistory:()=>$e,createComponent:()=>Te,createComputed:()=>no,createContext:()=>Be,createDebounce:()=>po,createDeferred:()=>lo,createEffect:()=>_,createIsomorphicState:()=>Os,createMemo:()=>w,createMemoryHistory:()=>Zt,createProvider:()=>on,createRenderEffect:()=>R,createResource:()=>ae,createRoot:()=>D,createSelector:()=>fo,createSignal:()=>b,createStore:()=>kr,delegateEvents:()=>ge,devOnly:()=>nn,getFrameworkInfo:()=>Sf,getOwner:()=>T,getSharedConfig:()=>en,hydrate:()=>Vt,initDelegation:()=>As,insert:()=>V,isDOMNode:()=>Lt,isDev:()=>rn,isLitTemplateResult:()=>Ni,isRenderable:()=>Ss,jsx:()=>cn,jsxs:()=>Cs,lazy:()=>Ce,mount:()=>ca,onCleanup:()=>A,onMount:()=>Wt,onUnmount:()=>jt,portal:()=>bs,read:()=>To,reduce:()=>Eo,removeClass:()=>Pi,render:()=>Re,requireContext:()=>_s,runWithOwner:()=>$,setAttribute:()=>C,setOwner:()=>to,setProperty:()=>me,spread:()=>es,startClient:()=>ua,styleMap:()=>ys,toggleClass:()=>$i,untrack:()=>E,untrackStore:()=>_r,useCallback:()=>Bt,useContext:()=>Je,useEffect:()=>Ue,useEventListener:()=>zt,useLocation:()=>Qe,useMatch:()=>Rn,useMemo:()=>Kt,useNavigate:()=>tr,useParam:()=>Cn,useParams:()=>Ze,useReducer:()=>Ut,useRef:()=>Ft,useRouter:()=>Ne,useSearchParams:()=>Pn});x();x();var hr="1.0.0-alpha.93",_o=hr.split(".")[0],wo=`__fluixi_signal_state_v${_o}__`,Ga=`__fluixi_signal_builds_v${_o}__`,Za=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function Oo(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Za,onSuspend:null,onError:null,observer:null}}var yr=globalThis;function Qa(e){let t=Oo(),r=e;for(let n of Object.keys(t))n in e||(r[n]=t[n]);return e}function ec(){let e=yr[wo];return e?Qa(e):yr[wo]=Oo()}var O=ec();(yr[Ga]??=[]).push(hr);function tc(e){return O.observer=e,()=>{O.observer===e&&(O.observer=null)}}var mr=[],rc,bo;function nc(e){let t=O.observer;t&&t.created(e.parents===void 0?{...e,parents:mr,origin:e.origin??rc,scope:e.scope??bo}:{...e,scope:e.scope??bo})}function oc(e){return O.observer?(mr.push(e),!0):!1}function ic(){mr.pop()}function sc(e){O.observer?.ran?.(e)}function ac(e){O.observer?.disposed?.(e)}var cc="__FLUIXI_DEVTOOLS_HOOK__",So=globalThis[cc];if(typeof So?.inject=="function")try{So.inject({observeReactiveNodes:tc,version:hr})}catch{}function uc(){return O.observer!=null}var Ao=0,xo=1,st=2,fc=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(O.untracked)return;let e=O.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}};var lc=class extends fc{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=st,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(O.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===xo&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===st)break}(this.state===st||!this._initialized)&&this.recompute(),this.state=Ao}recompute(){if(this.sources){for(let a of this.sources)a.observers?.delete(this);this.sources.clear()}let e=O.consumer,t=O.untracked,r=oc(this);O.consumer=this,O.untracked=!1;let n,o=!1,s;try{n=this._fn()}catch(a){o=!0,s=a,n=this._value}finally{O.consumer=e,O.untracked=t,r&&ic()}let i=!this._initialized||this._threw!==o||(o?s!==this._error:!this._equals(this._value,n));if(this._initialized=!0,this._threw=o,this._error=s,this._value=n,sc(this),i){if(this.version++,this.observers)for(let a of[...this.observers])a.markDirty(st);ko(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===Ao;if(this.state=e,t){if(this.observers)for(let r of[...this.observers])r.markDirty(xo);ko(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function ko(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}function dc(e){return O.onSuspend?(O.onSuspend(e,O.owner),!0):!1}function pc(){return O.owner}function yc(e,t){let r=O.owner;O.owner=e;try{return t()}finally{O.owner=r}}function hc(e){if(O.owner){if(O.owner.disposed){e();return}(O.owner.cleanups??=[]).push(e)}}function mc(e){O.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function gc(e){return!!e&&typeof e.then=="function"}mc(()=>{});var vc=Symbol.for("signal"),wc=Symbol.for("memo");function bc(e,t,r){let n=t,o=pc(),s=new lc(()=>yc(o,()=>{try{return n=e(n)}catch(a){if(gc(a))return dc(a),n;throw a}}),{equals:r?.equals}),i=(()=>s.get());return Object.defineProperty(i,vc,{value:!0,enumerable:!0}),Object.defineProperty(i,wc,{value:!0,enumerable:!0}),nc({kind:"memo",node:s,handle:i,name:r?.name}),uc()&&hc(()=>ac(s)),i}function Eo(e,t,r,n){return bc(()=>e().reduce(t,r),void 0,n)}function To(e){let t=e;for(;typeof t=="function";)t=t();return t}x();var xr="1.0.0-alpha.93",jo=xr.split(".")[0],Co=`__fluixi_signal_state_v${jo}__`,Sc=`__fluixi_signal_builds_v${jo}__`,Ac=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function Ko(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Ac,onSuspend:null,onError:null,observer:null}}var gr=globalThis;function xc(e){let t=Ko(),r=e;for(let n of Object.keys(t))n in e||(r[n]=t[n]);return e}function kc(){let e=gr[Co];return e?xc(e):gr[Co]=Ko()}var ue=kc();(gr[Sc]??=[]).push(xr);function _c(e){return ue.observer=e,()=>{ue.observer===e&&(ue.observer=null)}}var Oc=[],at;function Ec(e,t){if(!ue.observer)return t();let r=at;at=e;try{return t()}finally{at=r}}var Ro;function Tc(e){let t=ue.observer;t&&t.created(e.parents===void 0?{...e,parents:Oc,origin:e.origin??at,scope:e.scope??Ro}:{...e,scope:e.scope??Ro})}function Po(e,t,r){ue.observer?.moved?.(e,t,r)}function $o(e){ue.observer?.disposed?.(e)}var Cc="__FLUIXI_DEVTOOLS_HOOK__",No=globalThis[Cc];if(typeof No?.inject=="function")try{No.inject({observeReactiveNodes:_c,version:xr})}catch{}function Fo(){return ue.observer!=null}var ft=Symbol("store-raw"),Mo=Symbol("store-node"),Lo=Symbol("store-has"),Io=Symbol("store-self"),Do=Symbol("store-track");var qe=new WeakMap,vr=new WeakMap,ke=new WeakMap,lt=new WeakMap;function Rc(e,t){if(!xe(e)||!Fo())return;let r=new Set,n=i=>{if(!(!xe(i)||r.has(i))){r.add(i);for(let a of Object.values(i))n(a)}};n(lt.get(t)??t);let o=new Set,s=i=>{if(!xe(i))return;let a=i;if(r.has(a)||o.has(a))return;o.add(a);let c=qe.get(a);if(c){for(let u of c.keys.values())$o(u);c.all&&$o(c.all),qe.delete(a),ke.delete(a),vr.delete(a)}for(let u of Object.values(a))s(u)};s(e)}var dt=(e,t,r)=>r?`${e}[${String(t)}]`:`${e}.${String(t)}`;function Uo(e,t,r){let n=t?.owner,o=n&&r!==void 0?dt(n.name,r,t?.array):void 0,[s,i]=Ec(n?.store,()=>b(e,o?{name:o}:void 0)),a=s;return a.$=i,a}function pt(e){let t=qe.get(e);return t?t.owner||(t.owner=ke.get(e)):qe.set(e,t={keys:new Map,owner:ke.get(e),array:Array.isArray(e)}),t}function qo(e,t,r){let n=e.keys.get(t);return n||e.keys.set(t,n=Uo(r,e,t)),n}function Pc(e,t,r,n){let o=ke.get(e);if(o&&o.store===t&&o.name===r)return;let s={store:t,name:r};ke.set(e,s),lt.set(e,lt.get(n)??n);let i=qe.get(e);if(i&&(i.owner=s,!!Fo())){for(let[a,c]of i.keys)Po(c,t,dt(r,a,i.array));i.all&&Po(i.all,t,dt(r,"*",i.array))}}function Vo(e){let t=pt(e);(t.all||(t.all=Uo(void 0,t,"*")))()}function Ho(e,t){e.$(typeof t=="function"?()=>t:t)}function xe(e){if(e==null||typeof e!="object")return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function ct(e){if(!xe(e))return e;let t=vr.get(e);if(t)return t;let r=new Proxy(e,$c);return vr.set(e,r),r}var $c={get(e,t,r){if(t===ft||t===Mo)return e;if(t===Ae)return r;if(t===Lo)return c=>c in e;if(t==="__proxy")return!0;if(t===Do||t===Io)return Vo(e),r;let n=e[t];if(typeof n=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return n;let o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get)return o.get.call(r);let s=pt(e),i=qo(s,t,n),a=i();return xe(a)?(s.owner&&Pc(a,i,dt(s.owner.name,t,s.array),e),ct(a)):a},set(){return!0},deleteProperty(e,t){return t in e&&G(e,t,void 0),!0},has(e,t){return t===ft||t===Ae||t===Mo||t===Lo||t===Io||t===Do?!0:(qo(pt(e),t,e[t])(),t in e)},ownKeys(e){return Vo(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function zo(e,t=new Set){if(e==null||typeof e!="object")return e;let r=e[ft]??e;if(t.has(r)||!xe(r))return r;t.add(r);let n=!1,o=i=>{let a=zo(i,t);return a!==i&&(n=!0),a};if(Array.isArray(r)){let i=r.map(o);return n?i:r}let s={};for(let i of Object.keys(r))s[i]=o(r[i]);return n?s:r}function G(e,t,r){let n=zo(r),o=e[t];if(o===n&&(n!==void 0||t in e))return;let s=Array.isArray(e),i=s?e.length:0;n===void 0?delete e[t]:e[t]=n;let a=pt(e),c=a.keys.get(t);if(c&&Ho(c,n),Rc(o,e),s&&e.length!==i){let u=a.keys.get("length");u&&Ho(u,e.length)}a.all&&a.all.$(void 0)}function wr(e,t){return typeof e=="function"?e(t):e}function br(e,t){for(let r of Object.keys(t)){let n=t[r],o=e[r];n&&typeof n=="object"&&!Array.isArray(n)&&o&&typeof o=="object"&&!Array.isArray(o)?br(o,n):G(e,r,n)}}function ht(e){let t=[],r=e.replace(/\[([^\]]*)\]/g,".$1");for(let n of r.split("."))n.length&&t.push(n);return t}function Bo(e,t,r){let n=t.length-1;for(let s=0;s<n;s++){let i=t[s];if(i==="*"){let c=t.slice(s+1);if(Array.isArray(e))for(let u=0;u<e.length;u++)Bo(e[u],c,r);return}let a=e[i];(a==null||typeof a!="object")&&(a=/^\d+$/.test(t[s+1])?[]:{},G(e,i,a)),e=a}let o=t[n];if(o==="*"){if(Array.isArray(e))for(let s=0;s<e.length;s++)G(e,s,wr(r,e[s]));return}G(e,o,wr(r,e[o]))}function Wo(e,t,r){Bo(e,ht(t),r)}function Nc(e){return Array.isArray(e)&&e.length>0&&e.every(t=>Array.isArray(t)&&t.length>=2&&typeof t[0]=="string")}function ut(e,t){for(let r=e.length-1;r>=t.length;r--)G(e,String(r),void 0);e.length!==t.length&&G(e,"length",t.length);for(let r=0;r<t.length;r++)G(e,String(r),t[r])}function Mc(e,t){let r=t[0];if(typeof r=="function"&&t.length===1){let n=r(e);n&&n!==e&&br(e,n);return}if(Array.isArray(r)&&t.length===1){if(Nc(r)){for(let n of r)Wo(e,n[0],n[1]);return}if(Array.isArray(e)){ut(e,r);return}if(r.length===0)return;throw new TypeError("[fluixi] set() was given an array that is neither a batch of [path, value] pairs nor a replacement for an array root. Name the path you meant, as in set('items', [...]).")}if(r&&typeof r=="object"&&!Array.isArray(r)&&t.length===1){br(e,r);return}if(t.length>=3){Sr(e,t.slice(0,-1),t[t.length-1]);return}Wo(e,String(r),t[1])}function Lc(e,t){if(typeof t=="function"){if(!Array.isArray(e))return[];let r=[];for(let n=0;n<e.length;n++)t(e[n],n)&&r.push(n);return r}if(Array.isArray(t))return Array.isArray(e)?t.map(Number):t.map(String);if(t&&typeof t=="object"&&("from"in t||"to"in t||"by"in t)){if(!Array.isArray(e))return[];let r=t.by??1,n=t.from??0,o=t.to??e.length-1,s=[];for(let i=n;i<=o;i+=r)i>=0&&i<e.length&&s.push(i);return s}return t==="*"?Array.isArray(e)?e.map((r,n)=>n):Object.keys(e??{}):[t]}function Sr(e,t,r){if(e==null)return;let[n,...o]=t;if(typeof n=="string"){let i=ht(n);if(i.length>1){Sr(e,[...i,...o],r);return}}let s=Lc(e,n);if(o.length===0){for(let i of s)G(e,i,wr(r,e[i]));return}for(let i of s){let a=e[i];if(a==null||typeof a!="object"){let c=o[0];a=typeof c=="number"||/^\d+$/.test(String(c))?[]:{},G(e,i,a)}Sr(a,o,r)}}function Ar(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Ar);let t={};for(let r of Object.keys(e))t[r]=Ar(e[r]);return t}function ce(e,t){let r=e;for(let n of ht(t)){if(r==null)return;r=r[n]}return r}var mt=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...r)=>N(()=>Mc(this.root,r))),e&&typeof e=="object"&&(ke.set(e,{store:this,name:t.name??"store"}),lt.set(e,e)),Tc({kind:"store",node:this,handle:()=>this.root,name:t.name})}get state(){return ct(this.root)}get proxy(){return ct(this.root)}get accessor(){return(()=>ct(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return yt(this.state);let t=this.state;for(let r of ht(e)){if(t==null)return;t=t[r]}return yt(t)}select(e){return w(()=>e(this.state))}subscribe(e){return _(()=>e(this.state))}watch(e,t){let r;return _(()=>{let n=e(this.state);Object.is(n,r)||(t(n,r),r=n)})}reactive(e){return w(()=>this.state[e])}produce(e){this.set((t=>{let r=Ar(t);return e(r),r}))}reconcile(e,t={}){this.set(e)}push(e,...t){let r=ce(this.root,e);this.set(e,r.concat(t))}pop(e){let t=ce(this.root,e).slice(),r=t.pop();return this.set(e,t),r}shift(e){let t=ce(this.root,e).slice(),r=t.shift();return this.set(e,t),r}splice(e,t,r,...n){let o=ce(this.root,e).slice(),s=o.splice(t,r,...n);return this.set(e,o),s}insert(e,t,r){let n=ce(this.root,e).slice();n.splice(t,0,r),this.set(e,n)}removeAt(e,t){let r=ce(this.root,e).slice(),n=r.splice(t,1);return this.set(e,r),n}replace(e,t){if(arguments.length>=2){let n=ce(this.root,String(e)),o=t;if(Array.isArray(n)&&Array.isArray(o)){ut(n,o);return}this.set(e,o);return}let r=this.root;if(Array.isArray(r)&&Array.isArray(e)){ut(r,e);return}this.set(e)}clear(e){let t=e===void 0?this.root:ce(this.root,e);if(Array.isArray(t)){ut(t,[]);return}if(t&&typeof t=="object")for(let r of Object.keys(t))G(t,r,void 0)}toObservable(){let[e]=b(this.state);return e.toObservable()}dispose(){}},Ic=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","replace","clear","unwrap","toObservable"];function Dc(e,t){for(let r of Ic)e[r]=t[r].bind(t);e.$=t.reactive.bind(t)}function kr(e,t={immutable:!0}){let r=new mt(e,t);return Dc(r.set,r),[r.proxy,r.set]}function qc(e,t={}){return new mt(e,{...t,immutable:!1})}function yt(e){if(e==null||typeof e!="object")return e;let t=e[ft];return t!==void 0?t:e}function _r(e){return E(()=>yt(e))}var Pl=Object.freeze({createStore:kr,createMutableStore:qc,batch:N,unwrap:yt,untrackStore:_r});M();x();M();var hs="1.0.0-alpha.93";M();Mi(hs);M();M();M();x();var df={context:null,owner:null};function en(){return df}var Fe=typeof process<"u"&&!1,Qr=Symbol.for("fluixi-lifecycle");function ms(){let e=T();if(!e)return null;if(!e[Qr]){let t={mounts:[],effects:[],scheduled:!1};e[Qr]=t}return e[Qr]}function gs(e){if(e.scheduled)return;if(I()){e.mounts=[],e.effects=[];return}e.scheduled=!0;let t=T();queueMicrotask(()=>{if(Zn(t)){e.mounts=[],e.effects=[];return}$(t,()=>{for(let r of e.mounts)try{let n=r();typeof n=="function"&&A(n)}catch(n){console.error("Error in onMount callback:",n)}for(let r of e.effects){let n;_(()=>{n&&n(),n=r()}),A(()=>{n&&n()})}e.mounts=[],e.effects=[]})})}function Te(e,t){return z(e,t)}function tn(e,t){let r=typeof e=="function"?E(()=>e(t)):e,n=r!=null&&(typeof r=="function"||typeof r=="object");if(n)try{r.$name=e.name}catch{}return n&&!L(r)?Ke(r):r}function Wt(e,t=!0){if(I())return;let r=ms();if(r){if(!t){r.scheduled||e();return}r.mounts.push(e),gs(r)}else{if(!t){e();return}_(()=>{let n=E(e);typeof n=="function"&&A(n)})}}function jt(e){A(e)}function Ue(e){let t=ms();if(t)t.effects.push(e),gs(t);else{let r;_(()=>{r&&r(),r=e()}),A(()=>{r&&r()})}}function Kt(e){return w(e)}function Ft(e){let t={current:e};return A(()=>{t.current=null}),t}function Ut(e,t){let[r,n]=b(t);return[r,s=>{n(e(r(),s))}]}function zt(e,t,r,n){Ue(()=>{let o=e&&"current"in e?e.current:e;if(o)return o.addEventListener(t,r,n),()=>{o.removeEventListener(t,r,n)}})}function Bt(e){return e}function rn(){return Fe}function nn(e){Fe&&e()}x();M();function vs(e){return!!(e&&typeof e=="object"&&typeof e.then=="function"||e instanceof Promise)}var pf=Y(void 0,"suspense-list");function ze(e){return z(yf,e)}function yf(e){let t=ho(),r=q(pf),n=r?r.register(t.inFallback):void 0;function o(l){return l==null||typeof l=="boolean"?null:typeof l=="function"&&ne(l)&&!L(l)?l():l}let s=Hi(()=>o(e.fallback??null)),i=pr(t,()=>De(()=>e.children)),a=(l,d)=>{if(!(d>8))if(Array.isArray(l))for(let h of l)a(h,d+1);else typeof l=="function"&&L(l)&&a(l(),d+1)};pr(t,()=>{R(()=>a(i,0))});let[c,u]=b(void 0),f=vs(i);return f&&(t.increment(),i.then(l=>{u(()=>l),t.decrement()},()=>t.decrement())),w(()=>(n?n.showFallback():t.inFallback())?s:f?c():i)}Ii(ze);Object.defineProperty(ze,"__suspense",{value:!0,enumerable:!0});Jt();Jt();function Re(e,t,r={}){if(ge(["click","input","change","submit"]),I())throw new Error("render() is for client-side only. Use renderToString() on server.");if(!t)throw new Error("Container element is required");let n;return D(o=>{n=o;let s=typeof e=="function"?e():e;t.textContent="",It(t),Dt(),V(t,()=>s)}),()=>{n&&(n(),n=void 0)}}function hf(e){return e&&typeof e=="object"&&(e._$litType$!==void 0||e._$litDirective$!==void 0)}function bs(e,t,r={}){let n=document.createElement("div");n.setAttribute("data-portal","true"),t.appendChild(n);let o=Re(e,n,r);return()=>{o(),t.contains(n)&&t.removeChild(n)}}function Ss(e){return!!(e==null||typeof e=="function"||Lt(e)||hf(e)||Array.isArray(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean")}function As(){I()||ge(["click","input","change","submit"])}function xs(){I()}sn();x();M();var mf="__fluixi_iso_states__",gf="__iso:";function vf(){return globalThis[mf]??=new Map}function wf(e){if(typeof window>"u")return;let t=Gr();return t?t[gf+e]:void 0}function Os(e,t){let r=wf(e),n=r!==void 0?r:typeof window<"u"&&t.client?t.client():t.fallback,[o,s]=b(n,{name:e});return vf().set(e,{server:t.server,set:s}),{value:o,set:s,key:e}}M();M();M();M();M();x();var an=Symbol.for("fluixi.fragment"),Es=typeof window>"u";function Ts(e){return e==null||e===!1?null:Array.isArray(e)?e.map(Ts).flat():e}function cn(e,t,r){if(e==null)return null;let n=t||{};if(r!==void 0&&(n.key=r),e===an)return w(()=>Ke(Ts(n.children)));if(typeof e=="function"){let{type:o}=Di(e);return e.$$typeof===Symbol.for("react.provider")||o==="provider"?e(n):Es?{type:e,props:n}:w(()=>z(e,n),void 0,{name:"jsx component"})}return typeof e=="string"&&e.trim().length>0?bf(e,n):null}var Cs=cn;function bf(e,t){return Es?{type:e,props:t||{}}:ns(e,t)}var Rs="0.0.1",Ps="Fluixi";function Sf(){return{name:Ps,version:Rs,features:{ssr:!0,hydration:!0,jsx:!0,litHtml:!0,signals:!0,fineGrained:!0,lazy:!0,hooks:!0,devMode:!0}}}M();var Af=!1,$s=new Map;function un(e){Af=e}function xf(){$s.clear()}function Ns(){if(typeof window>"u")return!1;let e=document.getElementById("__FLUIXI_HYDRATION__");if(!e||e.getAttribute("type")!=="application/json")return!1;try{let t=e.textContent||"{}",r=JSON.parse(t);for(let[n,o]of Object.entries(r))$s.set(n,o);return!0}catch(t){return console.error("Failed to deserialize hydration data:",t),!1}}function fn(){if(typeof window>"u")return;let e=document.getElementById("__FLUIXI_HYDRATION__");e&&e.remove();let t=document.createTreeWalker(document.body,NodeFilter.SHOW_COMMENT,null),r=[],n;for(;n=t.nextNode();){let o=n,s=o.nodeValue||"";(s.startsWith("#")||s.startsWith("/"))&&r.push(o)}r.forEach(o=>o.remove()),xf()}typeof window<"u"&&window.addEventListener("load",()=>{setTimeout(fn,100)});x();x();x();var kf=Object.defineProperty,_f=(e,t)=>{for(var r in t)kf(e,r,{get:t[r],enumerable:!0})};function oe(e){return typeof e=="function"?e():e}function Of(e){if(typeof e=="string")return e;let t=[];return t.push(e.index===!1?"noindex":"index"),t.push(e.follow===!1?"nofollow":"follow"),e.noarchive&&t.push("noarchive"),e.nosnippet&&t.push("nosnippet"),e.noimageindex&&t.push("noimageindex"),e.maxSnippet!=null&&t.push(`max-snippet:${e.maxSnippet}`),e.maxImagePreview&&t.push(`max-image-preview:${e.maxImagePreview}`),e.maxVideoPreview!=null&&t.push(`max-video-preview:${e.maxVideoPreview}`),t.join(", ")}function Ms(){let e=[],[t,r]=b(0);return{sources:e,version:t,push(n){return e.push(n),r(o=>o+1),()=>{let o=e.indexOf(n);o!==-1&&(e.splice(o,1),r(s=>s+1))}}}}var ln=globalThis[Symbol.for("fluixi.head")]??={active:null,scope:null};function Ls(e){ln.active=e}function Ef(){return ln.scope?.()??ln.active}function Pe(e){let t=Ef();if(!t)return globalThis.process?.env?.NODE_ENV!=="production"&&console.warn("[fluixi/head] useHead() called with no active head registry — ignored."),()=>{};let r=t.push(e);return typeof window<"u"&&T()&&A(r),r}function Xt(e){let t=5381;for(let r=0;r<e.length;r++)t=t*33^e.charCodeAt(r);return(t>>>0).toString(36)}function Tf(e){return e.charset!=null?"meta:charset":e.property?"meta:property:"+e.property:e.name?"meta:name:"+e.name:e["http-equiv"]?"meta:http-equiv:"+e["http-equiv"]:"meta:"+Xt(JSON.stringify(e))}function Cf(e,t){let r=typeof t=="string"?{url:t}:t;e.push({tag:"meta",key:"meta:property:og:image:"+r.url,attrs:{property:"og:image",content:r.url}}),r.secureUrl&&e.push({tag:"meta",key:"meta:property:og:image:secure:"+r.url,attrs:{property:"og:image:secure_url",content:r.secureUrl}}),r.type&&e.push({tag:"meta",key:"meta:property:og:image:type:"+r.url,attrs:{property:"og:image:type",content:r.type}}),r.width!=null&&e.push({tag:"meta",key:"meta:property:og:image:width:"+r.url,attrs:{property:"og:image:width",content:String(r.width)}}),r.height!=null&&e.push({tag:"meta",key:"meta:property:og:image:height:"+r.url,attrs:{property:"og:image:height",content:String(r.height)}}),r.alt&&e.push({tag:"meta",key:"meta:property:og:image:alt:"+r.url,attrs:{property:"og:image:alt",content:r.alt}})}function Rf(e,t){let r=(n,o)=>{o!=null&&t.push({tag:"meta",key:"meta:property:og:"+n,attrs:{property:"og:"+n,content:o}})};r("title",e.title),r("description",e.description),r("type",e.type),r("url",e.url),r("site_name",e.siteName),r("locale",e.locale);for(let n of e.localeAlternate??[])t.push({tag:"meta",key:"meta:property:og:locale:alt:"+n,attrs:{property:"og:locale:alternate",content:n}});if(e.image!=null){let n=Array.isArray(e.image)?e.image:[e.image];for(let o of n)Cf(t,o)}if(e.video){let n=typeof e.video=="string"?{url:e.video}:e.video;r("video",n.url),"type"in n&&n.type&&r("video:type",n.type),"width"in n&&n.width!=null&&r("video:width",String(n.width)),"height"in n&&n.height!=null&&r("video:height",String(n.height))}if(e.audio){let n=typeof e.audio=="string"?{url:e.audio}:e.audio;r("audio",n.url),"type"in n&&n.type&&r("audio:type",n.type)}if(e.article){let n=e.article;r("article:published_time",n.publishedTime),r("article:modified_time",n.modifiedTime),r("article:expiration_time",n.expirationTime),r("article:section",n.section);for(let o of[].concat(n.author??[]))t.push({tag:"meta",key:"meta:property:og:article:author:"+o,attrs:{property:"article:author",content:o}});for(let o of[].concat(n.tag??[]))t.push({tag:"meta",key:"meta:property:og:article:tag:"+o,attrs:{property:"article:tag",content:o}})}if(e.book){let n=e.book;r("book:isbn",n.isbn),r("book:release_date",n.releaseDate);for(let o of[].concat(n.author??[]))t.push({tag:"meta",key:"meta:property:og:book:author:"+o,attrs:{property:"book:author",content:o}});for(let o of[].concat(n.tag??[]))t.push({tag:"meta",key:"meta:property:og:book:tag:"+o,attrs:{property:"book:tag",content:o}})}if(e.profile){let n=e.profile;r("profile:first_name",n.firstName),r("profile:last_name",n.lastName),r("profile:username",n.username),r("profile:gender",n.gender)}}function Pf(e,t){let r=(n,o)=>{o!=null&&t.push({tag:"meta",key:"meta:name:twitter:"+n,attrs:{name:"twitter:"+n,content:o}})};r("card",e.card),r("site",e.site),r("creator",e.creator),r("title",e.title),r("description",e.description),r("image",e.image),r("image:alt",e.imageAlt),r("player",e.player),e.playerWidth!=null&&r("player:width",String(e.playerWidth)),e.playerHeight!=null&&r("player:height",String(e.playerHeight)),e.app&&(r("app:name:iphone",e.app.name),r("app:id:iphone",e.app.idIphone),r("app:id:ipad",e.app.idIpad),r("app:id:googleplay",e.app.idGooglePlay))}function $f(e,t){let r=(n,o)=>t.push({tag:"link",key:n,attrs:o});if(e.icon!=null){let n=typeof e.icon=="string"?[{url:e.icon}]:e.icon;for(let o of n)r("link:icon:"+o.url,{rel:"icon",href:o.url,...o.type?{type:o.type}:{},...o.sizes?{sizes:o.sizes}:{}})}if(e.apple!=null){let n=typeof e.apple=="string"?[{url:e.apple}]:e.apple;for(let o of n)r("link:apple-touch-icon:"+o.url,{rel:"apple-touch-icon",href:o.url,...o.sizes?{sizes:o.sizes}:{}})}e.mask&&r("link:mask-icon",{rel:"mask-icon",href:e.mask.url,...e.mask.color?{color:e.mask.color}:{}}),e.shortcut&&r("link:shortcut",{rel:"shortcut icon",href:e.shortcut}),e.msTileImage&&t.push({tag:"meta",key:"meta:name:msapplication-TileImage",attrs:{name:"msapplication-TileImage",content:e.msTileImage}}),e.msTileColor&&t.push({tag:"meta",key:"meta:name:msapplication-TileColor",attrs:{name:"msapplication-TileColor",content:e.msTileColor}})}function Nf(e,t,r){let n=(d,h)=>t.push({tag:"meta",key:d,attrs:h}),o=oe(e.title);o!==void 0&&(r.title=o),e.titleTemplate!==void 0&&(r.template=e.titleTemplate);let s=oe(e.lang);s!==void 0&&t.push({tag:"htmlAttr",key:"html:lang",name:"lang",value:s});for(let[d,h]of Object.entries(e.htmlAttrs??{})){let y=oe(h);y!==void 0&&t.push({tag:"htmlAttr",key:`html:${d}`,name:d,value:y})}e.charset!==void 0&&n("meta:charset",{charset:e.charset}),e.viewport!==void 0&&n("meta:name:viewport",{name:"viewport",content:e.viewport});let i=oe(e.description);i!==void 0&&n("meta:name:description",{name:"description",content:i});let a=oe(e.keywords);a!==void 0&&n("meta:name:keywords",{name:"keywords",content:Array.isArray(a)?a.join(", "):a}),e.author!==void 0&&n("meta:name:author",{name:"author",content:e.author}),e.robots!==void 0&&n("meta:name:robots",{name:"robots",content:Of(e.robots)}),e.generator!==void 0&&n("meta:name:generator",{name:"generator",content:e.generator}),e.applicationName!==void 0&&n("meta:name:application-name",{name:"application-name",content:e.applicationName}),e.referrer!==void 0&&n("meta:name:referrer",{name:"referrer",content:e.referrer});let c=oe(e.colorScheme);c!==void 0&&n("meta:name:color-scheme",{name:"color-scheme",content:c});let u=oe(e.themeColor);if(typeof u=="string")n("meta:name:theme-color",{name:"theme-color",content:u});else if(u)for(let{color:d,media:h}of u)n(`meta:name:theme-color${h?`:${h}`:""}`,h?{name:"theme-color",content:d,media:h}:{name:"theme-color",content:d});let f=oe(e.canonical);if(f!==void 0&&t.push({tag:"link",key:"link:rel:canonical",attrs:{rel:"canonical",href:f}}),e.manifest!==void 0&&t.push({tag:"link",key:"link:rel:manifest",attrs:{rel:"manifest",href:e.manifest}}),e.base!==void 0&&t.push({tag:"base",key:"base",attrs:{href:e.base}}),e.verification){let d={google:"google-site-verification",bing:"msvalidate.01",yandex:"yandex-verification",pinterest:"p:domain_verify"};for(let[h,y]of Object.entries(e.verification)){if(y==null)continue;let p=d[h]??h;n("meta:name:"+p,{name:p,content:y})}}for(let d of e.alternates??[])t.push({tag:"link",key:"link:alternate:hreflang:"+d.hreflang,attrs:{rel:"alternate",hreflang:d.hreflang,href:d.href}});for(let d of e.feeds??[])t.push({tag:"link",key:"link:alternate:feed:"+d.href,attrs:{rel:"alternate",type:d.type??"application/rss+xml",href:d.href,...d.title?{title:d.title}:{}}});e.og&&Rf(e.og,t),e.twitter&&Pf(e.twitter,t),e.icons&&$f(e.icons,t);let l=oe(e.jsonLd);if(l!==void 0){let d=Array.isArray(l)?l:[l];for(let h of d){let y=JSON.stringify(h);t.push({tag:"script",key:"script:ldjson:"+Xt(y),attrs:{type:"application/ld+json"},children:y})}}for(let d of e.meta??[]){let h={};for(let[y,p]of Object.entries(d))p!=null&&(h[y==="httpEquiv"?"http-equiv":y]=p);t.push({tag:"meta",key:Tf(h),attrs:h})}for(let d of e.link??[]){let h={};for(let[y,p]of Object.entries(d))p!=null&&(h[y]=p);t.push({tag:"link",key:"link:"+(h.rel??"")+":"+(h.href??Xt(JSON.stringify(h))),attrs:h})}for(let d of e.script??[]){let h={},y;for(let[p,v]of Object.entries(d))v!=null&&(p==="children"?y=v:h[p]=v);t.push({tag:"script",key:"script:"+(h.src??Xt((y??"")+JSON.stringify(h))),attrs:h,children:y})}}function Mf(e,t){return typeof e=="function"?e(t):e.includes("%s")?e.replace("%s",t):e}function Lf(e){let t=[],r={};for(let s of e.sources){let i=typeof s=="function"?s():s;Nf(i,t,r)}r.title!==void 0&&t.push({tag:"title",key:"title",children:r.template?Mf(r.template,r.title):r.title});let n=new Map,o={};for(let s of t){if(s.tag==="htmlAttr"){o[s.name]=s.value;continue}n.set(s.key,s)}return{tags:[...n.values()],htmlAttrs:o}}var dn="data-fh",pn="data-fh-key";function Is(e){for(let t=e.firstChild;t;t=t.nextSibling)if(t.nodeType===8&&t.data.startsWith("fh:")){t.parentNode?.removeChild(t);return}}function Ds(e,t){for(let r of Array.from(e.attributes))r.name===dn||r.name===pn||r.name in t||e.removeAttribute(r.name);for(let[r,n]of Object.entries(t))e.getAttribute(r)!==n&&e.setAttribute(r,n)}function If(e){let t=document.createElement(e.tag);return Ds(t,e.attrs),t.setAttribute(dn,""),t.setAttribute(pn,e.key),e.tag==="script"&&e.children!=null&&(t.textContent=e.children),t}function Df(e,t){let r=document.head,n=new Map;for(let i of Array.from(r.querySelectorAll(`[${dn}]`))){let a=i.getAttribute(pn);i.tagName!=="TITLE"&&a&&n.set(a,i)}let o=null,s=new Set;for(let i of e){if(i.tag==="title"){o=i.children;continue}if(i.tag==="htmlAttr")continue;s.add(i.key);let a=n.get(i.key);a&&a.tagName===i.tag.toUpperCase()?(Ds(a,i.attrs),i.tag==="script"&&(a.textContent??"")!==(i.children??"")&&(a.textContent=i.children??"")):(a&&a.remove(),r.appendChild(If(i)))}for(let[i,a]of n)s.has(i)||a.remove();o!=null&&document.title!==o&&(document.title=o);for(let[i,a]of Object.entries(t))document.documentElement.getAttribute(i)!==a&&document.documentElement.setAttribute(i,a)}function qs(e){return D(t=>(_(()=>{e.version();let{tags:r,htmlAttrs:n}=Lf(e);Df(r,n)}),A(()=>{}),t))}var qf={};_f(qf,{Base:()=>Kf,JsonLD:()=>Ff,Link:()=>Wf,Meta:()=>Hf,Script:()=>jf,Title:()=>Vf});function Xe(e){return typeof e=="function"?e():e}function Vf(e){return Pe(()=>({title:Xe(e.children)})),null}function Hf(e){return Pe(()=>({meta:[{...e,content:Xe(e.content)}]})),null}function Wf(e){return Pe(()=>{let t={};for(let[r,n]of Object.entries(e))t[r]=Xe(n);return{link:[t]}}),null}function jf(e){return Pe(()=>{let t={};for(let[r,n]of Object.entries(e))t[r]=Xe(n);return{script:[t]}}),null}function Kf(e){return Pe({base:e.href}),null}function Ff(e){return Pe(()=>({jsonLd:Xe(e.data)})),null}function ca(e,t){if(!t)throw new Error("Container element not found for mount()");Yr(()=>e(),t)}var aa=e=>w(()=>Te(e));async function ua(e,t={}){let r=typeof t.root=="string"?document.querySelector(t.root):t.root??document.querySelector("#app");if(!r)throw new Error(`[Fluixi] Mount container not found: ${t.root??"#app"}`);let n=!!document.getElementById("__FLUIXI_HYDRATION__")||!!t.routes&&r.firstElementChild!=null,o=t.hydrate??n,s=Ms();if(Ls(s),Is(r),o){Ki();try{if(t.routes&&t.routes.length){let{preloadRoutes:i}=await Promise.resolve().then(()=>(Nn(),sa));await i(t.routes,window.location.pathname)}Ns(),un(!0),Vt(aa(e),r),vl()}finally{Fi()}setTimeout(()=>{un(!1),Ji(r)&&typeof process<"u",Br(),fn()},100)}else Re(aa(e),r);qs(s)}function vl(){if(typeof window>"u")return;let e=window;typeof e.__FX_REPLAY_STOP__=="function"&&e.__FX_REPLAY_STOP__();let t=e.__FX_REPLAY__;if(e.__FX_REPLAY__=void 0,e.__FX_REPLAY_STOP__=void 0,!(!Array.isArray(t)||t.length===0))for(let r of t){let n=r&&r.target;if(!n||n.isConnected===!1||typeof n.dispatchEvent!="function")continue;let o=r.type,s=o==="click"?new MouseEvent(o,{bubbles:!0,cancelable:!0}):new Event(o,{bubbles:!0,cancelable:!0});n.dispatchEvent(s)}}Nn();return ha(wl);})();
|
|
1
|
+
/*! @fluixi/core v1.0.0-alpha.95 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
|
+
"use strict";var Fluixi=(()=>{var sr=Object.defineProperty;var va=Object.getOwnPropertyDescriptor;var wa=Object.getOwnPropertyNames;var ba=Object.prototype.hasOwnProperty;var F=(e,t)=>()=>(e&&(t=e(e=0)),t);var Hn=(e,t)=>{for(var r in t)sr(e,r,{get:t[r],enumerable:!0})},Sa=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of wa(t))!ba.call(e,o)&&o!==r&&sr(e,o,{get:()=>t[o],enumerable:!(n=va(t,o))||n.enumerable});return e};var Aa=e=>Sa(sr({},"__esModule",{value:!0}),e);function Gn(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:xa,onSuspend:null,onError:null,observer:null}}function ka(e){let t=Gn(),r=e;for(let n of Object.keys(t))n in e||(r[n]=t[n]);return e}function _a(){let e=it[Wn];return e?ka(e):it[Wn]=Gn()}function Zn(){return[...new Set(it[Xn]??[])]}function Oa(e){return m.observer=e,()=>{m.observer===e&&(m.observer=null)}}function pr(e){let t=m.observer;t&&t.created(e.parents===void 0?{...e,parents:J,origin:e.origin??Ea,scope:e.scope??Kn}:{...e,scope:e.scope??Kn})}function Ta(e){return m.observer?(J.push(e),!0):!1}function Ra(){J.pop()}function Ca(e){m.observer?.ran?.(e)}function Pa(e,t){m.observer?.wrote?.(e,t)}function Z(e,t,r,n){let o=m.observer;!o?.bound||!J.length||o.bound(J[J.length-1],e,t,r,n)}function Q(e,t,r,n){let o=m.observer;!o?.directive||!J.length||o.directive(J[J.length-1],e,t,r,n)}function $a(e){m.observer?.contextCreated?.(e)}function cr(e,t,r){let n=m.observer;!n?.context||!J.length||n.context(J[J.length-1],e,t,r)}function yr(e){m.observer?.disposed?.(e)}function Qn(){return m.observer!=null}function ur(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}function Ia(e){if(m.untracked)return e();m.untracked=!0;try{return e()}finally{m.untracked=!1}}function Ae(e){let t=Ve(e);return e&&(e.owned??=[]).push(t),t}function xe(e,t=!0){qe(e,t)}function ro(e){return!!e&&e.disposed===!0}function Ve(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function ee(e,t){let r=Symbol(t??"context");return $a(r),{id:r,defaultValue:e,Provider:o=>{cr(r,"provide",o.value);let a=m.owner,i=Ve(a);(i.contexts=new Map).set(r,o.value),a&&(a.owned??=[]).push(i),m.owner=i;try{return o.children}finally{m.owner=a}}}}function K(e){let t=m.owner;for(;t;){if(t.contexts&&t.contexts.has(e.id)){let r=t.contexts.get(e.id);return cr(e.id,"read",r),r}t=t.parent}return cr(e.id,"read",e.defaultValue),e.defaultValue}function no(e,t){let r=e;for(;r;){if(r.contexts&&r.contexts.has(t.id))return r.contexts.get(t.id);r=r.parent}return t.defaultValue}function oo(e,t,r){let n=Ve(m.owner);(n.contexts=new Map).set(e.id,t),m.owner&&(m.owner.owned??=[]).push(n);let o=m.owner;m.owner=n;try{return r()}finally{m.owner=o}}function Da(e){m.onSuspend=e}function qa(e){return m.onSuspend?(m.onSuspend(e,m.owner),!0):!1}function Va(e){m.onError=e}function T(){return m.owner}function io(e){let t=m.owner;return m.owner=e,t}function L(e,t){let r=m.owner;m.owner=e;try{return t()}finally{m.owner=r}}function A(e){if(m.owner){if(m.owner.disposed){e();return}(m.owner.cleanups??=[]).push(e)}}function qe(e,t=!0){if(!e.disposed){if(e.owned){for(let r=e.owned.length-1;r>=0;r--)qe(e.owned[r]);e.owned=null}if(e.cleanups){for(let r=e.cleanups.length-1;r>=0;r--)e.cleanups[r]();e.cleanups=null}t&&(e.disposed=!0)}}function W(e){let t=Ve(m.owner);m.owner&&(m.owner.owned??=[]).push(t);let r=m.owner;m.owner=t;try{return e(()=>qe(t))}finally{m.owner=r}}function Ha(e){m.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Wa(e){e.queued||(e.queued=!0,m.queue.push(e),!m.scheduled&&m.batchDepth===0&&(m.scheduled=!0,m.hostSchedule(at)))}function at(){if(m.scheduled=!1,m.flushing)return;m.flushing=!0;let e=0;try{for(;m.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=m.queue;m.queue=[];for(let r of t)r.queued=!1,r.disposed||r.run()}}finally{m.flushing=!1}}function Ka(){m.batchDepth===0&&at()}function ja(e){m.batchDepth++;try{return e()}finally{--m.batchDepth===0&&at()}}function hr(e,t=!1,r){let n=new Fa(e,t,r);return()=>n.dispose()}function Ua(e){return!!e&&typeof e.then=="function"}function b(e,t){let r=new Ma(e,{equals:t?.equals}),n=(()=>r.get()),o=(a=>{let i=typeof a=="function"?a(r.peek()):a;return r.set(i),Ka(),i});return Object.defineProperty(n,so,{value:!0,enumerable:!0}),Object.defineProperty(n,Ba,{value:{get value(){return r.peek()},get version(){return r.version}},enumerable:!1}),pr({kind:"signal",node:r,handle:n,name:t?.name,set:o}),Qn()&&A(()=>yr(r)),[n,o]}function v(e,t,r){let n=t,o=T(),a=new to(()=>L(o,()=>{try{return n=e(n)}catch(s){if(Ua(s))return qa(s),n;throw s}}),{equals:r?.equals}),i=(()=>a.get());return Object.defineProperty(i,so,{value:!0,enumerable:!0}),Object.defineProperty(i,za,{value:!0,enumerable:!0}),pr({kind:"memo",node:a,handle:i,name:r?.name}),Qn()&&A(()=>yr(a)),i}function k(e,t,r){let n=t;return hr(()=>{n=e(n)},!0,r?.name)}function ao(e,t){let r=t;hr(()=>{r=e(r)})}function R(e,t){let r=t;return hr(()=>{r=e(r)})}function D(e){return ja(e)}function O(e){return Ia(e)}function co(){return at(),Promise.resolve()}function uo(e,t,r){let n=[];return A(()=>{for(let o of n)o.dispose();n=[]}),v(()=>{let o=e()||[];return O(()=>{if(o.length===0){for(let u of n)u.dispose();return n=[],r?.fallback?r.fallback():[]}let a=new Map;for(let u of n)a.has(u.item)||a.set(u.item,u);let i=[],s=new Set;for(let u=0;u<o.length;u++){let c=o[u],f=a.get(c);if(f&&!s.has(f))f.setIndex(u),i.push(f),s.add(f);else{let l,d,h;W(p=>{h=p;let[w,_]=b(u,{name:"row index"});d=_,l=t(c,w)});let y={item:c,rendered:l,dispose:h,setIndex:d};i.push(y),s.add(y)}}for(let u of n)s.has(u)||u.dispose();return n=i,i.map(u=>u.rendered)})},void 0,{name:"mapArray"})}function fo(e,t,r,n){let o=[],a=[];return A(()=>{for(let i of a)i.dispose();o=[],a=[]}),v(()=>{let i=e()||[];return O(()=>{if(i.length===0){for(let l of a)l.dispose();return o=[],a=[],n?.fallback?n.fallback():[]}let s=new Map;for(let l=0;l<o.length;l++)s.set(o[l],a[l]);let u=[],c=[],f=new Set;for(let l=0;l<i.length;l++){let d=t(i[l]),h=s.get(d);if(h&&!f.has(d))h.setIndex(l),u.push(h);else{let y,p,w;W(_=>{w=_;let[S,I]=b(l,{name:"row index"});p=I;let M=v(P=>{let G=(e()||[])[S()];return G??P},i[l]);y=r(M,S)}),u.push({rendered:y,dispose:w,setIndex:p})}c.push(d),f.add(d)}for(let[l,d]of s)f.has(l)||d.dispose();return o=c,a=u,u.map(l=>l.rendered)})},void 0,{name:"keyArray"})}function lo(e,t,r){let n=[];return A(()=>{for(let o of n)o.dispose();n=[]}),v(()=>{let o=e()||[];return O(()=>{if(o.length===0){for(let u of n)u.dispose();return n=[],r?.fallback?r.fallback():[]}let a=n.length,i=o.length;for(let u=a;u<i;u++){let c,f,l,d=o[u];W(h=>{l=h;let[y,p]=b(d);f=p,c=t(y,u)}),n.push({rendered:c,setItem:f,dispose:l})}for(let u=i;u<a;u++)n[u].dispose();i<a&&(n=n.slice(0,i));let s=Math.min(a,i);for(let u=0;u<s;u++)n[u].setItem(o[u]);return n.map(u=>u.rendered)})},void 0,{name:"indexArray"})}function V(e){return typeof e=="function"&&e[Xa]===!0}function Ga(e){zn&&zn(e)}function po(e){fr=e}function Za(e){return fr?fr(e):void 0}function yo(e){lr=e}function Qa(){return lr?lr():void 0}function ec(e,t){Bn&&Bn(e,t)}function Jn(){let e=new Map,t=new Map;return{get:r=>e.get(r),set:(r,n)=>{e.set(r,n)},delete:r=>{e.delete(r)},keys:()=>e.keys(),clear:()=>{e.clear(),t.clear()},inflight:t}}function ct(){let e=tc?.();return e||(typeof window>"u"?Jn():rc??=Jn())}function ho(e,t=(r,n)=>r===n){let r=new Map;return k(()=>{let n=e();for(let[o,a]of r){let[i,s]=a,u=t(o,n);i()!==u&&s(u)}}),n=>{let o=r.get(n);if(!o){let[a,i]=b(!1);o=[a,i],r.set(n,o);let s=e();i(t(n,s))}return o[0]()}}function mo(e,t){let[r,n]=b(e(),t);return k(()=>{let o=e();t?.timeoutMs?setTimeout(()=>n(()=>o),t.timeoutMs):typeof requestIdleCallback=="function"?requestIdleCallback(()=>n(()=>o)):Promise.resolve().then(()=>n(()=>o))}),r}function go(e,t){let r,n=(...o)=>{r!==void 0&&clearTimeout(r),r=setTimeout(()=>{r=void 0,e(...o)},t)};return A(()=>{r!==void 0&&clearTimeout(r)}),n}function nc(e){return!!e&&typeof e.then=="function"}function ce(e,t,r={}){let n,o;typeof t=="function"?(n=typeof e=="function"?e:()=>e,o=t):(n=()=>!0,o=e,t&&typeof t=="object"&&(r=t));let a=r.transport===!1?void 0:Qa(),i=a!==void 0?Za(a):void 0,s=i!==void 0,[u,c]=b(i!==void 0?i.value:r.initialValue,{equals:!1}),[f,l]=b(void 0,{equals:!1}),[d,h]=b(i!==void 0||r.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[y,p]=b(void 0,{equals:!1}),[w,_]=b(void 0,{equals:!1}),S=ar,I=!1;k(()=>{let $=n();if(w(),$===!1||$===null||$===void 0){S=ar,D(()=>{h("unresolved"),p(void 0),l(void 0)});return}let G=I;if(I=!1,S!==ar&&$===S&&!G)return;if(S=$,s){s=!1;return}let ye=!1;A(()=>ye=!0);let Se=O(d),ga=O(u),Vn=Se==="ready"||Se==="refreshing";D(()=>{h(Vn?"refreshing":"pending"),l(void 0)});try{let he=o($,{value:ga,refetching:Vn});nc(he)?(p(he),Ga(he),he.then(ot=>{ye||(a!==void 0&&ec(a,ot),D(()=>{c(()=>ot),h("ready"),p(void 0)}))},ot=>{ye||D(()=>{l(ot),h("errored"),p(void 0)})})):D(()=>{c(()=>he),h("ready"),p(void 0)})}catch(he){if(ye)return;D(()=>{l(he),h("errored"),p(void 0)})}});let M=()=>{let $=d();return $==="pending"||$==="refreshing"},P=(()=>{let $=f();if($)throw $;if(M()){let G=y();if(G)throw G}return u()});return Object.defineProperties(P,{state:{get:d},loading:{get:M},error:{get:f},latest:{get:u}}),Object.defineProperty(P,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(P,Symbol.for("signal"),{value:!0,enumerable:!0}),[P,{mutate:c,refetch:()=>{I=!0,_(void 0)}}]}function st(e){if(typeof e=="function"&&!e.length){let t=e();return V(t)?t:st(t)}if(Array.isArray(e)){let t=[];for(let r=0;r<e.length;r++){let n=st(e[r]);Array.isArray(n)?t.push.apply(t,n):t.push(n)}return t}return e}function He(e){let t=v(e);return Ya?v(()=>st(t()),void 0,{name:"children"}):v(()=>st(t()))}function wo(){let[e,t]=b(0),r=0;return{increment:()=>t(r+=1),decrement:()=>t(r-=1),inFallback:()=>e()>0}}function mr(e,t){return oo(vo,e,t)}function So(){let[e,t]=b(void 0,{equals:!1});return{error:e,reset:()=>t(()=>{}),setError:n=>t(()=>n)}}function Ao(e,t){return oo(bo,e,t)}var dr,Yn,Wn,Xn,xa,it,m,J,Ea,Kn,Na,jn,Fn,Un,De,eo,Ma,to,La,Fa,so,za,Ba,Ja,Ya,Xa,zn,fr,lr,Bn,tc,rc,ar,vo,bo,ke,x=F(()=>{"use strict";dr="1.0.0-alpha.95",Yn=dr.split(".")[0],Wn=`__fluixi_signal_state_v${Yn}__`,Xn=`__fluixi_signal_builds_v${Yn}__`,xa=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};it=globalThis;m=_a();(it[Xn]??=[]).push(dr);J=[];Na="__FLUIXI_DEVTOOLS_HOOK__",jn=globalThis[Na];if(typeof jn?.inject=="function")try{jn.inject({observeReactiveNodes:Oa,version:dr})}catch{}Fn=0,Un=1,De=2,eo=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(m.untracked)return;let e=m.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}},Ma=class extends eo{constructor(e,t){super(),this._value=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){return this.track(),this._value}set(e){if(!this._equals(this._value,e)){if(this._value=e,this.version++,Pa(this,m.consumer),this.observers)for(let t of[...this.observers])t.markDirty(De);ur(this)}}peek(){return this._value}},to=class extends eo{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=De,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(m.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===Un&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===De)break}(this.state===De||!this._initialized)&&this.recompute(),this.state=Fn}recompute(){if(this.sources){for(let s of this.sources)s.observers?.delete(this);this.sources.clear()}let e=m.consumer,t=m.untracked,r=Ta(this);m.consumer=this,m.untracked=!1;let n,o=!1,a;try{n=this._fn()}catch(s){o=!0,a=s,n=this._value}finally{m.consumer=e,m.untracked=t,r&&Ra()}let i=!this._initialized||this._threw!==o||(o?a!==this._error:!this._equals(this._value,n));if(this._initialized=!0,this._threw=o,this._error=a,this._value=n,Ca(this),i){if(this.version++,this.observers)for(let s of[...this.observers])s.markDirty(De);ur(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===Fn;if(this.state=e,t){if(this.observers)for(let r of[...this.observers])r.markDirty(Un);ur(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};La=class{constructor(e){this._watched=new Set,this._pending=new Set,this._notifyFn=e}watch(...e){for(let t of e)this._watched.add(t),(t.watchers??=new Set).add(this)}unwatch(...e){for(let t of e)this._watched.delete(t),t.watchers?.delete(this),this._pending.delete(t)}getPending(){let e=[...this._pending];return this._pending.clear(),e}_notify(e){if(!this._watched.has(e)||this._pending.has(e))return;let t=this._pending.size===0;this._pending.add(e),t&&this._notifyFn()}};Fa=class{constructor(e,t=!1,r){this.queued=!1,this.disposed=!1,this.owner=Ve(m.owner),m.owner&&(m.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new to(()=>{qe(this.owner,!1),L(this.owner,()=>{let n=e();typeof n=="function"&&(this.owner.cleanups??=[]).push(n)})}),pr({kind:"effect",node:this.computed,handle:this,internal:!t,...r?{name:r}:{}}),this.watcher=new La(()=>Wa(this)),this.run(),this.watcher.watch(this.computed)}run(){if(!this.disposed){this.watcher.getPending();try{this.computed.get()}catch(e){if(e&&typeof e.then=="function"&&m.onSuspend){m.onSuspend(e,this.owner);return}if(m.onError&&m.onError(e,this.owner))return;throw e}}}dispose(){this.disposed||(this.disposed=!0,yr(this.computed),this.watcher.unwatch(this.computed),qe(this.owner))}};Ha(()=>{});so=Symbol.for("signal"),za=Symbol.for("memo"),Ba=Symbol.for("signal-node");Ja=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0,Ya=typeof process>"u"?Ja:!1,Xa=Symbol.for("signal");zn=null;fr=null;lr=null;Bn=null;tc=null;ar=Symbol();vo=ee();Da((e,t)=>{let r=no(t,vo);r&&(r.increment(),e.finally(()=>r.decrement()))});bo=ee();Va((e,t)=>{let r=no(t,bo);return r?(r.setError(e),!0):!1});ke=Symbol.for("fluixi-proxy")});var Zo,Qo=F(()=>{"use strict";Zo="1.0.0-alpha.95"});function yi(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Bc,onSuspend:null,onError:null,observer:null}}function Jc(e){let t=yi(),r=e;for(let n of Object.keys(t))n in e||(r[n]=t[n]);return e}function Yc(){let e=Rr[ei];return e?Jc(e):Rr[ei]=yi()}function Xc(e){return N.observer=e,()=>{N.observer===e&&(N.observer=null)}}function Gc(e,t){if(!N.observer)return t();let r=bt;bt=e;try{return t()}finally{bt=r}}function Zc(e){let t=N.observer;t&&t.created(e.parents===void 0?{...e,parents:me,origin:e.origin??bt,scope:e.scope??ti}:{...e,scope:e.scope??ti})}function hi(e){let t=N.observer;!t?.props||!me.length||!e||t.props(me[me.length-1],e)}function Qc(e){N.observer?.contextCreated?.(e)}function eu(e,t,r){let n=N.observer;!n?.context||!me.length||n.context(me[me.length-1],e,t,r)}function ri(e,t,r){N.observer?.moved?.(e,t,r)}function ni(e){N.observer?.disposed?.(e)}function mi(){return N.observer!=null}function ru(e){if(N.untracked)return e();N.untracked=!0;try{return e()}finally{N.untracked=!1}}function nu(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function gi(e,t){let r=Symbol(t??"context");return Qc(r),{id:r,defaultValue:e,Provider:o=>{eu(r,"provide",o.value);let a=N.owner,i=nu(a);(i.contexts=new Map).set(r,o.value),a&&(a.owned??=[]).push(i),N.owner=i;try{return o.children}finally{N.owner=a}}}}function vi(e,t){let r=e;for(;r;){if(r.contexts&&r.contexts.has(t.id))return r.contexts.get(t.id);r=r.parent}return t.defaultValue}function ou(e){N.onSuspend=e}function iu(e){N.onError=e}function su(e){N.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function wi(e){return ru(e)}function bi(e){return typeof e=="function"&&e[au]===!0}function fu(e,t){if(!Ee(e)||!mi())return;let r=new Set,n=i=>{if(!(!Ee(i)||r.has(i))){r.add(i);for(let s of Object.values(i))n(s)}};n(kt.get(t)??t);let o=new Set,a=i=>{if(!Ee(i))return;let s=i;if(r.has(s)||o.has(s))return;o.add(s);let u=Ke.get(s);if(u){for(let c of u.keys.values())ni(c);u.all&&ni(u.all),Ke.delete(s),Te.delete(s),Cr.delete(s)}for(let c of Object.values(s))a(c)};a(e)}function Si(e,t,r){let n=t?.owner,o=n&&r!==void 0?_t(n.name,r,t?.array):void 0,[a,i]=Gc(n?.store,()=>b(e,o?{name:o}:void 0)),s=a;return s.$=i,s}function Ot(e){let t=Ke.get(e);return t?t.owner||(t.owner=Te.get(e)):Ke.set(e,t={keys:new Map,owner:Te.get(e),array:Array.isArray(e)}),t}function ui(e,t,r){let n=e.keys.get(t);return n||e.keys.set(t,n=Si(r,e,t)),n}function lu(e,t,r,n){let o=Te.get(e);if(o&&o.store===t&&o.name===r)return;let a={store:t,name:r};Te.set(e,a),kt.set(e,kt.get(n)??n);let i=Ke.get(e);if(i&&(i.owner=a,!!mi())){for(let[s,u]of i.keys)ri(u,t,_t(r,s,i.array));i.all&&ri(i.all,t,_t(r,"*",i.array))}}function fi(e){let t=Ot(e);(t.all||(t.all=Si(void 0,t,"*")))()}function li(e,t){e.$(typeof t=="function"?()=>t:t)}function Ee(e){if(e==null||typeof e!="object")return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function St(e){if(!Ee(e))return e;let t=Cr.get(e);if(t)return t;let r=new Proxy(e,du);return Cr.set(e,r),r}function Ai(e,t=new Set){if(e==null||typeof e!="object")return e;let r=e[xt]??e;if(t.has(r)||!Ee(r))return r;t.add(r);let n=!1,o=i=>{let s=Ai(i,t);return s!==i&&(n=!0),s};if(Array.isArray(r)){let i=r.map(o);return n?i:r}let a={};for(let i of Object.keys(r))a[i]=o(r[i]);return n?a:r}function re(e,t,r){let n=Ai(r),o=e[t];if(o===n&&(n!==void 0||t in e))return;let a=Array.isArray(e),i=a?e.length:0;n===void 0?delete e[t]:e[t]=n;let s=Ot(e),u=s.keys.get(t);if(u&&li(u,n),fu(o,e),a&&e.length!==i){let c=s.keys.get("length");c&&li(c,e.length)}s.all&&s.all.$(void 0)}function Pr(e,t){return typeof e=="function"?e(t):e}function $r(e,t){for(let r of Object.keys(t)){let n=t[r],o=e[r];n&&typeof n=="object"&&!Array.isArray(n)&&o&&typeof o=="object"&&!Array.isArray(o)?$r(o,n):re(e,r,n)}}function Tt(e){let t=[],r=e.replace(/\[([^\]]*)\]/g,".$1");for(let n of r.split("."))n.length&&t.push(n);return t}function xi(e,t,r){let n=t.length-1;for(let a=0;a<n;a++){let i=t[a];if(i==="*"){let u=t.slice(a+1);if(Array.isArray(e))for(let c=0;c<e.length;c++)xi(e[c],u,r);return}let s=e[i];(s==null||typeof s!="object")&&(s=/^\d+$/.test(t[a+1])?[]:{},re(e,i,s)),e=s}let o=t[n];if(o==="*"){if(Array.isArray(e))for(let a=0;a<e.length;a++)re(e,a,Pr(r,e[a]));return}re(e,o,Pr(r,e[o]))}function di(e,t,r){xi(e,Tt(t),r)}function pu(e){return Array.isArray(e)&&e.length>0&&e.every(t=>Array.isArray(t)&&t.length>=2&&typeof t[0]=="string")}function At(e,t){for(let r=e.length-1;r>=t.length;r--)re(e,String(r),void 0);e.length!==t.length&&re(e,"length",t.length);for(let r=0;r<t.length;r++)re(e,String(r),t[r])}function yu(e,t){let r=t[0];if(typeof r=="function"&&t.length===1){let n=r(e);n&&n!==e&&$r(e,n);return}if(Array.isArray(r)&&t.length===1){if(pu(r)){for(let n of r)di(e,n[0],n[1]);return}if(Array.isArray(e)){At(e,r);return}if(r.length===0)return;throw new TypeError("[fluixi] set() was given an array that is neither a batch of [path, value] pairs nor a replacement for an array root. Name the path you meant, as in set('items', [...]).")}if(r&&typeof r=="object"&&!Array.isArray(r)&&t.length===1){$r(e,r);return}if(t.length>=3){Nr(e,t.slice(0,-1),t[t.length-1]);return}di(e,String(r),t[1])}function hu(e,t){if(typeof t=="function"){if(!Array.isArray(e))return[];let r=[];for(let n=0;n<e.length;n++)t(e[n],n)&&r.push(n);return r}if(Array.isArray(t))return Array.isArray(e)?t.map(Number):t.map(String);if(t&&typeof t=="object"&&("from"in t||"to"in t||"by"in t)){if(!Array.isArray(e))return[];let r=t.by??1,n=t.from??0,o=t.to??e.length-1,a=[];for(let i=n;i<=o;i+=r)i>=0&&i<e.length&&a.push(i);return a}return t==="*"?Array.isArray(e)?e.map((r,n)=>n):Object.keys(e??{}):[t]}function Nr(e,t,r){if(e==null)return;let[n,...o]=t;if(typeof n=="string"){let i=Tt(n);if(i.length>1){Nr(e,[...i,...o],r);return}}let a=hu(e,n);if(o.length===0){for(let i of a)re(e,i,Pr(r,e[i]));return}for(let i of a){let s=e[i];if(s==null||typeof s!="object"){let u=o[0];s=typeof u=="number"||/^\d+$/.test(String(u))?[]:{},re(e,i,s)}Nr(s,o,r)}}function Mr(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Mr);let t={};for(let r of Object.keys(e))t[r]=Mr(e[r]);return t}function le(e,t){let r=e;for(let n of Tt(t)){if(r==null)return;r=r[n]}return r}function gu(e,t){for(let r of mu)e[r]=t[r].bind(t);e.$=t.reactive.bind(t)}function vu(e,t={immutable:!0}){let r=new ki(e,t);return gu(r.set,r),[r.proxy,r.set]}function wu(e,t={}){return new ki(e,{...t,immutable:!1})}function Et(e){if(e==null||typeof e!="object")return e;let t=e[xt];return t!==void 0?t:e}function bu(e){return O(()=>Et(e))}var Lr,pi,ei,zc,Bc,Rr,N,me,bt,ti,tu,oi,jl,au,cu,uu,xt,ii,si,ai,ci,Ke,Cr,Te,kt,_t,du,ki,mu,Ul,_i=F(()=>{"use strict";x();Lr="1.0.0-alpha.95",pi=Lr.split(".")[0],ei=`__fluixi_signal_state_v${pi}__`,zc=`__fluixi_signal_builds_v${pi}__`,Bc=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};Rr=globalThis;N=Yc();(Rr[zc]??=[]).push(Lr);me=[];tu="__FLUIXI_DEVTOOLS_HOOK__",oi=globalThis[tu];if(typeof oi?.inject=="function")try{oi.inject({observeReactiveNodes:Xc,version:Lr})}catch{}su(()=>{});jl=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0,au=Symbol.for("signal");cu=gi();ou((e,t)=>{let r=vi(t,cu);r&&(r.increment(),e.finally(()=>r.decrement()))});uu=gi();iu((e,t)=>{let r=vi(t,uu);return r?(r.setError(e),!0):!1});xt=Symbol("store-raw"),ii=Symbol("store-node"),si=Symbol("store-has"),ai=Symbol("store-self"),ci=Symbol("store-track"),Ke=new WeakMap,Cr=new WeakMap,Te=new WeakMap,kt=new WeakMap;_t=(e,t,r)=>r?`${e}[${String(t)}]`:`${e}.${String(t)}`;du={get(e,t,r){if(t===xt||t===ii)return e;if(t===ke)return r;if(t===si)return u=>u in e;if(t==="__proxy")return!0;if(t===ci||t===ai)return fi(e),r;let n=e[t];if(typeof n=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return n;let o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get)return o.get.call(r);let a=Ot(e),i=ui(a,t,n),s=i();return Ee(s)?(a.owner&&lu(s,i,_t(a.owner.name,t,a.array),e),St(s)):s},set(){return!0},deleteProperty(e,t){return t in e&&re(e,t,void 0),!0},has(e,t){return t===xt||t===ke||t===ii||t===si||t===ai||t===ci?!0:(ui(Ot(e),t,e[t])(),t in e)},ownKeys(e){return fi(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};ki=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...r)=>D(()=>yu(this.root,r))),e&&typeof e=="object"&&(Te.set(e,{store:this,name:t.name??"store"}),kt.set(e,e)),Zc({kind:"store",node:this,handle:()=>this.root,name:t.name})}get state(){return St(this.root)}get proxy(){return St(this.root)}get accessor(){return(()=>St(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return Et(this.state);let t=this.state;for(let r of Tt(e)){if(t==null)return;t=t[r]}return Et(t)}select(e){return v(()=>e(this.state))}subscribe(e){return k(()=>e(this.state))}watch(e,t){let r;return k(()=>{let n=e(this.state);Object.is(n,r)||(t(n,r),r=n)})}reactive(e){return v(()=>this.state[e])}produce(e){this.set((t=>{let r=Mr(t);return e(r),r}))}reconcile(e,t={}){this.set(e)}push(e,...t){let r=le(this.root,e);this.set(e,r.concat(t))}pop(e){let t=le(this.root,e).slice(),r=t.pop();return this.set(e,t),r}shift(e){let t=le(this.root,e).slice(),r=t.shift();return this.set(e,t),r}splice(e,t,r,...n){let o=le(this.root,e).slice(),a=o.splice(t,r,...n);return this.set(e,o),a}insert(e,t,r){let n=le(this.root,e).slice();n.splice(t,0,r),this.set(e,n)}removeAt(e,t){let r=le(this.root,e).slice(),n=r.splice(t,1);return this.set(e,r),n}replace(e,t){if(arguments.length>=2){let n=le(this.root,String(e)),o=t;if(Array.isArray(n)&&Array.isArray(o)){At(n,o);return}this.set(e,o);return}let r=this.root;if(Array.isArray(r)&&Array.isArray(e)){At(r,e);return}this.set(e)}clear(e){let t=e===void 0?this.root:le(this.root,e);if(Array.isArray(t)){At(t,[]);return}if(t&&typeof t=="object")for(let r of Object.keys(t))re(t,r,void 0)}toObservable(){let[e]=b(this.state);return e.toObservable()}dispose(){}},mu=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","replace","clear","unwrap","toObservable"];Ul=Object.freeze({createStore:vu,createMutableStore:wu,batch:D,unwrap:Et,untrackStore:bu})});function H(){return Wr.server}function Yr(){if(!Wr.nodes)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return Wr.nodes}function Xr(e){return e!=null&&e[Dt]===!0?!0:typeof Node<"u"&&e instanceof Node}function xu(e){return e!=null&&e[Dt]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function ku(e){return e!=null&&e[Dt]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}function _u(e){return e.localName.includes("-")}function Oi(e,t,r,n=!1){if(r==null){e.removeAttribute(t);return}if(_u(e)){if(H()){Kr(e,t,r);return}e[t]=r;return}C(e,t,r,n)}function Kr(e,t,r){let n=e[Ou]??={};n[t]=r,r==null||r===!1?e.removeAttribute(t):r===!0?e.setAttribute(t,""):(typeof r=="string"||typeof r=="number")&&e.setAttribute(t,String(r))}function Ir(e){return Eu.has(e)||e.startsWith("aria-")||e.startsWith("data-")}function Mi(e,...t){e.classList.add(...t)}function Li(e,...t){e.classList.remove(...t)}function Ii(e,...t){t.forEach(r=>e.classList.toggle(r))}function C(e,t,r,n=!1){if(r==null||r===!1){e.removeAttribute(t);return}if(r===!0){e.setAttribute(t,"");return}if(typeof r=="object"){e.setAttribute(t,JSON.stringify(r));return}e.setAttribute(t,String(r))}function Di(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function qt(e){return e instanceof Node}function qi(e){z.core=e}function Vt(e){z.core&&e.setAttribute("fluixi",z.core),e.setAttribute("fx-dom",z.dom),e.setAttribute("fx-reactive",z.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=z)}function Ht(){let e=Zn();e.length>1&&console.warn(`[fluixi] ${e.length} builds of @fluixi/reactive are driving one reactive graph: ${e.join(", ")}. They share it on purpose, so signals still cross between them, but the oldest one decided what the graph looks like. Build the components on one release, or load them as shared-runtime bundles.`);let t=[z.core,z.dom,z.reactive].filter(r=>r!==void 0);new Set(t).size<=1||console.warn(`[fluixi] package versions disagree: core ${z.core??"(absent)"}, dom ${z.dom}, reactive ${z.reactive}. These ship as one release, so a mismatch usually means a stale lockfile or two copies resolved side by side. Reinstall, or check for duplicates with \`pnpm why @fluixi/dom\`.`)}function Vi(e){return Object.defineProperty(e,Symbol.for("fluixi-provider"),{value:!0,enumerable:!0}),e}function Be(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function Hi(e){return Object.defineProperty(e,Symbol.for("fluixi-suspense"),{value:!0,enumerable:!0}),e}function Ru(e){return typeof e=="function"&&e[Symbol.for("fluixi-router")]===!0}function Cu(e){return typeof e=="function"&&e[Symbol.for("fluixi-routes")]===!0}function Pu(e){return typeof e=="function"&&e[Symbol.for("fluixi-route")]===!0}function $u(e){return typeof e=="function"&&e[Symbol.for("fluixi-outlet")]===!0}function Nu(e){return typeof e=="function"&&e[Symbol.for("fluixi-provider")]===!0}function Mu(e){return typeof e=="function"&&e[Symbol.for("fluixi-context")]===!0}function ie(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}function Lu(e){return typeof e=="function"&&e[Symbol.for("fluixi-suspense")]===!0}function Wi(e){return Ru(e)?{type:"router",value:e}:Pu(e)?{type:"route",value:e}:Cu(e)?{type:"routes",value:e}:$u(e)?{type:"outlet",value:e}:ie(e)?{type:"component",value:e}:Lu(e)?{type:"suspense",value:e}:Nu(e)?{type:"provider",value:e}:Mu(e)?{type:"context",value:e}:{type:"none",value:e}}function qu(){return Du.getStore()}function Vu(e){Ki=e}function jr(){return Ki}function Ti(e,t){return g.active&&t.parentNode===e}function ji(e){let t=g.parents.lastIndexOf(e);t!==-1&&(g.parents.length=t),g.cursor=e.nextSibling}function Hu(e,t){if(!e||e.parentNode==null)return t();let r=g.active,n=g.cursor,o=g.parents;g.active=!0,g.cursor=e,g.parents=[];try{return t()}finally{g.active=r,g.cursor=n,g.parents=o}}function Fi(e){if(!g.active)return e();let t=g.cursor,r=g.parents;g.active=!1,g.parents=[];try{return e()}finally{g.active=!0,g.cursor=t,g.parents=r}}function Ui(e){if(!g.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&ji(t)}function zi(){let e=globalThis;return e[Symbol.for("fluixi.appHydration")]??={pending:0,waiting:new Set}}function Bi(){zi().pending++}function Ji(){let e=zi();if(e.pending>0&&e.pending--,e.pending>0)return;let t=[...e.waiting];e.waiting.clear();for(let r of t)r()}function Yi(e){let t=e;for(;t;){let r=t.contexts?.get(Fr);if(r)return r;if(!t.parent){let n={id:"",next:0};return(t.contexts??=new Map).set(Fr,n),n}t=t.parent}return{id:"",next:0}}function Xi(){return H()?qu()?.hydrationKeys!==!1:g.active}function Ri(e){let t=3735928559,r=1103547991;for(let n=0;n<e.length;n++){let o=e.charCodeAt(n);t=Math.imul(t^o,2654435761),r=Math.imul(r^o,1597334677)}return t=Math.imul(t^t>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),(4294967296*(2097151&r)+(t>>>0)).toString(36)}function Wu(e){if(!Xi())return null;let t=Yi(T()),r=t.id+(t.next++).toString(36);return e?`${Ri(r)}-${e}`:Ri(r)}function Ku(e){let t=e.getAttribute(Fe)??"",r=t.indexOf("-");return r<0?"":t.slice(r+1)}function Gi(e){let t=e.getAttribute(Fe);t&&B?.get(t)===e&&B.delete(t)}function ju(){if(!Xi())return;let e=T();if(!e)return;let t=Yi(e),r={id:t.id+(t.next++).toString(36)+".",next:0};(e.contexts??=new Map).set(Fr,r)}function Fu(e){B??=new Map;for(let t of e.querySelectorAll(`[${Fe}]`)){let r=t.getAttribute(Fe);B.has(r)||B.set(r,t)}}function Zr(){B=null}function Zi(e){if(!B)return 0;let t=0;for(let[r,n]of B){if(!n.isConnected){B.delete(r);continue}e&&!e.contains(n)||n.parentElement?.closest("[data-fx-ssr]")||(B.delete(r),n.remove(),t++)}return t}function Uu(e,t){if(!e||!B)return null;let r=B.get(e);return!r||r.localName!==t.toLowerCase()?null:(B.delete(e),r)}function Dr(e,t){return t&&(e[Bu]=t),e}function Ci(e){let t=T();t&&(e[Ju]=t)}function ve(e){if(!H())for(let t of e)Pt.has(t)||Qr.has(t)||(Pt.add(t),Ur.dispatch??=Xu,document.addEventListener(t,Ur.dispatch))}function Xu(e){let t=`$$${e.type}`,r=e.composedPath&&e.composedPath()[0]||e.target;Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>r??document});try{for(;r;){let n=r[t];if(n&&!r.disabled&&(n(e),e.cancelBubble))return;r=r.host&&r.host!==r&&r.host instanceof Element?r.host:r.parentNode}}finally{delete e.currentTarget}}function Gu(e,t,r){if(e[`$$${t}`]=r,Qr.has(t)){let n=`__fx_${t}`;if(!e[n]){let o=a=>{e[`$$${t}`]?.(a)};e.addEventListener(t,o),e[n]=o}return}Pt.has(t)||ve([t])}function Pi(e,t){delete e[`$$${t}`];let r=`__fx_${t}`,n=e[r];n&&(e.removeEventListener(t,n),delete e[r])}function pe(e,t=!1){if(H())return Yr().createText(e);if(g.active&&!t){let r=jr()?.hydrateText(e);if(r)return r}return document.createTextNode(e)}function Re(e,t=!1,r){let n=Wu();if(H()){let o=Yr().createElement(e,t);return n&&o.setAttribute(Fe,n),o}if(g.active){let o=Uu(n,e);if(o)return jr()?.enterElement(o),e.includes("-")&&Ci(o),r?Dr(o,r):o;let a=jr()?.hydrateElement(e);if(a)return e.includes("-")&&Ci(a),r?Dr(a,r):a}return Dr(t?document.createElementNS(Gr,e):document.createElement(e),r)}function Qu(e,t,r,n,o){let a=n,i=new Map,s=!1;return R(()=>{let c=s&&g.active;if(s=!0,!c)return u();g.active=!1;try{return u()}finally{g.active=!0}});function u(){Z(r??t,"content",void 0,e);let c;if(ie(e)&&!V(e)){if(!i.has(e)){oe++;try{let f=e();i.set(e,f)}finally{oe--}}for(c=i.get(e);typeof c=="function"&&V(c);)c=c()}else for(c=e();typeof c=="function"&&V(c);)c=c();{let f=0;for(;typeof c=="function"&&f++<50;)if(ie(c)){if(!i.has(c)){let l=c;oe++;try{let d=l();i.set(l,d)}finally{oe--}}c=i.get(c)}else if(V(c))c=c();else if(c=c(),typeof c!="function"||!V(c)&&!ie(c))break}oe++;try{a=$t(t,c,r,a,i),o(a)}finally{oe--}}}function j(e,t,r,n){if(oe>Zu)return console.error("[insert] Exceeded max call depth, possible infinite loop."),()=>null;let o=r!==void 0&&!r&&g.active;r!==void 0&&!r&&(r=pe("",!0),o||e.appendChild(r));let a=()=>{if(!o||r.parentNode)return;let f=g.cursor;e.insertBefore(r,f&&f.parentNode===e?f:null)},i=n??null,s=f=>Array.isArray(f)&&f.some(l=>typeof l=="function"),u=f=>typeof f=="function"?f:()=>f;if(typeof t!="function"&&!s(t)){oe++;try{i=$t(e,t,r,i)}finally{oe--}return a(),()=>i}let c=Qu(u(t),e,r,i,f=>{i=f});return a(),()=>(c?.(),i)}function $t(e,t,r,n,o){if(t==null||typeof t=="boolean")return de(e,n,r);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return de(e,n,r);if(Ct(t)){let i=pe("",!0);return Array.isArray(n)?n.length>0?(e.replaceChild(i,n[0]),de(e,n.slice(1),r)):U(e,i,r):n?e.replaceChild(i,n):U(e,i,r),t.then(s=>{i.parentNode===e&&$t(e,s,i.nextSibling,i)}).catch(s=>{console.error("Error resolving promise in insertExpression:",s)}),i}let a=typeof t;if(a==="string"||a==="number"){if(a==="number"&&(t=String(t)),Array.isArray(n)){if(n.length===0){let s=pe(t);return U(e,s,r),s}if(n.length===1&&n[0].nodeType===3)return n[0].data=t,n;n=de(e,n,r)}if(n&&ku(n))return n.data=t,n;let i=pe(t);return n&&n.parentNode===e?e.replaceChild(i,n):Ti(e,i)||U(e,i,r),i}if(Xr(t))return Ti(e,t)?(ji(t),t):Array.isArray(n)?(n.length===0?U(e,t,r):n[0].parentNode===e?(e.replaceChild(t,n[0]),de(e,n.slice(1),r)):U(e,t,r),t):(n?n!==t&&(n.parentNode===e?e.replaceChild(t,n):U(e,t,r)):U(e,t,r),t);if(Array.isArray(t)){let i=[],s=Array.isArray(n)?n:n?[n]:[],u=[],c=new Set,f=()=>ne(t,i,e,r,!0,o,u,c);g.active&&s.length?Hu(s[0],f):f();let l=ef(e,c.size?s.filter(d=>!c.has(d)):s,i,r);for(let d of u){if(d.wired)continue;let h=j(e,d.sig,d.marker);A(()=>{de(e,h()),d.marker.parentNode===e&&e.removeChild(d.marker)})}return l}if(a==="object"&&t!==null&&typeof t=="object"){let i=t;if("type"in i&&"props"in i){let s=i;if(typeof s.type=="function"){let u=s.type(s.props||{});return $t(e,u,r,n)}}}return de(e,n,r)}function ne(e,t,r,n,o=!0,a,i,s){for(let u=0;u<e.length;u++){let c=e[u];if(!(c==null||typeof c=="boolean")){for(;typeof c=="function"&&!Ct(c)&&!V(c)&&!ie(c)&&(c=c(),!(c==null||typeof c=="boolean")););if(!(c==null||typeof c=="boolean")){if(typeof c=="function"){let f;for(ie(c)&&!V(c)?(a||(a=new Map),a.has(c)||a.set(c,c()),f=a.get(c)):f=c();typeof f=="function"&&!Ct(f)&&!V(f)&&!ie(f);)a||(a=new Map),a.has(f)||a.set(f,f()),f=a.get(f);if(f==null||typeof f=="boolean")continue;if(typeof f=="function"){if(V(f)){if(i){let d=pe("",!0);if(t.push(d),g.active&&s){let h=()=>g.cursor&&g.cursor.parentNode===r?g.cursor:null;r.insertBefore(d,h());let y=j(r,f,d),p=y();for(let w of Array.isArray(p)?p:p?[p]:[])s.add(w);r.insertBefore(d,h()),A(()=>{de(r,y()),d.parentNode===r&&r.removeChild(d)}),i.push({marker:d,sig:f,wired:!0});continue}i.push({marker:d,sig:f});continue}let l=f();for(;typeof l=="function"&&V(l);)l=l();if(l==null||typeof l=="boolean")continue;Array.isArray(l)?ne(l,t,r,n,o,a):ne([l],t,r,n,o,a);continue}continue}Array.isArray(f)?ne(f,t,r,n,o,a,i,s):ne([f],t,r,n,o,a,i,s);continue}if(Ct(c)){let f=pe("",!0);t.push(f),c.then(l=>{if(f.parentNode){let d=[];if(ne([l],d,f.parentNode,void 0,!1,a),d.length>0){f.parentNode.replaceChild(d[0],f);for(let h=1;h<d.length;h++)f.parentNode?.insertBefore(d[h],d[h-1].nextSibling)}}}).catch(l=>console.error("Error resolving promise in array:",l));continue}if(Array.isArray(c)){ne(c,t,r,n,o,a,i,s);continue}if(Xr(c)){t.push(c);continue}if(typeof c=="object"&&c!==null&&"type"in c&&"props"in c){let f=c;if(typeof f.type=="function"){let l=f.type(f.props||{});Array.isArray(l)?ne(l,t,r,n,!1,a):ne([l],t,r,n,!1,a);continue}}if(typeof c=="string"||typeof c=="number"){let f=String(c);if(f.trim()===""&&f!==" ")continue;t.push(pe(f));continue}t.push(pe(String(c)))}}}}function ef(e,t,r,n){for(let l=0;l<r.length;l++){let d=r[l].parentNode;d!==null&&d!==e&&d.nodeType!==11&&(r=r.slice(),r[l]=r[l].cloneNode(!0))}let o=r.length,a=t.length,i=o,s=0,u=0,c=a>0?t[a-1].nextSibling??void 0:n,f=null;for(;s<a||u<i;){if(t[s]===r[u]){s++,u++;continue}for(;a>s&&i>u&&t[a-1]===r[i-1];)a--,i--;if(a===s){let l=i<o?u?r[u-1].nextSibling??void 0:r[i-u]:c;for(;u<i;)U(e,r[u++],l)}else if(i===u)for(;s<a;)(!f||!f.has(t[s]))&&t[s].parentNode===e&&e.removeChild(t[s]),s++;else if(t[s]===r[i-1]&&r[u]===t[a-1]){let l=t[--a].nextSibling;U(e,r[u++],t[s++].nextSibling),U(e,r[--i],l),t[a]=t[s-1]}else{if(!f){f=new Map;let d=u;for(;d<i;)f.set(r[d],d++)}let l=f.get(t[s]);if(l!=null)if(u<l&&l<i){let d=s,h=1;for(;++d<a&&d<i&&!(!f.has(t[d])||f.get(t[d])!==l+h);)h++;if(h>l-u){let y=t[s];for(;u<l;)U(e,r[u++],y)}else t[s].parentNode===e?e.replaceChild(r[u++],t[s++]):(U(e,r[u++],c),s++)}else s++;else t[s].parentNode===e&&e.removeChild(t[s]),s++}}return r}function de(e,t,r){if(t)if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n].parentNode===e&&e.removeChild(t[n]);else t.parentNode===e&&e.removeChild(t);return null}function U(e,t,r){g.active&&t.parentNode===e||(r&&r.parentNode===e?e.insertBefore(t,r):e.appendChild(t))}function ge(e,t,r){r==null?delete e[t]:e[t]=r}function es(e,t,r){let n=r,o;return Array.isArray(r)&&(n=r[0],o=r[1]),typeof n!="function"?()=>{}:(e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o))}function ts(e,t){if(!t||typeof t!="function")return;let r=t[Qi]?.name;if(!r)return;let n=r.indexOf(":");n!==-1&&Q(e,r.slice(0,n),r.slice(n+1),t)}function Nt(e,t,r){let n=typeof r=="function"?O(()=>r()):r;if(!(!n||typeof n!="object"))for(let o of Object.keys(n))Q(e,t,o)}function rs(e,t){let r=(n,o)=>{typeof n=="function"&&(Q(e,"use",n.name||"use",o),n(e,o??(()=>{})))};if(typeof t=="function"){r(t);return}if(Array.isArray(t)){if(typeof t[0]=="function"){r(t[0],t[1]);return}for(let n of t)Array.isArray(n)?r(n[0],n[1]):r(n)}}function zr(e,t,r,n=!1){return ts(e,r),typeof r!="function"?(C(e,t,r,n),()=>{}):R(()=>{Z(e,"attribute",t,r);let o=typeof r=="function"?r():r;C(e,t,o,n)})}function Br(e,t,r){return typeof r!="function"?(ge(e,t,r),()=>{}):(ts(e,r),R(()=>{Z(e,"property",t,r);let n=typeof r=="function"?r():r;ge(e,t,n)}))}function ns(e,t,r){return typeof r!="function"?(C(e,t,!!r),()=>{}):R(()=>{Z(e,"attribute",t,r);let n=r();C(e,t,!!n)})}function Mt(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){R(()=>{Z(e,"attribute","class",t),Mt(e,t())});return}if(typeof t=="string"){e.setAttribute("class",t);return}if(Array.isArray(t)){e.setAttribute("class",t.filter(Boolean).join(" "));return}if(typeof t=="object"){let r=Object.keys(t).filter(n=>{let o=t[n];return typeof o=="function"?o():!!o}).join(" ");e.setAttribute("class",r);return}e.setAttribute("class",String(t))}function Lt(e,t,r){if(!(!t||typeof t!="object"))for(let n in t){let o=t[n],a=n.split(/\s+/).filter(Boolean);if(typeof o=="function"&&r)r.push(R(()=>{let i=!!o();for(let s of a)e.classList.toggle(s,i)}));else{let i=!!(typeof o=="function"?o():o);for(let s of a)e.classList.toggle(s,i)}}}function qr(e,t,r){t.includes("-")?r==null?e.removeProperty(t):e.setProperty(t,String(r)):e[t]=r??""}function je(e){for(;typeof e=="function";)e=e();return e}function It(e,t,r){let n=je(t),o=Vr.get(e);if(n==null){Vr.delete(e),e.removeAttribute("style");return}let a=new Set,i=s=>{if(typeof s=="function"&&r){r.push(R(()=>i(je(s))));return}if(s=je(s),s!=null){if(typeof s=="string")e.style.cssText=s;else if(Array.isArray(s))for(let u of s)i(u);else if(typeof s=="object")for(let u in s){a.add(u);let c=s[u];typeof c=="function"&&r?r.push(R(()=>qr(e.style,u,je(c)))):qr(e.style,u,je(c))}}};if(Array.isArray(n))for(let s of n)i(s);else i(n);if(o)for(let s of o)a.has(s)||qr(e.style,s,null);Vr.set(e,a)}function os(e){let{element:t,props:r,prevProps:n=zu,isSVG:o=!1,skipChildren:a=!1,isCustomElement:i,accessors:s}=e;if(!t||!xu(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!r)return console.warn("[spread] Warning: props is undefined!"),()=>{};let u=o||t.namespaceURI===Gr,c=[];for(let f in r){if(a&&f==="children")continue;let l=r[f],d=n[f];if(l===d)continue;if(f==="ref"){en(l,t);continue}if(f==="use"){rs(t,l);continue}if(f.startsWith("on:")){c.push(es(t,f.slice(3),l));continue}if(f.startsWith("prop:")){Q(t,"prop",f.slice(5),l),c.push(Br(t,f.slice(5),l));continue}if(f.startsWith("attr:")){Q(t,"attr",f.slice(5),l),c.push(zr(t,f.slice(5),l,u));continue}if(f.startsWith("bool:")){Q(t,"bool",f.slice(5),l),c.push(ns(t,f.slice(5),l));continue}if(f==="class"||f==="className"){typeof l=="function"?c.push(R(()=>{Z(t,"attribute","class",l),Mt(t,l())})):Mt(t,l);continue}if(f==="classList"){Nt(t,"class",l),typeof l=="function"?c.push(R(()=>{Z(t,"attribute","class",l),Lt(t,l())})):Lt(t,l,c);continue}if(f==="style"){Nt(t,"style",l),typeof l=="function"?c.push(R(()=>{Z(t,"attribute","style",l),It(t,l())})):It(t,l,c);continue}if(f.startsWith("on")){let w=f.slice(2).toLowerCase();d&&Pi(t,w),l&&Gu(t,w,l);continue}let h=i??t.localName.includes("-"),y=Ei.has(f)||!u&&f in t||h&&!u&&!Ir(f);if(h&&!u&&!Ir(f)&&s!==void 0&&typeof l=="function"&&!s.includes(f)){H()?Kr(t,f,l):ge(t,f,l);continue}if(h&&!u&&!Ir(f)&&H()){c.push(R(()=>{let w=typeof l=="function"?l():r[f];for(;typeof w=="function"&&w.length===0;)w=w();Kr(t,f,w)}));continue}typeof l=="function"?c.push(y?Br(t,f,l):zr(t,f,l,u)):c.push(R(()=>y?ge(t,f,r[f]):C(t,f,r[f],u)))}for(let f in n)if(!(f in r))if(f.startsWith("on")){let l=f.slice(2).toLowerCase();Pi(t,l)}else Ei.has(f)?ge(t,f,null):t.removeAttribute(f);return()=>{c.forEach(f=>f())}}function tf(e,t,r=!1){for(let n in t){let o=t[n];if(n==="ref"){en(o,e);continue}if(n!=="children"){if(n==="use"){rs(e,o);continue}if(n.startsWith("on:")){es(e,n.slice(3),o);continue}if(n.startsWith("prop:")){Q(e,"prop",n.slice(5),o),Br(e,n.slice(5),o);continue}if(n.startsWith("attr:")){Q(e,"attr",n.slice(5),o),zr(e,n.slice(5),o,r);continue}if(n.startsWith("bool:")){Q(e,"bool",n.slice(5),o),ns(e,n.slice(5),o);continue}if(n.startsWith("on")&&n.length>2){let a=n.slice(2).toLowerCase();if(typeof o=="function")if(Qr.has(a)){e[`$$${a}`]=o;let i=`__fx_${a}`;if(!e[i]){let s=u=>{e[`$$${a}`]?.(u)};e.addEventListener(a,s),e[i]=s}}else e[`$$${a}`]=o,Pt.has(a)||ve([a]);continue}if(n==="class"||n==="className"){Mt(e,o);continue}if(n==="classList"){Nt(e,"class",o),typeof o=="function"?R(()=>{Z(e,"attribute","class",o),Lt(e,o())}):Lt(e,o,[]);continue}if(n==="style"){Nt(e,"style",o),typeof o=="function"?R(()=>{Z(e,"attribute","style",o),It(e,o())}):It(e,o,[]);continue}if(n==="innerHTML"){if(typeof o=="function"){let a=k(()=>{let i=o();for(;typeof i=="function";)i=i();e.innerHTML=i});A(()=>a())}else e.innerHTML=o;continue}if(n==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof o=="function"){let a=k(()=>{let i=o();for(;typeof i=="function"&&i.length===0;)i=i();document.activeElement!==e&&(e.value=i??"")});A(()=>{a()})}else R(()=>{document.activeElement!==e&&(e.value=t[n]??"")});continue}if(n==="checked"&&e.tagName==="INPUT"){if(typeof o=="function"){let a=k(()=>{let i=o();for(;typeof i=="function"&&i.length===0;)i=i();document.activeElement!==e&&(e.checked=i??"")});A(()=>{a()})}else R(()=>{document.activeElement!==e&&(e.checked=t[n]??"")});continue}if(n==="value"&&e.tagName==="SELECT"){if(typeof o=="function"){let a=!0,i=k(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();a?(a=!1,queueMicrotask(()=>{e.value=s??""})):e.value=s??""});A(()=>{i()})}else{let a=!0;R(()=>{let i=t[n];a?(a=!1,queueMicrotask(()=>{e.value=i??""})):e.value=i??""})}continue}if(typeof o=="function"){let a=k(()=>{let i=o();for(;typeof i=="function"&&i.length===0;)i=i();Oi(e,n,i,r)});A(()=>{a()})}else R(()=>Oi(e,n,t[n],r))}}}function en(e,t){if(!e)return;let r=e[Qi]?.name;if(Q(t,"ref",r||typeof e=="function"&&e.name||"ref",e),Xr(e)){let n=t,o=e;if(!n)return;typeof n=="function"?n(o):typeof n=="object"&&"current"in n&&(n.current=o);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}function rf(e){return e==="svg"||e==="path"||e==="circle"||e==="rect"||e==="line"||e==="polygon"||e==="polyline"||e==="ellipse"||e==="g"||e==="defs"||e==="clipPath"||e==="text"}function Ct(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function tn(e,t,r){if(!t)throw new Error("Container element is required");let n,o,a=[];return W(i=>{D(()=>{g.active||(t.textContent=""),Vt(t),Ht(),j(t,e)}),o=i}),()=>{o?.(),n?.(),a.forEach(i=>i()),t.textContent=""}}function Y(e,t){if(ju(),$i.fn)return $i.fn(e,t);t&&hi(t);let r=typeof e=="function"?wi(()=>e(t)):e,n=r!=null&&(typeof r=="function"||typeof r=="object");if(n)try{r.$name=e?.name}catch{}return n&&!bi(r)?Be(r):r}function rn(){let e=globalThis.__FX_DATA__;if(e&&typeof e.nodeType!="number")return e;if(Hr!==void 0)return Hr;let t=null;if(typeof document<"u"){let r=document.getElementById(of)?.textContent;if(r)try{t=JSON.parse(r)}catch{t=null}}return Hr=t}function Wt(){for(;;){for(;g.cursor&&g.cursor.nodeType===3&&g.cursor.data==="";)g.cursor=g.cursor.nextSibling;if(g.cursor!=null||!g.parents.length)return;g.cursor=g.parents.pop().nextSibling}}function ze(e,t){let r=t.nodeType===1?`<${t.tagName.toLowerCase()}>`:t.nodeType===3?`text ${JSON.stringify((t.nodeValue??"").slice(0,24))}`:t.nodeType===8?"comment":"node";console.warn(`[fluixi] hydration mismatch: expected ${e} but the server DOM has ${r}. Server and client rendered different markup; recreating this node on the client. Check for non-deterministic render (Date.now(), Math.random(), browser-only branches, untransported data).`)}function ss(e){return e.localName.includes("-")?e.hasAttribute("data-fx-ssr")||e[sf]===!0:!1}function af(e){Wt();let t=g.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(Gi(t),is.has(e.toLowerCase())||ss(t)?g.cursor=t.nextSibling:(g.parents.push(t),g.cursor=t.firstChild),t):(Ue&&t&&ze(`<${e}>`,t),null)}function cf(e){is.has(e.localName)||ss(e)?g.cursor=e.nextSibling:(g.parents.push(e),g.cursor=e.firstChild)}function uf(e,t){Wt();let r=g.cursor;if(r&&r.nodeType===1&&r.tagName.toLowerCase()===e.toLowerCase()){let n=Ku(r);return t&&n&&n!==t?(Ue&&ze(`<${e}> (another template)`,r),null):(Gi(r),g.cursor=r.nextSibling,r)}return Ue&&r&&ze(`<${e}> (static)`,r),null}function ff(e){if(e===""){let r=g.cursor;return r&&r.nodeType===3&&r.data!==""?(g.cursor=r.nextSibling,r.data="",r):null}Wt();let t=g.cursor;if(t&&t.nodeType===3){let r=t.data;return r.length>e.length&&r.startsWith(e)?(g.cursor=t.splitText(e.length),t):(g.cursor=t.nextSibling,r!==e&&(t.data=e),t)}return Ue&&t&&ze(`text ${JSON.stringify(e.slice(0,24))}`,t),null}function lf(e){Wt();let t=g.cursor;return t&&t.nodeType===8&&t.data===e?(g.cursor=t.nextSibling,t):(Ue&&t&&ze(`marker <!--${e.slice(0,24)}-->`,t),null)}function df(){Ni||(Ni=!0,Vu({hydrateElement:af,hydrateText:ff,hydrateMarker:lf,hydrateStatic:uf,enterElement:cf}))}function Kt(e,t,r){df(),g.active=!0,g.cursor=t.firstChild,g.parents=[],Zr(),Fu(t);let n=rn(),o=r?.resourceNamespace,a=0;yo(()=>o?`${o}:r${a++}`:`r${a++}`),po(n?i=>i in n?{value:n[i]}:void 0:null);try{return tn(e,t)}finally{g.active=!1,g.cursor=null,g.parents=[]}}function as(e,t={}){if(typeof e=="function")return Y(e,t);if(typeof e!="string"||e.length===0)return null;let r=rf(e);if(H())return Yr().createElement(e,r);let n=r?document.createElementNS(Gr,e):document.createElement(e);return tf(n,t,r),pf(n,t),n}function pf(e,t){if(!t||t.children===void 0)return;let r=He(()=>t.children),n=o=>{j(e,o,typeof o=="function"?null:void 0)};Array.isArray(r)?r.forEach(n):n(r)}function yf(e){return typeof e=="function"?e:(()=>e)}function jt(e){return()=>{let t=e();return typeof t=="function"?t():t}}function hf(e){return e!=null&&e!==!1}function mf(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}function cs(e){let t=jt(()=>e.when),r=v(t,void 0,{name:"Show.when"}),n=v(r,void 0,{name:"Show.cond"}),o=T(),a=null,i=null,s=u=>{u!==i&&(a&&xe(a),a=Ae(o),i=u)};return v(()=>{let u=n();return s(u?"when":"fallback"),L(a,()=>{if(u){let c=e.children;return typeof c=="function"&&!mf(c)?typeof r=="function"?O(()=>O(r)?c(r()):e.fallback):c(r):c}return e.fallback});return e.fallback??null},void 0,{name:"Show.result"})}function us(e){let t=jt(()=>e.each),r=()=>e.fallback??null,n=(o,a)=>{let i=e.children,s=Array.isArray(i)?i.map(u=>typeof u=="function"?u(o,a):u):typeof i=="function"?i(o,a):i;return Ui(s),s};return e.by?fo(t,e.by,(o,a)=>n(o,a),{fallback:r}):uo(t,(o,a)=>n(o,a),{fallback:r})}function fs(e){let t=jt(()=>e.each);return lo(t,(r,n)=>{let o=e.children(r,n);return Ui(o),o},{fallback:()=>e.fallback??null})}function ls(e){return{[Jr]:!0,when:jt(()=>e.when),get children(){return e.children}}}function ds(e){let t=Array.isArray(e.children)?e.children:[e.children],r=T(),n=null,o=-1,a=i=>{i!==o&&(n&&xe(n),n=Ae(r),o=i)};return v(()=>{for(let i=0;i<t.length;i+=1){let u=t[i],c=0;for(;typeof u=="function"&&!u[Jr]&&c++<10;)u=u();if(!u||typeof u!="object"||u[Jr]!==!0)continue;let f=u.when();if(hf(f))return a(i),L(n,()=>typeof u.children=="function"?u.children(f):u.children)}return a(-2),L(n,()=>e.fallback??null)},void 0,{name:"Switch"})}function ps(e){let t=yf(e.component),{component:r,...n}=e,o=T(),a=null,i;return v(()=>{let s=t();return s!==i&&(a&&xe(a),a=Ae(o),i=s),s==null?null:typeof s=="string"?{tag:s,props:n}:L(a,()=>s(n))},void 0,{name:"Dynamic"})}function ys(e){let t=()=>e.mount?typeof e.mount=="function"?e.mount():e.mount:document.body,r,n;return W(o=>{r=o,n=document.createElement("div"),n.style.display="contents",t().appendChild(n),j(n,e.children)&&en(e.ref,n)}),A(()=>{r(),n.remove()}),null}function nn(e){if(H())return e.fallback??null;let t=g.active,[r,n]=b(!t);return t&&queueMicrotask(()=>n(!0)),v(()=>r()?e.children:e.fallback??null,void 0,{name:"client-only"})}function ms(e){let t=So(),r=i=>!!i&&typeof i.then=="function",n=i=>typeof e.fallback=="function"?e.fallback(i,t.reset):e.fallback,o=i=>{if(r(i))throw i;return queueMicrotask(()=>t.setError(i)),null},a=i=>{if(Array.isArray(i))return i.map(a);if(typeof i!="function")return i;let s=i;return()=>{try{return a(s())}catch(u){return o(u)}}};return v(()=>{let i=t.error();if(i!==void 0)return n(i);try{return Ao(t,()=>a(typeof e.children=="function"?e.children():e.children))}catch(s){return o(s),n(s)}},void 0,{name:"ErrorBoundary"})}function gs(e){return v(()=>{let t=typeof e=="function"?e():e,r=[];for(let[n,o]of Object.entries(t)){if(!n)continue;(typeof o=="function"?o():o)&&r.push(n)}return r.join(" ")},void 0,{name:"ClassMap"})}function gf(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function vs(e){return v(()=>{let t=typeof e=="function"?e():e,r=[];for(let[n,o]of Object.entries(t)){if(!n)continue;let a=typeof o=="function"?o():o;a!=null&&r.push(`${gf(n)}: ${a}`)}return r.join("; ")},void 0,{name:"StyleMap"})}var Dt,Su,Au,Wr,Gr,Ou,Ei,Eu,Jl,Tu,z,Rt,Iu,Du,ed,td,g,Ki,Fr,Fe,B,zu,Qi,Bu,Ju,Yu,Ur,Pt,Qr,oe,Zu,Vr,nf,$i,of,Hr,is,Ue,sf,Ni,Jr,hs,vf,q=F(()=>{"use strict";x();Qo();x();x();x();_i();x();x();x();x();x();x();x();x();x();x();x();x();Dt=Symbol.for("fluixi.server-node"),Su=Symbol.for("fluixi.dom.server-host"),Au=globalThis,Wr=Au[Su]??={server:typeof document>"u",nodes:null};Gr="http://www.w3.org/2000/svg";Ou=Symbol.for("fluixi.serverProps");Ei=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]),Eu=new Set(["id","class","className","style","slot","part","exportparts","is","title","role","lang","dir","tabindex","hidden"]);Jl=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;Tu="1.0.0-alpha.95",z={dom:Tu,reactive:Zo};Iu={getStore:()=>Rt,run(e,t){let r=Rt;Rt=e;try{return t()}finally{Rt=r}}},Du=Iu;ed=globalThis[Symbol.for("fluixi.requestLocals")]??=new WeakMap,td=globalThis[Symbol.for("fluixi.responseHeaders")]??=new WeakMap,g={active:!1,cursor:null,parents:[]},Ki=null;Fr=Symbol.for("fluixi.hydrationKeys"),Fe="data-hk";B=null;zu={},Qi="__fx_at",Bu="__fx_loc";Ju=Symbol.for("fluixi.owner");Yu="__fluixi_delegated_events__",Ur=globalThis[Yu]??={names:new Set},Pt=Ur.names,Qr=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);oe=0,Zu=200;Vr=new WeakMap;nf="__fx_dom_create_component__",$i=globalThis[nf]??={fn:null};of="__FX_DATA__";is=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ue=typeof process<"u"&&process.env&&!1;sf=Symbol.for("fluixi.ownsContent");Ni=!1;Jr=Symbol("match");hs=nn;vf=Dt});function xs(e){if(e!=null&&(typeof e=="object"||typeof e=="function"))try{e.$lazy=!0}catch{}return e}function Pe(e,t){let r,n,o;function a(){return n||(n=e().then(s=>r=s.default)),n}t?.preload&&a();let i=(s=>{if(r){let u=r;return xs(O(()=>u(s)))}if(!o){let[u]=ce(()=>a(),{transport:!1});if(o=u,u.error)throw u.error}return v(()=>{let u=o();return u?xs(Y(u,s)):void 0})});return i.preload=()=>a().then(()=>{}),i.$lazy=!0,i.loader=e,i}var Gt=F(()=>{"use strict";q();x()});function Ge(e,t){let r=ee(e,t),n=o=>r.Provider({value:o.value,get children(){return o.children},debug:o.debug});return{id:r.id,Provider:Vi(n),defaultValue:e}}function Ze(e){let t=K(e);return t!==void 0?t:e.defaultValue}function fn(e,t,r){let n=typeof t=="function"?t():t;return e.Provider({value:n,get children(){return r.children}})}function Ts(e,t){return e.reduceRight((n,[o,a])=>({get children(){return fn(o,a,n)}}),t).children}function Rs(e,t){for(let r=T();r;r=r.parent)if(r.contexts?.has(e.id))return Ze(e);throw new Error(t??`[fluixi] No Provider for ${e.id.description??"this context"} above this component.`)}var ln=F(()=>{"use strict";q();x()});function wn(){return typeof document<"u"&&typeof document.startViewTransition=="function"}function bn(){if(typeof window>"u"||typeof window.matchMedia!="function")return!1;try{return window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}function Zf(e){return e!=="none"&&wn()&&!bn()}function js(e){let t=[];for(let r of e){let n=r?.preload;if(typeof n=="function")try{let o=n();o&&typeof o.then=="function"&&t.push(o.catch(()=>{}))}catch{}}return t.length?Promise.all(t).then(()=>{}):null}function Sn(e,t){if(!Zf(e))return Promise.resolve(t()).then(()=>{});let r=document.startViewTransition;try{let n=r.call(document,()=>t());return n.finished?.catch(()=>{}),n.ready?.catch(()=>{}),n.updateCallbackDone.catch(()=>{})}catch{return Promise.resolve(t()).then(()=>{})}}var An=F(()=>{"use strict"});function Qt(e,t,r={}){let{preserveStructure:n,multiple:o,throwOnError:a=!1,defaultValue:i,maxDepth:s=20}=r;if(!e||typeof e!="object")return i;if(!t)return e;if(Array.isArray(t))if(n){let f={};for(let l of t){let d=Qt(e,l,{...r,preserveStructure:!1});d!==void 0&&el(f,l,d)}return f}else return t.map(f=>Qt(e,f,{...r,preserveStructure:!1}));let u=xn(t,{...r,throwOnError:a});if(u.length===0)return e;if(typeof n>"u"||n===!1){let f=tl(e,t);return o===!1&&Array.isArray(f)?f[0]:f===void 0&&i!==void 0?i:f}let c=X(e,u,0,s);return c===void 0&&i!==void 0?i:c}function tl(e,t,r={}){let{createMissing:n=!1,add:o=!1,debug:a=!1}=r,i=xn(t),s=e,u=!1,c="",f=t;if(typeof s=="object"&&!Array.isArray(s)&&f.length>0&&s[f])return s=s[f],s;for(let l=0;l<i.length;l++){let d=i[l],h=i.length>1?l===i.length-1:!1;if(s===null&&!n)return;let y=i[l+1];switch(d.type){case"property":if(s&&typeof s=="object")if(Array.isArray(s)){if(typeof d.value=="number"){let p=d.value;if(n&&p>=s.length)for(let w=s.length;w<=p;w++)s.push(void 0);if(n&&(s[p]===null||s[p]===void 0)&&(!h||u)&&(y?s[p]=y.type==="index"||y.type==="slice"||y.type==="union"||y.type==="wildcard"?[]:{}:s[p]=null,u=!1),s=s[p],y){u=!0;continue}}else o?s.push({[String(d.value)]:null}):s=s.map(p=>p[String(d.value)]);if(y)continue;return Fs(s)}else{if(s[c]&&c.split(".").length>=2){s=s[c];continue}if(n&&(s[String(d.value)]===null||s[String(d.value)]===void 0)&&(!h||u)&&(y?s[String(d.value)]=y.type==="index"||y.type==="slice"||y.type==="union"||y.type==="wildcard"?[]:{}:s[String(d.value)]=null,u=!1,s=s[String(d.value)],y)){u=!0;continue}if(s?(!s[String(d.value)]&&n&&(s[String(d.value)]=null),s=s[String(d.value)]):s={[String(d.value)]:null},y)continue}else if(n)s={},s[String(d.value)]=y.type==="index"||y.type==="slice"||y.type==="union"||y.type==="wildcard"||r.type==="array"?[]:{},s=s[String(d.value)];else return;break;case"index":case"wildcard":if(Array.isArray(s)){if(d.type==="index"){let p=d.value;if(p<0){s=s[s.length-Math.abs(p)];continue}if(n&&(p>=s.length||s[p]==null||s[p]==null)&&!h){for(let w=s.length;w<=p;w++)s.push(void 0);y&&(s[p]=y.type==="index"||y.type==="slice"||y.type==="union"||y.type==="wildcard"?[]:{})}s=s[p]}else if(!h)continue}else if(n){let p=i[l+1];s=[];let w=d.value;for(let _=0;_<=w;_++)s.push(void 0);s[w]=p.type==="index"||p.type==="slice"||p.type==="union"||p.type==="wildcard"||r.type==="array"?[]:{},s=s[w]}else{if(d.type==="index"&&typeof s=="object"&&s&&s[String(d.value)]!==void 0){s=s[String(d.value)];continue}if(typeof s=="object"){s=Object.values(s);continue}return}break;default:return}}return Fs(s)}function Fs(e){return Array.isArray(e)?e.filter(t=>typeof t<"u"):e}var er,X,xn,Qf,el,kn=F(()=>{"use strict";er=e=>e==null||Array.isArray(e)||typeof e=="function"||e instanceof Date||e instanceof RegExp||e instanceof Map||e instanceof Set||e instanceof Error?!1:typeof e=="object",X=(e,t,r,n)=>{if(r>n)return;if(t.length===0)return e;let o=t[0],a=t.slice(1);if(o.type==="descendant"){let i=X(e,a,r+1,n);if(i!==void 0)return i;if(e&&typeof e=="object")if(Array.isArray(e)){let s=[];for(let u=0;u<e.length;u++){let c=X(e[u],t,r+1,n);c!==void 0&&(s[u]=c)}return s.length>0?s:void 0}else{let s={};for(let u in e)if(e.hasOwnProperty(u)){let c=X(e[u],t,r+1,n);c!==void 0&&(s[u]=c)}return Object.keys(s).length>0?s:void 0}return}switch(o.type){case"property":if(er(e)&&o.value&&String(o.value)in e){let i=e[String(o.value)],s=X(i,a,r+1,n);if(s!==void 0)return{[String(o.value)]:s}}break;case"index":if(Array.isArray(e)){let i=o.value;if(i>=0&&i<e.length){let s=X(e[i],a,r+1,n);if(s!==void 0){let u=new Array(e.length).filter(c=>c!==void 0);return u[i]=s,u}}}else if(e&&typeof e=="object"){let i=String(o.value);if(i in e){let s=X(e[i],a,r+1,n);if(s!==void 0)return{[i]:s}}}break;case"wildcard":if(e&&typeof e=="object")if(Array.isArray(e)){let i=[],s=!1;for(let u=0;u<e.length;u++){let c=X(e[u],a,r+1,n);c!==void 0&&(i[u]=c,s=!0)}return s?i:void 0}else{let i={},s=!1;for(let u in e)if(e.hasOwnProperty(u)){let c=X(e[u],a,r+1,n);c!==void 0&&(i[u]=c,s=!0)}return s?i:void 0}break;case"slice":if(Array.isArray(e)){let[i,s]=o.value,u=Math.max(0,i),c=Math.min(e.length,s===1/0?e.length:s),f=[],l=!1;for(let d=u;d<c;d++){let h=X(e[d],a,r+1,n);h!==void 0&&(f[d]=h,l=!0)}return l?f:void 0}break;case"union":if(Array.isArray(e)){let i=o.value,s=[],u=!1;for(let c of i)if(c>=0&&c<e.length){let f=X(e[c],a,r+1,n);f!==void 0&&(s[c]=f,u=!0)}return u?s:void 0}break;case"filter":if(Array.isArray(e)){let i=o.value,s=[],u=!1;for(let c=0;c<e.length;c++)if(i(e[c])){let f=X(e[c],a,r+1,n);f!==void 0&&(s[c]=f,u=!0)}return u?s:void 0}break}},xn=(e,t={})=>{let{type:r="auto",throwOnError:n=!1}=t;if(!e||typeof e!="string")return[];let o=[],a="",i=!1,s=!1,u="",c="",f=0,d=r==="auto"?(y=>y.includes("..")?"descendant":y.includes("[?(")?"filter":y.includes("[:")||y.includes("[0:")?"slice":y.includes("[,")||y.includes("[0,1]")?"union":y.includes("[*]")||y.includes(".*.")?"wildcard":y.includes("[]")?"array-wildcard":y.includes("[")&&y.includes("]")?"bracket":"dot")(e):r,h=y=>{let p=y.trim();if(p==="*"||p==="")return{type:"wildcard",value:p===""?"[]":"*",raw:p===""?"[]":y};if(p==="[]")return{type:"wildcard",value:"[]",raw:y};if(/^-?\d+$/.test(p))return{type:"index",value:parseInt(p,10),raw:y};if(p.includes(":")){let w=p.split(":").map(I=>I.trim()),_=w[0]===""?0:parseInt(w[0],10),S=w[1]===""?1/0:parseInt(w[1],10);if(isNaN(_)||isNaN(S)){if(n)throw new Error(`Invalid slice notation: ${y}`);return{type:"wildcard",value:"*",raw:y}}return{type:"slice",value:[_,S],raw:y}}if(p.includes(",")){let w=p.split(",").map(_=>{let S=parseInt(_.trim(),10);return isNaN(S)?-1:S}).filter(_=>_>=0);if(w.length===0){if(n)throw new Error(`Invalid union notation: ${y}`);return{type:"wildcard",value:"*",raw:y}}return{type:"union",value:w,raw:y}}if(p.startsWith("?(")&&p.endsWith(")")){let w=p.slice(2,-1);try{return{type:"filter",value:Qf(w),raw:y}}catch(_){if(n)throw _;return{type:"wildcard",value:"*",raw:y}}}return p.startsWith('"')&&p.endsWith('"')||p.startsWith("'")&&p.endsWith("'")?{type:"property",value:p.slice(1,-1),raw:y}:{type:"property",value:p,raw:y}};for(let y=0;y<e.length;y++){let p=e[y],w=e[y+1];if((p==='"'||p==="'")&&!s){s=!0,u=p;continue}else if(p===u&&s){s=!1,u="",p==='"'||p==="'"||(i?c+=p:a+=p);continue}if(s){i?c+=p:a+=p;continue}if(p==="["&&!i){a&&(o.push({type:"property",value:a,raw:a}),a=""),i=!0,c="";continue}if(p==="]"&&i&&!s){i=!1;let S=h(c);o.push(S);continue}let _=o.length>0?o[o.length-1]:null;if(p==="."&&!i&&!s){if(w==="."){let S=e.split("..")[0];o.push({type:"property",value:S,raw:S}),o.push({type:"descendant",value:"..",raw:".."}),y++}else a&&(a==="*"?o.push({type:"wildcard",value:a,raw:a}):o.push({type:"property",value:a,raw:a}),a="");continue}if(i)c+=p;else if(_&&_.type!=="descendant")a+=p;else{let S=e.split(_?.raw)[1];S!==void 0?a=S:a+=p}}return a&&o.push({type:"property",value:a,raw:a}),o.map(y=>{if(y.type==="property"&&typeof y.value=="string"&&/^-?\d+$/.test(y.value)){let p=parseInt(y.value,10);if(!isNaN(p))return{...y,type:"index",value:p}}return y})},Qf=e=>{let t=e.replace(/@\.([a-zA-Z_$][\w$]*)/g,(r,n)=>`item.${n}`).replace(/@/g,"item");try{return new Function("item",`return ${t}`)}catch{throw new Error(`Invalid filter expression: ${e}`)}},el=(e,t,r)=>{let n=xn(t),o=e;for(let a=0;a<n.length;a++){let i=n[a],s=a===n.length-1;switch(i.type){case"property":if(s)o[String(i.value)]=r;else{if(!o[String(i.value)]){let c=n[a+1];o[String(i.value)]=c.type==="index"||c.type==="slice"||c.type==="union"||c.type==="wildcard"?[]:{}}o=o[String(i.value)]}break;case"index":Array.isArray(o)||(o=[]);let u=i.value;if(s){if(u>=o.length)for(let c=o.length;c<=u;c++)o.push(void 0);o[u]=r}else{if(!o[u]){let c=n[a+1];o[u]=c.type==="index"||c.type==="slice"||c.type==="union"||c.type==="wildcard"?[]:{}}o=o[u]}break;case"wildcard":if(Array.isArray(o))if(s)for(let c=0;c<o.length;c++)o[c]=r;else{let c=n[a+1];for(let f=0;f<o.length;f++)o[f]||(o[f]=c.type==="index"||c.type==="slice"||c.type==="union"||c.type==="wildcard"?[]:{});o.length>0&&(o=o[0])}break}}}});function rl(e,t,r){let n=new Uint8Array(t.length);e:for(let o=0;o<e.length;o++){for(let a=0;a<t.length;a++)if(!n[a]&&we(e[o],t[a],r)){n[a]=1;continue e}return!1}return!0}var we,Us=F(()=>{"use strict";kn();we=(e,t,r={})=>{if(e===t)return!0;if(e==null||t==null||typeof e!=typeof t)return!1;let n=Array.isArray(e),o=Array.isArray(t);if(n!==o)return!1;if(n&&o)return e.length!==t.length?!1:r.unordered?rl(e,t,r):e.every((p,w)=>we(p,t[w],r));if(typeof e!="object")return e===t;let a=e instanceof Date,i=t instanceof Date;if(a!==i)return!1;if(a)return e.getTime()===t.getTime();let s=e instanceof RegExp,u=t instanceof RegExp;if(s!==u)return!1;if(s)return e.toString()===t.toString();let c=e instanceof Map,f=t instanceof Map;if(c!==f)return!1;if(c){if(e.size!==t.size)return!1;for(let[p,w]of e)if(!t.has(p)||!we(w,t.get(p),r))return!1;return!0}let l=e instanceof Set,d=t instanceof Set;if(l!==d)return!1;if(l){if(e.size!==t.size)return!1;let p=[...t],w=new Uint8Array(p.length);e:for(let _ of e){for(let S=0;S<p.length;S++)if(!w[S]&&we(_,p[S],r)){w[S]=1;continue e}return!1}return!0}if(!er(e)||!er(t))return!1;let h=Object.keys(e),y=Object.keys(t);if(h.length!==y.length)return!1;for(let p of h)if(!Object.prototype.hasOwnProperty.call(t,p)||!we(e[p],t[p],r))return!1;return!0}});function Bs(e){let r=(()=>{try{return JSON.parse(sessionStorage.getItem(zs)??"{}")}catch{return{}}})(),n=()=>{let c=Object.keys(r);for(let f of c.slice(0,Math.max(0,c.length-100)))delete r[f];try{sessionStorage.setItem(zs,JSON.stringify(r))}catch{}},o=e.key,a=()=>{o!==void 0&&(delete r[o],r[o]=window.scrollY,n())},i=history.scrollRestoration;history.scrollRestoration="manual",window.addEventListener("pagehide",a);let s=c=>window.scrollTo({top:c,left:0,behavior:"instant"}),u=c=>{if(!c||c==="#")return!1;let f=document.getElementById(decodeURIComponent(c.slice(1)));return f?.scrollIntoView({behavior:"instant"}),f!==null};return{leave:a,arrive(c,f){if(o=c.key,c.action==="pop"||f===void 0){let l=c.key===void 0?void 0:r[c.key];l!==void 0&&s(l);return}c.action==="replace"&&c.pathname===f.pathname||u(c.hash)||s(0)},dispose(){window.removeEventListener("pagehide",a),history.scrollRestoration=i}}}var zs,Js=F(()=>{"use strict";zs="fx:scroll"});function nl(e){return e.startsWith("//")?e.replace(/^\/+/,"/"):e}function et(e,t,r=!1){let n=[];if(e===t)return{params:{},path:t};if(!r&&e==="/"&&t.startsWith("/"))return{params:{},path:"/"};let o=e.replace(/:([a-zA-Z0-9_]+)/g,(u,c)=>(n.push(c),"([^/]+)")).replace(/\*([a-zA-Z0-9_]*)/g,(u,c)=>(c&&n.push(c),"(.*)"));o.startsWith("/")||(o="/"+o),o===""&&(o="/");let a=new RegExp(`^${o}${r?"$":"(?=/|$)"}`),i=t.match(a);if(!i)return null;let s={};return n.forEach((u,c)=>{s[u]=i[c+1]}),{params:s,path:i[0]}}function Ys(e){let t=e.path.split("/").filter(Boolean);if(t.length===0)return 5;let r=0;for(let n of t)n.startsWith("*")?r+=1:n.startsWith(":")?r+=10:r+=100;return r}function ol(e){return[...e].sort((t,r)=>Ys(r)-Ys(t))}function tt(e,t){let r=t.length>1?t.replace(/\/+$/,"")||"/":t,n=Xs(e,r);if(!n)return null;let o=[],a="",i={};for(let s of n.layers){a=nl(il(a,s.consumed));let u={};for(let[c,f]of Object.entries(s.params))c in i||(u[c]=f),i[c]=f;o.push({route:s.route,component:s.route.component,params:u,pathname:a||"/"})}return{matched:o,params:i,pathname:t}}function Xs(e,t){if(!e||e.length===0)return null;let r=ol(e);for(let n of r){let o=!!n.children&&n.children.length>0,a=et(n.path,t,!o);if(a){if(o){let i=Xs(n.children,t);if(i)return{layers:[{route:n,params:a.params,consumed:a.path},...i.layers]};continue}return{layers:[{route:n,params:a.params,consumed:a.path}]}}}return null}function il(e,t){if(!e)return t;if(t===e)return e;if(t.startsWith(e))return t;let r=e.replace(/\/$/,""),n=t.replace(/^\//,"");return`${r}/${n}`}function al(e){let t=e,r="",n=t.indexOf("#");n!==-1&&(r=t.slice(n),t=t.slice(0,n));let o="",a=t.indexOf("?");return a!==-1&&(o=t.slice(a),t=t.slice(0,a)),{pathname:t||"/",search:o,hash:r}}function tr(e="/"){let t=[{path:e,state:null,key:Me()}],r=0,n="pop",o=new Set,a=()=>o.forEach(i=>i());return{get(){let{path:i,state:s,key:u}=t[r];return{...al(i),state:s,key:u,action:n}},push(i,s=null){t=t.slice(0,r+1),t.push({path:i,state:s,key:Me()}),r=t.length-1,n="push",a()},replace(i,s=null){t[r]={path:i,state:s,key:Me()},n="replace",a()},go(i){let s=r+i;s<0||s>=t.length||(r=s,n="pop",a())},subscribe(i){return o.add(i),()=>o.delete(i)}}}function Le(){let e=typeof window<"u"?window:void 0,t=new Set,r="pop",n=()=>t.forEach(i=>i());e&&e.addEventListener("popstate",()=>(r="pop",n()));let o=i=>typeof i=="object"&&i!==null&&typeof i.fx=="string",a=()=>{let i=e.history.state;if(o(i))return i;let s={fx:Me(),usr:i??null};return e.history.replaceState(s,""),s};return{window:e!==void 0,get(){if(!e)return{pathname:"/",search:"",hash:"",state:null};let{pathname:i,search:s,hash:u}=e.location,{fx:c,usr:f}=a();return{pathname:i,search:s,hash:u,state:f,key:c,action:r}},push(i,s=null){e?.history.pushState({fx:Me(),usr:s},"",i),r="push",n()},replace(i,s=null){e?.history.replaceState({fx:Me(),usr:s},"",i),r="replace",n()},subscribe(i){return t.add(i),()=>t.delete(i)}}}function cl(e){let t={};return e&&new URLSearchParams(e.startsWith("?")?e.slice(1):e).forEach((n,o)=>t[o]=n),t}function ul(e,t){if(!t)return e||"/";let r=t.replace(/\/$/,"");return e===r?"/":e.startsWith(r+"/")?e.slice(r.length)||"/":e||"/"}function fl(e,t){return!t||/^https?:\/\//.test(e)?e:`${t.replace(/\/$/,"")}${e.startsWith("/")?e:"/"+e}`}function Gs(e){let{routes:t,history:r,base:n}=e,o=new Set,a=()=>{let f=r.get();return{pathname:f.pathname,search:f.search,hash:f.hash,state:f.state,query:cl(f.search),...f.key!==void 0?{key:f.key}:{},...f.action!==void 0?{action:f.action}:{}}},i=f=>tt(t,ul(f,n)),s=(()=>{let f=a();return{location:f,match:i(f.pathname)}})(),u=()=>{let f=a();s={location:f,match:i(f.pathname)},o.forEach(l=>l(s))},c=r.subscribe(u);return{state(){return s},subscribe(f){return o.add(f),()=>o.delete(f)},navigate(f,l={}){let d=fl(f,n);l.replace?r.replace(d,l.state??null):r.push(d,l.state??null)},match(f){return i(f)},destroy(){c(),o.clear()}}}var sl,Me,_n=F(()=>{"use strict";sl=0,Me=()=>`${Date.now().toString(36)}-${(sl++).toString(36)}`});function Zs(e){return Tn.add(e),()=>{Tn.delete(e)}}function ea(e,t,r={}){let{ttl:n=1/0,staleWhileRevalidate:o=!0}=r;return(...a)=>{let i=r.cache??ct(),s=t+":"+JSON.stringify(a),u=()=>{let f=i.inflight.get(s);if(f)return f;let l=Promise.resolve(e(...a)).then(d=>(i.set(s,{value:d,timestamp:Date.now()}),i.inflight.delete(s),d),d=>{throw i.inflight.delete(s),d});return i.inflight.set(s,l),l},c=i.get(s);return c&&(n===1/0||Date.now()-c.timestamp<=n)?Promise.resolve(c.value):c&&o?(u().then(Qs,()=>{}),Promise.resolve(c.value)):u()}}function rr(e,t){let r=typeof e=="string"?[e]:Array.isArray(e)?e:null;ta(r??e,t??ct()),r&&!t&&ll(r)}function ta(e,t){let r=Array.isArray(e)?n=>e.some(o=>n===o||n.startsWith(o+":")):e;for(let n of[...t.keys()])r(n)&&t.delete(n);Qs()}function ll(e){try{localStorage.setItem(ra,JSON.stringify({names:e,at:Date.now()+Math.random()}))}catch{}}function na(e,t){let[r]=ce(t||(()=>!0),e);return r}function oa(e){return On.has(e)||On.set(e,b(void 0)),On.get(e)}function ia(e){return En.has(e)||En.set(e,b([])),En.get(e)}function Rn(e,t,r={}){let n=t||e.name||"action",o=async a=>{let[,i]=oa(n),[,s]=ia(n),u,c=()=>s(h=>h.filter(y=>y!==u)),f=h=>{s(y=>y.map(p=>p===u?h:p)),u=h},l=()=>{i(void 0),c()},d=()=>(c(),o(a));u={input:a,pending:!0,clear:l,retry:d},i(u),s(h=>[...h,u]);try{let h=await e(a);i({input:a,result:h,pending:!1,clear:l,retry:d}),c();let y=typeof r.invalidates=="function"?r.invalidates(h):r.invalidates;for(let p of y??[])rr(p);return h}catch(h){let y={input:a,error:h,pending:!1,clear:l,retry:d};throw i(y),f(y),h}};return o.url=n,o.with=a=>Rn((...i)=>e(a,...i),t,r),o}function sa(e){let[t]=oa(e.url);return t}function aa(e){let[t]=ia(e.url);return t}function ca(e){return e}var Tn,Qs,ra,On,En,dl,ty,Cn=F(()=>{"use strict";x();x();ln();Tn=new Set;Qs=()=>{for(let e of[...Tn])e()};ra="fluixi:revalidate";typeof window<"u"&&window.addEventListener("storage",e=>{if(!(e.key!==ra||!e.newValue))try{let t=JSON.parse(e.newValue).names;Array.isArray(t)&&t.every(r=>typeof r=="string")&&ta(t,ct())}catch{}});globalThis[Symbol.for("fluixi.revalidate")]=e=>rr(e);On=new Map;En=new Map;dl=Ge(void 0,"route-data"),ty=dl.Provider});var pa={};Hn(pa,{A:()=>Dn,Form:()=>kl,Link:()=>ir,Outlet:()=>$n,Redirect:()=>Nn,Router:()=>Pn,action:()=>Rn,cache:()=>ea,createAsync:()=>na,createBrowserHistory:()=>Le,createMemoryHistory:()=>tr,lazy:()=>Pe,matchPath:()=>et,matchRoutes:()=>tt,prefersReducedMotion:()=>bn,preloadRoutes:()=>_l,revalidate:()=>rr,runWithOwner:()=>L,select:()=>bl,supportsViewTransitions:()=>wn,useAction:()=>ca,useIsRouting:()=>ml,useLevelParams:()=>vl,useLinkNavigation:()=>Sl,useLocation:()=>nt,useMatch:()=>Ln,useNavigate:()=>or,useParam:()=>Mn,useParamSelector:()=>wl,useParams:()=>rt,useRouteData:()=>Al,useRouter:()=>Ie,useSearchParams:()=>In,useSubmission:()=>sa,useSubmissions:()=>aa});function pl(e,t,r){let n,o=e.route.data;if(typeof o=="function"){let f=!1;A(()=>{f=!0});let l=T(),d=K(be),h=!1,y=S=>{h||f||(h=!0,L(l,()=>{let I=!0;k(()=>{S(),I?I=!1:O(()=>{w()})})}))},[p,{refetch:w}]=ce(()=>{let S=o({params:r.params,location:r.location},l,()=>f,y);return d?d.trackLoad(S):S});A(Zs(()=>{w()}));let _=O(()=>JSON.stringify(r.matched()[t]?.params??{}));k(()=>{let S=r.matched()[t];if(S?.route!==e.route)return;let I=JSON.stringify(S.params??{});I!==_&&(_=I,O(()=>{w()}))}),n=()=>{let S=p.error;if(S!=null)throw S;let I=p;return I.state==="refreshing"?I.latest:p()},Object.defineProperty(n,"loading",{get:()=>p.loading}),Object.defineProperty(n,"state",{get:()=>p.state})}let a=()=>la.Provider({value:n,get children(){return fa.Provider({value:e.params,get children(){return ua.Provider({value:{depth:t,...r},get children(){return Y(e.component,{})}})}})}});if(!n)return{view:a(),ready:()=>!0};let i=n,s=()=>{let f=i.state;return f===void 0?i.loading:f==="pending"||f==="unresolved"},[u,c]=b(O(()=>!s()));return k(()=>c(!s())),{view:v(()=>u()?a():null),ready:u}}function da(e){let t=e.depth+1,[r,n]=b(O(()=>e.matched()[t]?.component));k(()=>{let c=e.matched()[t]?.component;O(r)!==c&&n(()=>c)});let o=T(),a=null,i=null,s=c=>c?.dispose();A(()=>{s(a),s(i),a=i=null});let u=v(()=>{if(!r())return null;let f=O(()=>e.matched())[t];return L(o,()=>W(l=>({...pl(f,t,{matched:e.matched,params:e.params,location:e.location}),dispose:l})))});return v(()=>{let c=u();return c?(c===a||(i&&i!==c&&s(i),i=c,a&&!c.ready())||(s(a),a=c,i=null),a.view):(s(a),s(i),a=i=null,e.notFound?e.notFound():null)})}function yl(e){return e==null?hl():typeof e=="function"?Y(e,{}):e}function hl(){let e=Re("div");C(e,"class","fx-not-found"),C(e,"role","main"),C(e,"style","min-height:60vh;display:grid;place-content:center;gap:.25rem;text-align:center;font-family:system-ui,-apple-system,sans-serif");let t=Re("h1");C(t,"style","margin:0;font-size:2.5rem;font-weight:700"),j(t,"404");let r=Re("p");return C(r,"style","margin:0;opacity:.7"),j(r,"This page could not be found."),e.appendChild(t),e.appendChild(r),e}function Pn(e){let t=e.history??Le(),r=Gs({routes:e.routes,base:e.base,history:t}),[n,o]=b(r.state()),[a,i]=b(!1),[s,u]=b(0),c=0,f=t.window?Bs(r.state().location):void 0,l=f?{id:0,location:r.state().location,from:void 0}:null,[d,h]=b(0),y=()=>{let M=nr??e.transition??"auto";return nr=void 0,M},p=r.subscribe(M=>{let P=++c,$=y();i(!0),f&&(f.leave(),l={id:P,location:M.location,from:O(n).location});let G=js((M.match?.matched??[]).map(Se=>Se.component).filter(Boolean)),ye=()=>{o(M);let Se=co();return P===c&&i(!1),f&&h(P),Se};if(!G){Sn($,ye);return}G.then(()=>{if(P===c)return Sn($,ye)})});A(()=>{p(),f?.dispose(),r.destroy(),c++});let w=v(()=>(n().match?.matched??[]).filter(M=>M.component)),_={router:r,location:v(()=>n().location),params:v(()=>n().match?.params??{}),isRouting:()=>a()||s()>0,trackLoad(M){return M&&typeof M.finally=="function"&&(u(P=>P+1),M.finally(()=>u(P=>P-1)).catch(()=>{})),M}};if(f){let M=typeof requestAnimationFrame=="function"?requestAnimationFrame:P=>setTimeout(P,0);k(()=>{let P=d();if(_.isRouting())return;let $=l;!$||$.id!==P||P!==c||(l=null,M(()=>{P===c&&f.arrive($.location,$.from)}))})}let S={depth:-1,matched:w,params:_.params,location:_.location,notFound:()=>yl(e.notFound)},I;return be.Provider({value:_,get children(){return I??=da(S)}})}function $n(){let e=K(ua);return e?da(e):null}function ml(e={}){let t=K(be)?.isRouting??(()=>!1),r=e.delay??0;if(r<=0)return t;let[n,o]=b(!1);return k(()=>{if(!t()){o(!1);return}let a=setTimeout(()=>o(!0),r);A(()=>clearTimeout(a))}),()=>t()&&n()}function Nn(e){let t=K(be);if(t&&typeof window<"u"){let r=!1;A(()=>r=!0),queueMicrotask(()=>{r||t.router.navigate(e.to,{replace:e.replace!==!1})})}return null}function Ie(){let e=K(be);if(e)return e;if(typeof window>"u")return gl;throw new Error("[router] useRouter must be used within <Router>")}function rt(){let e=Ie().params;return v(()=>e(),{},{equals:(t,r)=>JSON.stringify(t)===JSON.stringify(r)})}function vl(){return K(fa)??{}}function Mn(e){let t=rt();return v(()=>t()[e])}function wl(e,t){let r=rt();return v(()=>e(r()),void 0,t?{equals:t}:void 0)}function Ln(e){let t=nt();return v(()=>et(typeof e=="function"?e():e,t.pathname))}function In(){let e=nt(),t=or();return[v(()=>e.query),(o,a)=>{let i=new URLSearchParams(e.search);for(let[u,c]of Object.entries(o))c===null?i.delete(u):i.set(u,c);let s=i.toString();t(e.pathname+(s?`?${s}`:""),a)}]}function bl(e,t){let r=(n,o)=>we(n,o);return t!==void 0?v(()=>Qt(e(),t),void 0,{equals:r}):v(e,void 0,{equals:r})}function nt(){let{location:e}=Ie();return new Proxy({},{get:(t,r)=>e()[r],has:(t,r)=>r in e(),ownKeys:()=>Reflect.ownKeys(e()),getOwnPropertyDescriptor:(t,r)=>Object.getOwnPropertyDescriptor(e(),r)})}function Sl(e={}){let t=K(be);return r=>{if(!t||r.defaultPrevented||r.button!==0||r.metaKey||r.ctrlKey||r.shiftKey||r.altKey)return;let o=r.target?.closest?.("a");if(!o||!o.getAttribute("href")||o.target&&o.target!=="_self"||o.hasAttribute("download")||/(^|\s)external(\s|$)/.test(o.getAttribute("rel")??""))return;let a=new URL(o.href);a.protocol!=="http:"&&a.protocol!=="https:"||a.origin===window.location.origin&&(a.hash&&a.pathname===window.location.pathname&&a.search===window.location.search||e.shouldNavigate&&!e.shouldNavigate(a,o)||(r.preventDefault(),nr=e.transition,t.router.navigate(a.pathname+a.search+a.hash,{replace:e.replace})))}}function or(){let{router:e}=Ie();return(t,r)=>{nr=r?.transition,e.navigate(t,r)}}function Al(){return K(la)??(()=>{})}function ir(e){let t=K(be),r=()=>t.router.navigate(ae(e.href)??"",{replace:ae(e.replace)}),n=Re("a");C(n,"href",ae(e.href)??""),e.slot&&C(n,"slot",ae(e.slot));for(let a of Object.keys(e)){if(xl.has(a))continue;let i=e[a];if(typeof i=="function"){if(/^on[A-Z]/.test(a))continue;let s=i,u=()=>{let c=s();c==null||c===!1?n.removeAttribute?.(a):C(n,a,String(c))};typeof n.addEventListener=="function"?k(u):u();continue}i!=null&&C(n,a,String(i))}if(typeof n.addEventListener=="function")n.addEventListener("click",a=>{a.metaKey||a.ctrlKey||a.shiftKey||a.altKey||t&&(a.preventDefault(),r())});else{let a=ae(e.className??e.class)??"";a&&C(n,"class",a)}typeof n.addEventListener=="function"&&k(()=>{let a=ae(e.href)??"";n.setAttribute("href",a);let i=ae(e.className??e.class)??"",s=ae(e.activeClass)??"",u=ae(e.active)??t?.location().pathname===a;n.className=[i,u?s:""].filter(Boolean).join(" ")});let o=e.children;return o!=null&&j(n,o),n}function kl(e){let t=e.action,r=e.className??e.class,n=t.url??"",o=Re("form");C(o,"method","post"),n&&C(o,"action",n),r&&C(o,"class",r);for(let i of Object.keys(e)){if(i==="action"||i==="children"||i==="class"||i==="className")continue;let s=e[i];s!=null&&typeof s!="function"&&C(o,i,String(s))}typeof o.addEventListener=="function"&&o.addEventListener("submit",i=>{i.preventDefault();let s={};new FormData(o).forEach((u,c)=>{s[c]=u}),Promise.resolve(t(s)).catch(()=>{})});let a=e.children;return a!=null&&j(o,a),o}async function _l(e,t){let r=tt(e,t);if(!r)return;let n=[];for(let o of r.matched){let a=o.component;a&&typeof a.preload=="function"&&n.push(a.preload())}await Promise.all(n)}var be,ua,fa,la,nr,gl,ae,xl,Dn,qn=F(()=>{"use strict";x();An();q();x();kn();Us();Js();_n();Cn();_n();Cn();Gt();An();x();be=ee(void 0,"router"),ua=ee(void 0,"outlet"),fa=ee(void 0,"route-params"),la=ee(void 0,"route-data");gl={router:{navigate:()=>{}},location:()=>({pathname:"",search:"",hash:"",query:{}}),params:()=>({}),isRouting:()=>!1,trackLoad:e=>e};ae=e=>typeof e=="function"?e():e,xl=new Set(["href","slot","class","className","active","activeClass","replace","children"]);Dn=ir});var El={};Hn(El,{$component:()=>an,A:()=>Dn,ClientOnly:()=>nn,DEV:()=>Je,Dynamic:()=>ps,ErrorBoundary:()=>ms,FRAMEWORK_NAME:()=>Ls,For:()=>us,Fragment:()=>dn,Index:()=>fs,Link:()=>ir,Match:()=>ls,NoSsr:()=>hs,Outlet:()=>$n,Portal:()=>ys,Redirect:()=>Nn,Router:()=>Pn,Show:()=>cs,Store:()=>wt,Suspense:()=>Xe,Switch:()=>ds,VERSION:()=>Ms,addClass:()=>Mi,batch:()=>D,classMap:()=>gs,cleanupDelegation:()=>Es,composeProviders:()=>Ts,createBrowserHistory:()=>Le,createComponent:()=>Ce,createComputed:()=>ao,createContext:()=>Ge,createDebounce:()=>go,createDeferred:()=>mo,createEffect:()=>k,createIsomorphicState:()=>Cs,createMemo:()=>v,createMemoryHistory:()=>tr,createProvider:()=>fn,createRenderEffect:()=>R,createResource:()=>ce,createRoot:()=>W,createSelector:()=>ho,createSignal:()=>b,createStore:()=>Er,delegateEvents:()=>ve,devOnly:()=>un,getFrameworkInfo:()=>Tf,getOwner:()=>T,getSharedConfig:()=>sn,hydrate:()=>Kt,initDelegation:()=>Os,insert:()=>j,isDOMNode:()=>qt,isDev:()=>cn,isLitTemplateResult:()=>Di,isRenderable:()=>_s,jsx:()=>pn,jsxs:()=>Ns,lazy:()=>Pe,mount:()=>ha,onCleanup:()=>A,onMount:()=>Ft,onUnmount:()=>Ut,portal:()=>ks,read:()=>$o,reduce:()=>Po,removeClass:()=>Li,render:()=>$e,requireContext:()=>Rs,runWithOwner:()=>L,setAttribute:()=>C,setOwner:()=>io,setProperty:()=>ge,spread:()=>os,startClient:()=>ma,styleMap:()=>vs,toggleClass:()=>Ii,untrack:()=>O,untrackStore:()=>Tr,useCallback:()=>Xt,useContext:()=>Ze,useEffect:()=>Ye,useEventListener:()=>Yt,useLocation:()=>nt,useMatch:()=>Ln,useMemo:()=>zt,useNavigate:()=>or,useParam:()=>Mn,useParams:()=>rt,useReducer:()=>Jt,useRef:()=>Bt,useRouter:()=>Ie,useSearchParams:()=>In});x();x();var vr="1.0.0-alpha.95",Ro=vr.split(".")[0],xo=`__fluixi_signal_state_v${Ro}__`,oc=`__fluixi_signal_builds_v${Ro}__`,ic=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function Co(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:ic,onSuspend:null,onError:null,observer:null}}var gr=globalThis;function sc(e){let t=Co(),r=e;for(let n of Object.keys(t))n in e||(r[n]=t[n]);return e}function ac(){let e=gr[xo];return e?sc(e):gr[xo]=Co()}var E=ac();(gr[oc]??=[]).push(vr);function cc(e){return E.observer=e,()=>{E.observer===e&&(E.observer=null)}}var wr=[],uc,ko;function fc(e){let t=E.observer;t&&t.created(e.parents===void 0?{...e,parents:wr,origin:e.origin??uc,scope:e.scope??ko}:{...e,scope:e.scope??ko})}function lc(e){return E.observer?(wr.push(e),!0):!1}function dc(){wr.pop()}function pc(e){E.observer?.ran?.(e)}function yc(e){E.observer?.disposed?.(e)}var hc="__FLUIXI_DEVTOOLS_HOOK__",_o=globalThis[hc];if(typeof _o?.inject=="function")try{_o.inject({observeReactiveNodes:cc,version:vr})}catch{}function mc(){return E.observer!=null}var Oo=0,Eo=1,ut=2,gc=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(E.untracked)return;let e=E.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}};var vc=class extends gc{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=ut,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(E.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===Eo&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===ut)break}(this.state===ut||!this._initialized)&&this.recompute(),this.state=Oo}recompute(){if(this.sources){for(let s of this.sources)s.observers?.delete(this);this.sources.clear()}let e=E.consumer,t=E.untracked,r=lc(this);E.consumer=this,E.untracked=!1;let n,o=!1,a;try{n=this._fn()}catch(s){o=!0,a=s,n=this._value}finally{E.consumer=e,E.untracked=t,r&&dc()}let i=!this._initialized||this._threw!==o||(o?a!==this._error:!this._equals(this._value,n));if(this._initialized=!0,this._threw=o,this._error=a,this._value=n,pc(this),i){if(this.version++,this.observers)for(let s of[...this.observers])s.markDirty(ut);To(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===Oo;if(this.state=e,t){if(this.observers)for(let r of[...this.observers])r.markDirty(Eo);To(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function To(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}function wc(e){return E.onSuspend?(E.onSuspend(e,E.owner),!0):!1}function bc(){return E.owner}function Sc(e,t){let r=E.owner;E.owner=e;try{return t()}finally{E.owner=r}}function Ac(e){if(E.owner){if(E.owner.disposed){e();return}(E.owner.cleanups??=[]).push(e)}}function xc(e){E.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function kc(e){return!!e&&typeof e.then=="function"}xc(()=>{});var _c=Symbol.for("signal"),Oc=Symbol.for("memo");function Ec(e,t,r){let n=t,o=bc(),a=new vc(()=>Sc(o,()=>{try{return n=e(n)}catch(s){if(kc(s))return wc(s),n;throw s}}),{equals:r?.equals}),i=(()=>a.get());return Object.defineProperty(i,_c,{value:!0,enumerable:!0}),Object.defineProperty(i,Oc,{value:!0,enumerable:!0}),fc({kind:"memo",node:a,handle:i,name:r?.name}),mc()&&Ac(()=>yc(a)),i}function Po(e,t,r,n){return Ec(()=>e().reduce(t,r),void 0,n)}function $o(e){let t=e;for(;typeof t=="function";)t=t();return t}x();var Or="1.0.0-alpha.95",zo=Or.split(".")[0],No=`__fluixi_signal_state_v${zo}__`,Tc=`__fluixi_signal_builds_v${zo}__`,Rc=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function Bo(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Rc,onSuspend:null,onError:null,observer:null}}var br=globalThis;function Cc(e){let t=Bo(),r=e;for(let n of Object.keys(t))n in e||(r[n]=t[n]);return e}function Pc(){let e=br[No];return e?Cc(e):br[No]=Bo()}var fe=Pc();(br[Tc]??=[]).push(Or);function $c(e){return fe.observer=e,()=>{fe.observer===e&&(fe.observer=null)}}var Nc=[],ft;function Mc(e,t){if(!fe.observer)return t();let r=ft;ft=e;try{return t()}finally{ft=r}}var Mo;function Lc(e){let t=fe.observer;t&&t.created(e.parents===void 0?{...e,parents:Nc,origin:e.origin??ft,scope:e.scope??Mo}:{...e,scope:e.scope??Mo})}function Lo(e,t,r){fe.observer?.moved?.(e,t,r)}function Io(e){fe.observer?.disposed?.(e)}var Ic="__FLUIXI_DEVTOOLS_HOOK__",Do=globalThis[Ic];if(typeof Do?.inject=="function")try{Do.inject({observeReactiveNodes:$c,version:Or})}catch{}function Jo(){return fe.observer!=null}var pt=Symbol("store-raw"),qo=Symbol("store-node"),Vo=Symbol("store-has"),Ho=Symbol("store-self"),Wo=Symbol("store-track");var We=new WeakMap,Sr=new WeakMap,Oe=new WeakMap,yt=new WeakMap;function Dc(e,t){if(!_e(e)||!Jo())return;let r=new Set,n=i=>{if(!(!_e(i)||r.has(i))){r.add(i);for(let s of Object.values(i))n(s)}};n(yt.get(t)??t);let o=new Set,a=i=>{if(!_e(i))return;let s=i;if(r.has(s)||o.has(s))return;o.add(s);let u=We.get(s);if(u){for(let c of u.keys.values())Io(c);u.all&&Io(u.all),We.delete(s),Oe.delete(s),Sr.delete(s)}for(let c of Object.values(s))a(c)};a(e)}var ht=(e,t,r)=>r?`${e}[${String(t)}]`:`${e}.${String(t)}`;function Yo(e,t,r){let n=t?.owner,o=n&&r!==void 0?ht(n.name,r,t?.array):void 0,[a,i]=Mc(n?.store,()=>b(e,o?{name:o}:void 0)),s=a;return s.$=i,s}function mt(e){let t=We.get(e);return t?t.owner||(t.owner=Oe.get(e)):We.set(e,t={keys:new Map,owner:Oe.get(e),array:Array.isArray(e)}),t}function Ko(e,t,r){let n=e.keys.get(t);return n||e.keys.set(t,n=Yo(r,e,t)),n}function qc(e,t,r,n){let o=Oe.get(e);if(o&&o.store===t&&o.name===r)return;let a={store:t,name:r};Oe.set(e,a),yt.set(e,yt.get(n)??n);let i=We.get(e);if(i&&(i.owner=a,!!Jo())){for(let[s,u]of i.keys)Lo(u,t,ht(r,s,i.array));i.all&&Lo(i.all,t,ht(r,"*",i.array))}}function jo(e){let t=mt(e);(t.all||(t.all=Yo(void 0,t,"*")))()}function Fo(e,t){e.$(typeof t=="function"?()=>t:t)}function _e(e){if(e==null||typeof e!="object")return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function lt(e){if(!_e(e))return e;let t=Sr.get(e);if(t)return t;let r=new Proxy(e,Vc);return Sr.set(e,r),r}var Vc={get(e,t,r){if(t===pt||t===qo)return e;if(t===ke)return r;if(t===Vo)return u=>u in e;if(t==="__proxy")return!0;if(t===Wo||t===Ho)return jo(e),r;let n=e[t];if(typeof n=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return n;let o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get)return o.get.call(r);let a=mt(e),i=Ko(a,t,n),s=i();return _e(s)?(a.owner&&qc(s,i,ht(a.owner.name,t,a.array),e),lt(s)):s},set(){return!0},deleteProperty(e,t){return t in e&&te(e,t,void 0),!0},has(e,t){return t===pt||t===ke||t===qo||t===Vo||t===Ho||t===Wo?!0:(Ko(mt(e),t,e[t])(),t in e)},ownKeys(e){return jo(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function Xo(e,t=new Set){if(e==null||typeof e!="object")return e;let r=e[pt]??e;if(t.has(r)||!_e(r))return r;t.add(r);let n=!1,o=i=>{let s=Xo(i,t);return s!==i&&(n=!0),s};if(Array.isArray(r)){let i=r.map(o);return n?i:r}let a={};for(let i of Object.keys(r))a[i]=o(r[i]);return n?a:r}function te(e,t,r){let n=Xo(r),o=e[t];if(o===n&&(n!==void 0||t in e))return;let a=Array.isArray(e),i=a?e.length:0;n===void 0?delete e[t]:e[t]=n;let s=mt(e),u=s.keys.get(t);if(u&&Fo(u,n),Dc(o,e),a&&e.length!==i){let c=s.keys.get("length");c&&Fo(c,e.length)}s.all&&s.all.$(void 0)}function Ar(e,t){return typeof e=="function"?e(t):e}function xr(e,t){for(let r of Object.keys(t)){let n=t[r],o=e[r];n&&typeof n=="object"&&!Array.isArray(n)&&o&&typeof o=="object"&&!Array.isArray(o)?xr(o,n):te(e,r,n)}}function vt(e){let t=[],r=e.replace(/\[([^\]]*)\]/g,".$1");for(let n of r.split("."))n.length&&t.push(n);return t}function Go(e,t,r){let n=t.length-1;for(let a=0;a<n;a++){let i=t[a];if(i==="*"){let u=t.slice(a+1);if(Array.isArray(e))for(let c=0;c<e.length;c++)Go(e[c],u,r);return}let s=e[i];(s==null||typeof s!="object")&&(s=/^\d+$/.test(t[a+1])?[]:{},te(e,i,s)),e=s}let o=t[n];if(o==="*"){if(Array.isArray(e))for(let a=0;a<e.length;a++)te(e,a,Ar(r,e[a]));return}te(e,o,Ar(r,e[o]))}function Uo(e,t,r){Go(e,vt(t),r)}function Hc(e){return Array.isArray(e)&&e.length>0&&e.every(t=>Array.isArray(t)&&t.length>=2&&typeof t[0]=="string")}function dt(e,t){for(let r=e.length-1;r>=t.length;r--)te(e,String(r),void 0);e.length!==t.length&&te(e,"length",t.length);for(let r=0;r<t.length;r++)te(e,String(r),t[r])}function Wc(e,t){let r=t[0];if(typeof r=="function"&&t.length===1){let n=r(e);n&&n!==e&&xr(e,n);return}if(Array.isArray(r)&&t.length===1){if(Hc(r)){for(let n of r)Uo(e,n[0],n[1]);return}if(Array.isArray(e)){dt(e,r);return}if(r.length===0)return;throw new TypeError("[fluixi] set() was given an array that is neither a batch of [path, value] pairs nor a replacement for an array root. Name the path you meant, as in set('items', [...]).")}if(r&&typeof r=="object"&&!Array.isArray(r)&&t.length===1){xr(e,r);return}if(t.length>=3){kr(e,t.slice(0,-1),t[t.length-1]);return}Uo(e,String(r),t[1])}function Kc(e,t){if(typeof t=="function"){if(!Array.isArray(e))return[];let r=[];for(let n=0;n<e.length;n++)t(e[n],n)&&r.push(n);return r}if(Array.isArray(t))return Array.isArray(e)?t.map(Number):t.map(String);if(t&&typeof t=="object"&&("from"in t||"to"in t||"by"in t)){if(!Array.isArray(e))return[];let r=t.by??1,n=t.from??0,o=t.to??e.length-1,a=[];for(let i=n;i<=o;i+=r)i>=0&&i<e.length&&a.push(i);return a}return t==="*"?Array.isArray(e)?e.map((r,n)=>n):Object.keys(e??{}):[t]}function kr(e,t,r){if(e==null)return;let[n,...o]=t;if(typeof n=="string"){let i=vt(n);if(i.length>1){kr(e,[...i,...o],r);return}}let a=Kc(e,n);if(o.length===0){for(let i of a)te(e,i,Ar(r,e[i]));return}for(let i of a){let s=e[i];if(s==null||typeof s!="object"){let u=o[0];s=typeof u=="number"||/^\d+$/.test(String(u))?[]:{},te(e,i,s)}kr(s,o,r)}}function _r(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(_r);let t={};for(let r of Object.keys(e))t[r]=_r(e[r]);return t}function ue(e,t){let r=e;for(let n of vt(t)){if(r==null)return;r=r[n]}return r}var wt=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...r)=>D(()=>Wc(this.root,r))),e&&typeof e=="object"&&(Oe.set(e,{store:this,name:t.name??"store"}),yt.set(e,e)),Lc({kind:"store",node:this,handle:()=>this.root,name:t.name})}get state(){return lt(this.root)}get proxy(){return lt(this.root)}get accessor(){return(()=>lt(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return gt(this.state);let t=this.state;for(let r of vt(e)){if(t==null)return;t=t[r]}return gt(t)}select(e){return v(()=>e(this.state))}subscribe(e){return k(()=>e(this.state))}watch(e,t){let r;return k(()=>{let n=e(this.state);Object.is(n,r)||(t(n,r),r=n)})}reactive(e){return v(()=>this.state[e])}produce(e){this.set((t=>{let r=_r(t);return e(r),r}))}reconcile(e,t={}){this.set(e)}push(e,...t){let r=ue(this.root,e);this.set(e,r.concat(t))}pop(e){let t=ue(this.root,e).slice(),r=t.pop();return this.set(e,t),r}shift(e){let t=ue(this.root,e).slice(),r=t.shift();return this.set(e,t),r}splice(e,t,r,...n){let o=ue(this.root,e).slice(),a=o.splice(t,r,...n);return this.set(e,o),a}insert(e,t,r){let n=ue(this.root,e).slice();n.splice(t,0,r),this.set(e,n)}removeAt(e,t){let r=ue(this.root,e).slice(),n=r.splice(t,1);return this.set(e,r),n}replace(e,t){if(arguments.length>=2){let n=ue(this.root,String(e)),o=t;if(Array.isArray(n)&&Array.isArray(o)){dt(n,o);return}this.set(e,o);return}let r=this.root;if(Array.isArray(r)&&Array.isArray(e)){dt(r,e);return}this.set(e)}clear(e){let t=e===void 0?this.root:ue(this.root,e);if(Array.isArray(t)){dt(t,[]);return}if(t&&typeof t=="object")for(let r of Object.keys(t))te(t,r,void 0)}toObservable(){let[e]=b(this.state);return e.toObservable()}dispose(){}},jc=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","replace","clear","unwrap","toObservable"];function Fc(e,t){for(let r of jc)e[r]=t[r].bind(t);e.$=t.reactive.bind(t)}function Er(e,t={immutable:!0}){let r=new wt(e,t);return Fc(r.set,r),[r.proxy,r.set]}function Uc(e,t={}){return new wt(e,{...t,immutable:!1})}function gt(e){if(e==null||typeof e!="object")return e;let t=e[pt];return t!==void 0?t:e}function Tr(e){return O(()=>gt(e))}var Vl=Object.freeze({createStore:Er,createMutableStore:Uc,batch:D,unwrap:gt,untrackStore:Tr});q();x();q();var ws="1.0.0-alpha.95";q();qi(ws);q();q();q();x();var wf={context:null,owner:null};function sn(){return wf}var Je=typeof process<"u"&&!1,on=Symbol.for("fluixi-lifecycle");function bs(){let e=T();if(!e)return null;if(!e[on]){let t={mounts:[],effects:[],scheduled:!1};e[on]=t}return e[on]}function Ss(e){if(e.scheduled)return;if(H()){e.mounts=[],e.effects=[];return}e.scheduled=!0;let t=T();queueMicrotask(()=>{if(ro(t)){e.mounts=[],e.effects=[];return}L(t,()=>{for(let r of e.mounts)try{let n=r();typeof n=="function"&&A(n)}catch(n){console.error("Error in onMount callback:",n)}for(let r of e.effects){let n;k(()=>{n&&n(),n=r()}),A(()=>{n&&n()})}e.mounts=[],e.effects=[]})})}function Ce(e,t){return Y(e,t)}function an(e,t){let r=typeof e=="function"?O(()=>e(t)):e,n=r!=null&&(typeof r=="function"||typeof r=="object");if(n)try{r.$name=e.name}catch{}return n&&!V(r)?Be(r):r}function Ft(e,t=!0){if(H())return;let r=bs();if(r){if(!t){r.scheduled||e();return}r.mounts.push(e),Ss(r)}else{if(!t){e();return}k(()=>{let n=O(e);typeof n=="function"&&A(n)})}}function Ut(e){A(e)}function Ye(e){let t=bs();if(t)t.effects.push(e),Ss(t);else{let r;k(()=>{r&&r(),r=e()}),A(()=>{r&&r()})}}function zt(e){return v(e)}function Bt(e){let t={current:e};return A(()=>{t.current=null}),t}function Jt(e,t){let[r,n]=b(t);return[r,a=>{n(e(r(),a))}]}function Yt(e,t,r,n){Ye(()=>{let o=e&&"current"in e?e.current:e;if(o)return o.addEventListener(t,r,n),()=>{o.removeEventListener(t,r,n)}})}function Xt(e){return e}function cn(){return Je}function un(e){Je&&e()}x();q();function As(e){return!!(e&&typeof e=="object"&&typeof e.then=="function"||e instanceof Promise)}var bf=ee(void 0,"suspense-list");function Xe(e){return Y(Sf,e)}function Sf(e){let t=wo(),r=K(bf),n=r?r.register(t.inFallback):void 0;function o(l){return l==null||typeof l=="boolean"?null:typeof l=="function"&&ie(l)&&!V(l)?l():l}let a=Fi(()=>o(e.fallback??null)),i=mr(t,()=>He(()=>e.children)),s=(l,d)=>{if(!(d>8))if(Array.isArray(l))for(let h of l)s(h,d+1);else typeof l=="function"&&V(l)&&s(l(),d+1)};mr(t,()=>{R(()=>s(i,0))});let[u,c]=b(void 0),f=As(i);return f&&(t.increment(),i.then(l=>{c(()=>l),t.decrement()},()=>t.decrement())),v(()=>(n?n.showFallback():t.inFallback())?a:f?u():i)}Hi(Xe);Object.defineProperty(Xe,"__suspense",{value:!0,enumerable:!0});Gt();Gt();function $e(e,t,r={}){if(ve(["click","input","change","submit"]),H())throw new Error("render() is for client-side only. Use renderToString() on server.");if(!t)throw new Error("Container element is required");let n;return W(o=>{n=o;let a=typeof e=="function"?e():e;t.textContent="",Vt(t),Ht(),j(t,()=>a)}),()=>{n&&(n(),n=void 0)}}function Af(e){return e&&typeof e=="object"&&(e._$litType$!==void 0||e._$litDirective$!==void 0)}function ks(e,t,r={}){let n=document.createElement("div");n.setAttribute("data-portal","true"),t.appendChild(n);let o=$e(e,n,r);return()=>{o(),t.contains(n)&&t.removeChild(n)}}function _s(e){return!!(e==null||typeof e=="function"||qt(e)||Af(e)||Array.isArray(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean")}function Os(){H()||ve(["click","input","change","submit"])}function Es(){H()}ln();x();q();var xf="__fluixi_iso_states__",kf="__iso:";function _f(){return globalThis[xf]??=new Map}function Of(e){if(typeof window>"u")return;let t=rn();return t?t[kf+e]:void 0}function Cs(e,t){let r=Of(e),n=r!==void 0?r:typeof window<"u"&&t.client?t.client():t.fallback,[o,a]=b(n,{name:e});return _f().set(e,{server:t.server,set:a}),{value:o,set:a,key:e}}q();q();q();q();q();x();var dn=Symbol.for("fluixi.fragment"),Ps=typeof window>"u";function $s(e){return e==null||e===!1?null:Array.isArray(e)?e.map($s).flat():e}function pn(e,t,r){if(e==null)return null;let n=t||{};if(r!==void 0&&(n.key=r),e===dn)return v(()=>Be($s(n.children)));if(typeof e=="function"){let{type:o}=Wi(e);return e.$$typeof===Symbol.for("react.provider")||o==="provider"?e(n):Ps?{type:e,props:n}:v(()=>Y(e,n),void 0,{name:"jsx component"})}return typeof e=="string"&&e.trim().length>0?Ef(e,n):null}var Ns=pn;function Ef(e,t){return Ps?{type:e,props:t||{}}:as(e,t)}var Ms="0.0.1",Ls="Fluixi";function Tf(){return{name:Ls,version:Ms,features:{ssr:!0,hydration:!0,jsx:!0,litHtml:!0,signals:!0,fineGrained:!0,lazy:!0,hooks:!0,devMode:!0}}}q();var Rf=!1,Is=new Map;function yn(e){Rf=e}function Cf(){Is.clear()}function Ds(){if(typeof window>"u")return!1;let e=document.getElementById("__FLUIXI_HYDRATION__");if(!e||e.getAttribute("type")!=="application/json")return!1;try{let t=e.textContent||"{}",r=JSON.parse(t);for(let[n,o]of Object.entries(r))Is.set(n,o);return!0}catch(t){return console.error("Failed to deserialize hydration data:",t),!1}}function hn(){if(typeof window>"u")return;let e=document.getElementById("__FLUIXI_HYDRATION__");e&&e.remove();let t=document.createTreeWalker(document.body,NodeFilter.SHOW_COMMENT,null),r=[],n;for(;n=t.nextNode();){let o=n,a=o.nodeValue||"";(a.startsWith("#")||a.startsWith("/"))&&r.push(o)}r.forEach(o=>o.remove()),Cf()}typeof window<"u"&&window.addEventListener("load",()=>{setTimeout(hn,100)});x();x();x();var Pf=Object.defineProperty,$f=(e,t)=>{for(var r in t)Pf(e,r,{get:t[r],enumerable:!0})};function se(e){return typeof e=="function"?e():e}function Nf(e){if(typeof e=="string")return e;let t=[];return t.push(e.index===!1?"noindex":"index"),t.push(e.follow===!1?"nofollow":"follow"),e.noarchive&&t.push("noarchive"),e.nosnippet&&t.push("nosnippet"),e.noimageindex&&t.push("noimageindex"),e.maxSnippet!=null&&t.push(`max-snippet:${e.maxSnippet}`),e.maxImagePreview&&t.push(`max-image-preview:${e.maxImagePreview}`),e.maxVideoPreview!=null&&t.push(`max-video-preview:${e.maxVideoPreview}`),t.join(", ")}function qs(){let e=[],[t,r]=b(0);return{sources:e,version:t,push(n){return e.push(n),r(o=>o+1),()=>{let o=e.indexOf(n);o!==-1&&(e.splice(o,1),r(a=>a+1))}}}}var mn=globalThis[Symbol.for("fluixi.head")]??={active:null,scope:null};function Vs(e){mn.active=e}function Mf(){return mn.scope?.()??mn.active}function Ne(e){let t=Mf();if(!t)return globalThis.process?.env?.NODE_ENV!=="production"&&console.warn("[fluixi/head] useHead() called with no active head registry — ignored."),()=>{};let r=t.push(e);return typeof window<"u"&&T()&&A(r),r}function Zt(e){let t=5381;for(let r=0;r<e.length;r++)t=t*33^e.charCodeAt(r);return(t>>>0).toString(36)}function Lf(e){return e.charset!=null?"meta:charset":e.property?"meta:property:"+e.property:e.name?"meta:name:"+e.name:e["http-equiv"]?"meta:http-equiv:"+e["http-equiv"]:"meta:"+Zt(JSON.stringify(e))}function If(e,t){let r=typeof t=="string"?{url:t}:t;e.push({tag:"meta",key:"meta:property:og:image:"+r.url,attrs:{property:"og:image",content:r.url}}),r.secureUrl&&e.push({tag:"meta",key:"meta:property:og:image:secure:"+r.url,attrs:{property:"og:image:secure_url",content:r.secureUrl}}),r.type&&e.push({tag:"meta",key:"meta:property:og:image:type:"+r.url,attrs:{property:"og:image:type",content:r.type}}),r.width!=null&&e.push({tag:"meta",key:"meta:property:og:image:width:"+r.url,attrs:{property:"og:image:width",content:String(r.width)}}),r.height!=null&&e.push({tag:"meta",key:"meta:property:og:image:height:"+r.url,attrs:{property:"og:image:height",content:String(r.height)}}),r.alt&&e.push({tag:"meta",key:"meta:property:og:image:alt:"+r.url,attrs:{property:"og:image:alt",content:r.alt}})}function Df(e,t){let r=(n,o)=>{o!=null&&t.push({tag:"meta",key:"meta:property:og:"+n,attrs:{property:"og:"+n,content:o}})};r("title",e.title),r("description",e.description),r("type",e.type),r("url",e.url),r("site_name",e.siteName),r("locale",e.locale);for(let n of e.localeAlternate??[])t.push({tag:"meta",key:"meta:property:og:locale:alt:"+n,attrs:{property:"og:locale:alternate",content:n}});if(e.image!=null){let n=Array.isArray(e.image)?e.image:[e.image];for(let o of n)If(t,o)}if(e.video){let n=typeof e.video=="string"?{url:e.video}:e.video;r("video",n.url),"type"in n&&n.type&&r("video:type",n.type),"width"in n&&n.width!=null&&r("video:width",String(n.width)),"height"in n&&n.height!=null&&r("video:height",String(n.height))}if(e.audio){let n=typeof e.audio=="string"?{url:e.audio}:e.audio;r("audio",n.url),"type"in n&&n.type&&r("audio:type",n.type)}if(e.article){let n=e.article;r("article:published_time",n.publishedTime),r("article:modified_time",n.modifiedTime),r("article:expiration_time",n.expirationTime),r("article:section",n.section);for(let o of[].concat(n.author??[]))t.push({tag:"meta",key:"meta:property:og:article:author:"+o,attrs:{property:"article:author",content:o}});for(let o of[].concat(n.tag??[]))t.push({tag:"meta",key:"meta:property:og:article:tag:"+o,attrs:{property:"article:tag",content:o}})}if(e.book){let n=e.book;r("book:isbn",n.isbn),r("book:release_date",n.releaseDate);for(let o of[].concat(n.author??[]))t.push({tag:"meta",key:"meta:property:og:book:author:"+o,attrs:{property:"book:author",content:o}});for(let o of[].concat(n.tag??[]))t.push({tag:"meta",key:"meta:property:og:book:tag:"+o,attrs:{property:"book:tag",content:o}})}if(e.profile){let n=e.profile;r("profile:first_name",n.firstName),r("profile:last_name",n.lastName),r("profile:username",n.username),r("profile:gender",n.gender)}}function qf(e,t){let r=(n,o)=>{o!=null&&t.push({tag:"meta",key:"meta:name:twitter:"+n,attrs:{name:"twitter:"+n,content:o}})};r("card",e.card),r("site",e.site),r("creator",e.creator),r("title",e.title),r("description",e.description),r("image",e.image),r("image:alt",e.imageAlt),r("player",e.player),e.playerWidth!=null&&r("player:width",String(e.playerWidth)),e.playerHeight!=null&&r("player:height",String(e.playerHeight)),e.app&&(r("app:name:iphone",e.app.name),r("app:id:iphone",e.app.idIphone),r("app:id:ipad",e.app.idIpad),r("app:id:googleplay",e.app.idGooglePlay))}function Vf(e,t){let r=(n,o)=>t.push({tag:"link",key:n,attrs:o});if(e.icon!=null){let n=typeof e.icon=="string"?[{url:e.icon}]:e.icon;for(let o of n)r("link:icon:"+o.url,{rel:"icon",href:o.url,...o.type?{type:o.type}:{},...o.sizes?{sizes:o.sizes}:{}})}if(e.apple!=null){let n=typeof e.apple=="string"?[{url:e.apple}]:e.apple;for(let o of n)r("link:apple-touch-icon:"+o.url,{rel:"apple-touch-icon",href:o.url,...o.sizes?{sizes:o.sizes}:{}})}e.mask&&r("link:mask-icon",{rel:"mask-icon",href:e.mask.url,...e.mask.color?{color:e.mask.color}:{}}),e.shortcut&&r("link:shortcut",{rel:"shortcut icon",href:e.shortcut}),e.msTileImage&&t.push({tag:"meta",key:"meta:name:msapplication-TileImage",attrs:{name:"msapplication-TileImage",content:e.msTileImage}}),e.msTileColor&&t.push({tag:"meta",key:"meta:name:msapplication-TileColor",attrs:{name:"msapplication-TileColor",content:e.msTileColor}})}function Hf(e,t,r){let n=(d,h)=>t.push({tag:"meta",key:d,attrs:h}),o=se(e.title);o!==void 0&&(r.title=o),e.titleTemplate!==void 0&&(r.template=e.titleTemplate);let a=se(e.lang);a!==void 0&&t.push({tag:"htmlAttr",key:"html:lang",name:"lang",value:a});for(let[d,h]of Object.entries(e.htmlAttrs??{})){let y=se(h);y!==void 0&&t.push({tag:"htmlAttr",key:`html:${d}`,name:d,value:y})}e.charset!==void 0&&n("meta:charset",{charset:e.charset}),e.viewport!==void 0&&n("meta:name:viewport",{name:"viewport",content:e.viewport});let i=se(e.description);i!==void 0&&n("meta:name:description",{name:"description",content:i});let s=se(e.keywords);s!==void 0&&n("meta:name:keywords",{name:"keywords",content:Array.isArray(s)?s.join(", "):s}),e.author!==void 0&&n("meta:name:author",{name:"author",content:e.author}),e.robots!==void 0&&n("meta:name:robots",{name:"robots",content:Nf(e.robots)}),e.generator!==void 0&&n("meta:name:generator",{name:"generator",content:e.generator}),e.applicationName!==void 0&&n("meta:name:application-name",{name:"application-name",content:e.applicationName}),e.referrer!==void 0&&n("meta:name:referrer",{name:"referrer",content:e.referrer});let u=se(e.colorScheme);u!==void 0&&n("meta:name:color-scheme",{name:"color-scheme",content:u});let c=se(e.themeColor);if(typeof c=="string")n("meta:name:theme-color",{name:"theme-color",content:c});else if(c)for(let{color:d,media:h}of c)n(`meta:name:theme-color${h?`:${h}`:""}`,h?{name:"theme-color",content:d,media:h}:{name:"theme-color",content:d});let f=se(e.canonical);if(f!==void 0&&t.push({tag:"link",key:"link:rel:canonical",attrs:{rel:"canonical",href:f}}),e.manifest!==void 0&&t.push({tag:"link",key:"link:rel:manifest",attrs:{rel:"manifest",href:e.manifest}}),e.base!==void 0&&t.push({tag:"base",key:"base",attrs:{href:e.base}}),e.verification){let d={google:"google-site-verification",bing:"msvalidate.01",yandex:"yandex-verification",pinterest:"p:domain_verify"};for(let[h,y]of Object.entries(e.verification)){if(y==null)continue;let p=d[h]??h;n("meta:name:"+p,{name:p,content:y})}}for(let d of e.alternates??[])t.push({tag:"link",key:"link:alternate:hreflang:"+d.hreflang,attrs:{rel:"alternate",hreflang:d.hreflang,href:d.href}});for(let d of e.feeds??[])t.push({tag:"link",key:"link:alternate:feed:"+d.href,attrs:{rel:"alternate",type:d.type??"application/rss+xml",href:d.href,...d.title?{title:d.title}:{}}});e.og&&Df(e.og,t),e.twitter&&qf(e.twitter,t),e.icons&&Vf(e.icons,t);let l=se(e.jsonLd);if(l!==void 0){let d=Array.isArray(l)?l:[l];for(let h of d){let y=JSON.stringify(h);t.push({tag:"script",key:"script:ldjson:"+Zt(y),attrs:{type:"application/ld+json"},children:y})}}for(let d of e.meta??[]){let h={};for(let[y,p]of Object.entries(d))p!=null&&(h[y==="httpEquiv"?"http-equiv":y]=p);t.push({tag:"meta",key:Lf(h),attrs:h})}for(let d of e.link??[]){let h={};for(let[y,p]of Object.entries(d))p!=null&&(h[y]=p);t.push({tag:"link",key:"link:"+(h.rel??"")+":"+(h.href??Zt(JSON.stringify(h))),attrs:h})}for(let d of e.script??[]){let h={},y;for(let[p,w]of Object.entries(d))w!=null&&(p==="children"?y=w:h[p]=w);t.push({tag:"script",key:"script:"+(h.src??Zt((y??"")+JSON.stringify(h))),attrs:h,children:y})}}function Wf(e,t){return typeof e=="function"?e(t):e.includes("%s")?e.replace("%s",t):e}function Kf(e){let t=[],r={};for(let a of e.sources){let i=typeof a=="function"?a():a;Hf(i,t,r)}r.title!==void 0&&t.push({tag:"title",key:"title",children:r.template?Wf(r.template,r.title):r.title});let n=new Map,o={};for(let a of t){if(a.tag==="htmlAttr"){o[a.name]=a.value;continue}n.set(a.key,a)}return{tags:[...n.values()],htmlAttrs:o}}var gn="data-fh",vn="data-fh-key";function Hs(e){for(let t=e.firstChild;t;t=t.nextSibling)if(t.nodeType===8&&t.data.startsWith("fh:")){t.parentNode?.removeChild(t);return}}function Ws(e,t){for(let r of Array.from(e.attributes))r.name===gn||r.name===vn||r.name in t||e.removeAttribute(r.name);for(let[r,n]of Object.entries(t))e.getAttribute(r)!==n&&e.setAttribute(r,n)}function jf(e){let t=document.createElement(e.tag);return Ws(t,e.attrs),t.setAttribute(gn,""),t.setAttribute(vn,e.key),e.tag==="script"&&e.children!=null&&(t.textContent=e.children),t}function Ff(e,t){let r=document.head,n=new Map;for(let i of Array.from(r.querySelectorAll(`[${gn}]`))){let s=i.getAttribute(vn);i.tagName!=="TITLE"&&s&&n.set(s,i)}let o=null,a=new Set;for(let i of e){if(i.tag==="title"){o=i.children;continue}if(i.tag==="htmlAttr")continue;a.add(i.key);let s=n.get(i.key);s&&s.tagName===i.tag.toUpperCase()?(Ws(s,i.attrs),i.tag==="script"&&(s.textContent??"")!==(i.children??"")&&(s.textContent=i.children??"")):(s&&s.remove(),r.appendChild(jf(i)))}for(let[i,s]of n)a.has(i)||s.remove();o!=null&&document.title!==o&&(document.title=o);for(let[i,s]of Object.entries(t))document.documentElement.getAttribute(i)!==s&&document.documentElement.setAttribute(i,s)}function Ks(e){return W(t=>(k(()=>{e.version();let{tags:r,htmlAttrs:n}=Kf(e);Ff(r,n)}),A(()=>{}),t))}var Uf={};$f(Uf,{Base:()=>Xf,JsonLD:()=>Gf,Link:()=>Jf,Meta:()=>Bf,Script:()=>Yf,Title:()=>zf});function Qe(e){return typeof e=="function"?e():e}function zf(e){return Ne(()=>({title:Qe(e.children)})),null}function Bf(e){return Ne(()=>({meta:[{...e,content:Qe(e.content)}]})),null}function Jf(e){return Ne(()=>{let t={};for(let[r,n]of Object.entries(e))t[r]=Qe(n);return{link:[t]}}),null}function Yf(e){return Ne(()=>{let t={};for(let[r,n]of Object.entries(e))t[r]=Qe(n);return{script:[t]}}),null}function Xf(e){return Ne({base:e.href}),null}function Gf(e){return Ne(()=>({jsonLd:Qe(e.data)})),null}function ha(e,t){if(!t)throw new Error("Container element not found for mount()");tn(()=>e(),t)}var ya=e=>v(()=>Ce(e));async function ma(e,t={}){let r=typeof t.root=="string"?document.querySelector(t.root):t.root??document.querySelector("#app");if(!r)throw new Error(`[Fluixi] Mount container not found: ${t.root??"#app"}`);let n=!!document.getElementById("__FLUIXI_HYDRATION__")||!!t.routes&&r.firstElementChild!=null,o=t.hydrate??n,a=qs();if(Vs(a),Hs(r),o){Bi();try{if(t.routes&&t.routes.length){let{preloadRoutes:i}=await Promise.resolve().then(()=>(qn(),pa));await i(t.routes,window.location.pathname)}Ds(),yn(!0),Kt(ya(e),r),Ol()}finally{Ji()}setTimeout(()=>{yn(!1),Zi(r)&&typeof process<"u",Zr(),hn()},100)}else $e(ya(e),r);Ks(a)}function Ol(){if(typeof window>"u")return;let e=window;typeof e.__FX_REPLAY_STOP__=="function"&&e.__FX_REPLAY_STOP__();let t=e.__FX_REPLAY__;if(e.__FX_REPLAY__=void 0,e.__FX_REPLAY_STOP__=void 0,!(!Array.isArray(t)||t.length===0))for(let r of t){let n=r&&r.target;if(!n||n.isConnected===!1||typeof n.dispatchEvent!="function")continue;let o=r.type,a=o==="click"?new MouseEvent(o,{bubbles:!0,cancelable:!0}):new Event(o,{bubbles:!0,cancelable:!0});n.dispatchEvent(a)}}qn();return Aa(El);})();
|