claude-mux 0.30.2 → 0.30.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/CLAUDE.md +3 -3
  2. package/dist/hooks/claude-mux-hook.js +6 -0
  3. package/dist/hooks/claude-mux-hook.js.map +1 -1
  4. package/dist/subagents.d.ts +5 -7
  5. package/dist/subagents.d.ts.map +1 -1
  6. package/dist/subagents.js +5 -9
  7. package/dist/subagents.js.map +1 -1
  8. package/dist/utils/version.d.ts +1 -1
  9. package/dist/utils/version.js +1 -1
  10. package/dist/web/client/_app/immutable/chunks/{DiCsJZkB.js → 0itALT7D.js} +2 -2
  11. package/dist/web/client/_app/immutable/chunks/{DiCsJZkB.js.map → 0itALT7D.js.map} +1 -1
  12. package/{web/.svelte-kit/output/client/_app/immutable/chunks/CmDdyjOR.js → dist/web/client/_app/immutable/chunks/9UhVHDNs.js} +2 -2
  13. package/dist/web/client/_app/immutable/chunks/{CmDdyjOR.js.map → 9UhVHDNs.js.map} +1 -1
  14. package/dist/web/client/_app/immutable/chunks/{BR0j6UP_.js → B5hoOzZI.js} +2 -2
  15. package/dist/web/client/_app/immutable/chunks/{BR0j6UP_.js.map → B5hoOzZI.js.map} +1 -1
  16. package/dist/web/client/_app/immutable/chunks/{BRwgrbZi.js → Bcl2xWM1.js} +2 -2
  17. package/{web/.svelte-kit/output/client/_app/immutable/chunks/BRwgrbZi.js.map → dist/web/client/_app/immutable/chunks/Bcl2xWM1.js.map} +1 -1
  18. package/dist/web/client/_app/immutable/chunks/{Dmt0dCmj.js → CTgykToi.js} +2 -2
  19. package/{web/.svelte-kit/output/client/_app/immutable/chunks/Dmt0dCmj.js.map → dist/web/client/_app/immutable/chunks/CTgykToi.js.map} +1 -1
  20. package/{web/.svelte-kit/output/client/_app/immutable/chunks/juU6kBhv.js → dist/web/client/_app/immutable/chunks/D4VtXq1u.js} +2 -2
  21. package/{web/.svelte-kit/output/client/_app/immutable/chunks/juU6kBhv.js.map → dist/web/client/_app/immutable/chunks/D4VtXq1u.js.map} +1 -1
  22. package/dist/web/client/_app/immutable/chunks/{CJ5X49p2.js → DJPAeXBZ.js} +2 -2
  23. package/dist/web/client/_app/immutable/chunks/{CJ5X49p2.js.map → DJPAeXBZ.js.map} +1 -1
  24. package/dist/web/client/_app/immutable/chunks/{Cb0yiQIh.js → iD86EAaZ.js} +3 -3
  25. package/dist/web/client/_app/immutable/chunks/{Cb0yiQIh.js.map → iD86EAaZ.js.map} +1 -1
  26. package/dist/web/client/_app/immutable/chunks/uNuVvgdW.js +2 -0
  27. package/dist/web/client/_app/immutable/chunks/uNuVvgdW.js.map +1 -0
  28. package/dist/web/client/_app/immutable/entry/{app.BNsXYIeZ.js → app.D_c8YH2_.js} +3 -3
  29. package/dist/web/client/_app/immutable/entry/{app.BNsXYIeZ.js.map → app.D_c8YH2_.js.map} +1 -1
  30. package/dist/web/client/_app/immutable/entry/start.C4kxbL3U.js +2 -0
  31. package/dist/web/client/_app/immutable/entry/start.C4kxbL3U.js.map +1 -0
  32. package/dist/web/client/_app/immutable/nodes/{0.Cga09Vlt.js → 0.DKJz_Waz.js} +2 -2
  33. package/dist/web/client/_app/immutable/nodes/{0.Cga09Vlt.js.map → 0.DKJz_Waz.js.map} +1 -1
  34. package/dist/web/client/_app/immutable/nodes/{1.C5UTjGXy.js → 1.BMuM5b-K.js} +2 -2
  35. package/dist/web/client/_app/immutable/nodes/{1.C5UTjGXy.js.map → 1.BMuM5b-K.js.map} +1 -1
  36. package/dist/web/client/_app/immutable/nodes/{2.C76yPG3X.js → 2.B5-VVL7z.js} +2 -2
  37. package/dist/web/client/_app/immutable/nodes/{2.C76yPG3X.js.map → 2.B5-VVL7z.js.map} +1 -1
  38. package/dist/web/client/_app/immutable/nodes/{3.Tbj29aAW.js → 3.Ch8jV9KV.js} +2 -2
  39. package/{web/.svelte-kit/output/client/_app/immutable/nodes/3.Tbj29aAW.js.map → dist/web/client/_app/immutable/nodes/3.Ch8jV9KV.js.map} +1 -1
  40. package/dist/web/client/_app/immutable/nodes/{4.D0z9Wo_G.js → 4.3R3T2cvf.js} +2 -2
  41. package/{web/.svelte-kit/output/client/_app/immutable/nodes/4.D0z9Wo_G.js.map → dist/web/client/_app/immutable/nodes/4.3R3T2cvf.js.map} +1 -1
  42. package/dist/web/client/_app/version.json +1 -1
  43. package/dist/web/server/chunks/{0-BZ0-GFAV.js → 0-DI9lJoOL.js} +11 -11
  44. package/dist/web/server/chunks/{0-BZ0-GFAV.js.map → 0-DI9lJoOL.js.map} +1 -1
  45. package/dist/web/server/chunks/{1-DoI2jsEL.js → 1-DNXibdVD.js} +3 -3
  46. package/dist/web/server/chunks/{1-DoI2jsEL.js.map → 1-DNXibdVD.js.map} +1 -1
  47. package/dist/web/server/chunks/{2-6BGBaYuT.js → 2-BjADtyO0.js} +8 -8
  48. package/dist/web/server/chunks/{2-6BGBaYuT.js.map → 2-BjADtyO0.js.map} +1 -1
  49. package/dist/web/server/chunks/{3-B9fgRoyO.js → 3-C3xjKapD.js} +9 -9
  50. package/dist/web/server/chunks/{3-B9fgRoyO.js.map → 3-C3xjKapD.js.map} +1 -1
  51. package/dist/web/server/chunks/{4-CIa0l25T.js → 4-x9zcPGad.js} +8 -8
  52. package/dist/web/server/chunks/{4-CIa0l25T.js.map → 4-x9zcPGad.js.map} +1 -1
  53. package/dist/web/server/chunks/{_layout.svelte-C2cdd9CG.js → _layout.svelte-CEcgZvgF.js} +3 -6
  54. package/dist/web/server/chunks/_layout.svelte-CEcgZvgF.js.map +1 -0
  55. package/dist/web/server/index.js +1 -1
  56. package/dist/web/server/index.js.map +1 -1
  57. package/dist/web/server/manifest.js +11 -11
  58. package/dist/web/server/manifest.js.map +1 -1
  59. package/package.json +1 -1
  60. package/src/hooks/claude-mux-hook.ts +6 -0
  61. package/src/subagents.ts +7 -11
  62. package/src/utils/version.ts +1 -1
  63. package/tests/hooks/subagents.test.ts +12 -0
  64. package/tests/subagents.test.ts +7 -7
  65. package/web/.svelte-kit/adapter-bun/chunks/internal2.js +1 -1
  66. package/web/.svelte-kit/adapter-bun/chunks/internal2.js.map +1 -1
  67. package/web/.svelte-kit/adapter-bun/chunks/subagents.js +2 -5
  68. package/web/.svelte-kit/adapter-bun/chunks/subagents.js.map +1 -1
  69. package/web/.svelte-kit/adapter-bun/manifest-full.js +1 -1
  70. package/web/.svelte-kit/adapter-bun/manifest.js +1 -1
  71. package/web/.svelte-kit/adapter-bun/nodes/0.js +1 -1
  72. package/web/.svelte-kit/adapter-bun/nodes/1.js +1 -1
  73. package/web/.svelte-kit/adapter-bun/nodes/2.js +1 -1
  74. package/web/.svelte-kit/adapter-bun/nodes/3.js +1 -1
  75. package/web/.svelte-kit/adapter-bun/nodes/4.js +1 -1
  76. package/web/.svelte-kit/generated/server/internal.js +1 -1
  77. package/web/.svelte-kit/output/client/.vite/manifest.json +126 -126
  78. package/web/.svelte-kit/output/client/_app/immutable/chunks/{DiCsJZkB.js → 0itALT7D.js} +2 -2
  79. package/web/.svelte-kit/output/client/_app/immutable/chunks/{DiCsJZkB.js.map → 0itALT7D.js.map} +1 -1
  80. package/{dist/web/client/_app/immutable/chunks/CmDdyjOR.js → web/.svelte-kit/output/client/_app/immutable/chunks/9UhVHDNs.js} +2 -2
  81. package/web/.svelte-kit/output/client/_app/immutable/chunks/{CmDdyjOR.js.map → 9UhVHDNs.js.map} +1 -1
  82. package/web/.svelte-kit/output/client/_app/immutable/chunks/{BR0j6UP_.js → B5hoOzZI.js} +2 -2
  83. package/web/.svelte-kit/output/client/_app/immutable/chunks/{BR0j6UP_.js.map → B5hoOzZI.js.map} +1 -1
  84. package/web/.svelte-kit/output/client/_app/immutable/chunks/{BRwgrbZi.js → Bcl2xWM1.js} +2 -2
  85. package/{dist/web/client/_app/immutable/chunks/BRwgrbZi.js.map → web/.svelte-kit/output/client/_app/immutable/chunks/Bcl2xWM1.js.map} +1 -1
  86. package/web/.svelte-kit/output/client/_app/immutable/chunks/{Dmt0dCmj.js → CTgykToi.js} +2 -2
  87. package/{dist/web/client/_app/immutable/chunks/Dmt0dCmj.js.map → web/.svelte-kit/output/client/_app/immutable/chunks/CTgykToi.js.map} +1 -1
  88. package/{dist/web/client/_app/immutable/chunks/juU6kBhv.js → web/.svelte-kit/output/client/_app/immutable/chunks/D4VtXq1u.js} +2 -2
  89. package/{dist/web/client/_app/immutable/chunks/juU6kBhv.js.map → web/.svelte-kit/output/client/_app/immutable/chunks/D4VtXq1u.js.map} +1 -1
  90. package/web/.svelte-kit/output/client/_app/immutable/chunks/{CJ5X49p2.js → DJPAeXBZ.js} +2 -2
  91. package/web/.svelte-kit/output/client/_app/immutable/chunks/{CJ5X49p2.js.map → DJPAeXBZ.js.map} +1 -1
  92. package/web/.svelte-kit/output/client/_app/immutable/chunks/{Cb0yiQIh.js → iD86EAaZ.js} +3 -3
  93. package/web/.svelte-kit/output/client/_app/immutable/chunks/{Cb0yiQIh.js.map → iD86EAaZ.js.map} +1 -1
  94. package/web/.svelte-kit/output/client/_app/immutable/chunks/uNuVvgdW.js +2 -0
  95. package/web/.svelte-kit/output/client/_app/immutable/chunks/uNuVvgdW.js.map +1 -0
  96. package/web/.svelte-kit/output/client/_app/immutable/entry/{app.BNsXYIeZ.js → app.D_c8YH2_.js} +3 -3
  97. package/web/.svelte-kit/output/client/_app/immutable/entry/{app.BNsXYIeZ.js.map → app.D_c8YH2_.js.map} +1 -1
  98. package/web/.svelte-kit/output/client/_app/immutable/entry/start.C4kxbL3U.js +2 -0
  99. package/web/.svelte-kit/output/client/_app/immutable/entry/start.C4kxbL3U.js.map +1 -0
  100. package/web/.svelte-kit/output/client/_app/immutable/nodes/{0.Cga09Vlt.js → 0.DKJz_Waz.js} +2 -2
  101. package/web/.svelte-kit/output/client/_app/immutable/nodes/{0.Cga09Vlt.js.map → 0.DKJz_Waz.js.map} +1 -1
  102. package/web/.svelte-kit/output/client/_app/immutable/nodes/{1.C5UTjGXy.js → 1.BMuM5b-K.js} +2 -2
  103. package/web/.svelte-kit/output/client/_app/immutable/nodes/{1.C5UTjGXy.js.map → 1.BMuM5b-K.js.map} +1 -1
  104. package/web/.svelte-kit/output/client/_app/immutable/nodes/{2.C76yPG3X.js → 2.B5-VVL7z.js} +2 -2
  105. package/web/.svelte-kit/output/client/_app/immutable/nodes/{2.C76yPG3X.js.map → 2.B5-VVL7z.js.map} +1 -1
  106. package/web/.svelte-kit/output/client/_app/immutable/nodes/{3.Tbj29aAW.js → 3.Ch8jV9KV.js} +2 -2
  107. package/{dist/web/client/_app/immutable/nodes/3.Tbj29aAW.js.map → web/.svelte-kit/output/client/_app/immutable/nodes/3.Ch8jV9KV.js.map} +1 -1
  108. package/web/.svelte-kit/output/client/_app/immutable/nodes/{4.D0z9Wo_G.js → 4.3R3T2cvf.js} +2 -2
  109. package/{dist/web/client/_app/immutable/nodes/4.D0z9Wo_G.js.map → web/.svelte-kit/output/client/_app/immutable/nodes/4.3R3T2cvf.js.map} +1 -1
  110. package/web/.svelte-kit/output/client/_app/version.json +1 -1
  111. package/web/.svelte-kit/output/server/chunks/internal2.js +1 -1
  112. package/web/.svelte-kit/output/server/chunks/internal2.js.map +1 -1
  113. package/web/.svelte-kit/output/server/chunks/subagents.js +2 -5
  114. package/web/.svelte-kit/output/server/chunks/subagents.js.map +1 -1
  115. package/web/.svelte-kit/output/server/manifest-full.js +1 -1
  116. package/web/.svelte-kit/output/server/manifest.js +1 -1
  117. package/web/.svelte-kit/output/server/nodes/0.js +1 -1
  118. package/web/.svelte-kit/output/server/nodes/1.js +1 -1
  119. package/web/.svelte-kit/output/server/nodes/2.js +1 -1
  120. package/web/.svelte-kit/output/server/nodes/3.js +1 -1
  121. package/web/.svelte-kit/output/server/nodes/4.js +1 -1
  122. package/dist/web/client/_app/immutable/chunks/_om2syd9.js +0 -2
  123. package/dist/web/client/_app/immutable/chunks/_om2syd9.js.map +0 -1
  124. package/dist/web/client/_app/immutable/entry/start.BAAC0OQy.js +0 -2
  125. package/dist/web/client/_app/immutable/entry/start.BAAC0OQy.js.map +0 -1
  126. package/dist/web/server/chunks/_layout.svelte-C2cdd9CG.js.map +0 -1
  127. package/web/.svelte-kit/output/client/_app/immutable/chunks/_om2syd9.js +0 -2
  128. package/web/.svelte-kit/output/client/_app/immutable/chunks/_om2syd9.js.map +0 -1
  129. package/web/.svelte-kit/output/client/_app/immutable/entry/start.BAAC0OQy.js +0 -2
  130. package/web/.svelte-kit/output/client/_app/immutable/entry/start.BAAC0OQy.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ZLvUvyim.js","./wDzz0qaB.js","./BPQ3VLAy.js","./DPfMkruS.js","./CnnebwVN.js","./2EtD6e53.js"])))=>i.map(i=>d[i]);
2
- import{ar as Ti,aU as ki,bv as Ii,aX as Di,a0 as Ri,R as Io,bw as ks,u as At,D as ae,bx as Li,g as r,br as Fi,ah as Ni,e as L,w as le,s as _,h as w,by as Is,au as Mi,bz as Sn,b9 as Do,ba as ie,bb as zi,bc as Ds,bd as Bi,F as Vi,p as U,c as F,f as E,x as wt,a as d,b as q,bu as _e,i as V,r as z,j as A,bA as Wi,M as Hi,P as ji,bt as Ki,y as I,bB as Ui,S as qi,be as Xi,bC as Ro,A as tt,z as X,B as K,I as re,an as Lo,J as Fo,bf as Gi,G as Yt,bD as No,ao as Ie}from"./BNg62Zr9.js";import{d as or,b as at,k as Mo,D as Yi,e as Zi,t as Ji,c as te,L as Qi,M as $i,O as ta,h as Tn,i as ea,j as Sr,B as ln,o as zo,P as na,Q as ra,T as sa,U as oa,I as Vr,r as ia,V as Bo,s as aa}from"./BR0j6UP_.js";import"./DsnmJJEf.js";import{p as b,i as B,r as dt,c as _t,b as Nn}from"./DvGfrVCO.js";import{q as Er,a as Kt,g as De,o as jn,b as Zt,c as $t,s as ne,e as Ze}from"./Y5WsX0H8.js";import{c as Lt,_ as ot}from"./BKnaGkXv.js";const la=[];function ca(n,t=!1,e=!1){return Wn(n,new Map,"",la,null,e)}function Wn(n,t,e,s,o=null,i=!1){if(typeof n=="object"&&n!==null){var a=t.get(n);if(a!==void 0)return a;if(n instanceof Map)return new Map(n);if(n instanceof Set)return new Set(n);if(Ti(n)){var l=Array(n.length);t.set(n,l),o!==null&&t.set(o,l);for(var c=0;c<n.length;c+=1){var u=n[c];c in n&&(l[c]=Wn(u,t,e,s,null,i))}return l}if(ki(n)===Ii){l={},t.set(n,l),o!==null&&t.set(o,l);for(var g of Object.keys(n))l[g]=Wn(n[g],t,e,s,null,i);return l}if(n instanceof Date)return n.getTime(),structuredClone(n);if(typeof n.toJSON=="function"&&!i)return Wn(n.toJSON(),t,e,s,n)}if(n instanceof EventTarget)return n;try{return structuredClone(n)}catch{return n}}function ua(){return Symbol(Di)}function da(n=!1){const t=Ri,e=t.l.u;if(!e)return;let s=()=>Fi(t.s);if(n){let o=0,i={};const a=Ni(()=>{let l=!1;const c=t.s;for(const u in c)c[u]!==i[u]&&(i[u]=c[u],l=!0);return l&&o++,o});s=()=>r(a)}e.b.length&&Io(()=>{Rs(t,s),ks(e.b)}),At(()=>{const o=ae(()=>e.m.map(Li));return()=>{for(const i of o)typeof i=="function"&&i()}}),e.a.length&&At(()=>{Rs(t,s),ks(e.a)})}function Rs(n,t){if(n.l.s)for(const e of n.l.s)r(e);t()}const fa={lastSession:"claude-mux-last-session",servers:"claude-mux-servers",sidebarWidth:"claude-mux-sidebar-width"},Wr=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),nv=Wr?"⌘":"Ctrl",Ls=or(fa.servers,[]);function ha(){const n=window.location.host,t=n.split(":")[0].split(".")[0],e=`${window.location.protocol}//${n}`;return{hostname:t,url:e}}class va{#t=L(le({hostname:"",url:""}));get current(){return r(this.#t)}set current(t){_(this.#t,t,!0)}#e=L(le([]));get servers(){return r(this.#e)}set servers(t){_(this.#e,t,!0)}#n=L("");get self(){return r(this.#n)}set self(t){_(this.#n,t,!0)}#r=L(!1);get loading(){return r(this.#r)}set loading(t){_(this.#r,t,!0)}#s=L(null);get error(){return r(this.#s)}set error(t){_(this.#s,t,!0)}init(){this.current=ha();const t=Ls.load();this.servers=t.length>0?t:this.current.hostname?[this.current]:[]}async refresh(){if(!this.loading){this.loading=!0,this.error=null;try{const t=await fetch("/api/servers/discover"),e=await t.json();if(!t.ok||e.error){this.error=e.error??`HTTP ${t.status}`;return}this.servers=e.servers,this.self=e.self,Ls.save(e.servers)}catch(t){this.error=t instanceof Error?t.message:"discover failed"}finally{this.loading=!1}}}}const rv=new va;function ga(n){return typeof n=="function"}function Mn(n){return n!==null&&typeof n=="object"}const pa=["string","number","bigint","boolean"];function Dr(n){return n==null||pa.includes(typeof n)?!0:Array.isArray(n)?n.every(t=>Dr(t)):typeof n=="object"?Object.getPrototypeOf(n)===Object.prototype:!1}const Rn=Symbol("box"),Hr=Symbol("is-writable");function C(n,t){const e=w(n);return t?{[Rn]:!0,[Hr]:!0,get current(){return r(e)},set current(s){t(s)}}:{[Rn]:!0,get current(){return n()}}}function ir(n){return Mn(n)&&Rn in n}function Vo(n){return ir(n)&&Hr in n}function ma(n){return ir(n)?n:ga(n)?C(n):Fe(n)}function sv(n){return Object.entries(n).reduce((t,[e,s])=>ir(s)?(Vo(s)?Object.defineProperty(t,e,{get(){return s.current},set(o){s.current=o}}):Object.defineProperty(t,e,{get(){return s.current}}),t):Object.assign(t,{[e]:s}),{})}function ov(n){return Vo(n)?{[Rn]:!0,get current(){return n.current}}:n}function Fe(n){let t=L(le(n));return{[Rn]:!0,[Hr]:!0,get current(){return r(t)},set current(e){_(t,e,!0)}}}function ya(...n){return function(t){for(const e of n)if(e){if(t.defaultPrevented)return;typeof e=="function"?e.call(this,t):e.current?.call(this,t)}}}var Fs=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ba=/\n/g,wa=/^\s*/,_a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,xa=/^:\s*/,Pa=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Sa=/^[;\s]*/,Ea=/^\s+|\s+$/g,Aa=`
2
+ import{ar as Ti,aU as ki,bv as Ii,aX as Di,a0 as Ri,R as Io,bw as ks,u as At,D as ae,bx as Li,g as r,br as Fi,ah as Ni,e as L,w as le,s as _,h as w,by as Is,au as Mi,bz as Sn,b9 as Do,ba as ie,bb as zi,bc as Ds,bd as Bi,F as Vi,p as U,c as F,f as E,x as wt,a as d,b as q,bu as _e,i as V,r as z,j as A,bA as Wi,M as Hi,P as ji,bt as Ki,y as I,bB as Ui,S as qi,be as Xi,bC as Ro,A as tt,z as X,B as K,I as re,an as Lo,J as Fo,bf as Gi,G as Yt,bD as No,ao as Ie}from"./BNg62Zr9.js";import{d as or,b as at,k as Mo,D as Yi,e as Zi,t as Ji,c as te,L as Qi,M as $i,O as ta,h as Tn,i as ea,j as Sr,B as ln,o as zo,P as na,Q as ra,T as sa,U as oa,I as Vr,r as ia,V as Bo,s as aa}from"./B5hoOzZI.js";import"./DsnmJJEf.js";import{p as b,i as B,r as dt,c as _t,b as Nn}from"./DvGfrVCO.js";import{q as Er,a as Kt,g as De,o as jn,b as Zt,c as $t,s as ne,e as Ze}from"./Y5WsX0H8.js";import{c as Lt,_ as ot}from"./BKnaGkXv.js";const la=[];function ca(n,t=!1,e=!1){return Wn(n,new Map,"",la,null,e)}function Wn(n,t,e,s,o=null,i=!1){if(typeof n=="object"&&n!==null){var a=t.get(n);if(a!==void 0)return a;if(n instanceof Map)return new Map(n);if(n instanceof Set)return new Set(n);if(Ti(n)){var l=Array(n.length);t.set(n,l),o!==null&&t.set(o,l);for(var c=0;c<n.length;c+=1){var u=n[c];c in n&&(l[c]=Wn(u,t,e,s,null,i))}return l}if(ki(n)===Ii){l={},t.set(n,l),o!==null&&t.set(o,l);for(var g of Object.keys(n))l[g]=Wn(n[g],t,e,s,null,i);return l}if(n instanceof Date)return n.getTime(),structuredClone(n);if(typeof n.toJSON=="function"&&!i)return Wn(n.toJSON(),t,e,s,n)}if(n instanceof EventTarget)return n;try{return structuredClone(n)}catch{return n}}function ua(){return Symbol(Di)}function da(n=!1){const t=Ri,e=t.l.u;if(!e)return;let s=()=>Fi(t.s);if(n){let o=0,i={};const a=Ni(()=>{let l=!1;const c=t.s;for(const u in c)c[u]!==i[u]&&(i[u]=c[u],l=!0);return l&&o++,o});s=()=>r(a)}e.b.length&&Io(()=>{Rs(t,s),ks(e.b)}),At(()=>{const o=ae(()=>e.m.map(Li));return()=>{for(const i of o)typeof i=="function"&&i()}}),e.a.length&&At(()=>{Rs(t,s),ks(e.a)})}function Rs(n,t){if(n.l.s)for(const e of n.l.s)r(e);t()}const fa={lastSession:"claude-mux-last-session",servers:"claude-mux-servers",sidebarWidth:"claude-mux-sidebar-width"},Wr=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),nv=Wr?"⌘":"Ctrl",Ls=or(fa.servers,[]);function ha(){const n=window.location.host,t=n.split(":")[0].split(".")[0],e=`${window.location.protocol}//${n}`;return{hostname:t,url:e}}class va{#t=L(le({hostname:"",url:""}));get current(){return r(this.#t)}set current(t){_(this.#t,t,!0)}#e=L(le([]));get servers(){return r(this.#e)}set servers(t){_(this.#e,t,!0)}#n=L("");get self(){return r(this.#n)}set self(t){_(this.#n,t,!0)}#r=L(!1);get loading(){return r(this.#r)}set loading(t){_(this.#r,t,!0)}#s=L(null);get error(){return r(this.#s)}set error(t){_(this.#s,t,!0)}init(){this.current=ha();const t=Ls.load();this.servers=t.length>0?t:this.current.hostname?[this.current]:[]}async refresh(){if(!this.loading){this.loading=!0,this.error=null;try{const t=await fetch("/api/servers/discover"),e=await t.json();if(!t.ok||e.error){this.error=e.error??`HTTP ${t.status}`;return}this.servers=e.servers,this.self=e.self,Ls.save(e.servers)}catch(t){this.error=t instanceof Error?t.message:"discover failed"}finally{this.loading=!1}}}}const rv=new va;function ga(n){return typeof n=="function"}function Mn(n){return n!==null&&typeof n=="object"}const pa=["string","number","bigint","boolean"];function Dr(n){return n==null||pa.includes(typeof n)?!0:Array.isArray(n)?n.every(t=>Dr(t)):typeof n=="object"?Object.getPrototypeOf(n)===Object.prototype:!1}const Rn=Symbol("box"),Hr=Symbol("is-writable");function C(n,t){const e=w(n);return t?{[Rn]:!0,[Hr]:!0,get current(){return r(e)},set current(s){t(s)}}:{[Rn]:!0,get current(){return n()}}}function ir(n){return Mn(n)&&Rn in n}function Vo(n){return ir(n)&&Hr in n}function ma(n){return ir(n)?n:ga(n)?C(n):Fe(n)}function sv(n){return Object.entries(n).reduce((t,[e,s])=>ir(s)?(Vo(s)?Object.defineProperty(t,e,{get(){return s.current},set(o){s.current=o}}):Object.defineProperty(t,e,{get(){return s.current}}),t):Object.assign(t,{[e]:s}),{})}function ov(n){return Vo(n)?{[Rn]:!0,get current(){return n.current}}:n}function Fe(n){let t=L(le(n));return{[Rn]:!0,[Hr]:!0,get current(){return r(t)},set current(e){_(t,e,!0)}}}function ya(...n){return function(t){for(const e of n)if(e){if(t.defaultPrevented)return;typeof e=="function"?e.call(this,t):e.current?.call(this,t)}}}var Fs=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ba=/\n/g,wa=/^\s*/,_a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,xa=/^:\s*/,Pa=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Sa=/^[;\s]*/,Ea=/^\s+|\s+$/g,Aa=`
3
3
  `,Ns="/",Ms="*",on="",Oa="comment",Ca="declaration";function Ta(n,t){if(typeof n!="string")throw new TypeError("First argument must be a string");if(!n)return[];t=t||{};var e=1,s=1;function o(f){var m=f.match(ba);m&&(e+=m.length);var x=f.lastIndexOf(Aa);s=~x?f.length-x:s+f.length}function i(){var f={line:e,column:s};return function(m){return m.position=new a(f),u(),m}}function a(f){this.start=f,this.end={line:e,column:s},this.source=t.source}a.prototype.content=n;function l(f){var m=new Error(t.source+":"+e+":"+s+": "+f);if(m.reason=f,m.filename=t.source,m.line=e,m.column=s,m.source=n,!t.silent)throw m}function c(f){var m=f.exec(n);if(m){var x=m[0];return o(x),n=n.slice(x.length),m}}function u(){c(wa)}function g(f){var m;for(f=f||[];m=p();)m!==!1&&f.push(m);return f}function p(){var f=i();if(!(Ns!=n.charAt(0)||Ms!=n.charAt(1))){for(var m=2;on!=n.charAt(m)&&(Ms!=n.charAt(m)||Ns!=n.charAt(m+1));)++m;if(m+=2,on===n.charAt(m-1))return l("End of comment missing");var x=n.slice(2,m-2);return s+=2,o(x),n=n.slice(m),s+=2,f({type:Oa,comment:x})}}function v(){var f=i(),m=c(_a);if(m){if(p(),!c(xa))return l("property missing ':'");var x=c(Pa),P=f({type:Ca,property:zs(m[0].replace(Fs,on)),value:x?zs(x[0].replace(Fs,on)):on});return c(Sa),P}}function h(){var f=[];g(f);for(var m;m=v();)m!==!1&&(f.push(m),g(f));return f}return u(),h()}function zs(n){return n?n.replace(Ea,on):on}function ka(n,t){let e=null;if(!n||typeof n!="string")return e;const s=Ta(n),o=typeof t=="function";return s.forEach(i=>{if(i.type!=="declaration")return;const{property:a,value:l}=i;o?t(a,l,i):l&&(e=e||{},e[a]=l)}),e}const Ia=/\d/,Da=["-","_","/","."];function Ra(n=""){if(!Ia.test(n))return n!==n.toLowerCase()}function La(n){const t=[];let e="",s,o;for(const i of n){const a=Da.includes(i);if(a===!0){t.push(e),e="",s=void 0;continue}const l=Ra(i);if(o===!1){if(s===!1&&l===!0){t.push(e),e=i,s=l;continue}if(s===!0&&l===!1&&e.length>1){const c=e.at(-1);t.push(e.slice(0,Math.max(0,e.length-1))),e=c+i,s=l;continue}}e+=i,s=l,o=a}return t.push(e),t}function Wo(n){return n?La(n).map(t=>Na(t)).join(""):""}function Fa(n){return Ma(Wo(n||""))}function Na(n){return n?n[0].toUpperCase()+n.slice(1):""}function Ma(n){return n?n[0].toLowerCase()+n.slice(1):""}function Cn(n){if(!n)return{};const t={};function e(s,o){if(s.startsWith("-moz-")||s.startsWith("-webkit-")||s.startsWith("-ms-")||s.startsWith("-o-")){t[Wo(s)]=o;return}if(s.startsWith("--")){t[s]=o;return}t[Fa(s)]=o}return ka(n,e),t}function Kn(...n){return(...t)=>{for(const e of n)typeof e=="function"&&e(...t)}}function za(n,t){const e=RegExp(n,"g");return s=>{if(typeof s!="string")throw new TypeError(`expected an argument of type string, but got ${typeof s}`);return s.match(e)?s.replace(e,t):s}}const Ba=za(/[A-Z]/,n=>`-${n.toLowerCase()}`);function Va(n){if(!n||typeof n!="object"||Array.isArray(n))throw new TypeError(`expected an argument of type object, but got ${typeof n}`);return Object.keys(n).map(t=>`${Ba(t)}: ${n[t]};`).join(`
4
4
  `)}function jr(n={}){return Va(n).replace(`
5
5
  `," ")}const Wa=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],Ha=new Set(Wa);function ja(n){return Ha.has(n)}function Ut(...n){const t={...n[0]};for(let e=1;e<n.length;e++){const s=n[e];if(s){for(const o of Object.keys(s)){const i=t[o],a=s[o],l=typeof i=="function",c=typeof a=="function";if(l&&ja(o)){const u=i,g=a;t[o]=ya(u,g)}else if(l&&c)t[o]=Kn(i,a);else if(o==="class"){const u=Dr(i),g=Dr(a);u&&g?t[o]=Er(i,a):u?t[o]=Er(i):g&&(t[o]=Er(a))}else if(o==="style"){const u=typeof i=="object",g=typeof a=="object",p=typeof i=="string",v=typeof a=="string";if(u&&g)t[o]={...i,...a};else if(u&&v){const h=Cn(a);t[o]={...i,...h}}else if(p&&g){const h=Cn(i);t[o]={...h,...a}}else if(p&&v){const h=Cn(i),f=Cn(a);t[o]={...h,...f}}else u?t[o]=i:g?t[o]=a:p?t[o]=i:v&&(t[o]=a)}else t[o]=a!==void 0?a:i}for(const o of Object.getOwnPropertySymbols(s)){const i=t[o],a=s[o];t[o]=a!==void 0?a:i}}}return typeof t.style=="object"&&(t.style=jr(t.style).replaceAll(`
6
6
  `," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}const Ho={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"};jr(Ho);const jo=typeof window<"u"?window:void 0;function Ka(n){let t=n.activeElement;for(;t?.shadowRoot;){const e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}class Ua extends Map{#t=new Map;#e=L(0);#n=L(0);#r=Is||-1;constructor(t){if(super(),t){for(var[e,s]of t)super.set(e,s);this.#n.v=super.size}}#s(t){return Is===this.#r?L(t):Mi(t)}has(t){var e=this.#t,s=e.get(t);if(s===void 0)if(super.has(t))s=this.#s(0),e.set(t,s);else return r(this.#e),!1;return r(s),!0}forEach(t,e){this.#o(),super.forEach(t,e)}get(t){var e=this.#t,s=e.get(t);if(s===void 0)if(super.has(t))s=this.#s(0),e.set(t,s);else{r(this.#e);return}return r(s),super.get(t)}getOrInsert(t,e){return super.has(t)||this.set(t,e),this.get(t)}getOrInsertComputed(t,e){return super.has(t)||this.set(t,e(t)),this.get(t)}set(t,e){var s=this.#t,o=s.get(t),i=super.get(t),a=super.set(t,e),l=this.#e;if(o===void 0)o=this.#s(0),s.set(t,o),_(this.#n,super.size),Sn(l);else if(i!==e){Sn(o);var c=l.reactions===null?null:new Set(l.reactions),u=c===null||!o.reactions?.every(g=>c.has(g));u&&Sn(l)}return a}delete(t){var e=this.#t,s=e.get(t),o=super.delete(t);return s!==void 0&&(e.delete(t),_(s,-1)),o&&(_(this.#n,super.size),Sn(this.#e)),o}clear(){if(super.size!==0){super.clear();var t=this.#t;_(this.#n,0);for(var e of t.values())_(e,-1);Sn(this.#e),t.clear()}}#o(){r(this.#e);var t=this.#t;if(this.#n.v!==t.size){for(var e of super.keys())if(!t.has(e)){var s=this.#s(0);t.set(e,s)}}for([,s]of this.#t)r(s)}keys(){return r(this.#e),super.keys()}values(){return this.#o(),super.values()}entries(){return this.#o(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return r(this.#n),super.size}}class qa{#t;#e;constructor(t={}){const{window:e=jo,document:s=e?.document}=t;e!==void 0&&(this.#t=s,this.#e=Do(o=>{const i=ie(e,"focusin",o),a=ie(e,"focusout",o);return()=>{i(),a()}}))}get current(){return this.#e?.(),this.#t?Ka(this.#t):null}}new qa;function Xa(n){return typeof n=="function"}class $e{#t;#e;constructor(t){this.#t=t,this.#e=Symbol(t)}get key(){return this.#e}exists(){return zi(this.#e)}get(){const t=Ds(this.#e);if(t===void 0)throw new Error(`Context "${this.#t}" not found`);return t}getOr(t){const e=Ds(this.#e);return e===void 0?t:e}set(t){return Bi(this.#e,t)}}function Ga(n,t){switch(n){case"post":At(t);break;case"pre":Io(t);break}}function Ko(n,t,e,s={}){const{lazy:o=!1}=s;let i=!o,a=Array.isArray(n)?[]:void 0;Ga(t,()=>{const l=Array.isArray(n)?n.map(u=>u()):n();if(!i){i=!0,a=l;return}const c=ae(()=>e(l,a));return a=l,c})}function Jt(n,t,e){Ko(n,"post",t,e)}function Ya(n,t,e){Ko(n,"pre",t,e)}Jt.pre=Ya;function Bs(n){return Xa(n)?n():n}class Za{#t={width:0,height:0};#e=!1;#n;#r;#s;#o=w(()=>(r(this.#i)?.(),this.getSize().width));#a=w(()=>(r(this.#i)?.(),this.getSize().height));#i=w(()=>{const t=Bs(this.#r);if(t)return Do(e=>{if(!this.#s)return;const s=new this.#s.ResizeObserver(o=>{this.#e=!0;for(const i of o){const a=this.#n.box==="content-box"?i.contentBoxSize:i.borderBoxSize,l=Array.isArray(a)?a:[a];this.#t.width=l.reduce((c,u)=>Math.max(c,u.inlineSize),0),this.#t.height=l.reduce((c,u)=>Math.max(c,u.blockSize),0)}e()});return s.observe(t),()=>{this.#e=!1,s.disconnect()}})});constructor(t,e={box:"border-box"}){this.#s=e.window??jo,this.#n=e,this.#r=t,this.#t={width:0,height:0}}calculateSize(){const t=Bs(this.#r);if(!t||!this.#s)return;const e=t.offsetWidth,s=t.offsetHeight;if(this.#n.box==="border-box")return{width:e,height:s};const o=this.#s.getComputedStyle(t),i=parseFloat(o.paddingLeft)+parseFloat(o.paddingRight),a=parseFloat(o.paddingTop)+parseFloat(o.paddingBottom),l=parseFloat(o.borderLeftWidth)+parseFloat(o.borderRightWidth),c=parseFloat(o.borderTopWidth)+parseFloat(o.borderBottomWidth),u=e-i-l,g=s-a-c;return{width:u,height:g}}getSize(){return this.#e?this.#t:this.calculateSize()??this.#t}get current(){return r(this.#i)?.(),this.getSize()}get width(){return r(this.#o)}get height(){return r(this.#a)}}function hn(n){At(()=>()=>{n()})}function Ja(n,t){return setTimeout(t,n)}function Kr(n){Vi().then(n)}const Qa=1,$a=9,tl=11;function Rr(n){return Mn(n)&&n.nodeType===Qa&&typeof n.nodeName=="string"}function Uo(n){return Mn(n)&&n.nodeType===$a}function el(n){return Mn(n)&&n.constructor?.name==="VisualViewport"}function nl(n){return Mn(n)&&n.nodeType!==void 0}function qo(n){return nl(n)&&n.nodeType===tl&&"host"in n}function rl(n,t){if(!n||!t||!Rr(n)||!Rr(t))return!1;const e=t.getRootNode?.();if(n===t||n.contains(t))return!0;if(e&&qo(e)){let s=t;for(;s;){if(n===s)return!0;s=s.parentNode||s.host}}return!1}function Xo(n){return Uo(n)?n:el(n)?n.document:n?.ownerDocument??document}function Go(n){return qo(n)?Go(n.host):Uo(n)?n.defaultView??window:Rr(n)?n.ownerDocument?.defaultView??window:window}function kn(n){let t=n.activeElement;for(;t?.shadowRoot;){const e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}class Ur{element;#t=w(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return r(this.#t)}set root(t){_(this.#t,t)}constructor(t){typeof t=="function"?this.element=C(t):this.element=t}getDocument=()=>Xo(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>kn(this.root);isActiveElement=t=>t===this.getActiveElement();getElementById(t){return this.root.getElementById(t)}querySelector=t=>this.root?this.root.querySelector(t):null;querySelectorAll=t=>this.root?this.root.querySelectorAll(t):[];setTimeout=(t,e)=>this.getWindow().setTimeout(t,e);clearTimeout=t=>this.getWindow().clearTimeout(t)}function ve(n,t){return{[ua()]:e=>ir(n)?(n.current=e,ae(()=>t?.(e)),()=>{"isConnected"in e&&e.isConnected||(n.current=null,t?.(null))}):(n(e),ae(()=>t?.(e)),()=>{"isConnected"in e&&e.isConnected||(n(null),t?.(null))})}}function Un(n){return n?"true":"false"}function cn(n){return n?"":void 0}function sl(n){return n?!0:void 0}function qr(n){return n?"open":"closed"}function Xr(n){return n==="starting"?{"data-starting-style":""}:n==="ending"?{"data-ending-style":""}:{}}function ol(n,t){return t?"mixed":n?"true":"false"}class il{#t;#e;attrs;constructor(t){this.#t=t.getVariant?t.getVariant():null,this.#e=this.#t?`data-${this.#t}-`:`data-${t.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(t.parts.map(e=>[e,this.getAttr(e)]))}getAttr(t,e){return e?`data-${e}-${t}`:`${this.#e}${t}`}selector(t,e){return`[${this.getAttr(t,e)}]`}}function ar(n){const t=new il(n);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}const iv="ArrowDown",av="ArrowLeft",lv="ArrowRight",cv="ArrowUp",uv="End",lr="Enter",al="Escape",dv="Home",fv="PageDown",hv="PageUp",cr=" ",vv="Tab",Yo=typeof document<"u",Vs=ll();function ll(){return Yo&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Lr(n){return n instanceof HTMLElement}function an(n){return n instanceof Element}function cl(n){return n instanceof Element||n instanceof SVGElement}function qn(n){return n.pointerType==="touch"}function gv(n){return n.matches(":focus-visible")}function ul(n){return n!==null}function pv(n){return n instanceof HTMLInputElement&&"select"in n}class dl{#t;#e=null;#n=null;#r=0;constructor(t){this.#t=t,hn(()=>this.#s())}#s(){this.#e!==null&&(window.cancelAnimationFrame(this.#e),this.#e=null),this.#n?.disconnect(),this.#n=null,this.#r++}run(t){this.#s();const e=this.#t.ref.current;if(!e)return;if(typeof e.getAnimations!="function"){this.#o(t);return}const s=this.#r,o=()=>{s===this.#r&&this.#o(t)},i=()=>{if(s!==this.#r)return;const l=e.getAnimations();if(l.length===0){o();return}Promise.all(l.map(c=>c.finished)).then(()=>{o()}).catch(()=>{if(s!==this.#r)return;if(e.getAnimations().some(g=>g.pending||g.playState!=="finished")){i();return}o()})},a=()=>{this.#e=window.requestAnimationFrame(()=>{this.#e=null,i()})};if(!this.#t.afterTick.current){a();return}this.#e=window.requestAnimationFrame(()=>{this.#e=null;const l="data-starting-style";if(!e.hasAttribute(l)){a();return}this.#n=new MutationObserver(()=>{s===this.#r&&(e.hasAttribute(l)||(this.#n?.disconnect(),this.#n=null,a()))}),this.#n.observe(e,{attributes:!0,attributeFilter:[l]})})}#o(t){const e=()=>{t()};this.#t.afterTick?Kr(e):e()}}class Xn{#t;#e;#n;#r=L(!1);#s=L(void 0);#o=!1;#a=null;constructor(t){this.#t=t,_(this.#r,t.open.current,!0),this.#e=t.enabled??!0,this.#n=new dl({ref:this.#t.ref,afterTick:this.#t.open}),hn(()=>this.#i()),Jt(()=>this.#t.open.current,e=>{if(!this.#o){this.#o=!0;return}if(this.#i(),!e&&this.#t.shouldSkipExitAnimation?.()){_(this.#r,!1),_(this.#s,void 0),this.#t.onComplete?.();return}if(e&&_(this.#r,!0),_(this.#s,e?"starting":"ending",!0),e&&(this.#a=window.requestAnimationFrame(()=>{this.#a=null,this.#t.open.current&&_(this.#s,void 0)})),!this.#e){e||_(this.#r,!1),_(this.#s,void 0),this.#t.onComplete?.();return}this.#n.run(()=>{e===this.#t.open.current&&(this.#t.open.current||_(this.#r,!1),_(this.#s,void 0),this.#t.onComplete?.())})})}get shouldRender(){return r(this.#r)}get transitionStatus(){return r(this.#s)}#i(){this.#a!==null&&(window.cancelAnimationFrame(this.#a),this.#a=null)}}function Ot(){}function xe(n,t){return`bits-${n}`}const fl=ar({component:"dialog",parts:["content","trigger","overlay","title","description","close","cancel","action"]}),Ue=new $e("Dialog.Root | AlertDialog.Root");class ur{static create(t){const e=Ue.getOr(null);return Ue.set(new ur(t,e))}opts;#t=L(null);get triggerNode(){return r(this.#t)}set triggerNode(t){_(this.#t,t,!0)}#e=L(null);get contentNode(){return r(this.#e)}set contentNode(t){_(this.#e,t,!0)}#n=L(null);get overlayNode(){return r(this.#n)}set overlayNode(t){_(this.#n,t,!0)}#r=L(null);get descriptionNode(){return r(this.#r)}set descriptionNode(t){_(this.#r,t,!0)}#s=L(void 0);get contentId(){return r(this.#s)}set contentId(t){_(this.#s,t,!0)}#o=L(void 0);get titleId(){return r(this.#o)}set titleId(t){_(this.#o,t,!0)}#a=L(void 0);get triggerId(){return r(this.#a)}set triggerId(t){_(this.#a,t,!0)}#i=L(void 0);get descriptionId(){return r(this.#i)}set descriptionId(t){_(this.#i,t,!0)}#l=L(null);get cancelNode(){return r(this.#l)}set cancelNode(t){_(this.#l,t,!0)}#c=L(0);get nestedOpenCount(){return r(this.#c)}set nestedOpenCount(t){_(this.#c,t,!0)}depth;parent;contentPresence;overlayPresence;constructor(t,e){this.opts=t,this.parent=e,this.depth=e?e.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new Xn({ref:C(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new Xn({ref:C(()=>this.overlayNode),open:this.opts.open,enabled:!0}),Jt(()=>this.opts.open.current,s=>{this.parent&&(s?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),hn(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=t=>fl.getAttr(t,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#d=w(()=>({"data-state":qr(this.opts.open.current)}));get sharedProps(){return r(this.#d)}set sharedProps(t){_(this.#d,t)}}class Gr{static create(t){return new Gr(t,Ue.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=ve(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleClose()}onkeydown(t){this.opts.disabled.current||(t.key===cr||t.key===lr)&&(t.preventDefault(),this.root.handleClose())}#t=w(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return r(this.#t)}set props(t){_(this.#t,t)}}class Yr{static create(t){return new Yr(t,Ue.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=ve(this.opts.ref)}#t=w(()=>({id:this.opts.id.current,[this.root.getBitsAttr("action")]:"",...this.root.sharedProps,...this.attachment}));get props(){return r(this.#t)}set props(t){_(this.#t,t)}}class Zr{static create(t){return new Zr(t,Ue.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.root.titleId=this.opts.id.current,this.attachment=ve(this.opts.ref),Jt.pre(()=>this.opts.id.current,s=>{this.root.titleId=s})}#t=w(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.getBitsAttr("title")]:"",...this.root.sharedProps,...this.attachment}));get props(){return r(this.#t)}set props(t){_(this.#t,t)}}class Jr{static create(t){return new Jr(t,Ue.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.root.descriptionId=this.opts.id.current,this.attachment=ve(this.opts.ref,s=>{this.root.descriptionNode=s}),Jt.pre(()=>this.opts.id.current,s=>{this.root.descriptionId=s})}#t=w(()=>({id:this.opts.id.current,[this.root.getBitsAttr("description")]:"",...this.root.sharedProps,...this.attachment}));get props(){return r(this.#t)}set props(t){_(this.#t,t)}}class dr{static create(t){return new dr(t,Ue.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=ve(this.opts.ref,s=>{this.root.contentNode=s,this.root.contentId=s?.id})}#t=w(()=>({open:this.root.opts.open.current}));get snippetProps(){return r(this.#t)}set snippetProps(t){_(this.#t,t)}#e=w(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr("content")]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:"layout style"},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,"data-nested-open":cn(this.root.nestedOpenCount>0),"data-nested":cn(this.root.parent!==null),...Xr(this.root.contentPresence.transitionStatus),...this.root.sharedProps,...this.attachment}));get props(){return r(this.#e)}set props(t){_(this.#e,t)}get shouldRender(){return this.root.contentPresence.shouldRender}}class Qr{static create(t){return new Qr(t,Ue.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=ve(this.opts.ref,s=>this.root.overlayNode=s)}#t=w(()=>({open:this.root.opts.open.current}));get snippetProps(){return r(this.#t)}set snippetProps(t){_(this.#t,t)}#e=w(()=>({id:this.opts.id.current,[this.root.getBitsAttr("overlay")]:"",style:{pointerEvents:"auto","--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":cn(this.root.nestedOpenCount>0),"data-nested":cn(this.root.parent!==null),...Xr(this.root.overlayPresence.transitionStatus),...this.root.sharedProps,...this.attachment}));get props(){return r(this.#e)}set props(t){_(this.#e,t)}get shouldRender(){return this.root.overlayPresence.shouldRender}}class $r{static create(t){return new $r(t,Ue.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=ve(this.opts.ref,s=>this.root.cancelNode=s),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleClose()}onkeydown(t){this.opts.disabled.current||(t.key===cr||t.key===lr)&&(t.preventDefault(),this.root.handleClose())}#t=w(()=>({id:this.opts.id.current,[this.root.getBitsAttr("cancel")]:"",onclick:this.onclick,onkeydown:this.onkeydown,tabindex:0,disabled:this.opts.disabled.current,...this.root.sharedProps,...this.attachment}));get props(){return r(this.#t)}set props(t){_(this.#t,t)}}function hl(n,t){U(t,!0);let e=b(t,"open",15,!1),s=b(t,"onOpenChange",3,Ot),o=b(t,"onOpenChangeComplete",3,Ot);ur.create({variant:C(()=>"alert-dialog"),open:C(()=>e(),l=>{e(l),s()(l)}),onOpenChangeComplete:C(()=>o())});var i=F(),a=E(i);at(a,()=>t.children??wt),d(n,i),q()}var vl=new Set(["$$slots","$$events","$$legacy","id","ref","child","children","level"]),gl=A("<div><!></div>");function Zo(n,t){const e=_e();U(t,!0);let s=b(t,"id",19,()=>xe(e)),o=b(t,"ref",15,null),i=b(t,"level",3,2),a=dt(t,vl);const l=Zr.create({id:C(()=>s()),level:C(()=>i()),ref:C(()=>o(),h=>o(h))}),c=w(()=>Ut(a,l.props));var u=F(),g=E(u);{var p=h=>{var f=F(),m=E(f);at(m,()=>t.child,()=>({props:r(c)})),d(h,f)},v=h=>{var f=gl();Kt(f,()=>({...r(c)}));var m=V(f);at(m,()=>t.children??wt),z(f),d(h,f)};B(g,h=>{t.child?h(p):h(v,-1)})}d(n,u),q()}var pl=new Set(["$$slots","$$events","$$legacy","children","child","id","ref"]),ml=A("<button><!></button>");function yl(n,t){const e=_e();U(t,!0);let s=b(t,"id",19,()=>xe(e)),o=b(t,"ref",15,null),i=dt(t,pl);const a=Yr.create({id:C(()=>s()),ref:C(()=>o(),v=>o(v))}),l=w(()=>Ut(i,a.props));var c=F(),u=E(c);{var g=v=>{var h=F(),f=E(h);at(f,()=>t.child,()=>({props:r(l)})),d(v,h)},p=v=>{var h=ml();Kt(h,()=>({...r(l)}));var f=V(h);at(f,()=>t.children??wt),z(h),d(v,h)};B(u,v=>{t.child?v(g):v(p,-1)})}d(n,c),q()}var bl=new Set(["$$slots","$$events","$$legacy","id","ref","children","child","disabled"]),wl=A("<button><!></button>");function _l(n,t){const e=_e();U(t,!0);let s=b(t,"id",19,()=>xe(e)),o=b(t,"ref",15,null),i=b(t,"disabled",3,!1),a=dt(t,bl);const l=$r.create({id:C(()=>s()),ref:C(()=>o(),h=>o(h)),disabled:C(()=>!!i())}),c=w(()=>Ut(a,l.props));var u=F(),g=E(u);{var p=h=>{var f=F(),m=E(f);at(m,()=>t.child,()=>({props:r(c)})),d(h,f)},v=h=>{var f=wl();Kt(f,()=>({...r(c)}));var m=V(f);at(m,()=>t.children??wt),z(f),d(h,f)};B(g,h=>{t.child?h(p):h(v,-1)})}d(n,u),q()}function xl(n,t){var e=F(),s=E(e);Mo(s,()=>t.children,o=>{var i=F(),a=E(i);at(a,()=>t.children??wt),d(o,i)}),d(n,e)}const Pl=new $e("BitsConfig");function Sl(){const n=new El(null,{});return Pl.getOr(n).opts}class El{opts;constructor(t,e){const s=Al(t,e);this.opts={defaultPortalTo:s(o=>o.defaultPortalTo),defaultLocale:s(o=>o.defaultLocale)}}}function Al(n,t){return e=>C(()=>{const o=e(t)?.current;if(o!==void 0)return o;if(n!==null)return e(n.opts)?.current})}function Ol(n,t){return e=>{const s=Sl();return C(()=>{const o=e();if(o!==void 0)return o;const i=n(s).current;return i!==void 0?i:t})}}const Cl=Ol(n=>n.defaultPortalTo,"body");function ts(n,t){U(t,!0);const e=Cl(()=>t.to),s=Wi();let o=w(i);function i(){if(!Yo||t.disabled)return null;let p=null;return typeof e.current=="string"?p=document.querySelector(e.current):p=e.current,p}let a;function l(){a&&(ji(a),a=null)}Jt([()=>r(o),()=>t.disabled],([p,v])=>{if(!p||v){l();return}return a=Hi(xl,{target:p,props:{children:t.children},context:s}),()=>{l()}});var c=F(),u=E(c);{var g=p=>{var v=F(),h=E(v);at(h,()=>t.children??wt),d(p,v)};B(u,p=>{t.disabled&&p(g)})}d(n,c),q()}function Tl(n,t=500){let e=null;const s=(...o)=>{e!==null&&clearTimeout(e),e=setTimeout(()=>{n(...o)},t)};return s.destroy=()=>{e!==null&&(clearTimeout(e),e=null)},s}function Jo(n,t){return n===t||n.contains(t)}function Qo(n){return n?.ownerDocument??document}function kl(n,t){const{clientX:e,clientY:s}=n,o=t.getBoundingClientRect();return e<o.left||e>o.right||s<o.top||s>o.bottom}const Il="data-context-menu-trigger",Dl="data-context-menu-content";globalThis.bitsDismissableLayers??=new Map;class es{static create(t){return new es(t)}opts;#t;#e;#n={pointerdown:!1};#r=!1;#s=null;#o=!1;#a=void 0;#i;#l=Ot;#c=!1;constructor(t){this.opts=t,this.#e=t.interactOutsideBehavior,this.#t=t.onInteractOutside,this.#i=t.onFocusOutside;let e=Ot,s=null;const o=()=>{s=null,this.#b(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),this.#l(),e()};Jt([()=>this.opts.enabled.current,()=>this.opts.ref.current],([i,a])=>{const l=i?a:null;s!==l&&(o(),l&&(s=l,this.#a=Qo(l),globalThis.bitsDismissableLayers.set(this,this.#e),e=this.#f()))}),hn(()=>{this.#c=!0,o()})}#d=t=>{t.defaultPrevented||this.#c||!this.opts.ref.current||Kr(()=>{this.#c||!this.opts.ref.current||this.#y(t.target)||t.target&&!this.#o&&this.#i.current?.(t)})};#f(){const t=this.#a,e=o=>{ae(()=>{this.#v(o),this.#m(o)})},s=o=>{o.cancelBubble||o!==this.#s||(this.#p(o),o.pointerType==="touch"?(this.#u.destroy(),this.#h(o)):this.#u(o))};return t.addEventListener("pointerdown",e,!0),t.addEventListener("pointerdown",s),Kn(()=>t.removeEventListener("pointerdown",e,!0),()=>t.removeEventListener("pointerdown",s),ie(t,"focusin",this.#d))}#g=t=>{let e=t;e.defaultPrevented&&(e=Ws(t)),this.#t.current(t)};#h=t=>{if(!this.opts.ref.current){this.#l();return}const e=this.opts.isValidEvent.current(t,this.opts.ref.current)||Fl(t,this.opts.ref.current);if(!this.#r||this.#w()||!e){this.#l();return}let s=t;if(s.defaultPrevented&&(s=Ws(s)),this.#e.current!=="close"&&this.#e.current!=="defer-otherwise-close"){this.#l();return}if(t.pointerType==="touch"){this.#l();let o=null,i=Ot;const a=l=>{i(),this.#g(l)};i=Kn(ie(this.#a,"click",a,{once:!0}),ie(this.#a,"click",l=>{o=setTimeout(()=>a(l),0)},{once:!0,capture:!0}),()=>{o!==null&&clearTimeout(o),o=null}),this.#l=i}else this.#t.current(s)};#u=Tl(this.#h,10);#v=t=>{this.#n[t.type]=!0};#p=t=>{this.#n[t.type]=!1};#m=t=>{this.#s=t,this.opts.ref.current&&(this.#r=Ll(this.opts.ref.current))};#y=t=>this.opts.ref.current?Jo(this.opts.ref.current,t):!1;#b=()=>{for(const t in this.#n)this.#n[t]=!1;this.#r=!1,this.#s=null};#w(){return Object.values(this.#n).some(Boolean)}#_=()=>{this.#o=!0};#x=()=>{this.#o=!1};props={onfocuscapture:this.#_,onblurcapture:this.#x}}function Rl(n=[...globalThis.bitsDismissableLayers]){return n.findLast(([t,{current:e}])=>e==="close"||e==="ignore")}function Ll(n){const t=[...globalThis.bitsDismissableLayers],e=Rl(t);if(e)return e[0].opts.ref.current===n;const[s]=t[0];return s.opts.ref.current===n}function Fl(n,t){const e=n.target;if(!cl(e))return!1;const s=!!e.closest(`[${Il}]`),o=!!t.closest(`[${Dl}]`);return"button"in n&&n.button>0&&!s?!1:"button"in n&&n.button===0&&s&&o?!0:s&&o?!1:Qo(e).documentElement.contains(e)&&!Jo(t,e)&&kl(n,t)}function Ws(n){const t=n.currentTarget,e=n.target;let s;n instanceof PointerEvent?s=new PointerEvent(n.type,n):s=new PointerEvent("pointerdown",n);let o=!1;return new Proxy(s,{get:(a,l)=>l==="currentTarget"?t:l==="target"?e:l==="preventDefault"?()=>{o=!0,typeof a.preventDefault=="function"&&a.preventDefault()}:l==="defaultPrevented"?o:l in a?a[l]:n[l]})}function ns(n,t){U(t,!0);let e=b(t,"interactOutsideBehavior",3,"close"),s=b(t,"onInteractOutside",3,Ot),o=b(t,"onFocusOutside",3,Ot),i=b(t,"isValidEvent",3,()=>!1);const a=es.create({id:C(()=>t.id),interactOutsideBehavior:C(()=>e()),onInteractOutside:C(()=>s()),enabled:C(()=>t.enabled),onFocusOutside:C(()=>o()),isValidEvent:C(()=>i()),ref:t.ref});var l=F(),c=E(l);at(c,()=>t.children??wt,()=>({props:a.props})),d(n,l),q()}globalThis.bitsEscapeLayers??=new Map;class rs{static create(t){return new rs(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new Ur(this.opts.ref);let e=Ot;Jt(()=>t.enabled.current,s=>(s&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),e=this.#t()),()=>{e(),globalThis.bitsEscapeLayers.delete(this)}))}#t=()=>ie(this.domContext.getDocument(),"keydown",this.#e,{passive:!1});#e=t=>{if(t.key!==al||!Nl(this))return;const e=new KeyboardEvent(t.type,t);t.preventDefault();const s=this.opts.escapeKeydownBehavior.current;s!=="close"&&s!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(e)}}function Nl(n){const t=[...globalThis.bitsEscapeLayers],e=t.findLast(([o,{current:i}])=>i==="close"||i==="ignore");if(e)return e[0]===n;const[s]=t[0];return s===n}function ss(n,t){U(t,!0);let e=b(t,"escapeKeydownBehavior",3,"close"),s=b(t,"onEscapeKeydown",3,Ot);rs.create({escapeKeydownBehavior:C(()=>e()),onEscapeKeydown:C(()=>s()),enabled:C(()=>t.enabled),ref:t.ref});var o=F(),i=E(o);at(i,()=>t.children??wt),d(n,o),q()}class os{static instance;#t=Fe([]);#e=new WeakMap;#n=new WeakMap;static getInstance(){return this.instance||(this.instance=new os),this.instance}register(t){const e=this.getActive();e&&e!==t&&e.pause();const s=kn(document);s&&s!==document.body&&this.#n.set(t,s),this.#t.current=this.#t.current.filter(o=>o!==t),this.#t.current.unshift(t)}unregister(t){this.#t.current=this.#t.current.filter(s=>s!==t);const e=this.getActive();e&&e.resume()}getActive(){return this.#t.current[0]}setFocusMemory(t,e){this.#e.set(t,e)}getFocusMemory(t){return this.#e.get(t)}isActiveScope(t){return this.getActive()===t}setPreFocusMemory(t,e){this.#n.set(t,e)}getPreFocusMemory(t){return this.#n.get(t)}clearPreFocusMemory(t){this.#n.delete(t)}}var $o=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Gn=$o.join(","),ti=typeof Element>"u",un=ti?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Yn=!ti&&Element.prototype.getRootNode?function(n){var t;return n==null||(t=n.getRootNode)===null||t===void 0?void 0:t.call(n)}:function(n){return n?.ownerDocument},Zn=function(t,e){var s;e===void 0&&(e=!0);var o=t==null||(s=t.getAttribute)===null||s===void 0?void 0:s.call(t,"inert"),i=o===""||o==="true",a=i||e&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Zn(t.parentNode));return a},Ml=function(t){var e,s=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return s===""||s==="true"},ei=function(t,e,s){if(Zn(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Gn));return e&&un.call(t,Gn)&&o.unshift(t),o=o.filter(s),o},Jn=function(t,e,s){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Zn(a,!1))if(a.tagName==="SLOT"){var l=a.assignedElements(),c=l.length?l:a.children,u=Jn(c,!0,s);s.flatten?o.push.apply(o,u):o.push({scopeParent:a,candidates:u})}else{var g=un.call(a,Gn);g&&s.filter(a)&&(e||!t.includes(a))&&o.push(a);var p=a.shadowRoot||typeof s.getShadowRoot=="function"&&s.getShadowRoot(a),v=!Zn(p,!1)&&(!s.shadowRootFilter||s.shadowRootFilter(a));if(p&&v){var h=Jn(p===!0?a.children:p.children,!0,s);s.flatten?o.push.apply(o,h):o.push({scopeParent:a,candidates:h})}else i.unshift.apply(i,a.children)}}return o},ni=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},ri=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Ml(t))&&!ni(t)?0:t.tabIndex},zl=function(t,e){var s=ri(t);return s<0&&e&&!ni(t)?0:s},Bl=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},si=function(t){return t.tagName==="INPUT"},Vl=function(t){return si(t)&&t.type==="hidden"},Wl=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(s){return s.tagName==="SUMMARY"});return e},Hl=function(t,e){for(var s=0;s<t.length;s++)if(t[s].checked&&t[s].form===e)return t[s]},jl=function(t){if(!t.name)return!0;var e=t.form||Yn(t),s=function(l){return e.querySelectorAll('input[type="radio"][name="'+l+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=s(window.CSS.escape(t.name));else try{o=s(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=Hl(o,t.form);return!i||i===t},Kl=function(t){return si(t)&&t.type==="radio"},Ul=function(t){return Kl(t)&&!jl(t)},ql=function(t){var e,s=t&&Yn(t),o=(e=s)===null||e===void 0?void 0:e.host,i=!1;if(s&&s!==t){var a,l,c;for(i=!!((a=o)!==null&&a!==void 0&&(l=a.ownerDocument)!==null&&l!==void 0&&l.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!i&&o;){var u,g,p;s=Yn(o),o=(u=s)===null||u===void 0?void 0:u.host,i=!!((g=o)!==null&&g!==void 0&&(p=g.ownerDocument)!==null&&p!==void 0&&p.contains(o))}}return i},Hs=function(t){var e=t.getBoundingClientRect(),s=e.width,o=e.height;return s===0&&o===0},Xl=function(t,e){var s=e.displayCheck,o=e.getShadowRoot;if(s==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}var a=getComputedStyle(t),l=a.visibility;if(l==="hidden"||l==="collapse")return!0;var c=un.call(t,"details>summary:first-of-type"),u=c?t.parentElement:t;if(un.call(u,"details:not([open]) *"))return!0;if(!s||s==="full"||s==="full-native"||s==="legacy-full"){if(typeof o=="function"){for(var g=t;t;){var p=t.parentElement,v=Yn(t);if(p&&!p.shadowRoot&&o(p)===!0)return Hs(t);t.assignedSlot?t=t.assignedSlot:!p&&v!==t.ownerDocument?t=v.host:t=p}t=g}if(ql(t))return!t.getClientRects().length;if(s!=="legacy-full")return!0}else if(s==="non-zero-area")return Hs(t);return!1},Gl=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var s=0;s<e.children.length;s++){var o=e.children.item(s);if(o.tagName==="LEGEND")return un.call(e,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}e=e.parentElement}return!1},Qn=function(t,e){return!(e.disabled||Vl(e)||Xl(e,t)||Wl(e)||Gl(e))},Fr=function(t,e){return!(Ul(e)||ri(e)<0||!Qn(t,e))},Yl=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},oi=function(t){var e=[],s=[];return t.forEach(function(o,i){var a=!!o.scopeParent,l=a?o.scopeParent:o,c=zl(l,a),u=a?oi(o.candidates):l;c===0?a?e.push.apply(e,u):e.push(l):s.push({documentOrder:i,tabIndex:c,item:o,isScope:a,content:u})}),s.sort(Bl).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(e)},Zl=function(t,e){e=e||{};var s;return e.getShadowRoot?s=Jn([t],e.includeContainer,{filter:Fr.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Yl}):s=ei(t,e.includeContainer,Fr.bind(null,e)),oi(s)},Jl=function(t,e){e=e||{};var s;return e.getShadowRoot?s=Jn([t],e.includeContainer,{filter:Qn.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):s=ei(t,e.includeContainer,Qn.bind(null,e)),s},Ql=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return un.call(t,Gn)===!1?!1:Fr(e,t)},$l=$o.concat("iframe:not([inert]):not([inert] *)").join(","),tc=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return un.call(t,$l)===!1?!1:Qn(e,t)};class is{#t=!1;#e=null;#n=os.getInstance();#r=[];#s;constructor(t){this.#s=t}get paused(){return this.#t}pause(){this.#t=!0}resume(){this.#t=!1}#o(){for(const t of this.#r)t();this.#r=[]}mount(t){this.#e&&this.unmount(),this.#e=t,this.#n.register(this),this.#l(),this.#a()}unmount(){this.#e&&(this.#o(),this.#i(),this.#n.unregister(this),this.#n.clearPreFocusMemory(this),this.#e=null)}#a(){if(!this.#e)return;const t=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#s.onOpenAutoFocus.current(t),t.defaultPrevented||requestAnimationFrame(()=>{if(!this.#e||this.#t||!this.#n.isActiveScope(this)||this.#e.contains(kn(this.#e.ownerDocument)))return;const e=this.#d();e?(e.focus(),this.#n.setFocusMemory(this,e)):this.#e.focus()})}#i(){const t=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#s.onCloseAutoFocus.current?.(t),!t.defaultPrevented){const e=this.#n.getPreFocusMemory(this);if(e&&e.isConnected)try{e.focus()}catch{document.body.focus()}}}#l(){if(!this.#e||!this.#s.trap.current)return;const t=this.#e,e=t.ownerDocument,s=a=>{if(this.#t||!this.#n.isActiveScope(this))return;const l=a.composedPath()[0];if(!l)return;if(t.contains(l))this.#n.setFocusMemory(this,l);else{const u=this.#n.getFocusMemory(this);if(u&&t.contains(u)&&tc(u))a.preventDefault(),u.focus();else{const g=this.#d(),p=this.#f()[0];(g||p||t).focus()}}},o=a=>{if(!this.#s.loop||this.#t||a.key!=="Tab"||!this.#n.isActiveScope(this))return;const l=this.#c();if(l.length===0)return;const c=l[0],u=l[l.length-1];!a.shiftKey&&kn(e)===u?(a.preventDefault(),c.focus()):a.shiftKey&&kn(e)===c&&(a.preventDefault(),u.focus())};this.#r.push(ie(e,"focusin",s,{capture:!0}),ie(t,"keydown",o));const i=new MutationObserver(()=>{const a=this.#n.getFocusMemory(this);if(a&&!t.contains(a)){const l=this.#d(),c=this.#f()[0],u=l||c;u?(u.focus(),this.#n.setFocusMemory(this,u)):t.focus()}});i.observe(t,{childList:!0,subtree:!0}),this.#r.push(()=>i.disconnect())}#c(){return this.#e?Zl(this.#e,{includeContainer:!1,getShadowRoot:!0}):[]}#d(){return this.#c()[0]||null}#f(){return this.#e?Jl(this.#e,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let e=null;return Jt([()=>t.ref.current,()=>t.enabled.current],([s,o])=>{s&&o?(e||(e=new is(t)),e.mount(s)):e&&(e.unmount(),e=null)}),hn(()=>{e?.unmount()}),{get props(){return{tabindex:-1}}}}}function as(n,t){U(t,!0);let e=b(t,"enabled",3,!1),s=b(t,"trapFocus",3,!1),o=b(t,"loop",3,!1),i=b(t,"onCloseAutoFocus",3,Ot),a=b(t,"onOpenAutoFocus",3,Ot);const l=is.use({enabled:C(()=>e()),trap:C(()=>s()),loop:o(),onCloseAutoFocus:C(()=>i()),onOpenAutoFocus:C(()=>a()),ref:t.ref});var c=F(),u=E(c);at(u,()=>t.focusScope??wt,()=>({props:l.props})),d(n,c),q()}const js=()=>{};globalThis.bitsTextSelectionLayers??=new Map;class ls{static create(t){return new ls(t)}opts;domContext;#t=Ot;#e=!1;#n=js;#r=js;constructor(t){this.opts=t,this.domContext=new Ur(t.ref);let e=Ot;Jt(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([s,o,i])=>(this.#e=s,this.#n=o,this.#r=i,s&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),e(),e=this.#s()),()=>{this.#e=!1,e(),this.#i(),globalThis.bitsTextSelectionLayers.delete(this)}))}#s(){return Kn(ie(this.domContext.getDocument(),"pointerdown",this.#a),ie(this.domContext.getDocument(),"pointerup",this.#o))}#o=t=>{this.#i(),!t.defaultPrevented&&this.#r(t)};#a=t=>{if(!this.#e)return;this.#i();const e=this.opts.ref.current,s=t.target;!Lr(e)||!Lr(s)||!nc(this)||!rl(e,s)||(this.#n(t),!t.defaultPrevented&&(this.#t=ec(e,this.domContext.getDocument().body)))};#i=()=>{this.#t(),this.#t=Ot}}const Ks=n=>n.style.userSelect||n.style.webkitUserSelect;function ec(n,t){const e=Ks(t),s=Ks(n);return Bn(t,"none"),Bn(n,"text"),()=>{Bn(t,e),Bn(n,s)}}function Bn(n,t){n.style.userSelect=t,n.style.webkitUserSelect=t}function nc(n){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const e=t.at(-1);return e?e[0]===n:!1}function cs(n,t){U(t,!0);let e=b(t,"preventOverflowTextSelection",3,!0),s=b(t,"onPointerDown",3,Ot),o=b(t,"onPointerUp",3,Ot);ls.create({id:C(()=>t.id),onPointerDown:C(()=>s()),onPointerUp:C(()=>o()),enabled:C(()=>t.enabled&&e()),ref:t.ref});var i=F(),a=E(i);at(a,()=>t.children??wt),d(n,i),q()}globalThis.bitsIdCounter??={current:0};function us(n="bits"){return globalThis.bitsIdCounter.current++,`${n}-${globalThis.bitsIdCounter.current}`}class rc{#t;#e=0;#n=L();#r;constructor(t){this.#t=t}#s(){this.#e-=1,this.#r&&this.#e<=0&&(this.#r(),_(this.#n,void 0),this.#r=void 0)}get(...t){return this.#e+=1,r(this.#n)===void 0&&(this.#r=Ki(()=>{_(this.#n,this.#t(...t),!0)})),At(()=>()=>{this.#s()}),r(this.#n)}}const Hn=new Ua,Us=["padding-right","margin-right","overflow","overflow-x","overflow-y","pointer-events","--scrollbar-width"];let En=null,qs=!1;const In=new Set;let Ar=null,An=null,On=!1;function mn(n,t,e){n.setProperty(t,e),In.add(t),t==="overflow"&&(In.add("overflow-x"),In.add("overflow-y"))}const Xs=C(()=>{for(const n of Hn.values())if(n)return!0;return!1});let Or=null;const sc=new rc(()=>{function n(o){for(const i of Us){if(!In.has(i))continue;const a=En?.get(i);a?.value?o.body.style.setProperty(i,a.value,a.priority):o.body.style.removeProperty(i)}!qs&&o.body.style.length===0&&o.body.removeAttribute("style"),En=null,In.clear(),Vs&&Ar?.()}function t(){An!==null&&(window.clearTimeout(An),An=null)}function e(o,i){t(),On=!0,Or=Date.now();const a=Or,l=()=>{An=null,Or===a&&(ii(Hn)?On=!1:(On=!1,i()))},c=o===null?24:o;An=window.setTimeout(l,c)}function s(){if(En===null&&Hn.size===0&&!On){qs=document.body.hasAttribute("style"),En=new Map;for(const o of Us)En.set(o,{value:document.body.style.getPropertyValue(o),priority:document.body.style.getPropertyPriority(o)})}}return Jt(()=>Xs.current,()=>{if(!Xs.current)return;s(),On=!1;const o=getComputedStyle(document.documentElement),i=getComputedStyle(document.body),a=o.scrollbarGutter?.includes("stable")||i.scrollbarGutter?.includes("stable"),l=window.innerWidth-document.documentElement.clientWidth,u={padding:Number.parseInt(i.paddingRight??"0",10)+l,margin:Number.parseInt(i.marginRight??"0",10)};l>0&&!a&&(mn(document.body.style,"padding-right",`${u.padding}px`),mn(document.body.style,"margin-right",`${u.margin}px`),mn(document.body.style,"--scrollbar-width",`${l}px`)),mn(document.body.style,"overflow","hidden"),Vs&&(Ar=ie(document,"touchmove",g=>{g.target===document.documentElement&&(g.touches.length>1||g.preventDefault())},{passive:!1})),Kr(()=>{mn(document.body.style,"pointer-events","none"),mn(document.body.style,"overflow","hidden")})}),hn(()=>()=>{Ar?.()}),{get lockMap(){return Hn},resetBodyStyle:n,scheduleCleanupIfNoNewLocks:e,cancelPendingCleanup:t,ensureInitialStyleCaptured:s}});class oc{#t=us();#e;#n=()=>null;#r;locked;constructor(t,e=()=>null){this.#e=t,this.#n=e,this.#r=sc.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),this.#r.lockMap.set(this.#t,this.#e??!1),this.locked=C(()=>this.#r.lockMap.get(this.#t)??!1,s=>this.#r.lockMap.set(this.#t,s)),hn(()=>{if(this.#r.lockMap.delete(this.#t),ii(this.#r.lockMap))return;const s=this.#n(),o=document;this.#r.scheduleCleanupIfNoNewLocks(s,()=>{this.#r.resetBodyStyle(o)})}))}}function ii(n){for(const[t,e]of n)if(e)return!0;return!1}function wn(n,t){U(t,!0);let e=b(t,"preventScroll",3,!0),s=b(t,"restoreScrollDelay",3,null);e()&&new oc(e(),()=>s()),q()}var ic=new Set(["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","interactOutsideBehavior","onCloseAutoFocus","onEscapeKeydown","onOpenAutoFocus","onInteractOutside","preventScroll","preventOverflowTextSelection","trapFocus","restoreScrollDelay"]),ac=A("<!> <!>",1),lc=A("<!> <div><!></div>",1);function cc(n,t){const e=_e();U(t,!0);let s=b(t,"id",19,()=>xe(e)),o=b(t,"ref",15,null),i=b(t,"forceMount",3,!1),a=b(t,"interactOutsideBehavior",3,"ignore"),l=b(t,"onCloseAutoFocus",3,Ot),c=b(t,"onEscapeKeydown",3,Ot),u=b(t,"onOpenAutoFocus",3,Ot),g=b(t,"onInteractOutside",3,Ot),p=b(t,"preventScroll",3,!0),v=b(t,"preventOverflowTextSelection",3,!0),h=b(t,"trapFocus",3,!0),f=b(t,"restoreScrollDelay",3,null),m=dt(t,ic);const x=dr.create({id:C(()=>s()),ref:C(()=>o(),H=>o(H))}),P=w(()=>Ut(m,x.props));var S=F(),k=E(S);{var R=H=>{as(H,{get ref(){return x.opts.ref},loop:!0,get trapFocus(){return h()},get enabled(){return x.root.opts.open.current},get onCloseAutoFocus(){return l()},onOpenAutoFocus:W=>{u()(W),!W.defaultPrevented&&(W.preventDefault(),Ja(0,()=>x.opts.ref.current?.focus()))},focusScope:(W,et)=>{let G=()=>(et?.()).props;ss(W,_t(()=>r(P),{get enabled(){return x.root.opts.open.current},get ref(){return x.opts.ref},onEscapeKeydown:ut=>{c()(ut),!ut.defaultPrevented&&x.root.handleClose()},children:(ut,lt)=>{ns(ut,_t(()=>r(P),{get ref(){return x.opts.ref},get enabled(){return x.root.opts.open.current},get interactOutsideBehavior(){return a()},onInteractOutside:J=>{g()(J),!J.defaultPrevented&&x.root.handleClose()},children:(J,nt)=>{cs(J,_t(()=>r(P),{get preventOverflowTextSelection(){return v()},get ref(){return x.opts.ref},get enabled(){return x.root.opts.open.current},children:(ct,Y)=>{var $=F(),it=E($);{var Z=pt=>{var xt=ac(),kt=E(xt);{var St=se=>{wn(se,{get preventScroll(){return p()},get restoreScrollDelay(){return f()}})};B(kt,se=>{x.root.opts.open.current&&se(St)})}var Ft=I(kt,2);{let se=w(()=>({props:Ut(r(P),G()),...x.snippetProps}));at(Ft,()=>t.child,()=>r(se))}d(pt,xt)},rt=pt=>{var xt=lc(),kt=E(xt);wn(kt,{get preventScroll(){return p()}});var St=I(kt,2);Kt(St,se=>({...se}),[()=>Ut(r(P),G())]);var Ft=V(St);at(Ft,()=>t.children??wt),z(St),d(pt,xt)};B(it,pt=>{t.child?pt(Z):pt(rt,-1)})}d(ct,$)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};B(k,H=>{(x.shouldRender||i())&&H(R)})}d(n,S),q()}var uc=new Set(["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]),dc=A("<div><!></div>");function ai(n,t){const e=_e();U(t,!0);let s=b(t,"id",19,()=>xe(e)),o=b(t,"forceMount",3,!1),i=b(t,"ref",15,null),a=dt(t,uc);const l=Qr.create({id:C(()=>s()),ref:C(()=>i(),v=>i(v))}),c=w(()=>Ut(a,l.props));var u=F(),g=E(u);{var p=v=>{var h=F(),f=E(h);{var m=P=>{var S=F(),k=E(S);{let R=w(()=>({props:Ut(r(c)),...l.snippetProps}));at(k,()=>t.child,()=>r(R))}d(P,S)},x=P=>{var S=dc();Kt(S,R=>({...R}),[()=>Ut(r(c))]);var k=V(S);at(k,()=>t.children??wt,()=>l.snippetProps),z(S),d(P,S)};B(f,P=>{t.child?P(m):P(x,-1)})}d(v,h)};B(g,v=>{(l.shouldRender||o())&&v(p)})}d(n,u),q()}var fc=new Set(["$$slots","$$events","$$legacy","id","children","child","ref"]),hc=A("<div><!></div>");function li(n,t){const e=_e();U(t,!0);let s=b(t,"id",19,()=>xe(e)),o=b(t,"ref",15,null),i=dt(t,fc);const a=Jr.create({id:C(()=>s()),ref:C(()=>o(),v=>o(v))}),l=w(()=>Ut(i,a.props));var c=F(),u=E(c);{var g=v=>{var h=F(),f=E(h);at(f,()=>t.child,()=>({props:r(l)})),d(v,h)},p=v=>{var h=hc();Kt(h,()=>({...r(l)}));var f=V(h);at(f,()=>t.children??wt),z(h),d(v,h)};B(u,v=>{t.child?v(g):v(p,-1)})}d(n,c),q()}const vc=ar({component:"checkbox",parts:["root","group","group-label","input"]}),gc=new $e("Checkbox.Group"),ci=new $e("Checkbox.Root");class ds{static create(t,e=null){return ci.set(new ds(t,e))}opts;group;#t=w(()=>this.group&&this.group.opts.name.current?this.group.opts.name.current:this.opts.name.current);get trueName(){return r(this.#t)}set trueName(t){_(this.#t,t)}#e=w(()=>this.group&&this.group.opts.required.current?!0:this.opts.required.current);get trueRequired(){return r(this.#e)}set trueRequired(t){_(this.#e,t)}#n=w(()=>this.group&&this.group.opts.disabled.current?!0:this.opts.disabled.current);get trueDisabled(){return r(this.#n)}set trueDisabled(t){_(this.#n,t)}#r=w(()=>this.group&&this.group.opts.readonly.current?!0:this.opts.readonly.current);get trueReadonly(){return r(this.#r)}set trueReadonly(t){_(this.#r,t)}attachment;constructor(t,e){this.opts=t,this.group=e,this.attachment=ve(this.opts.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),Jt.pre([()=>ca(this.group?.opts.value.current),()=>this.opts.value.current],([s,o])=>{!s||!o||(this.opts.checked.current=s.includes(o))}),Jt.pre(()=>this.opts.checked.current,s=>{this.group&&(s?this.group?.addValue(this.opts.value.current):this.group?.removeValue(this.opts.value.current))})}onkeydown(t){if(!(this.trueDisabled||this.trueReadonly)){if(t.key===lr){t.preventDefault(),this.opts.type.current==="submit"&&t.currentTarget.closest("form")?.requestSubmit();return}t.key===cr&&(t.preventDefault(),this.#s())}}#s(){this.opts.indeterminate.current?(this.opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current}onclick(t){if(!(this.trueDisabled||this.trueReadonly)){if(this.opts.type.current==="submit"){this.#s();return}t.preventDefault(),this.#s()}}#o=w(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current}));get snippetProps(){return r(this.#o)}set snippetProps(t){_(this.#o,t)}#a=w(()=>({id:this.opts.id.current,role:"checkbox",type:this.opts.type.current,disabled:this.trueDisabled,"aria-checked":ol(this.opts.checked.current,this.opts.indeterminate.current),"aria-required":Un(this.trueRequired),"aria-readonly":Un(this.trueReadonly),"data-disabled":cn(this.trueDisabled),"data-readonly":cn(this.trueReadonly),"data-state":pc(this.opts.checked.current,this.opts.indeterminate.current),[vc.root]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return r(this.#a)}set props(t){_(this.#a,t)}}class fs{static create(){return new fs(ci.get())}root;#t=w(()=>this.root.group?!!(this.root.opts.value.current!==void 0&&this.root.group.opts.value.current.includes(this.root.opts.value.current)):this.root.opts.checked.current);get trueChecked(){return r(this.#t)}set trueChecked(t){_(this.#t,t)}#e=w(()=>!!this.root.trueName);get shouldRender(){return r(this.#e)}set shouldRender(t){_(this.#e,t)}constructor(t){this.root=t,this.onfocus=this.onfocus.bind(this)}onfocus(t){Lr(this.root.opts.ref.current)&&this.root.opts.ref.current.focus()}#n=w(()=>({type:"checkbox",checked:this.root.opts.checked.current===!0,disabled:this.root.trueDisabled,required:this.root.trueRequired,name:this.root.trueName,form:this.root.opts.form.current,value:this.root.opts.value.current,readonly:this.root.trueReadonly,onfocus:this.onfocus}));get props(){return r(this.#n)}set props(t){_(this.#n,t)}}function pc(n,t){return t?"indeterminate":n?"checked":"unchecked"}Ui();var mc=new Set(["$$slots","$$events","$$legacy","value"]),Gs=A("<input/>");function yc(n,t){U(t,!0);let e=b(t,"value",15),s=dt(t,mc);const o=w(()=>Ut(s,{"aria-hidden":"true",tabindex:-1,style:{...Ho,position:"absolute",top:"0",left:"0"}}));var i=F(),a=E(i);{var l=u=>{var g=Gs();Kt(g,()=>({...r(o),value:e()}),void 0,void 0,void 0,void 0,!0),d(u,g)},c=u=>{var g=Gs();Kt(g,()=>({...r(o)}),void 0,void 0,void 0,void 0,!0),Yi(g,e),d(u,g)};B(a,u=>{r(o).type==="checkbox"?u(l):u(c,-1)})}d(n,i),q()}function bc(n,t){U(t,!1);const e=fs.create();da();var s=F(),o=E(s);{var i=a=>{yc(a,_t(()=>e.props))};B(o,a=>{e.shouldRender&&a(i)})}d(n,s),q()}var wc=new Set(["$$slots","$$events","$$legacy","checked","ref","onCheckedChange","children","disabled","required","name","form","value","id","indeterminate","onIndeterminateChange","child","type","readonly"]),_c=A("<button><!></button>"),xc=A("<!> <!>",1);function Pc(n,t){const e=_e();U(t,!0);let s=b(t,"checked",15,!1),o=b(t,"ref",15,null),i=b(t,"disabled",3,!1),a=b(t,"required",3,!1),l=b(t,"name",3,void 0),c=b(t,"form",3,void 0),u=b(t,"value",3,"on"),g=b(t,"id",19,()=>xe(e)),p=b(t,"indeterminate",15,!1),v=b(t,"type",3,"button"),h=dt(t,wc);const f=gc.getOr(null);f&&u()&&(f.opts.value.current.includes(u())?s(!0):s(!1)),Jt.pre(()=>u(),()=>{f&&u()&&(f.opts.value.current.includes(u())?s(!0):s(!1))});const m=ds.create({checked:C(()=>s(),T=>{s(T),t.onCheckedChange?.(T)}),disabled:C(()=>i()??!1),required:C(()=>a()),name:C(()=>l()),form:C(()=>c()),value:C(()=>u()),id:C(()=>g()),ref:C(()=>o(),T=>o(T)),indeterminate:C(()=>p(),T=>{p(T),t.onIndeterminateChange?.(T)}),type:C(()=>v()),readonly:C(()=>!!t.readonly)},f),x=w(()=>Ut({...h},m.props));var P=xc(),S=E(P);{var k=T=>{var W=F(),et=E(W);{let G=w(()=>({props:r(x),...m.snippetProps}));at(et,()=>t.child,()=>r(G))}d(T,W)},R=T=>{var W=_c();Kt(W,()=>({...r(x)}));var et=V(W);at(et,()=>t.children??wt,()=>m.snippetProps),z(W),d(T,W)};B(S,T=>{t.child?T(k):T(R,-1)})}var H=I(S,2);bc(H,{}),d(n,P),q()}const hs=new $e("Floating.Root"),vs=new $e("Floating.Root");class $n{static create(t=!1){return t?vs.set(new $n):hs.set(new $n)}anchorNode=Fe(null);customAnchorNode=Fe(null);triggerNode=Fe(null);constructor(){At(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}class tr{static create(t,e=!1){return e?new tr(t,vs.get()):new tr(t,hs.get())}opts;root;constructor(t,e){this.opts=t,this.root=e,t.virtualEl&&t.virtualEl.current?e.triggerNode=ma(t.virtualEl.current):e.triggerNode=t.ref}}function Sc(n,t){U(t,!0);let e=b(t,"tooltip",3,!1);$n.create(e());var s=F(),o=E(s);at(o,()=>t.children??wt),d(n,s),q()}function rn(n){return typeof n=="function"?n():n}function ui(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Ys(n,t){const e=ui(n);return Math.round(t*e)/e}function Zs(n){return{[`--bits-${n}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${n}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${n}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${n}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${n}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function Ec(n,t){U(t,!0);let e=b(t,"tooltip",3,!1);tr.create({id:C(()=>t.id),virtualEl:C(()=>t.virtualEl),ref:t.ref},e());var s=F(),o=E(s);at(o,()=>t.children??wt),d(n,s),q()}const Ac=["top","right","bottom","left"],Je=Math.min,je=Math.max,er=Math.round,Vn=Math.floor,Ke=n=>({x:n,y:n}),Oc={left:"right",right:"left",bottom:"top",top:"bottom"};function di(n,t,e){return je(n,Je(t,e))}function qe(n,t){return typeof n=="function"?n(t):n}function Qe(n){return n.split("-")[0]}function _n(n){return n.split("-")[1]}function gs(n){return n==="x"?"y":"x"}function ps(n){return n==="y"?"height":"width"}function Ne(n){const t=n[0];return t==="t"||t==="b"?"y":"x"}function ms(n){return gs(Ne(n))}function Cc(n,t,e){e===void 0&&(e=!1);const s=_n(n),o=ms(n),i=ps(o);let a=o==="x"?s===(e?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=nr(a)),[a,nr(a)]}function Tc(n){const t=nr(n);return[Nr(n),t,Nr(t)]}function Nr(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const Js=["left","right"],Qs=["right","left"],kc=["top","bottom"],Ic=["bottom","top"];function Dc(n,t,e){switch(n){case"top":case"bottom":return e?t?Qs:Js:t?Js:Qs;case"left":case"right":return t?kc:Ic;default:return[]}}function Rc(n,t,e,s){const o=_n(n);let i=Dc(Qe(n),e==="start",s);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Nr)))),i}function nr(n){const t=Qe(n);return Oc[t]+n.slice(t.length)}function Lc(n){var t,e,s,o;return{top:(t=n.top)!=null?t:0,right:(e=n.right)!=null?e:0,bottom:(s=n.bottom)!=null?s:0,left:(o=n.left)!=null?o:0}}function fi(n){return typeof n!="number"?Lc(n):{top:n,right:n,bottom:n,left:n}}function rr(n){const{x:t,y:e,width:s,height:o}=n;return{width:s,height:o,top:e,left:t,right:t+s,bottom:e+o,x:t,y:e}}function $s(n,t,e){let{reference:s,floating:o}=n;const i=Ne(t),a=ms(t),l=ps(a),c=Qe(t),u=i==="y",g=s.x+s.width/2-o.width/2,p=s.y+s.height/2-o.height/2,v=s[l]/2-o[l]/2;let h;switch(c){case"top":h={x:g,y:s.y-o.height};break;case"bottom":h={x:g,y:s.y+s.height};break;case"right":h={x:s.x+s.width,y:p};break;case"left":h={x:s.x-o.width,y:p};break;default:h={x:s.x,y:s.y}}const f=_n(t);return f&&(h[a]+=v*(f==="end"?1:-1)*(e&&u?-1:1)),h}async function Fc(n,t){var e;t===void 0&&(t={});const{x:s,y:o,platform:i,rects:a,elements:l,strategy:c}=n,{boundary:u="clippingAncestors",rootBoundary:g="viewport",elementContext:p="floating",altBoundary:v=!1,padding:h=0}=qe(t,n),f=fi(h),x=l[v?p==="floating"?"reference":"floating":p],P=rr(await i.getClippingRect({element:(e=await(i.isElement==null?void 0:i.isElement(x)))==null||e?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:g,strategy:c})),S=p==="floating"?{x:s,y:o,width:a.floating.width,height:a.floating.height}:a.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),R=await(i.isElement==null?void 0:i.isElement(k))&&await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1},H=rr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:S,offsetParent:k,strategy:c}):S);return{top:(P.top-H.top+f.top)/R.y,bottom:(H.bottom-P.bottom+f.bottom)/R.y,left:(P.left-H.left+f.left)/R.x,right:(H.right-P.right+f.right)/R.x}}const Nc=50,Mc=async(n,t,e)=>{const{placement:s="bottom",strategy:o="absolute",middleware:i=[],platform:a}=e,l=a.detectOverflow?a:{...a,detectOverflow:Fc},c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:n,floating:t,strategy:o}),{x:g,y:p}=$s(u,s,c),v=s,h=0;const f={};for(let m=0;m<i.length;m++){const x=i[m];if(!x)continue;const{name:P,fn:S}=x,{x:k,y:R,data:H,reset:T}=await S({x:g,y:p,initialPlacement:s,placement:v,strategy:o,middlewareData:f,rects:u,platform:l,elements:{reference:n,floating:t}});g=k??g,p=R??p,f[P]={...f[P],...H},T&&h<Nc&&(h++,typeof T=="object"&&(T.placement&&(v=T.placement),T.rects&&(u=T.rects===!0?await a.getElementRects({reference:n,floating:t,strategy:o}):T.rects),{x:g,y:p}=$s(u,v,c)),m=-1)}return{x:g,y:p,placement:v,strategy:o,middlewareData:f}},zc=n=>({name:"arrow",options:n,async fn(t){const{x:e,y:s,placement:o,rects:i,platform:a,elements:l,middlewareData:c}=t,{element:u,padding:g=0}=qe(n,t)||{};if(u==null)return{};const p=fi(g),v={x:e,y:s},h=ms(o),f=ps(h),m=await a.getDimensions(u),x=h==="y",P=x?"top":"left",S=x?"bottom":"right",k=x?"clientHeight":"clientWidth",R=i.reference[f]+i.reference[h]-v[h]-i.floating[f],H=v[h]-i.reference[h],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let W=T?T[k]:0;(!W||!await(a.isElement==null?void 0:a.isElement(T)))&&(W=l.floating[k]||i.floating[f]);const et=R/2-H/2,G=W/2-m[f]/2-1,ut=Je(p[P],G),lt=Je(p[S],G),J=W-m[f]-lt,nt=W/2-m[f]/2+et,ct=di(ut,nt,J),Y=!c.arrow&&_n(o)!=null&&nt!==ct&&i.reference[f]/2-(nt<ut?ut:lt)-m[f]/2<0,$=Y?nt<ut?nt-ut:nt-J:0;return{[h]:v[h]+$,data:{[h]:ct,centerOffset:nt-ct-$,...Y&&{alignmentOffset:$}},reset:Y}}}),Bc=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(t){var e,s;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:g=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...x}=qe(n,t);if((e=i.arrow)!=null&&e.alignmentOffset)return{};const P=Qe(o),S=Ne(l),k=Qe(l)===l,R=await(c.isRTL==null?void 0:c.isRTL(u.floating)),H=v||(k||!m?[nr(l)]:Tc(l)),T=f!=="none";!v&&T&&H.push(...Rc(l,m,f,R));const W=[l,...H],et=await c.detectOverflow(t,x),G=[];let ut=((s=i.flip)==null?void 0:s.overflows)||[];if(g&&G.push(et[P]),p){const ct=Cc(o,a,R);G.push(et[ct[0]],et[ct[1]])}if(ut=[...ut,{placement:o,overflows:G}],!G.every(ct=>ct<=0)){var lt,J;const ct=(((lt=i.flip)==null?void 0:lt.index)||0)+1,Y=W[ct];if(Y&&(!(p==="alignment"?S!==Ne(Y):!1)||ut.every(Z=>Ne(Z.placement)===S?Z.overflows[0]>0:!0)))return{data:{index:ct,overflows:ut},reset:{placement:Y}};let $=(J=ut.filter(it=>it.overflows[0]<=0).sort((it,Z)=>it.overflows[1]-Z.overflows[1])[0])==null?void 0:J.placement;if(!$)switch(h){case"bestFit":{var nt;const it=(nt=ut.filter(Z=>{if(T){const rt=Ne(Z.placement);return rt===S||rt==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(rt=>rt>0).reduce((rt,pt)=>rt+pt,0)]).sort((Z,rt)=>Z[1]-rt[1])[0])==null?void 0:nt[0];it&&($=it);break}case"initialPlacement":$=l;break}if(o!==$)return{reset:{placement:$}}}return{}}}};function to(n,t){return{top:n.top-t.height,right:n.right-t.width,bottom:n.bottom-t.height,left:n.left-t.width}}function eo(n){return Ac.some(t=>n[t]>=0)}const Vc=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(t){const{rects:e,platform:s}=t,{strategy:o="referenceHidden",...i}=qe(n,t);switch(o){case"referenceHidden":{const a=await s.detectOverflow(t,{...i,elementContext:"reference"}),l=to(a,e.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:eo(l)}}}case"escaped":{const a=await s.detectOverflow(t,{...i,altBoundary:!0}),l=to(a,e.floating);return{data:{escapedOffsets:l,escaped:eo(l)}}}default:return{}}}}},hi=new Set(["left","top"]);async function Wc(n,t){const{placement:e,platform:s,elements:o}=n,i=await(s.isRTL==null?void 0:s.isRTL(o.floating)),a=Qe(e),l=_n(e),c=Ne(e)==="y",u=hi.has(a)?-1:1,g=i&&c?-1:1,p=qe(t,n);let{mainAxis:v,crossAxis:h,alignmentAxis:f}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof f=="number"&&(h=l==="end"?f*-1:f),c?{x:h*g,y:v*u}:{x:v*u,y:h*g}}const Hc=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(t){var e,s;const{x:o,y:i,placement:a,middlewareData:l}=t,c=await Wc(t,n);return a===((e=l.offset)==null?void 0:e.placement)&&(s=l.arrow)!=null&&s.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:a}}}}},jc=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(t){const{x:e,y:s,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:c={fn:S=>{let{x:k,y:R}=S;return{x:k,y:R}}},...u}=qe(n,t),g={x:e,y:s},p=await i.detectOverflow(t,u),v=Ne(o),h=gs(v);let f=g[h],m=g[v];const x=(S,k)=>di(k+p[S==="y"?"top":"left"],k,k-p[S==="y"?"bottom":"right"]);a&&(f=x(h,f)),l&&(m=x(v,m));const P=c.fn({...t,[h]:f,[v]:m});return{...P,data:{x:P.x-e,y:P.y-s,enabled:{[h]:a,[v]:l}}}}}},Kc=function(n){return n===void 0&&(n={}),{options:n,fn(t){var e,s;const{x:o,y:i,placement:a,rects:l,middlewareData:c}=t,{offset:u=0,mainAxis:g=!0,crossAxis:p=!0}=qe(n,t),v={x:o,y:i},h=Ne(a),f=gs(h);let m=v[f],x=v[h];const P=qe(u,t),S=typeof P=="number"?{mainAxis:P,crossAxis:0}:{mainAxis:(e=P.mainAxis)!=null?e:0,crossAxis:(s=P.crossAxis)!=null?s:0};if(g){const H=f==="y"?"height":"width",T=l.reference[f]-l.floating[H]+S.mainAxis,W=l.reference[f]+l.reference[H]-S.mainAxis;m<T?m=T:m>W&&(m=W)}if(p){var k,R;const H=f==="y"?"width":"height",T=hi.has(Qe(a)),W=l.reference[h]-l.floating[H]+(T&&((k=c.offset)==null?void 0:k[h])||0)+(T?0:S.crossAxis),et=l.reference[h]+l.reference[H]+(T?0:((R=c.offset)==null?void 0:R[h])||0)-(T?S.crossAxis:0);x<W?x=W:x>et&&(x=et)}return{[f]:m,[h]:x}}}},Uc=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(t){const{placement:e,rects:s,platform:o,elements:i}=t,{apply:a=()=>{},...l}=qe(n,t),c=await o.detectOverflow(t,l),u=Qe(e),g=_n(e),p=Ne(e)==="y",{width:v,height:h}=s.floating;let f,m;u==="top"||u==="bottom"?(f=u,m=g===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=u,f=g==="end"?"top":"bottom");const x=h-c.top-c.bottom,P=v-c.left-c.right,S=Je(h-c[f],x),k=Je(v-c[m],P),R=t.middlewareData.shift,H=!R;let T=S,W=k;R!=null&&R.enabled.x&&(W=P),R!=null&&R.enabled.y&&(T=x),H&&!g&&(p?W=v-2*je(c.left,c.right):T=h-2*je(c.top,c.bottom)),await a({...t,availableWidth:W,availableHeight:T});const et=await o.getDimensions(i.floating);return v!==et.width||h!==et.height?{reset:{rects:!0}}:{}}}};function fr(){return typeof window<"u"}function xn(n){return vi(n)?(n.nodeName||"").toLowerCase():"#document"}function ge(n){var t;return(n==null||(t=n.ownerDocument)==null?void 0:t.defaultView)||window}function Xe(n){var t;return(t=(vi(n)?n.ownerDocument:n.document)||window.document)==null?void 0:t.documentElement}function vi(n){return fr()?n instanceof Node||n instanceof ge(n).Node:!1}function Me(n){return fr()?n instanceof Element||n instanceof ge(n).Element:!1}function tn(n){return fr()?n instanceof HTMLElement||n instanceof ge(n).HTMLElement:!1}function no(n){return!fr()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof ge(n).ShadowRoot}function hr(n){const{overflow:t,overflowX:e,overflowY:s,display:o}=ze(n);return/auto|scroll|overlay|hidden|clip/.test(t+s+e)&&o!=="inline"&&o!=="contents"}function qc(n){return/^(table|td|th)$/.test(xn(n))}function vr(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const Xc=/transform|translate|scale|rotate|perspective|filter/,Gc=/paint|layout|strict|content/,sn=n=>!!n&&n!=="none";let Cr;function ys(n){const t=Me(n)?ze(n):n;return sn(t.transform)||sn(t.translate)||sn(t.scale)||sn(t.rotate)||sn(t.perspective)||!bs()&&(sn(t.backdropFilter)||sn(t.filter))||Xc.test(t.willChange||"")||Gc.test(t.contain||"")}function Yc(n){let t=dn(n);for(;tn(t)&&!Ln(t);){if(ys(t))return t;if(vr(t))return null;t=dn(t)}return null}function bs(){return Cr==null&&(Cr=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Cr}function Ln(n){return/^(html|body|#document)$/.test(xn(n))}function ze(n){return ge(n).getComputedStyle(n)}function gr(n){return Me(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function dn(n){if(xn(n)==="html")return n;const t=n.assignedSlot||n.parentNode||no(n)&&n.host||Xe(n);return no(t)?t.host:t}function gi(n){const t=dn(n);return Ln(t)?(n.ownerDocument||n).body:tn(t)&&hr(t)?t:gi(t)}function Fn(n,t,e){var s;t===void 0&&(t=[]),e===void 0&&(e=!0);const o=gi(n),i=o===((s=n.ownerDocument)==null?void 0:s.body),a=ge(o);if(i){const l=Mr(a);return t.concat(a,a.visualViewport||[],hr(o)?o:[],l&&e?Fn(l):[])}else return t.concat(o,Fn(o,[],e))}function Mr(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function pi(n){const t=ze(n);let e=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const o=tn(n),i=o?n.offsetWidth:e,a=o?n.offsetHeight:s,l=er(e)!==i||er(s)!==a;return l&&(e=i,s=a),{width:e,height:s,$:l}}function ws(n){return Me(n)?n:n.contextElement}function bn(n){const t=ws(n);if(!tn(t))return Ke(1);const e=t.getBoundingClientRect(),{width:s,height:o,$:i}=pi(t);let a=(i?er(e.width):e.width)/s,l=(i?er(e.height):e.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const Zc=Ke(0);function mi(n){const t=ge(n);return!bs()||!t.visualViewport?Zc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Jc(n,t,e){return t===void 0&&(t=!1),!!e&&t&&e===ge(n)}function fn(n,t,e,s){t===void 0&&(t=!1),e===void 0&&(e=!1);const o=n.getBoundingClientRect(),i=ws(n);let a=Ke(1);t&&(s?Me(s)&&(a=bn(s)):a=bn(n));const l=Jc(i,e,s)?mi(i):Ke(0);let c=(o.left+l.x)/a.x,u=(o.top+l.y)/a.y,g=o.width/a.x,p=o.height/a.y;if(i&&s){const v=ge(i),h=Me(s)?ge(s):s;let f=v,m=Mr(f);for(;m&&h!==f;){const x=bn(m),P=m.getBoundingClientRect(),S=ze(m),k=P.left+(m.clientLeft+parseFloat(S.paddingLeft))*x.x,R=P.top+(m.clientTop+parseFloat(S.paddingTop))*x.y;c*=x.x,u*=x.y,g*=x.x,p*=x.y,c+=k,u+=R,f=ge(m),m=Mr(f)}}return rr({width:g,height:p,x:c,y:u})}function pr(n,t){const e=gr(n).scrollLeft;return t?t.left+e:fn(Xe(n)).left+e}function yi(n,t){const e=n.getBoundingClientRect(),s=e.left+t.scrollLeft-pr(n,e),o=e.top+t.scrollTop;return{x:s,y:o}}function Qc(n){let{elements:t,rect:e,offsetParent:s,strategy:o}=n;const i=o==="fixed",a=Xe(s),l=t?vr(t.floating):!1;if(s===a||l&&i)return e;let c={scrollLeft:0,scrollTop:0},u=Ke(1);const g=Ke(0),p=tn(s);if((p||!i)&&((xn(s)!=="body"||hr(a))&&(c=gr(s)),p)){const h=fn(s);u=bn(s),g.x=h.x+s.clientLeft,g.y=h.y+s.clientTop}const v=a&&!p&&!i?yi(a,c):Ke(0);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-c.scrollLeft*u.x+g.x+v.x,y:e.y*u.y-c.scrollTop*u.y+g.y+v.y}}function $c(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function tu(n){const t=gr(n),e=n.ownerDocument.body,s=je(n.scrollWidth,n.clientWidth,e.scrollWidth,e.clientWidth),o=je(n.scrollHeight,n.clientHeight,e.scrollHeight,e.clientHeight);let i=-t.scrollLeft+pr(n);const a=-t.scrollTop;return ze(e).direction==="rtl"&&(i+=je(n.clientWidth,e.clientWidth)-s),{width:s,height:o,x:i,y:a}}const eu=25;function nu(n,t,e){e===void 0&&(e="viewport");const s=e==="layoutViewport",o=ge(n),i=Xe(n),a=o.visualViewport;let l=i.clientWidth,c=i.clientHeight,u=0,g=0;if(a){const v=!bs()||t==="fixed";s?v||(u=-a.offsetLeft,g=-a.offsetTop):(l=a.width,c=a.height,v&&(u=a.offsetLeft,g=a.offsetTop))}if(pr(i)<=0){const v=i.ownerDocument,h=v.body,f=getComputedStyle(h),m=v.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,x=Math.abs(i.clientWidth-h.clientWidth-m),P=getComputedStyle(i).scrollbarGutter==="stable both-edges"?x/2:x;P<=eu&&(l-=P)}return{width:l,height:c,x:u,y:g}}function ru(n,t){const e=fn(n,!0,t==="fixed"),s=e.top+n.clientTop,o=e.left+n.clientLeft,i=bn(n),a=n.clientWidth*i.x,l=n.clientHeight*i.y,c=o*i.x,u=s*i.y;return{width:a,height:l,x:c,y:u}}function ro(n,t,e){let s;if(t==="viewport"||t==="layoutViewport")s=nu(n,e,t);else if(t==="document")s=tu(Xe(n));else if(Me(t))s=ru(t,e);else{const o=mi(n);s={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return rr(s)}function su(n,t){const e=t.get(n);if(e)return e;let s=Fn(n,[],!1).filter(l=>Me(l)&&xn(l)!=="body"),o=null;const i=ze(n).position==="fixed";let a=i?dn(n):n;for(;Me(a)&&!Ln(a);){const l=ze(a),c=ys(a),u=o?o.position:i?"fixed":"";!c&&(u==="fixed"||u==="absolute"&&l.position==="static")?s=s.filter(p=>p!==a):o=l,a=dn(a)}return t.set(n,s),s}function ou(n){let{element:t,boundary:e,rootBoundary:s,strategy:o}=n;const a=[...e==="clippingAncestors"?vr(t)?[]:su(t,this._c):[].concat(e),s],l=ro(t,a[0],o);let c=l.top,u=l.right,g=l.bottom,p=l.left;for(let v=1;v<a.length;v++){const h=ro(t,a[v],o);c=je(h.top,c),u=Je(h.right,u),g=Je(h.bottom,g),p=je(h.left,p)}return{width:u-p,height:g-c,x:p,y:c}}function iu(n){const{width:t,height:e}=pi(n);return{width:t,height:e}}function au(n,t,e){const s=tn(t),o=Xe(t),i=e==="fixed",a=fn(n,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=Ke(0);if((s||!i)&&((xn(t)!=="body"||hr(o))&&(l=gr(t)),s)){const v=fn(t,!0,i,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}!s&&o&&(c.x=pr(o));const u=o&&!s&&!i?yi(o,l):Ke(0),g=a.left+l.scrollLeft-c.x-u.x,p=a.top+l.scrollTop-c.y-u.y;return{x:g,y:p,width:a.width,height:a.height}}function Tr(n){return ze(n).position==="static"}function so(n,t){if(!tn(n)||ze(n).position==="fixed")return null;if(t)return t(n);let e=n.offsetParent;return Xe(n)===e&&(e=e.ownerDocument.body),e}function bi(n,t){const e=ge(n);if(vr(n))return e;if(!tn(n)){let o=dn(n);for(;o&&!Ln(o);){if(Me(o)&&!Tr(o))return o;o=dn(o)}return e}let s=so(n,t);for(;s&&qc(s)&&Tr(s);)s=so(s,t);return s&&Ln(s)&&Tr(s)&&!ys(s)?e:s||Yc(n)||e}const lu=async function(n){const t=this.getOffsetParent||bi,e=this.getDimensions,s=await e(n.floating);return{reference:au(n.reference,await t(n.floating),n.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function cu(n){return ze(n).direction==="rtl"}const uu={convertOffsetParentRelativeRectToViewportRelativeRect:Qc,getDocumentElement:Xe,getClippingRect:ou,getOffsetParent:bi,getElementRects:lu,getClientRects:$c,getDimensions:iu,getScale:bn,isElement:Me,isRTL:cu};function wi(n,t){return n.x===t.x&&n.y===t.y&&n.width===t.width&&n.height===t.height}function du(n,t,e){let s=null,o;const i=Xe(n);function a(){var g;clearTimeout(o),(g=s)==null||g.disconnect(),s=null}function l(g,p){g===void 0&&(g=!1),p===void 0&&(p=1),a();const v=n.getBoundingClientRect(),{left:h,top:f,width:m,height:x}=v;if(g||t(),!m||!x)return;const P=Vn(f),S=Vn(i.clientWidth-(h+m)),k=Vn(i.clientHeight-(f+x)),R=Vn(h),T={rootMargin:-P+"px "+-S+"px "+-k+"px "+-R+"px",threshold:je(0,Je(1,p))||1};let W=!0;function et(G){const ut=G[0].intersectionRatio;if(!wi(v,n.getBoundingClientRect()))return l();if(ut!==p){if(!W)return l();ut?l(!1,ut):o=setTimeout(()=>{l(!1,1e-7)},1e3)}W=!1}try{s=new IntersectionObserver(et,{...T,root:i.ownerDocument})}catch{s=new IntersectionObserver(et,T)}s.observe(n)}const c=ge(n),u=()=>l(e);return c.addEventListener("resize",u),l(!0),()=>{c.removeEventListener("resize",u),a()}}function fu(n,t,e,s){s===void 0&&(s={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=s,u=ws(n),g=o||i?[...u?Fn(u):[],...t?Fn(t):[]]:[];g.forEach(P=>{o&&P.addEventListener("scroll",e),i&&P.addEventListener("resize",e)});const p=u&&l?du(u,e,i):null;let v=-1,h=null;a&&(h=new ResizeObserver(P=>{let[S]=P;S&&S.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var k;(k=h)==null||k.observe(t)})),e()}),u&&!c&&h.observe(u),t&&h.observe(t));let f,m=c?fn(n):null;c&&x();function x(){const P=fn(n);m&&!wi(m,P)&&e(),m=P,f=requestAnimationFrame(x)}return e(),()=>{var P;g.forEach(S=>{o&&S.removeEventListener("scroll",e),i&&S.removeEventListener("resize",e)}),p?.(),(P=h)==null||P.disconnect(),h=null,c&&cancelAnimationFrame(f)}}const hu=Hc,vu=jc,gu=Bc,pu=Uc,mu=Vc,yu=zc,bu=Kc,wu=(n,t,e)=>{const s=new Map,o=e??{},i={...uu,...o.platform,_c:s};return Mc(n,t,{...o,platform:i})};function _u(n){const t=n.whileElementsMounted,e=w(()=>rn(n.open)??!0),s=w(()=>rn(n.middleware)),o=w(()=>rn(n.transform)??!0),i=w(()=>rn(n.placement)??"bottom"),a=w(()=>rn(n.strategy)??"absolute"),l=w(()=>rn(n.sideOffset)??0),c=w(()=>rn(n.alignOffset)??0),u=n.reference;let g=L(0),p=L(0);const v=Fe(null);let h=L(le(r(a))),f=L(le(r(i))),m=L(le({})),x=L(!1),P=!1,S=0,k=!1;const R=w(()=>{const lt=v.current?Ys(v.current,r(g)):r(g),J=v.current?Ys(v.current,r(p)):r(p);return r(o)?{position:r(h),left:"0",top:"0",transform:`translate(${lt}px, ${J}px)`,...v.current&&ui(v.current)>=1.5&&{willChange:"transform"}}:{position:r(h),left:`${lt}px`,top:`${J}px`}});let H;function T(){if(k||u.current===null||v.current===null)return;const lt=u.current,J=v.current,nt=++S;wu(lt,J,{middleware:r(s),placement:r(i),strategy:r(a)}).then(ct=>{if(nt!==S||u.current!==lt||v.current!==J)return;if(xu(lt)){_(m,{...r(m),hide:{...r(m).hide,referenceHidden:!0}},!0);return}if(!r(e)&&r(g)!==0&&r(p)!==0){const $=Math.max(Math.abs(r(l)),Math.abs(r(c)),15);if(ct.x<=$&&ct.y<=$)return}_(g,ct.x,!0),_(p,ct.y,!0),_(h,ct.strategy,!0),_(f,ct.placement,!0),_(m,ct.middlewareData,!0),_(x,!0)})}function W(){typeof H=="function"&&(H(),H=void 0),S++}function et(){if(W(),t===void 0){T();return}r(e)&&(u.current===null||v.current===null||(H=t(u.current,v.current,T)))}function G(){!r(e)&&v.current===null&&_(x,!1)}function ut(){return[r(s),r(i),r(a),r(l),r(c),r(e)]}return At(()=>{t===void 0&&r(e)&&T()}),At(et),At(()=>{if(t!==void 0){if(ut(),!r(e)){P=!1;return}if(!r(x)){P=!1;return}if(!P){P=!0;return}T()}}),At(G),At(()=>()=>{k=!0,W()}),{floating:v,reference:u,get strategy(){return r(h)},get placement(){return r(f)},get middlewareData(){return r(m)},get isPositioned(){return r(x)},get floatingStyles(){return r(R)},get update(){return T}}}function xu(n){return n instanceof Element?!n.isConnected||n instanceof HTMLElement&&n.hidden?!0:n.getClientRects().length===0:!1}const Pu={top:"bottom",right:"left",bottom:"top",left:"right"},zr=new $e("Floating.Content");class sr{static create(t,e=!1){return e?zr.set(new sr(t,vs.get())):zr.set(new sr(t,hs.get()))}opts;root;contentRef=Fe(null);wrapperRef=Fe(null);arrowRef=Fe(null);contentAttachment=ve(this.contentRef);wrapperAttachment=ve(this.wrapperRef);arrowAttachment=ve(this.arrowRef);arrowId=Fe(us());#t=w(()=>{if(typeof this.opts.style=="string")return Cn(this.opts.style);if(!this.opts.style)return{}});#e=void 0;#n=new Za(()=>this.arrowRef.current??void 0);#r=w(()=>this.#n?.width??0);#s=w(()=>this.#n?.height??0);#o=w(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#a=w(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#i=w(()=>r(this.#a).length>0);get hasExplicitBoundaries(){return r(this.#i)}set hasExplicitBoundaries(t){_(this.#i,t)}#l=w(()=>({padding:this.opts.collisionPadding.current,boundary:r(this.#a).filter(ul),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return r(this.#l)}set detectOverflowOptions(t){_(this.#l,t)}#c=L(void 0);#d=L(void 0);#f=L(void 0);#g=L(void 0);#h=w(()=>[hu({mainAxis:this.opts.sideOffset.current+r(this.#s),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&vu({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?bu():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&gu({...this.detectOverflowOptions}),pu({...this.detectOverflowOptions,apply:({rects:t,availableWidth:e,availableHeight:s})=>{const{width:o,height:i}=t.reference;_(this.#c,e,!0),_(this.#d,s,!0),_(this.#f,o,!0),_(this.#g,i,!0)}}),this.arrowRef.current&&yu({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),Su({arrowWidth:r(this.#r),arrowHeight:r(this.#s)}),this.opts.hideWhenDetached.current&&mu({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return r(this.#h)}set middleware(t){_(this.#h,t)}floating;#u=w(()=>Eu(this.floating.placement));get placedSide(){return r(this.#u)}set placedSide(t){_(this.#u,t)}#v=w(()=>Au(this.floating.placement));get placedAlign(){return r(this.#v)}set placedAlign(t){_(this.#v,t)}#p=w(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return r(this.#p)}set arrowX(t){_(this.#p,t)}#m=w(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return r(this.#m)}set arrowY(t){_(this.#m,t)}#y=w(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return r(this.#y)}set cannotCenterArrow(t){_(this.#y,t)}#b=L();get contentZIndex(){return r(this.#b)}set contentZIndex(t){_(this.#b,t,!0)}#w=w(()=>Pu[this.placedSide]);get arrowBaseSide(){return r(this.#w)}set arrowBaseSide(t){_(this.#w,t)}#_=w(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${r(this.#c)}px`,"--bits-floating-available-height":`${r(this.#d)}px`,"--bits-floating-anchor-width":`${r(this.#f)}px`,"--bits-floating-anchor-height":`${r(this.#g)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...r(this.#t)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return r(this.#_)}set wrapperProps(t){_(this.#_,t)}#x=w(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:jr({...r(this.#t)}),...this.contentAttachment}));get props(){return r(this.#x)}set props(t){_(this.#x,t)}#P=w(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return r(this.#P)}set arrowStyle(t){_(this.#P,t)}constructor(t,e){this.opts=t,this.root=e,this.#e=t.updatePositionStrategy,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),Jt(()=>t.customAnchor.current,s=>{this.root.customAnchorNode.current=s}),this.floating=_u({strategy:()=>this.opts.strategy.current,placement:()=>r(this.#o),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...s)=>fu(...s,{animationFrame:this.#e?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),At(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),Jt(()=>this.contentRef.current,s=>{if(!s||!this.opts.enabled.current)return;const o=Go(s),i=o.requestAnimationFrame(()=>{if(this.contentRef.current!==s||!this.opts.enabled.current)return;const a=o.getComputedStyle(s).zIndex;a!==this.contentZIndex&&(this.contentZIndex=a)});return()=>{o.cancelAnimationFrame(i)}}),At(()=>{this.floating.floating.current=this.wrapperRef.current})}}class _i{static create(t){return new _i(t,zr.get())}opts;content;constructor(t,e){this.opts=t,this.content=e}#t=w(()=>({id:this.opts.id.current,style:this.content.arrowStyle,"data-side":this.content.placedSide,...this.content.arrowAttachment}));get props(){return r(this.#t)}set props(t){_(this.#t,t)}}function Su(n){return{name:"transformOrigin",options:n,fn(t){const{placement:e,rects:s,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,l=a?0:n.arrowWidth,c=a?0:n.arrowHeight,[u,g]=_s(e),p={start:"0%",center:"50%",end:"100%"}[g],v=(o.arrow?.x??0)+l/2,h=(o.arrow?.y??0)+c/2;let f="",m="";return u==="bottom"?(f=a?p:`${v}px`,m=`${-c}px`):u==="top"?(f=a?p:`${v}px`,m=`${s.floating.height+c}px`):u==="right"?(f=`${-c}px`,m=a?p:`${h}px`):u==="left"&&(f=`${s.floating.width+c}px`,m=a?p:`${h}px`),{data:{x:f,y:m}}}}}function _s(n){const[t,e="center"]=n.split("-");return[t,e]}function Eu(n){return _s(n)[0]}function Au(n){return _s(n)[1]}function Ou(n,t){U(t,!0);let e=b(t,"side",3,"bottom"),s=b(t,"sideOffset",3,0),o=b(t,"align",3,"center"),i=b(t,"alignOffset",3,0),a=b(t,"arrowPadding",3,0),l=b(t,"avoidCollisions",3,!0),c=b(t,"collisionBoundary",19,()=>[]),u=b(t,"collisionPadding",3,0),g=b(t,"hideWhenDetached",3,!1),p=b(t,"onPlaced",3,()=>{}),v=b(t,"sticky",3,"partial"),h=b(t,"updatePositionStrategy",3,"optimized"),f=b(t,"strategy",3,"fixed"),m=b(t,"dir",3,"ltr"),x=b(t,"style",19,()=>({})),P=b(t,"wrapperId",19,us),S=b(t,"customAnchor",3,null),k=b(t,"tooltip",3,!1);const R=sr.create({side:C(()=>e()),sideOffset:C(()=>s()),align:C(()=>o()),alignOffset:C(()=>i()),id:C(()=>t.id),arrowPadding:C(()=>a()),avoidCollisions:C(()=>l()),collisionBoundary:C(()=>c()),collisionPadding:C(()=>u()),hideWhenDetached:C(()=>g()),onPlaced:C(()=>p()),sticky:C(()=>v()),updatePositionStrategy:C(()=>h()),strategy:C(()=>f()),dir:C(()=>m()),style:C(()=>x()),enabled:C(()=>t.enabled),wrapperId:C(()=>P()),customAnchor:C(()=>S())},k()),H=w(()=>Ut(R.wrapperProps,{style:{pointerEvents:"auto"}}));var T=F(),W=E(T);at(W,()=>t.content??wt,()=>({props:R.props,wrapperProps:r(H)})),d(n,T),q()}function Cu(n,t){U(t,!0),qi(()=>{t.onPlaced?.()});var e=F(),s=E(e);at(s,()=>t.content??wt,()=>({props:{},wrapperProps:{}})),d(n,e),q()}var Tu=new Set(["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);function ku(n,t){let e=b(t,"isStatic",3,!1),s=dt(t,Tu);var o=F(),i=E(o);{var a=c=>{Cu(c,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},l=c=>{Ou(c,_t({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>s))};B(i,c=>{e()?c(a):c(l,-1)})}d(n,o)}var Iu=new Set(["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","forceMount","ref","tooltip","contentPointerEvents"]),Du=A("<!> <!>",1);function xi(n,t){U(t,!0);let e=b(t,"interactOutsideBehavior",3,"close"),s=b(t,"trapFocus",3,!0),o=b(t,"isValidEvent",3,()=>!1),i=b(t,"customAnchor",3,null),a=b(t,"isStatic",3,!1),l=b(t,"tooltip",3,!1),c=b(t,"contentPointerEvents",3,"auto"),u=dt(t,Iu);const g=w(()=>t.preventScroll??!0),p=w(()=>t.strategy??(r(g)?"fixed":"absolute"));ku(n,{get isStatic(){return a()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return r(p)},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return i()},get enabled(){return t.enabled},get tooltip(){return l()},content:(h,f)=>{let m=()=>(f?.()).props,x=()=>(f?.()).wrapperProps;var P=Du(),S=E(P);{var k=T=>{wn(T,{get preventScroll(){return r(g)}})},R=T=>{wn(T,{get preventScroll(){return r(g)}})};B(S,T=>{t.forceMount&&t.enabled?T(k):t.forceMount||T(R,1)})}var H=I(S,2);as(H,{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return s()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(W,et)=>{let G=()=>(et?.()).props;ss(W,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(ut,lt)=>{ns(ut,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return e()},get isValidEvent(){return o()},get enabled(){return t.enabled},get ref(){return t.ref},children:(nt,ct)=>{let Y=()=>(ct?.()).props;cs(nt,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:($,it)=>{var Z=F(),rt=E(Z);{let pt=w(()=>({props:Ut(u,m(),Y(),G(),{id:t.id,style:{pointerEvents:c()}}),wrapperProps:x()}));at(rt,()=>t.popper??wt,()=>r(pt))}d($,Z)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),d(h,P)},$$slots:{content:!0}}),q()}var Ru=new Set(["$$slots","$$events","$$legacy","popper","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);function Lu(n,t){let e=b(t,"interactOutsideBehavior",3,"close"),s=b(t,"trapFocus",3,!0),o=b(t,"isValidEvent",3,()=>!1),i=b(t,"customAnchor",3,null),a=b(t,"isStatic",3,!1),l=dt(t,Ru);var c=F(),u=E(c);{var g=p=>{xi(p,_t({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return i()},get isStatic(){return a()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return e()},get loop(){return t.loop},get trapFocus(){return s()},get isValidEvent(){return o()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>l))};B(u,p=>{t.shouldRender&&p(g)})}d(n,c)}var Fu=new Set(["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);function Nu(n,t){let e=b(t,"interactOutsideBehavior",3,"close"),s=b(t,"trapFocus",3,!0),o=b(t,"isValidEvent",3,()=>!1),i=b(t,"customAnchor",3,null),a=b(t,"isStatic",3,!1),l=dt(t,Fu);xi(n,_t({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return i()},get isStatic(){return a()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return e()},get loop(){return t.loop},get trapFocus(){return s()},get isValidEvent(){return o()},get onFocusOutside(){return t.onFocusOutside}},()=>l,{forceMount:!0}))}function kr(n,t){const[e,s]=n;let o=!1;const i=t.length;for(let a=0,l=i-1;a<i;l=a++){const[c,u]=t[a]??[0,0],[g,p]=t[l]??[0,0];u>=s!=p>=s&&e<=(g-c)*(s-u)/(p-u)+c&&(o=!o)}return o}function Ir(n,t){return n[0]>=t.left&&n[0]<=t.right&&n[1]>=t.top&&n[1]<=t.bottom}function oo(n,t){const e=n.left+n.width/2,s=n.top+n.height/2,o=t.left+t.width/2,i=t.top+t.height/2,a=o-e,l=i-s;return Math.abs(a)>Math.abs(l)?a>0?"right":"left":l>0?"bottom":"top"}class Mu{#t;#e;#n;#r=null;#s=null;#o=[];#a=null;#i=null;#l=null;#c(){this.#i!==null&&(cancelAnimationFrame(this.#i),this.#i=null)}#d(){this.#c(),this.#i=requestAnimationFrame(()=>{this.#i=null,!(!this.#r||!this.#s)&&(this.#u(),this.#t.onPointerExit())})}#f(){this.#l!==null&&(clearTimeout(this.#l),this.#l=null)}#g(){this.#n!==null&&(this.#f(),this.#l=window.setTimeout(()=>{this.#l=null,!(!this.#r||!this.#s)&&(this.#u(),this.#t.onPointerExit())},this.#n))}constructor(t){this.#t=t,this.#e=t.buffer??1;const e=t.transitIntentTimeout;this.#n=typeof e=="number"&&e>0?e:null,Jt([t.triggerNode,t.contentNode,t.enabled],([s,o,i])=>{if(!s||!o||!i){this.#a=null,this.#u();return}this.#a&&this.#a!==s&&this.#u(),this.#a=s;const a=Xo(s),l=v=>{this.#h([v.clientX,v.clientY],s,o)},c=v=>{const h=v.relatedTarget;if(an(h)&&o.contains(h))return;const f=this.#t.ignoredTargets?.()??[];an(h)&&f.some(m=>m===h||m.contains(h))||(this.#o=an(h)&&f.length>0?f.filter(m=>h.contains(m)):[],this.#r=[v.clientX,v.clientY],this.#s="content",this.#d())},u=()=>{this.#u()},g=()=>{this.#u()},p=v=>{const h=v.relatedTarget;an(h)&&s.contains(h)||(this.#r=[v.clientX,v.clientY],this.#s="trigger",this.#d())};return[ie(a,"pointermove",l),ie(s,"pointerleave",c),ie(s,"pointerenter",u),ie(o,"pointerenter",g),ie(o,"pointerleave",p)].reduce((v,h)=>()=>{v(),h()},()=>{})})}#h(t,e,s){if(!this.#r||!this.#s)return;this.#c(),this.#g();const o=e.getBoundingClientRect(),i=s.getBoundingClientRect();if(this.#s==="content"&&Ir(t,i)){this.#u();return}if(this.#s==="trigger"&&Ir(t,o)){this.#u();return}if(this.#s==="content"&&this.#o.length>0)for(const g of this.#o){const p=g.getBoundingClientRect();if(Ir(t,p))return;const v=oo(o,p),h=this.#v(o,p,v);if(h&&kr(t,h))return}const a=oo(o,i),l=this.#v(o,i,a);if(l&&kr(t,l))return;const c=this.#s==="content"?i:o,u=this.#p(this.#r,c,a,this.#s);kr(t,u)||(this.#u(),this.#t.onPointerExit())}#u(){this.#r=null,this.#s=null,this.#o=[],this.#c(),this.#f()}#v(t,e,s){const o=this.#e;switch(s){case"top":return[[Math.min(t.left,e.left)-o,t.top],[Math.min(t.left,e.left)-o,e.bottom],[Math.max(t.right,e.right)+o,e.bottom],[Math.max(t.right,e.right)+o,t.top]];case"bottom":return[[Math.min(t.left,e.left)-o,t.bottom],[Math.min(t.left,e.left)-o,e.top],[Math.max(t.right,e.right)+o,e.top],[Math.max(t.right,e.right)+o,t.bottom]];case"left":return[[t.left,Math.min(t.top,e.top)-o],[e.right,Math.min(t.top,e.top)-o],[e.right,Math.max(t.bottom,e.bottom)+o],[t.left,Math.max(t.bottom,e.bottom)+o]];case"right":return[[t.right,Math.min(t.top,e.top)-o],[e.left,Math.min(t.top,e.top)-o],[e.left,Math.max(t.bottom,e.bottom)+o],[t.right,Math.max(t.bottom,e.bottom)+o]]}}#p(t,e,s,o){const i=this.#e*4,[a,l]=t;switch(o==="trigger"?this.#m(s):s){case"top":return[[a-i,l+i],[a+i,l+i],[e.right+i,e.bottom],[e.right+i,e.top],[e.left-i,e.top],[e.left-i,e.bottom]];case"bottom":return[[a-i,l-i],[a+i,l-i],[e.right+i,e.top],[e.right+i,e.bottom],[e.left-i,e.bottom],[e.left-i,e.top]];case"left":return[[a+i,l-i],[a+i,l+i],[e.right,e.bottom+i],[e.left,e.bottom+i],[e.left,e.top-i],[e.right,e.top-i]];case"right":return[[a-i,l-i],[a-i,l+i],[e.left,e.bottom+i],[e.right,e.bottom+i],[e.right,e.top-i],[e.left,e.top-i]]}}#m(t){switch(t){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}}const Br=ar({component:"popover",parts:["root","trigger","content","close","overlay"]}),xs=new $e("Popover.Root");class Ps{static create(t){return xs.set(new Ps(t))}opts;#t=L(null);get contentNode(){return r(this.#t)}set contentNode(t){_(this.#t,t,!0)}contentPresence;#e=L(null);get triggerNode(){return r(this.#e)}set triggerNode(t){_(this.#e,t,!0)}#n=L(null);get overlayNode(){return r(this.#n)}set overlayNode(t){_(this.#n,t,!0)}overlayPresence;#r=L(!1);get openedViaHover(){return r(this.#r)}set openedViaHover(t){_(this.#r,t,!0)}#s=L(!1);get hasInteractedWithContent(){return r(this.#s)}set hasInteractedWithContent(t){_(this.#s,t,!0)}#o=L(!1);get hoverCooldown(){return r(this.#o)}set hoverCooldown(t){_(this.#o,t,!0)}#a=L(0);get closeDelay(){return r(this.#a)}set closeDelay(t){_(this.#a,t,!0)}#i=null;#l=null;constructor(t){this.opts=t,this.contentPresence=new Xn({ref:C(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new Xn({ref:C(()=>this.overlayNode),open:this.opts.open}),Jt(()=>this.opts.open.current,e=>{e||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#c())})}setDomContext(t){this.#l=t}#c(){this.#i!==null&&this.#l&&(this.#l.clearTimeout(this.#i),this.#i=null)}toggleOpen(){this.#c(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#c(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#c(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#c(),this.closeDelay<=0?this.opts.open.current=!1:this.#l&&(this.#i=this.#l.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#i=null},this.closeDelay))))}cancelDelayedClose(){this.#c()}markInteraction(){this.hasInteractedWithContent=!0,this.#c()}}class Ss{static create(t){return new Ss(t,xs.get())}opts;root;attachment;domContext;#t=null;#e=null;#n=L(!1);constructor(t,e){this.opts=t,this.root=e,this.attachment=ve(this.opts.ref,s=>this.root.triggerNode=s),this.domContext=new Ur(t.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),Jt(()=>this.opts.closeDelay.current,s=>{this.root.closeDelay=s})}#r(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#s(){this.#e!==null&&(this.domContext.clearTimeout(this.#e),this.#e=null)}#o(){this.#r(),this.#s()}onpointerenter(t){if(this.opts.disabled.current||!this.opts.openOnHover.current||qn(t)||(_(this.#n,!0),this.#s(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const e=this.opts.openDelay.current;e<=0?this.root.handleHoverOpen():this.#t=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#t=null},e)}onpointerleave(t){this.opts.disabled.current||this.opts.openOnHover.current&&(qn(t)||(_(this.#n,!1),this.#r(),this.root.hoverCooldown=!1))}onclick(t){if(!this.opts.disabled.current&&t.button===0){if(this.#o(),r(this.#n)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}r(this.#n)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(t){this.opts.disabled.current||(t.key===lr||t.key===cr)&&(t.preventDefault(),this.#o(),this.root.toggleOpen())}#a(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#i=w(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":Un(this.root.opts.open.current),"data-state":qr(this.root.opts.open.current),"aria-controls":this.#a(),[Br.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return r(this.#i)}set props(t){_(this.#i,t)}}class Es{static create(t){return new Es(t,xs.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=ve(this.opts.ref,s=>this.root.contentNode=s),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new Mu({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(t){this.root.markInteraction()}onfocusin(t){const e=t.target;an(e)&&Ql(e)&&this.root.markInteraction()}onpointerenter(t){qn(t)||this.root.cancelDelayedClose()}onpointerleave(t){qn(t)}onInteractOutside=t=>{if(this.opts.onInteractOutside.current(t),t.defaultPrevented||!an(t.target))return;const e=t.target.closest(Br.selector("trigger"));if(!(e&&e===this.root.triggerNode)){if(this.opts.customAnchor.current){if(an(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(t.target))return}else if(typeof this.opts.customAnchor.current=="string"){const s=document.querySelector(this.opts.customAnchor.current);if(s&&s.contains(t.target))return}}this.root.handleClose()}};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#t=w(()=>({open:this.root.opts.open.current}));get snippetProps(){return r(this.#t)}set snippetProps(t){_(this.#t,t)}#e=w(()=>({id:this.opts.id.current,tabindex:-1,"data-state":qr(this.root.opts.open.current),...Xr(this.root.contentPresence.transitionStatus),[Br.content]:"",style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return r(this.#e)}set props(t){_(this.#e,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}}var zu=new Set(["$$slots","$$events","$$legacy","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]),io=A("<div><div><!></div></div>");function Bu(n,t){const e=_e();U(t,!0);let s=b(t,"ref",15,null),o=b(t,"id",19,()=>xe(e)),i=b(t,"forceMount",3,!1),a=b(t,"onOpenAutoFocus",3,Ot),l=b(t,"onCloseAutoFocus",3,Ot),c=b(t,"onEscapeKeydown",3,Ot),u=b(t,"onInteractOutside",3,Ot),g=b(t,"trapFocus",3,!0),p=b(t,"preventScroll",3,!1),v=b(t,"customAnchor",3,null),h=dt(t,zu);const f=Es.create({id:C(()=>o()),ref:C(()=>s(),T=>s(T)),onInteractOutside:C(()=>u()),onEscapeKeydown:C(()=>c()),customAnchor:C(()=>v())}),m=w(()=>Ut(h,f.props)),x=w(()=>g()&&f.shouldTrapFocus);function P(T){f.shouldTrapFocus||T.preventDefault(),a()(T)}var S=F(),k=E(S);{var R=T=>{Nu(T,_t(()=>r(m),()=>f.popperProps,{get ref(){return f.opts.ref},get enabled(){return f.root.opts.open.current},get id(){return o()},get trapFocus(){return r(x)},get preventScroll(){return p()},loop:!0,forceMount:!0,get customAnchor(){return v()},onOpenAutoFocus:P,get onCloseAutoFocus(){return l()},get shouldRender(){return f.shouldRender},popper:(et,G)=>{let ut=()=>(G?.()).props,lt=()=>(G?.()).wrapperProps;const J=w(()=>Ut(ut(),{style:Zs("popover")},{style:t.style}));var nt=F(),ct=E(nt);{var Y=it=>{var Z=F(),rt=E(Z);{let pt=w(()=>({props:r(J),wrapperProps:lt(),...f.snippetProps}));at(rt,()=>t.child,()=>r(pt))}d(it,Z)},$=it=>{var Z=io();Kt(Z,()=>({...lt()}));var rt=V(Z);Kt(rt,()=>({...r(J)}));var pt=V(rt);at(pt,()=>t.children??wt),z(rt),z(Z),d(it,Z)};B(ct,it=>{t.child?it(Y):it($,-1)})}d(et,nt)},$$slots:{popper:!0}}))},H=T=>{Lu(T,_t(()=>r(m),()=>f.popperProps,{get ref(){return f.opts.ref},get open(){return f.root.opts.open.current},get id(){return o()},get trapFocus(){return r(x)},get preventScroll(){return p()},loop:!0,forceMount:!1,get customAnchor(){return v()},onOpenAutoFocus:P,get onCloseAutoFocus(){return l()},get shouldRender(){return f.shouldRender},popper:(et,G)=>{let ut=()=>(G?.()).props,lt=()=>(G?.()).wrapperProps;const J=w(()=>Ut(ut(),{style:Zs("popover")},{style:t.style}));var nt=F(),ct=E(nt);{var Y=it=>{var Z=F(),rt=E(Z);{let pt=w(()=>({props:r(J),wrapperProps:lt(),...f.snippetProps}));at(rt,()=>t.child,()=>r(pt))}d(it,Z)},$=it=>{var Z=io();Kt(Z,()=>({...lt()}));var rt=V(Z);Kt(rt,()=>({...r(J)}));var pt=V(rt);at(pt,()=>t.children??wt),z(rt),z(Z),d(it,Z)};B(ct,it=>{t.child?it(Y):it($,-1)})}d(et,nt)},$$slots:{popper:!0}}))};B(k,T=>{i()?T(R):i()||T(H,1)})}d(n,S),q()}var Vu=new Set(["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]),Wu=A("<button><!></button>");function Hu(n,t){const e=_e();U(t,!0);let s=b(t,"id",19,()=>xe(e)),o=b(t,"ref",15,null),i=b(t,"type",3,"button"),a=b(t,"disabled",3,!1),l=b(t,"openOnHover",3,!1),c=b(t,"openDelay",3,700),u=b(t,"closeDelay",3,300),g=dt(t,Vu);const p=Ss.create({id:C(()=>s()),ref:C(()=>o(),h=>o(h)),disabled:C(()=>!!a()),openOnHover:C(()=>l()),openDelay:C(()=>c()),closeDelay:C(()=>u())}),v=w(()=>Ut(g,p.props,{type:i()}));Ec(n,{get id(){return s()},get ref(){return p.opts.ref},children:(h,f)=>{var m=F(),x=E(m);{var P=k=>{var R=F(),H=E(R);at(H,()=>t.child,()=>({props:r(v)})),d(k,R)},S=k=>{var R=Wu();Kt(R,()=>({...r(v)}));var H=V(R);at(H,()=>t.children??wt),z(R),d(k,R)};B(x,k=>{t.child?k(P):k(S,-1)})}d(h,m)},$$slots:{default:!0}}),q()}function ju(n,t){U(t,!0);let e=b(t,"open",15,!1),s=b(t,"onOpenChange",3,Ot),o=b(t,"onOpenChangeComplete",3,Ot);ur.create({variant:C(()=>"dialog"),open:C(()=>e(),l=>{e(l),s()(l)}),onOpenChangeComplete:C(()=>o())});var i=F(),a=E(i);at(a,()=>t.children??wt),d(n,i),q()}var Ku=new Set(["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]),Uu=A("<button><!></button>");function qu(n,t){const e=_e();U(t,!0);let s=b(t,"id",19,()=>xe(e)),o=b(t,"ref",15,null),i=b(t,"disabled",3,!1),a=dt(t,Ku);const l=Gr.create({variant:C(()=>"close"),id:C(()=>s()),ref:C(()=>o(),h=>o(h)),disabled:C(()=>!!i())}),c=w(()=>Ut(a,l.props));var u=F(),g=E(u);{var p=h=>{var f=F(),m=E(f);at(m,()=>t.child,()=>({props:r(c)})),d(h,f)},v=h=>{var f=Uu();Kt(f,()=>({...r(c)}));var m=V(f);at(m,()=>t.children??wt),z(f),d(h,f)};B(g,h=>{t.child?h(p):h(v,-1)})}d(n,u),q()}var Xu=new Set(["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","preventOverflowTextSelection","restoreScrollDelay"]),Gu=A("<!> <!>",1),Yu=A("<!> <div><!></div>",1);function Zu(n,t){const e=_e();U(t,!0);let s=b(t,"id",19,()=>xe(e)),o=b(t,"ref",15,null),i=b(t,"forceMount",3,!1),a=b(t,"onCloseAutoFocus",3,Ot),l=b(t,"onOpenAutoFocus",3,Ot),c=b(t,"onEscapeKeydown",3,Ot),u=b(t,"onInteractOutside",3,Ot),g=b(t,"trapFocus",3,!0),p=b(t,"preventScroll",3,!0),v=b(t,"preventOverflowTextSelection",3,!0),h=b(t,"restoreScrollDelay",3,null),f=dt(t,Xu);const m=dr.create({id:C(()=>s()),ref:C(()=>o(),R=>o(R))}),x=w(()=>Ut(f,m.props));var P=F(),S=E(P);{var k=R=>{as(R,{get ref(){return m.opts.ref},loop:!0,get trapFocus(){return g()},get enabled(){return m.root.opts.open.current},get onOpenAutoFocus(){return l()},get onCloseAutoFocus(){return a()},focusScope:(T,W)=>{let et=()=>(W?.()).props;ss(T,_t(()=>r(x),{get enabled(){return m.root.opts.open.current},get ref(){return m.opts.ref},onEscapeKeydown:G=>{c()(G),!G.defaultPrevented&&m.root.handleClose()},children:(G,ut)=>{ns(G,_t(()=>r(x),{get ref(){return m.opts.ref},get enabled(){return m.root.opts.open.current},onInteractOutside:lt=>{u()(lt),!lt.defaultPrevented&&m.root.handleClose()},children:(lt,J)=>{cs(lt,_t(()=>r(x),{get preventOverflowTextSelection(){return v()},get ref(){return m.opts.ref},get enabled(){return m.root.opts.open.current},children:(nt,ct)=>{var Y=F(),$=E(Y);{var it=rt=>{var pt=Gu(),xt=E(pt);{var kt=Ft=>{wn(Ft,{get preventScroll(){return p()},get restoreScrollDelay(){return h()}})};B(xt,Ft=>{m.root.opts.open.current&&Ft(kt)})}var St=I(xt,2);{let Ft=w(()=>({props:Ut(r(x),et()),...m.snippetProps}));at(St,()=>t.child,()=>r(Ft))}d(rt,pt)},Z=rt=>{var pt=Yu(),xt=E(pt);wn(xt,{get preventScroll(){return p()}});var kt=I(xt,2);Kt(kt,Ft=>({...Ft}),[()=>Ut(r(x),et())]);var St=V(kt);at(St,()=>t.children??wt),z(kt),d(rt,pt)};B($,rt=>{t.child?rt(it):rt(Z,-1)})}d(nt,Y)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};B(S,R=>{(m.shouldRender||i())&&R(k)})}d(n,P),q()}function Ju(n,t){U(t,!0);let e=b(t,"open",15,!1),s=b(t,"onOpenChange",3,Ot),o=b(t,"onOpenChangeComplete",3,Ot);Ps.create({open:C(()=>e(),i=>{e(i),s()(i)}),onOpenChangeComplete:C(()=>o())}),Sc(n,{children:(i,a)=>{var l=F(),c=E(l);at(c,()=>t.children??wt),d(i,l)},$$slots:{default:!0}}),q()}const Qu=ar({component:"toggle",parts:["root"]});class As{static create(t){return new As(t)}opts;attachment;constructor(t){this.opts=t,this.attachment=ve(this.opts.ref),this.onclick=this.onclick.bind(this)}onclick(t){this.opts.disabled.current||(this.opts.pressed.current=!this.opts.pressed.current)}#t=w(()=>({pressed:this.opts.pressed.current}));get snippetProps(){return r(this.#t)}set snippetProps(t){_(this.#t,t)}#e=w(()=>({[Qu.root]:"",id:this.opts.id.current,"data-disabled":cn(this.opts.disabled.current),"aria-pressed":Un(this.opts.pressed.current),"data-state":$u(this.opts.pressed.current),disabled:sl(this.opts.disabled.current),onclick:this.onclick,...this.attachment}));get props(){return r(this.#e)}set props(t){_(this.#e,t)}}function $u(n){return n?"on":"off"}var td=new Set(["$$slots","$$events","$$legacy","ref","id","pressed","onPressedChange","disabled","type","children","child"]),ed=A("<button><!></button>");function nd(n,t){const e=_e();U(t,!0);let s=b(t,"ref",15,null),o=b(t,"id",19,()=>xe(e)),i=b(t,"pressed",15,!1),a=b(t,"onPressedChange",3,Ot),l=b(t,"disabled",3,!1),c=b(t,"type",3,"button"),u=dt(t,td);const g=As.create({pressed:C(()=>i(),x=>{i(x),a()(x)}),disabled:C(()=>l()??!1),id:C(()=>o()),ref:C(()=>s(),x=>s(x))}),p=w(()=>Ut(u,g.props,{type:c()}));var v=F(),h=E(v);{var f=x=>{var P=F(),S=E(P);{let k=w(()=>({props:r(p),...g.snippetProps}));at(S,()=>t.child,()=>r(k))}d(x,P)},m=x=>{var P=ed();Kt(P,()=>({...r(p)}));var S=V(P);at(S,()=>t.children??wt,()=>g.snippetProps),z(P),d(x,P)};B(h,x=>{t.child?x(f):x(m,-1)})}d(n,v),q()}const rd={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var sd=new Set(["$$slots","$$events","$$legacy","name","color","size","strokeWidth","absoluteStrokeWidth","iconNode","children"]),od=Xi("<svg><!><!></svg>");function Os(n,t){U(t,!0);const e=b(t,"color",3,"currentColor"),s=b(t,"size",3,24),o=b(t,"strokeWidth",3,2),i=b(t,"absoluteStrokeWidth",3,!1),a=b(t,"iconNode",19,()=>[]),l=dt(t,sd);var c=od();Kt(c,p=>({...rd,...l,width:s(),height:s(),stroke:e(),"stroke-width":p,class:["lucide-icon lucide",t.name&&`lucide-${t.name}`,t.class]}),[()=>i()?Number(o())*24/Number(s()):o()]);var u=V(c);De(u,17,a,jn,(p,v)=>{var h=w(()=>Ro(r(v),2));let f=()=>r(h)[0],m=()=>r(h)[1];var x=F(),P=E(x);Zi(P,f,!0,(S,k)=>{Kt(S,()=>({...m()}))}),d(p,x)});var g=I(u);at(g,()=>t.children??wt),z(c),d(n,c),q()}var id=new Set(["$$slots","$$events","$$legacy"]);function ad(n,t){U(t,!0);let e=dt(t,id);const s=[["path",{d:"M20 6 9 17l-5-5"}]];Os(n,_t({name:"check"},()=>e,{get iconNode(){return s},children:(o,i)=>{var a=F(),l=E(a);at(l,()=>t.children??wt),d(o,a)},$$slots:{default:!0}})),q()}var ld=A('<p class="err svelte-furisw"> </p>'),cd=A('<p class="dim svelte-furisw">Loading…</p>'),ud=A('<span class="dim svelte-furisw">detached HEAD</span>'),dd=A('<span class="dim svelte-furisw">not a git repository</span>'),fd=A('<li class="svelte-furisw"><span class="name svelte-furisw"> </span> <a class="mono svelte-furisw" target="_blank" rel="noopener noreferrer"> </a></li>'),hd=A('<ul class="svelte-furisw"></ul>'),vd=A('<span class="err svelte-furisw"> </span>'),gd=A('<span class="dim svelte-furisw">None. Commit a <code class="svelte-furisw">.claude-mux.json</code> at the root to name them:</span> <pre class="svelte-furisw"></pre>',1),pd=A('<dl class="svelte-furisw"><dt class="svelte-furisw"> </dt> <dd class="mono svelte-furisw"> </dd> <dt class="svelte-furisw">Branch</dt> <dd class="mono svelte-furisw"><!></dd> <dt class="svelte-furisw">URLs</dt> <dd class="svelte-furisw"><!></dd></dl>'),md=A('<div class="project svelte-furisw"><!></div>');function yd(n,t){U(t,!0);let e=L(null),s=L(null),o=L(!1),i=0;async function a(m){const x=++i;_(o,!0),_(s,null);try{const P=await fetch(`/api/sessions/${encodeURIComponent(m)}/project`),S=await P.json();if(!P.ok)throw new Error(S.error??`HTTP ${P.status}`);x===i&&_(e,S,!0)}catch(P){x===i&&_(s,P instanceof Error?P.message:String(P),!0)}finally{x===i&&_(o,!1)}}const l=w(()=>t.session?.id??null),c=w(()=>t.session?.cwd??null);At(()=>{r(l)&&r(c)&&t.active&&a(r(l))}),At(()=>{t.setActions([{icon:"mdi:refresh",label:"Reload",disabled:!r(l)||r(o),run:()=>r(l)&&void a(r(l))}])});const u=w(()=>Object.entries(r(e)?.config?.urls??{}));var g=md(),p=V(g);{var v=m=>{var x=ld(),P=tt(x,!0);X(()=>K(P,r(s))),d(m,x)},h=m=>{var x=cd();d(m,x)},f=m=>{var x=pd(),P=V(x),S=tt(P,!0),k=I(P,2),R=tt(k,!0),H=I(k,4),T=V(H);{var W=Y=>{var $=re();X(()=>K($,r(e).branch)),d(Y,$)},et=Y=>{var $=ud();d(Y,$)},G=Y=>{var $=dd();d(Y,$)};B(T,Y=>{r(e).branch?Y(W):r(e).repo?Y(et,1):Y(G,-1)})}z(H);var ut=I(H,4),lt=V(ut);{var J=Y=>{var $=hd();De($,21,()=>r(u),([it,Z])=>it,(it,Z)=>{var rt=w(()=>Ro(r(Z),2));let pt=()=>r(rt)[0],xt=()=>r(rt)[1];var kt=fd(),St=V(kt),Ft=tt(St,!0),se=I(St,2),en=tt(se,!0);z(kt),X(()=>{K(Ft,pt()),Zt(se,"href",xt()),K(en,xt())}),d(it,kt)}),z($),d(Y,$)},nt=Y=>{var $=vd(),it=tt($);X(()=>K(it,`.claude-mux.json: ${r(e).configError??""}`)),d(Y,$)},ct=Y=>{var $=gd(),it=I(E($),2);it.textContent='{ "urls": { "prod": "https://…", "dev": "http://localhost:5173" } }',d(Y,$)};B(lt,Y=>{r(u).length>0?Y(J):r(e).configError?Y(nt,1):Y(ct,-1)})}z(ut),z(x),X(()=>{K(S,r(e).repo?"Repository":"Directory"),Zt(k,"title",r(e).root),K(R,r(e).root)}),d(m,x)};B(p,m=>{r(s)?m(v):r(e)?m(f,-1):m(h,1)})}z(g),d(n,g),q()}const bd=Ji({base:"hover:text-foreground aria-pressed:bg-muted focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[state=on]:bg-muted gap-1 rounded-lg text-sm font-medium transition-all [&_svg:not([class*='size-'])]:size-4 group/toggle inline-flex items-center justify-center whitespace-nowrap outline-none hover:bg-muted focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",variants:{variant:{default:"bg-transparent",outline:"border-input hover:bg-muted border bg-transparent"},size:{default:"h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",sm:"h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-6 min-w-6 rounded-md px-1.5 text-[11px] [&_svg:not([class*='size-'])]:size-3",lg:"h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"}},defaultVariants:{variant:"default",size:"default"}});var wd=new Set(["$$slots","$$events","$$legacy","ref","pressed","class","size","variant"]);function He(n,t){U(t,!0);let e=b(t,"ref",15,null),s=b(t,"pressed",15,!1),o=b(t,"size",3,"default"),i=b(t,"variant",3,"default"),a=dt(t,wd);var l=F(),c=E(l);{let u=w(()=>te(bd({variant:i(),size:o()}),t.class));Lt(c,()=>nd,(g,p)=>{p(g,_t({"data-slot":"toggle",get class(){return r(u)}},()=>a,{get ref(){return e()},set ref(v){e(v)},get pressed(){return s()},set pressed(v){s(v)}}))})}d(n,l),q()}let _d=null;const ao={typescript:()=>ot(()=>import("./5pldp2kO.js"),[],import.meta.url),javascript:()=>ot(()=>import("./DUNaicwC.js"),[],import.meta.url),xml:()=>ot(()=>import("./FcirFJJ2.js"),[],import.meta.url),css:()=>ot(()=>import("./AVCICof-.js"),[],import.meta.url),scss:()=>ot(()=>import("./UZl0Ag-9.js"),[],import.meta.url),json:()=>ot(()=>import("./DdsocbVI.js"),[],import.meta.url),markdown:()=>ot(()=>import("./fzgiUVUV.js"),[],import.meta.url),python:()=>ot(()=>import("./C7NRPp2R.js"),[],import.meta.url),bash:()=>ot(()=>import("./I8pq0VWm.js"),[],import.meta.url),yaml:()=>ot(()=>import("./drsDnIKT.js"),[],import.meta.url),ini:()=>ot(()=>import("./B3BVgEsG.js"),[],import.meta.url),rust:()=>ot(()=>import("./DsMvwcVK.js"),[],import.meta.url),go:()=>ot(()=>import("./4VmnRw3R.js"),[],import.meta.url),sql:()=>ot(()=>import("./BC88IN-V.js"),[],import.meta.url),java:()=>ot(()=>import("./DUnkFH8J.js"),[],import.meta.url),kotlin:()=>ot(()=>import("./Za0-TyUR.js"),[],import.meta.url),c:()=>ot(()=>import("./D87IyN5J.js"),[],import.meta.url),cpp:()=>ot(()=>import("./BFCWVspj.js"),[],import.meta.url),ruby:()=>ot(()=>import("./CcVTKuP4.js"),[],import.meta.url),php:()=>ot(()=>import("./kjAv1gW4.js"),[],import.meta.url),swift:()=>ot(()=>import("./jkyvy0ac.js"),[],import.meta.url),lua:()=>ot(()=>import("./CD7o2Ci6.js"),[],import.meta.url),dockerfile:()=>ot(()=>import("./Co-AyC30.js"),[],import.meta.url),makefile:()=>ot(()=>import("./BoJC05FH.js"),[],import.meta.url)},xd=()=>_d??=ot(()=>import("./CtK-02SP.js"),[],import.meta.url).then(n=>n.default);async function Pd(n,t){if(!t||!ao[t])return null;const e=ao[t],s=await xd();return s.getLanguage(t)||s.registerLanguage(t,(await e()).default),n.map(o=>s.highlight(o,{language:t,ignoreIllegals:!0}).value)}var Sd=A('<span class="mono svelte-szf9n8"><span class="add svelte-szf9n8"> </span> <span class="del svelte-szf9n8"> </span></span>'),Ed=A(" <!>",1),lo=A('<span class="add svelte-szf9n8"> </span>'),co=A('<span class="del svelte-szf9n8"> </span>'),Ad=A(" <!> <!>",1),Od=A('<div class="turn-note svelte-szf9n8"><span class="prompt svelte-szf9n8"> </span> <!></div>'),Cd=A('<div class="turns svelte-szf9n8" role="group" aria-label="Turn"><!> <!></div> <!>',1),uo=A('<p class="msg err svelte-szf9n8"> </p>'),Td=A('<p class="msg svelte-szf9n8">Loading…</p>'),kd=A('<p class="msg svelte-szf9n8"> </p>'),Id=A('<span class="dim svelte-szf9n8">bin</span>'),Dd=A("<!> <!>",1),Rd=A('<button type="button"><span> </span> <span class="path svelte-szf9n8"><bdi> </bdi></span> <!></button>'),Ld=A('<span class="dim svelte-szf9n8"> </span>'),Fd=A('<p class="msg svelte-szf9n8">Binary file; no text diff.</p>'),Nd=A('<div class="hunk svelte-szf9n8"> </div>'),Md=A('<div class="gap svelte-szf9n8"> </div>'),zd=A('<div><span class="no svelte-szf9n8"> </span><span class="no svelte-szf9n8"> </span><span class="sign svelte-szf9n8"> </span><span class="code svelte-szf9n8"><!></span></div>'),Bd=A('<div class="lines svelte-szf9n8"></div>'),Vd=A('<p class="msg svelte-szf9n8">No line changes.</p>'),Wd=A('<div class="diff-head svelte-szf9n8"><button type="button" class="back svelte-szf9n8" aria-label="Back to files"><iconify-icon></iconify-icon></button> <span class="path svelte-szf9n8"> </span> <span class="sp svelte-szf9n8"></span> <!></div> <!>',3),Hd=A('<p class="msg svelte-szf9n8">That file has no change here.</p>'),jd=A('<div class="split svelte-szf9n8"><nav aria-label="Changed files" class="svelte-szf9n8"><!> <!></nav> <section class="diff svelte-szf9n8" aria-label="Diff"><!></section></div>'),Kd=A('<div><div class="bar svelte-szf9n8"><span class="title svelte-szf9n8"><!></span> <span class="sp svelte-szf9n8"></span> <div class="seg svelte-szf9n8" role="group" aria-label="Source"><!> <!></div></div> <!> <!> <div class="foot svelte-szf9n8"><kbd class="svelte-szf9n8">j</kbd>/<kbd class="svelte-szf9n8">k</kbd> next / previous file</div></div>');function Ud(n,t){U(t,!0);const e=w(()=>t.session?.id??null),s=w(()=>!!t.session?.git_root||t.session?.changes?.source==="git");let o=L(!1);const i=w(()=>t.params.source==="session"||t.params.source==="git"?t.params.source:r(s)?"git":"session"),a=w(()=>r(o)&&r(i)==="git"?"session":r(i));let l=L(null),c=L(null),u=L(!1),g=L(0),p=0,v=null;async function h(y,O){if(r(u)){v={id:y,src:O};return}const D=++p;_(u,!0);try{const M=await fetch(`/api/sessions/${encodeURIComponent(y)}/changes?source=${O}`),yt=await M.json();if(D!==p)return;if(M.status===404&&O==="git"){_(o,!0);return}if(!M.ok)throw new Error(yt.error??`HTTP ${M.status}`);_(l,yt,!0),No(g),_(c,null)}catch(M){D===p&&_(c,M instanceof Error?M.message:String(M),!0)}finally{D===p&&_(u,!1);const M=v;v=null,M&&h(M.id,M.src)}}const f=w(()=>`${t.session?.last_update??0}:${t.session?.changes?.additions??0}:${t.session?.changes?.deletions??0}:${t.session?.changes?.files??0}`);At(()=>{r(f),r(e)&&t.active&&h(r(e),r(a))});const m=w(()=>r(l)?.source===r(a)?r(l):null),x=w(()=>r(m)?.turns??[]),P=w(()=>r(a)==="session"&&t.params.turn!==void 0?r(x).find(y=>String(y.n)===t.params.turn)??null:null),S=w(()=>r(P)?r(P).files:r(m)?.files??[]),k=w(()=>r(m)?.root??t.session?.git_root??t.session?.cwd??null),R=w(()=>r(P)?Sr(r(S)):r(m)?.totals??Sr(r(S))),H=w(()=>r(x).map(y=>({...y,...Sr(y.files)})).reverse());let T=L(!1);const W=w(()=>{const y=[],O=[];for(const D of r(S))(ta(Tn(D.file,r(k)))?y:O).push(D);return{generated:y,kept:O}}),et=w(()=>r(T)?r(S):r(W).kept),G=w(()=>r(S).find(y=>y.file===t.params.file)??(t.params.file?null:r(et)[0]??null));function ut(y){t.setParams({file:y})}function lt(y){y!==r(a)&&t.setParams({source:y,turn:null,file:null})}function J(y){t.setParams({turn:y===null?null:String(y),file:null})}const nt="Before the first prompt";function ct(y){window.dispatchEvent(new CustomEvent("claude-mux:reveal-entry",{detail:{id:y}}))}let Y=L(null),$=L(null),it=0,Z=L(null);async function rt(y,O,D,M){const yt=++it,Wt=new URLSearchParams({source:O,file:D});M!==void 0&&Wt.set("turn",M??"");try{const Nt=await fetch(`/api/sessions/${encodeURIComponent(y)}/changes/diff?${Wt}`),mt=await Nt.json();if(yt!==it)return;if(!Nt.ok)throw new Error(mt.error??`HTTP ${Nt.status}`);_(Y,mt,!0),_($,null)}catch(Nt){yt===it&&(_(Y,null),_($,{file:D,message:Nt instanceof Error?Nt.message:String(Nt)},!0))}}const pt=w(()=>r(G)?`${r(a)}\0${r(G).file}\0${r(P)?`t${r(P).n}`:""}\0${r(g)}`:null);At(()=>{if(!r(pt)||!r(e)||!t.active)return;const y=r(e);ae(()=>{rt(y,r(a),r(G).file,r(P)?r(P).id:void 0)})});const xt=w(()=>r(Y)&&r(Y).file===r(G)?.file?r(Y):null),kt=w(()=>r($)?.file===r(G)?.file?r($).message:null),St=w(()=>r(xt)?$i(r(xt).hunks):[]),Ft=w(()=>r(xt)?.hunks.length??0),se={add:"+",del:"−",context:" "},en=4e3;At(()=>{if(_(Z,null),r(St).length===0||r(St).length>en)return;const y=r(St).map(M=>"text"in M?M.text:""),O=ae(()=>Qi(r(G).file));let D=!1;return Pd(y,O).then(M=>{!D&&M&&_(Z,M,!0)}),()=>D=!0}),At(()=>{t.setActions([{icon:"mdi:refresh",label:"Reload",disabled:!r(e)||r(u),run:()=>r(e)&&void h(r(e),r(a))}])});function nn(y){if(!t.active||y.defaultPrevented||y.ctrlKey||y.metaKey||y.altKey||y.key!=="j"&&y.key!=="k"||y.target?.closest('input, textarea, select, [contenteditable=""], [contenteditable="true"]')||r(et).length===0)return;const D=r(G)?r(et).findIndex(yt=>yt.file===r(G).file):-1,M=y.key==="j"?Math.min(D+1,r(et).length-1):Math.max(D-1,0);y.preventDefault(),ut(r(et)[M].file),document.querySelector(`[data-change-file="${CSS.escape(r(et)[M].file)}"]`)?.scrollIntoView({block:"nearest"})}var oe=Kd();Fo("keydown",Gi,nn);let Pe;var Re=V(oe),Be=V(Re),Se=V(Be);{var vn=y=>{var O=Ed(),D=E(O),M=I(D);{var yt=Wt=>{var Nt=Sd(),mt=V(Nt),ht=tt(mt),vt=I(mt,2),j=tt(vt);z(Nt),X(()=>{K(ht,`+${r(R).additions??""}`),K(j,`−${r(R).deletions??""}`)}),d(Wt,Nt)};B(M,Wt=>{(r(R).additions||r(R).deletions)&&Wt(yt)})}X(()=>K(D,`${r(S).length??""} ${r(S).length===1?"file":"files"} changed `)),d(y,O)},N=y=>{var O=re("Changes");d(y,O)};B(Se,y=>{r(m)?y(vn):y(N,-1)})}z(Be);var st=I(Be,4),ft=V(st),Et=()=>r(a)==="git",Rt=y=>y&&lt("git");{let y=w(()=>r(o)?"Not a git repository":"What git sees in the working tree now");He(ft,{size:"sm",get pressed(){return Et()},set pressed(O){Rt(O)},get disabled(){return r(o)},get title(){return r(y)},children:(O,D)=>{Yt();var M=re("Current · git");d(O,M)},$$slots:{default:!0}})}var Ee=I(ft,2),Ae=()=>r(a)==="session",Ve=y=>y&&lt("session");He(Ee,{size:"sm",get pressed(){return Ae()},set pressed(y){Ve(y)},title:"The edits this session's tools made",children:(y,O)=>{Yt();var D=re("Session");d(y,D)},$$slots:{default:!0}}),z(st),z(Re);var ue=I(Re,2);{var Vt=y=>{var O=Cd(),D=E(O),M=V(D),yt=()=>!r(P),Wt=vt=>vt&&J(null);He(M,{variant:"outline",size:"sm",class:"chip",get pressed(){return yt()},set pressed(vt){Wt(vt)},children:(vt,j)=>{Yt();var Q=re("All turns");d(vt,Q)},$$slots:{default:!0}});var Nt=I(M,2);De(Nt,17,()=>r(H),vt=>vt.n,(vt,j)=>{var Q=()=>r(P)?.n===r(j).n,It=bt=>bt&&J(r(j).n);{let bt=w(()=>r(j).prompt||nt);He(vt,{variant:"outline",size:"sm",class:"chip",get title(){return r(bt)},get pressed(){return Q()},set pressed(Ct){It(Ct)},children:(Ct,Dt)=>{Yt();var zt=Ad(),Ht=E(zt),fe=I(Ht);{var pe=Gt=>{var qt=lo(),Tt=tt(qt);X(()=>K(Tt,`+${r(j).additions??""}`)),d(Gt,qt)};B(fe,Gt=>{r(j).additions&&Gt(pe)})}var Ce=I(fe,2);{var Te=Gt=>{var qt=co(),Tt=tt(qt);X(()=>K(Tt,`−${r(j).deletions??""}`)),d(Gt,qt)};B(Ce,Gt=>{r(j).deletions&&Gt(Te)})}X(()=>K(Ht,`${r(j).n===0?"Start":`Turn ${r(j).n}`} `)),d(Ct,zt)},$$slots:{default:!0}})}}),z(D);var mt=I(D,2);{var ht=vt=>{var j=Od(),Q=V(j),It=tt(Q,!0),bt=I(Q,2);{var Ct=Dt=>{const zt=w(()=>r(P).id);ln(Dt,{variant:"link",size:"sm",class:"link",onclick:()=>ct(r(zt)),children:(Ht,fe)=>{Yt();var pe=re("Show in transcript");d(Ht,pe)},$$slots:{default:!0}})};B(bt,Dt=>{r(P).id&&Dt(Ct)})}z(j),X(()=>{Zt(Q,"title",r(P).prompt),K(It,r(P).prompt||nt)}),d(vt,j)};B(mt,vt=>{r(P)&&vt(ht)})}d(y,O)};B(ue,y=>{r(a)==="session"&&r(x).length>0&&y(Vt)})}var ee=I(ue,2);{var Xt=y=>{var O=uo(),D=tt(O,!0);X(()=>K(D,r(c))),d(y,O)},ye=y=>{var O=Td();d(y,O)},de=y=>{var O=kd(),D=tt(O,!0);X(()=>K(D,r(a)==="git"?"The working tree is clean.":"This session has not edited any files yet.")),d(y,O)},Oe=y=>{var O=jd(),D=V(O),M=V(D);De(M,17,()=>r(et),j=>j.file,(j,Q)=>{const It=w(()=>ea(r(Q)));var bt=Rd();let Ct;var Dt=V(bt),zt=tt(Dt,!0),Ht=I(Dt,2),fe=V(Ht),pe=tt(fe,!0);z(Ht);var Ce=I(Ht,2);{var Te=qt=>{var Tt=Id();d(qt,Tt)},Gt=qt=>{var Tt=Dd(),Qt=E(Tt);{var We=Mt=>{var jt=lo(),he=tt(jt);X(()=>K(he,`+${r(Q).additions??""}`)),d(Mt,jt)};B(Qt,Mt=>{r(Q).additions&&Mt(We)})}var gt=I(Qt,2);{var Pt=Mt=>{var jt=co(),he=tt(jt);X(()=>K(he,`−${r(Q).deletions??""}`)),d(Mt,jt)};B(gt,Mt=>{r(Q).deletions&&Mt(Pt)})}d(qt,Tt)};B(Ce,qt=>{r(Q).binary?qt(Te):qt(Gt,-1)})}z(bt),X((qt,Tt)=>{Ct=$t(bt,1,"file svelte-szf9n8",null,Ct,{on:r(G)?.file===r(Q).file,untracked:r(Q).untracked}),Zt(bt,"aria-current",r(G)?.file===r(Q).file?"true":void 0),Zt(bt,"data-change-file",r(Q).file),Zt(bt,"title",r(Q).oldPath?`${r(Q).oldPath} → ${r(Q).file}`:r(Q).file),$t(Dt,1,`st st-${qt??""}`,"svelte-szf9n8"),K(zt,r(It)),K(pe,Tt)},[()=>r(It)==="?"?"u":r(It).toLowerCase(),()=>Tn(r(Q).file,r(k))]),Ie("click",bt,()=>ut(r(Q).file)),d(j,bt)});var yt=I(M,2);{var Wt=j=>{ln(j,{variant:"ghost",size:"sm",class:"more",onclick:()=>_(T,!r(T)),children:(Q,It)=>{Yt();var bt=re();X(()=>K(bt,r(T)?"Hide generated":`+ ${r(W).generated.length} generated (show)`)),d(Q,bt)},$$slots:{default:!0}})};B(yt,j=>{r(W).generated.length>0&&j(Wt)})}z(D);var Nt=I(D,2),mt=V(Nt);{var ht=j=>{var Q=Wd(),It=E(Q),bt=V(It),Ct=V(bt);ne(Ct,"icon","mdi:arrow-left"),z(bt);var Dt=I(bt,2),zt=tt(Dt,!0),Ht=I(Dt,4);{var fe=Tt=>{var Qt=Ld(),We=tt(Qt);X(()=>K(We,`${r(Ft)??""} ${r(Ft)===1?"hunk":"hunks"}`)),d(Tt,Qt)};B(Ht,Tt=>{r(Ft)&&Tt(fe)})}z(It);var pe=I(It,2);{var Ce=Tt=>{var Qt=uo(),We=tt(Qt,!0);X(()=>K(We,r(kt))),d(Tt,Qt)},Te=Tt=>{var Qt=Fd();d(Tt,Qt)},Gt=Tt=>{var Qt=Bd();De(Qt,21,()=>r(St),jn,(We,gt,Pt)=>{var Mt=F(),jt=E(Mt);{var he=ce=>{var Bt=Nd(),Le=tt(Bt,!0);X(()=>K(Le,r(gt).header)),d(ce,Bt)},Ge=ce=>{var Bt=Md(),Le=tt(Bt);X(()=>K(Le,`⋯ ${r(gt).count??""} unchanged ${r(gt).count===1?"line":"lines"} ⋯`)),d(ce,Bt)},gn=ce=>{var Bt=zd(),Le=V(Bt),be=tt(Le,!0),Ye=I(Le),zn=tt(Ye,!0),pn=I(Ye),yr=tt(pn,!0),Pn=I(pn),br=V(Pn);{var wr=me=>{var ke=F(),xr=E(ke);zo(xr,()=>r(Z)[Pt]),d(me,ke)},_r=me=>{var ke=re();X(()=>K(ke,r(gt).text)),d(me,ke)};B(br,me=>{r(Z)?.[Pt]!=null?me(wr):me(_r,-1)})}z(Pn),z(Bt),X(()=>{$t(Bt,1,`ln ${r(gt).type??""}`,"svelte-szf9n8"),K(be,r(gt).old??""),K(zn,r(gt).new??""),K(yr,se[r(gt).type])}),d(ce,Bt)};B(jt,ce=>{r(gt).type==="hunk"?ce(he):r(gt).type==="gap"?ce(Ge,1):ce(gn,-1)})}d(We,Mt)}),z(Qt),d(Tt,Qt)},qt=Tt=>{var Qt=Vd();d(Tt,Qt)};B(pe,Tt=>{r(kt)?Tt(Ce):r(xt)?.binary?Tt(Te,1):r(St).length>0?Tt(Gt,2):r(Y)&&Tt(qt,3)})}X(Tt=>{Zt(Dt,"title",r(G).file),K(zt,Tt)},[()=>Tn(r(G).file,r(k))]),Ie("click",bt,()=>t.setParams({file:null})),d(j,Q)},vt=j=>{var Q=Hd();d(j,Q)};B(mt,j=>{r(G)?j(ht):j(vt,-1)})}z(Nt),z(O),d(y,O)};B(ee,y=>{r(c)&&!r(m)?y(Xt):r(m)?r(S).length===0?y(de,2):y(Oe,-1):y(ye,1)})}Yt(2),z(oe),X(()=>Pe=$t(oe,1,"changes svelte-szf9n8",null,Pe,{picked:!!t.params.file})),d(n,oe),q()}Lo(["click"]);function mv(...n){return n.filter(Boolean).join(" ")}const qd=typeof document<"u";let Xd=0;function fo(n){return typeof n?.id=="number"||typeof n?.id=="string"&&n.id.length>0?n.id:Xd++}class Gd{#t=L(le([]));get toasts(){return r(this.#t)}set toasts(t){_(this.#t,t,!0)}#e=L(le([]));get heights(){return r(this.#e)}set heights(t){_(this.#e,t,!0)}#n=new Map;#r=t=>{const e=this.toasts.findIndex(s=>s.id===t);return e===-1?null:e};#s=t=>this.heights.findIndex(e=>e.toastId===t);addToast=t=>{qd&&this.toasts.unshift(t)};updateToast=({id:t,data:e,type:s,message:o})=>{const i=this.toasts.findIndex(l=>l.id===t),a=this.toasts[i];this.toasts[i]={...a,...e,id:t,title:o,type:s,dismiss:!1,delete:!1,updated:!0}};markDismissed=t=>{const e=this.#r(t);if(e===null)return;const s=this.toasts[e];s&&(!s.dismiss||!s.delete)&&(this.toasts[e]={...s,dismiss:!0,delete:!0})};scheduleRemoval=(t,e)=>{this.cancelRemoval(t),this.#n.set(t,setTimeout(()=>{this.#n.delete(t),this.remove(t)},e))};cancelRemoval=t=>{const e=this.#n.get(t);e!==void 0&&(clearTimeout(e),this.#n.delete(t))};create=t=>{const{message:e,...s}=t,o=fo(t),i=t.dismissible!==void 0?t.dismissible:t.dismissable!==void 0?t.dismissable:!0,a=t.type===void 0?"default":t.type;return ae(()=>{this.cancelRemoval(o);const l=this.toasts.find(c=>c.id===o);l?.dismiss||l?.delete?(this.remove(o),this.addToast({...s,id:o,title:e,dismissible:i,type:a,updated:!0})):l?this.updateToast({id:o,data:t,type:a,message:e,dismissible:i}):this.addToast({...s,id:o,title:e,dismissible:i,type:a})}),o};dismiss=t=>(ae(()=>{if(t===void 0){this.toasts=this.toasts.map(s=>s.dismiss?s:{...s,dismiss:!0});return}const e=this.toasts.findIndex(s=>s.id===t);this.toasts[e]&&(this.toasts[e]={...this.toasts[e],dismiss:!0})}),t);remove=t=>{if(t===void 0){this.toasts=[];return}const e=this.#r(t);if(e!==null)return this.toasts.splice(e,1),t};message=(t,e)=>this.create({...e,type:"default",message:t});error=(t,e)=>this.create({...e,type:"error",message:t});success=(t,e)=>this.create({...e,type:"success",message:t});info=(t,e)=>this.create({...e,type:"info",message:t});warning=(t,e)=>this.create({...e,type:"warning",message:t});loading=(t,e)=>this.create({...e,type:"loading",message:t});promise=(t,e)=>{if(!e)return;let s;e.loading!==void 0&&(s=this.create({...e,promise:t,type:"loading",message:typeof e.loading=="string"?e.loading:e.loading()}));const o=t instanceof Promise?t:t();let i=s!==void 0;return o.then(a=>{if(typeof a=="object"&&a&&"ok"in a&&typeof a.ok=="boolean"&&!a.ok){i=!1;const l=Yd(a);this.create({id:s,type:"error",message:l})}else if(e.success!==void 0){i=!1;const l=typeof e.success=="function"?e.success(a):e.success;this.create({id:s,type:"success",message:l})}}).catch(a=>{if(e.error!==void 0){i=!1;const l=typeof e.error=="function"?e.error(a):e.error;this.create({id:s,type:"error",message:l})}}).finally(()=>{i&&(this.dismiss(s),s=void 0),e.finally?.()}),s};custom=(t,e)=>{const s=fo(e);return this.create({component:t,...e,id:s}),s};removeHeight=t=>{this.heights=this.heights.filter(e=>e.toastId!==t)};setHeight=t=>{ae(()=>{const e=this.#s(t.toastId);if(e!==-1){this.heights[e]=t;return}const s=new Map(this.toasts.map((a,l)=>[a.id,l])),o=s.get(t.toastId)??-1,i=this.heights.findIndex(a=>(s.get(a.toastId)??1/0)>o);i===-1?this.heights.push(t):this.heights.splice(i,0,t)})};reset=()=>{this.toasts=[],this.heights=[],this.#n.forEach(t=>clearTimeout(t)),this.#n.clear()}}function Yd(n){return n&&typeof n=="object"&&"status"in n?`HTTP error! Status: ${n.status}`:`Error! ${n}`}const we=new Gd;function Zd(n,t){return we.message(n,t)}class yv{#t=w(()=>we.toasts.filter(t=>!t.dismiss));get toasts(){return r(this.#t)}}const Jd=Zd,Dn=Object.assign(Jd,{success:we.success,info:we.info,warning:we.warning,error:we.error,custom:we.custom,message:we.message,promise:we.promise,dismiss:we.dismiss,loading:we.loading,getActiveToasts:()=>we.toasts.filter(n=>!n.dismiss)}),ho={typescript:()=>ot(()=>import("./BPQ3VLAy.js"),[],import.meta.url),tsx:()=>ot(()=>import("./COt5Ahok.js"),[],import.meta.url),javascript:()=>ot(()=>import("./wDzz0qaB.js"),[],import.meta.url),jsx:()=>ot(()=>import("./g9-lgVsj.js"),[],import.meta.url),svelte:()=>ot(()=>import("./ZLvUvyim.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),html:()=>ot(()=>import("./CnnebwVN.js"),__vite__mapDeps([4,1,3]),import.meta.url),xml:()=>ot(()=>import("./B8PEiB0p.js"),[],import.meta.url),css:()=>ot(()=>import("./DPfMkruS.js"),[],import.meta.url),scss:()=>ot(()=>import("./2EtD6e53.js"),__vite__mapDeps([5,3]),import.meta.url),json:()=>ot(()=>import("./Cp-IABpG.js"),[],import.meta.url),jsonc:()=>ot(()=>import("./Des-eS-w.js"),[],import.meta.url),markdown:()=>ot(()=>import("./Cvjx9yec.js"),[],import.meta.url),python:()=>ot(()=>import("./B6aJPvgy.js"),[],import.meta.url),shellscript:()=>ot(()=>import("./Yzrsuije.js"),[],import.meta.url),yaml:()=>ot(()=>import("./Buea-lGh.js"),[],import.meta.url),toml:()=>ot(()=>import("./vGWfd6FD.js"),[],import.meta.url),rust:()=>ot(()=>import("./B1yitclQ.js"),[],import.meta.url),go:()=>ot(()=>import("./CxLEBnE3.js"),[],import.meta.url),sql:()=>ot(()=>import("./BLtJtn59.js"),[],import.meta.url),diff:()=>ot(()=>import("./D97Zzqfu.js"),[],import.meta.url),docker:()=>ot(()=>import("./BcOcwvcX.js"),[],import.meta.url),make:()=>ot(()=>import("./CHLpvVh8.js"),[],import.meta.url)},Qd="github-dark-default",$d=4e5;let tf=null;function ef(){return tf??=(async()=>{const[{createHighlighterCore:n},{createJavaScriptRegexEngine:t},e]=await Promise.all([ot(()=>import("./CnFijtjd.js"),[],import.meta.url),ot(()=>import("./EOHkDYMB.js"),[],import.meta.url),ot(()=>import("./Cuk6v7N8.js"),[],import.meta.url)]);return n({themes:[e.default],langs:[],engine:t()})})()}async function nf(n,t){if(!t||!ho[t]||n.length>$d)return null;const e=await ef();return e.getLoadedLanguages().includes(t)||await e.loadLanguage((await ho[t]()).default),e.codeToTokens(n,{lang:t,theme:Qd}).tokens}const vo=or("claude-mux-files-pane",{});class rf{#t=L(le(vo.load()));get state(){return r(this.#t)}set state(t){_(this.#t,t,!0)}get(t){return t&&this.state[t]||{}}update(t,e){t&&(this.state[t]={...this.state[t],...e},vo.save(this.state))}}const yn=new rf;var go=A('<div class="note svelte-unol26">Loading…</div>'),po=A('<div class="note err svelte-unol26"> </div>'),sf=A('<div class="note svelte-unol26"> </div>'),of=A("<!> <!>",1),mo=A("<iconify-icon></iconify-icon>",2),af=A('<button type="button"><iconify-icon></iconify-icon> <iconify-icon></iconify-icon> <span class="name svelte-unol26"> </span> <!></button> <!>',3),lf=A('<button type="button"><span class="chev svelte-unol26"></span> <iconify-icon></iconify-icon> <span class="name svelte-unol26"> </span> <!></button>',2),cf=A('<div class="search svelte-unol26"><iconify-icon></iconify-icon> <!></div>',2),uf=A('<div class="note svelte-unol26">No file matches.</div>'),df=A('<button type="button"><span class="name svelte-unol26"> </span> <span class="dirname svelte-unol26"><bdi> </bdi></span></button>'),ff=A('<div class="root svelte-unol26"> </div>'),hf=A('<button type="button" class="more svelte-unol26"> </button>'),vf=A("<!> <!> <!>",1),gf=A('<span class="dim size svelte-unol26"> </span>'),pf=A('<div class="seg svelte-unol26" role="group" aria-label="Markdown view"><!> <!></div>'),mf=A('<div class="banner svelte-unol26"> </div>'),yf=A('<p class="msg svelte-unol26">Loading…</p>'),bf=A("<p> </p>"),wf=A('<div class="image svelte-unol26"><img class="svelte-unol26"/></div>'),_f=A('<div class="md markdown svelte-unol26"></div>'),xf=A('<p class="msg svelte-unol26">Empty file.</p>'),Pf=A("<span> </span>"),Sf=A('<div><button type="button" class="no svelte-unol26" tabindex="-1"> </button> <span class="src svelte-unol26"><!></span></div>'),Ef=A('<div class="chunk svelte-unol26"></div>'),Af=A('<div class="code svelte-unol26"></div>'),Of=A('<section class="viewer svelte-unol26" aria-label="File"><div class="vhead svelte-unol26"><button type="button" class="icon back svelte-unol26" aria-label="Back to files"><iconify-icon></iconify-icon></button> <span class="path svelte-unol26"><bdi> </bdi></span> <!> <!> <button type="button" class="icon svelte-unol26" title="Copy path" aria-label="Copy path"><iconify-icon></iconify-icon></button> <button type="button" class="icon svelte-unol26" title="Mention in composer" aria-label="Mention in composer"><iconify-icon></iconify-icon></button> <button type="button" class="icon wide-only svelte-unol26" title="Close file" aria-label="Close file"><iconify-icon></iconify-icon></button></div> <!> <!></section>',2),Cf=A('<div><nav aria-label="Project files" class="svelte-unol26"><!> <div class="list svelte-unol26"><!></div></nav> <!></div>');function Tf(n,t){U(t,!0);const e=(y,O=wt,D=wt)=>{const M=w(()=>r(u)[O()]);var yt=F(),Wt=E(yt);{var Nt=vt=>{var j=go();let Q;X(()=>Q=Ze(j,"",Q,{"--depth":D()})),d(vt,j)},mt=vt=>{var j=po();let Q;var It=tt(j,!0);X(()=>{Q=Ze(j,"",Q,{"--depth":D()}),K(It,r(M).error)}),d(vt,j)},ht=vt=>{var j=of(),Q=E(j);De(Q,17,()=>r(M).entries,Ct=>Ct.path,(Ct,Dt)=>{s(Ct,()=>r(Dt),D)});var It=I(Q,2);{var bt=Ct=>{var Dt=sf();let zt;var Ht=tt(Dt,!0);X(()=>{zt=Ze(Dt,"",zt,{"--depth":D()}),K(Ht,r(M).hidden?`${r(M).hidden} ignored`:"Empty")}),d(Ct,Dt)};B(It,Ct=>{r(M).entries.length===0&&Ct(bt)})}d(vt,j)};B(Wt,vt=>{r(M)==="loading"||r(M)===void 0?vt(Nt):"error"in r(M)?vt(mt,1):vt(ht,-1)})}d(y,yt)},s=(y,O=wt,D=wt)=>{var M=F(),yt=E(M);{var Wt=mt=>{const ht=w(()=>r(c).has(O().path));var vt=af(),j=E(vt);let Q,It;var bt=V(j);let Ct;ne(bt,"icon","mdi:chevron-right");var Dt=I(bt,2);$t(Dt,1,"ico svelte-unol26"),X(()=>ne(Dt,"icon",r(ht)?"mdi:folder-open-outline":"mdi:folder-outline"));var zt=I(Dt,2),Ht=tt(zt,!0),fe=I(zt,2);{var pe=Gt=>{var qt=mo();$t(qt,1,"link svelte-unol26"),ne(qt,"icon","mdi:link-variant"),d(Gt,qt)};B(fe,Gt=>{O().link&&Gt(pe)})}z(j);var Ce=I(j,2);{var Te=Gt=>{e(Gt,()=>O().path,()=>D()+1)};B(Ce,Gt=>{r(ht)&&Gt(Te)})}X(()=>{Q=$t(j,1,"item dir svelte-unol26",null,Q,{ignored:O().ignored}),Zt(j,"aria-expanded",r(ht)),Zt(j,"title",O().path),It=Ze(j,"",It,{"--depth":D()}),Ct=$t(bt,1,"chev svelte-unol26",null,Ct,{open:r(ht)}),K(Ht,O().name)}),Ie("click",j,()=>P(O().path,!r(ht))),d(mt,vt)},Nt=mt=>{var ht=lf();let vt,j;var Q=I(V(ht),2);$t(Q,1,"ico svelte-unol26"),ne(Q,"icon","mdi:file-outline");var It=I(Q,2),bt=tt(It,!0),Ct=I(It,2);{var Dt=zt=>{var Ht=mo();$t(Ht,1,"link svelte-unol26"),ne(Ht,"icon","mdi:link-variant"),d(zt,Ht)};B(Ct,zt=>{O().link&&zt(Dt)})}z(ht),X(()=>{vt=$t(ht,1,"item file svelte-unol26",null,vt,{ignored:O().ignored,on:r(nt)===O().path}),Zt(ht,"aria-current",r(nt)===O().path?"true":void 0),Zt(ht,"title",O().path),j=Ze(ht,"",j,{"--depth":D()}),K(bt,O().name)}),Ie("click",ht,()=>ct(O().path)),d(mt,ht)};B(yt,mt=>{O().type==="dir"?mt(Wt):mt(Nt,-1)})}d(y,M)},o=w(()=>t.session?.id??null),i=w(()=>r(o)?`/api/sessions/${encodeURIComponent(r(o))}/files`:null),a=w(()=>yn.get(r(o))),l=w(()=>r(a).showIgnored===!0),c=w(()=>new Set((r(a).expanded??[]).filter(y=>y&&!y.startsWith("/"))));let u=L(le({})),g=0;async function p(y){if(!r(i))return;const O=g;r(u)[y]="loading";const D=new URLSearchParams({dir:y});r(l)&&D.set("ignored","1");try{const M=await fetch(`${r(i)}/tree?${D}`),yt=await M.json();if(O!==g)return;r(u)[y]=M.ok?yt:{error:yt.error??`HTTP ${M.status}`}}catch(M){O===g&&(r(u)[y]={error:M instanceof Error?M.message:String(M)})}}function v(){g++,_(u,{},!0),p("");for(const y of r(c))p(y)}const h=w(()=>{const y=r(u)[""];return y&&y!=="loading"&&"entries"in y?y:null}),f=w(()=>r(h)?.root??null),m=w(()=>r(h)?.repo??!1);let x=null;At(()=>{const y=`${r(i)}\0${r(l)}`;!t.active||!r(i)||y===x||(x=y,ae(v))});function P(y,O){const D=new Set(r(c));O?D.add(y):D.delete(y),yn.update(r(o),{expanded:[...D]}),O&&!r(u)[y]&&p(y)}function S(){yn.update(r(o),{showIgnored:!r(l)})}const k=w(()=>t.params.file?Tn(t.params.file,r(f)):null),R=w(()=>{const y=Number(t.params.line);return Number.isInteger(y)&&y>0?y:null});let H=!1;At(()=>{if(!t.active||H)return;H=!0;const y=ae(()=>r(a).file);!t.params.file&&y&&t.setParams({file:y})});let T=L(null),W=0;async function et(y){if(!r(i))return;const O=++W;try{const D=await fetch(`${r(i)}/read?${new URLSearchParams({path:y})}`),M=await D.json();if(O!==W)return;if(!D.ok){_(T,{path:y,error:M.error??`HTTP ${D.status}`,binary:M.binary===!0},!0);return}const yt=M;_(T,{path:y,read:yt},!0),yt.path!==y&&(G=`${yt.path}\0${t.params.line??""}`,t.setParams({file:yt.path})),ut(yt.path),yn.update(r(o),{file:yt.path})}catch(D){O===W&&_(T,{path:y,error:D instanceof Error?D.message:String(D)},!0)}}let G=null;At(()=>{const y=r(k);if(!y||!t.active)return;const O=`${y}\0${t.params.line??""}`;O!==G&&(G=O,ae(()=>{et(y)}))});function ut(y){const O=sa(y).filter(D=>!r(c).has(D));if(O.length!==0){yn.update(r(o),{expanded:[...r(c),...O]});for(const D of O)r(u)[D]||p(D)}}const lt=w(()=>r(T)&&r(k)&&(r(T).path===r(k)||"read"in r(T)&&r(T).read.path===r(k))?r(T):null),J=w(()=>r(lt)&&"read"in r(lt)?r(lt).read:null),nt=w(()=>r(J)?.path??r(k));function ct(y,O){t.setParams({file:y,line:null},{push:!0})}function Y(){yn.update(r(o),{file:void 0}),t.setParams({file:null,line:null})}let $=L(!1);const it=w(()=>r(J)?.kind==="text"&&oa(r(J).path)),Z=w(()=>r(it)&&!r($)&&r(R)===null),rt=w(()=>r(J)?.kind==="text"?r(J).text.replace(/\n$/,"").split(`
7
7
  `):[]);let pt=L(null);At(()=>{if(_(pt,null),r(J)?.kind!=="text"||r(Z))return;const{text:y,path:O}=r(J);let D=!1;return nf(y,na(O)).then(M=>{D||_(pt,M,!0)}),()=>D=!0});const xt=200,kt=w(()=>Array.from({length:Math.ceil(r(rt).length/xt)},(y,O)=>O*xt));let St=L(null);At(()=>{const y=r(R);!y||!r(St)||r(rt).length===0||(r(pt),requestAnimationFrame(()=>r(St)?.querySelector(`[data-line="${y}"]`)?.scrollIntoView({block:"center"})))});function Ft(y){t.setParams({line:r(R)===y?null:String(y)})}async function se(){if(!r(nt))return;const y=r(R)?`${r(nt)}:${r(R)}`:r(nt);try{await navigator.clipboard.writeText(y),Dn.success("Path copied",{description:y})}catch{Dn.error("Could not copy the path")}}function en(){if(!r(nt)||!r(f))return;const y=`${r(f)}/${r(nt)}`,O=t.session?.cwd??r(f);t.mention(`@${O===r(f)?r(nt):Tn(y,O)}`)}function nn(y){return y<1024?`${y} B`:y<1024*1024?`${(y/1024).toFixed(1)} KB`:`${(y/1024/1024).toFixed(1)} MB`}let oe=L(""),Pe=L(null),Re=L(null),Be=!1,Se=L(0);async function vn(){if(!(r(Pe)||Be||!r(i))){Be=!0,_(Re,null);try{const y=await fetch(`${r(i)}/list`),O=await y.json();if(!y.ok)throw new Error(O.error??`HTTP ${y.status}`);_(Pe,O.files,!0)}catch(y){_(Re,y instanceof Error?y.message:String(y),!0)}finally{Be=!1}}}const N=w(()=>r(oe).trim()&&r(Pe)?ra(r(oe),r(Pe)):[]);At(()=>{r(N),_(Se,0)});function st(y){_(oe,""),ct(y)}function ft(y){if(y.key==="ArrowDown"||y.key==="ArrowUp"){y.preventDefault();const O=r(N).length;O&&_(Se,(r(Se)+(y.key==="ArrowDown"?1:O-1))%O),document.querySelector(`[data-result="${r(Se)}"]`)?.scrollIntoView({block:"nearest"})}else y.key==="Enter"&&r(N)[r(Se)]?(y.preventDefault(),st(r(N)[r(Se)])):y.key==="Escape"&&r(oe)&&(y.preventDefault(),y.stopPropagation(),_(oe,""))}At(()=>{t.setActions([...r(m)?[{icon:r(l)?"mdi:eye-outline":"mdi:eye-off-outline",label:r(l)?"Hide ignored files":"Show ignored files",pressed:r(l),run:S}]:[],{icon:"mdi:refresh",label:"Reload",disabled:!r(o),run:()=>{_(Pe,null),r(oe).trim()&&vn(),v(),r(k)&&et(r(k))}}])});var Et=Cf();let Rt;var Ee=V(Et),Ae=V(Ee);{var Ve=y=>{var O=cf(),D=V(O);ne(D,"icon","mdi:magnify");var M=I(D,2);Vr(M,{type:"search",placeholder:"Go to file…","aria-label":"Go to file",autocomplete:"off",spellcheck:!1,onfocus:vn,onkeydown:ft,get value(){return r(oe)},set value(yt){_(oe,yt,!0)}}),z(O),d(y,O)};B(Ae,y=>{r(m)&&y(Ve)})}var ue=I(Ae,2),Vt=V(ue);{var ee=y=>{var O=F(),D=E(O);{var M=mt=>{var ht=po(),vt=tt(ht,!0);X(()=>K(vt,r(Re))),d(mt,ht)},yt=mt=>{var ht=go();d(mt,ht)},Wt=mt=>{var ht=uf();d(mt,ht)},Nt=mt=>{var ht=F(),vt=E(ht);De(vt,18,()=>r(N),j=>j,(j,Q,It)=>{var bt=df();let Ct;var Dt=V(bt),zt=tt(Dt,!0),Ht=I(Dt,2),fe=V(Ht),pe=tt(fe,!0);z(Ht),z(bt),X((Ce,Te)=>{Ct=$t(bt,1,"item result svelte-unol26",null,Ct,{on:r(It)===r(Se)}),Zt(bt,"data-result",r(It)),Zt(bt,"title",Q),K(zt,Ce),K(pe,Te)},[()=>Q.split("/").pop(),()=>Q.split("/").slice(0,-1).join("/")]),Ie("click",bt,()=>st(Q)),d(j,bt)}),d(mt,ht)};B(D,mt=>{r(Re)?mt(M):r(Pe)?r(N).length===0?mt(Wt,2):mt(Nt,-1):mt(yt,1)})}d(y,O)},Xt=w(()=>r(oe).trim()),ye=y=>{var O=vf(),D=E(O);{var M=mt=>{var ht=ff(),vt=tt(ht,!0);X(j=>{Zt(ht,"title",r(f)),K(vt,j)},[()=>r(f).split("/").pop()||r(f)]),d(mt,ht)};B(D,mt=>{r(f)&&mt(M)})}var yt=I(D,2);e(yt,()=>"",()=>0);var Wt=I(yt,2);{var Nt=mt=>{var ht=hf(),vt=tt(ht);X(()=>K(vt,`+ ${r(h).hidden??""} ignored at the top level (show)`)),Ie("click",ht,S),d(mt,ht)};B(Wt,mt=>{r(h)&&!r(l)&&r(h).hidden>0&&mt(Nt)})}d(y,O)};B(Vt,y=>{r(Xt)?y(ee):y(ye,-1)})}z(ue),z(Ee);var de=I(Ee,2);{var Oe=y=>{var O=Of(),D=V(O),M=V(D),yt=V(M);ne(yt,"icon","mdi:arrow-left"),z(M);var Wt=I(M,2),Nt=V(Wt),mt=tt(Nt,!0);z(Wt);var ht=I(Wt,2);{var vt=gt=>{var Pt=gf(),Mt=tt(Pt,!0);X(jt=>K(Mt,jt),[()=>nn(r(J).size)]),d(gt,Pt)};B(ht,gt=>{r(J)&&gt(vt)})}var j=I(ht,2);{var Q=gt=>{var Pt=pf(),Mt=V(Pt),jt=()=>r(Z),he=Bt=>{Bt&&(_($,!1),t.setParams({line:null}))};He(Mt,{size:"sm",get pressed(){return jt()},set pressed(Bt){he(Bt)},children:(Bt,Le)=>{Yt();var be=re("Preview");d(Bt,be)},$$slots:{default:!0}});var Ge=I(Mt,2),gn=()=>!r(Z),ce=Bt=>Bt&&_($,!0);He(Ge,{size:"sm",get pressed(){return gn()},set pressed(Bt){ce(Bt)},children:(Bt,Le)=>{Yt();var be=re("Source");d(Bt,be)},$$slots:{default:!0}}),z(Pt),d(gt,Pt)};B(j,gt=>{r(it)&&gt(Q)})}var It=I(j,2),bt=V(It);ne(bt,"icon","mdi:content-copy"),z(It);var Ct=I(It,2),Dt=V(Ct);ne(Dt,"icon","mdi:at"),z(Ct);var zt=I(Ct,2),Ht=V(zt);ne(Ht,"icon","mdi:close"),z(zt),z(D);var fe=I(D,2);{var pe=gt=>{var Pt=mf(),Mt=tt(Pt);X((jt,he)=>K(Mt,`Truncated at 1 MB: showing the first ${jt??""} of ${he??""}.`),[()=>nn(r(J).shown),()=>nn(r(J).size)]),d(gt,Pt)};B(fe,gt=>{r(J)?.kind==="text"&&r(J).truncated&&gt(pe)})}var Ce=I(fe,2);{var Te=gt=>{var Pt=yf();d(gt,Pt)},Gt=gt=>{var Pt=bf();let Mt;var jt=tt(Pt,!0);X(()=>{Mt=$t(Pt,1,"msg svelte-unol26",null,Mt,{err:!r(lt).binary}),K(jt,r(lt).binary?"Binary file; not shown.":r(lt).error)}),d(gt,Pt)},qt=gt=>{var Pt=wf(),Mt=tt(Pt);X(()=>{Zt(Mt,"src",`${r(i)??""}/read?${new URLSearchParams({path:r(J).path,raw:"1"})??""}`),Zt(Mt,"alt",r(J).path)}),d(gt,Pt)},Tt=gt=>{var Pt=_f();zo(Pt,()=>ia(r(J).text),!0),z(Pt),d(gt,Pt)},Qt=gt=>{var Pt=xf();d(gt,Pt)},We=gt=>{var Pt=Af();let Mt;De(Pt,20,()=>r(kt),jt=>jt,(jt,he)=>{var Ge=Ef();let gn;De(Ge,21,()=>r(rt).slice(he,he+xt),jn,(ce,Bt,Le)=>{const be=w(()=>he+Le+1);var Ye=Sf();let zn;var pn=V(Ye),yr=tt(pn,!0),Pn=I(pn,2),br=V(Pn);{var wr=me=>{var ke=F(),xr=E(ke);De(xr,17,()=>r(pt)[r(be)-1],jn,(Oi,Cs)=>{var Pr=Pf();let Ts;var Ci=tt(Pr,!0);X(()=>{Ts=Ze(Pr,"",Ts,{color:r(Cs).color}),K(Ci,r(Cs).content)}),d(Oi,Pr)}),d(me,ke)},_r=me=>{var ke=re();X(()=>K(ke,r(Bt))),d(me,ke)};B(br,me=>{r(pt)?.[r(be)-1]?me(wr):me(_r,-1)})}z(Pn),z(Ye),X(()=>{zn=$t(Ye,1,"ln svelte-unol26",null,zn,{hl:r(R)===r(be)}),Zt(Ye,"data-line",r(be)),K(yr,r(be))}),Ie("click",pn,()=>Ft(r(be))),d(ce,Ye)}),z(Ge),X(ce=>gn=Ze(Ge,"",gn,{"--rows":ce}),[()=>Math.min(xt,r(rt).length-he)]),d(jt,Ge)}),z(Pt),Nn(Pt,jt=>_(St,jt),()=>r(St)),X(jt=>Mt=Ze(Pt,"",Mt,{"--gutter":jt}),[()=>`${String(r(rt).length).length+1}ch`]),d(gt,Pt)};B(Ce,gt=>{r(lt)?"error"in r(lt)?gt(Gt,1):r(J)?.kind==="image"?gt(qt,2):r(Z)&&r(J)?.kind==="text"?gt(Tt,3):r(rt).length===0?gt(Qt,4):gt(We,-1):gt(Te)})}z(O),X(()=>{Zt(Wt,"title",r(nt)),K(mt,r(nt))}),Ie("click",M,Y),Ie("click",It,se),Ie("click",Ct,en),Ie("click",zt,Y),d(y,O)};B(de,y=>{r(k)&&y(Oe)})}z(Et),X(()=>Rt=$t(Et,1,"files svelte-unol26",null,Rt,{picked:!!r(k)})),d(n,Et),q()}Lo(["click"]);function Pi(n){const t=n.replace(/^\[|\]$/g,"").toLowerCase();return t==="localhost"||t.endsWith(".localhost")||t==="::1"||/^(::ffff:)?127\./.test(t)}function yo(n,t){return n==="prod"?t?.urls.prod??null:n==="dev"?t?.urls.dev??t?.detected[0]?.url??null:n}function bo(n){const t=n.trim();if(!t)return null;const e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t);try{let s=new URL(e?t:`http://${t}`);return!e&&!Si(s)&&(s=new URL(`https://${t}`)),s.protocol==="http:"||s.protocol==="https:"?s.href:null}catch{return null}}function Si(n){return Pi(n.hostname)||n.hostname==="0.0.0.0"}function kf(n){return Number(n.port||(n.protocol==="https:"?443:80))}function If(n,t){const e=new URL(n),s=t.page.protocol==="https:";if(!Si(e))return s&&e.protocol==="http:"?{kind:"card",reason:"This page is served over HTTPS, and browsers will not frame a plain-HTTP page inside it.",open:e.href}:{kind:"frame",src:e.href};const o=kf(e),i=t.serves[o];if(i)return{kind:"frame",src:`${i}${e.pathname}${e.search}${e.hash}`};if(Pi(t.page.hostname))return{kind:"frame",src:e.href.replace("//0.0.0.0","//localhost")};const a=new URL(e.href);a.hostname=t.page.hostname;const l={kind:"card",open:a.href,command:`tailscale serve --bg --https=${o} http://localhost:${o}`};return t.detected.find(c=>c.port===o)?.loopbackOnly?{...l,reason:`The server on port ${o} listens on 127.0.0.1 only, so nothing off this machine reaches it. Map it with tailscale serve, or restart it bound to 0.0.0.0.`}:s&&a.protocol==="http:"?{...l,reason:`Port ${o} has no tailscale serve HTTPS mapping, and this page, served over HTTPS, cannot frame plain HTTP.`}:{kind:"frame",src:a.href}}const wo=or("claude-mux-web-pane",{});class Df{#t=L(le(wo.load()));get state(){return r(this.#t)}set state(t){_(this.#t,t,!0)}get(t){return t&&this.state[t]||null}set(t,e){!t||this.state[t]===e||(this.state[t]=e,wo.save(this.state))}}const _o=new Df;var xo=A("<iconify-icon></iconify-icon>",2),Rf=A('<span class="dot svelte-1epl13d"></span> <span class="proc svelte-1epl13d"> </span> <!>',1),Lf=A('<div class="detected svelte-1epl13d"><span class="label svelte-1epl13d">Detected dev servers</span> <!></div>'),Po=A('<p class="msg err svelte-1epl13d"> </p>'),Ff=A(`<p class="msg dim svelte-1epl13d">Looking for the project's URLs…</p>`),Nf=A('<h3 class="svelte-1epl13d">No prod URL</h3> <p class="svelte-1epl13d">Name one as <code class="svelte-1epl13d">urls.prod</code> in <code class="svelte-1epl13d">.claude-mux.json</code> at the repo root.</p>',1),Mf=A('<h3 class="svelte-1epl13d">No dev server running</h3> <p class="svelte-1epl13d">Nothing inside <code class="svelte-1epl13d"> </code> is serving HTML. Start the dev server, or name one as <code class="svelte-1epl13d">urls.dev</code> in <code class="svelte-1epl13d">.claude-mux.json</code>.</p>',1),zf=A('<h3 class="svelte-1epl13d">Nothing to show yet</h3> <p class="svelte-1epl13d">Type a URL above, start a dev server in the project, or commit a <code class="svelte-1epl13d">.claude-mux.json</code>:</p> <pre class="svelte-1epl13d"></pre>',1),Bf=A('<p class="err svelte-1epl13d"> </p>'),Vf=A('<div class="empty svelte-1epl13d"><iconify-icon></iconify-icon> <!> <!></div>',2),So=A('<p class="msg dim svelte-1epl13d"> </p>'),Wf=A("<iconify-icon></iconify-icon> Open in new tab",3),Hf=A('<p class="dim svelte-1epl13d">To show it here, map the port over HTTPS on this machine:</p> <div class="cmd svelte-1epl13d"><code class="svelte-1epl13d"> </code> <!></div>',1),jf=A('<div class="empty card svelte-1epl13d"><iconify-icon></iconify-icon> <h3 class="svelte-1epl13d"> </h3> <p class="svelte-1epl13d"> </p> <!> <!></div>',2),Kf=A('<iframe title="Web preview" allow="clipboard-read; clipboard-write; fullscreen" class="svelte-1epl13d"></iframe>'),Uf=A('<div class="web svelte-1epl13d"><form class="bar svelte-1epl13d"><div class="seg svelte-1epl13d" role="group" aria-label="Site"><!> <!></div> <!></form> <!> <div class="view svelte-1epl13d"><!></div></div>');function qf(n,t){U(t,!0);const e=5e3,s=w(()=>t.session?.id??null);let o=L(null),i=L(null),a=0;async function l(N){const st=++a;try{const ft=await fetch(`/api/sessions/${encodeURIComponent(N)}/web`),Et=await ft.json();if(st!==a)return;if(!ft.ok)throw new Error(Et.error??`HTTP ${ft.status}`);_(o,Et,!0),_(i,null)}catch(ft){st===a&&_(i,ft instanceof Error?ft.message:String(ft),!0)}}At(()=>{const N=r(s);if(!N||!t.active)return;ae(()=>{l(N)});const st=setInterval(()=>{document.visibilityState==="visible"&&l(N)},e);return()=>clearInterval(st)});const c=w(()=>!!r(o)?.urls.dev),u=w(()=>r(c)||r(o)?.detected.length?"dev":r(o)?.urls.prod?"prod":null),g=w(()=>t.params.url??r(u)),p=w(()=>r(g)?yo(r(g),r(o)):null);let v=!1;At(()=>{if(!t.active||v||!r(s))return;v=!0;const N=ae(()=>_o.get(r(s)));!t.params.url&&N&&t.setParams({url:N})}),At(()=>{t.params.url&&_o.set(r(s),t.params.url)});let h=L(le([]));function f(N){N!==r(g)&&(r(g)&&_(h,[...r(h),r(g)],!0),t.setParams({url:N}))}function m(){const N=r(h).at(-1);N&&(_(h,r(h).slice(0,-1),!0),t.setParams({url:N}))}let x=L("");At(()=>{_(x,r(p)??"",!0)});function P(N){N.preventDefault();const st=bo(r(x));if(!st){Dn.error("Not an http(s) URL",{description:r(x)});return}const ft=["prod","dev"].find(Et=>{const Rt=yo(Et,r(o));return Rt!==null&&bo(Rt)===st});f(ft??st)}const S=w(()=>{if(!r(p)||!r(o))return null;try{return If(r(p),{page:location,serves:r(o).serves,detected:r(o).detected})}catch{return"invalid"}}),k=w(()=>r(S)!=="invalid"&&r(S)?.kind==="frame"?r(S).src:null),R=w(()=>r(S)==="invalid"?null:r(S)?r(S).kind==="frame"?r(S).src:r(S).open:r(p));let H=L(null);At(()=>{const N=r(k);if(!N)return;let st=!1;const ft=new URLSearchParams({url:N,origin:location.origin});return fetch(`/api/web/frame?${ft}`).then(Et=>Et.json()).catch(Et=>({embeddable:null,reason:String(Et)})).then(Et=>{st||_(H,{src:N,result:Et},!0)}),()=>st=!0});const T=w(()=>r(H)&&r(H).src===r(k)?r(H).result:null),W=w(()=>r(S)==="invalid"?null:r(S)?.kind==="card"?r(S):r(S)&&r(T)?.embeddable===!1?{reason:`The site forbids framing. ${r(T).reason}`,open:r(S).src}:null);let et=L(0);function G(){r(k)&&No(et),r(s)&&l(r(s))}async function ut(N){try{await navigator.clipboard.writeText(N),Dn.success("Copied",{description:N})}catch{Dn.error("Could not copy")}}At(()=>{t.setActions([{icon:"mdi:arrow-left",label:"Back",disabled:r(h).length===0,run:m},{icon:"mdi:refresh",label:"Reload",disabled:!r(s),run:G},{icon:"mdi:open-in-new",label:"Open in new tab",disabled:!r(R),run:()=>r(R)&&window.open(r(R),"_blank","noopener,noreferrer")}])});function lt(N){try{return new URL(N).host}catch{return N}}var J=Uf(),nt=V(J),ct=V(nt),Y=V(ct),$=()=>r(g)==="prod",it=N=>N&&f("prod");{let N=w(()=>!r(o)?.urls.prod),st=w(()=>r(o)?.urls.prod??"No prod URL in .claude-mux.json");He(Y,{size:"sm",get disabled(){return r(N)},get title(){return r(st)},get pressed(){return $()},set pressed(ft){it(ft)},children:(ft,Et)=>{Yt();var Rt=re("Prod");d(ft,Rt)},$$slots:{default:!0}})}var Z=I(Y,2),rt=()=>r(g)==="dev"||!r(c)&&!!r(o)?.detected.some(N=>N.url===r(g)),pt=N=>N&&f("dev");{let N=w(()=>!r(c)&&!r(o)?.detected.length),st=w(()=>r(o)?.urls.dev??(r(o)?.detected.length?"A dev server found running in the project":"No dev server found"));He(Z,{size:"sm",get disabled(){return r(N)},get title(){return r(st)},get pressed(){return rt()},set pressed(ft){pt(ft)},children:(ft,Et)=>{Yt();var Rt=re("Dev");d(ft,Rt)},$$slots:{default:!0}})}z(ct);var xt=I(ct,2);Vr(xt,{class:"url",type:"text",inputmode:"url",placeholder:"Type a URL…","aria-label":"URL",autocomplete:"off",spellcheck:!1,get value(){return r(x)},set value(N){_(x,N,!0)}}),z(nt);var kt=I(nt,2);{var St=N=>{var st=Lf(),ft=I(V(st),2);De(ft,19,()=>r(o).detected,Et=>Et.port,(Et,Rt,Ee)=>{var Ae=()=>r(p)===r(Rt).url,Ve=ue=>ue&&f(r(Ee)===0?"dev":r(Rt).url);{let ue=w(()=>`${r(Rt).process} (pid ${r(Rt).pid}) · ${r(Rt).url}`);He(Et,{variant:"outline",size:"sm",class:"chip",get title(){return r(ue)},get pressed(){return Ae()},set pressed(Vt){Ve(Vt)},children:(Vt,ee)=>{var Xt=Rf(),ye=I(E(Xt)),de=I(ye),Oe=tt(de,!0),y=I(de,2);{var O=D=>{var M=xo();ne(M,"icon","mdi:lock-outline"),ne(M,"title","127.0.0.1 only"),d(D,M)};B(y,D=>{r(Rt).loopbackOnly&&D(O)})}X(()=>{K(ye,`:${r(Rt).port??""} `),K(Oe,r(Rt).process)}),d(Vt,Xt)},$$slots:{default:!0}})}}),z(st),d(N,st)};B(kt,N=>{r(o)&&!r(c)&&r(o).detected.length>0&&N(St)})}var Ft=I(kt,2),se=V(Ft);{var en=N=>{var st=Po(),ft=tt(st,!0);X(()=>K(ft,r(i))),d(N,st)},nn=N=>{var st=Ff();d(N,st)},oe=N=>{var st=Vf(),ft=V(st);ne(ft,"icon","mdi:web-off"),$t(ft,1,"svelte-1epl13d");var Et=I(ft,2);{var Rt=Vt=>{var ee=Nf();Yt(2),d(Vt,ee)},Ee=Vt=>{var ee=Mf(),Xt=I(E(ee),2),ye=I(V(Xt)),de=tt(ye,!0);Yt(5),z(Xt),X(()=>K(de,r(o)?.root)),d(Vt,ee)},Ae=Vt=>{var ee=zf(),Xt=I(E(ee),4);Xt.textContent='{ "urls": { "prod": "https://…", "dev": "http://localhost:5173" } }',d(Vt,ee)};B(Et,Vt=>{r(g)==="prod"?Vt(Rt):r(g)==="dev"?Vt(Ee,1):Vt(Ae,-1)})}var Ve=I(Et,2);{var ue=Vt=>{var ee=Bf(),Xt=tt(ee);X(()=>K(Xt,`.claude-mux.json: ${r(o).configError??""}`)),d(Vt,ee)};B(Ve,Vt=>{r(o)?.configError&&Vt(ue)})}z(st),d(N,st)},Pe=N=>{var st=Po(),ft=tt(st);X(()=>K(ft,`Not a URL: ${r(p)??""}`)),d(N,st)},Re=N=>{var st=So(),ft=tt(st);X(()=>K(ft,`Resolving ${r(p)??""}…`)),d(N,st)},Be=N=>{const st=w(()=>r(W).command);var ft=jf(),Et=V(ft);ne(Et,"icon","mdi:application-brackets-outline"),$t(Et,1,"svelte-1epl13d");var Rt=I(Et,2),Ee=tt(Rt),Ae=I(Rt,2),Ve=tt(Ae,!0),ue=I(Ae,2);ln(ue,{get href(){return r(W).open},target:"_blank",rel:"noopener noreferrer",size:"sm",children:(Xt,ye)=>{var de=Wf(),Oe=E(de);ne(Oe,"icon","mdi:open-in-new"),$t(Oe,1,"svelte-1epl13d"),Yt(),d(Xt,de)},$$slots:{default:!0}});var Vt=I(ue,2);{var ee=Xt=>{var ye=Hf(),de=I(E(ye),2),Oe=V(de),y=tt(Oe,!0),O=I(Oe,2);ln(O,{variant:"ghost",size:"icon-sm",title:"Copy command","aria-label":"Copy command",onclick:()=>ut(r(st)),children:(D,M)=>{var yt=xo();ne(yt,"icon","mdi:content-copy"),d(D,yt)},$$slots:{default:!0}}),z(de),X(()=>K(y,r(st))),d(Xt,ye)};B(Vt,Xt=>{r(st)&&Xt(ee)})}z(ft),X(Xt=>{K(Ee,`Can't show ${Xt??""} here`),K(Ve,r(W).reason)},[()=>lt(r(W).open)]),d(N,ft)},Se=N=>{var st=So(),ft=tt(st);X(Et=>K(ft,`Checking ${Et??""}…`),[()=>lt(r(k))]),d(N,st)},vn=N=>{var st=F(),ft=E(st);Mo(ft,()=>`${r(k)}\0${r(et)}`,Et=>{var Rt=Kf();X(()=>Zt(Rt,"src",r(k))),d(Et,Rt)}),d(N,st)};B(se,N=>{r(i)&&!r(o)?N(en):!r(o)&&!t.params.url?N(nn,1):r(p)?r(S)==="invalid"?N(Pe,3):r(S)?r(W)?N(Be,5):r(k)&&!r(T)?N(Se,6):r(k)&&N(vn,7):N(Re,4):N(oe,2)})}z(Ft),z(J),Fo("submit",nt,P),d(n,J),q()}const mr=[{kind:"changes",label:"Changes",icon:"mdi:plus-minus-variant",key:"C",params:["file","turn","source"],body:Ud,unavailable:n=>n?null:"Not a Claude session",count:n=>n?.changes??null},{kind:"files",label:"Files",icon:"mdi:file-tree-outline",key:"F",params:["file","line"],body:Tf,unavailable:n=>n?null:"Not a Claude session"},{kind:"web",label:"Web",icon:"mdi:web",key:"W",params:["url"],body:qf,unavailable:n=>n?null:"Not a Claude session"},{kind:"project",label:"Project",icon:"mdi:folder-information-outline",key:"P",params:[],body:yd,unavailable:n=>n?null:"Not a Claude session"}],bv=mr.map(n=>n.kind),wv=[...new Set(mr.flatMap(n=>n.params))];function _v(n){return mr.find(t=>t.kind===n)??null}function Ei(n){return Wr?`⌥⇧${n}`:`Alt Shift ${n}`}function xv(n){return Ei(n.key)}const Ai="M",Pv=Ei(Ai),Sv=Wr?"⌘\\":"Ctrl \\";function Ev(n){return(n.ctrlKey||n.metaKey)&&!n.altKey&&!n.shiftKey&&n.code==="Backslash"?"toggle":!n.altKey||!n.shiftKey||n.ctrlKey||n.metaKey?null:n.code===`Key${Ai}`?"maximize":mr.find(t=>n.code===`Key${t.key}`)??null}const Xf=5e3;function Gf(n,t){if(n.length!==t.length)return!1;for(let e=0;e<n.length;e++){const s=n[e],o=t[e];if(s.target!==o.target||s.command!==o.command||s.cwd!==o.cwd||s.session!==o.session)return!1}return!0}class Yf{#t=L(le([]));get panes(){return r(this.#t)}set panes(t){_(this.#t,t,!0)}#e=L(!1);get loaded(){return r(this.#e)}set loaded(t){_(this.#e,t,!0)}interval=null;subscribers=0;pending=!1;fetchPanes=async()=>{if(!this.pending){this.pending=!0;try{const e=await(await fetch("/api/tmux/panes")).json();Gf(this.panes,e)||(this.panes=e),this.loaded=!0}catch{}finally{this.pending=!1}}};start(){this.interval==null&&(this.interval=setInterval(this.fetchPanes,Xf))}stop(){this.interval!=null&&(clearInterval(this.interval),this.interval=null)}onVis=()=>{document.hidden?this.stop():(this.fetchPanes(),this.start())};subscribe(){return this.subscribers++,this.subscribers===1&&(this.fetchPanes(),this.start(),document.addEventListener("visibilitychange",this.onVis)),()=>{this.subscribers--,this.subscribers===0&&(this.stop(),document.removeEventListener("visibilitychange",this.onVis))}}}const Av=new Yf,Eo=32,Zf=250,Ao=or("claude-mux-drafts",{});class Jf{#t=L(le(Ao.load()));get state(){return r(this.#t)}set state(t){_(this.#t,t,!0)}flushTimer=null;get(t){return t?this.state[t]??"":""}set(t,e){if(!t)return;const s=this.state[t]??"";e!==s&&(e===""?delete this.state[t]:this.state[t]=e,this.scheduleFlush())}has(t){return!!t&&(this.state[t]?.length??0)>0}preview(t){const e=this.get(t);if(!e)return"";const s=e.replace(/\s+/g," ").trim();return s.length>Eo?s.slice(0,Eo-1)+"…":s}scheduleFlush(){this.flushTimer===null&&(this.flushTimer=setTimeout(()=>{this.flushTimer=null,Ao.save(this.state)},Zf))}}const Ov=new Jf,Oo=[];function Co(n){n.abort?.abort(),n.thumb&&URL.revokeObjectURL(n.thumb)}class Qf{#t=L(le({}));get state(){return r(this.#t)}set state(t){_(this.#t,t,!0)}get(t){return t?this.state[t]??Oo:Oo}count(t){return this.get(t).length}add(t,e){t&&(this.state[t]=[...this.get(t),e])}patch(t,e,s){const o=this.state[t];o?.some(i=>i.localId===e)&&(this.state[t]=o.map(i=>i.localId===e?{...i,...s}:i))}remove(t,e){const s=t?this.state[t]:void 0,o=s?.find(a=>a.localId===e);if(!t||!s||!o)return;Co(o);const i=s.filter(a=>a.localId!==e);return i.length?this.state[t]=i:delete this.state[t],o}clear(t){const e=t?this.state[t]:void 0;!t||!e||(e.forEach(Co),delete this.state[t])}}const Cv=new Qf;var $f=new Set(["$$slots","$$events","$$legacy","open"]);function Tv(n,t){U(t,!0);let e=b(t,"open",15,!1),s=dt(t,$f);var o=F(),i=E(o);Lt(i,()=>hl,(a,l)=>{l(a,_t(()=>s,{get open(){return e()},set open(c){e(c)}}))}),d(n,o),q()}var th=new Set(["$$slots","$$events","$$legacy"]);function eh(n,t){let e=dt(t,th);var s=F(),o=E(s);Lt(o,()=>ts,(i,a)=>{a(i,_t(()=>e))}),d(n,s)}var nh=new Set(["$$slots","$$events","$$legacy","ref","class"]);function kv(n,t){U(t,!0);let e=b(t,"ref",15,null),s=dt(t,nh);var o=F(),i=E(o);{let a=w(()=>te("text-lg font-semibold",t.class));Lt(i,()=>Zo,(l,c)=>{c(l,_t({"data-slot":"alert-dialog-title",get class(){return r(a)}},()=>s,{get ref(){return e()},set ref(u){e(u)}}))})}d(n,o),q()}var rh=new Set(["$$slots","$$events","$$legacy","ref","class"]);function Iv(n,t){U(t,!0);let e=b(t,"ref",15,null),s=dt(t,rh);var o=F(),i=E(o);{let a=w(()=>te(Bo(),t.class));Lt(i,()=>yl,(l,c)=>{c(l,_t({"data-slot":"alert-dialog-action",get class(){return r(a)}},()=>s,{get ref(){return e()},set ref(u){e(u)}}))})}d(n,o),q()}var sh=new Set(["$$slots","$$events","$$legacy","ref","class"]);function Dv(n,t){U(t,!0);let e=b(t,"ref",15,null),s=dt(t,sh);var o=F(),i=E(o);{let a=w(()=>te(Bo({variant:"outline"}),t.class));Lt(i,()=>_l,(l,c)=>{c(l,_t({"data-slot":"alert-dialog-cancel",get class(){return r(a)}},()=>s,{get ref(){return e()},set ref(u){e(u)}}))})}d(n,o),q()}var oh=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),ih=A("<div><!></div>");function Rv(n,t){U(t,!0);let e=b(t,"ref",15,null),s=dt(t,oh);var o=ih();Kt(o,a=>({"data-slot":"alert-dialog-footer",class:a,...s}),[()=>te("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t.class)]);var i=V(o);at(i,()=>t.children??wt),z(o),Nn(o,a=>e(a),()=>e()),d(n,o),q()}var ah=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),lh=A("<div><!></div>");function Lv(n,t){U(t,!0);let e=b(t,"ref",15,null),s=dt(t,ah);var o=lh();Kt(o,a=>({"data-slot":"alert-dialog-header",class:a,...s}),[()=>te("flex flex-col gap-2 text-center sm:text-start",t.class)]);var i=V(o);at(i,()=>t.children??wt),z(o),Nn(o,a=>e(a),()=>e()),d(n,o),q()}var ch=new Set(["$$slots","$$events","$$legacy","ref","class"]);function uh(n,t){U(t,!0);let e=b(t,"ref",15,null),s=dt(t,ch);var o=F(),i=E(o);{let a=w(()=>te("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-(--z-modal) bg-black/50",t.class));Lt(i,()=>ai,(l,c)=>{c(l,_t({"data-slot":"alert-dialog-overlay",get class(){return r(a)}},()=>s,{get ref(){return e()},set ref(u){e(u)}}))})}d(n,o),q()}var dh=new Set(["$$slots","$$events","$$legacy","ref","class","portalProps"]),fh=A("<!> <!>",1);function Fv(n,t){U(t,!0);let e=b(t,"ref",15,null),s=dt(t,dh);eh(n,_t(()=>t.portalProps,{children:(o,i)=>{var a=fh(),l=E(a);uh(l,{});var c=I(l,2);{let u=w(()=>te("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-(--z-modal) grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t.class));Lt(c,()=>cc,(g,p)=>{p(g,_t({"data-slot":"alert-dialog-content",get class(){return r(u)}},()=>s,{get ref(){return e()},set ref(v){e(v)}}))})}d(o,a)},$$slots:{default:!0}})),q()}var hh=new Set(["$$slots","$$events","$$legacy","ref","class"]);function Nv(n,t){U(t,!0);let e=b(t,"ref",15,null),s=dt(t,hh);var o=F(),i=E(o);{let a=w(()=>te("text-muted-foreground text-sm",t.class));Lt(i,()=>li,(l,c)=>{c(l,_t({"data-slot":"alert-dialog-description",get class(){return r(a)}},()=>s,{get ref(){return e()},set ref(u){e(u)}}))})}d(n,o),q()}var vh=new Set(["$$slots","$$events","$$legacy","open"]);function gh(n,t){U(t,!0);let e=b(t,"open",15,!1),s=dt(t,vh);var o=F(),i=E(o);Lt(i,()=>ju,(a,l)=>{l(a,_t(()=>s,{get open(){return e()},set open(c){e(c)}}))}),d(n,o),q()}var ph=new Set(["$$slots","$$events","$$legacy"]);function mh(n,t){let e=dt(t,ph);var s=F(),o=E(s);Lt(o,()=>ts,(i,a)=>{a(i,_t(()=>e))}),d(n,s)}var yh=new Set(["$$slots","$$events","$$legacy","ref","class"]);function bh(n,t){U(t,!0);let e=b(t,"ref",15,null),s=dt(t,yh);var o=F(),i=E(o);{let a=w(()=>te("text-lg leading-none font-semibold",t.class));Lt(i,()=>Zo,(l,c)=>{c(l,_t({"data-slot":"dialog-title",get class(){return r(a)}},()=>s,{get ref(){return e()},set ref(u){e(u)}}))})}d(n,o),q()}var wh=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),_h=A("<div><!></div>");function xh(n,t){U(t,!0);let e=b(t,"ref",15,null),s=dt(t,wh);var o=_h();Kt(o,a=>({"data-slot":"dialog-footer",class:a,...s}),[()=>te("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t.class)]);var i=V(o);at(i,()=>t.children??wt),z(o),Nn(o,a=>e(a),()=>e()),d(n,o),q()}var Ph=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),Sh=A("<div><!></div>");function Eh(n,t){U(t,!0);let e=b(t,"ref",15,null),s=dt(t,Ph);var o=Sh();Kt(o,a=>({"data-slot":"dialog-header",class:a,...s}),[()=>te("flex flex-col gap-2 text-center sm:text-start",t.class)]);var i=V(o);at(i,()=>t.children??wt),z(o),Nn(o,a=>e(a),()=>e()),d(n,o),q()}var Ah=new Set(["$$slots","$$events","$$legacy","ref","class"]);function Oh(n,t){U(t,!0);let e=b(t,"ref",15,null),s=dt(t,Ah);var o=F(),i=E(o);{let a=w(()=>te("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-(--z-modal) bg-black/50",t.class));Lt(i,()=>ai,(l,c)=>{c(l,_t({"data-slot":"dialog-overlay",get class(){return r(a)}},()=>s,{get ref(){return e()},set ref(u){e(u)}}))})}d(n,o),q()}var Ch=new Set(["$$slots","$$events","$$legacy"]);function Th(n,t){U(t,!0);let e=dt(t,Ch);const s=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];Os(n,_t({name:"x"},()=>e,{get iconNode(){return s},children:(o,i)=>{var a=F(),l=E(a);at(l,()=>t.children??wt),d(o,a)},$$slots:{default:!0}})),q()}var kh=new Set(["$$slots","$$events","$$legacy","ref","class","portalProps","children","showCloseButton"]),Ih=A('<!> <span class="sr-only">Close</span>',1),To=A("<!> <!>",1);function Dh(n,t){U(t,!0);let e=b(t,"ref",15,null),s=b(t,"showCloseButton",3,!0),o=dt(t,kh);mh(n,_t(()=>t.portalProps,{children:(i,a)=>{var l=To(),c=E(l);Lt(c,()=>Oh,(g,p)=>{p(g,{})});var u=I(c,2);{let g=w(()=>te("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-(--z-modal) grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t.class));Lt(u,()=>Zu,(p,v)=>{v(p,_t({"data-slot":"dialog-content",get class(){return r(g)}},()=>o,{get ref(){return e()},set ref(h){e(h)},children:(h,f)=>{var m=To(),x=E(m);at(x,()=>t.children??wt);var P=I(x,2);{var S=k=>{var R=F(),H=E(R);Lt(H,()=>qu,(T,W)=>{W(T,{class:"ring-offset-background focus:ring-ring absolute end-4 top-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:(et,G)=>{var ut=Ih(),lt=E(ut);Th(lt,{}),Yt(2),d(et,ut)},$$slots:{default:!0}})}),d(k,R)};B(P,k=>{s()&&k(S)})}d(h,m)},$$slots:{default:!0}}))})}d(i,l)},$$slots:{default:!0}})),q()}var Rh=new Set(["$$slots","$$events","$$legacy","ref","class"]);function Lh(n,t){U(t,!0);let e=b(t,"ref",15,null),s=dt(t,Rh);var o=F(),i=E(o);{let a=w(()=>te("text-muted-foreground text-sm",t.class));Lt(i,()=>li,(l,c)=>{c(l,_t({"data-slot":"dialog-description",get class(){return r(a)}},()=>s,{get ref(){return e()},set ref(u){e(u)}}))})}d(n,o),q()}var Fh=new Set(["$$slots","$$events","$$legacy","open"]);function Mv(n,t){U(t,!0);let e=b(t,"open",15,!1),s=dt(t,Fh);var o=F(),i=E(o);Lt(i,()=>Ju,(a,l)=>{l(a,_t(()=>s,{get open(){return e()},set open(c){e(c)}}))}),d(n,o),q()}var Nh=new Set(["$$slots","$$events","$$legacy"]);function Mh(n,t){let e=dt(t,Nh);var s=F(),o=E(s);Lt(o,()=>ts,(i,a)=>{a(i,_t(()=>e))}),d(n,s)}var zh=new Set(["$$slots","$$events","$$legacy","ref","class","sideOffset","align","portalProps"]);function zv(n,t){U(t,!0);let e=b(t,"ref",15,null),s=b(t,"sideOffset",3,4),o=b(t,"align",3,"center"),i=dt(t,zh);Mh(n,_t(()=>t.portalProps,{children:(a,l)=>{var c=F(),u=E(c);{let g=w(()=>te("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-end-2 data-[side=right]:slide-in-from-start-2 data-[side=top]:slide-in-from-bottom-2 z-(--z-floating) w-72 origin-(--bits-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",t.class));Lt(u,()=>Bu,(p,v)=>{v(p,_t({"data-slot":"popover-content",get sideOffset(){return s()},get align(){return o()},get class(){return r(g)}},()=>i,{get ref(){return e()},set ref(h){e(h)}}))})}d(a,c)},$$slots:{default:!0}})),q()}var Bh=new Set(["$$slots","$$events","$$legacy","ref","class"]);function Bv(n,t){U(t,!0);let e=b(t,"ref",15,null),s=dt(t,Bh);var o=F(),i=E(o);{let a=w(()=>te("",t.class));Lt(i,()=>Hu,(l,c)=>{c(l,_t({"data-slot":"popover-trigger",get class(){return r(a)}},()=>s,{get ref(){return e()},set ref(u){e(u)}}))})}d(n,o),q()}var Vh=A(`Also sent to the agent as <code>/rename</code>, once its pane is back at a prompt. Leave
8
8
  blank to fall back to the tmux target.`,1),Wh=A("<!> <!>",1),ko=A("<!> <!> <!>",1);function Vv(n,t){U(t,!0);const e=w(()=>t.sessionId?aa.sessionById.get(t.sessionId)??null:null);let s=L(""),o=L(null),i=L(!1);At(()=>{t.sessionId&&(_(s,ae(()=>r(e)?.display_name??""),!0),_(i,!1))});const a=16,l=.75;let c=L(void 0);At(()=>{const f=window.visualViewport;if(!t.sessionId||!f)return;const m=()=>{_(c,f.height<window.innerHeight*l?`top: ${f.offsetTop+a}px; translate: -50% 0;`:void 0,!0)};return m(),f.addEventListener("resize",m),f.addEventListener("scroll",m),()=>{f.removeEventListener("resize",m),f.removeEventListener("scroll",m),_(c,void 0)}});async function u(){const f=r(e),m=r(s).trim();if(t.onClose(),!(!f||m===(f.display_name??"")))try{await fetch(`/api/sessions/${encodeURIComponent(f.id)}/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:m||null})})}catch{}}async function g(){const f=r(e);if(f){if(!r(i)){_(i,!0);return}t.onClose();try{await fetch(`/api/sessions/${encodeURIComponent(f.id)}/kill`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pid:f.pid,tmux_target:f.tmux_target})})}catch{}}}function p(f){f.key==="Enter"&&(f.preventDefault(),u())}var v=F(),h=E(v);{let f=w(()=>r(e)!==null);Lt(h,()=>gh,(m,x)=>{x(m,{get open(){return r(f)},onOpenChange:P=>{P||t.onClose()},children:(P,S)=>{var k=F(),R=E(k);Lt(R,()=>Dh,(H,T)=>{T(H,{class:"max-w-sm",get style(){return r(c)},onOpenAutoFocus:W=>{W.preventDefault(),r(o)?.focus(),r(o)?.select()},children:(W,et)=>{var G=ko(),ut=E(G);Lt(ut,()=>Eh,(nt,ct)=>{ct(nt,{children:(Y,$)=>{var it=Wh(),Z=E(it);Lt(Z,()=>bh,(pt,xt)=>{xt(pt,{children:(kt,St)=>{Yt();var Ft=re("Rename session");d(kt,Ft)},$$slots:{default:!0}})});var rt=I(Z,2);Lt(rt,()=>Lh,(pt,xt)=>{xt(pt,{children:(kt,St)=>{Yt();var Ft=Vh();Yt(2),d(kt,Ft)},$$slots:{default:!0}})}),d(Y,it)},$$slots:{default:!0}})});var lt=I(ut,2);{let nt=w(()=>r(e)?.tmux_target??r(e)?.id??"session name");Vr(lt,{onkeydown:p,class:"font-mono",type:"text",get placeholder(){return r(nt)},"aria-label":"Session name",autocomplete:"off",autocapitalize:"off",spellcheck:"false",enterkeyhint:"done",maxlength:120,get ref(){return r(o)},set ref(ct){_(o,ct,!0)},get value(){return r(s)},set value(ct){_(s,ct,!0)}})}var J=I(lt,2);Lt(J,()=>xh,(nt,ct)=>{ct(nt,{children:(Y,$)=>{var it=ko(),Z=E(it);ln(Z,{variant:"ghost",class:"min-h-11 text-destructive hover:text-destructive sm:mr-auto",onclick:g,children:(xt,kt)=>{Yt();var St=re();X(()=>K(St,r(i)?"Confirm kill":"Kill session")),d(xt,St)},$$slots:{default:!0}});var rt=I(Z,2);ln(rt,{variant:"ghost",class:"min-h-11",get onclick(){return t.onClose},children:(xt,kt)=>{Yt();var St=re("Cancel");d(xt,St)},$$slots:{default:!0}});var pt=I(rt,2);ln(pt,{class:"min-h-11",onclick:u,children:(xt,kt)=>{Yt();var St=re("Rename");d(xt,St)},$$slots:{default:!0}}),d(Y,it)},$$slots:{default:!0}})}),d(W,G)},$$slots:{default:!0}})}),d(P,k)},$$slots:{default:!0}})})}d(n,v),q()}function Hh(n,t,e=!0){if(!t)return{score:0,positions:[]};const s=n.toLowerCase(),o=t.toLowerCase(),i=s.indexOf(o);if(i!==-1){const g=e?Array.from({length:o.length},(p,v)=>i+v):[];return{score:1e3-i*5-s.length,positions:g}}const a=[];let l=0,c=0,u=-2;for(let g=0;g<o.length;g++){const p=o[g],v=s.indexOf(p,c);if(v===-1)return null;l+=v===u+1?10:1,(v===0||/[^a-z0-9]/.test(s[v-1]??""))&&(l+=5),e&&a.push(v),u=v,c=v+1}return{score:l-s.length*.1,positions:a}}function jh(n,t){return Hh(n,t,!1)?.score??null}function Wv(n,t){if(t.length===0)return[{text:n,hit:!1}];const e=[];let s=0;for(let o=0;o<t.length;){const i=t[o];let a=i;for(;o+1<t.length&&t[o+1]===a+1;)a=t[++o];o++,i>s&&e.push({text:n.slice(s,i),hit:!1}),e.push({text:n.slice(i,a+1),hit:!0}),s=a+1}return s<n.length&&e.push({text:n.slice(s),hit:!1}),e}function Hv(n,t){const e=jh(n.name,t);if(e!=null)return e+500;const s=t?n.description.toLowerCase().indexOf(t.toLowerCase()):-1;return s===-1?null:100-s*.5}var Kh=new Set(["$$slots","$$events","$$legacy"]);function Uh(n,t){U(t,!0);let e=dt(t,Kh);const s=[["path",{d:"M5 12h14"}]];Os(n,_t({name:"minus"},()=>e,{get iconNode(){return s},children:(o,i)=>{var a=F(),l=E(a);at(l,()=>t.children??wt),d(o,a)},$$slots:{default:!0}})),q()}var qh=new Set(["$$slots","$$events","$$legacy","ref","checked","indeterminate","class"]),Xh=A('<div data-slot="checkbox-indicator" class="text-current transition-none"><!></div>');function jv(n,t){U(t,!0);let e=b(t,"ref",15,null),s=b(t,"checked",15,!1),o=b(t,"indeterminate",15,!1),i=dt(t,qh);var a=F(),l=E(a);{const c=(g,p)=>{let v=()=>(p?.()).checked,h=()=>(p?.()).indeterminate;var f=Xh(),m=V(f);{var x=S=>{ad(S,{class:"size-3.5"})},P=S=>{Uh(S,{class:"size-3.5"})};B(m,S=>{v()?S(x):h()&&S(P,1)})}z(f),d(g,f)};let u=w(()=>te("border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive peer flex size-4 shrink-0 items-center justify-center rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t.class));Lt(l,()=>Pc,(g,p)=>{p(g,_t({"data-slot":"checkbox",get class(){return r(u)}},()=>i,{get ref(){return e()},set ref(v){e(v)},get checked(){return s()},set checked(v){s(v)},get indeterminate(){return o()},set indeterminate(v){o(v)},children:c,$$slots:{default:!0}}))})}d(n,a),q()}function Gh(n,t){if(n.length!==t.length)return!1;for(let e=0;e<n.length;e++){const s=n[e],o=t[e];if(s.label!==o.label||s.icon!==o.icon||s.danger!==o.danger||s.variant!==o.variant||s.flashing!==o.flashing)return!1}return!0}class Yh{#t=L(le([]));get actions(){return r(this.#t)}set actions(t){_(this.#t,t,!0)}set(t){Gh(this.actions,t)||(this.actions=t)}clear(){this.actions.length!==0&&(this.actions=[])}}const Kv=new Yh;export{ar as $,cv as A,Rn as B,tc as C,Jl as D,uv as E,$e as F,Fe as G,dv as H,Os as I,ve as J,Jt as K,hn as L,Go as M,Il as N,qr as O,hv as P,cn as Q,Ur as R,fa as S,Kr as T,an as U,vv as V,cl as W,Xr as X,Ut as Y,Xn as Z,Un as _,yv as a,Sc as a0,xe as a1,us as a2,Nu as a3,Lu as a4,Zs as a5,Ec as a6,dl as a7,ts as a8,Bv as a9,Mu as aA,Hv as aB,ai as aC,Zu as aD,qu as aE,Th as aF,Zo as aG,ju as aH,Sv as aI,_v as aJ,Pv as aK,He as aL,xv as aM,nv as aN,bv as aO,Ev as aP,wv as aQ,zv as aa,Mv as ab,Dh as ac,bh as ad,Lh as ae,jv as af,gh as ag,Hh as ah,Wv as ai,Av as aj,Kv as ak,Eh as al,Vv as am,Fv as an,Lv as ao,kv as ap,Nv as aq,Rv as ar,Dv as as,Iv as at,Tv as au,Ov as av,Cv as aw,mr as ax,_i as ay,gv as az,Dn as b,mv as c,ma as d,C as e,sv as f,ov as g,ir as h,Hr as i,Vo as j,Xa as k,lv as l,av as m,iv as n,Lr as o,Ot as p,fv as q,lr as r,rv as s,we as t,cr as u,Xo as v,pv as w,Kn as x,Ql as y,Zl as z};
9
- //# sourceMappingURL=CmDdyjOR.js.map
9
+ //# sourceMappingURL=9UhVHDNs.js.map