sibujs 4.4.0 → 4.5.0

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.
Files changed (74) hide show
  1. package/README.md +11 -0
  2. package/dist/browser.cjs +31 -2
  3. package/dist/browser.d.cts +15 -2
  4. package/dist/browser.d.ts +15 -2
  5. package/dist/browser.js +4 -4
  6. package/dist/build.cjs +92 -13
  7. package/dist/build.js +10 -10
  8. package/dist/cdn.dev.global.js +9 -9
  9. package/dist/cdn.full.dev.global.js +10 -10
  10. package/dist/cdn.full.global.js +9 -9
  11. package/dist/cdn.global.js +9 -9
  12. package/dist/{chunk-XLO7SLIX.js → chunk-2DCGACUU.js} +16 -9
  13. package/dist/{chunk-6GSIXTWX.js → chunk-3JZ4L5TJ.js} +10 -4
  14. package/dist/{chunk-UCALUKB5.js → chunk-4PMLNECI.js} +4 -4
  15. package/dist/{chunk-RR7M3FHM.js → chunk-7LN645I6.js} +1 -1
  16. package/dist/{chunk-SKPTERHP.js → chunk-B3WHI2QA.js} +1 -1
  17. package/dist/{chunk-4Z3SPQ67.js → chunk-FTIR4QW2.js} +13 -3
  18. package/dist/{chunk-HFCOH2GN.js → chunk-GW3SCCZG.js} +4 -4
  19. package/dist/{chunk-PNIRUQ4C.js → chunk-KEISJXBU.js} +2 -2
  20. package/dist/{chunk-LYVUX7NT.js → chunk-OMJJM3KM.js} +2 -2
  21. package/dist/{chunk-VCTAEPSB.js → chunk-ONOHFDLG.js} +9 -1
  22. package/dist/{chunk-36S2YPP4.js → chunk-PCT43HW3.js} +1 -1
  23. package/dist/{chunk-W2EQ7X2L.js → chunk-RBTPLM32.js} +46 -8
  24. package/dist/{chunk-7GIHSAWB.js → chunk-RIXRAYIU.js} +1 -1
  25. package/dist/{chunk-HQSEH5F6.js → chunk-RJE2BNI4.js} +3 -3
  26. package/dist/{chunk-ADM46X22.js → chunk-S373NSMK.js} +18 -13
  27. package/dist/{chunk-M2F7TZHH.js → chunk-TBYTO6BS.js} +2 -2
  28. package/dist/{chunk-3BTTCZ5J.js → chunk-UGRX3S57.js} +31 -2
  29. package/dist/{chunk-7NBDXVHS.js → chunk-VUF4ALSW.js} +1 -1
  30. package/dist/{chunk-LQFGQNMV.js → chunk-VZKNK2V7.js} +9 -4
  31. package/dist/{chunk-NVNJH22U.js → chunk-XZZOBQAY.js} +1 -1
  32. package/dist/{customElement-CNZxEB9G.d.ts → customElement-OB9CIsc5.d.cts} +38 -10
  33. package/dist/{customElement-CNZxEB9G.d.cts → customElement-OB9CIsc5.d.ts} +38 -10
  34. package/dist/data.cjs +81 -9
  35. package/dist/data.js +6 -6
  36. package/dist/devtools.cjs +41 -2
  37. package/dist/devtools.js +4 -4
  38. package/dist/ecosystem.cjs +83 -9
  39. package/dist/ecosystem.d.cts +13 -5
  40. package/dist/ecosystem.d.ts +13 -5
  41. package/dist/ecosystem.js +7 -7
  42. package/dist/extras.cjs +115 -14
  43. package/dist/extras.d.cts +2 -2
  44. package/dist/extras.d.ts +2 -2
  45. package/dist/extras.js +19 -19
  46. package/dist/index.cjs +92 -13
  47. package/dist/index.d.cts +24 -151
  48. package/dist/index.d.ts +24 -151
  49. package/dist/index.js +10 -10
  50. package/dist/motion.cjs +31 -2
  51. package/dist/motion.js +3 -3
  52. package/dist/patterns.cjs +81 -10
  53. package/dist/patterns.d.cts +5 -0
  54. package/dist/patterns.d.ts +5 -0
  55. package/dist/patterns.js +5 -5
  56. package/dist/performance.cjs +31 -2
  57. package/dist/performance.js +4 -4
  58. package/dist/plugins.cjs +39 -2
  59. package/dist/plugins.js +6 -6
  60. package/dist/ssr.cjs +39 -2
  61. package/dist/ssr.js +7 -7
  62. package/dist/tagFactory-DVoDpHye.d.cts +215 -0
  63. package/dist/tagFactory-DVoDpHye.d.ts +215 -0
  64. package/dist/testing.cjs +31 -2
  65. package/dist/testing.js +2 -2
  66. package/dist/ui.cjs +93 -13
  67. package/dist/ui.d.cts +1 -1
  68. package/dist/ui.d.ts +1 -1
  69. package/dist/ui.js +6 -6
  70. package/dist/widgets.cjs +75 -9
  71. package/dist/widgets.js +6 -6
  72. package/package.json +2 -2
  73. package/dist/tagFactory-Bzupt4Pj.d.cts +0 -55
  74. package/dist/tagFactory-Bzupt4Pj.d.ts +0 -55
@@ -1,8 +1,8 @@
1
- "use strict";(()=>{var Er=Object.defineProperty;var Ge=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(n,t)=>(typeof require<"u"?require:n)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var wr=(e,n)=>{for(var t in n)Er(e,t,{get:n[t],enumerable:!0})};var It={};wr(It,{DynamicComponent:()=>Ha,ErrorBoundary:()=>ha,ErrorDisplay:()=>At,Fragment:()=>Ia,KeepAlive:()=>Fa,Loading:()=>xa,MAX_DRAIN_TEARDOWNS:()=>$e,Portal:()=>Va,SVG_NS:()=>N,Suspense:()=>Ln,__resetIdCounter:()=>Aa,a:()=>Yo,abbr:()=>Zo,action:()=>Sa,address:()=>$o,area:()=>Ti,array:()=>Wa,article:()=>Co,aside:()=>Ho,asyncDerived:()=>Ka,audio:()=>Ei,autoResize:()=>Qn,b:()=>Xo,base:()=>hs,batch:()=>P,bdi:()=>Qo,bdo:()=>ei,bindDynamic:()=>En,blockquote:()=>Fo,body:()=>ko,br:()=>ti,button:()=>_e,canvas:()=>Oi,caption:()=>Vi,catchError:()=>Ta,catchErrorAsync:()=>Ea,center:()=>Fs,checkLeaks:()=>Hr,circle:()=>xs,cite:()=>ni,clickOutside:()=>Yn,clipPath:()=>Rs,code:()=>gt,col:()=>qi,colgroup:()=>Wi,context:()=>ka,copyOnClick:()=>Xn,createId:()=>_a,customElement:()=>qs,data:()=>ri,datalist:()=>Xi,dd:()=>zo,deepEqual:()=>Ne,deepSignal:()=>Ua,defer:()=>dc,defs:()=>Ls,del:()=>Fi,derived:()=>Ht,details:()=>ds,dfn:()=>oi,dialog:()=>fs,disableSSR:()=>Dn,dispose:()=>L,div:()=>k,dl:()=>Vo,dt:()=>qo,each:()=>Da,effect:()=>z,ellipse:()=>Ss,em:()=>ii,embed:()=>Ci,enableSSR:()=>$n,enhance:()=>Ke,enhanceAll:()=>rc,enqueueBatchedSignal:()=>le,external:()=>ca,fieldset:()=>Qi,figcaption:()=>Wo,figure:()=>jo,font:()=>zs,footer:()=>Lo,form:()=>es,g:()=>Ts,getAction:()=>Gn,getRequestScopedCache:()=>Hn,getRuntimeErrorHandler:()=>Wt,getSSRStore:()=>ue,getSlot:()=>qa,h1:()=>Do,h2:()=>Io,h3:()=>pt,h4:()=>Oo,h5:()=>Po,h6:()=>Bo,head:()=>wo,header:()=>No,hr:()=>Ko,html:()=>ar,i:()=>si,iframe:()=>Ni,img:()=>wi,input:()=>ts,ins:()=>zi,isBatching:()=>aa,isSSR:()=>j,kbd:()=>ai,label:()=>ns,lazy:()=>Nn,lazyIsland:()=>ic,legend:()=>rs,li:()=>Uo,line:()=>Es,linearGradient:()=>$s,link:()=>ys,longPress:()=>Zn,main:()=>Mo,map:()=>ki,mark:()=>ci,marker:()=>Bs,marquee:()=>Vs,mask:()=>Ms,match:()=>La,math:()=>Ii,menu:()=>ps,meta:()=>vs,meter:()=>os,mount:()=>za,mountIslands:()=>uc,nav:()=>Ro,nextTick:()=>mc,noscript:()=>Pi,object:()=>Li,ol:()=>Jo,on:()=>ea,onCleanup:()=>Zs,onMount:()=>je,onUnmount:()=>Ys,optgroup:()=>is,option:()=>ss,output:()=>as,p:()=>ft,param:()=>Ri,path:()=>ws,pattern:()=>Hs,picture:()=>Mi,polygon:()=>ks,polyline:()=>_s,portal:()=>Hi,pre:()=>mt,progress:()=>cs,q:()=>ui,radialGradient:()=>Ds,reactiveArray:()=>ja,rect:()=>As,ref:()=>Ja,registerAction:()=>xe,registerComponent:()=>Ra,registerDisposer:()=>T,registerIsland:()=>sc,replaceChildrenSafely:()=>B,reportDrainRunaway:()=>De,reportError:()=>_,resolveComponent:()=>nr,retrack:()=>te,rp:()=>li,rt:()=>di,ruby:()=>fi,runInSSRContext:()=>In,s:()=>pi,samp:()=>mi,script:()=>Bi,section:()=>Ao,select:()=>us,setGlobalErrorHandler:()=>wa,setMaxDrainIterations:()=>xn,setRuntimeErrorHandler:()=>qt,show:()=>Ca,signal:()=>C,slot:()=>gs,small:()=>gi,source:()=>$i,span:()=>M,stop:()=>Is,store:()=>Ga,strict:()=>Xa,strictEffect:()=>Qa,strong:()=>bi,style:()=>se,sub:()=>hi,summary:()=>ms,sup:()=>yi,svg:()=>Di,symbol:()=>Ps,table:()=>ji,tagFactory:()=>u,takePendingError:()=>qe,tbody:()=>Ki,td:()=>Ui,template:()=>bs,text:()=>Cs,textarea:()=>ls,tfoot:()=>Ji,th:()=>Gi,thead:()=>Yi,time:()=>vi,title:()=>_o,tr:()=>Zi,track:()=>_i,transition:()=>pc,trapFocus:()=>er,trustHTML:()=>pr,tspan:()=>Ns,u:()=>xi,ul:()=>Go,unregisterComponent:()=>Ma,unregisterDisposer:()=>Xe,unregisterIsland:()=>ac,untracked:()=>we,use:()=>Os,var_:()=>Si,video:()=>Ai,watch:()=>Ya,when:()=>Na,withSSR:()=>On,writable:()=>Za});var Vt=Symbol.for("sibujs.runtime-errors.v1");function Ye(){let e=globalThis,n=e[Vt];if(n)return n;let t={handler:null,handlerDepth:0};return e[Vt]=t,t}function qt(e){let n=Ye(),t=n.handler;return n.handler=e,t}function Wt(){return Ye().handler}function Ze(e){if(e instanceof Error)return e;let n=typeof e=="string"?e:`Non-Error value thrown: ${kr(e)}`;return new Error(n,{cause:e})}function kr(e){if(typeof e=="symbol")return e.toString();try{return typeof e=="object"&&e!==null?JSON.stringify(e):String(e)}catch{return Object.prototype.toString.call(e)}}function _r(e){return e.name?`${e.phase} "${e.name}"`:e.phase}var Ar=Symbol.for("sibujs.reactive.v1");function Cr(e){let n=globalThis[Ar];return n?.untracked?n.untracked(e):e()}var Nr="sibu:error-propagate";function Lr(e,n){let t=n.node;if(!t||typeof CustomEvent>"u")return!1;let r=Rr(t);if(!r)return!1;try{let o=new CustomEvent(Nr,{bubbles:!0,cancelable:!0,detail:{error:e,context:n}});return r.dispatchEvent(o)===!1}catch{return!1}}function Rr(e){let t=e;for(;t;){if(t.nodeType===1&&typeof t.dispatchEvent=="function")return t;t=t.parentNode}let r=e;return typeof r.dispatchEvent=="function"?r:null}function Mr(e,n){typeof console>"u"||console.error(`[SibuJS] Uncaught error during ${_r(n)}: ${e.message}`,e)}function _(e,n){let t=Ze(e);Cr(()=>{if(Lr(t,n))return;let r=Ye(),o=r.handler;if(o&&r.handlerDepth===0){r.handlerDepth++;try{o(e instanceof Error?e:t,n);return}catch(i){if(typeof console<"u"){let s=i instanceof Error?i.message:String(i);console.error(`[SibuJS] runtime error handler itself threw: ${s}`,i)}}finally{r.handlerDepth--}}Mr(t,n)})}function U(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:!1}var G=new WeakMap,$e=1e4;function De(e,n,t){typeof console>"u"||console.error(`[SibuJS ${e}] runaway cleanup: stopped after running ${n} teardowns with ${t} still queued. Cleanup production did not stabilize before the teardown safety ceiling was reached \u2014 the remaining work was NOT run.`,{executed:n,remaining:t})}var re=0;function T(e,n){let t=G.get(e);t||(t=[],G.set(e,t)),t.push(n),!1}function Xe(e,n){let t=G.get(e);if(!t)return;let r=t.indexOf(n);r!==-1&&(t.splice(r,1),!1,t.length===0&&G.delete(e))}function L(e){let n=[e],t=[];for(;n.length>0;){let r=n.pop();t.push(r);let o=Array.from(r.childNodes);for(let i=0;i<o.length;i++)n.push(o[i])}for(let r=t.length-1;r>=0;r--){let o=t[r];if(G.has(o)){let i=0,s=!1;for(;!s;){let a=G.get(o);if(!a||a.length===0)break;let c=a.slice();G.delete(o),!1;for(let l=0;l<c.length;l++){if(i>=$e){let d=c.slice(l),p=G.get(o);G.set(o,p?d.concat(p):d),!1,De("dispose",i,d.length+(p?.length??0)),s=!0;break}i++;try{c[l]()}catch(d){_(d,{phase:"cleanup",name:"disposer"})}}}}}}function B(e,...n){for(let r=0;r<n.length;r++){let o=n[r];o.parentNode?.removeChild(o)}let t=Array.from(e.childNodes);for(let r=0;r<t.length;r++)L(t[r]);e.replaceChildren(...n)}function Hr(e=0){return 0}function $r(e){return e.replace(/[\x00-\x20\x7f-\x9f]+/g,"")}function pe(e){if(e.length<3)return!1;let n=e.toLowerCase();return n[0]==="o"&&n[1]==="n"&&n.charCodeAt(2)>=97&&n.charCodeAt(2)<=122}var Dr=["http:","https:","mailto:","tel:","ftp:"],Ir=/^[\x00-\x20\x7f-\x9f]+|[\x00-\x20\x7f-\x9f]+$/g;function Gt(e){let n=$r(e).trim();if(!n)return"";let t=e.replace(Ir,""),r=n.toLowerCase(),o=-1;for(let s=0;s<r.length;s++){let a=r.charCodeAt(s);if(a===58){o=s;break}if(a===47||a===63||a===35)break}if(o===-1)return t;let i=r.slice(0,o+1);return/^[a-z][a-z0-9+.-]*:$/.test(i)&&Dr.indexOf(i)===-1?"":t}var Or=/^\s+\d+(\.\d+)?[wx]$/;function Pr(e){let n=e.split(","),t=[];for(let r=0;r<n.length;r++){let o=n[r].trim();if(!o)continue;let i=o.match(/^(\S+)(\s+.+)?$/);if(!i||i[2]!==void 0&&!Or.test(i[2]))continue;let s=Gt(i[1]);s&&t.push(i[2]?`${s}${i[2]}`:s)}return t.join(", ")}var Br=/[(:@\\]/;function Fr(e){return e===" "||e===" "||e===`
2
- `||e==="\r"||e==="\f"}function jt(e){return e>="0"&&e<="9"||e>="a"&&e<="f"||e>="A"&&e<="F"}function zr(e){let n="";for(let t=0;t<e.length;t++){let r=e[t];if(r!=="\\"){n+=r;continue}if(t+1>=e.length)break;let o=e[t+1];if(o===`
1
+ "use strict";(()=>{var Er=Object.defineProperty;var Xe=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(n,t)=>(typeof require<"u"?require:n)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var wr=(e,n)=>{for(var t in n)Er(e,t,{get:n[t],enumerable:!0})};var Ot={};wr(Ot,{DynamicComponent:()=>Ha,ErrorBoundary:()=>ha,ErrorDisplay:()=>Ct,Fragment:()=>Ia,KeepAlive:()=>Fa,Loading:()=>xa,MAX_DRAIN_TEARDOWNS:()=>Pe,Portal:()=>Va,SVG_NS:()=>N,Suspense:()=>Ln,__resetIdCounter:()=>Aa,a:()=>Yo,abbr:()=>Zo,action:()=>Sa,address:()=>Do,area:()=>Ti,array:()=>Wa,article:()=>Co,aside:()=>Ho,asyncDerived:()=>Ka,audio:()=>Ei,autoResize:()=>Qn,b:()=>Xo,base:()=>hs,batch:()=>P,bdi:()=>Qo,bdo:()=>ei,bindDynamic:()=>En,blockquote:()=>Fo,body:()=>ko,br:()=>ti,button:()=>Le,canvas:()=>Oi,caption:()=>Vi,catchError:()=>Ta,catchErrorAsync:()=>Ea,center:()=>Fs,checkLeaks:()=>Hr,circle:()=>xs,cite:()=>ni,clickOutside:()=>Yn,clipPath:()=>Rs,code:()=>bt,col:()=>qi,colgroup:()=>Wi,context:()=>ka,copyOnClick:()=>Xn,createId:()=>_a,customElement:()=>qs,data:()=>ri,datalist:()=>Xi,dd:()=>zo,deepEqual:()=>He,deepSignal:()=>Ua,defer:()=>dc,defs:()=>Ls,del:()=>Fi,derived:()=>Dt,details:()=>ds,dfn:()=>oi,dialog:()=>fs,disableSSR:()=>$n,dispose:()=>L,div:()=>k,dl:()=>Vo,dt:()=>qo,each:()=>$a,effect:()=>z,ellipse:()=>Ss,em:()=>ii,embed:()=>Ci,enableSSR:()=>Dn,enhance:()=>Ge,enhanceAll:()=>rc,enqueueBatchedSignal:()=>be,external:()=>ca,fieldset:()=>Qi,figcaption:()=>Wo,figure:()=>jo,font:()=>zs,footer:()=>Lo,form:()=>es,g:()=>Ts,getAction:()=>Gn,getRequestScopedCache:()=>Hn,getRuntimeErrorHandler:()=>jt,getSSRStore:()=>ge,getSlot:()=>qa,h1:()=>$o,h2:()=>Io,h3:()=>mt,h4:()=>Oo,h5:()=>Po,h6:()=>Bo,head:()=>wo,header:()=>No,hr:()=>Ko,html:()=>ar,i:()=>si,iframe:()=>Ni,img:()=>wi,input:()=>ts,ins:()=>zi,isBatching:()=>aa,isSSR:()=>j,kbd:()=>ai,label:()=>ns,lazy:()=>Nn,lazyIsland:()=>ic,legend:()=>rs,li:()=>Uo,line:()=>Es,linearGradient:()=>Ds,link:()=>ys,longPress:()=>Zn,main:()=>Mo,map:()=>ki,mark:()=>ci,marker:()=>Bs,marquee:()=>Vs,mask:()=>Ms,match:()=>La,math:()=>Ii,menu:()=>ps,meta:()=>vs,meter:()=>os,mount:()=>za,mountIslands:()=>uc,nav:()=>Ro,nextTick:()=>mc,noscript:()=>Pi,object:()=>Li,ol:()=>Jo,on:()=>ea,onCleanup:()=>Zs,onMount:()=>Je,onUnmount:()=>Ys,optgroup:()=>is,option:()=>ss,output:()=>as,p:()=>pt,param:()=>Ri,path:()=>ws,pattern:()=>Hs,picture:()=>Mi,polygon:()=>ks,polyline:()=>_s,portal:()=>Hi,pre:()=>gt,progress:()=>cs,q:()=>ui,radialGradient:()=>$s,reactiveArray:()=>ja,rect:()=>As,ref:()=>Ja,registerAction:()=>ke,registerComponent:()=>Ra,registerDisposer:()=>T,registerIsland:()=>sc,replaceChildrenSafely:()=>B,reportDrainRunaway:()=>Be,reportError:()=>_,resolveComponent:()=>nr,retrack:()=>oe,rp:()=>li,rt:()=>di,ruby:()=>fi,runInSSRContext:()=>In,s:()=>pi,samp:()=>mi,script:()=>Bi,section:()=>Ao,select:()=>us,setGlobalErrorHandler:()=>wa,setMaxDrainIterations:()=>xn,setRuntimeErrorHandler:()=>Wt,show:()=>Ca,signal:()=>C,slot:()=>gs,small:()=>gi,source:()=>Di,span:()=>M,stop:()=>Is,store:()=>Ga,strict:()=>Xa,strictEffect:()=>Qa,strong:()=>bi,style:()=>fe,sub:()=>hi,summary:()=>ms,sup:()=>yi,svg:()=>$i,symbol:()=>Ps,table:()=>ji,tagFactory:()=>u,takePendingError:()=>Ke,tbody:()=>Ki,td:()=>Ui,template:()=>bs,text:()=>Cs,textarea:()=>ls,tfoot:()=>Ji,th:()=>Gi,thead:()=>Yi,time:()=>vi,title:()=>_o,tr:()=>Zi,track:()=>_i,transition:()=>pc,trapFocus:()=>er,trustHTML:()=>pr,tspan:()=>Ns,u:()=>xi,ul:()=>Go,unregisterComponent:()=>Ma,unregisterDisposer:()=>tt,unregisterIsland:()=>ac,untracked:()=>Ae,use:()=>Os,var_:()=>Si,video:()=>Ai,watch:()=>Ya,when:()=>Na,withSSR:()=>On,writable:()=>Za});var qt=Symbol.for("sibujs.runtime-errors.v1");function Qe(){let e=globalThis,n=e[qt];if(n)return n;let t={handler:null,handlerDepth:0};return e[qt]=t,t}function Wt(e){let n=Qe(),t=n.handler;return n.handler=e,t}function jt(){return Qe().handler}function et(e){if(e instanceof Error)return e;let n=typeof e=="string"?e:`Non-Error value thrown: ${kr(e)}`;return new Error(n,{cause:e})}function kr(e){if(typeof e=="symbol")return e.toString();try{return typeof e=="object"&&e!==null?JSON.stringify(e):String(e)}catch{return Object.prototype.toString.call(e)}}function _r(e){return e.name?`${e.phase} "${e.name}"`:e.phase}var Ar=Symbol.for("sibujs.reactive.v1");function Cr(e){let n=globalThis[Ar];return n?.untracked?n.untracked(e):e()}var Nr="sibu:error-propagate";function Lr(e,n){let t=n.node;if(!t||typeof CustomEvent>"u")return!1;let r=Rr(t);if(!r)return!1;try{let o=new CustomEvent(Nr,{bubbles:!0,cancelable:!0,detail:{error:e,context:n}});return r.dispatchEvent(o)===!1}catch{return!1}}function Rr(e){let t=e;for(;t;){if(t.nodeType===1&&typeof t.dispatchEvent=="function")return t;t=t.parentNode}let r=e;return typeof r.dispatchEvent=="function"?r:null}function Mr(e,n){typeof console>"u"||console.error(`[SibuJS] Uncaught error during ${_r(n)}: ${e.message}`,e)}function _(e,n){let t=et(e);Cr(()=>{if(Lr(t,n))return;let r=Qe(),o=r.handler;if(o&&r.handlerDepth===0){r.handlerDepth++;try{o(e instanceof Error?e:t,n);return}catch(i){if(typeof console<"u"){let s=i instanceof Error?i.message:String(i);console.error(`[SibuJS] runtime error handler itself threw: ${s}`,i)}}finally{r.handlerDepth--}}Mr(t,n)})}function U(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:!1}var Y=new WeakMap,Pe=1e4;function Be(e,n,t){typeof console>"u"||console.error(`[SibuJS ${e}] runaway cleanup: stopped after running ${n} teardowns with ${t} still queued. Cleanup production did not stabilize before the teardown safety ceiling was reached \u2014 the remaining work was NOT run.`,{executed:n,remaining:t})}var se=0;function T(e,n){let t=Y.get(e);t||(t=[],Y.set(e,t)),t.push(n),!1}function tt(e,n){let t=Y.get(e);if(!t)return;let r=t.indexOf(n);r!==-1&&(t.splice(r,1),!1,t.length===0&&Y.delete(e))}function L(e){let n=[e],t=[];for(;n.length>0;){let r=n.pop();t.push(r);let o=Array.from(r.childNodes);for(let i=0;i<o.length;i++)n.push(o[i])}for(let r=t.length-1;r>=0;r--){let o=t[r];if(Y.has(o)){let i=0,s=!1;for(;!s;){let a=Y.get(o);if(!a||a.length===0)break;let c=a.slice();Y.delete(o),!1;for(let l=0;l<c.length;l++){if(i>=Pe){let d=c.slice(l),m=Y.get(o);Y.set(o,m?d.concat(m):d),!1,Be("dispose",i,d.length+(m?.length??0)),s=!0;break}i++;try{c[l]()}catch(d){_(d,{phase:"cleanup",name:"disposer"})}}}}}}function B(e,...n){for(let r=0;r<n.length;r++){let o=n[r];o.parentNode?.removeChild(o)}let t=Array.from(e.childNodes);for(let r=0;r<t.length;r++)L(t[r]);e.replaceChildren(...n)}function Hr(e=0){return 0}function Dr(e){return e.replace(/[\x00-\x20\x7f-\x9f]+/g,"")}function ve(e){if(e.length<3)return!1;let n=e.toLowerCase();return n[0]==="o"&&n[1]==="n"&&n.charCodeAt(2)>=97&&n.charCodeAt(2)<=122}var $r=["http:","https:","mailto:","tel:","ftp:"],Ir=/^[\x00-\x20\x7f-\x9f]+|[\x00-\x20\x7f-\x9f]+$/g;function Yt(e){let n=Dr(e).trim();if(!n)return"";let t=e.replace(Ir,""),r=n.toLowerCase(),o=-1;for(let s=0;s<r.length;s++){let a=r.charCodeAt(s);if(a===58){o=s;break}if(a===47||a===63||a===35)break}if(o===-1)return t;let i=r.slice(0,o+1);return/^[a-z][a-z0-9+.-]*:$/.test(i)&&$r.indexOf(i)===-1?"":t}var Or=/^\s+\d+(\.\d+)?[wx]$/;function Pr(e){let n=e.split(","),t=[];for(let r=0;r<n.length;r++){let o=n[r].trim();if(!o)continue;let i=o.match(/^(\S+)(\s+.+)?$/);if(!i||i[2]!==void 0&&!Or.test(i[2]))continue;let s=Yt(i[1]);s&&t.push(i[2]?`${s}${i[2]}`:s)}return t.join(", ")}var Br=/[(:@\\]/;function Fr(e){return e===" "||e===" "||e===`
2
+ `||e==="\r"||e==="\f"}function Kt(e){return e>="0"&&e<="9"||e>="a"&&e<="f"||e>="A"&&e<="F"}function zr(e){let n="";for(let t=0;t<e.length;t++){let r=e[t];if(r!=="\\"){n+=r;continue}if(t+1>=e.length)break;let o=e[t+1];if(o===`
3
3
  `||o==="\f"){t+=1;continue}if(o==="\r"){t+=e[t+2]===`
4
- `?2:1;continue}if(jt(o)){let i="",s=t+1;for(;s<e.length&&i.length<6&&jt(e[s]);)i+=e[s],s++;s<e.length&&Fr(e[s])&&(s+=e[s]==="\r"&&e[s+1]===`
5
- `?2:1);let a=Number.parseInt(i,16),c=a===0||a>1114111||a>=55296&&a<=57343;n+=c?"\uFFFD":String.fromCodePoint(a),t=s-1;continue}n+=o,t+=1}return n}var Kt=["url(","expression(","javascript:","vbscript:","-moz-binding","behavior:","@import","image-set(","filter:progid"];function Vr(e){if(!e)return"an element";let n=e.tagName.toLowerCase(),t=e.getAttribute("id");t&&(n+=`#${t}`);let r=e.getAttribute("class");return r&&(n+=`.${r.trim().split(/\s+/).slice(0,3).join(".")}`),`<${n}>`}var Qe=new Set,Ut=100,Jt=!1;function Yt(e,n,t){}function et(e){if(!Br.test(e))return-1;let t=(e.includes("\\")?zr(e):e).toLowerCase().replace(/\s+/g,"");for(let r=0;r<Kt.length;r++)if(t.includes(Kt[r]))return r;return-1}function Ie(e,n){let t=et(e);return t===-1?e:(Yt(e,t,n),"")}function Oe(e,n){let t=String(e);if(t.trim()==="")return"";if(typeof document>"u")return Ie(t,n)===""?"":t;let r=document.createElement("div");try{r.style.cssText=t}catch{return""}let o=[];for(let i=0;i<r.style.length;i++){let s=r.style[i],a=r.style.getPropertyValue(s),c=et(a);if(c===-1&&(c=et(`${s}:${a}`)),c!==-1){Yt(a,c,{property:s,element:n?.element});continue}let l=r.style.getPropertyPriority(s);o.push(`${s}: ${a}${l?` !${l}`:""}`)}return o.join("; ")}var qr=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data","manifest"]),Wr=new Set(["srcdoc"]);function Zt(e){return Wr.has(e.toLowerCase())}function Xt(e,n,t){let r=e.toLowerCase();return r==="srcset"?Pr(n):qr.has(r)?Gt(n):r==="style"?Oe(n,t):n}var jr="http://www.w3.org/1999/xhtml",Kr="http://www.w3.org/2000/svg",Ur="http://www.w3.org/1999/xlink",Jr="http://www.w3.org/XML/1998/namespace",Gr=new Set(["checked","disabled","selected"]);function Yr(e){return e.namespaceURI===null||e.namespaceURI===jr}function Qt(e,n,t){e[n]=t}function Zr(e,n){if(e.namespaceURI!==Kr)return null;let t=n.toLowerCase();return t.startsWith("xlink:")?Ur:t.startsWith("xml:")?Jr:null}function V(e,n,t,r={}){let o=Zr(e,n),i=o?n.slice(n.indexOf(":")+1):n;if(pe(n))return!1,o?e.removeAttributeNS(o,i):e.removeAttribute(n),!1;if(t==null)return o?e.removeAttributeNS(o,i):e.removeAttribute(n),!0;if(Zt(n))return!1,o?e.removeAttributeNS(o,i):e.removeAttribute(n),!1;let s=Yr(e),a=s?n.toLowerCase():n;if(typeof t=="boolean")return s&&Gr.has(a)&&a in e?Qt(e,a,t):t?o?e.setAttributeNS(o,n,""):e.setAttribute(n,""):o?e.removeAttributeNS(o,i):e.removeAttribute(n),!0;let c=String(t);if(r.syncValueProperty!==!1&&s&&(a==="value"||a==="checked")&&a in e)return Qt(e,a,a==="checked"?!!t:c),!0;let l=Xt(n,c,{element:e});return(o?e.getAttributeNS(o,i):e.getAttribute(n))===l||(o?e.setAttributeNS(o,n,l):e.setAttribute(n,l)),!0}var Xr=4096,tt=[];function Qr(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function eo(e,n,t){let r=tt.pop();if(r)return r.sig=e,r.sub=n,r.epoch=t,r;let o=Qr();return o.sig=e,o.sub=n,o.epoch=t,o}function en(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,tt.length<Xr&&tt.push(e)}function to(e,n){let t=e.subsHead??null;n.sigPrev=null,n.sigNext=t,t?t.sigPrev=n:e.subsTail=n,e.subsHead=n,e.__sc=(e.__sc??0)+1}function tn(e){let n=e.sig;if(!n)return;let t=e.sigPrev,r=e.sigNext;t?t.sigNext=r:n.subsHead=r,r?r.sigPrev=t:n.subsTail=t,n.__sc=(n.__sc??1)-1,n.__activeNode===e&&(n.__activeNode=e.prevActive),n.__sc===0&&(n.subsHead=null,n.subsTail=null)}function no(e,n){let t=e.depsTail??null;n.subPrev=t,n.subNext=null,t?t.subNext=n:e.depsHead=n,e.depsTail=n}function ro(e){let n=e.sub;if(!n)return;let t=e.subPrev,r=e.subNext;t?t.subNext=r:n.depsHead=r,r?r.subPrev=t:n.depsTail=t}var W=null,nt=null,Q=0,ee=[],q=new Set,oo=[];function io(e){try{e()}catch(n){let t=e;_(n,{phase:t._errorPhase??"effect",name:t.__name,node:t._errorNode})}}function so(e){let n=e.depsHead??null;if(n===null)return!0;for(;n!==null;){let t=n.sig;if(t===null)return!0;if(t._d===!0&&t._validate!==void 0)try{t._validate()}catch{return!0}if(n.depVersion!==t.__v)return!0;n=n.subNext}return!1}var Pe=0,ot=!1;function it(){Pe===0&&(nt=W,W=null,ot=!0),Pe++}function st(){Pe--,Pe===0&&(W=nt,nt=null,ot=!1)}function nn(){return ot}function rn(e){it();try{return e()}finally{st()}}var ao=0;function at(e,n){let t=W;W=n;let r=n,o=++ao;r._epoch=o,r._structDirty=!1;for(let i=r.depsHead??null;i!==null;i=i.subNext){let s=i.sig;i.prevActive=s.__activeNode??null,s.__activeNode=i}try{e()}finally{W=t;let i=r.depsHead??null;for(;i!==null;){let s=i.subNext,a=i.sig;a.__activeNode=i.prevActive,i.prevActive=null,i.epoch!==o&&(ro(i),tn(i),en(i)),i=s}}}function on(e,n){if(!n)return ct(e);me(n);let t=W;W=n;try{e()}finally{W=t;let o=n;for(let i=o.depsHead??null;i!==null;i=i.subNext){let s=i.sig;s.__activeNode=i.prevActive,i.prevActive=null}}let r=n;return r._dispose??(r._dispose=()=>me(n))}function ct(e,n){let t=()=>{let o=r;if(!(o._disposed||o._reentrant)){o._reentrant=!0;try{at(e,r)}finally{o._reentrant=!1}}},r=t;r.depsHead=null,r.depsTail=null,r._epoch=0,r._structDirty=!1,r._hasComputedDep=!1,r._runEpoch=0,r._runs=0,r._reentrant=!1,r._disposed=!1,r._errorPhase="binding",r._errorNode=n;try{t()}catch(o){throw r._disposed=!0,r._errorNode=void 0,me(r),o}return r._dispose??(r._dispose=()=>{r._disposed=!0,r._errorNode=void 0,me(r)})}function sn(e){if(!W)return;let n=W,t=e,r=n._epoch??0,o=t.__activeNode??null;if(o!==null&&o.sub===n){o.epoch=r,o.depVersion=t.__v??Number.NaN;return}t._validate!==void 0&&(n._hasComputedDep=!0);let i=eo(e,n,r);i.depVersion=t.__v??Number.NaN,i.prevActive=o,t.__activeNode=i,no(n,i),to(t,i),n._structDirty=!0}function me(e){let n=e,t=n.depsHead??null;for(n.depsHead=null,n.depsTail=null;t;){let r=t.subNext;tn(t),en(t),t=r}}var Be=1e3,Fe=1e6,ze=0,oe=new Set;function an(e){let n=Be;return Number.isFinite(e)&&e>0&&(Be=Math.floor(e)),n}function cn(e){let n=Fe;return Number.isFinite(e)&&e>0&&(Fe=Math.floor(e)),n}function co(e){let n=e;return n._runEpoch!==ze?(n._runEpoch=ze,n._runs=1,!1):(n._runs=(n._runs??0)+1,n._runs>Be)}function uo(e){let n=e.__name??"<unnamed>";_(new Error(`subscriber "${n}" fired more than ${Be} times \u2014 likely a write-reads-self cycle between effects/signals. This subscriber is quarantined for the rest of this update; other pending work still runs.`),{phase:"scheduler",name:n})}function lo(){_(new Error(`Notification drain exceeded ${Fe} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function un(){let e=0;for(;e<ee.length;){if(e>=Fe){lo();break}let n=ee[e++];if(q.delete(n),!(oe.size>0&&oe.has(n))&&!(n._hasComputedDep===!0&&!so(n))){if(co(n)){uo(n),oe.add(n);continue}io(n)}}}function ln(){if(!(Q>0)){Q++,ze++;try{un()}finally{Q--,Q===0&&(ee.length=0,q.clear(),oe.size>0&&oe.clear())}}}function rt(e){e();let n=e._sig;if(!n)return;let t=oo,r=t.length;for(t.push(n);t.length>r;){let i=t.pop().subsHead??null;for(;i;){let s=i.sub;if(s)if(s._c){let a=s._sig;a?a._d||(a._d=!0,t.push(a)):s()}else q.has(s)||(q.add(s),ee.push(s));i=i.sigNext}}}function dn(e){let t=e.subsHead??null;for(;t;){let r=t.sub;r&&(r._c?rt(r):q.has(r)||(q.add(r),ee.push(r))),t=t.sigNext}}function fn(e){let t=e.subsHead;if(t){if(Q>0){let r=t;for(;r;){let o=r.sub;o&&(o._c?rt(o):q.has(o)||(q.add(o),ee.push(o))),r=r.sigNext}return}Q++,ze++;try{let r=t;for(;r;){let o=r.sub;o&&(o._c?rt(o):q.has(o)||(q.add(o),ee.push(o))),r=r.sigNext}un()}finally{Q--,Q===0&&(ee.length=0,q.clear(),oe.size>0&&oe.clear())}}}function pn(e){return e.__sc??0}function mn(e){let n=e,t=[],r=n.depsHead??null;for(;r;)r.sig&&t.push(r.sig),r=r.subNext;return t}function gn(e,n){let t=e.subsHead??null;for(;t;){let r=t.sub;r&&n(r),t=t.sigNext}}var bn="4.4.0",hn=Symbol.for("sibujs.reactive.v1");function po(){let e=globalThis,n=e[hn];if(n)return!1,n;let t={suspendTracking:it,resumeTracking:st,isTrackingSuspended:nn,untracked:rn,retrack:at,track:on,reactiveBinding:ct,recordDependency:sn,cleanup:me,setMaxSubscriberRepeats:an,setMaxDrainIterations:cn,drainNotificationQueue:ln,queueSignalNotification:dn,notifySubscribers:fn,getSubscriberCount:pn,getSubscriberDeps:mn,forEachSubscriber:gn,version:bn};return e[hn]=t,t}var $=po(),Te=$.suspendTracking,Ee=$.resumeTracking,yn=$.isTrackingSuspended,we=$.untracked,te=$.retrack,D=$.track,F=$.reactiveBinding,ge=$.recordDependency,vn=$.cleanup,kc=$.setMaxSubscriberRepeats,xn=$.setMaxDrainIterations,Sn=$.drainNotificationQueue,Tn=$.queueSignalNotification,be=$.notifySubscribers,_c=$.getSubscriberCount,Ac=$.getSubscriberDeps,Cc=$.forEachSubscriber;function Ve(e,n,t){if(pe(n))return V(e,n,"",{label:`bindAttribute("${n}")`}),()=>{};function r(){let o;try{o=t()}catch(i){_(i,{phase:"binding",name:`bindAttribute("${n}")`,node:e});return}V(e,n,o,{label:`bindAttribute("${n}")`})}return F(r,e)}function En(e,n,t){let r=null;function o(){let s;try{s=typeof n=="function"?n():n}catch(c){_(c,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof t=="function"?t():t}catch(c){_(c,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),V(e,s,a,{label:"bindDynamic"})&&(r=s)}let i=F(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var ut=["data-focus-key","id","name"],mo=new Set(["text","search","url","tel","password",""]);function go(e){let n=e.tagName;if(!(n==="TEXTAREA"||n==="INPUT"&&mo.has(e.type.toLowerCase())))return{start:null,end:null,direction:null};let r=e;return{start:r.selectionStart,end:r.selectionEnd,direction:r.selectionDirection}}function ke(e){if(e.length===0||typeof document>"u")return null;let n=document.activeElement;if(!n||n===document.body)return null;let t=!1;for(let i=0;i<e.length;i++){let s=e[i];if(s===n||s.nodeType===1&&s.contains(n)){t=!0;break}}if(!t)return null;let r=null,o=null;for(let i=0;i<ut.length;i++){let s=n.getAttribute(ut[i]);if(s){r=ut[i],o=s;break}}return{el:n,attr:r,value:o,tag:n.tagName,...go(n)}}function bo(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function ho(e,n){let t=null,r=0;for(let o=0;o<e.length;o++){let i=e[o];if(i.nodeType!==1)continue;let s=i;s.matches(n)&&(r++,t??(t=s));let a=s.querySelectorAll(n);for(let c=0;c<a.length;c++)r++,t??(t=a[c]);if(r>1)return{el:null,count:r}}return r===1?{el:t,count:r}:{el:null,count:r}}function wn(e,n){if(e.focus(),n.start!==null&&typeof e.setSelectionRange=="function"){let t=e,r=t.value.length,o=Math.min(n.start,r),i=Math.min(n.end??o,r);t.setSelectionRange(o,i,n.direction??"none")}}function he(e,n,t){if(!e||typeof document>"u")return;let r=document.activeElement;if(r===e.el||r&&r!==document.body&&r!==document.documentElement)return;if(e.el.isConnected){wn(e.el,e);return}let o=!1;if(e.attr&&e.value){let{el:i,count:s}=ho(n,`[${e.attr}=${bo(e.value)}]`);if(i&&i.tagName===e.tag){wn(i,e);return}o=s>1}}function ie(e,n){let t=[];function r(){let o;try{o=n()}catch(d){_(d,{phase:"binding",name:"bindChildNode",node:e});return}let i=ke(t);if(o==null||typeof o=="boolean"){for(let d=0;d<t.length;d++){let p=t[d];L(p),p.parentNode&&p.parentNode.removeChild(p)}t.length=0,he(i,t,"bindChildNode");return}let s=e.parentNode;if(!s){t.length=0;return}let a;if(Array.isArray(o)){a=[];let d=new Set;for(let p=0;p<o.length;p++){let g=o[p];if(g==null||typeof g=="boolean")continue;let f=g instanceof Node?g:document.createTextNode(String(g));if(d.has(f)){!1;continue}d.add(f),a.push(f)}}else a=[o instanceof Node?o:document.createTextNode(String(o))];let c;if(t.length>0&&a.length>0){let d=new Set(t);c=new Set;for(let p=0;p<a.length;p++)d.has(a[p])&&c.add(a[p])}for(let d=0;d<t.length;d++){let p=t[d];c?.has(p)||(L(p),p.parentNode&&p.parentNode.removeChild(p))}let l=e;for(let d=0;d<a.length;d++){let p=a[d];l.nextSibling!==p&&s.insertBefore(p,l.nextSibling),l=p}t=a,he(i,a,"bindChildNode")}return F(r,e)}var N="http://www.w3.org/2000/svg",yo=new Set(["script","iframe","object","embed","frame","frameset"]);function vo(e){return yo.has(e.toLowerCase())}var xo=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var lt=new Set,kn=100,_n=!1,An=new Map;function So(e){let n=An.get(e);return n!==void 0||(n=e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),An.set(e,n)),n}function To(e,n){if(typeof n=="function"){let r=F(()=>{e.setAttribute("style",Oe(String(n()),{element:e}))},e);T(e,r);return}if(typeof n=="string"){e.setAttribute("style",Oe(n,{element:e}));return}let t=e;for(let r in n){let o=n[r],i=So(r);if(typeof o=="function"){let s=o,a=F(()=>{t.style.setProperty(i,Ie(String(s()),{property:i,element:e}))},e);T(e,a)}else t.style.setProperty(i,Ie(String(o),{property:i,element:e}))}}function Eo(e,n){if(typeof n=="string"){e.setAttribute("class",n);return}if(typeof n=="function"){let i=F(()=>{e.setAttribute("class",n())},e);T(e,i);return}let t=n,r=!1,o="";for(let i in t){let s=t[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=F(()=>{let a="";for(let c in t){let l=t[c];(typeof l=="function"?l():l)&&(a=a?`${a} ${c}`:c)}e.setAttribute("class",a)},e);T(e,s)}else e.setAttribute("class",o)}function dt(e,n){if(typeof n=="string"){e.textContent=n;return}if(typeof n=="number"){e.textContent=String(n);return}if(!(typeof n=="boolean"||n==null)){if(typeof n=="function"){let t=document.createComment("");e.appendChild(t),T(e,ie(t,n));return}if(n instanceof Node){e.appendChild(n);return}if(Array.isArray(n))for(let t=0;t<n.length;t++){let r=n[t];if(typeof r=="function"){let o=document.createComment("");e.appendChild(o),T(e,ie(o,r))}else if(r instanceof Node)e.appendChild(r);else if(Array.isArray(r))for(let o=0;o<r.length;o++){let i=r[o];if(typeof i=="function"){let s=document.createComment("");e.appendChild(s),T(e,ie(s,i))}else i instanceof Node?e.appendChild(i):i!=null&&typeof i!="boolean"&&e.appendChild(document.createTextNode(String(i)))}else r!=null&&typeof r!="boolean"&&e.appendChild(document.createTextNode(String(r)))}}}var u=(e,n)=>{let t=vo(e);return(r,o)=>{if(t)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);let i=n?document.createElementNS(n,e):document.createElement(e);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),dt(i,o),i):(i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return dt(i,r),i;let s=r,a=s.class;a!=null&&Eo(i,a);let c=s.id;c!=null&&(!1,i.id=c);let l=o!==void 0?o:s.nodes;l!=null&&dt(i,l);let d=s.on;if(d)for(let f in d){let m=d[f];typeof m=="function"?i.addEventListener(f,m):!1}let p=s.style;p!=null&&To(i,p);let g=s.ref;g&&(g.current=i);for(let f in s)switch(f){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{let m=s[f];if(m==null||pe(f))continue;typeof m=="function"?T(i,Ve(i,f,m)):V(i,f,m,{syncValueProperty:!1,label:"tagFactory"})}}return s.onElement&&typeof s.onElement=="function"&&s.onElement(i),i}};var Gc=u("html"),wo=u("head"),ko=u("body"),_o=u("title"),k=u("div"),M=u("span"),Ao=u("section"),Co=u("article"),No=u("header"),Lo=u("footer"),Ro=u("nav"),Mo=u("main"),Ho=u("aside"),$o=u("address"),ft=u("p"),Do=u("h1"),Io=u("h2"),pt=u("h3"),Oo=u("h4"),Po=u("h5"),Bo=u("h6"),Fo=u("blockquote"),zo=u("dd"),Vo=u("dl"),qo=u("dt"),Wo=u("figcaption"),jo=u("figure"),Ko=u("hr"),Uo=u("li"),Jo=u("ol"),Go=u("ul"),mt=u("pre"),Yo=u("a"),Zo=u("abbr"),Xo=u("b"),Qo=u("bdi"),ei=u("bdo"),ti=u("br"),ni=u("cite"),gt=u("code"),ri=u("data"),oi=u("dfn"),ii=u("em"),si=u("i"),ai=u("kbd"),ci=u("mark"),ui=u("q"),li=u("rp"),di=u("rt"),fi=u("ruby"),pi=u("s"),mi=u("samp"),gi=u("small"),bi=u("strong"),hi=u("sub"),yi=u("sup"),vi=u("time"),xi=u("u"),Si=u("var"),Ti=u("area"),Ei=u("audio"),wi=u("img"),ki=u("map"),_i=u("track"),Ai=u("video"),Ci=u("embed"),Ni=u("iframe"),Li=u("object"),Ri=u("param"),Mi=u("picture"),Hi=u("portal"),$i=u("source"),Di=u("svg",N),Ii=u("math"),Oi=u("canvas"),Pi=u("noscript"),Bi=u("script"),Fi=u("del"),zi=u("ins"),Vi=u("caption"),qi=u("col"),Wi=u("colgroup"),ji=u("table"),Ki=u("tbody"),Ui=u("td"),Ji=u("tfoot"),Gi=u("th"),Yi=u("thead"),Zi=u("tr"),_e=u("button"),Xi=u("datalist"),Qi=u("fieldset"),es=u("form"),ts=u("input"),ns=u("label"),rs=u("legend"),os=u("meter"),is=u("optgroup"),ss=u("option"),as=u("output"),cs=u("progress"),us=u("select"),ls=u("textarea"),ds=u("details"),fs=u("dialog"),ps=u("menu"),ms=u("summary"),gs=u("slot"),bs=u("template"),hs=u("base"),ys=u("link"),vs=u("meta"),se=u("style"),xs=u("circle",N),Ss=u("ellipse",N),Ts=u("g",N),Es=u("line",N),ws=u("path",N),ks=u("polygon",N),_s=u("polyline",N),As=u("rect",N),Cs=u("text",N),Ns=u("tspan",N),Ls=u("defs",N),Rs=u("clipPath",N),Ms=u("mask",N),Hs=u("pattern",N),$s=u("linearGradient",N),Ds=u("radialGradient",N),Is=u("stop",N),Os=u("use",N),Ps=u("symbol",N),Bs=u("marker",N),Fs=u("center"),zs=u("font"),Vs=u("marquee"),qs=e=>u(e);var bt="__sibuPendingError";function Cn(e,n){let t=()=>e.parentNode?(_(n,{phase:"render",name:"lazy",node:e}),!0):!1;t()||queueMicrotask(()=>{t()||(e[bt]=n)})}function qe(e){let n=e,t=n[bt];if(t instanceof Error)return delete n[bt],t}function Nn(e){let n=null;return function(){if(n)return n();let r=k({class:"sibu-lazy"}),o=!1;return e().then(i=>{if(o)return;n=i.default;let s=n();B(r,s)}).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));B(r,k({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),Cn(r,s)}),r.appendChild(M("sibu-lazy-loading","Loading...")),T(r,()=>{o=!0}),r}}function Ln({nodes:e,fallback:n}){let t=k({class:"sibu-suspense"}),r=n();t.appendChild(r);let o=!1,i=null,s=null;return T(t,()=>{o=!0,i&&(i.disconnect(),i=null),s&&!t.contains(s)&&L(s)}),queueMicrotask(()=>{if(!o)try{let a=e();if(s=a,a.classList.contains("sibu-lazy")){if(!a.querySelector(".sibu-lazy-loading")){B(t,a);return}i=new MutationObserver(()=>{if(o)return;a.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,B(t,a))}),i.observe(a,{childList:!0,subtree:!0})}else B(t,a)}catch(a){let c=a instanceof Error?a:new Error(String(a));Cn(t,c)}}),t}function xt(e,n){try{return e()}catch(t){let r=n.toLowerCase().includes("unmount")?"cleanup":"effect";_(t,{phase:r,name:n});return}}function ht(e,n,t){let r=xt(e,n);typeof r=="function"&&t&&T(t,r)}var ye=new WeakMap,ae=new WeakMap,Y=new Set,Z=new Set,ve=null,We=0,Ws=256;function yt(e){let n=ye.get(e);if(n){ye.delete(e),Y.delete(e);for(let t of n)try{t()}catch{}}}function vt(e){ae.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let t=ae.get(e);if(t){ae.delete(e),Z.delete(e);for(let r of t)try{r()}catch{}}})}function js(e){if(Y.size===0||e.nodeType!==1)return;let n=e;if(Y.has(n)&&n.isConnected&&yt(n),n.firstElementChild)for(let t of Array.from(Y))t!==n&&t.isConnected&&n.contains(t)&&yt(t)}function Ks(e){if(Z.size===0||e.nodeType!==1)return;let n=e;if(Z.has(n)&&!n.isConnected&&vt(n),n.firstElementChild)for(let t of Array.from(Z))t!==n&&!t.isConnected&&n.contains(t)&&vt(t)}function Us(){if(Y.size>0)for(let e of Array.from(Y))e.isConnected&&yt(e);if(Z.size>0)for(let e of Array.from(Z))e.isConnected||vt(e)}function Rn(){ve||typeof document>"u"||(ve=new MutationObserver(e=>{for(let n of e)if(n.type==="childList"){if(n.addedNodes.length>0)for(let t=0;t<n.addedNodes.length;t++)js(n.addedNodes[t]);if(n.removedNodes.length>0)for(let t=0;t<n.removedNodes.length;t++)Ks(n.removedNodes[t])}We+=e.length,We>=Ws&&(We=0,Us()),St()}),ve.observe(document.body,{childList:!0,subtree:!0}))}function St(){ve&&Y.size===0&&Z.size===0&&(ve.disconnect(),ve=null,We=0)}function Js(e,n){let t=ye.get(e);return t||(t=[],ye.set(e,t)),t.push(n),Y.add(e),Rn(),()=>{let r=ye.get(e);if(r){let o=r.indexOf(n);o!==-1&&r.splice(o,1),r.length===0&&(ye.delete(e),Y.delete(e))}St()}}function Gs(e,n){let t=ae.get(e);return t||(t=[],ae.set(e,t)),t.push(n),Z.add(e),Rn(),()=>{let r=ae.get(e);if(r){let o=r.indexOf(n);o!==-1&&r.splice(o,1),r.length===0&&(ae.delete(e),Z.delete(e))}St()}}function je(e,n){if(!(typeof document>"u"))if(n){let t=!1;if(T(n,()=>{t=!0}),n.isConnected){queueMicrotask(()=>{t||ht(e,"onMount",n)});return}queueMicrotask(()=>{if(t)return;if(n.isConnected){ht(e,"onMount",n);return}let r=Js(n,()=>{t||ht(e,"onMount",n)});T(n,r)})}else queueMicrotask(()=>{xt(e,"onMount")})}function Ys(e,n){if(typeof document>"u")return;let t=!1,r=()=>{t||(t=!0,xt(e,"onUnmount"))};T(n,r);let o=()=>{if(t)return;let i=Gs(n,r);T(n,i)};n.isConnected?o():je(()=>{o()},n)}function Zs(e,n){T(n,e)}var Tt=Symbol.for("sibujs.ssr.v1");function Xs(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let n=null,t=process.getBuiltinModule;typeof t=="function"?n=t("node:async_hooks"):typeof Ge=="function"&&(n=Ge("async_hooks")),n&&(e=new n.AsyncLocalStorage)}}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var ce=globalThis[Tt]??(globalThis[Tt]=Xs()),Ae=ce.als,J=ce.fallbackStore;ce.fallbackDepth??(ce.fallbackDepth=0);var Mn=!1;function Qs(){if(Mn||Ae||!(typeof process<"u"&&!!process.versions?.node))return;Mn=!0;let n=process.versions.node;`${n}`}function ue(){if(Ae){let e=Ae.getStore();if(e)return e}return J}function j(){return ue().ssr}function Hn(e){if(!j())return null;let n=ue(),t=n.caches??(n.caches=new Map),r=t.get(e);return r||(r=new Map,t.set(e,r)),r}function $n(){ue().ssr=!0}function Dn(){ue().ssr=!1}function In(e){let n={ssr:!0,suspenseIdCounter:0,locale:void 0};if(Ae)return Ae.run(n,e);Qs();let t=J.ssr,r=J.suspenseIdCounter,o=J.locale;J.ssr=!0,J.suspenseIdCounter=0,J.locale=void 0,ce.fallbackDepth++;try{return e()}finally{ce.fallbackDepth--,J.ssr=t,J.suspenseIdCounter=r,J.locale=o}}function On(e){let n=ue(),t=n.ssr;n.ssr=!0;try{return e()}finally{t||(n.ssr=!1)}}var Fn=globalThis;function ea(e,n){let t,r=!0;return()=>{let o=e();if(r)r=!1,t=o,we(()=>n(o,void 0));else{let i=t;t=o,we(()=>n(o,i))}}}var Pn=100;function Et(e){let n=e.userCleanups;if(n.length!==0){e.userCleanups=[];for(let t=n.length-1;t>=0;t--)try{n[t]()}catch(r){_(r,{phase:"cleanup"})}}}function Bn(e){let n=1;do e.rerunPending=!1,e.userCleanups.length>0&&Et(e),te(e.bodyFn,e.subscriber);while(e.rerunPending&&++n<=Pn);e.rerunPending&&(e.rerunPending=!1,_(new Error(`effect re-requested itself ${Pn}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function ta(e){if(e.disposed)return;e.disposed=!0;let n=Fn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(n)try{n.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&Et(e)}catch(t){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",t)}try{vn(e.subscriber)}catch(t){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",t)}}function z(e,n){if(j())return()=>{};let t={fn:e,onError:n?.onError,userCleanups:[],running:!1,rerunPending:!1,disposed:!1,onCleanup:null,subscriber:null,bodyFn:null};t.onCleanup=s=>{t.userCleanups.push(s)};let r=t.onError;t.bodyFn=r?()=>{try{t.fn(t.onCleanup)}catch(s){r(s)}}:()=>{t.fn(t.onCleanup)};let o=(()=>{if(!t.disposed){if(t.running){t.rerunPending=!0;return}t.running=!0;try{t.rerunPending=!1,t.userCleanups.length>0&&Et(t),te(t.bodyFn,o),t.rerunPending&&Bn(t)}finally{t.running=!1,t.rerunPending=!1}}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._errorPhase="effect",o._runEpoch=0,o._runs=0,t.subscriber=o,t.running=!0;try{te(t.bodyFn,t.subscriber),t.rerunPending&&Bn(t)}finally{t.running=!1,t.rerunPending=!1}let i=Fn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("effect:create",{effectFn:e}),()=>ta(t)}var Ce=0,wt=new Set;function na(e){Ce++;try{return e()}finally{Ce--,Ce===0&&ia()}}function ra(e){return Ce===0?!1:(wt.add(e),!0)}function oa(){return Ce>0}function ia(){try{for(let e of wt)Tn(e)}finally{wt.clear()}Sn()}var zn=Symbol.for("sibujs.reactive.batch.v1");function sa(){let e=globalThis,n=e[zn];if(n)return n;let t={batch:na,enqueueBatchedSignal:ra,isBatching:oa};return e[zn]=t,t}var kt=sa(),P=kt.batch,le=kt.enqueueBatchedSignal,aa=kt.isBatching;var _t=globalThis;function C(e,n){let t={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0,_d:!1,_validate:void 0},r=void 0,o=n?.equals;r&&(t.__name=r);function i(){return ge(t),t.value}i.__signal=t,r&&(i.__name=r);let s;if(o?s=a=>{let c=t.value,l=typeof a=="function"?a(c):a;if(!o(c,l)){if(t.value=l,t.__v++,!1){let d=_t.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&d.emit("signal:update",{signal:t,name:r,oldValue:c,newValue:l})}le(t)||be(t)}}:s=a=>{let c=t.value,l=typeof a=="function"?a(c):a;Object.is(l,c)||(t.value=l,t.__v++,le(t)||be(t))},!1){let a=_t.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&a.emit("signal:create",{signal:t,name:r,getter:i,initial:e})}return[i,s]}function ca(e){let[n,t]=C(0,e?.name?{name:e.name}:void 0);return{track(){n()},invalidate(){t(r=>r+1)}}}var ua=`
4
+ `?2:1;continue}if(Kt(o)){let i="",s=t+1;for(;s<e.length&&i.length<6&&Kt(e[s]);)i+=e[s],s++;s<e.length&&Fr(e[s])&&(s+=e[s]==="\r"&&e[s+1]===`
5
+ `?2:1);let a=Number.parseInt(i,16),c=a===0||a>1114111||a>=55296&&a<=57343;n+=c?"\uFFFD":String.fromCodePoint(a),t=s-1;continue}n+=o,t+=1}return n}var Ut=["url(","expression(","javascript:","vbscript:","-moz-binding","behavior:","@import","image-set(","filter:progid"];function Vr(e){if(!e)return"an element";let n=e.tagName.toLowerCase(),t=e.getAttribute("id");t&&(n+=`#${t}`);let r=e.getAttribute("class");return r&&(n+=`.${r.trim().split(/\s+/).slice(0,3).join(".")}`),`<${n}>`}var nt=new Set,Jt=100,Gt=!1;function Zt(e,n,t){}function rt(e){if(!Br.test(e))return-1;let t=(e.includes("\\")?zr(e):e).toLowerCase().replace(/\s+/g,"");for(let r=0;r<Ut.length;r++)if(t.includes(Ut[r]))return r;return-1}function Fe(e,n){let t=rt(e);return t===-1?e:(Zt(e,t,n),"")}function ze(e,n){let t=String(e);if(t.trim()==="")return"";if(typeof document>"u")return Fe(t,n)===""?"":t;let r=document.createElement("div");try{r.style.cssText=t}catch{return""}let o=[];for(let i=0;i<r.style.length;i++){let s=r.style[i],a=r.style.getPropertyValue(s),c=rt(a);if(c===-1&&(c=rt(`${s}:${a}`)),c!==-1){Zt(a,c,{property:s,element:n?.element});continue}let l=r.style.getPropertyPriority(s);o.push(`${s}: ${a}${l?` !${l}`:""}`)}return o.join("; ")}var qr=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data","manifest"]),Wr=new Set(["srcdoc"]);function Xt(e){return Wr.has(e.toLowerCase())}function Qt(e,n,t){let r=e.toLowerCase();return r==="srcset"?Pr(n):qr.has(r)?Yt(n):r==="style"?ze(n,t):n}var jr="http://www.w3.org/1999/xhtml",Kr="http://www.w3.org/2000/svg",Ur="http://www.w3.org/1999/xlink",Jr="http://www.w3.org/XML/1998/namespace",Gr=new Set(["checked","disabled","selected"]);function Yr(e){return e.namespaceURI===null||e.namespaceURI===jr}function en(e,n,t){e[n]=t}function Zr(e,n){if(e.namespaceURI!==Kr)return null;let t=n.toLowerCase();return t.startsWith("xlink:")?Ur:t.startsWith("xml:")?Jr:null}function V(e,n,t,r={}){let o=Zr(e,n),i=o?n.slice(n.indexOf(":")+1):n;if(ve(n))return!1,o?e.removeAttributeNS(o,i):e.removeAttribute(n),!1;if(t==null)return o?e.removeAttributeNS(o,i):e.removeAttribute(n),!0;if(Xt(n))return!1,o?e.removeAttributeNS(o,i):e.removeAttribute(n),!1;let s=Yr(e),a=s?n.toLowerCase():n;if(typeof t=="boolean"){if(n.length>5&&n.slice(0,5).toLowerCase()==="aria-"){let m=t?"true":"false";return(o?e.getAttributeNS(o,i):e.getAttribute(n))!==m&&(o?e.setAttributeNS(o,n,m):e.setAttribute(n,m)),!0}return s&&Gr.has(a)&&a in e?en(e,a,t):t?o?e.setAttributeNS(o,n,""):e.setAttribute(n,""):o?e.removeAttributeNS(o,i):e.removeAttribute(n),!0}let c=String(t);if(r.syncValueProperty!==!1&&s&&(a==="value"||a==="checked")&&a in e)return en(e,a,a==="checked"?!!t:c),!0;let l=Qt(n,c,{element:e});return(o?e.getAttributeNS(o,i):e.getAttribute(n))===l||(o?e.setAttributeNS(o,n,l):e.setAttribute(n,l)),!0}var Xr=4096,ot=[];function Qr(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function eo(e,n,t){let r=ot.pop();if(r)return r.sig=e,r.sub=n,r.epoch=t,r;let o=Qr();return o.sig=e,o.sub=n,o.epoch=t,o}function tn(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,ot.length<Xr&&ot.push(e)}function to(e,n){let t=e.subsHead??null;n.sigPrev=null,n.sigNext=t,t?t.sigPrev=n:e.subsTail=n,e.subsHead=n,e.__sc=(e.__sc??0)+1}function nn(e){let n=e.sig;if(!n)return;let t=e.sigPrev,r=e.sigNext;t?t.sigNext=r:n.subsHead=r,r?r.sigPrev=t:n.subsTail=t,n.__sc=(n.__sc??1)-1,n.__activeNode===e&&(n.__activeNode=e.prevActive),n.__sc===0&&(n.subsHead=null,n.subsTail=null)}function no(e,n){let t=e.depsTail??null;n.subPrev=t,n.subNext=null,t?t.subNext=n:e.depsHead=n,e.depsTail=n}function ro(e){let n=e.sub;if(!n)return;let t=e.subPrev,r=e.subNext;t?t.subNext=r:n.depsHead=r,r?r.subPrev=t:n.depsTail=t}var W=null,Z=null,ne=0,re=[],q=new Set,oo=[];function io(e){try{e()}catch(n){let t=e;_(n,{phase:t._errorPhase??"effect",name:t.__name,node:t._errorNode})}}function so(e){let n=e.depsHead??null;if(n===null)return!0;for(;n!==null;){let t=n.sig;if(t===null)return!0;if(t._d===!0&&t._validate!==void 0)try{t._validate()}catch{return!0}if(n.depVersion!==t.__v)return!0;n=n.subNext}return!1}var J=0,X=!1;function st(){J===0&&(Z=W,W=null,X=!0),J++}function at(){J--,J===0&&(W=Z,Z=null,X=!1)}function rn(){return X}function on(e){st();try{return e()}finally{at()}}var ao=0;function ct(e,n){let t=W,r=0,o=null;X&&(r=J,o=Z,J=0,Z=null,X=!1),W=n;let i=n,s=++ao;i._epoch=s,i._structDirty=!1;for(let a=i.depsHead??null;a!==null;a=a.subNext){let c=a.sig;a.prevActive=c.__activeNode??null,c.__activeNode=a}try{e()}finally{W=t,r!==0&&(J=r,Z=o,X=!0);let a=i.depsHead??null;for(;a!==null;){let c=a.subNext,l=a.sig;l.__activeNode=a.prevActive,a.prevActive=null,a.epoch!==s&&(ro(a),nn(a),tn(a)),a=c}}}function sn(e,n){if(!n)return ut(e);xe(n);let t=W,r=0,o=null;X&&(r=J,o=Z,J=0,Z=null,X=!1),W=n;try{e()}finally{W=t,r!==0&&(J=r,Z=o,X=!0);let s=n;for(let a=s.depsHead??null;a!==null;a=a.subNext){let c=a.sig;c.__activeNode=a.prevActive,a.prevActive=null}}let i=n;return i._dispose??(i._dispose=()=>xe(n))}function ut(e,n){let t=()=>{let o=r;if(!(o._disposed||o._reentrant)){o._reentrant=!0;try{ct(e,r)}finally{o._reentrant=!1}}},r=t;r.depsHead=null,r.depsTail=null,r._epoch=0,r._structDirty=!1,r._hasComputedDep=!1,r._runEpoch=0,r._runs=0,r._reentrant=!1,r._disposed=!1,r._errorPhase="binding",r._errorNode=n;try{t()}catch(o){throw r._disposed=!0,r._errorNode=void 0,xe(r),o}return r._dispose??(r._dispose=()=>{r._disposed=!0,r._errorNode=void 0,xe(r)})}function an(e){if(!W)return;let n=W,t=e,r=n._epoch??0,o=t.__activeNode??null;if(o!==null&&o.sub===n){o.epoch=r,o.depVersion=t.__v??Number.NaN;return}t._validate!==void 0&&(n._hasComputedDep=!0);let i=eo(e,n,r);i.depVersion=t.__v??Number.NaN,i.prevActive=o,t.__activeNode=i,no(n,i),to(t,i),n._structDirty=!0}function xe(e){let n=e,t=n.depsHead??null;for(n.depsHead=null,n.depsTail=null;t;){let r=t.subNext;nn(t),tn(t),t=r}}var Ve=1e3,qe=1e6,We=0,ae=new Set;function cn(e){let n=Ve;return Number.isFinite(e)&&e>0&&(Ve=Math.floor(e)),n}function un(e){let n=qe;return Number.isFinite(e)&&e>0&&(qe=Math.floor(e)),n}function co(e){let n=e;return n._runEpoch!==We?(n._runEpoch=We,n._runs=1,!1):(n._runs=(n._runs??0)+1,n._runs>Ve)}function uo(e){let n=e.__name??"<unnamed>";_(new Error(`subscriber "${n}" fired more than ${Ve} times \u2014 likely a write-reads-self cycle between effects/signals. This subscriber is quarantined for the rest of this update; other pending work still runs.`),{phase:"scheduler",name:n})}function lo(){_(new Error(`Notification drain exceeded ${qe} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function ln(){let e=0;for(;e<re.length;){if(e>=qe){lo();break}let n=re[e++];if(q.delete(n),!(ae.size>0&&ae.has(n))&&!(n._hasComputedDep===!0&&!so(n))){if(co(n)){uo(n),ae.add(n);continue}io(n)}}}function dn(){if(!(ne>0)){ne++,We++;try{ln()}finally{ne--,ne===0&&(re.length=0,q.clear(),ae.size>0&&ae.clear())}}}function it(e){e();let n=e._sig;if(!n)return;let t=oo,r=t.length;for(t.push(n);t.length>r;){let i=t.pop().subsHead??null;for(;i;){let s=i.sub;if(s)if(s._c){let a=s._sig;a?(!a._d||a._f===!0)&&(a._d=!0,a._f=!1,t.push(a)):s()}else q.has(s)||(q.add(s),re.push(s));i=i.sigNext}}}function fn(e){let t=e.subsHead??null;for(;t;){let r=t.sub;r&&(r._c?it(r):q.has(r)||(q.add(r),re.push(r))),t=t.sigNext}}function pn(e){let t=e.subsHead;if(t){if(ne>0){let r=t;for(;r;){let o=r.sub;o&&(o._c?it(o):q.has(o)||(q.add(o),re.push(o))),r=r.sigNext}return}ne++,We++;try{let r=t;for(;r;){let o=r.sub;o&&(o._c?it(o):q.has(o)||(q.add(o),re.push(o))),r=r.sigNext}ln()}finally{ne--,ne===0&&(re.length=0,q.clear(),ae.size>0&&ae.clear())}}}function mn(e){return e.__sc??0}function gn(e){let n=e,t=[],r=n.depsHead??null;for(;r;)r.sig&&t.push(r.sig),r=r.subNext;return t}function bn(e,n){let t=e.subsHead??null;for(;t;){let r=t.sub;r&&n(r),t=t.sigNext}}var hn="4.5.0",yn=Symbol.for("sibujs.reactive.v1");function po(){let e=globalThis,n=e[yn];if(n)return!1,n;let t={suspendTracking:st,resumeTracking:at,isTrackingSuspended:rn,untracked:on,retrack:ct,track:sn,reactiveBinding:ut,recordDependency:an,cleanup:xe,setMaxSubscriberRepeats:cn,setMaxDrainIterations:un,drainNotificationQueue:dn,queueSignalNotification:fn,notifySubscribers:pn,getSubscriberCount:mn,getSubscriberDeps:gn,forEachSubscriber:bn,version:hn};return e[yn]=t,t}var D=po(),ce=D.suspendTracking,ue=D.resumeTracking,vn=D.isTrackingSuspended,Ae=D.untracked,oe=D.retrack,F=D.track,$=D.reactiveBinding,le=D.recordDependency,Ce=D.cleanup,kc=D.setMaxSubscriberRepeats,xn=D.setMaxDrainIterations,Sn=D.drainNotificationQueue,Tn=D.queueSignalNotification,Se=D.notifySubscribers,_c=D.getSubscriberCount,Ac=D.getSubscriberDeps,Cc=D.forEachSubscriber;function je(e,n,t){if(ve(n))return V(e,n,"",{label:`bindAttribute("${n}")`}),()=>{};function r(){let o;try{o=t()}catch(i){_(i,{phase:"binding",name:`bindAttribute("${n}")`,node:e});return}V(e,n,o,{label:`bindAttribute("${n}")`})}return $(r,e)}function En(e,n,t){let r=null;function o(){let s;try{s=typeof n=="function"?n():n}catch(c){_(c,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof t=="function"?t():t}catch(c){_(c,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),V(e,s,a,{label:"bindDynamic"})&&(r=s)}let i=$(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var lt=["data-focus-key","id","name"],mo=new Set(["text","search","url","tel","password",""]);function go(e){let n=e.tagName;if(!(n==="TEXTAREA"||n==="INPUT"&&mo.has(e.type.toLowerCase())))return{start:null,end:null,direction:null};let r=e;return{start:r.selectionStart,end:r.selectionEnd,direction:r.selectionDirection}}function Ne(e){if(e.length===0||typeof document>"u")return null;let n=document.activeElement;if(!n||n===document.body)return null;let t=!1;for(let i=0;i<e.length;i++){let s=e[i];if(s===n||s.nodeType===1&&s.contains(n)){t=!0;break}}if(!t)return null;let r=null,o=null;for(let i=0;i<lt.length;i++){let s=n.getAttribute(lt[i]);if(s){r=lt[i],o=s;break}}return{el:n,attr:r,value:o,tag:n.tagName,...go(n)}}function bo(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function ho(e,n){let t=null,r=0;for(let o=0;o<e.length;o++){let i=e[o];if(i.nodeType!==1)continue;let s=i;s.matches(n)&&(r++,t??(t=s));let a=s.querySelectorAll(n);for(let c=0;c<a.length;c++)r++,t??(t=a[c]);if(r>1)return{el:null,count:r}}return r===1?{el:t,count:r}:{el:null,count:r}}function wn(e,n){if(e.focus(),n.start!==null&&typeof e.setSelectionRange=="function"){let t=e,r=t.value.length,o=Math.min(n.start,r),i=Math.min(n.end??o,r);t.setSelectionRange(o,i,n.direction??"none")}}function Te(e,n,t){if(!e||typeof document>"u")return;let r=document.activeElement;if(r===e.el||r&&r!==document.body&&r!==document.documentElement)return;if(e.el.isConnected){wn(e.el,e);return}let o=!1;if(e.attr&&e.value){let{el:i,count:s}=ho(n,`[${e.attr}=${bo(e.value)}]`);if(i&&i.tagName===e.tag){wn(i,e);return}o=s>1}}function de(e,n){let t=[];function r(){let o;try{o=n()}catch(d){_(d,{phase:"binding",name:"bindChildNode",node:e});return}let i=Ne(t);if(o==null||typeof o=="boolean"){for(let d=0;d<t.length;d++){let m=t[d];L(m),m.parentNode&&m.parentNode.removeChild(m)}t.length=0,Te(i,t,"bindChildNode");return}let s=e.parentNode;if(!s){t.length=0;return}let a;if(Array.isArray(o)){a=[];let d=new Set;for(let m=0;m<o.length;m++){let g=o[m];if(g==null||typeof g=="boolean")continue;let p=g instanceof Node?g:document.createTextNode(String(g));if(d.has(p)){!1;continue}d.add(p),a.push(p)}}else a=[o instanceof Node?o:document.createTextNode(String(o))];let c;if(t.length>0&&a.length>0){let d=new Set(t);c=new Set;for(let m=0;m<a.length;m++)d.has(a[m])&&c.add(a[m])}for(let d=0;d<t.length;d++){let m=t[d];c?.has(m)||(L(m),m.parentNode&&m.parentNode.removeChild(m))}let l=e;for(let d=0;d<a.length;d++){let m=a[d];l.nextSibling!==m&&s.insertBefore(m,l.nextSibling),l=m}t=a,Te(i,a,"bindChildNode")}return $(r,e)}var N="http://www.w3.org/2000/svg",yo=new Set(["script","iframe","object","embed","frame","frameset"]);function vo(e){return yo.has(e.toLowerCase())}var xo=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var dt=new Set,kn=100,_n=!1,An=new Map;function So(e){let n=An.get(e);return n!==void 0||(n=e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),An.set(e,n)),n}function To(e,n){if(typeof n=="function"){let r=$(()=>{e.setAttribute("style",ze(String(n()),{element:e}))},e);T(e,r);return}if(typeof n=="string"){e.setAttribute("style",ze(n,{element:e}));return}let t=e;for(let r in n){let o=n[r],i=So(r);if(typeof o=="function"){let s=o,a=$(()=>{t.style.setProperty(i,Fe(String(s()),{property:i,element:e}))},e);T(e,a)}else t.style.setProperty(i,Fe(String(o),{property:i,element:e}))}}function Eo(e,n){if(typeof n=="string"){e.setAttribute("class",n);return}if(typeof n=="function"){let i=$(()=>{e.setAttribute("class",n())},e);T(e,i);return}let t=n,r=!1,o="";for(let i in t){let s=t[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=$(()=>{let a="";for(let c in t){let l=t[c];(typeof l=="function"?l():l)&&(a=a?`${a} ${c}`:c)}e.setAttribute("class",a)},e);T(e,s)}else e.setAttribute("class",o)}function ft(e,n){if(typeof n=="string"){e.textContent=n;return}if(typeof n=="number"){e.textContent=String(n);return}if(!(typeof n=="boolean"||n==null)){if(typeof n=="function"){let t=document.createComment("");e.appendChild(t),T(e,de(t,n));return}if(n instanceof Node){e.appendChild(n);return}if(Array.isArray(n))for(let t=0;t<n.length;t++){let r=n[t];if(typeof r=="function"){let o=document.createComment("");e.appendChild(o),T(e,de(o,r))}else if(r instanceof Node)e.appendChild(r);else if(Array.isArray(r))for(let o=0;o<r.length;o++){let i=r[o];if(typeof i=="function"){let s=document.createComment("");e.appendChild(s),T(e,de(s,i))}else i instanceof Node?e.appendChild(i):i!=null&&typeof i!="boolean"&&e.appendChild(document.createTextNode(String(i)))}else r!=null&&typeof r!="boolean"&&e.appendChild(document.createTextNode(String(r)))}}}var u=(e,n)=>{let t=vo(e);return(r,o)=>{if(t)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);let i=n?document.createElementNS(n,e):document.createElement(e);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),ft(i,o),i):(i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return ft(i,r),i;let s=r,a=s.class;a!=null&&Eo(i,a);let c=s.id;c!=null&&(!1,i.id=c);let l=o!==void 0?o:s.nodes;l!=null&&ft(i,l);let d=s.on;if(d)for(let p in d){let f=d[p];typeof f=="function"?i.addEventListener(p,f):!1}let m=s.style;m!=null&&To(i,m);let g=s.ref;g&&(g.current=i);for(let p in s)switch(p){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{let f=s[p];if(f==null||ve(p))continue;typeof f=="function"?T(i,je(i,p,f)):V(i,p,f,{syncValueProperty:!1,label:"tagFactory"})}}return s.onElement&&typeof s.onElement=="function"&&s.onElement(i),i}};var Gc=u("html"),wo=u("head"),ko=u("body"),_o=u("title"),k=u("div"),M=u("span"),Ao=u("section"),Co=u("article"),No=u("header"),Lo=u("footer"),Ro=u("nav"),Mo=u("main"),Ho=u("aside"),Do=u("address"),pt=u("p"),$o=u("h1"),Io=u("h2"),mt=u("h3"),Oo=u("h4"),Po=u("h5"),Bo=u("h6"),Fo=u("blockquote"),zo=u("dd"),Vo=u("dl"),qo=u("dt"),Wo=u("figcaption"),jo=u("figure"),Ko=u("hr"),Uo=u("li"),Jo=u("ol"),Go=u("ul"),gt=u("pre"),Yo=u("a"),Zo=u("abbr"),Xo=u("b"),Qo=u("bdi"),ei=u("bdo"),ti=u("br"),ni=u("cite"),bt=u("code"),ri=u("data"),oi=u("dfn"),ii=u("em"),si=u("i"),ai=u("kbd"),ci=u("mark"),ui=u("q"),li=u("rp"),di=u("rt"),fi=u("ruby"),pi=u("s"),mi=u("samp"),gi=u("small"),bi=u("strong"),hi=u("sub"),yi=u("sup"),vi=u("time"),xi=u("u"),Si=u("var"),Ti=u("area"),Ei=u("audio"),wi=u("img"),ki=u("map"),_i=u("track"),Ai=u("video"),Ci=u("embed"),Ni=u("iframe"),Li=u("object"),Ri=u("param"),Mi=u("picture"),Hi=u("portal"),Di=u("source"),$i=u("svg",N),Ii=u("math"),Oi=u("canvas"),Pi=u("noscript"),Bi=u("script"),Fi=u("del"),zi=u("ins"),Vi=u("caption"),qi=u("col"),Wi=u("colgroup"),ji=u("table"),Ki=u("tbody"),Ui=u("td"),Ji=u("tfoot"),Gi=u("th"),Yi=u("thead"),Zi=u("tr"),Le=u("button"),Xi=u("datalist"),Qi=u("fieldset"),es=u("form"),ts=u("input"),ns=u("label"),rs=u("legend"),os=u("meter"),is=u("optgroup"),ss=u("option"),as=u("output"),cs=u("progress"),us=u("select"),ls=u("textarea"),ds=u("details"),fs=u("dialog"),ps=u("menu"),ms=u("summary"),gs=u("slot"),bs=u("template"),hs=u("base"),ys=u("link"),vs=u("meta"),fe=u("style"),xs=u("circle",N),Ss=u("ellipse",N),Ts=u("g",N),Es=u("line",N),ws=u("path",N),ks=u("polygon",N),_s=u("polyline",N),As=u("rect",N),Cs=u("text",N),Ns=u("tspan",N),Ls=u("defs",N),Rs=u("clipPath",N),Ms=u("mask",N),Hs=u("pattern",N),Ds=u("linearGradient",N),$s=u("radialGradient",N),Is=u("stop",N),Os=u("use",N),Ps=u("symbol",N),Bs=u("marker",N),Fs=u("center"),zs=u("font"),Vs=u("marquee"),qs=e=>u(e);var ht="__sibuPendingError";function Cn(e,n){let t=()=>e.parentNode?(_(n,{phase:"render",name:"lazy",node:e}),!0):!1;t()||queueMicrotask(()=>{t()||(e[ht]=n)})}function Ke(e){let n=e,t=n[ht];if(t instanceof Error)return delete n[ht],t}function Nn(e){let n=null;return function(){if(n)return n();let r=k({class:"sibu-lazy"}),o=!1;return e().then(i=>{if(o)return;n=i.default;let s=n();B(r,s)}).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));B(r,k({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),Cn(r,s)}),r.appendChild(M("sibu-lazy-loading","Loading...")),T(r,()=>{o=!0}),r}}function Ln({nodes:e,fallback:n}){let t=k({class:"sibu-suspense"}),r=n();t.appendChild(r);let o=!1,i=null,s=null;return T(t,()=>{o=!0,i&&(i.disconnect(),i=null),s&&!t.contains(s)&&L(s)}),queueMicrotask(()=>{if(!o)try{let a=e();if(s=a,a.classList.contains("sibu-lazy")){if(!a.querySelector(".sibu-lazy-loading")){B(t,a);return}i=new MutationObserver(()=>{if(o)return;a.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,B(t,a))}),i.observe(a,{childList:!0,subtree:!0})}else B(t,a)}catch(a){let c=a instanceof Error?a:new Error(String(a));Cn(t,c)}}),t}function St(e,n){try{return e()}catch(t){let r=n.toLowerCase().includes("unmount")?"cleanup":"effect";_(t,{phase:r,name:n});return}}function yt(e,n,t){let r=St(e,n);typeof r=="function"&&t&&T(t,r)}var Ee=new WeakMap,pe=new WeakMap,Q=new Set,ee=new Set,we=null,Ue=0,Ws=256;function vt(e){let n=Ee.get(e);if(n){Ee.delete(e),Q.delete(e);for(let t of n)try{t()}catch{}}}function xt(e){pe.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let t=pe.get(e);if(t){pe.delete(e),ee.delete(e);for(let r of t)try{r()}catch{}}})}function js(e){if(Q.size===0||e.nodeType!==1)return;let n=e;if(Q.has(n)&&n.isConnected&&vt(n),n.firstElementChild)for(let t of Array.from(Q))t!==n&&t.isConnected&&n.contains(t)&&vt(t)}function Ks(e){if(ee.size===0||e.nodeType!==1)return;let n=e;if(ee.has(n)&&!n.isConnected&&xt(n),n.firstElementChild)for(let t of Array.from(ee))t!==n&&!t.isConnected&&n.contains(t)&&xt(t)}function Us(){if(Q.size>0)for(let e of Array.from(Q))e.isConnected&&vt(e);if(ee.size>0)for(let e of Array.from(ee))e.isConnected||xt(e)}function Rn(){we||typeof document>"u"||(we=new MutationObserver(e=>{for(let n of e)if(n.type==="childList"){if(n.addedNodes.length>0)for(let t=0;t<n.addedNodes.length;t++)js(n.addedNodes[t]);if(n.removedNodes.length>0)for(let t=0;t<n.removedNodes.length;t++)Ks(n.removedNodes[t])}Ue+=e.length,Ue>=Ws&&(Ue=0,Us()),Tt()}),we.observe(document.body,{childList:!0,subtree:!0}))}function Tt(){we&&Q.size===0&&ee.size===0&&(we.disconnect(),we=null,Ue=0)}function Js(e,n){let t=Ee.get(e);return t||(t=[],Ee.set(e,t)),t.push(n),Q.add(e),Rn(),()=>{let r=Ee.get(e);if(r){let o=r.indexOf(n);o!==-1&&r.splice(o,1),r.length===0&&(Ee.delete(e),Q.delete(e))}Tt()}}function Gs(e,n){let t=pe.get(e);return t||(t=[],pe.set(e,t)),t.push(n),ee.add(e),Rn(),()=>{let r=pe.get(e);if(r){let o=r.indexOf(n);o!==-1&&r.splice(o,1),r.length===0&&(pe.delete(e),ee.delete(e))}Tt()}}function Je(e,n){if(!(typeof document>"u"))if(n){let t=!1;if(T(n,()=>{t=!0}),n.isConnected){queueMicrotask(()=>{t||yt(e,"onMount",n)});return}queueMicrotask(()=>{if(t)return;if(n.isConnected){yt(e,"onMount",n);return}let r=Js(n,()=>{t||yt(e,"onMount",n)});T(n,r)})}else queueMicrotask(()=>{St(e,"onMount")})}function Ys(e,n){if(typeof document>"u")return;let t=!1,r=()=>{t||(t=!0,St(e,"onUnmount"))};T(n,r);let o=()=>{if(t)return;let i=Gs(n,r);T(n,i)};n.isConnected?o():Je(()=>{o()},n)}function Zs(e,n){T(n,e)}var Et=Symbol.for("sibujs.ssr.v1");function Xs(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let n=null,t=process.getBuiltinModule;typeof t=="function"?n=t("node:async_hooks"):typeof Xe=="function"&&(n=Xe("async_hooks")),n&&(e=new n.AsyncLocalStorage)}}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var me=globalThis[Et]??(globalThis[Et]=Xs()),Re=me.als,G=me.fallbackStore;me.fallbackDepth??(me.fallbackDepth=0);var Mn=!1;function Qs(){if(Mn||Re||!(typeof process<"u"&&!!process.versions?.node))return;Mn=!0;let n=process.versions.node;`${n}`}function ge(){if(Re){let e=Re.getStore();if(e)return e}return G}function j(){return ge().ssr}function Hn(e){if(!j())return null;let n=ge(),t=n.caches??(n.caches=new Map),r=t.get(e);return r||(r=new Map,t.set(e,r)),r}function Dn(){ge().ssr=!0}function $n(){ge().ssr=!1}function In(e){let n={ssr:!0,suspenseIdCounter:0,locale:void 0};if(Re)return Re.run(n,e);Qs();let t=G.ssr,r=G.suspenseIdCounter,o=G.locale;G.ssr=!0,G.suspenseIdCounter=0,G.locale=void 0,me.fallbackDepth++;try{return e()}finally{me.fallbackDepth--,G.ssr=t,G.suspenseIdCounter=r,G.locale=o}}function On(e){let n=ge(),t=n.ssr;n.ssr=!0;try{return e()}finally{t||(n.ssr=!1)}}var Fn=globalThis;function ea(e,n){let t,r=!0;return()=>{let o=e();if(r)r=!1,t=o,Ae(()=>n(o,void 0));else{let i=t;t=o,Ae(()=>n(o,i))}}}var Pn=100;function wt(e){let n=e.userCleanups;if(n.length!==0){e.userCleanups=[];for(let t=n.length-1;t>=0;t--)try{n[t]()}catch(r){_(r,{phase:"cleanup"})}}}function Bn(e){let n=1;do e.rerunPending=!1,e.userCleanups.length>0&&wt(e),oe(e.bodyFn,e.subscriber);while(e.rerunPending&&++n<=Pn);e.rerunPending&&(e.rerunPending=!1,_(new Error(`effect re-requested itself ${Pn}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function ta(e){if(e.disposed)return;e.disposed=!0;let n=Fn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(n)try{n.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&wt(e)}catch(t){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",t)}try{Ce(e.subscriber)}catch(t){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",t)}}function z(e,n){if(j())return()=>{};let t={fn:e,onError:n?.onError,userCleanups:[],running:!1,rerunPending:!1,disposed:!1,onCleanup:null,subscriber:null,bodyFn:null};t.onCleanup=s=>{t.userCleanups.push(s)};let r=t.onError;t.bodyFn=r?()=>{try{t.fn(t.onCleanup)}catch(s){r(s)}}:()=>{t.fn(t.onCleanup)};let o=(()=>{if(!t.disposed){if(t.running){t.rerunPending=!0;return}t.running=!0;try{t.rerunPending=!1,t.userCleanups.length>0&&wt(t),oe(t.bodyFn,o),t.rerunPending&&Bn(t)}finally{t.running=!1,t.rerunPending=!1}}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._errorPhase="effect",o._runEpoch=0,o._runs=0,t.subscriber=o,t.running=!0;try{oe(t.bodyFn,t.subscriber),t.rerunPending&&Bn(t)}finally{t.running=!1,t.rerunPending=!1}let i=Fn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("effect:create",{effectFn:e}),()=>ta(t)}var Me=0,kt=new Set;function na(e){Me++;try{return e()}finally{Me--,Me===0&&ia()}}function ra(e){return Me===0?!1:(kt.add(e),!0)}function oa(){return Me>0}function ia(){try{for(let e of kt)Tn(e)}finally{kt.clear()}Sn()}var zn=Symbol.for("sibujs.reactive.batch.v1");function sa(){let e=globalThis,n=e[zn];if(n)return n;let t={batch:na,enqueueBatchedSignal:ra,isBatching:oa};return e[zn]=t,t}var _t=sa(),P=_t.batch,be=_t.enqueueBatchedSignal,aa=_t.isBatching;var At=globalThis;function C(e,n){let t={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0,_d:!1,_validate:void 0},r=void 0,o=n?.equals;r&&(t.__name=r);function i(){return le(t),t.value}i.__signal=t,r&&(i.__name=r);let s;if(o?s=a=>{let c=t.value,l=typeof a=="function"?a(c):a;if(!o(c,l)){if(t.value=l,t.__v++,!1){let d=At.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&d.emit("signal:update",{signal:t,name:r,oldValue:c,newValue:l})}be(t)||Se(t)}}:s=a=>{let c=t.value,l=typeof a=="function"?a(c):a;Object.is(l,c)||(t.value=l,t.__v++,be(t)||Se(t))},!1){let a=At.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&a.emit("signal:create",{signal:t,name:r,getter:i,initial:e})}return[i,s]}function ca(e){let[n,t]=C(0,e?.name?{name:e.name}:void 0);return{track(){n()},invalidate(){t(r=>r+1)}}}var ua=`
6
6
  .sibu-error-display {
7
7
  border: 1px solid var(--sibu-err-border, #e5484d);
8
8
  border-radius: 10px;
@@ -183,11 +183,11 @@
183
183
  border: 1px solid #3a3a4e;
184
184
  }
185
185
  .sibu-error-display .sibu-err-btn-reload:hover { background: #2a2b40; }
186
- `,Vn=!1;function la(){if(Vn||typeof document>"u")return;let e=se({nodes:ua});document.head.appendChild(e),Vn=!0}function da(e){let n=[],t=e.split(`
186
+ `,Vn=!1;function la(){if(Vn||typeof document>"u")return;let e=fe({nodes:ua});document.head.appendChild(e),Vn=!0}function da(e){let n=[],t=e.split(`
187
187
  `);for(let r of t){let o=r.trim(),i=o.match(/^at\s+(?:(.+?)\s+\((.+)\)|(.+))$/);if(i){n.push({fn:i[1]||"(anonymous)",loc:i[2]||i[3]||""});continue}let s=o.match(/^(.+?)@(.+)$/);s&&n.push({fn:s[1]||"(anonymous)",loc:s[2]||""})}return n}function qn(e){if(e instanceof Error){let n=e.code??e.name??"ERROR",t=e.message||"Unknown error",r=e.stack??"",o=da(r),i=e.cause,s=i!=null?qn(i):null;return{code:n,message:t,stack:r,frames:o,cause:s}}return{code:"NON_ERROR",message:typeof e=="string"?e:JSON.stringify(e),stack:"",frames:[],cause:null}}function fa(e,n,t){let r=[];r.push(t),r.push(`[${e.code}] ${e.message}`),e.stack&&(r.push(""),r.push("Stack Trace:"),r.push(e.stack));let o=e.cause;for(;o;){if(r.push(""),r.push("Caused by:"),r.push(` [${o.code}] ${o.message}`),o.stack){let i=o.stack.split(`
188
188
  `).map(s=>` ${s}`).join(`
189
189
  `);r.push(i)}o=o.cause}if(n&&Object.keys(n).length>0){r.push(""),r.push("Metadata:");for(let[i,s]of Object.entries(n))r.push(` ${i}: ${String(s)}`)}return r.push(""),r.push("Environment:"),r.push(` Timestamp: ${new Date().toISOString()}`),typeof location<"u"&&r.push(` URL: ${location.href}`),typeof navigator<"u"&&navigator.userAgent&&r.push(` User Agent: ${navigator.userAgent}`),r.join(`
190
- `)}function Wn(e){let n=e.map((t,r)=>k({class:"sibu-err-frame",nodes:[M({class:"sibu-err-line",nodes:String(r+1)}),M({class:"sibu-err-fn",nodes:t.fn}),M({class:"sibu-err-loc",nodes:` \u2014 ${t.loc}`})]}));return mt({class:"sibu-err-stack",nodes:n})}function jn(e){return e?[k({class:"sibu-err-cause-label",nodes:"Caused by"}),k({class:"sibu-err-section",nodes:[k({class:"sibu-err-section-head",nodes:[M({nodes:`[${e.code}] ${e.message}`}),M({nodes:""})]}),e.frames.length>0?Wn(e.frames):k({class:"sibu-err-stack",nodes:"(no stack)"})]}),...jn(e.cause)]:[]}function pa(e){let n=[];for(let[r,o]of Object.entries(e)){n.push(document.createElement("dt")),n[n.length-1].textContent=r;let i=document.createElement("dd");i.textContent=o==null?"(null)":String(o),n.push(i)}let t=document.createElement("dl");t.className="sibu-err-meta";for(let r of n)t.appendChild(r);return t}function At(e){la();let n=e.severity??"error",t=qn(e.error),r=e.alwaysShowDetails??U(),o=e.title??t.message,i=new Date().toISOString().replace("T"," ").slice(0,19),[s,a]=C("Copy"),c=_e({class:"sibu-err-copy-btn",nodes:()=>s(),on:{click:()=>{let f=fa(t,e.metadata,o);typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(f).then(()=>{a("Copied!"),setTimeout(()=>a("Copy"),1500)},()=>{a("Copy failed"),setTimeout(()=>a("Copy"),1500)})}}}),l=k({class:"sibu-err-header",nodes:[gt({class:"sibu-err-icon",nodes:t.code}),pt({class:"sibu-err-title",nodes:o}),c,M({class:"sibu-err-timestamp",nodes:i})]}),d=[ft({class:"sibu-err-message",nodes:t.message})];r&&t.frames.length>0&&d.push(k({class:"sibu-err-section",nodes:[k({class:"sibu-err-section-head",nodes:[M({nodes:"Stack Trace"})]}),Wn(t.frames)]})),r&&d.push(...jn(t.cause)),r&&e.metadata&&Object.keys(e.metadata).length>0&&d.push(k({class:"sibu-err-section",nodes:[k({class:"sibu-err-section-head",nodes:[M({nodes:"Metadata"})]}),pa(e.metadata)]}));let p=[];e.onRetry&&p.push(_e({class:"sibu-err-btn sibu-err-btn-retry",nodes:e.retryLabel??"Retry",on:{click:e.onRetry}})),!e.hideReload&&typeof location<"u"&&p.push(_e({class:"sibu-err-btn sibu-err-btn-reload",nodes:"Reload Page",on:{click:()=>location.reload()}})),p.length>0&&d.push(k({class:"sibu-err-actions",nodes:p}));let g=k({class:"sibu-err-body",nodes:d});return k({class:"sibu-error-display","data-severity":n,nodes:[l,g]})}var ma=`
190
+ `)}function Wn(e){let n=e.map((t,r)=>k({class:"sibu-err-frame",nodes:[M({class:"sibu-err-line",nodes:String(r+1)}),M({class:"sibu-err-fn",nodes:t.fn}),M({class:"sibu-err-loc",nodes:` \u2014 ${t.loc}`})]}));return gt({class:"sibu-err-stack",nodes:n})}function jn(e){return e?[k({class:"sibu-err-cause-label",nodes:"Caused by"}),k({class:"sibu-err-section",nodes:[k({class:"sibu-err-section-head",nodes:[M({nodes:`[${e.code}] ${e.message}`}),M({nodes:""})]}),e.frames.length>0?Wn(e.frames):k({class:"sibu-err-stack",nodes:"(no stack)"})]}),...jn(e.cause)]:[]}function pa(e){let n=[];for(let[r,o]of Object.entries(e)){n.push(document.createElement("dt")),n[n.length-1].textContent=r;let i=document.createElement("dd");i.textContent=o==null?"(null)":String(o),n.push(i)}let t=document.createElement("dl");t.className="sibu-err-meta";for(let r of n)t.appendChild(r);return t}function Ct(e){la();let n=e.severity??"error",t=qn(e.error),r=e.alwaysShowDetails??U(),o=e.title??t.message,i=new Date().toISOString().replace("T"," ").slice(0,19),[s,a]=C("Copy"),c=Le({class:"sibu-err-copy-btn",nodes:()=>s(),on:{click:()=>{let p=fa(t,e.metadata,o);typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(p).then(()=>{a("Copied!"),setTimeout(()=>a("Copy"),1500)},()=>{a("Copy failed"),setTimeout(()=>a("Copy"),1500)})}}}),l=k({class:"sibu-err-header",nodes:[bt({class:"sibu-err-icon",nodes:t.code}),mt({class:"sibu-err-title",nodes:o}),c,M({class:"sibu-err-timestamp",nodes:i})]}),d=[pt({class:"sibu-err-message",nodes:t.message})];r&&t.frames.length>0&&d.push(k({class:"sibu-err-section",nodes:[k({class:"sibu-err-section-head",nodes:[M({nodes:"Stack Trace"})]}),Wn(t.frames)]})),r&&d.push(...jn(t.cause)),r&&e.metadata&&Object.keys(e.metadata).length>0&&d.push(k({class:"sibu-err-section",nodes:[k({class:"sibu-err-section-head",nodes:[M({nodes:"Metadata"})]}),pa(e.metadata)]}));let m=[];e.onRetry&&m.push(Le({class:"sibu-err-btn sibu-err-btn-retry",nodes:e.retryLabel??"Retry",on:{click:e.onRetry}})),!e.hideReload&&typeof location<"u"&&m.push(Le({class:"sibu-err-btn sibu-err-btn-reload",nodes:"Reload Page",on:{click:()=>location.reload()}})),m.length>0&&d.push(k({class:"sibu-err-actions",nodes:m}));let g=k({class:"sibu-err-body",nodes:d});return k({class:"sibu-error-display","data-severity":n,nodes:[l,g]})}var ma=`
191
191
  .sibu-error-boundary {
192
192
  position: relative;
193
193
  }
@@ -341,7 +341,7 @@
341
341
  .sibu-error-fallback .sibu-error-btn-reload:hover {
342
342
  background: #3a3a4e;
343
343
  }
344
- `,ga=Symbol("sibujs.ErrorBoundary.resetKeyThrew"),Kn=!1;function ba(){if(!Kn&&typeof document<"u"){let e=se({nodes:ma});document.head.appendChild(e),Kn=!0}}function ha(e,n){let t=typeof e=="function"?e:n,r=typeof e=="function"?{}:e,{fallback:o,onError:i,resetKeys:s}=r;ba();let[a,c]=C(null),l=()=>{p(),c(null)},d=null,p=()=>{if(!d)return;let v=d;d=null,v()},g=v=>{let S=new Array(v.length);for(let E=0;E<v.length;E++)try{S[E]=v[E]()}catch(R){_(R,{phase:"effect",name:"ErrorBoundary.resetKeys"}),S[E]=ga}return S},f=()=>{let v=s;if(!v||v.length===0)return;p();let S=null;d=z(()=>{let E=g(v);if(S===null){S=E;return}let R=E.length!==S.length;if(!R){for(let I=0;I<E.length;I++)if(!Object.is(E[I],S[I])){R=!0;break}}S=E,R&&l()})},m=v=>{let S=Ze(v);if(c(S),f(),i)try{i(S)}catch(E){_(E,{phase:"render",name:"ErrorBoundary onError callback"})}return S},b=(v,S)=>At({error:v,severity:"error",onRetry:S}),h=v=>{let S=o||b;try{return S(v,l)}catch(E){return queueMicrotask(()=>{_(E,{phase:"render",name:"ErrorBoundary fallback",node:y.parentNode?y:void 0})}),document.createComment("error-boundary-failed")}},y=k({class:"sibu-error-boundary",nodes:()=>{let v=a();if(v)return h(v);try{let S=t();if(S&&typeof S.then=="function"){let E=k({class:"sibu-error-async"});E.appendChild(M({class:"sibu-lazy-loading",nodes:"Loading..."}));let R=!1;return T(E,()=>{R=!0}),S.then(I=>{if(R){L(I);return}B(E,I)}).catch(I=>{if(R)return;let fe=m(I);B(E,h(fe))}),E}return S}catch(S){let E=m(S);return h(E)}}}),w=v=>{if(a())return;let E=v.detail?.error;E&&(v.preventDefault(),v.stopPropagation(),m(E))};return y.addEventListener("sibu:error-propagate",w),je(()=>{let v=document.createTreeWalker(y,NodeFilter.SHOW_ELEMENT),S=[],E=v.currentNode;for(;E;){let R=qe(E);R&&S.push(R),E=v.nextNode()}if(S.length===1)m(S[0]);else if(S.length>1){let R=globalThis.AggregateError;m(R?new R(S,`${S.length} pre-mount errors caught by ErrorBoundary`):new Error(S.map(I=>I.message).join("; ")))}},y),T(y,()=>{p(),y.removeEventListener("sibu:error-propagate",w)}),y}var ya=`
344
+ `,ga=Symbol("sibujs.ErrorBoundary.resetKeyThrew"),Kn=!1;function ba(){if(!Kn&&typeof document<"u"){let e=fe({nodes:ma});document.head.appendChild(e),Kn=!0}}function ha(e,n){let t=typeof e=="function"?e:n,r=typeof e=="function"?{}:e,{fallback:o,onError:i,resetKeys:s}=r;ba();let[a,c]=C(null),l=()=>{m(),c(null)},d=null,m=()=>{if(!d)return;let v=d;d=null,v()},g=v=>{let S=new Array(v.length);for(let E=0;E<v.length;E++)try{S[E]=v[E]()}catch(R){_(R,{phase:"effect",name:"ErrorBoundary.resetKeys"}),S[E]=ga}return S},p=()=>{let v=s;if(!v||v.length===0)return;m();let S=null;d=z(()=>{let E=g(v);if(S===null){S=E;return}let R=E.length!==S.length;if(!R){for(let I=0;I<E.length;I++)if(!Object.is(E[I],S[I])){R=!0;break}}S=E,R&&l()})},f=v=>{let S=et(v);if(c(S),p(),i)try{i(S)}catch(E){_(E,{phase:"render",name:"ErrorBoundary onError callback"})}return S},b=(v,S)=>Ct({error:v,severity:"error",onRetry:S}),h=v=>{let S=o||b;try{return S(v,l)}catch(E){return queueMicrotask(()=>{_(E,{phase:"render",name:"ErrorBoundary fallback",node:y.parentNode?y:void 0})}),document.createComment("error-boundary-failed")}},y=k({class:"sibu-error-boundary",nodes:()=>{let v=a();if(v)return h(v);try{let S=t();if(S&&typeof S.then=="function"){let E=k({class:"sibu-error-async"});E.appendChild(M({class:"sibu-lazy-loading",nodes:"Loading..."}));let R=!1;return T(E,()=>{R=!0}),S.then(I=>{if(R){L(I);return}B(E,I)}).catch(I=>{if(R)return;let ye=f(I);B(E,h(ye))}),E}return S}catch(S){let E=f(S);return h(E)}}}),w=v=>{if(a())return;let E=v.detail?.error;E&&(v.preventDefault(),v.stopPropagation(),f(E))};return y.addEventListener("sibu:error-propagate",w),Je(()=>{let v=document.createTreeWalker(y,NodeFilter.SHOW_ELEMENT),S=[],E=v.currentNode;for(;E;){let R=Ke(E);R&&S.push(R),E=v.nextNode()}if(S.length===1)f(S[0]);else if(S.length>1){let R=globalThis.AggregateError;f(R?new R(S,`${S.length} pre-mount errors caught by ErrorBoundary`):new Error(S.map(I=>I.message).join("; ")))}},y),T(y,()=>{m(),y.removeEventListener("sibu:error-propagate",w)}),y}var ya=`
345
345
  @keyframes sibu-spin {
346
346
  to { transform: rotate(360deg); }
347
347
  }
@@ -394,5 +394,5 @@
394
394
  .sibu-loading-lg .sibu-loading-spinner { width: 40px; height: 40px; border-width: 4px; }
395
395
  .sibu-loading-lg .sibu-loading-dot { width: 12px; height: 12px; }
396
396
  .sibu-loading-lg .sibu-loading-dots { gap: 6px; }
397
- `,Un=!1;function va(){!Un&&typeof document<"u"&&(document.head.appendChild(se({nodes:ya})),Un=!0)}function xa(e={}){va();let{text:n,variant:t="spinner",size:r="md"}=e,o=r!=="md"?` sibu-loading-${r}`:"";return t==="dots"?k({class:`sibu-loading${o}`,role:"status","aria-live":"polite","aria-label":n?void 0:"Loading",nodes:[k({class:"sibu-loading-dots",nodes:[M({class:"sibu-loading-dot"}),M({class:"sibu-loading-dot"}),M({class:"sibu-loading-dot"})]}),n?M({class:"sibu-loading-text",nodes:n}):null].filter(Boolean)}):k({class:`sibu-loading${o}`,role:"status","aria-live":"polite","aria-label":n?void 0:"Loading",nodes:[k({class:"sibu-loading-spinner"}),n?M({class:"sibu-loading-text",nodes:n}):null].filter(Boolean)})}var Ct=Symbol.for("sibujs.actions.v1"),Jn=globalThis[Ct]??(globalThis[Ct]=new Map);function xe(e,n){Jn.set(e,n)}function Gn(e){return Jn.get(e)}function Sa(e,n,t){let r=typeof n=="string"?Gn(n):n;if(!r)throw new Error(`[SibuJS] No action registered under the name "${n}". Register it with registerAction() before applying it by name.`);let o=r(e,t);typeof o=="function"&&T(e,o)}var Yn=(e,n)=>{let t=r=>{e.contains(r.target)||n()};return document.addEventListener("pointerdown",t,!0),()=>document.removeEventListener("pointerdown",t,!0)},Zn=(e,n)=>{let t=n.duration??500,r=null,o=()=>{r=setTimeout(()=>{n.callback(),r=null},t)},i=()=>{r!==null&&(clearTimeout(r),r=null)};return e.addEventListener("pointerdown",o),e.addEventListener("pointerup",i),e.addEventListener("pointerleave",i),()=>{i(),e.removeEventListener("pointerdown",o),e.removeEventListener("pointerup",i),e.removeEventListener("pointerleave",i)}},Xn=(e,n)=>{let t=()=>{let r=typeof n=="function"?n():e.textContent??"";navigator.clipboard.writeText(r)};return e.addEventListener("click",t),()=>e.removeEventListener("click",t)},Qn=e=>{let n=()=>{e.style.overflow="hidden",e.style.height="auto",e.style.height=`${e.scrollHeight}px`};return n(),e.addEventListener("input",n),()=>e.removeEventListener("input",n)},er=e=>{let n='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])',t=r=>{if(r.key!=="Tab")return;let o=Array.from(e.querySelectorAll(n));if(o.length===0)return;let i=o[0],s=o[o.length-1];r.shiftKey&&document.activeElement===i?(r.preventDefault(),s.focus()):!r.shiftKey&&document.activeElement===s&&(r.preventDefault(),i.focus())};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)};xe("clickOutside",Yn);xe("longPress",Zn);xe("copyOnClick",Xn);xe("autoResize",Qn);xe("trapFocus",er);var de=null;function Ta(e,n){try{let t=e();return t&&typeof t.then=="function"&&t.catch(r=>{n?n(r,"async"):de?de(r,"async"):console.error("Unhandled async error in Sibu.catchError:",r)}),t}catch(t){return n?n(t,"sync"):de?de(t,"sync"):console.error("Unhandled error in Sibu.catchError:",t),null}}async function Ea(e,n){try{return await e()}catch(t){return n?n(t,"async"):de?de(t,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",t),null}}function wa(e){de=e}function ka(e){let[n,t]=C(e),r=i=>{!!1||!j()||(`${i}`,void 0)};return{provide(i){r("provide");let s=n();return t(i),()=>t(s)},use(){return n},get(){return n()},set(i){r("set"),t(i)},withContext(i,s){r("withContext");let a=n();t(i);try{let c=s();return!1,c}finally{t(a)}}}}var Nt=Symbol.for("sibujs.createId.v1"),Lt=globalThis[Nt]??(globalThis[Nt]={n:0});function _a(e="sibu"){return Lt.n++,`${e}-${Lt.n}`}function Aa(){Lt.n=0}function Ca(e,n){let t=typeof n=="function"?n():n;return T(t,D(()=>{t.style.display=e()?"":"none"})),t}function tr(e,n,t,r,o){let i=typeof t=="function"?t():t;if(i==null||typeof i=="boolean")return{node:null,owned:!1};let s=i instanceof Node?i:document.createTextNode(String(i)),a=s===t,c=r.has(s),l=!a&&!c;return r.add(s),c&&void 0,e.insertBefore(s,n.nextSibling),{node:s,owned:l}}function Na(e,n,t){let r=document.createComment("when"),o=null,i,s=!1,a=new WeakSet,c=!1,l=()=>{let d=e(),p=r.parentNode;if(!p||s&&d===i)return;i=d;let g=o?ke([o]):null;o?.parentNode&&(c&&L(o),o.parentNode.removeChild(o),o=null);let m=tr(p,r,d?n:t!==void 0?t:null,a,"when");o=m.node,c=m.owned,he(g,o?[o]:[],"when"),s=!0};return T(r,D(l)),s||queueMicrotask(()=>{!s&&r.parentNode&&l()}),r}function La(e,n,t){let r=document.createComment("match"),o=null,i,s=!1,a=new WeakSet,c=!1,l=()=>{let d=String(e()),p=r.parentNode;if(!p||s&&d===i)return;i=d;let g=o?ke([o]):null;o?.parentNode&&(c&&L(o),o.parentNode.removeChild(o),o=null);let f=Object.hasOwn(n,d)?n[d]:t,m=tr(p,r,f??null,a,"match");o=m.node,c=m.owned,he(g,o?[o]:[],"match"),s=!0};return T(r,D(l)),s||queueMicrotask(()=>{!s&&r.parentNode&&l()}),r}var Rt=new Map;function Ra(e,n){Rt.set(e,n)}function Ma(e){Rt.delete(e)}function nr(e){let n=Rt.get(e);return n?n():k({nodes:`[Component "${e}" not found]`})}function Ha(e){let n=k({class:"sibu-dynamic"});function t(){let o=e(),i;typeof o=="function"?i=o():i=nr(o),B(n,i)}let r=D(t);return T(n,r),n}function rr(e){return typeof e=="function"?rr(e()):e instanceof Node?e:document.createTextNode(String(e))}function $a(e,n){if(n===0)return[];let t=[],r=new Array(n);for(let a=0;a<n;a++){let c=e[a],l=0,d=t.length;for(;l<d;){let p=l+d>>1;e[t[p]]<c?l=p+1:d=p}t[l]=a,r[a]=l>0?t[l-1]:-1}let o=t.length,i=new Array(o),s=t[o-1];for(let a=o-1;a>=0;a--)i[a]=s,s=r[s];return i}function Da(e,n,t){t&&t.key;let r=document.createComment("each:anchor"),o=document.createComment("each:end"),i=[],s=[],a=i,c=0,l=new Map,d=new Map,p=[],g=[],f=[],m=0,b=[],h=[],y=new Uint8Array(0),w=new Map,v=[],S=[],E=new Map,R=!1,I=!1,fe=!1,gr=t.key,Ot=()=>{if(fe)return;let K=e(),A=K.length,ne=r.parentNode;if(!ne)return;I||(ne.insertBefore(o,r.nextSibling),I=!0),h.length<A&&(h=new Array(A));for(let x=0;x<A;x++)h[x]=gr(K[x]);let X=h;b.length<A&&(b=new Array(A)),d.clear(),E.clear();for(let x=0;x<A;x++)!1,E.set(X[x],x);m=0;for(let x=0;x<A;x++){let O=X[x],Bt=l.get(O),Se;if(Bt!==void 0)Se=Bt,p[m]=Se,g[m]=K[x],f[m]=x,m++;else{let[Ft,vr]=C(K[x]),[zt,xr]=C(x),Je;try{Je=rr(n(Ft,zt))}catch(Sr){let Tr=X[x];Je=document.createComment(`each:error:${x}`),queueMicrotask(()=>{_(Sr,{phase:"render",name:`each row (key="${String(Tr)}")`,node:r.parentNode?r:void 0})})}Se={node:Je,item:Ft,setItem:vr,index:zt,setIndex:xr}}d.set(O,Se),b[x]=Se.node}for(let[x,O]of l)d.has(x)||(L(O.node),O.node.parentNode&&ne.removeChild(O.node));if(A===0){c=0;let x=l;l=d,d=x,R=!0,m=0;return}w.clear();for(let x=0;x<c;x++)w.set(a[x],x);v.length<A&&(v=new Array(A),S=new Array(A));let Re=0;for(let x=0;x<A;x++){let O=w.get(X[x]);O!==void 0&&(v[Re]=x,S[Re]=O,Re++)}let Pt=$a(S,Re);y.length<A?y=new Uint8Array(A):y.fill(0,0,A);for(let x=0;x<Pt.length;x++)y[v[Pt[x]]]=1;let Me=o;for(let x=A-1;x>=0;x--){let O=b[x];y[x]||O.nextSibling!==Me&&ne.insertBefore(O,Me),Me=O}let He=a===i?s:i;He.length<A&&(He.length=A);for(let x=0;x<A;x++)He[x]=X[x];a=He,c=A;let yr=l;l=d,d=yr,R=!0,br()};function br(){if(m===0)return;let K=m;m=0,P(()=>{for(let A=0;A<K;A++){let ne=p[A];ne.setItem(g[A]),ne.setIndex(f[A]),p[A]=void 0,g[A]=void 0}})}let hr=D(Ot);return T(r,()=>{if(!fe){fe=!0,hr();for(let K of l.values())L(K.node),K.node.parentNode?.removeChild(K.node);o.parentNode&&o.parentNode.removeChild(o),I=!1,l.clear(),d.clear(),E.clear(),w.clear(),c=0,p.length=0,g.length=0,f.length=0,m=0}}),R||queueMicrotask(()=>{!R&&!fe&&r.parentNode&&Ot()}),r}function Ia(e){let n=document.createDocumentFragment();for(let t of e)if(!(t==null||typeof t=="boolean"))if(Array.isArray(t))for(let r of t)r==null||typeof r=="boolean"||n.appendChild(or(r));else n.appendChild(or(t));return n}function or(e){if(e==null)return document.createTextNode("");if(e instanceof Node)return e;if(typeof e=="function"){let n=e();return n instanceof Node?n:document.createTextNode(String(n??""))}return document.createTextNode(String(e))}var Oa=new Set(["script","style"]),Pa=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ir=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),sr=new WeakMap;function Ba(e){let n=e.length-1,t=e[0];for(let f=0;f<n;f++)t+=`\0${f}\0${e[f+1]}`;let r=0,o=t.length;function i(){for(;r<o&&(t[r]===" "||t[r]===" "||t[r]===`
398
- `||t[r]==="\r");)r++}function s(){if(t.charCodeAt(r)!==0)return-1;let f=r;r++;let m=0;for(;r<o&&t.charCodeAt(r)!==0;)m=m*10+(t.charCodeAt(r)-48),r++;return r<o&&r++,m<0||m>=n?(r=f,-1):m}function a(){let f=r;for(;r<o;){let m=t.charCodeAt(r);if(m>=97&&m<=122||m>=65&&m<=90||m>=48&&m<=57||m===45)r++;else break}return t.slice(f,r)}function c(){if(i(),t[r]!=="=")return{kind:"bool"};r++,i();let f=s();if(f>=0)return{kind:"expr",idx:f};let m=t[r];if(m==='"'||m==="'"){r++;let b=[],h=[],y="";for(;r<o&&t[r]!==m;){let w=s();w>=0?(b.push(y),y="",h.push(w)):y+=t[r++]}return r<o&&r++,b.push(y),h.length===0?{kind:"static",value:b[0]}:{kind:"mixed",statics:b,exprs:h}}{let b=[],h=[],y="";for(;r<o;){let w=t.charCodeAt(r);if(w===32||w===9||w===10||w===13||w===62)break;let v=s();v>=0?(b.push(y),y="",h.push(v)):y+=t[r++]}return b.push(y),h.length===0?{kind:"static",value:b[0]}:{kind:"mixed",statics:b,exprs:h}}}function l(){let f=[];for(;r<o&&(i(),!(t[r]===">"||t[r]==="/"));){let m=r;for(;r<o;){let y=t.charCodeAt(r);if(y>=97&&y<=122||y>=65&&y<=90||y>=48&&y<=57||y===45||y===58||y===95||y===46)r++;else break}let b=t.slice(m,r);if(!b)break;let h=c();b.startsWith("on:")?h.kind==="expr"&&f.push({t:3,name:b.slice(3),idx:h.idx}):h.kind==="bool"?f.push({t:4,name:b}):h.kind==="static"?f.push({t:0,name:b,value:h.value}):h.kind==="expr"?f.push({t:1,name:b,idx:h.idx}):h.kind==="mixed"&&f.push({t:2,name:b,statics:h.statics,exprs:h.exprs})}return f}function d(f){return f.replace(/\s+/g," ")}function p(f){let m="";for(;r<o&&t[r]!=="<";){let h=s();if(h>=0){let y=d(m);y&&f.push({t:1,value:y}),m="",f.push({t:2,idx:h})}else m+=t[r++]}let b=d(m);b&&f.push({t:1,value:b})}function g(){let f=[];for(;r<o&&!(t[r]==="<"&&r+1<o&&t[r+1]==="/");)if(t[r]==="<"){let m=t[r+1];if(m==="!"){if(t.startsWith("<!--",r)){let v=t.indexOf("-->",r+4);r=v===-1?o:v+3}else if(t.startsWith("<![CDATA[",r)){let v=t.indexOf("]]>",r+9);r=v===-1?o:v+3}else{let v=t.indexOf(">",r);r=v===-1?o:v+1}continue}if(m==="?"){let v=t.indexOf(">",r);r=v===-1?o:v+1;continue}if(!(m>="a"&&m<="z")&&!(m>="A"&&m<="Z")){f.push({t:1,value:"<"}),r++;continue}r++;let b=a(),h=l();i();let y=Pa.has(b),w=t[r]==="/";if(w&&r++,r<o&&r++,y||w)f.push({t:0,el:{tag:b,svg:ir.has(b),attrs:h,children:[]}});else{let v=g();if(Oa.has(b.toLowerCase())){for(let S=0;S<v.length;S++)if(v[S].t===2)throw new Error(`html: dynamic \${...} expressions are not allowed inside <${b}> (raw-text context). Build the content separately and append it as a Node.`)}t[r]==="<"&&r+1<o&&t[r+1]==="/"&&(r+=2,a(),i(),r<o&&t[r]===">"&&r++),f.push({t:0,el:{tag:b,svg:ir.has(b),attrs:h,children:v}})}}else p(f);return f}return g()}function Mt(e,n){let t=e.svg?document.createElementNS(N,e.tag):document.createElement(e.tag);for(let r=0;r<e.attrs.length;r++){let o=e.attrs[r];switch(o.t){case 0:t.setAttribute(o.name,o.value);break;case 1:{let i=o.name,s=n[o.idx];typeof s=="function"?T(t,Ve(t,i,s)):V(t,i,s,{syncValueProperty:!1,label:"html"});break}case 2:{let i=o.statics[0];for(let s=0;s<o.exprs.length;s++){let a=n[o.exprs[s]];i+=(a==null?"":String(a))+o.statics[s+1]}V(t,o.name,i,{syncValueProperty:!1,label:"html"});break}case 3:{let i=n[o.idx];typeof i=="function"?t.addEventListener(o.name,i):!1;break}case 4:t.setAttribute(o.name,"");break}}for(let r=0;r<e.children.length;r++){let o=e.children[r];switch(o.t){case 0:t.appendChild(Mt(o.el,n));break;case 1:t.appendChild(document.createTextNode(o.value));break;case 2:{let i=n[o.idx];if(typeof i=="function"){let s=document.createComment("");t.appendChild(s),T(t,ie(s,i))}else if(i instanceof Node)t.appendChild(i);else if(Array.isArray(i))for(let s=0;s<i.length;s++){let a=i[s];a instanceof Node?t.appendChild(a):a!=null&&typeof a!="boolean"&&t.appendChild(document.createTextNode(String(a)))}else i!=null&&typeof i!="boolean"&&t.appendChild(document.createTextNode(String(i)));break}}}return t}function ar(e,...n){let t=sr.get(e);if(t||(t=Ba(e),sr.set(e,t)),t.length===1&&t[0].t===0)return Mt(t[0].el,n);let r=document.createElement("div");for(let o=0;o<t.length;o++){let i=t[o];switch(i.t){case 0:r.appendChild(Mt(i.el,n));break;case 1:r.appendChild(document.createTextNode(i.value));break;case 2:{let s=n[i.idx];if(s instanceof Node)r.appendChild(s);else if(typeof s=="function"){let a=document.createComment("bind:htm");r.appendChild(a),T(r,ie(a,s))}else if(Array.isArray(s))for(let a=0;a<s.length;a++){let c=s[a];c instanceof Node?r.appendChild(c):c!=null&&typeof c!="boolean"&&r.appendChild(document.createTextNode(String(c)))}else s!=null&&typeof s!="boolean"&&r.appendChild(document.createTextNode(String(s)));break}}}return r.childNodes.length===1&&r.firstChild instanceof Element?r.firstChild:r}function Fa(e,n,t){let r=document.createComment("keep-alive"),o=new Map,i=[],s=t?.max??10;s===0&&U()&&void 0;let a,c=null,l=!1,d=!1,p=()=>{if(d)return;let f=e(),m=r.parentNode;if(!m||l&&f===a)return;c?.parentNode&&m.removeChild(c),a=f;let b=o.get(f);if(b){let h=i.indexOf(f);h!==-1&&(i.splice(h,1),i.push(f))}else{let h=n[f];if(!h){c=null,l=!0;return}if(b=h(),b instanceof DocumentFragment){let y=document.createElement("div");y.style.display="contents",y.appendChild(b),b=y}if(o.set(f,b),i.push(f),s>0&&i.length>s){let y=i.shift(),w=o.get(y);w&&(L(w),w.parentNode&&w.parentNode.removeChild(w),o.delete(y))}}m.insertBefore(b,r.nextSibling),c=b,l=!0},g=D(p);return l||queueMicrotask(()=>{!l&&r.parentNode&&p()}),T(r,()=>{d=!0,g();for(let f of o.values())L(f),f.parentNode&&f.parentNode.removeChild(f);o.clear(),i.length=0,c=null}),r}function za(e,n){if(!n)throw new Error("[SibuJS mount] container element not found. Make sure the DOM element exists before calling mount().");typeof e=="function"||e instanceof Node;let t=typeof performance<"u"?performance.now():0,r=typeof e=="function"?e():e,o=typeof performance<"u"?performance.now()-t:0;n.appendChild(r);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("app:init",{rootElement:r,container:n,duration:o}),{node:r,unmount(){i&&i.emit("app:unmount",{rootElement:r}),L(r),r.parentNode&&r.parentNode.removeChild(r)}}}function Va(e,n){let t=document.createComment("portal"),r=n||document.body,o=null,i=!1;return queueMicrotask(()=>{if(!i)try{o=e(),r.appendChild(o)}catch(s){queueMicrotask(()=>{_(s,{phase:"render",name:"Portal",node:t.parentNode?t:void 0})})}}),T(t,()=>{i=!0,o&&(L(o),o.remove(),o=null)}),t}function qa(e,n="default"){return e?.[n]}function Wa(e=[]){let[n,t]=C([...e]);return[n,{push(...o){t(i=>[...i,...o])},pop(){let o;return t(i=>{let s=[...i];return o=s.pop(),s}),o},shift(){let o;return t(i=>{let s=[...i];return o=s.shift(),s}),o},unshift(...o){t(i=>[...o,...i])},splice(o,i=0,...s){let a=[];return t(c=>{let l=[...c];return a=l.splice(o,i,...s),l}),a},remove(o){t(i=>i.filter((s,a)=>a!==o))},removeWhere(o){t(i=>{let s=i.findIndex(o);return s===-1?i:i.filter((a,c)=>c!==s)})},set(o){t([...o])},update(o,i){t(s=>s.map((a,c)=>c===o?i:a))},updateWhere(o,i){t(s=>s.map(a=>o(a)?i(a):a))},sort(o){t(i=>[...i].sort(o))},reverse(){t(o=>[...o].reverse())},filter(o){t(i=>i.filter(o))},map(o){t(i=>i.map(o))},clear(){t([])}}]}function ja(e=[]){let n=[...e],t=null,r={__v:0};function o(){t=null,r.__v++,le(r)||be(r)}function i(){if(ge(r),t===null){let a=n.slice();t=Object.freeze(a)}return t}return[i,{push(...a){a.length!==0&&(n.push(...a),o())},pop(){if(n.length===0)return;let a=n.pop();return o(),a},shift(){if(n.length===0)return;let a=n.shift();return o(),a},unshift(...a){a.length!==0&&(n.unshift(...a),o())},splice(a,c=0,...l){let d=n.splice(a,c,...l);return(d.length>0||l.length>0)&&o(),d},remove(a){a<0||a>=n.length||(n.splice(a,1),o())},removeWhere(a){let c=n.findIndex(a);c!==-1&&(n.splice(c,1),o())},set(a){n=[...a],o()},update(a,c){a<0||a>=n.length||Object.is(n[a],c)||(n[a]=c,o())},updateWhere(a,c){let l=!1;for(let d=0;d<n.length;d++)if(a(n[d])){let p=c(n[d]);Object.is(n[d],p)||(n[d]=p,l=!0)}l&&o()},sort(a){n.length<=1||(n.sort(a),o())},reverse(){n.length<=1||(n.reverse(),o())},filter(a){let c=n.filter(a);c.length!==n.length&&(n=c,o())},map(a){let c=!1;for(let l=0;l<n.length;l++){let d=a(n[l],l);Object.is(n[l],d)||(n[l]=d,c=!0)}c&&o()},clear(){n.length!==0&&(n=[],o())}}]}function Ka(e,n){let[t,r]=C(n),[o,i]=C(!1),[s,a]=C(null),[c,l]=C(0),d=0,p=!1,g=null,f=()=>{if(g===null)return;let b=g;g=null;try{b.abort()}catch{}},m=z(()=>{if(c(),p)return;f();let b=++d,h=typeof AbortController<"u"?new AbortController:null;g=h,P(()=>{i(!0),a(null)});let y=()=>p||b!==d,w;try{w=e({signal:h?h.signal:void 0})}catch(v){if(y())return;P(()=>{a(v),i(!1)});return}w.then(v=>{y()||(g=null,P(()=>{r(v),i(!1)}))},v=>{y()||(g=null,P(()=>{a(v),i(!1)}))})});return{value:t,loading:o,error:s,refresh:()=>{p||l(b=>b+1)},dispose:()=>{p||(p=!0,m(),f())}}}function Ne(e,n,t){if(Object.is(e,n))return!0;if(e==null||n==null||typeof e!=typeof n||typeof e!="object")return!1;let r=e,o=n;if(r.constructor!==o.constructor)return!1;if(e instanceof Date)return e.getTime()===n.getTime();if(e instanceof RegExp){let c=n;return e.source===c.source&&e.flags===c.flags}t||(t=new Map);let i=t.get(r);if(i?.has(o))return!0;if(i||(i=new Set,t.set(r,i)),i.add(o),e instanceof Map){let c=n;if(e.size!==c.size)return!1;for(let[l,d]of e)if(!c.has(l)||!Ne(d,c.get(l),t))return!1;return!0}if(e instanceof Set){let c=n;if(e.size!==c.size)return!1;for(let l of e)if(!c.has(l))return!1;return!0}if(e instanceof ArrayBuffer){let c=new Uint8Array(e),l=new Uint8Array(n);if(c.length!==l.length)return!1;for(let d=0;d<c.length;d++)if(c[d]!==l[d])return!1;return!0}if(e instanceof DataView){if(!(n instanceof DataView)||e.byteLength!==n.byteLength)return!1;for(let c=0;c<e.byteLength;c++)if(e.getUint8(c)!==n.getUint8(c))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){let c=e,l=n;if(c.length!==l.length)return!1;for(let d=0;d<c.length;d++)if(c[d]!==l[d])return!1;return!0}if(Array.isArray(e))return!Array.isArray(n)||e.length!==n.length?!1:e.every((c,l)=>Ne(c,n[l],t));let s=Object.keys(r),a=Object.keys(o);return s.length!==a.length?!1:s.every(c=>Object.hasOwn(o,c)&&Ne(r[c],o[c],t))}function Ua(e){return C(e,{equals:(n,t)=>Ne(n,t)})}function Ht(e,n){let t=n?.name,r=n?.equals,o={};o._d=!1,o._init=!1,o._g=e,o.__v=0;let i=()=>{o._d||(o._d=!0)};i._c=1,i._sig=o;let s=()=>{let p=e();o._v=r&&o._init&&r(o._v,p)?o._v:p,o._d=!1,o._init=!0};D(()=>{let p=!0;try{o._v=e(),o._d=!1,o._init=!0,p=!1}finally{p&&(o._d=!0)}},i);let a=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__,c=!1,l=()=>{if(!o._d)return;let p=o._v;c=!0;try{te(s,i),Object.is(p,o._v)||o.__v++}finally{c=!1}a&&!Object.is(p,o._v)&&a.emit("computed:update",{signal:o,oldValue:p,newValue:o._v})};o._validate=l;function d(){if(c)throw new Error(`[SibuJS] Circular dependency detected in derived${t?` "${t}"`:""}. A derived signal cannot read itself (directly or through a chain).`);return yn()?(o._d&&l(),o._v):(o._d&&l(),ge(o),o._v)}return t&&(d.__name=t,o.__name=t),d.__signal=o,a&&a.emit("computed:create",{signal:o,name:t,getter:d}),d}function Ja(e){let[n,t]=C(e);return{get current(){return n()},set current(r){t(r)}}}function Ga(e){e!==null&&typeof e=="object"&&Array.isArray(e);let n={};Object.keys(e).forEach(c=>{let[l,d]=C(e[c]);n[c]=[l,d]});let t=new Proxy({},{get(c,l){if(typeof l=="string"&&Object.hasOwn(n,l)){let d=n[l][0];return d()}return Reflect.get(c,l)},set(){throw new Error("[SibuJS store] Direct mutation is not allowed. Use actions.setState() to update store properties.")}}),r=()=>{let c={};return Object.keys(n).forEach(l=>{c[l]=n[l][0]()}),c};return[t,{setState:c=>{let l=r(),d=typeof c=="function"?c(l):c;P(()=>{Object.entries(d).forEach(([p,g])=>{Object.hasOwn(n,p)&&n[p][1](g)})})},reset:()=>{P(()=>{Object.keys(e).forEach(c=>{let l=n[c][1];l(e[c])})})},subscribe:c=>{let l=!0;return z(()=>{let d=r();if(l){l=!1;return}Te();try{c(d)}finally{Ee()}})},subscribeKey:(c,l)=>{let d,p=!0;return z(()=>{let g=n[c][0]();if(p){d=g,p=!1;return}if(!Object.is(g,d)){let f=d;d=g,Te();try{l(g,f)}finally{Ee()}}})},getSnapshot:r}]}function Ya(e,n){if(j())return()=>{};let t,r=!0;return D(()=>{let s=e();if(r){t=s,r=!1;return}if(!Object.is(s,t)){let a=t;t=s,Te();try{n(s,a)}finally{Ee()}}})}function Za(e,n,t){return[Ht(e,t),i=>{P(()=>n(i))}]}function Xa(e){let n=e();return U()&&queueMicrotask(()=>{try{e()}catch(t){console.warn("[SibuJS strict] second run threw:",t)}}),n}function Qa(e){if(!U())return z(e);let n=z(e),t=null;return queueMicrotask(()=>{try{t=z(e)}catch(r){console.warn("[SibuJS strictEffect] second run threw:",r)}}),()=>{n(),t&&t()}}var $t="data-sibu-enhanced",Dt=new WeakMap;function cr(e,n){let t=0;for(;e.length>0;){let r=e.splice(0);for(let o=0;o<r.length;o++){if(t>=$e){let i=r.length-o+e.length;e.length=0,De(n,t,i);return}t++;try{r[o]()}catch(i){typeof console<"u"&&console.error(`[SibuJS ${n}] teardown error:`,i)}}}}var ur=["text","attr","class","show","on","cleanup"];function lr(e,n){if(n==null)return e;if(typeof n!="string")return n;let t=n.startsWith("@")?`[data-ref="${n.slice(1)}"]`:n;try{return e.querySelector(t)}catch{return null}}function Le(e,n){return j()?()=>{}:F(n,e)}function ec(e){if(e instanceof HTMLInputElement){if(e.type==="checkbox")return e.checked;if(e.type==="number"||e.type==="range")return e.value===""?null:Number(e.value)}return e instanceof HTMLSelectElement&&e.multiple?Array.from(e.selectedOptions,n=>n.value):e.value}function tc(e,n){if(e instanceof HTMLInputElement&&e.type==="checkbox"){e.checked=!!n;return}if(e instanceof HTMLSelectElement&&e.multiple){let r=Array.isArray(n)?n.map(String):[];for(let o of Array.from(e.options))o.selected=r.includes(o.value);return}let t=n==null?"":String(n);e.value!==t&&(e.value=t)}function nc(e,n,t,r){let o=`ctx.each[${r}]`;if(U())for(let i of Object.keys(t))ur.includes(i),`${o}${i}${ur.join(", ")}`;if(t.text!==void 0&&(t.text,`${o}`,e.text(n,t.text)),t.attr!==void 0)for(let i of Object.keys(t.attr)){let s=t.attr[i];`${o}${i}`,e.attr(n,i,s)}if(t.class!==void 0)for(let i of Object.keys(t.class)){let s=t.class[i];`${o}${i}`,e.classed(n,i,s)}if(t.show!==void 0&&(t.show,`${o}`,e.show(n,t.show)),t.on!==void 0)for(let i of Object.keys(t.on)){let s=t.on[i];`${o}${String(i)}`,e.on(n,i,s)}t.cleanup!==void 0&&(t.cleanup,`${o}`,e.cleanup(t.cleanup))}function Ke(e,n){let t=typeof e=="string"?typeof document<"u"?document.querySelector(e):null:e;if(!t)return typeof console<"u"&&console.warn(`[SibuJS enhance] no element matched ${JSON.stringify(e)} \u2014 nothing enhanced.`),()=>{};if(t.getAttribute($t)==="true")return U()&&typeof console<"u"&&console.warn("[SibuJS enhance] element is already enhanced; ignoring re-enhance.",t),()=>{};let r=[],o=Symbol("sibujs.enhance"),i=!1,s=!1,a=g=>s?!0:!1,c=(g,f,m)=>{if(a(g))return;let b=lr(t,f);if(!b){typeof console<"u"&&console.warn(`[SibuJS enhance] target ${JSON.stringify(f)} not found under`,t);return}m(b)},l={root:t,ref:g=>lr(t,g),refs:g=>{let f=g.startsWith("@")?`[data-ref="${g.slice(1)}"]`:g;try{return Array.from(t.querySelectorAll(f))}catch{return[]}},on:(g,f,m,b)=>{c("on",g,h=>{let y=w=>m(w,h);h.addEventListener(f,y,b),r.push(()=>h.removeEventListener(f,y,b))})},text:(g,f)=>{c("text",g,m=>{r.push(Le(m,()=>{let b=f(),h=b==null?"":String(b);m.textContent!==h&&(m.textContent=h)}))})},attr:(g,f,m)=>{c("attr",g,b=>{r.push(Le(b,()=>{let h=m(),y=h==null?null:String(h);V(b,f,y,{syncValueProperty:!1,label:"enhance attr()"})}))})},classed:(g,f,m)=>{c("classed",g,b=>{r.push(Le(b,()=>{b.classList.toggle(f,!!m())}))})},show:(g,f)=>{c("show",g,m=>{let b=m.hidden;r.push(Le(m,()=>{m.hidden=!f()})),r.push(()=>{m.hidden=b})})},model:(g,f,m)=>{c("model",g,b=>{let h=b,[y,w]=f,v=m?.event??(h instanceof HTMLSelectElement||h instanceof HTMLInputElement&&(h.type==="checkbox"||h.type==="radio")?"change":"input");r.push(Le(b,()=>{tc(h,y())}));let S=()=>w(ec(h));h.addEventListener(v,S),r.push(()=>h.removeEventListener(v,S))})},each:(g,f)=>{if(a("each"))return;let m=typeof g=="string"?l.refs(g):Array.from(g);for(let b=0;b<m.length;b++){let h=m[b],y=f(h,b);y!=null&&nc(l,h,y,b)}},cleanup:g=>{a("cleanup")||r.push(g)}},d;try{d=n(l);let g=d;if(g&&typeof g.then=="function")throw g.then(void 0,f=>{}),new Error("[SibuJS enhance] setup returned a promise")}catch(g){throw cr(r,"enhance"),s=!0,g}typeof d=="function"&&r.push(d);let p=()=>{i||(i=!0,Dt.get(t)===o&&(Dt.delete(t),t.removeAttribute($t)),Xe(t,p),cr(r,"enhance"),s=!0)};return T(t,p),Dt.set(t,o),t.setAttribute($t,"true"),p}function rc(e,n){if(typeof document>"u")return()=>{};let t=[];try{for(let r of Array.from(document.querySelectorAll(e)))t.push(Ke(r,n))}catch(r){for(let o=t.length-1;o>=0;o--)try{t[o]()}catch(i){typeof console<"u"&&console.error("[SibuJS enhanceAll] rollback error:",i)}throw t.length=0,r}return()=>{for(let r of t.splice(0))r()}}function dr(e,n){let t=globalThis;return t[e]??(t[e]=n())}var oc=/^[A-Za-z0-9_-]+$/,fr=Symbol.for("sibujs.islands.lazy"),Ue=dr(Symbol.for("sibujs.islands.registry.v1"),()=>new Map);function ic(e){return e[fr]=!0,e}function sc(e,n){if(!oc.test(e))throw new Error(`[SibuJS islands] name must match [A-Za-z0-9_-]+ (got: ${JSON.stringify(e.slice(0,32))})`);Ue.set(e,n)}function ac(e){Ue.delete(e)}async function cc(e){if(typeof e=="function"&&e[fr]){let n=await e(),t=n.default??n;return typeof t=="function"?t:null}return e}function uc(e=typeof document<"u"?document:null,n={}){if(!e||typeof e.querySelectorAll!="function")return()=>{};let t=[],r=[],o=!1;for(let i of Array.from(e.querySelectorAll("[data-sibu-island]"))){if(i.getAttribute("data-sibu-enhanced")==="true")continue;let s=i.getAttribute("data-sibu-island")??"";if(!Ue.has(s)){typeof console<"u"&&console.warn(`[SibuJS islands] no island registered for "${s}" \u2014 skipping. Call registerIsland("${s}", ...).`);continue}let a=!1,c=()=>{if(a||o)return;a=!0;let d=Ue.get(s);d&&cc(d).then(p=>{if(!o){if(!p){typeof console<"u"&&console.warn(`[SibuJS islands] "${s}" loader produced no setup.`);return}try{let g=Ke(i,p);if(o){g();return}r.push(g),i.setAttribute("data-sibu-hydrated","true")}catch(g){typeof console<"u"&&console.error(`[SibuJS islands] "${s}" failed to mount:`,g)}}}).catch(p=>{typeof console<"u"&&console.error(`[SibuJS islands] "${s}" failed to load:`,p)})},l=i.getAttribute("data-sibu-load")||"load";t.push(lc(l,i,c,n))}return()=>{o=!0;for(let i of t.splice(0))i();for(let i of r.splice(0))i()}}function lc(e,n,t,r){switch(e){case"idle":{if(typeof requestIdleCallback<"u"){let i=requestIdleCallback(t);return()=>cancelIdleCallback(i)}let o=setTimeout(t,1);return()=>clearTimeout(o)}case"visible":{if(typeof IntersectionObserver>"u")return queueMicrotask(t),()=>{};let o=new IntersectionObserver(i=>{for(let s of i)s.isIntersecting&&(o.disconnect(),t())},{rootMargin:r.rootMargin,threshold:r.threshold});return o.observe(n),()=>o.disconnect()}case"interaction":{let o=["pointerdown","focusin","keydown","touchstart"],i=()=>{s(),t()},s=()=>{for(let a of o)n.removeEventListener(a,i)};for(let a of o)n.addEventListener(a,i,{passive:!0});return s}case"media":{let o=n.getAttribute("data-sibu-media")||"(min-width: 0px)";if(typeof matchMedia>"u")return queueMicrotask(t),()=>{};let i=matchMedia(o);if(i.matches)return queueMicrotask(t),()=>{};let s=()=>{i.matches&&(i.removeEventListener("change",s),t())};return i.addEventListener("change",s),()=>i.removeEventListener("change",s)}default:return queueMicrotask(t),()=>{}}}function pr(e){return e}var nd=1024*1024;function dc(e){let[n,t]=C(e()),r=!1,o=!1,i=n(),s=()=>{r=!1,!o&&t(i)},a=()=>{r||(r=!0,queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(s):s()}))},c=D(()=>{i=e(),a()}),l=(()=>n());return l.dispose=()=>{o||(o=!0,c())},l}var mr=16;function fc(e){let n=globalThis;if(typeof n.requestIdleCallback=="function"){n.requestIdleCallback(e,{timeout:mr*4});return}if(typeof requestAnimationFrame=="function"){requestAnimationFrame(()=>e());return}setTimeout(e,mr)}function pc(){let[e,n]=C(!1);function t(r){n(!0),fc(()=>{let o;try{o=r()}catch{n(!1);return}o&&typeof o.then=="function"?o.then(()=>n(!1),()=>n(!1)):n(!1)})}return{pending:e,start:t}}function mc(){return new Promise(e=>{queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):e()})})}typeof globalThis<"u"&&(globalThis.Sibu={...It});})();
397
+ `,Un=!1;function va(){!Un&&typeof document<"u"&&(document.head.appendChild(fe({nodes:ya})),Un=!0)}function xa(e={}){va();let{text:n,variant:t="spinner",size:r="md"}=e,o=r!=="md"?` sibu-loading-${r}`:"";return t==="dots"?k({class:`sibu-loading${o}`,role:"status","aria-live":"polite","aria-label":n?void 0:"Loading",nodes:[k({class:"sibu-loading-dots",nodes:[M({class:"sibu-loading-dot"}),M({class:"sibu-loading-dot"}),M({class:"sibu-loading-dot"})]}),n?M({class:"sibu-loading-text",nodes:n}):null].filter(Boolean)}):k({class:`sibu-loading${o}`,role:"status","aria-live":"polite","aria-label":n?void 0:"Loading",nodes:[k({class:"sibu-loading-spinner"}),n?M({class:"sibu-loading-text",nodes:n}):null].filter(Boolean)})}var Nt=Symbol.for("sibujs.actions.v1"),Jn=globalThis[Nt]??(globalThis[Nt]=new Map);function ke(e,n){Jn.set(e,n)}function Gn(e){return Jn.get(e)}function Sa(e,n,t){let r=typeof n=="string"?Gn(n):n;if(!r)throw new Error(`[SibuJS] No action registered under the name "${n}". Register it with registerAction() before applying it by name.`);let o=r(e,t);typeof o=="function"&&T(e,o)}var Yn=(e,n)=>{let t=r=>{e.contains(r.target)||n()};return document.addEventListener("pointerdown",t,!0),()=>document.removeEventListener("pointerdown",t,!0)},Zn=(e,n)=>{let t=n.duration??500,r=null,o=()=>{r=setTimeout(()=>{n.callback(),r=null},t)},i=()=>{r!==null&&(clearTimeout(r),r=null)};return e.addEventListener("pointerdown",o),e.addEventListener("pointerup",i),e.addEventListener("pointerleave",i),()=>{i(),e.removeEventListener("pointerdown",o),e.removeEventListener("pointerup",i),e.removeEventListener("pointerleave",i)}},Xn=(e,n)=>{let t=()=>{let r=typeof n=="function"?n():e.textContent??"";navigator.clipboard.writeText(r)};return e.addEventListener("click",t),()=>e.removeEventListener("click",t)},Qn=e=>{let n=()=>{e.style.overflow="hidden",e.style.height="auto",e.style.height=`${e.scrollHeight}px`};return n(),e.addEventListener("input",n),()=>e.removeEventListener("input",n)},er=e=>{let n='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])',t=r=>{if(r.key!=="Tab")return;let o=Array.from(e.querySelectorAll(n));if(o.length===0)return;let i=o[0],s=o[o.length-1];r.shiftKey&&document.activeElement===i?(r.preventDefault(),s.focus()):!r.shiftKey&&document.activeElement===s&&(r.preventDefault(),i.focus())};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)};ke("clickOutside",Yn);ke("longPress",Zn);ke("copyOnClick",Xn);ke("autoResize",Qn);ke("trapFocus",er);var he=null;function Ta(e,n){try{let t=e();return t&&typeof t.then=="function"&&t.catch(r=>{n?n(r,"async"):he?he(r,"async"):console.error("Unhandled async error in Sibu.catchError:",r)}),t}catch(t){return n?n(t,"sync"):he?he(t,"sync"):console.error("Unhandled error in Sibu.catchError:",t),null}}async function Ea(e,n){try{return await e()}catch(t){return n?n(t,"async"):he?he(t,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",t),null}}function wa(e){he=e}function ka(e){let[n,t]=C(e),r=i=>{!!1||!j()||(`${i}`,void 0)};return{provide(i){r("provide");let s=n();return t(i),()=>t(s)},use(){return n},get(){return n()},set(i){r("set"),t(i)},withContext(i,s){r("withContext");let a=n();t(i);try{let c=s();return!1,c}finally{t(a)}}}}var Lt=Symbol.for("sibujs.createId.v1"),Rt=globalThis[Lt]??(globalThis[Lt]={n:0});function _a(e="sibu"){return Rt.n++,`${e}-${Rt.n}`}function Aa(){Rt.n=0}function Ca(e,n){let t=typeof n=="function"?n():n;return T(t,$(()=>{t.style.display=e()?"":"none"},t)),t}function tr(e,n,t,r,o){let i=typeof t=="function"?t():t;if(i==null||typeof i=="boolean")return{node:null,owned:!1};let s=i instanceof Node?i:document.createTextNode(String(i)),a=s===t,c=r.has(s),l=!a&&!c;return r.add(s),c&&void 0,e.insertBefore(s,n.nextSibling),{node:s,owned:l}}function Na(e,n,t){let r=document.createComment("when"),o=null,i,s=!1,a=new WeakSet,c=!1,l=()=>{let d=e(),m=r.parentNode;if(!m||s&&d===i)return;i=d;let g=o?Ne([o]):null;o?.parentNode&&(c&&L(o),o.parentNode.removeChild(o),o=null);let f=tr(m,r,d?n:t!==void 0?t:null,a,"when");o=f.node,c=f.owned,Te(g,o?[o]:[],"when"),s=!0};return T(r,$(l,r)),s||queueMicrotask(()=>{!s&&r.parentNode&&l()}),r}function La(e,n,t){let r=document.createComment("match"),o=null,i,s=!1,a=new WeakSet,c=!1,l=()=>{let d=String(e()),m=r.parentNode;if(!m||s&&d===i)return;i=d;let g=o?Ne([o]):null;o?.parentNode&&(c&&L(o),o.parentNode.removeChild(o),o=null);let p=Object.hasOwn(n,d)?n[d]:t,f=tr(m,r,p??null,a,"match");o=f.node,c=f.owned,Te(g,o?[o]:[],"match"),s=!0};return T(r,$(l,r)),s||queueMicrotask(()=>{!s&&r.parentNode&&l()}),r}var Mt=new Map;function Ra(e,n){Mt.set(e,n)}function Ma(e){Mt.delete(e)}function nr(e){let n=Mt.get(e);return n?n():k({nodes:`[Component "${e}" not found]`})}function Ha(e){let n=k({class:"sibu-dynamic"});function t(){let o=e(),i;typeof o=="function"?i=o():i=nr(o),B(n,i)}let r=F(t);return T(n,r),n}function rr(e){return typeof e=="function"?rr(e()):e instanceof Node?e:document.createTextNode(String(e))}function Da(e,n){if(n===0)return[];let t=[],r=new Array(n);for(let a=0;a<n;a++){let c=e[a],l=0,d=t.length;for(;l<d;){let m=l+d>>1;e[t[m]]<c?l=m+1:d=m}t[l]=a,r[a]=l>0?t[l-1]:-1}let o=t.length,i=new Array(o),s=t[o-1];for(let a=o-1;a>=0;a--)i[a]=s,s=r[s];return i}function $a(e,n,t){t&&t.key;let r=document.createComment("each:anchor"),o=document.createComment("each:end"),i=[],s=[],a=i,c=0,l=new Map,d=new Map,m=[],g=[],p=[],f=0,b=[],h=[],y=new Uint8Array(0),w=new Map,v=[],S=[],E=new Map,R=!1,I=!1,ye=!1,gr=t.key,Pt=()=>{if(ye)return;let K=e(),A=K.length,ie=r.parentNode;if(!ie)return;I||(ie.insertBefore(o,r.nextSibling),I=!0),h.length<A&&(h=new Array(A));for(let x=0;x<A;x++)h[x]=gr(K[x]);let te=h;b.length<A&&(b=new Array(A)),d.clear(),E.clear();for(let x=0;x<A;x++)!1,E.set(te[x],x);f=0;for(let x=0;x<A;x++){let O=te[x],Ft=l.get(O),_e;if(Ft!==void 0)_e=Ft,m[f]=_e,g[f]=K[x],p[f]=x,f++;else{let[zt,vr]=C(K[x]),[Vt,xr]=C(x),Ze;try{ce();try{Ze=rr(n(zt,Vt))}finally{ue()}}catch(Sr){let Tr=te[x];Ze=document.createComment(`each:error:${x}`),queueMicrotask(()=>{_(Sr,{phase:"render",name:`each row (key="${String(Tr)}")`,node:r.parentNode?r:void 0})})}_e={node:Ze,item:zt,setItem:vr,index:Vt,setIndex:xr}}d.set(O,_e),b[x]=_e.node}for(let[x,O]of l)d.has(x)||(L(O.node),O.node.parentNode&&ie.removeChild(O.node));if(A===0){c=0;let x=l;l=d,d=x,R=!0,f=0;return}w.clear();for(let x=0;x<c;x++)w.set(a[x],x);v.length<A&&(v=new Array(A),S=new Array(A));let $e=0;for(let x=0;x<A;x++){let O=w.get(te[x]);O!==void 0&&(v[$e]=x,S[$e]=O,$e++)}let Bt=Da(S,$e);y.length<A?y=new Uint8Array(A):y.fill(0,0,A);for(let x=0;x<Bt.length;x++)y[v[Bt[x]]]=1;let Ie=o;for(let x=A-1;x>=0;x--){let O=b[x];y[x]||O.nextSibling!==Ie&&ie.insertBefore(O,Ie),Ie=O}let Oe=a===i?s:i;Oe.length<A&&(Oe.length=A);for(let x=0;x<A;x++)Oe[x]=te[x];a=Oe,c=A;let yr=l;l=d,d=yr,R=!0,br()};function br(){if(f===0)return;let K=f;f=0,P(()=>{for(let A=0;A<K;A++){let ie=m[A];ie.setItem(g[A]),ie.setIndex(p[A]),m[A]=void 0,g[A]=void 0}})}let hr=F(Pt);return T(r,()=>{if(!ye){ye=!0,hr();for(let K of l.values())L(K.node),K.node.parentNode?.removeChild(K.node);o.parentNode&&o.parentNode.removeChild(o),I=!1,l.clear(),d.clear(),E.clear(),w.clear(),c=0,m.length=0,g.length=0,p.length=0,f=0}}),R||queueMicrotask(()=>{!R&&!ye&&r.parentNode&&Pt()}),r}function Ia(e){let n=document.createDocumentFragment();for(let t of e)if(!(t==null||typeof t=="boolean"))if(Array.isArray(t))for(let r of t)r==null||typeof r=="boolean"||n.appendChild(or(r));else n.appendChild(or(t));return n}function or(e){if(e==null)return document.createTextNode("");if(e instanceof Node)return e;if(typeof e=="function"){let n=e();return n instanceof Node?n:document.createTextNode(String(n??""))}return document.createTextNode(String(e))}var Oa=new Set(["script","style"]),Pa=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ir=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),sr=new WeakMap;function Ba(e){let n=e.length-1,t=e[0];for(let p=0;p<n;p++)t+=`\0${p}\0${e[p+1]}`;let r=0,o=t.length;function i(){for(;r<o&&(t[r]===" "||t[r]===" "||t[r]===`
398
+ `||t[r]==="\r");)r++}function s(){if(t.charCodeAt(r)!==0)return-1;let p=r;r++;let f=0;for(;r<o&&t.charCodeAt(r)!==0;)f=f*10+(t.charCodeAt(r)-48),r++;return r<o&&r++,f<0||f>=n?(r=p,-1):f}function a(){let p=r;for(;r<o;){let f=t.charCodeAt(r);if(f>=97&&f<=122||f>=65&&f<=90||f>=48&&f<=57||f===45)r++;else break}return t.slice(p,r)}function c(){if(i(),t[r]!=="=")return{kind:"bool"};r++,i();let p=s();if(p>=0)return{kind:"expr",idx:p};let f=t[r];if(f==='"'||f==="'"){r++;let b=[],h=[],y="";for(;r<o&&t[r]!==f;){let w=s();w>=0?(b.push(y),y="",h.push(w)):y+=t[r++]}return r<o&&r++,b.push(y),h.length===0?{kind:"static",value:b[0]}:{kind:"mixed",statics:b,exprs:h}}{let b=[],h=[],y="";for(;r<o;){let w=t.charCodeAt(r);if(w===32||w===9||w===10||w===13||w===62)break;let v=s();v>=0?(b.push(y),y="",h.push(v)):y+=t[r++]}return b.push(y),h.length===0?{kind:"static",value:b[0]}:{kind:"mixed",statics:b,exprs:h}}}function l(){let p=[];for(;r<o&&(i(),!(t[r]===">"||t[r]==="/"));){let f=r;for(;r<o;){let y=t.charCodeAt(r);if(y>=97&&y<=122||y>=65&&y<=90||y>=48&&y<=57||y===45||y===58||y===95||y===46)r++;else break}let b=t.slice(f,r);if(!b)break;let h=c();b.startsWith("on:")?h.kind==="expr"&&p.push({t:3,name:b.slice(3),idx:h.idx}):h.kind==="bool"?p.push({t:4,name:b}):h.kind==="static"?p.push({t:0,name:b,value:h.value}):h.kind==="expr"?p.push({t:1,name:b,idx:h.idx}):h.kind==="mixed"&&p.push({t:2,name:b,statics:h.statics,exprs:h.exprs})}return p}function d(p){return p.replace(/\s+/g," ")}function m(p){let f="";for(;r<o&&t[r]!=="<";){let h=s();if(h>=0){let y=d(f);y&&p.push({t:1,value:y}),f="",p.push({t:2,idx:h})}else f+=t[r++]}let b=d(f);b&&p.push({t:1,value:b})}function g(){let p=[];for(;r<o&&!(t[r]==="<"&&r+1<o&&t[r+1]==="/");)if(t[r]==="<"){let f=t[r+1];if(f==="!"){if(t.startsWith("<!--",r)){let v=t.indexOf("-->",r+4);r=v===-1?o:v+3}else if(t.startsWith("<![CDATA[",r)){let v=t.indexOf("]]>",r+9);r=v===-1?o:v+3}else{let v=t.indexOf(">",r);r=v===-1?o:v+1}continue}if(f==="?"){let v=t.indexOf(">",r);r=v===-1?o:v+1;continue}if(!(f>="a"&&f<="z")&&!(f>="A"&&f<="Z")){p.push({t:1,value:"<"}),r++;continue}r++;let b=a(),h=l();i();let y=Pa.has(b),w=t[r]==="/";if(w&&r++,r<o&&r++,y||w)p.push({t:0,el:{tag:b,svg:ir.has(b),attrs:h,children:[]}});else{let v=g();if(Oa.has(b.toLowerCase())){for(let S=0;S<v.length;S++)if(v[S].t===2)throw new Error(`html: dynamic \${...} expressions are not allowed inside <${b}> (raw-text context). Build the content separately and append it as a Node.`)}t[r]==="<"&&r+1<o&&t[r+1]==="/"&&(r+=2,a(),i(),r<o&&t[r]===">"&&r++),p.push({t:0,el:{tag:b,svg:ir.has(b),attrs:h,children:v}})}}else m(p);return p}return g()}function Ht(e,n){let t=e.svg?document.createElementNS(N,e.tag):document.createElement(e.tag);for(let r=0;r<e.attrs.length;r++){let o=e.attrs[r];switch(o.t){case 0:t.setAttribute(o.name,o.value);break;case 1:{let i=o.name,s=n[o.idx];typeof s=="function"?T(t,je(t,i,s)):V(t,i,s,{syncValueProperty:!1,label:"html"});break}case 2:{let i=o.statics[0];for(let s=0;s<o.exprs.length;s++){let a=n[o.exprs[s]];i+=(a==null?"":String(a))+o.statics[s+1]}V(t,o.name,i,{syncValueProperty:!1,label:"html"});break}case 3:{let i=n[o.idx];typeof i=="function"?t.addEventListener(o.name,i):!1;break}case 4:t.setAttribute(o.name,"");break}}for(let r=0;r<e.children.length;r++){let o=e.children[r];switch(o.t){case 0:t.appendChild(Ht(o.el,n));break;case 1:t.appendChild(document.createTextNode(o.value));break;case 2:{let i=n[o.idx];if(typeof i=="function"){let s=document.createComment("");t.appendChild(s),T(t,de(s,i))}else if(i instanceof Node)t.appendChild(i);else if(Array.isArray(i))for(let s=0;s<i.length;s++){let a=i[s];a instanceof Node?t.appendChild(a):a!=null&&typeof a!="boolean"&&t.appendChild(document.createTextNode(String(a)))}else i!=null&&typeof i!="boolean"&&t.appendChild(document.createTextNode(String(i)));break}}}return t}function ar(e,...n){let t=sr.get(e);if(t||(t=Ba(e),sr.set(e,t)),t.length===1&&t[0].t===0)return Ht(t[0].el,n);let r=document.createElement("div");for(let o=0;o<t.length;o++){let i=t[o];switch(i.t){case 0:r.appendChild(Ht(i.el,n));break;case 1:r.appendChild(document.createTextNode(i.value));break;case 2:{let s=n[i.idx];if(s instanceof Node)r.appendChild(s);else if(typeof s=="function"){let a=document.createComment("bind:htm");r.appendChild(a),T(r,de(a,s))}else if(Array.isArray(s))for(let a=0;a<s.length;a++){let c=s[a];c instanceof Node?r.appendChild(c):c!=null&&typeof c!="boolean"&&r.appendChild(document.createTextNode(String(c)))}else s!=null&&typeof s!="boolean"&&r.appendChild(document.createTextNode(String(s)));break}}}return r.childNodes.length===1&&r.firstChild instanceof Element?r.firstChild:r}function Fa(e,n,t){let r=document.createComment("keep-alive"),o=new Map,i=[],s=t?.max??10;s===0&&U()&&void 0;let a,c=null,l=!1,d=!1,m=()=>{if(d)return;let p=e(),f=r.parentNode;if(!f||l&&p===a)return;c?.parentNode&&f.removeChild(c),a=p;let b=o.get(p);if(b){let h=i.indexOf(p);h!==-1&&(i.splice(h,1),i.push(p))}else{let h=n[p];if(!h){c=null,l=!0;return}if(b=h(),b instanceof DocumentFragment){let y=document.createElement("div");y.style.display="contents",y.appendChild(b),b=y}if(o.set(p,b),i.push(p),s>0&&i.length>s){let y=i.shift(),w=o.get(y);w&&(L(w),w.parentNode&&w.parentNode.removeChild(w),o.delete(y))}}f.insertBefore(b,r.nextSibling),c=b,l=!0},g=F(m);return l||queueMicrotask(()=>{!l&&r.parentNode&&m()}),T(r,()=>{d=!0,g();for(let p of o.values())L(p),p.parentNode&&p.parentNode.removeChild(p);o.clear(),i.length=0,c=null}),r}function za(e,n){if(!n)throw new Error("[SibuJS mount] container element not found. Make sure the DOM element exists before calling mount().");typeof e=="function"||e instanceof Node;let t=typeof performance<"u"?performance.now():0,r=typeof e=="function"?e():e,o=typeof performance<"u"?performance.now()-t:0;n.appendChild(r);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("app:init",{rootElement:r,container:n,duration:o}),{node:r,unmount(){i&&i.emit("app:unmount",{rootElement:r}),L(r),r.parentNode&&r.parentNode.removeChild(r)}}}function Va(e,n){let t=document.createComment("portal"),r=n||document.body,o=null,i=!1;return queueMicrotask(()=>{if(!i)try{o=e(),r.appendChild(o)}catch(s){queueMicrotask(()=>{_(s,{phase:"render",name:"Portal",node:t.parentNode?t:void 0})})}}),T(t,()=>{i=!0,o&&(L(o),o.remove(),o=null)}),t}function qa(e,n="default"){return e?.[n]}function Wa(e=[]){let[n,t]=C([...e]);return[n,{push(...o){t(i=>[...i,...o])},pop(){let o;return t(i=>{let s=[...i];return o=s.pop(),s}),o},shift(){let o;return t(i=>{let s=[...i];return o=s.shift(),s}),o},unshift(...o){t(i=>[...o,...i])},splice(o,i=0,...s){let a=[];return t(c=>{let l=[...c];return a=l.splice(o,i,...s),l}),a},remove(o){t(i=>i.filter((s,a)=>a!==o))},removeWhere(o){t(i=>{let s=i.findIndex(o);return s===-1?i:i.filter((a,c)=>c!==s)})},set(o){t([...o])},update(o,i){t(s=>s.map((a,c)=>c===o?i:a))},updateWhere(o,i){t(s=>s.map(a=>o(a)?i(a):a))},sort(o){t(i=>[...i].sort(o))},reverse(){t(o=>[...o].reverse())},filter(o){t(i=>i.filter(o))},map(o){t(i=>i.map(o))},clear(){t([])}}]}function ja(e=[]){let n=[...e],t=null,r={__v:0};function o(){t=null,r.__v++,be(r)||Se(r)}function i(){if(le(r),t===null){let a=n.slice();t=Object.freeze(a)}return t}return[i,{push(...a){a.length!==0&&(n.push(...a),o())},pop(){if(n.length===0)return;let a=n.pop();return o(),a},shift(){if(n.length===0)return;let a=n.shift();return o(),a},unshift(...a){a.length!==0&&(n.unshift(...a),o())},splice(a,c=0,...l){let d=n.splice(a,c,...l);return(d.length>0||l.length>0)&&o(),d},remove(a){a<0||a>=n.length||(n.splice(a,1),o())},removeWhere(a){let c=n.findIndex(a);c!==-1&&(n.splice(c,1),o())},set(a){n=[...a],o()},update(a,c){a<0||a>=n.length||Object.is(n[a],c)||(n[a]=c,o())},updateWhere(a,c){let l=!1;for(let d=0;d<n.length;d++)if(a(n[d])){let m=c(n[d]);Object.is(n[d],m)||(n[d]=m,l=!0)}l&&o()},sort(a){n.length<=1||(n.sort(a),o())},reverse(){n.length<=1||(n.reverse(),o())},filter(a){let c=n.filter(a);c.length!==n.length&&(n=c,o())},map(a){let c=!1;for(let l=0;l<n.length;l++){let d=a(n[l],l);Object.is(n[l],d)||(n[l]=d,c=!0)}c&&o()},clear(){n.length!==0&&(n=[],o())}}]}function Ka(e,n){let[t,r]=C(n),[o,i]=C(!1),[s,a]=C(null),[c,l]=C(0),d=0,m=!1,g=null,p=()=>{if(g===null)return;let b=g;g=null;try{b.abort()}catch{}},f=z(()=>{if(c(),m)return;p();let b=++d,h=typeof AbortController<"u"?new AbortController:null;g=h,P(()=>{i(!0),a(null)});let y=()=>m||b!==d,w;try{w=e({signal:h?h.signal:void 0})}catch(v){if(y())return;P(()=>{a(v),i(!1)});return}w.then(v=>{y()||(g=null,P(()=>{r(v),i(!1)}))},v=>{y()||(g=null,P(()=>{a(v),i(!1)}))})});return{value:t,loading:o,error:s,refresh:()=>{m||l(b=>b+1)},dispose:()=>{m||(m=!0,f(),p())}}}function He(e,n,t){if(Object.is(e,n))return!0;if(e==null||n==null||typeof e!=typeof n||typeof e!="object")return!1;let r=e,o=n;if(r.constructor!==o.constructor)return!1;if(e instanceof Date)return e.getTime()===n.getTime();if(e instanceof RegExp){let c=n;return e.source===c.source&&e.flags===c.flags}t||(t=new Map);let i=t.get(r);if(i?.has(o))return!0;if(i||(i=new Set,t.set(r,i)),i.add(o),e instanceof Map){let c=n;if(e.size!==c.size)return!1;for(let[l,d]of e)if(!c.has(l)||!He(d,c.get(l),t))return!1;return!0}if(e instanceof Set){let c=n;if(e.size!==c.size)return!1;for(let l of e)if(!c.has(l))return!1;return!0}if(e instanceof ArrayBuffer){let c=new Uint8Array(e),l=new Uint8Array(n);if(c.length!==l.length)return!1;for(let d=0;d<c.length;d++)if(c[d]!==l[d])return!1;return!0}if(e instanceof DataView){if(!(n instanceof DataView)||e.byteLength!==n.byteLength)return!1;for(let c=0;c<e.byteLength;c++)if(e.getUint8(c)!==n.getUint8(c))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){let c=e,l=n;if(c.length!==l.length)return!1;for(let d=0;d<c.length;d++)if(c[d]!==l[d])return!1;return!0}if(Array.isArray(e))return!Array.isArray(n)||e.length!==n.length?!1:e.every((c,l)=>He(c,n[l],t));let s=Object.keys(r),a=Object.keys(o);return s.length!==a.length?!1:s.every(c=>Object.hasOwn(o,c)&&He(r[c],o[c],t))}function Ua(e){return C(e,{equals:(n,t)=>He(n,t)})}function Dt(e,n){let t=n?.name,r=n?.equals,o={};o._d=!1,o._init=!1,o._f=!1,o._g=e,o.__v=0;let i=!1,s=!1,a,c=()=>{o._d||s||(o._d=!0)};c._c=1,c._sig=o;let l=()=>{let f=e();o._v=r&&o._init&&r(o._v,f)?o._v:f,o._d=!1,o._init=!0};F(()=>{let f=!0;try{o._v=e(),o._d=!1,o._init=!0,f=!1}finally{f&&(o._d=!0)}},c);let d=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__,m=()=>{if(!o._d||s||a!==void 0)return;let f=o._v;i=!0;try{oe(l,c),Object.is(f,o._v)||o.__v++}catch(b){a={error:b},o.__v++,s?o._d=!0:o._f=!0}finally{i=!1,s&&Ce(c)}d&&!s&&!Object.is(f,o._v)&&d.emit("computed:update",{signal:o,oldValue:f,newValue:o._v})};o._validate=m;let g=()=>{let{error:f}=a;throw a=void 0,s&&(o._d=!1),f};function p(){if(i)throw new Error(`[SibuJS] Circular dependency detected in derived${t?` "${t}"`:""}. A derived signal cannot read itself (directly or through a chain).`);return vn()||s?(o._d&&(m(),a!==void 0&&g()),o._v):(o._d&&(m(),a!==void 0&&(le(o),g())),le(o),o._v)}return t&&(p.__name=t,o.__name=t),p.__signal=o,p.dispose=()=>{if(s)return;s=!0,o._d=a!==void 0,Ce(c);let f=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(f)try{f.emit("computed:destroy",{signal:o,getter:p})}catch{}},d&&d.emit("computed:create",{signal:o,name:t,getter:p}),p}function Ja(e){let[n,t]=C(e);return{get current(){return n()},set current(r){t(r)}}}function Ga(e){e!==null&&typeof e=="object"&&Array.isArray(e);let n={};Object.keys(e).forEach(c=>{let[l,d]=C(e[c]);n[c]=[l,d]});let t=new Proxy({},{get(c,l){if(typeof l=="string"&&Object.hasOwn(n,l)){let d=n[l][0];return d()}return Reflect.get(c,l)},set(){throw new Error("[SibuJS store] Direct mutation is not allowed. Use actions.setState() to update store properties.")}}),r=()=>{let c={};return Object.keys(n).forEach(l=>{c[l]=n[l][0]()}),c};return[t,{setState:c=>{let l=r(),d=typeof c=="function"?c(l):c;P(()=>{Object.entries(d).forEach(([m,g])=>{Object.hasOwn(n,m)&&n[m][1](g)})})},reset:()=>{P(()=>{Object.keys(e).forEach(c=>{let l=n[c][1];l(e[c])})})},subscribe:c=>{let l=!0;return z(()=>{let d=r();if(l){l=!1;return}ce();try{c(d)}finally{ue()}})},subscribeKey:(c,l)=>{let d,m=!0;return z(()=>{let g=n[c][0]();if(m){d=g,m=!1;return}if(!Object.is(g,d)){let p=d;d=g,ce();try{l(g,p)}finally{ue()}}})},getSnapshot:r}]}function Ya(e,n){if(j())return()=>{};let t,r=!0;return F(()=>{let s=e();if(r){t=s,r=!1;return}if(!Object.is(s,t)){let a=t;t=s,ce();try{n(s,a)}finally{ue()}}})}function Za(e,n,t){return[Dt(e,t),i=>{P(()=>n(i))}]}function Xa(e){let n=e();return U()&&queueMicrotask(()=>{try{e()}catch(t){console.warn("[SibuJS strict] second run threw:",t)}}),n}function Qa(e){if(!U())return z(e);let n=z(e),t=null;return queueMicrotask(()=>{try{t=z(e)}catch(r){console.warn("[SibuJS strictEffect] second run threw:",r)}}),()=>{n(),t&&t()}}var $t="data-sibu-enhanced",It=new WeakMap;function cr(e,n){let t=0;for(;e.length>0;){let r=e.splice(0);for(let o=0;o<r.length;o++){if(t>=Pe){let i=r.length-o+e.length;e.length=0,Be(n,t,i);return}t++;try{r[o]()}catch(i){typeof console<"u"&&console.error(`[SibuJS ${n}] teardown error:`,i)}}}}var ur=["text","attr","class","show","on","cleanup"];function lr(e,n){if(n==null)return e;if(typeof n!="string")return n;let t=n.startsWith("@")?`[data-ref="${n.slice(1)}"]`:n;try{return e.querySelector(t)}catch{return null}}function De(e,n){return j()?()=>{}:$(n,e)}function ec(e){if(e instanceof HTMLInputElement){if(e.type==="checkbox")return e.checked;if(e.type==="number"||e.type==="range")return e.value===""?null:Number(e.value)}return e instanceof HTMLSelectElement&&e.multiple?Array.from(e.selectedOptions,n=>n.value):e.value}function tc(e,n){if(e instanceof HTMLInputElement&&e.type==="checkbox"){e.checked=!!n;return}if(e instanceof HTMLSelectElement&&e.multiple){let r=Array.isArray(n)?n.map(String):[];for(let o of Array.from(e.options))o.selected=r.includes(o.value);return}let t=n==null?"":String(n);e.value!==t&&(e.value=t)}function nc(e,n,t,r){let o=`ctx.each[${r}]`;if(U())for(let i of Object.keys(t))ur.includes(i),`${o}${i}${ur.join(", ")}`;if(t.text!==void 0&&(t.text,`${o}`,e.text(n,t.text)),t.attr!==void 0)for(let i of Object.keys(t.attr)){let s=t.attr[i];`${o}${i}`,e.attr(n,i,s)}if(t.class!==void 0)for(let i of Object.keys(t.class)){let s=t.class[i];`${o}${i}`,e.classed(n,i,s)}if(t.show!==void 0&&(t.show,`${o}`,e.show(n,t.show)),t.on!==void 0)for(let i of Object.keys(t.on)){let s=t.on[i];`${o}${String(i)}`,e.on(n,i,s)}t.cleanup!==void 0&&(t.cleanup,`${o}`,e.cleanup(t.cleanup))}function Ge(e,n){let t=typeof e=="string"?typeof document<"u"?document.querySelector(e):null:e;if(!t)return typeof console<"u"&&console.warn(`[SibuJS enhance] no element matched ${JSON.stringify(e)} \u2014 nothing enhanced.`),()=>{};if(t.getAttribute($t)==="true")return U()&&typeof console<"u"&&console.warn("[SibuJS enhance] element is already enhanced; ignoring re-enhance.",t),()=>{};let r=[],o=Symbol("sibujs.enhance"),i=!1,s=!1,a=g=>s?!0:!1,c=(g,p,f)=>{if(a(g))return;let b=lr(t,p);if(!b){typeof console<"u"&&console.warn(`[SibuJS enhance] target ${JSON.stringify(p)} not found under`,t);return}f(b)},l={root:t,ref:g=>lr(t,g),refs:g=>{let p=g.startsWith("@")?`[data-ref="${g.slice(1)}"]`:g;try{return Array.from(t.querySelectorAll(p))}catch{return[]}},on:(g,p,f,b)=>{c("on",g,h=>{let y=w=>f(w,h);h.addEventListener(p,y,b),r.push(()=>h.removeEventListener(p,y,b))})},text:(g,p)=>{c("text",g,f=>{r.push(De(f,()=>{let b=p(),h=b==null?"":String(b);f.textContent!==h&&(f.textContent=h)}))})},attr:(g,p,f)=>{c("attr",g,b=>{r.push(De(b,()=>{let h=f(),y=h==null?null:String(h);V(b,p,y,{syncValueProperty:!1,label:"enhance attr()"})}))})},classed:(g,p,f)=>{c("classed",g,b=>{r.push(De(b,()=>{b.classList.toggle(p,!!f())}))})},show:(g,p)=>{c("show",g,f=>{let b=f.hidden;r.push(De(f,()=>{f.hidden=!p()})),r.push(()=>{f.hidden=b})})},model:(g,p,f)=>{c("model",g,b=>{let h=b,[y,w]=p,v=f?.event??(h instanceof HTMLSelectElement||h instanceof HTMLInputElement&&(h.type==="checkbox"||h.type==="radio")?"change":"input");r.push(De(b,()=>{tc(h,y())}));let S=()=>w(ec(h));h.addEventListener(v,S),r.push(()=>h.removeEventListener(v,S))})},each:(g,p)=>{if(a("each"))return;let f=typeof g=="string"?l.refs(g):Array.from(g);for(let b=0;b<f.length;b++){let h=f[b],y=p(h,b);y!=null&&nc(l,h,y,b)}},cleanup:g=>{a("cleanup")||r.push(g)}},d;try{d=n(l);let g=d;if(g&&typeof g.then=="function")throw g.then(void 0,p=>{}),new Error("[SibuJS enhance] setup returned a promise")}catch(g){throw cr(r,"enhance"),s=!0,g}typeof d=="function"&&r.push(d);let m=()=>{i||(i=!0,It.get(t)===o&&(It.delete(t),t.removeAttribute($t)),tt(t,m),cr(r,"enhance"),s=!0)};return T(t,m),It.set(t,o),t.setAttribute($t,"true"),m}function rc(e,n){if(typeof document>"u")return()=>{};let t=[];try{for(let r of Array.from(document.querySelectorAll(e)))t.push(Ge(r,n))}catch(r){for(let o=t.length-1;o>=0;o--)try{t[o]()}catch(i){typeof console<"u"&&console.error("[SibuJS enhanceAll] rollback error:",i)}throw t.length=0,r}return()=>{for(let r of t.splice(0))r()}}function dr(e,n){let t=globalThis;return t[e]??(t[e]=n())}var oc=/^[A-Za-z0-9_-]+$/,fr=Symbol.for("sibujs.islands.lazy"),Ye=dr(Symbol.for("sibujs.islands.registry.v1"),()=>new Map);function ic(e){return e[fr]=!0,e}function sc(e,n){if(!oc.test(e))throw new Error(`[SibuJS islands] name must match [A-Za-z0-9_-]+ (got: ${JSON.stringify(e.slice(0,32))})`);Ye.set(e,n)}function ac(e){Ye.delete(e)}async function cc(e){if(typeof e=="function"&&e[fr]){let n=await e(),t=n.default??n;return typeof t=="function"?t:null}return e}function uc(e=typeof document<"u"?document:null,n={}){if(!e||typeof e.querySelectorAll!="function")return()=>{};let t=[],r=[],o=!1;for(let i of Array.from(e.querySelectorAll("[data-sibu-island]"))){if(i.getAttribute("data-sibu-enhanced")==="true")continue;let s=i.getAttribute("data-sibu-island")??"";if(!Ye.has(s)){typeof console<"u"&&console.warn(`[SibuJS islands] no island registered for "${s}" \u2014 skipping. Call registerIsland("${s}", ...).`);continue}let a=!1,c=()=>{if(a||o)return;a=!0;let d=Ye.get(s);d&&cc(d).then(m=>{if(!o){if(!m){typeof console<"u"&&console.warn(`[SibuJS islands] "${s}" loader produced no setup.`);return}try{let g=Ge(i,m);if(o){g();return}r.push(g),i.setAttribute("data-sibu-hydrated","true")}catch(g){typeof console<"u"&&console.error(`[SibuJS islands] "${s}" failed to mount:`,g)}}}).catch(m=>{typeof console<"u"&&console.error(`[SibuJS islands] "${s}" failed to load:`,m)})},l=i.getAttribute("data-sibu-load")||"load";t.push(lc(l,i,c,n))}return()=>{o=!0;for(let i of t.splice(0))i();for(let i of r.splice(0))i()}}function lc(e,n,t,r){switch(e){case"idle":{if(typeof requestIdleCallback<"u"){let i=requestIdleCallback(t);return()=>cancelIdleCallback(i)}let o=setTimeout(t,1);return()=>clearTimeout(o)}case"visible":{if(typeof IntersectionObserver>"u")return queueMicrotask(t),()=>{};let o=new IntersectionObserver(i=>{for(let s of i)s.isIntersecting&&(o.disconnect(),t())},{rootMargin:r.rootMargin,threshold:r.threshold});return o.observe(n),()=>o.disconnect()}case"interaction":{let o=["pointerdown","focusin","keydown","touchstart"],i=()=>{s(),t()},s=()=>{for(let a of o)n.removeEventListener(a,i)};for(let a of o)n.addEventListener(a,i,{passive:!0});return s}case"media":{let o=n.getAttribute("data-sibu-media")||"(min-width: 0px)";if(typeof matchMedia>"u")return queueMicrotask(t),()=>{};let i=matchMedia(o);if(i.matches)return queueMicrotask(t),()=>{};let s=()=>{i.matches&&(i.removeEventListener("change",s),t())};return i.addEventListener("change",s),()=>i.removeEventListener("change",s)}default:return queueMicrotask(t),()=>{}}}function pr(e){return e}var nd=1024*1024;function dc(e){let[n,t]=C(e()),r=!1,o=!1,i=n(),s=()=>{r=!1,!o&&t(i)},a=()=>{r||(r=!0,queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(s):s()}))},c=F(()=>{i=e(),a()}),l=(()=>n());return l.dispose=()=>{o||(o=!0,c())},l}var mr=16;function fc(e){let n=globalThis;if(typeof n.requestIdleCallback=="function"){n.requestIdleCallback(e,{timeout:mr*4});return}if(typeof requestAnimationFrame=="function"){requestAnimationFrame(()=>e());return}setTimeout(e,mr)}function pc(){let[e,n]=C(!1);function t(r){n(!0),fc(()=>{let o;try{o=r()}catch{n(!1);return}o&&typeof o.then=="function"?o.then(()=>n(!1),()=>n(!1)):n(!1)})}return{pending:e,start:t}}function mc(){return new Promise(e=>{queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):e()})})}typeof globalThis<"u"&&(globalThis.Sibu={...Ot});})();
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  bindAttribute,
3
3
  setSafeAttribute
4
- } from "./chunk-VCTAEPSB.js";
4
+ } from "./chunk-ONOHFDLG.js";
5
5
  import {
6
6
  derived
7
- } from "./chunk-W2EQ7X2L.js";
7
+ } from "./chunk-RBTPLM32.js";
8
8
  import {
9
9
  isEventHandlerAttr
10
10
  } from "./chunk-IXKSNWV5.js";
@@ -13,7 +13,7 @@ import {
13
13
  } from "./chunk-7ZHH77QA.js";
14
14
  import {
15
15
  effect
16
- } from "./chunk-7GIHSAWB.js";
16
+ } from "./chunk-RIXRAYIU.js";
17
17
  import {
18
18
  dispose,
19
19
  registerDisposer,
@@ -21,10 +21,11 @@ import {
21
21
  } from "./chunk-QKRPLZ2V.js";
22
22
  import {
23
23
  signal
24
- } from "./chunk-NVNJH22U.js";
24
+ } from "./chunk-XZZOBQAY.js";
25
25
  import {
26
+ reactiveBinding,
26
27
  track
27
- } from "./chunk-3BTTCZ5J.js";
28
+ } from "./chunk-UGRX3S57.js";
28
29
  import {
29
30
  reportError
30
31
  } from "./chunk-2WLZ6757.js";
@@ -916,13 +917,13 @@ function bindBoolAttr(el, attr, getter) {
916
917
  let value;
917
918
  try {
918
919
  value = reactiveGetter();
919
- } catch {
920
+ } catch (err) {
921
+ reportError(err, { phase: "binding", name: "bindBoolAttr", node: el });
920
922
  return;
921
923
  }
922
924
  setSafeAttribute(el, attr, Boolean(value), { label: "bindBoolAttr" });
923
925
  }
924
- const teardown = track(commit);
925
- return teardown;
926
+ return reactiveBinding(commit, el);
926
927
  }
927
928
  function bindData(el, key, getter) {
928
929
  const dataAttr = `data-${key}`;
@@ -1186,7 +1187,13 @@ function pagination(options) {
1186
1187
  const clamped = Math.max(1, Math.min(target, totalPages()));
1187
1188
  setPage(clamped);
1188
1189
  }
1189
- return { page: currentPage, pageSize, totalPages, next, prev, goTo, startIndex, endIndex };
1190
+ function dispose2() {
1191
+ startIndex.dispose();
1192
+ endIndex.dispose();
1193
+ currentPage.dispose();
1194
+ totalPages.dispose();
1195
+ }
1196
+ return { page: currentPage, pageSize, totalPages, next, prev, goTo, startIndex, endIndex, dispose: dispose2 };
1190
1197
  }
1191
1198
 
1192
1199
  // src/ui/eventBus.ts
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  context
3
- } from "./chunk-7NBDXVHS.js";
3
+ } from "./chunk-VUF4ALSW.js";
4
4
  import {
5
5
  derived
6
- } from "./chunk-W2EQ7X2L.js";
6
+ } from "./chunk-RBTPLM32.js";
7
7
  import {
8
8
  sanitizeUrl
9
9
  } from "./chunk-IXKSNWV5.js";
@@ -12,14 +12,14 @@ import {
12
12
  } from "./chunk-7ZHH77QA.js";
13
13
  import {
14
14
  effect
15
- } from "./chunk-7GIHSAWB.js";
15
+ } from "./chunk-RIXRAYIU.js";
16
16
  import {
17
17
  getRequestScopedCache
18
18
  } from "./chunk-5DXA2J44.js";
19
19
  import {
20
20
  batch,
21
21
  signal
22
- } from "./chunk-NVNJH22U.js";
22
+ } from "./chunk-XZZOBQAY.js";
23
23
 
24
24
  // src/data/abort.ts
25
25
  function isAbortError(error) {
@@ -389,6 +389,8 @@ function query(key, fetcher, options = {}) {
389
389
  if (disposed) return;
390
390
  disposed = true;
391
391
  effectCleanup();
392
+ loading.dispose();
393
+ isStale.dispose();
392
394
  if (intervalTimer) clearInterval(intervalTimer);
393
395
  detachFromEntry();
394
396
  if (focusHandler && typeof globalThis.removeEventListener === "function") {
@@ -678,6 +680,10 @@ function infiniteQuery(key, fetcher, options) {
678
680
  disposed = true;
679
681
  abortController?.abort();
680
682
  effectCleanup();
683
+ data.dispose();
684
+ loading.dispose();
685
+ hasNextPage.dispose();
686
+ hasPreviousPage.dispose();
681
687
  }
682
688
  return {
683
689
  data,
@@ -3,17 +3,17 @@ import {
3
3
  } from "./chunk-WWV3SJ3L.js";
4
4
  import {
5
5
  tagFactory
6
- } from "./chunk-PNIRUQ4C.js";
6
+ } from "./chunk-KEISJXBU.js";
7
7
  import {
8
8
  derived
9
- } from "./chunk-W2EQ7X2L.js";
9
+ } from "./chunk-RBTPLM32.js";
10
10
  import {
11
11
  effect
12
- } from "./chunk-7GIHSAWB.js";
12
+ } from "./chunk-RIXRAYIU.js";
13
13
  import {
14
14
  batch,
15
15
  signal
16
- } from "./chunk-NVNJH22U.js";
16
+ } from "./chunk-XZZOBQAY.js";
17
17
 
18
18
  // src/ecosystem/adapters/mobx.ts
19
19
  function mobXAdapter(options) {
@@ -5,7 +5,7 @@ import {
5
5
  resumeTracking,
6
6
  suspendTracking,
7
7
  track
8
- } from "./chunk-3BTTCZ5J.js";
8
+ } from "./chunk-UGRX3S57.js";
9
9
  import {
10
10
  devAssert
11
11
  } from "./chunk-2WLZ6757.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-QKRPLZ2V.js";
4
4
  import {
5
5
  signal
6
- } from "./chunk-NVNJH22U.js";
6
+ } from "./chunk-XZZOBQAY.js";
7
7
 
8
8
  // src/ui/transition.ts
9
9
  function transition(element, options = {}) {
@@ -6,18 +6,18 @@ import {
6
6
  } from "./chunk-7ZHH77QA.js";
7
7
  import {
8
8
  effect
9
- } from "./chunk-7GIHSAWB.js";
9
+ } from "./chunk-RIXRAYIU.js";
10
10
  import {
11
11
  dispose
12
12
  } from "./chunk-QKRPLZ2V.js";
13
13
  import {
14
14
  signal
15
- } from "./chunk-NVNJH22U.js";
15
+ } from "./chunk-XZZOBQAY.js";
16
16
  import {
17
17
  forEachSubscriber,
18
18
  getSubscriberCount,
19
19
  getSubscriberDeps
20
- } from "./chunk-3BTTCZ5J.js";
20
+ } from "./chunk-UGRX3S57.js";
21
21
  import {
22
22
  isDev
23
23
  } from "./chunk-2WLZ6757.js";
@@ -296,6 +296,16 @@ function initDevTools(config) {
296
296
  });
297
297
  emit();
298
298
  });
299
+ hook.on("computed:destroy", (payload) => {
300
+ const p = payload;
301
+ for (const [id, node] of hook.nodes) {
302
+ if (node.ref === p.signal) {
303
+ hook.nodes.delete(id);
304
+ break;
305
+ }
306
+ }
307
+ emit();
308
+ });
299
309
  hook.on("effect:create", (payload) => {
300
310
  _dt.nextNodeId++;
301
311
  const name = inferName();