sibujs 1.3.0 → 1.4.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.
package/dist/build.cjs CHANGED
@@ -633,7 +633,6 @@ function injectPureAnnotations(code2) {
633
633
  const sibuFactories = [
634
634
  "tagFactory",
635
635
  "context",
636
- "composable",
637
636
  "defineComponent",
638
637
  "withProps",
639
638
  "withDefaults",
@@ -855,7 +854,6 @@ function deepMerge(target, source2) {
855
854
  var PURE_FACTORIES = [
856
855
  "tagFactory",
857
856
  "context",
858
- "composable",
859
857
  "defineComponent",
860
858
  "withProps",
861
859
  "withDefaults",
@@ -1171,8 +1169,6 @@ __export(index_exports, {
1171
1169
  mask: () => mask,
1172
1170
  match: () => match,
1173
1171
  math: () => math,
1174
- memo: () => memo,
1175
- memoFn: () => memoFn,
1176
1172
  menu: () => menu,
1177
1173
  meta: () => meta,
1178
1174
  meter: () => meter,
@@ -3303,16 +3299,6 @@ function ref(initial) {
3303
3299
  };
3304
3300
  }
3305
3301
 
3306
- // src/core/signals/memo.ts
3307
- function memo(factory) {
3308
- return derived(factory);
3309
- }
3310
-
3311
- // src/core/signals/memoFn.ts
3312
- function memoFn(callback) {
3313
- return derived(callback);
3314
- }
3315
-
3316
3302
  // src/core/signals/array.ts
3317
3303
  function array(initial = []) {
3318
3304
  const [arr, setArr] = signal([...initial]);
@@ -4907,14 +4893,11 @@ var moduleSizes = {
4907
4893
  "core/watch": 300,
4908
4894
  "core/store": 380,
4909
4895
  "core/ref": 150,
4910
- "core/memo": 180,
4911
- "core/memoFn": 160,
4912
4896
  "core/array": 420,
4913
4897
  "core/deepSignal": 500,
4914
4898
  "core/lifecycle": 300,
4915
4899
  "core/context": 350,
4916
4900
  "core/persist": 400,
4917
- "core/primitives": 200,
4918
4901
  "core/hoc": 280,
4919
4902
  "core/transition": 600,
4920
4903
  "core/form": 750,
@@ -5065,7 +5048,7 @@ var lintRules = {
5065
5048
  description: "Signal functions should not be called inside conditionals, loops, or nested functions",
5066
5049
  check(source2) {
5067
5050
  const violations = [];
5068
- const hookNames = ["signal", "effect", "derived", "memo", "memoFn", "ref", "watch", "store"];
5051
+ const hookNames = ["signal", "effect", "derived", "ref", "watch", "store"];
5069
5052
  const hookPattern = new RegExp(`\\b(${hookNames.join("|")})\\s*\\(`, "g");
5070
5053
  const lines = source2.split("\n");
5071
5054
  for (let lineIdx = 0; lineIdx < lines.length; lineIdx++) {
@@ -5424,30 +5407,6 @@ function getComponentMetadata() {
5424
5407
  }
5425
5408
  ]
5426
5409
  },
5427
- {
5428
- name: "memo",
5429
- description: "Returns a memoized value that only recomputes when its reactive dependencies change. Alias for derived.",
5430
- props: [
5431
- {
5432
- name: "factory",
5433
- type: "() => T",
5434
- required: true,
5435
- description: "Function that computes the memoized value"
5436
- }
5437
- ]
5438
- },
5439
- {
5440
- name: "memoFn",
5441
- description: "Returns a memoized callback that only updates when its reactive dependencies change.",
5442
- props: [
5443
- {
5444
- name: "callback",
5445
- type: "() => T",
5446
- required: true,
5447
- description: "The callback factory function to memoize"
5448
- }
5449
- ]
5450
- },
5451
5410
  {
5452
5411
  name: "ref",
5453
5412
  description: "Creates a mutable reference object that persists across renders. Updating a ref does NOT trigger re-renders.",
@@ -5491,43 +5450,6 @@ function getComponentMetadata() {
5491
5450
  }
5492
5451
  ]
5493
5452
  },
5494
- // ── SolidJS-style Primitives ─────────────────────────────────────
5495
- {
5496
- name: "createSignal",
5497
- description: "Creates a reactive signal. SolidJS-style alias for signal. Returns [getter, setter].",
5498
- props: [
5499
- {
5500
- name: "value",
5501
- type: "T",
5502
- required: true,
5503
- description: "Initial value"
5504
- }
5505
- ]
5506
- },
5507
- {
5508
- name: "createMemo",
5509
- description: "Creates a derived/computed reactive value. SolidJS-style alias for derived.",
5510
- props: [
5511
- {
5512
- name: "fn",
5513
- type: "() => T",
5514
- required: true,
5515
- description: "Computation function that reads other signals"
5516
- }
5517
- ]
5518
- },
5519
- {
5520
- name: "createEffect",
5521
- description: "Creates a reactive side effect. SolidJS-style alias for effect.",
5522
- props: [
5523
- {
5524
- name: "fn",
5525
- type: "() => void",
5526
- required: true,
5527
- description: "Effect function that reads reactive signals"
5528
- }
5529
- ]
5530
- },
5531
5453
  // ── Lifecycle ────────────────────────────────────────────────────
5532
5454
  {
5533
5455
  name: "onMount",
@@ -5859,11 +5781,6 @@ function generateVSCodeSnippets() {
5859
5781
  "});"
5860
5782
  ],
5861
5783
  description: "Create a reactive form with validation"
5862
- },
5863
- "SibuJS createSignal": {
5864
- prefix: "sibu-signal",
5865
- body: ["const [${1:value}, ${2:setValue}] = createSignal(${3:initialValue});"],
5866
- description: "Create a reactive signal (SolidJS-style alias for signal)"
5867
5784
  }
5868
5785
  };
5869
5786
  }
@@ -5895,10 +5812,6 @@ function generateTypeStubs() {
5895
5812
  signal: ["declare function signal<T>(initial: T): [() => T, (next: T | ((prev: T) => T)) => void];"].join("\n"),
5896
5813
  effect: ["declare function effect(effectFn: () => void): () => void;"].join("\n"),
5897
5814
  derived: ["declare function derived<T>(getter: () => T): () => T;"].join("\n"),
5898
- memo: ["declare function memo<T>(factory: () => T): () => T;"].join("\n"),
5899
- memoFn: ["declare function memoFn<T extends (...args: unknown[]) => unknown>(callback: () => T): () => T;"].join(
5900
- "\n"
5901
- ),
5902
5815
  ref: [
5903
5816
  "interface Ref<T> { current: T; }",
5904
5817
  "declare function ref<T>(initial: T): Ref<T>;",
@@ -5917,11 +5830,6 @@ function generateTypeStubs() {
5917
5830
  "}",
5918
5831
  "declare function store<T extends object>(initialState: T): [{ readonly [K in keyof T]: T[K] }, StoreActions<T>];"
5919
5832
  ].join("\n"),
5920
- createSignal: ["declare function createSignal<T>(value: T): [() => T, (next: T | ((prev: T) => T)) => void];"].join(
5921
- "\n"
5922
- ),
5923
- createMemo: ["declare function createMemo<T>(fn: () => T): () => T;"].join("\n"),
5924
- createEffect: ["declare function createEffect(fn: () => void): () => void;"].join("\n"),
5925
5833
  mount: [
5926
5834
  "declare function mount(component: (() => HTMLElement) | HTMLElement | Node, container: HTMLElement | null): { node: Node; unmount: () => void };"
5927
5835
  ].join("\n"),
package/dist/build.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  index_exports
3
- } from "./chunk-QWZG56ET.js";
3
+ } from "./chunk-UHNL42EF.js";
4
4
  import "./chunk-YT6HQ6AM.js";
5
5
  import "./chunk-32DY64NT.js";
6
6
  import "./chunk-NYVAC6P5.js";
@@ -589,7 +589,6 @@ function injectPureAnnotations(code) {
589
589
  const sibuFactories = [
590
590
  "tagFactory",
591
591
  "context",
592
- "composable",
593
592
  "defineComponent",
594
593
  "withProps",
595
594
  "withDefaults",
@@ -811,7 +810,6 @@ function deepMerge(target, source) {
811
810
  var PURE_FACTORIES = [
812
811
  "tagFactory",
813
812
  "context",
814
- "composable",
815
813
  "defineComponent",
816
814
  "withProps",
817
815
  "withDefaults",
@@ -1291,14 +1289,11 @@ var moduleSizes = {
1291
1289
  "core/watch": 300,
1292
1290
  "core/store": 380,
1293
1291
  "core/ref": 150,
1294
- "core/memo": 180,
1295
- "core/memoFn": 160,
1296
1292
  "core/array": 420,
1297
1293
  "core/deepSignal": 500,
1298
1294
  "core/lifecycle": 300,
1299
1295
  "core/context": 350,
1300
1296
  "core/persist": 400,
1301
- "core/primitives": 200,
1302
1297
  "core/hoc": 280,
1303
1298
  "core/transition": 600,
1304
1299
  "core/form": 750,
@@ -1449,7 +1444,7 @@ var lintRules = {
1449
1444
  description: "Signal functions should not be called inside conditionals, loops, or nested functions",
1450
1445
  check(source) {
1451
1446
  const violations = [];
1452
- const hookNames = ["signal", "effect", "derived", "memo", "memoFn", "ref", "watch", "store"];
1447
+ const hookNames = ["signal", "effect", "derived", "ref", "watch", "store"];
1453
1448
  const hookPattern = new RegExp(`\\b(${hookNames.join("|")})\\s*\\(`, "g");
1454
1449
  const lines = source.split("\n");
1455
1450
  for (let lineIdx = 0; lineIdx < lines.length; lineIdx++) {
@@ -1808,30 +1803,6 @@ function getComponentMetadata() {
1808
1803
  }
1809
1804
  ]
1810
1805
  },
1811
- {
1812
- name: "memo",
1813
- description: "Returns a memoized value that only recomputes when its reactive dependencies change. Alias for derived.",
1814
- props: [
1815
- {
1816
- name: "factory",
1817
- type: "() => T",
1818
- required: true,
1819
- description: "Function that computes the memoized value"
1820
- }
1821
- ]
1822
- },
1823
- {
1824
- name: "memoFn",
1825
- description: "Returns a memoized callback that only updates when its reactive dependencies change.",
1826
- props: [
1827
- {
1828
- name: "callback",
1829
- type: "() => T",
1830
- required: true,
1831
- description: "The callback factory function to memoize"
1832
- }
1833
- ]
1834
- },
1835
1806
  {
1836
1807
  name: "ref",
1837
1808
  description: "Creates a mutable reference object that persists across renders. Updating a ref does NOT trigger re-renders.",
@@ -1875,43 +1846,6 @@ function getComponentMetadata() {
1875
1846
  }
1876
1847
  ]
1877
1848
  },
1878
- // ── SolidJS-style Primitives ─────────────────────────────────────
1879
- {
1880
- name: "createSignal",
1881
- description: "Creates a reactive signal. SolidJS-style alias for signal. Returns [getter, setter].",
1882
- props: [
1883
- {
1884
- name: "value",
1885
- type: "T",
1886
- required: true,
1887
- description: "Initial value"
1888
- }
1889
- ]
1890
- },
1891
- {
1892
- name: "createMemo",
1893
- description: "Creates a derived/computed reactive value. SolidJS-style alias for derived.",
1894
- props: [
1895
- {
1896
- name: "fn",
1897
- type: "() => T",
1898
- required: true,
1899
- description: "Computation function that reads other signals"
1900
- }
1901
- ]
1902
- },
1903
- {
1904
- name: "createEffect",
1905
- description: "Creates a reactive side effect. SolidJS-style alias for effect.",
1906
- props: [
1907
- {
1908
- name: "fn",
1909
- type: "() => void",
1910
- required: true,
1911
- description: "Effect function that reads reactive signals"
1912
- }
1913
- ]
1914
- },
1915
1849
  // ── Lifecycle ────────────────────────────────────────────────────
1916
1850
  {
1917
1851
  name: "onMount",
@@ -2243,11 +2177,6 @@ function generateVSCodeSnippets() {
2243
2177
  "});"
2244
2178
  ],
2245
2179
  description: "Create a reactive form with validation"
2246
- },
2247
- "SibuJS createSignal": {
2248
- prefix: "sibu-signal",
2249
- body: ["const [${1:value}, ${2:setValue}] = createSignal(${3:initialValue});"],
2250
- description: "Create a reactive signal (SolidJS-style alias for signal)"
2251
2180
  }
2252
2181
  };
2253
2182
  }
@@ -2279,10 +2208,6 @@ function generateTypeStubs() {
2279
2208
  signal: ["declare function signal<T>(initial: T): [() => T, (next: T | ((prev: T) => T)) => void];"].join("\n"),
2280
2209
  effect: ["declare function effect(effectFn: () => void): () => void;"].join("\n"),
2281
2210
  derived: ["declare function derived<T>(getter: () => T): () => T;"].join("\n"),
2282
- memo: ["declare function memo<T>(factory: () => T): () => T;"].join("\n"),
2283
- memoFn: ["declare function memoFn<T extends (...args: unknown[]) => unknown>(callback: () => T): () => T;"].join(
2284
- "\n"
2285
- ),
2286
2211
  ref: [
2287
2212
  "interface Ref<T> { current: T; }",
2288
2213
  "declare function ref<T>(initial: T): Ref<T>;",
@@ -2301,11 +2226,6 @@ function generateTypeStubs() {
2301
2226
  "}",
2302
2227
  "declare function store<T extends object>(initialState: T): [{ readonly [K in keyof T]: T[K] }, StoreActions<T>];"
2303
2228
  ].join("\n"),
2304
- createSignal: ["declare function createSignal<T>(value: T): [() => T, (next: T | ((prev: T) => T)) => void];"].join(
2305
- "\n"
2306
- ),
2307
- createMemo: ["declare function createMemo<T>(fn: () => T): () => T;"].join("\n"),
2308
- createEffect: ["declare function createEffect(fn: () => void): () => void;"].join("\n"),
2309
2229
  mount: [
2310
2230
  "declare function mount(component: (() => HTMLElement) | HTMLElement | Node, container: HTMLElement | null): { node: Node; unmount: () => void };"
2311
2231
  ].join("\n"),
@@ -1,5 +1,5 @@
1
- "use strict";var Sibu=(()=>{var Ae=Object.defineProperty;var Po=Object.getOwnPropertyDescriptor;var Do=Object.getOwnPropertyNames;var Fo=Object.prototype.hasOwnProperty;var Ye=(e,t)=>{for(var n in t)Ae(e,n,{get:t[n],enumerable:!0})},Ho=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Do(t))!Fo.call(e,o)&&o!==n&&Ae(e,o,{get:()=>t[o],enumerable:!(r=Po(t,o))||r.enumerable});return e};var Bo=e=>Ho(Ae({},"__esModule",{value:!0}),e);var pi={};Ye(pi,{DynamicComponent:()=>Dr,ErrorBoundary:()=>_o,ErrorDisplay:()=>we,Fragment:()=>Mr,KeepAlive:()=>Ir,Loading:()=>Lo,Portal:()=>Rr,SVG_NS:()=>k,Suspense:()=>je,__resetIdCounter:()=>Yr,a:()=>Lt,abbr:()=>Mt,action:()=>qr,address:()=>mt,area:()=>nn,array:()=>co,article:()=>ct,aside:()=>ft,asyncDerived:()=>fo,audio:()=>rn,autoResize:()=>Ur,b:()=>Rt,base:()=>Zn,batch:()=>Ee,bdi:()=>Ot,bdo:()=>Pt,bindDynamic:()=>Ne,blockquote:()=>vt,body:()=>it,br:()=>Dt,button:()=>Z,canvas:()=>yn,caption:()=>En,catchError:()=>Wr,catchErrorAsync:()=>Gr,center:()=>Tr,checkLeaks:()=>nt,circle:()=>tr,cite:()=>Ft,clickOutside:()=>$r,clipPath:()=>pr,code:()=>ke,col:()=>Sn,colgroup:()=>wn,context:()=>go,copyOnClick:()=>Kr,createId:()=>Qr,customElement:()=>Sr,data:()=>Ht,datalist:()=>On,dd:()=>Tt,deepEqual:()=>se,deepSignal:()=>uo,defer:()=>To,defs:()=>ur,del:()=>Tn,derived:()=>I,details:()=>Vn,dfn:()=>Bt,dialog:()=>Wn,disableSSR:()=>Ie,dispose:()=>O,div:()=>h,dl:()=>kt,dt:()=>Et,each:()=>Nr,effect:()=>P,ellipse:()=>nr,em:()=>zt,embed:()=>ln,enableSSR:()=>ze,enqueueBatchedSignal:()=>X,fieldset:()=>Pn,figcaption:()=>St,figure:()=>wt,font:()=>kr,footer:()=>dt,form:()=>Dn,g:()=>rr,getSlot:()=>Fr,h1:()=>bt,h2:()=>gt,h3:()=>ve,h4:()=>ht,h5:()=>yt,h6:()=>xt,head:()=>ot,header:()=>lt,hr:()=>Ct,html:()=>Oe,i:()=>It,iframe:()=>dn,img:()=>on,input:()=>Fn,ins:()=>kn,isBatching:()=>Zr,isSSR:()=>ee,kbd:()=>qt,label:()=>Hn,lazy:()=>$e,legend:()=>Bn,li:()=>At,line:()=>or,linearGradient:()=>br,link:()=>Xn,longPress:()=>jr,main:()=>pt,map:()=>sn,mark:()=>$t,marker:()=>vr,marquee:()=>Er,mask:()=>fr,match:()=>zr,math:()=>hn,memo:()=>so,memoFn:()=>ao,menu:()=>Gn,meta:()=>er,meter:()=>zn,mount:()=>Ar,nav:()=>ut,nextTick:()=>xo,noscript:()=>xn,object:()=>un,ol:()=>_t,on:()=>no,onCleanup:()=>bo,onMount:()=>qe,onUnmount:()=>mo,optgroup:()=>In,option:()=>qn,output:()=>$n,p:()=>xe,param:()=>pn,path:()=>ir,pattern:()=>mr,picture:()=>fn,polygon:()=>sr,polyline:()=>ar,portal:()=>mn,pre:()=>Te,progress:()=>jn,q:()=>jt,radialGradient:()=>gr,reactiveArray:()=>lo,rect:()=>cr,ref:()=>io,registerComponent:()=>Or,registerDisposer:()=>A,resolveComponent:()=>De,rp:()=>Kt,rt:()=>Ut,ruby:()=>Vt,s:()=>Wt,samp:()=>Gt,script:()=>vn,section:()=>at,select:()=>Kn,setGlobalErrorHandler:()=>Jr,show:()=>Hr,signal:()=>E,slot:()=>Qn,small:()=>Jt,source:()=>bn,span:()=>S,stop:()=>hr,store:()=>oo,strict:()=>ho,strictEffect:()=>yo,strong:()=>Qt,style:()=>z,sub:()=>Yt,summary:()=>Jn,sup:()=>Zt,svg:()=>gn,symbol:()=>xr,table:()=>Cn,tagFactory:()=>c,tbody:()=>An,td:()=>_n,template:()=>Yn,text:()=>lr,textarea:()=>Un,tfoot:()=>Nn,th:()=>Ln,thead:()=>Mn,time:()=>Xt,title:()=>st,tr:()=>Rn,track:()=>an,transition:()=>ko,trapFocus:()=>Vr,tspan:()=>dr,u:()=>en,ul:()=>Nt,unregisterComponent:()=>Pr,untracked:()=>Q,use:()=>yr,var_:()=>tn,video:()=>cn,watch:()=>ro,when:()=>Br,withSSR:()=>eo,writable:()=>po});var Ue={};Ye(Ue,{DynamicComponent:()=>Dr,ErrorBoundary:()=>_o,ErrorDisplay:()=>we,Fragment:()=>Mr,KeepAlive:()=>Ir,Loading:()=>Lo,Portal:()=>Rr,SVG_NS:()=>k,Suspense:()=>je,__resetIdCounter:()=>Yr,a:()=>Lt,abbr:()=>Mt,action:()=>qr,address:()=>mt,area:()=>nn,array:()=>co,article:()=>ct,aside:()=>ft,asyncDerived:()=>fo,audio:()=>rn,autoResize:()=>Ur,b:()=>Rt,base:()=>Zn,batch:()=>Ee,bdi:()=>Ot,bdo:()=>Pt,bindDynamic:()=>Ne,blockquote:()=>vt,body:()=>it,br:()=>Dt,button:()=>Z,canvas:()=>yn,caption:()=>En,catchError:()=>Wr,catchErrorAsync:()=>Gr,center:()=>Tr,checkLeaks:()=>nt,circle:()=>tr,cite:()=>Ft,clickOutside:()=>$r,clipPath:()=>pr,code:()=>ke,col:()=>Sn,colgroup:()=>wn,context:()=>go,copyOnClick:()=>Kr,createId:()=>Qr,customElement:()=>Sr,data:()=>Ht,datalist:()=>On,dd:()=>Tt,deepEqual:()=>se,deepSignal:()=>uo,defer:()=>To,defs:()=>ur,del:()=>Tn,derived:()=>I,details:()=>Vn,dfn:()=>Bt,dialog:()=>Wn,disableSSR:()=>Ie,dispose:()=>O,div:()=>h,dl:()=>kt,dt:()=>Et,each:()=>Nr,effect:()=>P,ellipse:()=>nr,em:()=>zt,embed:()=>ln,enableSSR:()=>ze,enqueueBatchedSignal:()=>X,fieldset:()=>Pn,figcaption:()=>St,figure:()=>wt,font:()=>kr,footer:()=>dt,form:()=>Dn,g:()=>rr,getSlot:()=>Fr,h1:()=>bt,h2:()=>gt,h3:()=>ve,h4:()=>ht,h5:()=>yt,h6:()=>xt,head:()=>ot,header:()=>lt,hr:()=>Ct,html:()=>Oe,i:()=>It,iframe:()=>dn,img:()=>on,input:()=>Fn,ins:()=>kn,isBatching:()=>Zr,isSSR:()=>ee,kbd:()=>qt,label:()=>Hn,lazy:()=>$e,legend:()=>Bn,li:()=>At,line:()=>or,linearGradient:()=>br,link:()=>Xn,longPress:()=>jr,main:()=>pt,map:()=>sn,mark:()=>$t,marker:()=>vr,marquee:()=>Er,mask:()=>fr,match:()=>zr,math:()=>hn,memo:()=>so,memoFn:()=>ao,menu:()=>Gn,meta:()=>er,meter:()=>zn,mount:()=>Ar,nav:()=>ut,nextTick:()=>xo,noscript:()=>xn,object:()=>un,ol:()=>_t,on:()=>no,onCleanup:()=>bo,onMount:()=>qe,onUnmount:()=>mo,optgroup:()=>In,option:()=>qn,output:()=>$n,p:()=>xe,param:()=>pn,path:()=>ir,pattern:()=>mr,picture:()=>fn,polygon:()=>sr,polyline:()=>ar,portal:()=>mn,pre:()=>Te,progress:()=>jn,q:()=>jt,radialGradient:()=>gr,reactiveArray:()=>lo,rect:()=>cr,ref:()=>io,registerComponent:()=>Or,registerDisposer:()=>A,resolveComponent:()=>De,rp:()=>Kt,rt:()=>Ut,ruby:()=>Vt,s:()=>Wt,samp:()=>Gt,script:()=>vn,section:()=>at,select:()=>Kn,setGlobalErrorHandler:()=>Jr,show:()=>Hr,signal:()=>E,slot:()=>Qn,small:()=>Jt,source:()=>bn,span:()=>S,stop:()=>hr,store:()=>oo,strict:()=>ho,strictEffect:()=>yo,strong:()=>Qt,style:()=>z,sub:()=>Yt,summary:()=>Jn,sup:()=>Zt,svg:()=>gn,symbol:()=>xr,table:()=>Cn,tagFactory:()=>c,tbody:()=>An,td:()=>_n,template:()=>Yn,text:()=>lr,textarea:()=>Un,tfoot:()=>Nn,th:()=>Ln,thead:()=>Mn,time:()=>Xt,title:()=>st,tr:()=>Rn,track:()=>an,transition:()=>ko,trapFocus:()=>Vr,tspan:()=>dr,u:()=>en,ul:()=>Nt,unregisterComponent:()=>Pr,untracked:()=>Q,use:()=>yr,var_:()=>tn,video:()=>cn,watch:()=>ro,when:()=>Br,withSSR:()=>eo,writable:()=>po});function _(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:typeof __SIBU_DEV__<"u"?__SIBU_DEV__:typeof process<"u"&&process.env?.NODE_ENV!=="production"}var Ze=_();function L(e,t){if(Ze&&!e)throw new Error(`[Sibu] ${t}`)}function M(e){Ze&&console.warn(`[Sibu] ${e}`)}function $(e){let t=e.replace(/[\x00-\x20\x7f-\x9f]+/g,"").trim();if(!t)return"";let n=t.toLowerCase();return n.startsWith("javascript:")||n.startsWith("data:")||n.startsWith("vbscript:")||n.startsWith("blob:")?"":t}function _e(e){let t=e.toLowerCase().replace(/\s+/g,"");return t.includes("url(")||t.includes("expression(")||t.includes("javascript:")||t.includes("-moz-binding")?"":e}var zo=new Set(["href","src","action","formaction","cite","poster","background","srcset"]);function j(e){return zo.has(e)}var Io=_(),G=new Array(32),J=32,F=-1,B=null,qo=new WeakMap,K="__s",H=0,C=[],R=new Set;function re(e){try{e()}catch(t){Io&&M(`Subscriber threw during notification: ${t instanceof Error?t.message:String(t)}`)}}var fe=0,me=!1;function x(e,t){t||(t=e),Xe(t),++F,F>=J&&(J*=2,G.length=J),G[F]=t,B=t;try{e()}finally{F--,B=F>=0?G[F]:null}return()=>Xe(t)}function $o(){fe===0&&(++F,F>=J&&(J*=2,G.length=J),G[F]=null,B=null,me=!0),fe++}function jo(){fe--,fe===0&&(F--,B=F>=0?G[F]:null,me=!1)}function Q(e){$o();try{return e()}finally{jo()}}function Y(e){if(!B)return;let t=B;if(t._dep===e)return;let n=t._deps;if(n){if(n.has(e))return;n.add(e)}else if(t._dep!==void 0){let o=new Set;o.add(t._dep),o.add(e),t._deps=o,t._dep=void 0}else t._dep=e;let r=e[K];r||(r=new Set,qo.set(e,r),e[K]=r),r.add(B),r.size===1?e.__f=B:e.__f!==void 0&&(e.__f=void 0)}function et(e){let t=e[K];if(t)for(let n of t)n._c?W(n):R.has(n)||(R.add(n),C.push(n))}function tt(){if(!(H>0)){H++;try{let e=0;for(;e<C.length;)re(C[e]),e++}finally{C.length=0,R.clear(),H--}}}function W(e){e();let t=e._sig;for(;t;){let n=t.__f;if(n){if(n._c){let i=n._sig;i._d=!0,t=i;continue}R.has(n)||(R.add(n),C.push(n));break}let r=t[K];if(!r)break;let o;for(let i of r)if(i._c){i();let s=i._sig;s&&!o?o=s:s&&W(i)}else R.has(i)||(R.add(i),C.push(i));t=o}}function be(e){let t=e.__f;if(t){if(H>0){t._c?W(t):R.has(t)||(R.add(t),C.push(t));return}H++;try{t._c?W(t):re(t);let r=0;for(;r<C.length;)re(C[r]),r++}finally{C.length=0,R.clear(),H--}return}let n=e[K];if(!(!n||n.size===0)){if(H>0){for(let r of n)r._c?W(r):R.has(r)||(R.add(r),C.push(r));return}H++;try{let r=0;for(let i of n)C[r++]=i;for(let i=0;i<r;i++)C[i]._c&&W(C[i]);for(let i=0;i<r;i++)C[i]._c||R.has(C[i])||re(C[i]);let o=r;for(;o<C.length;)re(C[o]),o++}finally{C.length=0,R.clear(),H--}}}function Xe(e){let t=e,n=t._dep;if(n!==void 0){let o=n[K];o&&(o.delete(e),n.__f===e&&(n.__f=void 0)),t._dep=void 0;return}let r=t._deps;if(!(!r||r.size===0)){for(let o of r){let i=o[K];i&&(i.delete(e),o.__f===e&&(o.__f=void 0))}r.clear()}}var ge=_();function Ko(e){if(e.length<3)return!1;let t=e.toLowerCase();return t[0]==="o"&&t[1]==="n"&&t.charCodeAt(2)>=97&&t.charCodeAt(2)<=122}function he(e,t,n){if(Ko(t))return ge&&M(`bindAttribute: refusing to bind event-handler attribute "${t}". Use on:{ ${t.slice(2)}: fn } instead.`),()=>{};function r(){let i;try{i=n()}catch(a){ge&&M(`bindAttribute: getter for "${t}" threw: ${a instanceof Error?a.message:String(a)}`);return}if(typeof i=="boolean"){t in e&&(t==="checked"||t==="disabled"||t==="selected")?e[t]=i:i?e.setAttribute(t,""):e.removeAttribute(t);return}let s=String(i);(t==="value"||t==="checked")&&t in e?e[t]=t==="checked"?!!i:s:e.setAttribute(t,j(t)?$(s):s)}return x(r)}function Ne(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(l){ge&&M(`bindDynamic: name getter threw: ${l instanceof Error?l.message:String(l)}`);return}let a;try{a=typeof n=="function"?n():n}catch(l){ge&&M(`bindDynamic: value getter threw: ${l instanceof Error?l.message:String(l)}`);return}if((s[0]==="o"||s[0]==="O")&&(s[1]==="n"||s[1]==="N"))return;r!==null&&r!==s&&e.removeAttribute(r);let d=String(a);(s==="value"||s==="checked")&&s in e?e[s]=s==="checked"?!!a:d:e.setAttribute(s,j(s)?$(d):d),r=s}let i=x(o);return()=>{i(),r!==null&&e.removeAttribute(r)}}var Uo=_();function U(e,t){let n=[];function r(){let o;try{o=t()}catch(l){Uo&&M(`bindChildNode: getter threw: ${l instanceof Error?l.message:String(l)}`);return}if(o==null||typeof o=="boolean"){for(let l=0;l<n.length;l++){let u=n[l];u.parentNode&&u.parentNode.removeChild(u)}n.length=0;return}let i=e.parentNode;if(!i){n.length=0;return}let s;if(Array.isArray(o)){s=[];for(let l=0;l<o.length;l++){let u=o[l];u==null||typeof u=="boolean"||s.push(u instanceof Node?u:document.createTextNode(String(u)))}}else s=[o instanceof Node?o:document.createTextNode(String(o))];let a=n.length>0&&s.length>0?new Set:void 0;if(a){for(let l=0;l<s.length;l++)for(let u=0;u<n.length;u++)if(s[l]===n[u]){a.add(s[l]);break}}for(let l=0;l<n.length;l++){let u=n[l];a?.has(u)||u.parentNode&&u.parentNode.removeChild(u)}let d=e.nextSibling;for(let l=0;l<s.length;l++){let u=s[l];a?.has(u)&&u.parentNode===i?u.nextSibling!==d&&i.insertBefore(u,d):i.insertBefore(u,d)}n=s}return x(r)}var ye=new WeakMap,Le=_(),oe=0;function A(e,t){let n=ye.get(e);n||(n=[],ye.set(e,n)),n.push(t),Le&&oe++}function O(e){let t=[e],n=[];for(;t.length>0;){let r=t.pop();n.push(r);let o=r.childNodes;for(let i=0;i<o.length;i++)t.push(o[i])}for(let r=n.length-1;r>=0;r--){let o=n[r],i=ye.get(o);if(i){Le&&(oe-=i.length);for(let s of i)s();ye.delete(o)}}}function nt(e=0){return Le?(e>0&&oe>e&&M(`checkLeaks: ${oe} active DOM bindings detected. Expected \u2264${e}. This may indicate a component was removed from the DOM without calling dispose().`),oe):0}var k="http://www.w3.org/2000/svg",rt=new Map;function Vo(e){let t=rt.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),rt.set(e,t)),t}function Wo(e,t){if(typeof t=="function"){let r=x(()=>{e.setAttribute("style",t())});A(e,r);return}if(typeof t=="string"){e.setAttribute("style",t);return}let n=e;for(let r in t){let o=t[r],i=Vo(r);if(typeof o=="function"){let s=o,a=x(()=>{n.style.setProperty(i,_e(String(s())))});A(e,a)}else n.style.setProperty(i,_e(String(o)))}}function Go(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=x(()=>{e.setAttribute("class",t())});A(e,i);return}let n=t,r=!1,o="";for(let i in n){let s=n[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=x(()=>{let a="";for(let d in n){let l=n[d];(typeof l=="function"?l():l)&&(a=a?`${a} ${d}`:d)}e.setAttribute("class",a)});A(e,s)}else e.setAttribute("class",o)}function Me(e,t){if(typeof t=="string"){e.textContent=t;return}if(typeof t=="number"){e.textContent=String(t);return}if(!(typeof t=="boolean"||t==null)){if(typeof t=="function"){let n=document.createComment("");e.appendChild(n),A(e,U(n,t));return}if(t instanceof Node){e.appendChild(t);return}if(Array.isArray(t))for(let n=0;n<t.length;n++){let r=t[n];if(typeof r=="function"){let o=document.createComment("");e.appendChild(o),A(e,U(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),A(e,U(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 c=(e,t)=>(n,r)=>{let o=t?document.createElementNS(t,e):document.createElement(e);if(n===void 0)return o;if(typeof n=="string")return r!==void 0?(o.setAttribute("class",n),Me(o,r),o):(o.textContent=n,o);if(typeof n=="number")return o.textContent=String(n),o;if(Array.isArray(n)||n instanceof Node||typeof n=="function")return Me(o,n),o;let i=n,s=i.class;s!=null&&Go(o,s);let a=i.id;a!=null&&(o.id=a);let d=r!==void 0?r:i.nodes;d!=null&&Me(o,d);let l=i.on;if(l)for(let m in l)o.addEventListener(m,l[m]);let u=i.style;u!=null&&Wo(o,u);let f=i.ref;f&&(f.current=o);for(let m in i)switch(m){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{let p=i[m];if(p==null||m[0]==="o"&&m[1]==="n")continue;if(typeof p=="function")A(o,he(o,m,p));else if(typeof p=="boolean")m in o&&(m==="checked"||m==="disabled"||m==="selected")?o[m]=p:p?o.setAttribute(m,""):o.removeAttribute(m);else{let b=String(p);o.setAttribute(m,j(m)?$(b):b)}}}return i.onElement&&typeof i.onElement=="function"&&i.onElement(o),o};var Pi=c("html"),ot=c("head"),it=c("body"),st=c("title"),h=c("div"),S=c("span"),at=c("section"),ct=c("article"),lt=c("header"),dt=c("footer"),ut=c("nav"),pt=c("main"),ft=c("aside"),mt=c("address"),xe=c("p"),bt=c("h1"),gt=c("h2"),ve=c("h3"),ht=c("h4"),yt=c("h5"),xt=c("h6"),vt=c("blockquote"),Tt=c("dd"),kt=c("dl"),Et=c("dt"),St=c("figcaption"),wt=c("figure"),Ct=c("hr"),At=c("li"),_t=c("ol"),Nt=c("ul"),Te=c("pre"),Lt=c("a"),Mt=c("abbr"),Rt=c("b"),Ot=c("bdi"),Pt=c("bdo"),Dt=c("br"),Ft=c("cite"),ke=c("code"),Ht=c("data"),Bt=c("dfn"),zt=c("em"),It=c("i"),qt=c("kbd"),$t=c("mark"),jt=c("q"),Kt=c("rp"),Ut=c("rt"),Vt=c("ruby"),Wt=c("s"),Gt=c("samp"),Jt=c("small"),Qt=c("strong"),Yt=c("sub"),Zt=c("sup"),Xt=c("time"),en=c("u"),tn=c("var"),nn=c("area"),rn=c("audio"),on=c("img"),sn=c("map"),an=c("track"),cn=c("video"),ln=c("embed"),dn=c("iframe"),un=c("object"),pn=c("param"),fn=c("picture"),mn=c("portal"),bn=c("source"),gn=c("svg",k),hn=c("math"),yn=c("canvas"),xn=c("noscript"),vn=c("script"),Tn=c("del"),kn=c("ins"),En=c("caption"),Sn=c("col"),wn=c("colgroup"),Cn=c("table"),An=c("tbody"),_n=c("td"),Nn=c("tfoot"),Ln=c("th"),Mn=c("thead"),Rn=c("tr"),Z=c("button"),On=c("datalist"),Pn=c("fieldset"),Dn=c("form"),Fn=c("input"),Hn=c("label"),Bn=c("legend"),zn=c("meter"),In=c("optgroup"),qn=c("option"),$n=c("output"),jn=c("progress"),Kn=c("select"),Un=c("textarea"),Vn=c("details"),Wn=c("dialog"),Gn=c("menu"),Jn=c("summary"),Qn=c("slot"),Yn=c("template"),Zn=c("base"),Xn=c("link"),er=c("meta"),z=c("style"),tr=c("circle",k),nr=c("ellipse",k),rr=c("g",k),or=c("line",k),ir=c("path",k),sr=c("polygon",k),ar=c("polyline",k),cr=c("rect",k),lr=c("text",k),dr=c("tspan",k),ur=c("defs",k),pr=c("clipPath",k),fr=c("mask",k),mr=c("pattern",k),br=c("linearGradient",k),gr=c("radialGradient",k),hr=c("stop",k),yr=c("use",k),xr=c("symbol",k),vr=c("marker",k),Tr=c("center"),kr=c("font"),Er=c("marquee"),Sr=e=>c(e);var Jo=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),wr=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),Cr=new WeakMap;function Qo(e){let t=e.length-1,n=e[0];for(let p=0;p<t;p++)n+=`\0${p}\0${e[p+1]}`;let r=0,o=n.length;function i(){for(;r<o&&(n[r]===" "||n[r]===" "||n[r]===`
2
- `||n[r]==="\r");)r++}function s(){if(n.charCodeAt(r)!==0)return-1;let p=r;r++;let b=0;for(;r<o&&n.charCodeAt(r)!==0;)b=b*10+(n.charCodeAt(r)-48),r++;return r<o&&r++,b<0||b>=t?(r=p,-1):b}function a(){let p=r;for(;r<o;){let b=n.charCodeAt(r);if(b>=97&&b<=122||b>=65&&b<=90||b>=48&&b<=57||b===45)r++;else break}return n.slice(p,r)}function d(){if(i(),n[r]!=="=")return{kind:"bool"};r++,i();let p=s();if(p>=0)return{kind:"expr",idx:p};let b=n[r];if(b==='"'||b==="'"){r++;let y=[],D=[],q="";for(;r<o&&n[r]!==b;){let ce=s();ce>=0?(y.push(q),q="",D.push(ce)):q+=n[r++]}return r<o&&r++,y.push(q),D.length===0?{kind:"static",value:y[0]}:{kind:"mixed",statics:y,exprs:D}}let T=r;for(;r<o;){let y=n.charCodeAt(r);if(y===32||y===9||y===10||y===13||y===62||y===47)break;r++}return{kind:"static",value:n.slice(T,r)}}function l(){let p=[];for(;r<o&&(i(),!(n[r]===">"||n[r]==="/"));){let b=r;for(;r<o;){let y=n.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 T=n.slice(b,r);if(!T)break;let v=d();T.startsWith("on:")?v.kind==="expr"&&p.push({t:3,name:T.slice(3),idx:v.idx}):v.kind==="bool"?p.push({t:4,name:T}):v.kind==="static"?p.push({t:0,name:T,value:v.value}):v.kind==="expr"?p.push({t:1,name:T,idx:v.idx}):v.kind==="mixed"&&p.push({t:2,name:T,statics:v.statics,exprs:v.exprs})}return p}function u(p){return p.replace(/\s+/g," ")}function f(p){let b="";for(;r<o&&n[r]!=="<";){let v=s();if(v>=0){let y=u(b);y&&p.push({t:1,value:y}),b="",p.push({t:2,idx:v})}else b+=n[r++]}let T=u(b);T&&p.push({t:1,value:T})}function m(){let p=[];for(;r<o&&!(n[r]==="<"&&r+1<o&&n[r+1]==="/");)if(n[r]==="<"){r++;let b=a(),T=l();i();let v=Jo.has(b),y=n[r]==="/";if(y&&r++,r<o&&r++,v||y)p.push({t:0,el:{tag:b,svg:wr.has(b),attrs:T,children:[]}});else{let D=m();n[r]==="<"&&r+1<o&&n[r+1]==="/"&&(r+=2,a(),i(),r<o&&n[r]===">"&&r++),p.push({t:0,el:{tag:b,svg:wr.has(b),attrs:T,children:D}})}}else f(p);return p}return m()}function Re(e,t){let n=e.svg?document.createElementNS(k,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:n.setAttribute(o.name,o.value);break;case 1:{let i=o.name;if(i[0]==="o"&&i[1]==="n")break;let s=t[o.idx];if(typeof s=="function")A(n,he(n,i,s));else if(s!=null){let a=String(s);n.setAttribute(i,j(i)?$(a):a)}break}case 2:{let i=o.statics[0];for(let s=0;s<o.exprs.length;s++)i+=String(t[o.exprs[s]])+o.statics[s+1];n.setAttribute(o.name,i);break}case 3:n.addEventListener(o.name,t[o.idx]);break;case 4:n.setAttribute(o.name,"");break}}for(let r=0;r<e.children.length;r++){let o=e.children[r];switch(o.t){case 0:n.appendChild(Re(o.el,t));break;case 1:n.appendChild(document.createTextNode(o.value));break;case 2:{let i=t[o.idx];if(typeof i=="function"){let s=document.createComment("");n.appendChild(s),A(n,U(s,i))}else if(i instanceof Node)n.appendChild(i);else if(Array.isArray(i))for(let s=0;s<i.length;s++){let a=i[s];a instanceof Node?n.appendChild(a):a!=null&&typeof a!="boolean"&&n.appendChild(document.createTextNode(String(a)))}else i!=null&&typeof i!="boolean"&&n.appendChild(document.createTextNode(String(i)));break}}}return n}function Oe(e,...t){let n=Cr.get(e);if(n||(n=Qo(e),Cr.set(e,n)),n.length===1&&n[0].t===0)return Re(n[0].el,t);let r=document.createElement("div");for(let o=0;o<n.length;o++){let i=n[o];switch(i.t){case 0:r.appendChild(Re(i.el,t));break;case 1:r.appendChild(document.createTextNode(i.value));break;case 2:{let s=t[i.idx];if(s instanceof Node)r.appendChild(s);else if(typeof s=="function"){let a=document.createComment("bind:htm");r.appendChild(a),A(r,U(a,s))}else if(Array.isArray(s))for(let a=0;a<s.length;a++){let d=s[a];d instanceof Node?r.appendChild(d):d!=null&&typeof d!="boolean"&&r.appendChild(document.createTextNode(String(d)))}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 Ar(e,t){if(!t)throw new Error("[Sibu] mount: container element not found. Make sure the DOM element exists before calling mount().");L(typeof e=="function"||e instanceof Node,"mount: first argument must be a component function or a DOM Node.");let n=typeof performance<"u"?performance.now():0,r=typeof e=="function"?e():e,o=typeof performance<"u"?performance.now()-n:0;t.appendChild(r);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("app:init",{rootElement:r,container:t,duration:o}),{node:r,unmount(){i&&i.emit("app:unmount",{rootElement:r}),O(r),r.parentNode&&r.parentNode.removeChild(r)}}}var Yo=_();function _r(e){return typeof e=="function"?_r(e()):e instanceof Node?e:document.createTextNode(String(e))}function Zo(e,t){if(t===0)return[];let n=[],r=new Array(t);for(let a=0;a<t;a++){let d=e[a],l=0,u=n.length;for(;l<u;){let f=l+u>>1;e[n[f]]<d?l=f+1:u=f}n[l]=a,r[a]=l>0?n[l-1]:-1}let o=n.length,i=new Array(o),s=n[o-1];for(let a=o-1;a>=0;a--)i[a]=s,s=r[s];return i}function Nr(e,t,n){L(typeof e=="function","each: first argument must be a function that returns an array."),L(typeof t=="function","each: second argument must be a render function."),L(n&&typeof n.key=="function","each: options.key must be a function that returns a unique key per item.");let r=document.createComment("each:anchor"),o=document.createComment("each:end"),i=[],s=[],a=i,d=0,l=new Map,u=new Map,f=[],m=[],p=new Uint8Array(0),b=new Map,T=[],v=[],y=new Map,D=!1,q=!1,ce=n.key,Ve=()=>{let We=e(),w=We.length,le=r.parentNode;if(!le)return;q||(le.insertBefore(o,r.nextSibling),q=!0),m.length<w&&(m=new Array(w));for(let g=0;g<w;g++)m[g]=ce(We[g]);let te=m;f.length<w&&(f=new Array(w)),u.clear(),y.clear();for(let g=0;g<w;g++)y.set(te[g],g);for(let g=0;g<w;g++){let N=te[g],Je=l.get(N),ne;if(Je!==void 0)ne=Je;else{let Qe=N,Ro=()=>e()[y.get(Qe)],Oo=()=>y.get(Qe);try{ne=_r(t(Ro,Oo))}catch(Ce){Yo&&M(`each: render threw for item at index ${g} (key="${te[g]}"): ${Ce instanceof Error?Ce.message:String(Ce)}`),ne=document.createComment(`each:error:${g}`)}}u.set(N,ne),f[g]=ne}for(let[g,N]of l)u.has(g)||(O(N),N.parentNode&&le.removeChild(N));if(w===0){d=0;let g=l;l=u,u=g;return}b.clear();for(let g=0;g<d;g++)b.set(a[g],g);T.length<w&&(T=new Array(w),v=new Array(w));let de=0;for(let g=0;g<w;g++){let N=b.get(te[g]);N!==void 0&&(T[de]=g,v[de]=N,de++)}let Ge=Zo(v,de);p.length<w?p=new Uint8Array(w):p.fill(0,0,w);for(let g=0;g<Ge.length;g++)p[T[Ge[g]]]=1;let ue=o;for(let g=w-1;g>=0;g--){let N=f[g];p[g]||N.nextSibling!==ue&&le.insertBefore(N,ue),ue=N}let pe=a===i?s:i;pe.length<w&&(pe.length=w);for(let g=0;g<w;g++)pe[g]=te[g];a=pe,d=w;let Mo=l;l=u,u=Mo,D=!0};return x(Ve),D||queueMicrotask(()=>{!D&&r.parentNode&&Ve()}),r}function Mr(e){let t=document.createDocumentFragment();for(let n of e)if(!(n==null||typeof n=="boolean"))if(Array.isArray(n))for(let r of n)r==null||typeof r=="boolean"||t.appendChild(Lr(r));else t.appendChild(Lr(n));return t}function Lr(e){if(e==null)return document.createTextNode("");if(e instanceof Node)return e;if(typeof e=="function"){let t=e();return t instanceof Node?t:document.createTextNode(String(t??""))}return document.createTextNode(String(e))}function Rr(e,t){let n=document.createComment("portal"),r=t||document.body,o=null;queueMicrotask(()=>{try{o=e(),r.appendChild(o)}catch(s){console.error("[Portal] Render error:",s)}});let i=new MutationObserver(()=>{!n.isConnected&&o&&(o.remove(),o=null,i.disconnect())});return queueMicrotask(()=>{n.parentNode&&i.observe(n.parentNode,{childList:!0})}),n}var Pe=new Map;function Or(e,t){Pe.set(e,t)}function Pr(e){Pe.delete(e)}function De(e){let t=Pe.get(e);return t?t():h({nodes:`[Component "${e}" not found]`})}function Dr(e){let t=h({class:"sibu-dynamic"});function n(){let r=e(),o;typeof r=="function"?o=r():o=De(r);for(let i of Array.from(t.childNodes))O(i);t.replaceChildren(o)}return x(n),t}function Fr(e,t="default"){return e?.[t]}function Hr(e,t){return x(()=>{t.style.display=e()?"":"none"}),t}function Br(e,t,n){let r=document.createComment("when"),o=null,i,s=!1,a=()=>{let d=e(),l=r.parentNode;if(!l||s&&d===i)return;i=d,o?.parentNode&&(O(o),o.parentNode.removeChild(o),o=null);let u=d?t():n?n():null;if(u!=null){let f=u instanceof Node?u:document.createTextNode(String(u));l.insertBefore(f,r.nextSibling),o=f}s=!0};return x(a),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function zr(e,t,n){let r=document.createComment("match"),o=null,i,s=!1,a=()=>{let d=String(e()),l=r.parentNode;if(!l||s&&d===i)return;i=d,o?.parentNode&&(O(o),o.parentNode.removeChild(o),o=null);let u=t[d]||n;if(u){let f=u();if(f!=null){let m=f instanceof Node?f:document.createTextNode(String(f));l.insertBefore(m,r.nextSibling),o=m}}s=!0};return x(a),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function Ir(e,t,n){let r=document.createComment("keep-alive"),o=new Map,i=[],s=n?.max??0,a,d=null,l=!1,u=()=>{let f=e(),m=r.parentNode;if(!m||l&&f===a)return;d?.parentNode&&m.removeChild(d),a=f;let p=o.get(f);if(p){let b=i.indexOf(f);b!==-1&&(i.splice(b,1),i.push(f))}else{let b=t[f];if(!b){d=null,l=!0;return}if(p=b(),o.set(f,p),i.push(f),s>0&&i.length>s){let T=i.shift(),v=o.get(T);v&&(O(v),v.parentNode&&v.parentNode.removeChild(v),o.delete(T))}}m.insertBefore(p,r.nextSibling),d=p,l=!0};return x(u),l||queueMicrotask(()=>{!l&&r.parentNode&&u()}),r}function qr(e,t,n){let r=t(e,n);typeof r=="function"&&A(e,r)}var $r=(e,t)=>{let n=r=>{e.contains(r.target)||t()};return document.addEventListener("pointerdown",n,!0),()=>document.removeEventListener("pointerdown",n,!0)},jr=(e,t)=>{let n=t.duration??500,r=null,o=()=>{r=setTimeout(()=>{t.callback(),r=null},n)},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)}},Kr=(e,t)=>{let n=()=>{let r=typeof t=="function"?t():e.textContent??"";navigator.clipboard.writeText(r)};return e.addEventListener("click",n),()=>e.removeEventListener("click",n)},Ur=e=>{let t=()=>{e.style.overflow="hidden",e.style.height="auto",e.style.height=`${e.scrollHeight}px`};return t(),e.addEventListener("input",t),()=>e.removeEventListener("input",t)},Vr=e=>{let t='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])',n=r=>{if(r.key!=="Tab")return;let o=Array.from(e.querySelectorAll(t));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",n),()=>e.removeEventListener("keydown",n)};var V=null;function Wr(e,t){try{let n=e();return n&&typeof n.then=="function"&&n.catch(r=>{t?t(r,"async"):V?V(r,"async"):console.error("Unhandled async error in Sibu.catchError:",r)}),n}catch(n){return t?t(n,"sync"):V?V(n,"sync"):console.error("Unhandled error in Sibu.catchError:",n),null}}async function Gr(e,t){try{return await e()}catch(n){return t?t(n,"async"):V?V(n,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",n),null}}function Jr(e){V=e}var Fe=0;function Qr(e="sibu"){return Fe++,`${e}-${Fe}`}function Yr(){Fe=0}var ie=0,He=new Set;function Ee(e){ie++;try{return e()}finally{ie--,ie===0&&Xo()}}function X(e){return ie===0?!1:(He.add(e),!0)}function Zr(){return ie>0}function Xo(){for(let e of He)et(e);He.clear(),tt()}var Xr=globalThis,Be=_();function E(e,t){let n={value:e},r=Be?t?.name:void 0,o=t?.equals;r&&(n.__name=r);function i(){return Y(n),n.value}i.__signal=n,r&&(i.__name=r);function s(a){let d=typeof a=="function"?a(n.value):a;if(!(o?o(n.value,d):Object.is(d,n.value))){if(Be){let l=n.value;n.value=d;let u=Xr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;u&&u.emit("signal:update",{signal:n,name:r,oldValue:l,newValue:d})}else n.value=d;X(n)||be(n)}}if(Be){let a=Xr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&a.emit("signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}var Se=!1;function ee(){return Se}function ze(){Se=!0}function Ie(){Se=!1}function eo(e){let t=Se;ze();try{return e()}finally{t||Ie()}}var to=globalThis;function no(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,Q(()=>t(o,void 0));else{let i=n;n=o,Q(()=>t(o,i))}}}function P(e,t){if(L(typeof e=="function","effect: argument must be a function."),ee())return()=>{};let n=t?.onError,r=n?()=>{try{e()}catch(a){n(a)}}:e,o=()=>{},i=()=>{o(),o=x(r,i)};o=x(r,i);let s=to.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return s&&s.emit("effect:create",{effectFn:e}),()=>{let a=to.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&a.emit("effect:destroy",{effectFn:e}),o()}}function I(e,t){L(typeof e=="function","derived: argument must be a getter function.");let n=t?.name,r={};r._d=!1,r._g=e;let o=()=>{r._d||(r._d=!0)};o._c=1,o._sig=r,x(()=>{r._d=!1,r._v=e()},o);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;function s(){if(me)return r._d&&(r._d=!1,r._v=e()),r._v;if(Y(r),r._d){let a=r._v;x(()=>{r._d=!1,r._v=e()},o),i&&a!==r._v&&i.emit("computed:update",{signal:r,oldValue:a,newValue:r._v})}return r._v}return n&&(s.__name=n,r.__name=n),s.__signal=r,i&&i.emit("computed:create",{signal:r,name:n,getter:s}),s}function ro(e,t){if(L(typeof e=="function","watch: first argument must be a getter function."),L(typeof t=="function","watch: second argument must be a callback function."),ee())return()=>{};let n,r=!0;return x(()=>{let s=e();if(r){n=s,r=!1;return}Object.is(s,n)||(t(s,n),n=s)})}function oo(e){L(e!==null&&typeof e=="object"&&!Array.isArray(e),"store: argument must be a plain object. For arrays, use array() instead.");let t={};Object.keys(e).forEach(d=>{let[l,u]=E(e[d]);t[d]=[l,u]});let n=new Proxy({},{get(d,l){if(l in t){let u=t[l][0];return u()}},set(){throw new Error("[Sibu] store: Direct mutation is not allowed. Use actions.setState() to update store properties.")}}),r=()=>{let d={};return Object.keys(t).forEach(l=>{d[l]=t[l][0]()}),d};return[n,{setState:d=>{let l=r(),u=typeof d=="function"?d(l):d;Object.entries(u).forEach(([f,m])=>{f in t&&t[f][1](m)})},reset:()=>{Object.keys(e).forEach(d=>{let l=t[d][1];l(e[d])})},subscribe:d=>{let l=!0;return P(()=>{let u=r();if(l){l=!1;return}d(u)})},subscribeKey:(d,l)=>{let u,f=!0;return P(()=>{let m=t[d][0]();if(f){u=m,f=!1;return}if(!Object.is(m,u)){let p=u;u=m,l(m,p)}})},getSnapshot:r}]}function io(e){let[t,n]=E(e);return{get current(){return t()},set current(r){n(r)}}}function so(e){return I(e)}function ao(e){return I(e)}function co(e=[]){let[t,n]=E([...e]);return[t,{push(...o){n(i=>[...i,...o])},pop(){let o;return n(i=>{let s=[...i];return o=s.pop(),s}),o},shift(){let o;return n(i=>{let s=[...i];return o=s.shift(),s}),o},unshift(...o){n(i=>[...o,...i])},splice(o,i=0,...s){let a=[];return n(d=>{let l=[...d];return a=l.splice(o,i,...s),l}),a},remove(o){n(i=>i.filter((s,a)=>a!==o))},removeWhere(o){n(i=>{let s=i.findIndex(o);return s===-1?i:i.filter((a,d)=>d!==s)})},set(o){n([...o])},update(o,i){n(s=>s.map((a,d)=>d===o?i:a))},updateWhere(o,i){n(s=>s.map(a=>o(a)?i(a):a))},sort(o){n(i=>[...i].sort(o))},reverse(){n(o=>[...o].reverse())},filter(o){n(i=>i.filter(o))},map(o){n(i=>i.map(o))},clear(){n([])}}]}function lo(e=[]){let t=[...e],n=null,r={};function o(){n=null,X(r)||be(r)}function i(){return Y(r),n===null&&(n=Object.freeze([...t])),n}return[i,{push(...a){a.length!==0&&(t.push(...a),o())},pop(){if(t.length===0)return;let a=t.pop();return o(),a},shift(){if(t.length===0)return;let a=t.shift();return o(),a},unshift(...a){a.length!==0&&(t.unshift(...a),o())},splice(a,d=0,...l){let u=t.splice(a,d,...l);return(u.length>0||l.length>0)&&o(),u},remove(a){a<0||a>=t.length||(t.splice(a,1),o())},removeWhere(a){let d=t.findIndex(a);d!==-1&&(t.splice(d,1),o())},set(a){t=[...a],o()},update(a,d){a<0||a>=t.length||Object.is(t[a],d)||(t[a]=d,o())},updateWhere(a,d){let l=!1;for(let u=0;u<t.length;u++)if(a(t[u])){let f=d(t[u]);Object.is(t[u],f)||(t[u]=f,l=!0)}l&&o()},sort(a){t.length<=1||(t.sort(a),o())},reverse(){t.length<=1||(t.reverse(),o())},filter(a){let d=t.filter(a);d.length!==t.length&&(t=d,o())},map(a){let d=!1;for(let l=0;l<t.length;l++){let u=a(t[l],l);Object.is(t[l],u)||(t[l]=u,d=!0)}d&&o()},clear(){t.length!==0&&(t=[],o())}}]}function se(e,t,n){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!=typeof t||typeof e!="object")return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.toString()===t.toString();if(n||(n=new Set),n.has(e))return!0;if(n.add(e),Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:e.every((i,s)=>se(i,t[s],n));let r=Object.keys(e),o=Object.keys(t);return r.length!==o.length?!1:r.every(i=>se(e[i],t[i],n))}function uo(e){return E(e,{equals:(t,n)=>se(t,n)})}function po(e,t,n){return[I(e,n),i=>{Ee(()=>t(i))}]}function fo(e,t){let[n,r]=E(t),[o,i]=E(!1),[s,a]=E(null),[d,l]=E(0),u=0;return P(()=>{d();let f=++u;i(!0),a(null);let m;try{m=e()}catch(p){a(p),i(!1);return}m.then(p=>{f===u&&(r(p),i(!1))},p=>{f===u&&(a(p),i(!1))})}),{value:n,loading:o,error:s,refresh:()=>l(f=>f+1)}}function ae(e,t){try{e()}catch(n){M(`${t}: callback threw: ${n instanceof Error?n.message:String(n)}`)}}function qe(e,t){if(!(typeof document>"u"))if(t){if(t.isConnected){queueMicrotask(()=>{ae(e,"onMount")});return}let n=new MutationObserver(()=>{t.isConnected&&(n.disconnect(),ae(e,"onMount"))});queueMicrotask(()=>{t.isConnected?ae(e,"onMount"):n.observe(document.body,{childList:!0,subtree:!0})})}else queueMicrotask(()=>{ae(e,"onMount")})}function mo(e,t){let n=()=>{let r=new MutationObserver(()=>{t.isConnected||(r.disconnect(),ae(e,"onUnmount"))});r.observe(document.body,{childList:!0,subtree:!0})};t.isConnected?n():qe(()=>{n()},t)}function bo(e,t){A(t,e)}function go(e){let[t,n]=E(e);return{provide(r){n(r)},use(){return t},get(){return t()},set(r){n(r)}}}function ho(e){let t=e();return _()&&queueMicrotask(()=>{try{e()}catch(n){console.warn("[Sibu strict] second run threw:",n)}}),t}function yo(e){if(!_())return P(e);let t=P(e),n=null;return queueMicrotask(()=>{try{n=P(e)}catch(r){console.warn("[Sibu strictEffect] second run threw:",r)}}),()=>{t(),n&&n()}}function xo(){return new Promise(e=>{queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):e()})})}function To(e){let[t,n]=E(e()),r=!1,o=t(),i=()=>{r=!1,n(o)},s=()=>{r||(r=!0,queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(i):i()}))};return x(()=>{o=e(),s()}),t}var vo=16;function ei(e){let t=globalThis;if(typeof t.requestIdleCallback=="function"){t.requestIdleCallback(e,{timeout:vo*4});return}if(typeof requestAnimationFrame=="function"){requestAnimationFrame(()=>e());return}setTimeout(e,vo)}function ko(){let[e,t]=E(!1);function n(r){t(!0),ei(()=>{let o;try{o=r()}catch{t(!1);return}o&&typeof o.then=="function"?o.then(()=>t(!1),()=>t(!1)):t(!1)})}return{pending:e,start:n}}function $e(e){let t=null;return function(){if(t)return t();let[r,o]=E("loading"),[i,s]=E(null),a=h({class:"sibu-lazy"});return e().then(d=>{t=d.default;let l=t();a.replaceChildren(l),o("loaded")}).catch(d=>{let l=d instanceof Error?d:new Error(String(d));s(l),o("error"),a.replaceChildren(h({class:"sibu-lazy-error",nodes:`Failed to load component: ${l.message}`}))}),a.appendChild(S({class:"sibu-lazy-loading",nodes:"Loading..."})),a}}function je({nodes:e,fallback:t}){let n=h({class:"sibu-suspense"}),r=t();return n.appendChild(r),queueMicrotask(()=>{try{let o=e();if(o.classList.contains("sibu-lazy")){let i=new MutationObserver(()=>{o.querySelector(".sibu-lazy-loading")||(i.disconnect(),n.replaceChildren(o))});i.observe(o,{childList:!0,subtree:!0}),o.querySelector(".sibu-lazy-loading")||n.replaceChildren(o)}else n.replaceChildren(o)}catch{}}),n}var ti=_(),ni=`
1
+ "use strict";var Sibu=(()=>{var _e=Object.defineProperty;var Ro=Object.getOwnPropertyDescriptor;var Oo=Object.getOwnPropertyNames;var Po=Object.prototype.hasOwnProperty;var Ye=(e,t)=>{for(var n in t)_e(e,n,{get:t[n],enumerable:!0})},Do=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Oo(t))!Po.call(e,o)&&o!==n&&_e(e,o,{get:()=>t[o],enumerable:!(r=Ro(t,o))||r.enumerable});return e};var Fo=e=>Do(_e({},"__esModule",{value:!0}),e);var di={};Ye(di,{DynamicComponent:()=>Dr,ErrorBoundary:()=>Co,ErrorDisplay:()=>we,Fragment:()=>Mr,KeepAlive:()=>Ir,Loading:()=>Ao,Portal:()=>Rr,SVG_NS:()=>k,Suspense:()=>je,__resetIdCounter:()=>Yr,a:()=>Lt,abbr:()=>Mt,action:()=>qr,address:()=>mt,area:()=>nn,array:()=>so,article:()=>ct,aside:()=>ft,asyncDerived:()=>uo,audio:()=>rn,autoResize:()=>Ur,b:()=>Rt,base:()=>Zn,batch:()=>ke,bdi:()=>Ot,bdo:()=>Pt,bindDynamic:()=>Ne,blockquote:()=>vt,body:()=>it,br:()=>Dt,button:()=>Y,canvas:()=>yn,caption:()=>En,catchError:()=>Wr,catchErrorAsync:()=>Gr,center:()=>Tr,checkLeaks:()=>nt,circle:()=>tr,cite:()=>Ft,clickOutside:()=>$r,clipPath:()=>pr,code:()=>Te,col:()=>Sn,colgroup:()=>wn,context:()=>mo,copyOnClick:()=>Kr,createId:()=>Qr,customElement:()=>Sr,data:()=>Ht,datalist:()=>On,dd:()=>Tt,deepEqual:()=>ie,deepSignal:()=>co,defer:()=>xo,defs:()=>ur,del:()=>Tn,derived:()=>Se,details:()=>Vn,dfn:()=>Bt,dialog:()=>Wn,disableSSR:()=>Ie,dispose:()=>O,div:()=>h,dl:()=>kt,dt:()=>Et,each:()=>Nr,effect:()=>P,ellipse:()=>nr,em:()=>zt,embed:()=>ln,enableSSR:()=>ze,enqueueBatchedSignal:()=>Z,fieldset:()=>Pn,figcaption:()=>St,figure:()=>wt,font:()=>kr,footer:()=>dt,form:()=>Dn,g:()=>rr,getSlot:()=>Fr,h1:()=>bt,h2:()=>gt,h3:()=>xe,h4:()=>ht,h5:()=>yt,h6:()=>xt,head:()=>ot,header:()=>lt,hr:()=>Ct,html:()=>Oe,i:()=>It,iframe:()=>dn,img:()=>on,input:()=>Fn,ins:()=>kn,isBatching:()=>Zr,isSSR:()=>X,kbd:()=>qt,label:()=>Hn,lazy:()=>$e,legend:()=>Bn,li:()=>_t,line:()=>or,linearGradient:()=>br,link:()=>Xn,longPress:()=>jr,main:()=>pt,map:()=>sn,mark:()=>$t,marker:()=>vr,marquee:()=>Er,mask:()=>fr,match:()=>zr,math:()=>hn,menu:()=>Gn,meta:()=>er,meter:()=>zn,mount:()=>_r,nav:()=>ut,nextTick:()=>ho,noscript:()=>xn,object:()=>un,ol:()=>At,on:()=>no,onCleanup:()=>fo,onMount:()=>qe,onUnmount:()=>po,optgroup:()=>In,option:()=>qn,output:()=>$n,p:()=>ye,param:()=>pn,path:()=>ir,pattern:()=>mr,picture:()=>fn,polygon:()=>sr,polyline:()=>ar,portal:()=>mn,pre:()=>ve,progress:()=>jn,q:()=>jt,radialGradient:()=>gr,reactiveArray:()=>ao,rect:()=>cr,ref:()=>io,registerComponent:()=>Or,registerDisposer:()=>_,resolveComponent:()=>De,rp:()=>Kt,rt:()=>Ut,ruby:()=>Vt,s:()=>Wt,samp:()=>Gt,script:()=>vn,section:()=>at,select:()=>Kn,setGlobalErrorHandler:()=>Jr,show:()=>Hr,signal:()=>E,slot:()=>Qn,small:()=>Jt,source:()=>bn,span:()=>S,stop:()=>hr,store:()=>oo,strict:()=>bo,strictEffect:()=>go,strong:()=>Qt,style:()=>z,sub:()=>Yt,summary:()=>Jn,sup:()=>Zt,svg:()=>gn,symbol:()=>xr,table:()=>Cn,tagFactory:()=>c,tbody:()=>_n,td:()=>An,template:()=>Yn,text:()=>lr,textarea:()=>Un,tfoot:()=>Nn,th:()=>Ln,thead:()=>Mn,time:()=>Xt,title:()=>st,tr:()=>Rn,track:()=>an,transition:()=>vo,trapFocus:()=>Vr,tspan:()=>dr,u:()=>en,ul:()=>Nt,unregisterComponent:()=>Pr,untracked:()=>J,use:()=>yr,var_:()=>tn,video:()=>cn,watch:()=>ro,when:()=>Br,withSSR:()=>eo,writable:()=>lo});var Ue={};Ye(Ue,{DynamicComponent:()=>Dr,ErrorBoundary:()=>Co,ErrorDisplay:()=>we,Fragment:()=>Mr,KeepAlive:()=>Ir,Loading:()=>Ao,Portal:()=>Rr,SVG_NS:()=>k,Suspense:()=>je,__resetIdCounter:()=>Yr,a:()=>Lt,abbr:()=>Mt,action:()=>qr,address:()=>mt,area:()=>nn,array:()=>so,article:()=>ct,aside:()=>ft,asyncDerived:()=>uo,audio:()=>rn,autoResize:()=>Ur,b:()=>Rt,base:()=>Zn,batch:()=>ke,bdi:()=>Ot,bdo:()=>Pt,bindDynamic:()=>Ne,blockquote:()=>vt,body:()=>it,br:()=>Dt,button:()=>Y,canvas:()=>yn,caption:()=>En,catchError:()=>Wr,catchErrorAsync:()=>Gr,center:()=>Tr,checkLeaks:()=>nt,circle:()=>tr,cite:()=>Ft,clickOutside:()=>$r,clipPath:()=>pr,code:()=>Te,col:()=>Sn,colgroup:()=>wn,context:()=>mo,copyOnClick:()=>Kr,createId:()=>Qr,customElement:()=>Sr,data:()=>Ht,datalist:()=>On,dd:()=>Tt,deepEqual:()=>ie,deepSignal:()=>co,defer:()=>xo,defs:()=>ur,del:()=>Tn,derived:()=>Se,details:()=>Vn,dfn:()=>Bt,dialog:()=>Wn,disableSSR:()=>Ie,dispose:()=>O,div:()=>h,dl:()=>kt,dt:()=>Et,each:()=>Nr,effect:()=>P,ellipse:()=>nr,em:()=>zt,embed:()=>ln,enableSSR:()=>ze,enqueueBatchedSignal:()=>Z,fieldset:()=>Pn,figcaption:()=>St,figure:()=>wt,font:()=>kr,footer:()=>dt,form:()=>Dn,g:()=>rr,getSlot:()=>Fr,h1:()=>bt,h2:()=>gt,h3:()=>xe,h4:()=>ht,h5:()=>yt,h6:()=>xt,head:()=>ot,header:()=>lt,hr:()=>Ct,html:()=>Oe,i:()=>It,iframe:()=>dn,img:()=>on,input:()=>Fn,ins:()=>kn,isBatching:()=>Zr,isSSR:()=>X,kbd:()=>qt,label:()=>Hn,lazy:()=>$e,legend:()=>Bn,li:()=>_t,line:()=>or,linearGradient:()=>br,link:()=>Xn,longPress:()=>jr,main:()=>pt,map:()=>sn,mark:()=>$t,marker:()=>vr,marquee:()=>Er,mask:()=>fr,match:()=>zr,math:()=>hn,menu:()=>Gn,meta:()=>er,meter:()=>zn,mount:()=>_r,nav:()=>ut,nextTick:()=>ho,noscript:()=>xn,object:()=>un,ol:()=>At,on:()=>no,onCleanup:()=>fo,onMount:()=>qe,onUnmount:()=>po,optgroup:()=>In,option:()=>qn,output:()=>$n,p:()=>ye,param:()=>pn,path:()=>ir,pattern:()=>mr,picture:()=>fn,polygon:()=>sr,polyline:()=>ar,portal:()=>mn,pre:()=>ve,progress:()=>jn,q:()=>jt,radialGradient:()=>gr,reactiveArray:()=>ao,rect:()=>cr,ref:()=>io,registerComponent:()=>Or,registerDisposer:()=>_,resolveComponent:()=>De,rp:()=>Kt,rt:()=>Ut,ruby:()=>Vt,s:()=>Wt,samp:()=>Gt,script:()=>vn,section:()=>at,select:()=>Kn,setGlobalErrorHandler:()=>Jr,show:()=>Hr,signal:()=>E,slot:()=>Qn,small:()=>Jt,source:()=>bn,span:()=>S,stop:()=>hr,store:()=>oo,strict:()=>bo,strictEffect:()=>go,strong:()=>Qt,style:()=>z,sub:()=>Yt,summary:()=>Jn,sup:()=>Zt,svg:()=>gn,symbol:()=>xr,table:()=>Cn,tagFactory:()=>c,tbody:()=>_n,td:()=>An,template:()=>Yn,text:()=>lr,textarea:()=>Un,tfoot:()=>Nn,th:()=>Ln,thead:()=>Mn,time:()=>Xt,title:()=>st,tr:()=>Rn,track:()=>an,transition:()=>vo,trapFocus:()=>Vr,tspan:()=>dr,u:()=>en,ul:()=>Nt,unregisterComponent:()=>Pr,untracked:()=>J,use:()=>yr,var_:()=>tn,video:()=>cn,watch:()=>ro,when:()=>Br,withSSR:()=>eo,writable:()=>lo});function A(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:typeof __SIBU_DEV__<"u"?__SIBU_DEV__:typeof process<"u"&&process.env?.NODE_ENV!=="production"}var Ze=A();function L(e,t){if(Ze&&!e)throw new Error(`[Sibu] ${t}`)}function M(e){Ze&&console.warn(`[Sibu] ${e}`)}function q(e){let t=e.replace(/[\x00-\x20\x7f-\x9f]+/g,"").trim();if(!t)return"";let n=t.toLowerCase();return n.startsWith("javascript:")||n.startsWith("data:")||n.startsWith("vbscript:")||n.startsWith("blob:")?"":t}function Ae(e){let t=e.toLowerCase().replace(/\s+/g,"");return t.includes("url(")||t.includes("expression(")||t.includes("javascript:")||t.includes("-moz-binding")?"":e}var Ho=new Set(["href","src","action","formaction","cite","poster","background","srcset"]);function $(e){return Ho.has(e)}var Bo=A(),W=new Array(32),G=32,F=-1,B=null,zo=new WeakMap,j="__s",H=0,C=[],R=new Set;function ne(e){try{e()}catch(t){Bo&&M(`Subscriber threw during notification: ${t instanceof Error?t.message:String(t)}`)}}var pe=0,fe=!1;function x(e,t){t||(t=e),Xe(t),++F,F>=G&&(G*=2,W.length=G),W[F]=t,B=t;try{e()}finally{F--,B=F>=0?W[F]:null}return()=>Xe(t)}function Io(){pe===0&&(++F,F>=G&&(G*=2,W.length=G),W[F]=null,B=null,fe=!0),pe++}function qo(){pe--,pe===0&&(F--,B=F>=0?W[F]:null,fe=!1)}function J(e){Io();try{return e()}finally{qo()}}function Q(e){if(!B)return;let t=B;if(t._dep===e)return;let n=t._deps;if(n){if(n.has(e))return;n.add(e)}else if(t._dep!==void 0){let o=new Set;o.add(t._dep),o.add(e),t._deps=o,t._dep=void 0}else t._dep=e;let r=e[j];r||(r=new Set,zo.set(e,r),e[j]=r),r.add(B),r.size===1?e.__f=B:e.__f!==void 0&&(e.__f=void 0)}function et(e){let t=e[j];if(t)for(let n of t)n._c?V(n):R.has(n)||(R.add(n),C.push(n))}function tt(){if(!(H>0)){H++;try{let e=0;for(;e<C.length;)ne(C[e]),e++}finally{C.length=0,R.clear(),H--}}}function V(e){e();let t=e._sig;for(;t;){let n=t.__f;if(n){if(n._c){let i=n._sig;i._d=!0,t=i;continue}R.has(n)||(R.add(n),C.push(n));break}let r=t[j];if(!r)break;let o;for(let i of r)if(i._c){i();let s=i._sig;s&&!o?o=s:s&&V(i)}else R.has(i)||(R.add(i),C.push(i));t=o}}function me(e){let t=e.__f;if(t){if(H>0){t._c?V(t):R.has(t)||(R.add(t),C.push(t));return}H++;try{t._c?V(t):ne(t);let r=0;for(;r<C.length;)ne(C[r]),r++}finally{C.length=0,R.clear(),H--}return}let n=e[j];if(!(!n||n.size===0)){if(H>0){for(let r of n)r._c?V(r):R.has(r)||(R.add(r),C.push(r));return}H++;try{let r=0;for(let i of n)C[r++]=i;for(let i=0;i<r;i++)C[i]._c&&V(C[i]);for(let i=0;i<r;i++)C[i]._c||R.has(C[i])||ne(C[i]);let o=r;for(;o<C.length;)ne(C[o]),o++}finally{C.length=0,R.clear(),H--}}}function Xe(e){let t=e,n=t._dep;if(n!==void 0){let o=n[j];o&&(o.delete(e),n.__f===e&&(n.__f=void 0)),t._dep=void 0;return}let r=t._deps;if(!(!r||r.size===0)){for(let o of r){let i=o[j];i&&(i.delete(e),o.__f===e&&(o.__f=void 0))}r.clear()}}var be=A();function $o(e){if(e.length<3)return!1;let t=e.toLowerCase();return t[0]==="o"&&t[1]==="n"&&t.charCodeAt(2)>=97&&t.charCodeAt(2)<=122}function ge(e,t,n){if($o(t))return be&&M(`bindAttribute: refusing to bind event-handler attribute "${t}". Use on:{ ${t.slice(2)}: fn } instead.`),()=>{};function r(){let i;try{i=n()}catch(a){be&&M(`bindAttribute: getter for "${t}" threw: ${a instanceof Error?a.message:String(a)}`);return}if(typeof i=="boolean"){t in e&&(t==="checked"||t==="disabled"||t==="selected")?e[t]=i:i?e.setAttribute(t,""):e.removeAttribute(t);return}let s=String(i);(t==="value"||t==="checked")&&t in e?e[t]=t==="checked"?!!i:s:e.setAttribute(t,$(t)?q(s):s)}return x(r)}function Ne(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(l){be&&M(`bindDynamic: name getter threw: ${l instanceof Error?l.message:String(l)}`);return}let a;try{a=typeof n=="function"?n():n}catch(l){be&&M(`bindDynamic: value getter threw: ${l instanceof Error?l.message:String(l)}`);return}if((s[0]==="o"||s[0]==="O")&&(s[1]==="n"||s[1]==="N"))return;r!==null&&r!==s&&e.removeAttribute(r);let d=String(a);(s==="value"||s==="checked")&&s in e?e[s]=s==="checked"?!!a:d:e.setAttribute(s,$(s)?q(d):d),r=s}let i=x(o);return()=>{i(),r!==null&&e.removeAttribute(r)}}var jo=A();function K(e,t){let n=[];function r(){let o;try{o=t()}catch(l){jo&&M(`bindChildNode: getter threw: ${l instanceof Error?l.message:String(l)}`);return}if(o==null||typeof o=="boolean"){for(let l=0;l<n.length;l++){let u=n[l];u.parentNode&&u.parentNode.removeChild(u)}n.length=0;return}let i=e.parentNode;if(!i){n.length=0;return}let s;if(Array.isArray(o)){s=[];for(let l=0;l<o.length;l++){let u=o[l];u==null||typeof u=="boolean"||s.push(u instanceof Node?u:document.createTextNode(String(u)))}}else s=[o instanceof Node?o:document.createTextNode(String(o))];let a=n.length>0&&s.length>0?new Set:void 0;if(a){for(let l=0;l<s.length;l++)for(let u=0;u<n.length;u++)if(s[l]===n[u]){a.add(s[l]);break}}for(let l=0;l<n.length;l++){let u=n[l];a?.has(u)||u.parentNode&&u.parentNode.removeChild(u)}let d=e.nextSibling;for(let l=0;l<s.length;l++){let u=s[l];a?.has(u)&&u.parentNode===i?u.nextSibling!==d&&i.insertBefore(u,d):i.insertBefore(u,d)}n=s}return x(r)}var he=new WeakMap,Le=A(),re=0;function _(e,t){let n=he.get(e);n||(n=[],he.set(e,n)),n.push(t),Le&&re++}function O(e){let t=[e],n=[];for(;t.length>0;){let r=t.pop();n.push(r);let o=r.childNodes;for(let i=0;i<o.length;i++)t.push(o[i])}for(let r=n.length-1;r>=0;r--){let o=n[r],i=he.get(o);if(i){Le&&(re-=i.length);for(let s of i)s();he.delete(o)}}}function nt(e=0){return Le?(e>0&&re>e&&M(`checkLeaks: ${re} active DOM bindings detected. Expected \u2264${e}. This may indicate a component was removed from the DOM without calling dispose().`),re):0}var k="http://www.w3.org/2000/svg",rt=new Map;function Ko(e){let t=rt.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),rt.set(e,t)),t}function Uo(e,t){if(typeof t=="function"){let r=x(()=>{e.setAttribute("style",t())});_(e,r);return}if(typeof t=="string"){e.setAttribute("style",t);return}let n=e;for(let r in t){let o=t[r],i=Ko(r);if(typeof o=="function"){let s=o,a=x(()=>{n.style.setProperty(i,Ae(String(s())))});_(e,a)}else n.style.setProperty(i,Ae(String(o)))}}function Vo(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=x(()=>{e.setAttribute("class",t())});_(e,i);return}let n=t,r=!1,o="";for(let i in n){let s=n[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=x(()=>{let a="";for(let d in n){let l=n[d];(typeof l=="function"?l():l)&&(a=a?`${a} ${d}`:d)}e.setAttribute("class",a)});_(e,s)}else e.setAttribute("class",o)}function Me(e,t){if(typeof t=="string"){e.textContent=t;return}if(typeof t=="number"){e.textContent=String(t);return}if(!(typeof t=="boolean"||t==null)){if(typeof t=="function"){let n=document.createComment("");e.appendChild(n),_(e,K(n,t));return}if(t instanceof Node){e.appendChild(t);return}if(Array.isArray(t))for(let n=0;n<t.length;n++){let r=t[n];if(typeof r=="function"){let o=document.createComment("");e.appendChild(o),_(e,K(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),_(e,K(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 c=(e,t)=>(n,r)=>{let o=t?document.createElementNS(t,e):document.createElement(e);if(n===void 0)return o;if(typeof n=="string")return r!==void 0?(o.setAttribute("class",n),Me(o,r),o):(o.textContent=n,o);if(typeof n=="number")return o.textContent=String(n),o;if(Array.isArray(n)||n instanceof Node||typeof n=="function")return Me(o,n),o;let i=n,s=i.class;s!=null&&Vo(o,s);let a=i.id;a!=null&&(o.id=a);let d=r!==void 0?r:i.nodes;d!=null&&Me(o,d);let l=i.on;if(l)for(let m in l)o.addEventListener(m,l[m]);let u=i.style;u!=null&&Uo(o,u);let f=i.ref;f&&(f.current=o);for(let m in i)switch(m){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{let p=i[m];if(p==null||m[0]==="o"&&m[1]==="n")continue;if(typeof p=="function")_(o,ge(o,m,p));else if(typeof p=="boolean")m in o&&(m==="checked"||m==="disabled"||m==="selected")?o[m]=p:p?o.setAttribute(m,""):o.removeAttribute(m);else{let b=String(p);o.setAttribute(m,$(m)?q(b):b)}}}return i.onElement&&typeof i.onElement=="function"&&i.onElement(o),o};var Ri=c("html"),ot=c("head"),it=c("body"),st=c("title"),h=c("div"),S=c("span"),at=c("section"),ct=c("article"),lt=c("header"),dt=c("footer"),ut=c("nav"),pt=c("main"),ft=c("aside"),mt=c("address"),ye=c("p"),bt=c("h1"),gt=c("h2"),xe=c("h3"),ht=c("h4"),yt=c("h5"),xt=c("h6"),vt=c("blockquote"),Tt=c("dd"),kt=c("dl"),Et=c("dt"),St=c("figcaption"),wt=c("figure"),Ct=c("hr"),_t=c("li"),At=c("ol"),Nt=c("ul"),ve=c("pre"),Lt=c("a"),Mt=c("abbr"),Rt=c("b"),Ot=c("bdi"),Pt=c("bdo"),Dt=c("br"),Ft=c("cite"),Te=c("code"),Ht=c("data"),Bt=c("dfn"),zt=c("em"),It=c("i"),qt=c("kbd"),$t=c("mark"),jt=c("q"),Kt=c("rp"),Ut=c("rt"),Vt=c("ruby"),Wt=c("s"),Gt=c("samp"),Jt=c("small"),Qt=c("strong"),Yt=c("sub"),Zt=c("sup"),Xt=c("time"),en=c("u"),tn=c("var"),nn=c("area"),rn=c("audio"),on=c("img"),sn=c("map"),an=c("track"),cn=c("video"),ln=c("embed"),dn=c("iframe"),un=c("object"),pn=c("param"),fn=c("picture"),mn=c("portal"),bn=c("source"),gn=c("svg",k),hn=c("math"),yn=c("canvas"),xn=c("noscript"),vn=c("script"),Tn=c("del"),kn=c("ins"),En=c("caption"),Sn=c("col"),wn=c("colgroup"),Cn=c("table"),_n=c("tbody"),An=c("td"),Nn=c("tfoot"),Ln=c("th"),Mn=c("thead"),Rn=c("tr"),Y=c("button"),On=c("datalist"),Pn=c("fieldset"),Dn=c("form"),Fn=c("input"),Hn=c("label"),Bn=c("legend"),zn=c("meter"),In=c("optgroup"),qn=c("option"),$n=c("output"),jn=c("progress"),Kn=c("select"),Un=c("textarea"),Vn=c("details"),Wn=c("dialog"),Gn=c("menu"),Jn=c("summary"),Qn=c("slot"),Yn=c("template"),Zn=c("base"),Xn=c("link"),er=c("meta"),z=c("style"),tr=c("circle",k),nr=c("ellipse",k),rr=c("g",k),or=c("line",k),ir=c("path",k),sr=c("polygon",k),ar=c("polyline",k),cr=c("rect",k),lr=c("text",k),dr=c("tspan",k),ur=c("defs",k),pr=c("clipPath",k),fr=c("mask",k),mr=c("pattern",k),br=c("linearGradient",k),gr=c("radialGradient",k),hr=c("stop",k),yr=c("use",k),xr=c("symbol",k),vr=c("marker",k),Tr=c("center"),kr=c("font"),Er=c("marquee"),Sr=e=>c(e);var Wo=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),wr=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),Cr=new WeakMap;function Go(e){let t=e.length-1,n=e[0];for(let p=0;p<t;p++)n+=`\0${p}\0${e[p+1]}`;let r=0,o=n.length;function i(){for(;r<o&&(n[r]===" "||n[r]===" "||n[r]===`
2
+ `||n[r]==="\r");)r++}function s(){if(n.charCodeAt(r)!==0)return-1;let p=r;r++;let b=0;for(;r<o&&n.charCodeAt(r)!==0;)b=b*10+(n.charCodeAt(r)-48),r++;return r<o&&r++,b<0||b>=t?(r=p,-1):b}function a(){let p=r;for(;r<o;){let b=n.charCodeAt(r);if(b>=97&&b<=122||b>=65&&b<=90||b>=48&&b<=57||b===45)r++;else break}return n.slice(p,r)}function d(){if(i(),n[r]!=="=")return{kind:"bool"};r++,i();let p=s();if(p>=0)return{kind:"expr",idx:p};let b=n[r];if(b==='"'||b==="'"){r++;let y=[],D=[],I="";for(;r<o&&n[r]!==b;){let ae=s();ae>=0?(y.push(I),I="",D.push(ae)):I+=n[r++]}return r<o&&r++,y.push(I),D.length===0?{kind:"static",value:y[0]}:{kind:"mixed",statics:y,exprs:D}}let T=r;for(;r<o;){let y=n.charCodeAt(r);if(y===32||y===9||y===10||y===13||y===62||y===47)break;r++}return{kind:"static",value:n.slice(T,r)}}function l(){let p=[];for(;r<o&&(i(),!(n[r]===">"||n[r]==="/"));){let b=r;for(;r<o;){let y=n.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 T=n.slice(b,r);if(!T)break;let v=d();T.startsWith("on:")?v.kind==="expr"&&p.push({t:3,name:T.slice(3),idx:v.idx}):v.kind==="bool"?p.push({t:4,name:T}):v.kind==="static"?p.push({t:0,name:T,value:v.value}):v.kind==="expr"?p.push({t:1,name:T,idx:v.idx}):v.kind==="mixed"&&p.push({t:2,name:T,statics:v.statics,exprs:v.exprs})}return p}function u(p){return p.replace(/\s+/g," ")}function f(p){let b="";for(;r<o&&n[r]!=="<";){let v=s();if(v>=0){let y=u(b);y&&p.push({t:1,value:y}),b="",p.push({t:2,idx:v})}else b+=n[r++]}let T=u(b);T&&p.push({t:1,value:T})}function m(){let p=[];for(;r<o&&!(n[r]==="<"&&r+1<o&&n[r+1]==="/");)if(n[r]==="<"){r++;let b=a(),T=l();i();let v=Wo.has(b),y=n[r]==="/";if(y&&r++,r<o&&r++,v||y)p.push({t:0,el:{tag:b,svg:wr.has(b),attrs:T,children:[]}});else{let D=m();n[r]==="<"&&r+1<o&&n[r+1]==="/"&&(r+=2,a(),i(),r<o&&n[r]===">"&&r++),p.push({t:0,el:{tag:b,svg:wr.has(b),attrs:T,children:D}})}}else f(p);return p}return m()}function Re(e,t){let n=e.svg?document.createElementNS(k,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:n.setAttribute(o.name,o.value);break;case 1:{let i=o.name;if(i[0]==="o"&&i[1]==="n")break;let s=t[o.idx];if(typeof s=="function")_(n,ge(n,i,s));else if(s!=null){let a=String(s);n.setAttribute(i,$(i)?q(a):a)}break}case 2:{let i=o.statics[0];for(let s=0;s<o.exprs.length;s++)i+=String(t[o.exprs[s]])+o.statics[s+1];n.setAttribute(o.name,i);break}case 3:n.addEventListener(o.name,t[o.idx]);break;case 4:n.setAttribute(o.name,"");break}}for(let r=0;r<e.children.length;r++){let o=e.children[r];switch(o.t){case 0:n.appendChild(Re(o.el,t));break;case 1:n.appendChild(document.createTextNode(o.value));break;case 2:{let i=t[o.idx];if(typeof i=="function"){let s=document.createComment("");n.appendChild(s),_(n,K(s,i))}else if(i instanceof Node)n.appendChild(i);else if(Array.isArray(i))for(let s=0;s<i.length;s++){let a=i[s];a instanceof Node?n.appendChild(a):a!=null&&typeof a!="boolean"&&n.appendChild(document.createTextNode(String(a)))}else i!=null&&typeof i!="boolean"&&n.appendChild(document.createTextNode(String(i)));break}}}return n}function Oe(e,...t){let n=Cr.get(e);if(n||(n=Go(e),Cr.set(e,n)),n.length===1&&n[0].t===0)return Re(n[0].el,t);let r=document.createElement("div");for(let o=0;o<n.length;o++){let i=n[o];switch(i.t){case 0:r.appendChild(Re(i.el,t));break;case 1:r.appendChild(document.createTextNode(i.value));break;case 2:{let s=t[i.idx];if(s instanceof Node)r.appendChild(s);else if(typeof s=="function"){let a=document.createComment("bind:htm");r.appendChild(a),_(r,K(a,s))}else if(Array.isArray(s))for(let a=0;a<s.length;a++){let d=s[a];d instanceof Node?r.appendChild(d):d!=null&&typeof d!="boolean"&&r.appendChild(document.createTextNode(String(d)))}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 _r(e,t){if(!t)throw new Error("[Sibu] mount: container element not found. Make sure the DOM element exists before calling mount().");L(typeof e=="function"||e instanceof Node,"mount: first argument must be a component function or a DOM Node.");let n=typeof performance<"u"?performance.now():0,r=typeof e=="function"?e():e,o=typeof performance<"u"?performance.now()-n:0;t.appendChild(r);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("app:init",{rootElement:r,container:t,duration:o}),{node:r,unmount(){i&&i.emit("app:unmount",{rootElement:r}),O(r),r.parentNode&&r.parentNode.removeChild(r)}}}var Jo=A();function Ar(e){return typeof e=="function"?Ar(e()):e instanceof Node?e:document.createTextNode(String(e))}function Qo(e,t){if(t===0)return[];let n=[],r=new Array(t);for(let a=0;a<t;a++){let d=e[a],l=0,u=n.length;for(;l<u;){let f=l+u>>1;e[n[f]]<d?l=f+1:u=f}n[l]=a,r[a]=l>0?n[l-1]:-1}let o=n.length,i=new Array(o),s=n[o-1];for(let a=o-1;a>=0;a--)i[a]=s,s=r[s];return i}function Nr(e,t,n){L(typeof e=="function","each: first argument must be a function that returns an array."),L(typeof t=="function","each: second argument must be a render function."),L(n&&typeof n.key=="function","each: options.key must be a function that returns a unique key per item.");let r=document.createComment("each:anchor"),o=document.createComment("each:end"),i=[],s=[],a=i,d=0,l=new Map,u=new Map,f=[],m=[],p=new Uint8Array(0),b=new Map,T=[],v=[],y=new Map,D=!1,I=!1,ae=n.key,Ve=()=>{let We=e(),w=We.length,ce=r.parentNode;if(!ce)return;I||(ce.insertBefore(o,r.nextSibling),I=!0),m.length<w&&(m=new Array(w));for(let g=0;g<w;g++)m[g]=ae(We[g]);let ee=m;f.length<w&&(f=new Array(w)),u.clear(),y.clear();for(let g=0;g<w;g++)y.set(ee[g],g);for(let g=0;g<w;g++){let N=ee[g],Je=l.get(N),te;if(Je!==void 0)te=Je;else{let Qe=N,Lo=()=>e()[y.get(Qe)],Mo=()=>y.get(Qe);try{te=Ar(t(Lo,Mo))}catch(Ce){Jo&&M(`each: render threw for item at index ${g} (key="${ee[g]}"): ${Ce instanceof Error?Ce.message:String(Ce)}`),te=document.createComment(`each:error:${g}`)}}u.set(N,te),f[g]=te}for(let[g,N]of l)u.has(g)||(O(N),N.parentNode&&ce.removeChild(N));if(w===0){d=0;let g=l;l=u,u=g;return}b.clear();for(let g=0;g<d;g++)b.set(a[g],g);T.length<w&&(T=new Array(w),v=new Array(w));let le=0;for(let g=0;g<w;g++){let N=b.get(ee[g]);N!==void 0&&(T[le]=g,v[le]=N,le++)}let Ge=Qo(v,le);p.length<w?p=new Uint8Array(w):p.fill(0,0,w);for(let g=0;g<Ge.length;g++)p[T[Ge[g]]]=1;let de=o;for(let g=w-1;g>=0;g--){let N=f[g];p[g]||N.nextSibling!==de&&ce.insertBefore(N,de),de=N}let ue=a===i?s:i;ue.length<w&&(ue.length=w);for(let g=0;g<w;g++)ue[g]=ee[g];a=ue,d=w;let No=l;l=u,u=No,D=!0};return x(Ve),D||queueMicrotask(()=>{!D&&r.parentNode&&Ve()}),r}function Mr(e){let t=document.createDocumentFragment();for(let n of e)if(!(n==null||typeof n=="boolean"))if(Array.isArray(n))for(let r of n)r==null||typeof r=="boolean"||t.appendChild(Lr(r));else t.appendChild(Lr(n));return t}function Lr(e){if(e==null)return document.createTextNode("");if(e instanceof Node)return e;if(typeof e=="function"){let t=e();return t instanceof Node?t:document.createTextNode(String(t??""))}return document.createTextNode(String(e))}function Rr(e,t){let n=document.createComment("portal"),r=t||document.body,o=null;queueMicrotask(()=>{try{o=e(),r.appendChild(o)}catch(s){console.error("[Portal] Render error:",s)}});let i=new MutationObserver(()=>{!n.isConnected&&o&&(o.remove(),o=null,i.disconnect())});return queueMicrotask(()=>{n.parentNode&&i.observe(n.parentNode,{childList:!0})}),n}var Pe=new Map;function Or(e,t){Pe.set(e,t)}function Pr(e){Pe.delete(e)}function De(e){let t=Pe.get(e);return t?t():h({nodes:`[Component "${e}" not found]`})}function Dr(e){let t=h({class:"sibu-dynamic"});function n(){let r=e(),o;typeof r=="function"?o=r():o=De(r);for(let i of Array.from(t.childNodes))O(i);t.replaceChildren(o)}return x(n),t}function Fr(e,t="default"){return e?.[t]}function Hr(e,t){return x(()=>{t.style.display=e()?"":"none"}),t}function Br(e,t,n){let r=document.createComment("when"),o=null,i,s=!1,a=()=>{let d=e(),l=r.parentNode;if(!l||s&&d===i)return;i=d,o?.parentNode&&(O(o),o.parentNode.removeChild(o),o=null);let u=d?t():n?n():null;if(u!=null){let f=u instanceof Node?u:document.createTextNode(String(u));l.insertBefore(f,r.nextSibling),o=f}s=!0};return x(a),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function zr(e,t,n){let r=document.createComment("match"),o=null,i,s=!1,a=()=>{let d=String(e()),l=r.parentNode;if(!l||s&&d===i)return;i=d,o?.parentNode&&(O(o),o.parentNode.removeChild(o),o=null);let u=t[d]||n;if(u){let f=u();if(f!=null){let m=f instanceof Node?f:document.createTextNode(String(f));l.insertBefore(m,r.nextSibling),o=m}}s=!0};return x(a),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function Ir(e,t,n){let r=document.createComment("keep-alive"),o=new Map,i=[],s=n?.max??0,a,d=null,l=!1,u=()=>{let f=e(),m=r.parentNode;if(!m||l&&f===a)return;d?.parentNode&&m.removeChild(d),a=f;let p=o.get(f);if(p){let b=i.indexOf(f);b!==-1&&(i.splice(b,1),i.push(f))}else{let b=t[f];if(!b){d=null,l=!0;return}if(p=b(),o.set(f,p),i.push(f),s>0&&i.length>s){let T=i.shift(),v=o.get(T);v&&(O(v),v.parentNode&&v.parentNode.removeChild(v),o.delete(T))}}m.insertBefore(p,r.nextSibling),d=p,l=!0};return x(u),l||queueMicrotask(()=>{!l&&r.parentNode&&u()}),r}function qr(e,t,n){let r=t(e,n);typeof r=="function"&&_(e,r)}var $r=(e,t)=>{let n=r=>{e.contains(r.target)||t()};return document.addEventListener("pointerdown",n,!0),()=>document.removeEventListener("pointerdown",n,!0)},jr=(e,t)=>{let n=t.duration??500,r=null,o=()=>{r=setTimeout(()=>{t.callback(),r=null},n)},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)}},Kr=(e,t)=>{let n=()=>{let r=typeof t=="function"?t():e.textContent??"";navigator.clipboard.writeText(r)};return e.addEventListener("click",n),()=>e.removeEventListener("click",n)},Ur=e=>{let t=()=>{e.style.overflow="hidden",e.style.height="auto",e.style.height=`${e.scrollHeight}px`};return t(),e.addEventListener("input",t),()=>e.removeEventListener("input",t)},Vr=e=>{let t='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])',n=r=>{if(r.key!=="Tab")return;let o=Array.from(e.querySelectorAll(t));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",n),()=>e.removeEventListener("keydown",n)};var U=null;function Wr(e,t){try{let n=e();return n&&typeof n.then=="function"&&n.catch(r=>{t?t(r,"async"):U?U(r,"async"):console.error("Unhandled async error in Sibu.catchError:",r)}),n}catch(n){return t?t(n,"sync"):U?U(n,"sync"):console.error("Unhandled error in Sibu.catchError:",n),null}}async function Gr(e,t){try{return await e()}catch(n){return t?t(n,"async"):U?U(n,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",n),null}}function Jr(e){U=e}var Fe=0;function Qr(e="sibu"){return Fe++,`${e}-${Fe}`}function Yr(){Fe=0}var oe=0,He=new Set;function ke(e){oe++;try{return e()}finally{oe--,oe===0&&Yo()}}function Z(e){return oe===0?!1:(He.add(e),!0)}function Zr(){return oe>0}function Yo(){for(let e of He)et(e);He.clear(),tt()}var Xr=globalThis,Be=A();function E(e,t){let n={value:e},r=Be?t?.name:void 0,o=t?.equals;r&&(n.__name=r);function i(){return Q(n),n.value}i.__signal=n,r&&(i.__name=r);function s(a){let d=typeof a=="function"?a(n.value):a;if(!(o?o(n.value,d):Object.is(d,n.value))){if(Be){let l=n.value;n.value=d;let u=Xr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;u&&u.emit("signal:update",{signal:n,name:r,oldValue:l,newValue:d})}else n.value=d;Z(n)||me(n)}}if(Be){let a=Xr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&a.emit("signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}var Ee=!1;function X(){return Ee}function ze(){Ee=!0}function Ie(){Ee=!1}function eo(e){let t=Ee;ze();try{return e()}finally{t||Ie()}}var to=globalThis;function no(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,J(()=>t(o,void 0));else{let i=n;n=o,J(()=>t(o,i))}}}function P(e,t){if(L(typeof e=="function","effect: argument must be a function."),X())return()=>{};let n=t?.onError,r=n?()=>{try{e()}catch(a){n(a)}}:e,o=()=>{},i=()=>{o(),o=x(r,i)};o=x(r,i);let s=to.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return s&&s.emit("effect:create",{effectFn:e}),()=>{let a=to.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&a.emit("effect:destroy",{effectFn:e}),o()}}function Se(e,t){L(typeof e=="function","derived: argument must be a getter function.");let n=t?.name,r={};r._d=!1,r._g=e;let o=()=>{r._d||(r._d=!0)};o._c=1,o._sig=r,x(()=>{r._d=!1,r._v=e()},o);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;function s(){if(fe)return r._d&&(r._d=!1,r._v=e()),r._v;if(Q(r),r._d){let a=r._v;x(()=>{r._d=!1,r._v=e()},o),i&&a!==r._v&&i.emit("computed:update",{signal:r,oldValue:a,newValue:r._v})}return r._v}return n&&(s.__name=n,r.__name=n),s.__signal=r,i&&i.emit("computed:create",{signal:r,name:n,getter:s}),s}function ro(e,t){if(L(typeof e=="function","watch: first argument must be a getter function."),L(typeof t=="function","watch: second argument must be a callback function."),X())return()=>{};let n,r=!0;return x(()=>{let s=e();if(r){n=s,r=!1;return}Object.is(s,n)||(t(s,n),n=s)})}function oo(e){L(e!==null&&typeof e=="object"&&!Array.isArray(e),"store: argument must be a plain object. For arrays, use array() instead.");let t={};Object.keys(e).forEach(d=>{let[l,u]=E(e[d]);t[d]=[l,u]});let n=new Proxy({},{get(d,l){if(l in t){let u=t[l][0];return u()}},set(){throw new Error("[Sibu] store: Direct mutation is not allowed. Use actions.setState() to update store properties.")}}),r=()=>{let d={};return Object.keys(t).forEach(l=>{d[l]=t[l][0]()}),d};return[n,{setState:d=>{let l=r(),u=typeof d=="function"?d(l):d;Object.entries(u).forEach(([f,m])=>{f in t&&t[f][1](m)})},reset:()=>{Object.keys(e).forEach(d=>{let l=t[d][1];l(e[d])})},subscribe:d=>{let l=!0;return P(()=>{let u=r();if(l){l=!1;return}d(u)})},subscribeKey:(d,l)=>{let u,f=!0;return P(()=>{let m=t[d][0]();if(f){u=m,f=!1;return}if(!Object.is(m,u)){let p=u;u=m,l(m,p)}})},getSnapshot:r}]}function io(e){let[t,n]=E(e);return{get current(){return t()},set current(r){n(r)}}}function so(e=[]){let[t,n]=E([...e]);return[t,{push(...o){n(i=>[...i,...o])},pop(){let o;return n(i=>{let s=[...i];return o=s.pop(),s}),o},shift(){let o;return n(i=>{let s=[...i];return o=s.shift(),s}),o},unshift(...o){n(i=>[...o,...i])},splice(o,i=0,...s){let a=[];return n(d=>{let l=[...d];return a=l.splice(o,i,...s),l}),a},remove(o){n(i=>i.filter((s,a)=>a!==o))},removeWhere(o){n(i=>{let s=i.findIndex(o);return s===-1?i:i.filter((a,d)=>d!==s)})},set(o){n([...o])},update(o,i){n(s=>s.map((a,d)=>d===o?i:a))},updateWhere(o,i){n(s=>s.map(a=>o(a)?i(a):a))},sort(o){n(i=>[...i].sort(o))},reverse(){n(o=>[...o].reverse())},filter(o){n(i=>i.filter(o))},map(o){n(i=>i.map(o))},clear(){n([])}}]}function ao(e=[]){let t=[...e],n=null,r={};function o(){n=null,Z(r)||me(r)}function i(){return Q(r),n===null&&(n=Object.freeze([...t])),n}return[i,{push(...a){a.length!==0&&(t.push(...a),o())},pop(){if(t.length===0)return;let a=t.pop();return o(),a},shift(){if(t.length===0)return;let a=t.shift();return o(),a},unshift(...a){a.length!==0&&(t.unshift(...a),o())},splice(a,d=0,...l){let u=t.splice(a,d,...l);return(u.length>0||l.length>0)&&o(),u},remove(a){a<0||a>=t.length||(t.splice(a,1),o())},removeWhere(a){let d=t.findIndex(a);d!==-1&&(t.splice(d,1),o())},set(a){t=[...a],o()},update(a,d){a<0||a>=t.length||Object.is(t[a],d)||(t[a]=d,o())},updateWhere(a,d){let l=!1;for(let u=0;u<t.length;u++)if(a(t[u])){let f=d(t[u]);Object.is(t[u],f)||(t[u]=f,l=!0)}l&&o()},sort(a){t.length<=1||(t.sort(a),o())},reverse(){t.length<=1||(t.reverse(),o())},filter(a){let d=t.filter(a);d.length!==t.length&&(t=d,o())},map(a){let d=!1;for(let l=0;l<t.length;l++){let u=a(t[l],l);Object.is(t[l],u)||(t[l]=u,d=!0)}d&&o()},clear(){t.length!==0&&(t=[],o())}}]}function ie(e,t,n){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!=typeof t||typeof e!="object")return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.toString()===t.toString();if(n||(n=new Set),n.has(e))return!0;if(n.add(e),Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:e.every((i,s)=>ie(i,t[s],n));let r=Object.keys(e),o=Object.keys(t);return r.length!==o.length?!1:r.every(i=>ie(e[i],t[i],n))}function co(e){return E(e,{equals:(t,n)=>ie(t,n)})}function lo(e,t,n){return[Se(e,n),i=>{ke(()=>t(i))}]}function uo(e,t){let[n,r]=E(t),[o,i]=E(!1),[s,a]=E(null),[d,l]=E(0),u=0;return P(()=>{d();let f=++u;i(!0),a(null);let m;try{m=e()}catch(p){a(p),i(!1);return}m.then(p=>{f===u&&(r(p),i(!1))},p=>{f===u&&(a(p),i(!1))})}),{value:n,loading:o,error:s,refresh:()=>l(f=>f+1)}}function se(e,t){try{e()}catch(n){M(`${t}: callback threw: ${n instanceof Error?n.message:String(n)}`)}}function qe(e,t){if(!(typeof document>"u"))if(t){if(t.isConnected){queueMicrotask(()=>{se(e,"onMount")});return}let n=new MutationObserver(()=>{t.isConnected&&(n.disconnect(),se(e,"onMount"))});queueMicrotask(()=>{t.isConnected?se(e,"onMount"):n.observe(document.body,{childList:!0,subtree:!0})})}else queueMicrotask(()=>{se(e,"onMount")})}function po(e,t){let n=()=>{let r=new MutationObserver(()=>{t.isConnected||(r.disconnect(),se(e,"onUnmount"))});r.observe(document.body,{childList:!0,subtree:!0})};t.isConnected?n():qe(()=>{n()},t)}function fo(e,t){_(t,e)}function mo(e){let[t,n]=E(e);return{provide(r){n(r)},use(){return t},get(){return t()},set(r){n(r)}}}function bo(e){let t=e();return A()&&queueMicrotask(()=>{try{e()}catch(n){console.warn("[Sibu strict] second run threw:",n)}}),t}function go(e){if(!A())return P(e);let t=P(e),n=null;return queueMicrotask(()=>{try{n=P(e)}catch(r){console.warn("[Sibu strictEffect] second run threw:",r)}}),()=>{t(),n&&n()}}function ho(){return new Promise(e=>{queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):e()})})}function xo(e){let[t,n]=E(e()),r=!1,o=t(),i=()=>{r=!1,n(o)},s=()=>{r||(r=!0,queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(i):i()}))};return x(()=>{o=e(),s()}),t}var yo=16;function Zo(e){let t=globalThis;if(typeof t.requestIdleCallback=="function"){t.requestIdleCallback(e,{timeout:yo*4});return}if(typeof requestAnimationFrame=="function"){requestAnimationFrame(()=>e());return}setTimeout(e,yo)}function vo(){let[e,t]=E(!1);function n(r){t(!0),Zo(()=>{let o;try{o=r()}catch{t(!1);return}o&&typeof o.then=="function"?o.then(()=>t(!1),()=>t(!1)):t(!1)})}return{pending:e,start:n}}function $e(e){let t=null;return function(){if(t)return t();let[r,o]=E("loading"),[i,s]=E(null),a=h({class:"sibu-lazy"});return e().then(d=>{t=d.default;let l=t();a.replaceChildren(l),o("loaded")}).catch(d=>{let l=d instanceof Error?d:new Error(String(d));s(l),o("error"),a.replaceChildren(h({class:"sibu-lazy-error",nodes:`Failed to load component: ${l.message}`}))}),a.appendChild(S({class:"sibu-lazy-loading",nodes:"Loading..."})),a}}function je({nodes:e,fallback:t}){let n=h({class:"sibu-suspense"}),r=t();return n.appendChild(r),queueMicrotask(()=>{try{let o=e();if(o.classList.contains("sibu-lazy")){let i=new MutationObserver(()=>{o.querySelector(".sibu-lazy-loading")||(i.disconnect(),n.replaceChildren(o))});i.observe(o,{childList:!0,subtree:!0}),o.querySelector(".sibu-lazy-loading")||n.replaceChildren(o)}else n.replaceChildren(o)}catch{}}),n}var Xo=A(),ei=`
3
3
  .sibu-error-display {
4
4
  border: 1px solid var(--sibu-err-border, #e5484d);
5
5
  border-radius: 10px;
@@ -179,11 +179,11 @@
179
179
  border: 1px solid #3a3a4e;
180
180
  }
181
181
  .sibu-error-display .sibu-err-btn-reload:hover { background: #2a2b40; }
182
- `,Eo=!1;function ri(){if(Eo||typeof document>"u")return;let e=z({nodes:ni});document.head.appendChild(e),Eo=!0}function oi(e){let t=[],n=e.split(`
183
- `);for(let r of n){let o=r.trim(),i=o.match(/^at\s+(?:(.+?)\s+\((.+)\)|(.+))$/);if(i){t.push({fn:i[1]||"(anonymous)",loc:i[2]||i[3]||""});continue}let s=o.match(/^(.+?)@(.+)$/);s&&t.push({fn:s[1]||"(anonymous)",loc:s[2]||""})}return t}function So(e){if(e instanceof Error){let t=e.code??e.name??"ERROR",n=e.message||"Unknown error",r=e.stack??"",o=oi(r),i=e.cause,s=i!=null?So(i):null;return{code:t,message:n,stack:r,frames:o,cause:s}}return{code:"NON_ERROR",message:typeof e=="string"?e:JSON.stringify(e),stack:"",frames:[],cause:null}}function ii(e,t){let n=[];if(n.push(`[${e.code}] ${e.message}`),e.stack&&(n.push(""),n.push(e.stack)),e.cause&&(n.push(""),n.push("Caused by:"),n.push(` [${e.cause.code}] ${e.cause.message}`),e.cause.stack)){let r=e.cause.stack.split(`
182
+ `,To=!1;function ti(){if(To||typeof document>"u")return;let e=z({nodes:ei});document.head.appendChild(e),To=!0}function ni(e){let t=[],n=e.split(`
183
+ `);for(let r of n){let o=r.trim(),i=o.match(/^at\s+(?:(.+?)\s+\((.+)\)|(.+))$/);if(i){t.push({fn:i[1]||"(anonymous)",loc:i[2]||i[3]||""});continue}let s=o.match(/^(.+?)@(.+)$/);s&&t.push({fn:s[1]||"(anonymous)",loc:s[2]||""})}return t}function ko(e){if(e instanceof Error){let t=e.code??e.name??"ERROR",n=e.message||"Unknown error",r=e.stack??"",o=ni(r),i=e.cause,s=i!=null?ko(i):null;return{code:t,message:n,stack:r,frames:o,cause:s}}return{code:"NON_ERROR",message:typeof e=="string"?e:JSON.stringify(e),stack:"",frames:[],cause:null}}function ri(e,t){let n=[];if(n.push(`[${e.code}] ${e.message}`),e.stack&&(n.push(""),n.push(e.stack)),e.cause&&(n.push(""),n.push("Caused by:"),n.push(` [${e.cause.code}] ${e.cause.message}`),e.cause.stack)){let r=e.cause.stack.split(`
184
184
  `).map(o=>` ${o}`).join(`
185
185
  `);n.push(r)}if(t&&Object.keys(t).length>0){n.push(""),n.push("Metadata:");for(let[r,o]of Object.entries(t))n.push(` ${r}: ${String(o)}`)}return n.push(""),n.push(`At: ${new Date().toISOString()}`),typeof navigator<"u"&&navigator.userAgent&&n.push(`UA: ${navigator.userAgent}`),n.join(`
186
- `)}function wo(e){let t=e.map((n,r)=>h({class:"sibu-err-frame",nodes:[S({class:"sibu-err-line",nodes:String(r+1)}),S({class:"sibu-err-fn",nodes:n.fn}),S({class:"sibu-err-loc",nodes:` \u2014 ${n.loc}`})]}));return Te({class:"sibu-err-stack",nodes:t})}function Co(e){return e?[h({class:"sibu-err-cause-label",nodes:"Caused by"}),h({class:"sibu-err-section",nodes:[h({class:"sibu-err-section-head",nodes:[S({nodes:`[${e.code}] ${e.message}`}),S({nodes:""})]}),e.frames.length>0?wo(e.frames):h({class:"sibu-err-stack",nodes:"(no stack)"})]}),...Co(e.cause)]:[]}function si(e){let t=[];for(let[r,o]of Object.entries(e)){t.push(document.createElement("dt")),t[t.length-1].textContent=r;let i=document.createElement("dd");i.textContent=o==null?"(null)":String(o),t.push(i)}let n=document.createElement("dl");n.className="sibu-err-meta";for(let r of t)n.appendChild(r);return n}function we(e){ri();let t=e.severity??"error",n=So(e.error),r=e.alwaysShowDetails??ti,o=e.title??n.message,i=new Date().toISOString().replace("T"," ").slice(0,19),[s,a]=E("Copy"),d=Z({class:"sibu-err-copy-btn",nodes:()=>s(),on:{click:()=>{let p=ii(n,e.metadata);typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(p).then(()=>{a("Copied!"),setTimeout(()=>a("Copy"),1500)},()=>{a("Copy failed"),setTimeout(()=>a("Copy"),1500)})}}}),l=h({class:"sibu-err-header",nodes:[ke({class:"sibu-err-icon",nodes:n.code}),ve({class:"sibu-err-title",nodes:o}),S({class:"sibu-err-timestamp",nodes:i})]}),u=[xe({class:"sibu-err-message",nodes:n.message})];r&&n.frames.length>0?u.push(h({class:"sibu-err-section",nodes:[h({class:"sibu-err-section-head",nodes:[S({nodes:"Stack Trace"}),d]}),wo(n.frames)]})):r&&u.push(h({class:"sibu-err-section",nodes:[h({class:"sibu-err-section-head",nodes:[S({nodes:"Details"}),d]}),h({class:"sibu-err-stack",nodes:"(no stack available)"})]})),r&&u.push(...Co(n.cause)),r&&e.metadata&&Object.keys(e.metadata).length>0&&u.push(h({class:"sibu-err-section",nodes:[h({class:"sibu-err-section-head",nodes:[S({nodes:"Metadata"})]}),si(e.metadata)]})),r&&typeof navigator<"u"&&navigator.userAgent&&u.push(h({class:"sibu-err-section",nodes:[h({class:"sibu-err-section-head",nodes:[S({nodes:"Environment"})]}),h({class:"sibu-err-meta",nodes:(()=>{let p=document.createElement("dl");p.className="sibu-err-meta";let b=[["User Agent",navigator.userAgent],["URL",typeof location<"u"?location.href:"(n/a)"],["Timestamp",new Date().toISOString()]];for(let[T,v]of b){let y=document.createElement("dt");y.textContent=T;let D=document.createElement("dd");D.textContent=v,p.appendChild(y),p.appendChild(D)}return p})()})]}));let f=[];e.onRetry&&f.push(Z({class:"sibu-err-btn sibu-err-btn-retry",nodes:e.retryLabel??"Retry",on:{click:e.onRetry}})),!e.hideReload&&typeof location<"u"&&f.push(Z({class:"sibu-err-btn sibu-err-btn-reload",nodes:"Reload Page",on:{click:()=>location.reload()}})),f.length>0&&u.push(h({class:"sibu-err-actions",nodes:f}));let m=h({class:"sibu-err-body",nodes:u});return h({class:"sibu-error-display","data-severity":t,nodes:[l,m]})}var ai=`
186
+ `)}function Eo(e){let t=e.map((n,r)=>h({class:"sibu-err-frame",nodes:[S({class:"sibu-err-line",nodes:String(r+1)}),S({class:"sibu-err-fn",nodes:n.fn}),S({class:"sibu-err-loc",nodes:` \u2014 ${n.loc}`})]}));return ve({class:"sibu-err-stack",nodes:t})}function So(e){return e?[h({class:"sibu-err-cause-label",nodes:"Caused by"}),h({class:"sibu-err-section",nodes:[h({class:"sibu-err-section-head",nodes:[S({nodes:`[${e.code}] ${e.message}`}),S({nodes:""})]}),e.frames.length>0?Eo(e.frames):h({class:"sibu-err-stack",nodes:"(no stack)"})]}),...So(e.cause)]:[]}function oi(e){let t=[];for(let[r,o]of Object.entries(e)){t.push(document.createElement("dt")),t[t.length-1].textContent=r;let i=document.createElement("dd");i.textContent=o==null?"(null)":String(o),t.push(i)}let n=document.createElement("dl");n.className="sibu-err-meta";for(let r of t)n.appendChild(r);return n}function we(e){ti();let t=e.severity??"error",n=ko(e.error),r=e.alwaysShowDetails??Xo,o=e.title??n.message,i=new Date().toISOString().replace("T"," ").slice(0,19),[s,a]=E("Copy"),d=Y({class:"sibu-err-copy-btn",nodes:()=>s(),on:{click:()=>{let p=ri(n,e.metadata);typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(p).then(()=>{a("Copied!"),setTimeout(()=>a("Copy"),1500)},()=>{a("Copy failed"),setTimeout(()=>a("Copy"),1500)})}}}),l=h({class:"sibu-err-header",nodes:[Te({class:"sibu-err-icon",nodes:n.code}),xe({class:"sibu-err-title",nodes:o}),S({class:"sibu-err-timestamp",nodes:i})]}),u=[ye({class:"sibu-err-message",nodes:n.message})];r&&n.frames.length>0?u.push(h({class:"sibu-err-section",nodes:[h({class:"sibu-err-section-head",nodes:[S({nodes:"Stack Trace"}),d]}),Eo(n.frames)]})):r&&u.push(h({class:"sibu-err-section",nodes:[h({class:"sibu-err-section-head",nodes:[S({nodes:"Details"}),d]}),h({class:"sibu-err-stack",nodes:"(no stack available)"})]})),r&&u.push(...So(n.cause)),r&&e.metadata&&Object.keys(e.metadata).length>0&&u.push(h({class:"sibu-err-section",nodes:[h({class:"sibu-err-section-head",nodes:[S({nodes:"Metadata"})]}),oi(e.metadata)]})),r&&typeof navigator<"u"&&navigator.userAgent&&u.push(h({class:"sibu-err-section",nodes:[h({class:"sibu-err-section-head",nodes:[S({nodes:"Environment"})]}),h({class:"sibu-err-meta",nodes:(()=>{let p=document.createElement("dl");p.className="sibu-err-meta";let b=[["User Agent",navigator.userAgent],["URL",typeof location<"u"?location.href:"(n/a)"],["Timestamp",new Date().toISOString()]];for(let[T,v]of b){let y=document.createElement("dt");y.textContent=T;let D=document.createElement("dd");D.textContent=v,p.appendChild(y),p.appendChild(D)}return p})()})]}));let f=[];e.onRetry&&f.push(Y({class:"sibu-err-btn sibu-err-btn-retry",nodes:e.retryLabel??"Retry",on:{click:e.onRetry}})),!e.hideReload&&typeof location<"u"&&f.push(Y({class:"sibu-err-btn sibu-err-btn-reload",nodes:"Reload Page",on:{click:()=>location.reload()}})),f.length>0&&u.push(h({class:"sibu-err-actions",nodes:f}));let m=h({class:"sibu-err-body",nodes:u});return h({class:"sibu-error-display","data-severity":t,nodes:[l,m]})}var ii=`
187
187
  .sibu-error-boundary {
188
188
  position: relative;
189
189
  }
@@ -337,7 +337,7 @@
337
337
  .sibu-error-fallback .sibu-error-btn-reload:hover {
338
338
  background: #3a3a4e;
339
339
  }
340
- `,Ao=!1;function ci(){if(!Ao&&typeof document<"u"){let e=z({nodes:ai});document.head.appendChild(e),Ao=!0}}var Ke=new WeakMap;function li(e,t,n){let r=Ke.get(e);r||(r=new Map,Ke.set(e,r));let o=t.message;return r.has(o)||r.set(o,e(t,n)),r.get(o)}function _o({nodes:e,fallback:t,onError:n,resetKeys:r}){ci();let[o,i]=E(null),s=()=>{t&&Ke.delete(t),i(null)};if(r&&r.length>0){let f=!1;P(()=>{for(let m of r)try{m()}catch{}if(!f){f=!0;return}o()!==null&&s()})}let a=f=>{let m=f instanceof Error?f:new Error(String(f));return i(m),n?.(m),m},d=(f,m)=>we({error:f,severity:"error",onRetry:m}),l=f=>{let m=t||d;try{return li(m,f,s)}catch(p){let b=p instanceof Error?p:new Error(String(p));return queueMicrotask(()=>{u.parentNode&&u.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:b}}))}),document.createComment("error-boundary-failed")}},u=h({class:"sibu-error-boundary",nodes:()=>{let f=o();if(f)return l(f);try{let m=e();if(m&&typeof m.then=="function"){let p=h({class:"sibu-error-async"});return p.appendChild(S({class:"sibu-lazy-loading",nodes:"Loading..."})),m.then(b=>{p.replaceChildren(b)}).catch(b=>{let T=a(b);p.replaceChildren(l(T))}),p}return m}catch(m){let p=a(m);return l(p)}}});return u.addEventListener("sibu:error-propagate",f=>{if(o())return;f.stopPropagation();let p=f.detail?.error;p&&a(p)}),u}var di=`
340
+ `,wo=!1;function si(){if(!wo&&typeof document<"u"){let e=z({nodes:ii});document.head.appendChild(e),wo=!0}}var Ke=new WeakMap;function ai(e,t,n){let r=Ke.get(e);r||(r=new Map,Ke.set(e,r));let o=t.message;return r.has(o)||r.set(o,e(t,n)),r.get(o)}function Co({nodes:e,fallback:t,onError:n,resetKeys:r}){si();let[o,i]=E(null),s=()=>{t&&Ke.delete(t),i(null)};if(r&&r.length>0){let f=!1;P(()=>{for(let m of r)try{m()}catch{}if(!f){f=!0;return}o()!==null&&s()})}let a=f=>{let m=f instanceof Error?f:new Error(String(f));return i(m),n?.(m),m},d=(f,m)=>we({error:f,severity:"error",onRetry:m}),l=f=>{let m=t||d;try{return ai(m,f,s)}catch(p){let b=p instanceof Error?p:new Error(String(p));return queueMicrotask(()=>{u.parentNode&&u.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:b}}))}),document.createComment("error-boundary-failed")}},u=h({class:"sibu-error-boundary",nodes:()=>{let f=o();if(f)return l(f);try{let m=e();if(m&&typeof m.then=="function"){let p=h({class:"sibu-error-async"});return p.appendChild(S({class:"sibu-lazy-loading",nodes:"Loading..."})),m.then(b=>{p.replaceChildren(b)}).catch(b=>{let T=a(b);p.replaceChildren(l(T))}),p}return m}catch(m){let p=a(m);return l(p)}}});return u.addEventListener("sibu:error-propagate",f=>{if(o())return;f.stopPropagation();let p=f.detail?.error;p&&a(p)}),u}var ci=`
341
341
  @keyframes sibu-spin {
342
342
  to { transform: rotate(360deg); }
343
343
  }
@@ -390,4 +390,4 @@
390
390
  .sibu-loading-lg .sibu-loading-spinner { width: 40px; height: 40px; border-width: 4px; }
391
391
  .sibu-loading-lg .sibu-loading-dot { width: 12px; height: 12px; }
392
392
  .sibu-loading-lg .sibu-loading-dots { gap: 6px; }
393
- `,No=!1;function ui(){!No&&typeof document<"u"&&(document.head.appendChild(z({nodes:di})),No=!0)}function Lo(e={}){ui();let{text:t,variant:n="spinner",size:r="md"}=e,o=r!=="md"?` sibu-loading-${r}`:"";return n==="dots"?h({class:`sibu-loading${o}`,nodes:[h({class:"sibu-loading-dots",nodes:[S({class:"sibu-loading-dot"}),S({class:"sibu-loading-dot"}),S({class:"sibu-loading-dot"})]}),t?S({class:"sibu-loading-text",nodes:t}):null].filter(Boolean)}):h({class:`sibu-loading${o}`,nodes:[h({class:"sibu-loading-spinner"}),t?S({class:"sibu-loading-text",nodes:t}):null].filter(Boolean)})}typeof window<"u"&&(window.Sibu=Ue);return Bo(pi);})();
393
+ `,_o=!1;function li(){!_o&&typeof document<"u"&&(document.head.appendChild(z({nodes:ci})),_o=!0)}function Ao(e={}){li();let{text:t,variant:n="spinner",size:r="md"}=e,o=r!=="md"?` sibu-loading-${r}`:"";return n==="dots"?h({class:`sibu-loading${o}`,nodes:[h({class:"sibu-loading-dots",nodes:[S({class:"sibu-loading-dot"}),S({class:"sibu-loading-dot"}),S({class:"sibu-loading-dot"})]}),t?S({class:"sibu-loading-text",nodes:t}):null].filter(Boolean)}):h({class:`sibu-loading${o}`,nodes:[h({class:"sibu-loading-spinner"}),t?S({class:"sibu-loading-text",nodes:t}):null].filter(Boolean)})}typeof window<"u"&&(window.Sibu=Ue);return Fo(di);})();