@stacksjs/components 0.2.611 → 0.2.613

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.
@@ -8,11 +8,28 @@ export const popoverInstanceId = $uid
8
8
  </script>
9
9
 
10
10
  <script client>
11
+ import { trackNativePopup } from '../../utils/tooltip-position'
11
12
  const emit = defineEmits()
12
13
  const popoverInstanceId = {{ popoverInstanceId }}
13
14
  const isOpen = state(false)
15
+ const mounted = state(false)
16
+ const rootRef = useRef('rootRef')
17
+ const tree = window.stx._host
18
+ const nativePopup = !!tree.isNative
14
19
  let rootEl = null
15
20
  let outsideHandler = null
21
+ let stopPositioning = null
22
+
23
+ function ownPart(marker) {
24
+ if (!rootEl) return null
25
+ return tree.descendants(rootEl).find(node => {
26
+ if (tree.getAttribute(node, marker) == null) return false
27
+ for (let parent = tree.parent(node); parent; parent = tree.parent(parent)) {
28
+ if (tree.getAttribute(parent, 'data-stx-popover') != null) return parent === rootEl
29
+ }
30
+ return false
31
+ }) || null
32
+ }
16
33
 
17
34
  /*
18
35
  * The trigger carries the open state for assistive tech. `isOpen` already
@@ -22,13 +39,14 @@ let outsideHandler = null
22
39
  */
23
40
  function syncExpanded() {
24
41
  if (!rootEl) return
25
- const trigger = rootEl.querySelector('[data-stx-popover-button]')
42
+ const trigger = ownPart('data-stx-popover-button')
26
43
  if (!trigger) return
27
44
  trigger.setAttribute('aria-expanded', isOpen() ? 'true' : 'false')
28
- const panel = rootEl.querySelector('[data-stx-popover-panel]')
45
+ const panel = ownPart('data-stx-popover-panel')
29
46
  if (!panel) return
30
- if (!panel.id) panel.id = 'stx-popover-panel-' + popoverInstanceId
31
- trigger.setAttribute('aria-controls', panel.id)
47
+ const panelId = tree.getAttribute(panel, 'id') || 'stx-popover-panel-' + popoverInstanceId
48
+ tree.setAttribute(panel, 'id', panelId)
49
+ tree.setAttribute(trigger, 'aria-controls', panelId)
32
50
  }
33
51
 
34
52
  function open() { if (!isOpen()) { isOpen.set(true); emit('change', true); syncExpanded() } }
@@ -61,10 +79,12 @@ function onEscape() {
61
79
  }
62
80
 
63
81
  onMount(() => {
64
- rootEl = document.querySelector(`[data-popover-id="${popoverInstanceId}"]`)
82
+ rootEl = rootRef.value
65
83
  syncExpanded()
84
+ mounted.set(true)
85
+ if (nativePopup) return
66
86
  outsideHandler = (event) => {
67
- if (!isOpen()) return
87
+ if (!isOpen() || !window.stx.overlays.isTop(popoverInstanceId)) return
68
88
  if (rootEl && !rootEl.contains(event.target)) close()
69
89
  }
70
90
  document.addEventListener('click', outsideHandler, true)
@@ -79,11 +99,31 @@ onMount(() => {
79
99
  * trap Tab or move focus.
80
100
  */
81
101
  effect(() => {
82
- if (isOpen()) window.stx.overlays.open(popoverInstanceId, { modal: false, panel: () => rootEl, onEscape })
102
+ if (!mounted()) return
103
+ if (stopPositioning) { stopPositioning(); stopPositioning = null }
104
+ if (isOpen()) {
105
+ const panel = ownPart('data-stx-popover-panel')
106
+ try {
107
+ if (nativePopup && !window.craft?.capabilities?.viewMeasure)
108
+ throw new Error('Native Popover requires viewMeasure support')
109
+ window.stx.overlays.open(popoverInstanceId, { modal: false, root: nativePopup ? panel : null, panel: () => rootEl, onEscape, onBackdrop: close })
110
+ if (nativePopup) {
111
+ const trigger = ownPart('data-stx-popover-button')
112
+ if (!trigger) throw new Error('Native Popover requires a PopoverButton anchor')
113
+ stopPositioning = trackNativePopup(trigger, panel, tree.getAttribute(panel, 'data-stx-popover-position') || 'bottom', style => tree.setStyle(panel, style))
114
+ }
115
+ }
116
+ catch (error) {
117
+ window.stx.overlays.close(popoverInstanceId)
118
+ console.warn('[stx:popover] ' + ((error && error.message) || String(error)))
119
+ close()
120
+ }
121
+ }
83
122
  else window.stx.overlays.close(popoverInstanceId)
84
123
  })
85
124
 
86
125
  onDestroy(() => {
126
+ if (stopPositioning) stopPositioning()
87
127
  window.stx.overlays.close(popoverInstanceId)
88
128
  if (outsideHandler) document.removeEventListener('click', outsideHandler, true)
89
129
  })
@@ -95,6 +135,7 @@ defineExpose({ isOpen, toggle, open, close })
95
135
 
96
136
  <component
97
137
  :is="{{ as }}"
138
+ x-ref="rootRef"
98
139
  class="{{ popoverClasses }}"
99
140
  data-stx-popover
100
141
  data-popover-id="{{ popoverInstanceId }}"
@@ -9,12 +9,12 @@ export const buttonClasses = `${baseClasses} ${className}`.trim()
9
9
 
10
10
  <script client>
11
11
  const emit = defineEmits()
12
- const isDisabled = {{ disabled }}
12
+ const isDisabled = useReactiveProp('disabled', {{ disabled }})
13
13
 
14
14
  function onClick(event) {
15
- if (isDisabled) return
15
+ if (isDisabled()) return
16
16
  emit('click', event)
17
- event.currentTarget.dispatchEvent(new CustomEvent('stx:popover-toggle', { bubbles: true }))
17
+ window.stx._host.emitComponentEvent(event.currentTarget, new CustomEvent('stx:popover-toggle', { bubbles: true }))
18
18
  }
19
19
  </script>
20
20
 
@@ -23,7 +23,8 @@ function onClick(event) {
23
23
  class="{{ buttonClasses }}"
24
24
  data-stx-popover-button
25
25
  aria-expanded="false"
26
- @if(disabled)disabled aria-disabled="true"@endif
26
+ :disabled="isDisabled()"
27
+ :aria-disabled="isDisabled() ? 'true' : 'false'"
27
28
  @click="onClick($event)"
28
29
  >
29
30
  <slot />
@@ -17,7 +17,10 @@ export const panelClasses = `${baseClasses} ${positionClasses[position] || posit
17
17
  <component
18
18
  :is="{{ as }}"
19
19
  class="{{ panelClasses }}"
20
+ data-native="Modal"
21
+ visible="false"
20
22
  data-stx-popover-panel
23
+ data-stx-popover-position="{{ position }}"
21
24
  >
22
25
  <slot />
23
26
  </component>
@@ -55,8 +55,10 @@ export const arrowClass = `absolute w-0 h-0 border-4 border-transparent ${arrowC
55
55
  </script>
56
56
 
57
57
  <script client>
58
- import { measureTooltipPosition } from '../../utils/tooltip-position'
58
+ import { measureTooltipPosition, trackNativePopup } from '../../utils/tooltip-position'
59
59
  import { portalElement } from '../../utils/element-portal'
60
+ const nativePopup = !!window.stx._host.isNative
61
+ const mounted = state(false)
60
62
  const delay = {{ delay }}
61
63
  // A live prop: a tooltip is commonly suppressed by state the page only learns
62
64
  // about later — while a field is being edited, or once a hint has been read —
@@ -68,7 +70,7 @@ const preferredSide = {{ position }}
68
70
  // The body portal uses viewport coordinates. Fixed positioning also prevents
69
71
  // a static body's margins from shifting the measured placement offscreen.
70
72
  const panelLimits = 'position:fixed;max-width:calc(100vw - 16px);margin:0;'
71
- const panelStyle = state(panelLimits)
73
+ const panelStyle = state(nativePopup ? { position: 'absolute', margin: 0, transform: [] } : panelLimits)
72
74
  const arrowStyle = state('')
73
75
  const isDisabled = useReactiveProp('disabled', {{ disabled }})
74
76
  // Reactive prop binding — parent can drive `show` via signals. See #1704.
@@ -80,6 +82,7 @@ let destroyed = false
80
82
  // Use the actual offset parent, so a tooltip inside a modal or a transformed
81
83
  // container still gets viewport bounds rather than assuming document origin.
82
84
  async function positionTooltip() {
85
+ if (nativePopup) return
83
86
  const generation = ++positionGeneration
84
87
  if (destroyed || !isVisible() || isDisabled()) return
85
88
  const trigger = triggerRef.value
@@ -108,21 +111,26 @@ async function positionTooltip() {
108
111
  // ancestors, and resize; the composable removes these listeners on teardown.
109
112
  effect(() => {
110
113
  ++positionGeneration
111
- if (isVisible() && !isDisabled()) nextTick(positionTooltip)
114
+ if (!nativePopup && isVisible() && !isDisabled()) nextTick(positionTooltip)
112
115
  })
113
116
  useEventListener('resize', positionTooltip)
114
117
  useEventListener('scroll', positionTooltip, { capture: true, passive: true })
115
118
 
116
119
  function showTooltip() {
117
120
  if (isDisabled()) return
121
+ if (timeoutId) clearTimeout(timeoutId)
118
122
  if (delay > 0) {
119
- timeoutId = setTimeout(() => isVisible.set(true), delay)
123
+ timeoutId = setTimeout(() => { if (!destroyed && !isDisabled()) isVisible.set(true) }, delay)
120
124
  }
121
125
  else {
122
126
  isVisible.set(true)
123
127
  }
124
128
  }
125
129
 
130
+ function toggleTouch() {
131
+ if (nativePopup) isVisible() ? hideTooltip() : showTooltip()
132
+ }
133
+
126
134
  function hideTooltip() {
127
135
  ++positionGeneration
128
136
  if (timeoutId) {
@@ -148,8 +156,22 @@ function hideTooltip() {
148
156
  * dialog stays (stacksjs/stx#2057). It listened on the document itself, where
149
157
  * the dialog's listener could take the same Escape.
150
158
  */
159
+ let stopPositioning = null
151
160
  effect(() => {
152
- if (isVisible()) window.stx.overlays.open(tooltipId, { modal: false, panel: null, onEscape: hideTooltip })
161
+ if (!mounted()) return
162
+ if (stopPositioning) { stopPositioning(); stopPositioning = null }
163
+ if (isVisible() && !isDisabled()) {
164
+ try {
165
+ if (nativePopup && !window.craft?.capabilities?.viewMeasure)
166
+ throw new Error('Native Tooltip requires viewMeasure support')
167
+ window.stx.overlays.open(tooltipId, { modal: false, root: nativePopup ? panelRef.value : null, panel: null, onEscape: hideTooltip, onBackdrop: hideTooltip })
168
+ if (nativePopup) stopPositioning = trackNativePopup(triggerRef.value, panelRef.value, preferredSide, style => panelStyle.set(style))
169
+ }
170
+ catch (error) {
171
+ console.warn('[stx:tooltip] ' + ((error && error.message) || String(error)))
172
+ hideTooltip()
173
+ }
174
+ }
153
175
  else window.stx.overlays.close(tooltipId)
154
176
  })
155
177
 
@@ -157,6 +179,7 @@ onDestroy(() => {
157
179
  destroyed = true
158
180
  ++positionGeneration
159
181
  if (timeoutId) clearTimeout(timeoutId)
182
+ if (stopPositioning) stopPositioning()
160
183
  window.stx.overlays.close(tooltipId)
161
184
  })
162
185
 
@@ -194,11 +217,12 @@ function describeTrigger() {
194
217
  let restorePanel = null
195
218
  onMount(() => {
196
219
  describeTrigger()
220
+ mounted.set(true)
197
221
  // The panel already belongs to this setup scope. Moving the same node keeps
198
222
  // its reactive bindings and refs, unlike passing them through another scope.
199
223
  nextTick(() => {
200
224
  const panel = panelRef.value
201
- if (panel && panel.isConnected) restorePanel = portalElement(panel, panel.ownerDocument.body)
225
+ if (!nativePopup && !destroyed && panel && panel.isConnected) restorePanel = portalElement(panel, panel.ownerDocument.body)
202
226
  })
203
227
  })
204
228
  onDestroy(() => { if (restorePanel) restorePanel() })
@@ -210,7 +234,9 @@ onDestroy(() => { if (restorePanel) restorePanel() })
210
234
  bubble anywhere. `describeTrigger` below moves that onto the control
211
235
  itself (stacksjs/stx#2048). --}}
212
236
  <span
237
+ data-native="Pressable"
213
238
  x-ref="triggerRef"
239
+ @click="toggleTouch()"
214
240
  @mouseenter="showTooltip()"
215
241
  @mouseleave="hideTooltip()"
216
242
  @focusin="showTooltip()"
@@ -220,16 +246,18 @@ onDestroy(() => { if (restorePanel) restorePanel() })
220
246
  </span>
221
247
 
222
248
  <span
249
+ data-native="Modal"
250
+ visible="false"
223
251
  x-ref="panelRef"
224
252
  :style="panelStyle"
225
253
  id="{{ tooltipId }}"
226
- :show="isVisible() && !{{ disabled }}"
254
+ :show="isVisible() && !isDisabled()"
227
255
  class="{{ tooltipClasses }}"
228
256
  role="tooltip"
229
257
  @mouseenter="showTooltip()"
230
258
  @mouseleave="hideTooltip()"
231
259
  >
232
260
  <span class="block" style="max-height:calc(100vh - 32px);overflow-y:auto;">{{ content }}</span>
233
- <span class="{{ arrowClass }}" :style="arrowStyle"></span>
261
+ <span :show="!nativePopup" class="{{ arrowClass }}" :style="arrowStyle"></span>
234
262
  </span>
235
263
  </span>
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ var Xe={__stx:!0,src:"./components/CodeBlock.stx"};var Qe={__stx:!0,src:"./compo
8
8
  Documentation: ${s.docsUrl}`;else if(e)o+=`
9
9
  Documentation: https://stacksjs.com/components/${e.toLowerCase()}`;return o}toJSON(){return{name:this.name,message:this.message,component:this.component,context:this.context,stack:this.stack}}}var J={invalidProp(e,t,s,o){return new R(e,`Invalid prop value for "${t}"`,{prop:t,received:s,expected:o,details:Array.isArray(o)?`The "${t}" prop must be one of the allowed values`:`The "${t}" prop does not match the expected type`})},requiredProp(e,t){return new R(e,`Required prop "${t}" is missing`,{prop:t,details:`The "${t}" prop is required for ${e} to function correctly`})},invalidType(e,t,s,o){return new R(e,`Invalid type for prop "${t}"`,{prop:t,received:typeof s,expected:o,details:`Expected "${t}" to be of type ${o}, but received ${typeof s}`})},componentNotFound(e){return new R("ComponentLoader",`Component "${e}" not found`,{component:e,details:"Make sure the component is properly imported and registered"})},invalidChildren(e,t,s){return new R(e,"Invalid children",{received:typeof t,expected:s,details:`${e} expects ${s} as children`})},stateUpdate(e,t,s){return new R(e,`Failed to update state "${t}"`,{details:s.message})},eventHandler(e,t,s){return new R(e,`Error in "${t}" event handler`,{details:s.message})},render(e,t){return new R(e,"Failed to render component",{details:t.message})}},oe=null;function Mi(e){oe=e}function Ri(){oe=null}function ne(e,t={}){let{throwError:s=!0,logError:o=!0}=t;if(o){if(console.error("Component Error:",e),e instanceof R)console.group("Error Details"),console.log("Component:",e.component),console.log("Context:",e.context),console.groupEnd()}if(oe)try{oe(e)}catch(n){console.error("Error in error handler:",n)}if(s)throw e}function Oe(e,t,s){return(...o)=>{try{let n=e(...o);if(n instanceof Promise)return n.catch((a)=>{let r=J.eventHandler(t,s,a);throw ne(r,{throwError:!1}),r});return n}catch(n){let a=J.eventHandler(t,s,n);throw ne(a,{throwError:!1}),a}}}function Ct(e,t){if(!e)throw t}function $t(e,t,s={}){let o=R.formatMessage(e,t,s);console.warn(`\u26A0\uFE0F ${o}`)}function zi(e,t){Ct(e,t)}function ji(e){let t=typeof process<"u"&&process.env.DEBUG==="true";return{log(...s){if(t)console.log(`[${e}]`,...s)},warn(s,o){$t(e,s,o)},error(s,o){let n=new R(e,s,o);ne(n,{throwError:!1})}}}function Hi(e,t,s){try{return t()}catch(o){let n=J.render(e,o);return ne(n,{throwError:!1}),s}}class L{validate;message;isRequired;constructor(e,t,s=!1){this.validate=e;this.message=t;this.isRequired=s}get required(){return new L(this.validate,this.message,!0)}}var l={string:new L((e)=>typeof e==="string",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`string\`.`),number:new L((e)=>typeof e==="number"&&!Number.isNaN(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`number\`.`),boolean:new L((e)=>typeof e==="boolean",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`boolean\`.`),func:new L((e)=>typeof e==="function",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`function\`.`),object:new L((e)=>typeof e==="object"&&e!==null&&!Array.isArray(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`object\`.`),array:new L((e)=>Array.isArray(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`array\`.`),any:new L(()=>!0,()=>""),oneOf(e){return new L((t)=>e.includes(t),(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected one of [${e.map((n)=>JSON.stringify(n)).join(", ")}].`)},oneOfType(e){return new L((t,s,o)=>e.some((n)=>n.validate(t,s,o)),(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected one of the specified types.`)},arrayOf(e){return new L((t,s,o)=>{if(!Array.isArray(t))return!1;return t.every((n,a)=>e.validate(n,`${s}[${a}]`,o))},(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected array of specified type.`)},shape(e){return new L((t,s,o)=>{if(typeof t!=="object"||t===null||Array.isArray(t))return!1;for(let[n,a]of Object.entries(e)){if(a.isRequired&&!(n in t))return!1;if(n in t&&!a.validate(t[n],`${s}.${n}`,o))return!1}return!0},(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected object matching specified shape.`)},instanceOf(e){return new L((t)=>t instanceof e,(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected instance of \`${e.name}\`.`)},custom(e,t){return new L(e,typeof t==="string"?()=>t:t)},min(e){return new L((t)=>typeof t==="number"&&t>=e,(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected value >= ${e}.`)},max(e){return new L((t)=>typeof t==="number"&&t<=e,(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected value <= ${e}.`)},range(e,t){return new L((s)=>typeof s==="number"&&s>=e&&s<=t,(s,o,n)=>`Invalid prop \`${o}\` of value \`${s}\` supplied to \`${n}\`, expected value between ${e} and ${t}.`)},pattern(e){return new L((t)=>typeof t==="string"&&e.test(t),(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected value matching pattern ${e}.`)},email:new L((e)=>typeof e==="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),(e,t,s)=>`Invalid prop \`${t}\` of value \`${e}\` supplied to \`${s}\`, expected valid email address.`),url:new L((e)=>{if(typeof e!=="string")return!1;try{let t=new URL(e);return!0}catch{return!1}},(e,t,s)=>`Invalid prop \`${t}\` of value \`${e}\` supplied to \`${s}\`, expected valid URL.`)};function St(e,t,s,o={}){let{throwOnError:n=!1,logWarnings:a=!0}=o,r=[];for(let[i,c]of Object.entries(s)){let p=t[i],u=p===void 0;if(c.isRequired&&u){let d=`Required prop \`${i}\` was not specified in \`${e}\`.`;r.push(d);continue}if(u)continue;if(!c.validate(p,i,e)){let d=c.message(p,i,e);r.push(d)}}if(r.length>0){if(a)console.group(`\u26A0\uFE0F Prop validation failed for \`${e}\``),r.forEach((i)=>console.warn(i)),console.groupEnd();if(n)throw Error(`Prop validation failed for \`${e}\`:
10
10
  ${r.join(`
11
- `)}`)}return{valid:r.length===0,errors:r}}function H(e,t,s){return(o)=>St(e,o,t,s)}function Vi(e,t,s="value"){if(!t.validate(e,s,"assertion"))throw Error(t.message(e,s,"assertion"))}function Bi(e,t,s="value"){if(!t.validate(e,s,"warning"))console.warn(t.message(e,s,"warning"))}var Et="./Button-55ahz0j6.stx";var It={variant:l.oneOf(["primary","secondary","outline","ghost","danger"]),size:l.oneOf(["xs","sm","md","lg","xl"]),disabled:l.boolean,loading:l.boolean,type:l.oneOf(["button","submit","reset"]),fullWidth:l.boolean,label:l.string,text:l.string,leftIcon:l.string,rightIcon:l.string,className:l.string,onClick:l.func},Ui=H("Button",It);function Gi(e){return Oe(e,"Button","onClick")}function Ji(e){if(e&&!["primary","secondary","outline","ghost","danger"].includes(e))throw J.invalidProp("Button","variant",e,["primary","secondary","outline","ghost","danger"])}function Yi(e){if(e&&!["xs","sm","md","lg","xl"].includes(e))throw J.invalidProp("Button","size",e,["xs","sm","md","lg","xl"])}var Pt="./Calendar-5vs6x7gj.stx";var Ot="./DateRangePicker-4zmf34e4.stx";var Dt="./EmptyState-snj7gbsn.stx";var Rt="./ErrorState-py6hga8x.stx";var jt="./ThemeToggle-4wm9zare.stx";var Ft="./Card-r55zpjqh.stx";var Bt="./Checkbox-m90hgax3.stx";var Wt="./ChoiceChips-8dcf172n.stx";var _t="./Combobox-9n04ec5w.stx";var Gt="./ComboboxButton-4r6a45s1.stx";var Yt="./ComboboxInput-1gyfpnca.stx";var Qt="./ComboboxOption-wkw70js7.stx";var es="./ComboboxOptions-zhr9b6rx.stx";var ss="./CommandPalette-qqjdbcyg.stx";var ns="./CommandPaletteItem-7290ce1z.stx";var rs="./Dialog-gec1h2y7.stx";var ls="./DialogBackdrop-de5m5m4w.stx";var ds="./DialogDescription-gth4c2kx.stx";var us="./DialogPanel-dj0qjfdq.stx";var fs="./DialogTitle-ke58hh68.stx";var gs="./Drawer-4rqfcg4f.stx";var xs="./Dropdown-hb8ks69x.stx";var ws="./DropdownButton-wxc25hsy.stx";var ks="./DropdownItem-af0vzc8a.stx";var $s="./DropdownItems-bkz7jkyz.stx";var Ts="./Form-cybgg9ym.stx";var Es={action:l.string,method:l.oneOf(["GET","POST","PUT","DELETE","PATCH"]),validationSchema:l.object,initialValues:l.object,validateOnChange:l.boolean,validateOnBlur:l.boolean,onSubmit:l.func,onError:l.func,className:l.string},dc=H("Form",Es);var As="./GroupedList-mx0b5fe7.stx";var Ls="./GroupedListRow-nz8b6vx4.stx";var Ns="./Image-16s7e6m2.stx";var Ms="./EmailInput-57626391.stx";var zs="./NumberInput-pq4k2k4k.stx";var Hs="./PasswordInput-dg41ktgd.stx";var Vs="./SearchInput-w15r5t95.stx";var qs="./TextInput-6q6t1kqd.stx";var Ws={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string},Ks={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,leftIcon:l.string,rightIcon:l.string,clearable:l.boolean,maxLength:l.number,showCount:l.boolean,type:l.oneOf(["text","date","time","datetime-local","month","week","url","tel","color","search","email","number","password"]),pattern:l.string,list:l.string,minLength:l.number,htmlSize:l.number,autofocus:l.boolean},_s={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,min:l.number,max:l.number,step:l.number,showControls:l.boolean},Us={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,showStrength:l.boolean},Gs={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,onSearch:l.func,loading:l.boolean},Ec=H("TextInput",Ks),Ic=H("EmailInput",Ws),Ac=H("PasswordInput",Us),Pc=H("NumberInput",_s),Lc=H("SearchInput",Gs);var Ys="./Listbox-83j2q4x6.stx";var Qs="./ListboxButton-gan8e3nw.stx";var eo="./ListboxLabel-ka0hfm7b.stx";var so="./ListboxOption-gpaqvk3s.stx";var no="./ListboxOptions-2928864k.stx";var ro="./FilterChip-00ja5jhz.stx";var lo="./FilterChips-7pnzycfd.stx";var po="./ListRow-8d3e1yxh.stx";var ho="./NavBar-qqrrhdnk.stx";var mo="./SectionCard-8ctdacjr.stx";var bo="./TabBar-8143650x.stx";var vo="./TabBarItem-kddfnhk3.stx";var yo="./Navigator-1yk1c3pp.stx";var Co="./Notification-b3cz24f0.stx";var So="./Pager-kh6s65t2.stx";var Eo="./PagerDots-076w890y.stx";var Ao="./Pagination-8bhbkpcp.stx";var Lo="./Checkout-crbegxyv.stx";var No="./DefaultPaymentMethod-ss3x61tr.stx";var Mo="./PaymentMethods-z4hhr0kv.stx";var zo="./SubscriptionCheckout-rdcv32n1.stx";var Ho="./Popover-khtvagcs.stx";var Vo="./PopoverButton-3w6550hv.stx";var qo="./PopoverPanel-d84gk1w1.stx";var Ko="./Portal-m73vz879.stx";var Uo="./Progress-2qzb77kc.stx";var Jo="./Radio-8153x74w.stx";var Xo="./RadioGroup-smqcqgds.stx";var Zo="./RadioGroupDescription-z34r9avr.stx";var tn="./RadioGroupLabel-ka0hfm7b.stx";var on="./RadioGroupOption-twcw1b2a.stx";var an="./SegmentedControl-9hd6y7pq.stx";var ln="./Select-61zv5tr7.stx";var dn="./Sidebar-8dygywjv.stx";var un="./SidebarFooter-s7skj92y.stx";var fn="./SidebarHeader-x7jdhmyr.stx";var gn="./SidebarItem-r4f2pref.stx";var xn="./SidebarPinned-48kyk193.stx";var wn="./SidebarSection-5sqza2j6.stx";var kn="./SidebarSpace-bwv98azf.stx";var $n="./SidebarSpaces-mdtrynr2.stx";var Tn="./SidebarSpaceSwitcher-1mycft2g.stx";var ae={blue:"#0088ff",red:"#ff383c",pink:"#ff2d55",orange:"#ff8d28",yellow:"#ffcc00",green:"#34c759",teal:"#00c3d0",cyan:"#00c0e8",indigo:"#6155f5",purple:"#cb30e0",brown:"#ac7f5e",gray:"#8e8e93"},_={pane:["bg-[#f2f2f4]/90 dark:bg-[#1c1c1e]/88","backdrop-blur-[50px] backdrop-saturate-[180%]","text-black dark:text-white","select-none"].join(" "),selection:"accent",layers:{shimmerRim:!0},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[10px] pb-[10px]",sectionHeader:["group/section flex w-full items-center","pl-[8px] pr-[6px] pt-[16px] pb-[5px]","text-[11px] font-semibold leading-[13px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/60"].join(" "),sectionChevron:["i-f7-chevron-down h-[11px] w-[11px] ml-auto","text-[#3c3c43]/45 dark:text-[#ebebf5]/45","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col",item:{base:["flex w-full items-center","h-[32px] rounded-[8px] pl-[4px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-black dark:text-white","transition-colors duration-150 ease-out","cursor-default"].join(" "),hover:"hover:bg-black/4 dark:hover:bg-white/6",active:"",pressed:"active:bg-black/10 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[18px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[11px] w-[11px]","text-[#3c3c43]/55 dark:text-[#ebebf5]/55","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[20px] w-[22px] shrink-0 items-center justify-center mr-[7px]",icon:"h-[17px] w-[17px]",image:"h-[20px] w-[20px] rounded-[4px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[13px] leading-[16px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/60"].join(" "),indentPerLevel:16}},En={selection:"classes",pane:"bg-[#f4f4f3] dark:bg-neutral-950 text-zinc-950 dark:text-white select-none",layers:{},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-5",sectionHeader:"group/section flex w-full items-center gap-2.5 px-4 pb-2 pt-5 text-[13px] font-semibold uppercase tracking-[0.12em] text-zinc-400 dark:text-zinc-500",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[16px] px-3.5 py-2 text-[14px] leading-tight transition-colors duration-150",hover:"hover:bg-[#ececea] hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e7e7e5] text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-[#e2e2e0] dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-500 dark:text-zinc-500",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/70 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},In={selection:"classes",pane:"bg-[#f3f3f1]/48 dark:bg-neutral-950/32 backdrop-blur-3xl backdrop-saturate-150 text-zinc-950 dark:text-white select-none",layers:{tint:"bg-[linear-gradient(112deg,rgba(255,255,255,0.20)_0%,rgba(255,255,255,0.04)_45%,rgba(226,226,222,0.16)_100%)] dark:bg-[linear-gradient(112deg,rgba(255,255,255,0.08)_0%,rgba(255,255,255,0.02)_46%,rgba(255,255,255,0.06)_100%)]"},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-2",sectionHeader:"group/section flex w-full items-center gap-2.5 px-3 pb-1.5 pt-3 rounded-[14px] text-[12px] font-semibold uppercase tracking-[0.10em] text-zinc-500/80 dark:text-zinc-400/80",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[14px] px-3 py-1.5 text-[13.5px] leading-tight transition-colors duration-150",hover:"hover:bg-white/38 hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e8e8e6]/90 text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-white/50 dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-600 dark:text-zinc-400",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/72 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},An={selection:"classes",pane:["bg-[#f7f5f1]/92 dark:bg-[#1a1a1c]/92","backdrop-blur-[40px] backdrop-saturate-[160%]","text-[#2c2a28] dark:text-[#ededf0]","select-none"].join(" "),layers:{tint:["bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,251,242,0.55))_0%,rgba(255,255,255,0)_38%)]","dark:bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,255,255,0.05))_0%,rgba(255,255,255,0)_42%)]"].join(" ")},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[16px] pb-[8px]",sectionHeader:["group/section flex w-full items-center","px-[8px] pt-[14px] pb-[4px]","text-[11px] font-medium leading-[13px]","opacity-55"].join(" "),sectionChevron:["i-f7-chevron-down h-[10px] w-[10px] ml-auto","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col space-y-[2px]",item:{base:["flex w-full items-center","h-[30px] rounded-[8px] pl-[6px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-current","transition-[background-color,box-shadow,color] duration-150 ease-out","cursor-default"].join(" "),hover:"hover:bg-white/55 dark:hover:bg-white/8",active:["bg-white dark:bg-white/14","font-medium","shadow-[0_1px_2px_rgba(0,0,0,0.08)] dark:shadow-[0_1px_2px_rgba(0,0,0,0.35)]","ring-1 ring-black/5 dark:ring-white/8"].join(" "),pressed:"active:bg-white/80 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[16px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[10px] w-[10px] opacity-45","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[18px] w-[18px] shrink-0 items-center justify-center mr-[8px]",icon:"h-[16px] w-[16px]",image:"h-[18px] w-[18px] rounded-[5px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[12px] leading-[16px] opacity-45"].join(" "),indentPerLevel:14}},Pn={..._,pane:"bg-stone-100 dark:bg-neutral-900 text-black dark:text-white select-none",layers:{}},Ln={..._,pane:"bg-transparent text-black dark:text-white select-none",layers:{}},On={..._,pane:"bg-white/50 dark:bg-black/40 backdrop-blur-3xl backdrop-saturate-200 text-black dark:text-white select-none",layers:{}},Ne={macos:_,tahoe:_,"macos-tahoe":_,"macos-latest":_,arc:An,workspace:En,desktop:In,solid:Pn,transparent:Ln,vibrancy:On};function vp(e){return Ne[e||"macos"]||Ne.macos}function wp(e){if(!e)return;return ae[e]||e}var Nn=ae.gray;function q(e,t,s){return`color-mix(in oklab, ${e} ${t}%, ${s})`}function De(e){return{light:{from:q(e,35,"#ffffff"),to:q(e,12.5,"#ffffff"),ink:q(e,22,"#17171b"),accent:q(e,88,"#2a2a30")},dark:{from:q(e,27,"#101014"),to:q(e,10,"#08080b"),ink:q(e,12,"#f4f4f7"),accent:q(e,74,"#ffffff")}}}function Cp(e,t){return`linear-gradient(180deg, ${e} 0%, ${t} 100%)`}function Dn(e){if(!e)return De(Nn);if(typeof e!=="string")return e;return De(ae[e]||e)}function Mn(e){return[`--stx-space-light-from: ${e.light.from}`,`--stx-space-light-to: ${e.light.to}`,`--stx-space-light-ink: ${e.light.ink}`,`--stx-space-light-accent: ${e.light.accent}`,`--stx-space-dark-from: ${e.dark.from}`,`--stx-space-dark-to: ${e.dark.to}`,`--stx-space-dark-ink: ${e.dark.ink}`,`--stx-space-dark-accent: ${e.dark.accent}`].join("; ")}function Me(e,t,s,o){if(!e||!e.label)return null;return{id:e.id||`${t}-${s}`,label:e.label,icon:e.icon||o}}function Rn(e){let t=Dn(e.tint);return{id:e.id,label:e.label||"",icon:e.icon||"",pinned:e.pinned||[],sections:e.sections||[],action:Me(e.action,e.id,"action","i-f7-plus"),clear:Me(e.clear,e.id,"clear","i-f7-arrow-down"),tint:t,style:Mn(t),deferred:e.deferred===!0,showTitle:e.showTitle??!0}}function $p(e){return(e||[]).map(Rn)}function Sp(e,t){if(!t)return 0;let s=e.findIndex((o)=>o.id===t);return s===-1?0:s}function Tp(e){return e.map((t)=>t.tint)}var jn="./Skeleton-m4p66zcs.stx";var Fn="./Spinner-vhnc3y03.stx";var Bn="./Stepper-68gxcmej.stx";var Wn="./StepperStep-zf4pq1s0.stx";class re{storage;namespace;watchers=new Map;encryptionKey="stx-storage-key";constructor(e="local",t=""){if(this.storage=e==="local"?globalThis.localStorage:globalThis.sessionStorage,this.namespace=t,typeof window<"u")window.addEventListener("storage",this.handleStorageEvent.bind(this))}handleStorageEvent(e){if(!e.key)return;let t=this.namespace&&e.key.startsWith(`${this.namespace}:`)?e.key.slice(this.namespace.length+1):e.key,s=this.watchers.get(t);if(s){let o=e.oldValue?JSON.parse(e.oldValue).value:null,n=e.newValue?JSON.parse(e.newValue).value:null;s.forEach((a)=>a(n,o,t))}}encrypt(e){let t="";for(let s=0;s<e.length;s++)t+=String.fromCharCode(e.charCodeAt(s)^this.encryptionKey.charCodeAt(s%this.encryptionKey.length));return btoa(t)}decrypt(e){try{let t=atob(e),s="";for(let o=0;o<t.length;o++)s+=String.fromCharCode(t.charCodeAt(o)^this.encryptionKey.charCodeAt(o%this.encryptionKey.length));return s}catch{return e}}compress(e){if(e.length<100)return e;let t={},s=256,o=[],n="";for(let a=0;a<e.length;a++){let r=e.charAt(a),i=n+r;if(t[i]!==void 0)n=i;else o.push(n.length>1?t[n]:n.charCodeAt(0)),t[i]=s++,n=r}if(n!=="")o.push(n.length>1?t[n]:n.charCodeAt(0));return JSON.stringify(o)}decompress(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return e;let s={},o=256,n=String.fromCharCode(t[0]),a=n;for(let r=1;r<t.length;r++){let i=t[r],c;if(s[i]!==void 0)c=s[i];else if(i===o)c=n+n.charAt(0);else return e;a+=c,s[o++]=n+c.charAt(0),n=c}return a}catch{return e}}getKey(e){return this.namespace?`${this.namespace}:${e}`:e}set(e,t,s){let o=this.getKey(e),n=this.get(e),a={value:t,timestamp:Date.now(),expire:s?.expire,encrypted:s?.encrypt||!1,compressed:s?.compress||!1};try{let r=JSON.stringify(a);if(s?.compress)r=this.compress(r);if(s?.encrypt)r=this.encrypt(r);this.storage.setItem(o,r),this.notifyWatchers(e,t,n)}catch(r){console.error("Storage set error:",r)}}get(e){let t=this.getKey(e);try{let s=this.storage.getItem(t);if(!s)return null;if(s.match(/^[A-Z0-9+/]+=*$/i))try{s=this.decrypt(s)}catch{}if(s.startsWith("["))try{s=this.decompress(s)}catch{}let o=JSON.parse(s);if(o.expire&&Date.now()-o.timestamp>o.expire)return this.remove(e),null;return o.value}catch(s){return console.error("Storage get error:",s),null}}watch(e,t){if(!this.watchers.has(e))this.watchers.set(e,new Set);return this.watchers.get(e).add(t),()=>{let s=this.watchers.get(e);if(s){if(s.delete(t),s.size===0)this.watchers.delete(e)}}}notifyWatchers(e,t,s){let o=this.watchers.get(e);if(o)o.forEach((n)=>n(t,s,e))}remove(e){let t=this.getKey(e),s=this.get(e);this.storage.removeItem(t),this.notifyWatchers(e,null,s)}clear(){if(this.namespace)this.keys().forEach((t)=>this.remove(t));else this.storage.clear()}has(e){return this.get(e)!==null}keys(){let e=Object.keys(this.storage);if(this.namespace){let t=`${this.namespace}:`;return e.filter((s)=>s.startsWith(t)).map((s)=>s.slice(t.length))}return e}size(){return this.keys().length}getQuota(){if("storage"in navigator&&"estimate"in navigator.storage)return null;try{let e=0;for(let s=0;s<this.storage.length;s++){let o=this.storage.key(s);if(o){let n=this.storage.getItem(o)||"";e+=o.length+n.length}}let t=5242880;return{usage:e*2,quota:t,percentage:e*2/t*100}}catch{return null}}setMany(e,t){Object.entries(e).forEach(([s,o])=>{this.set(s,o,t)})}getMany(e){let t={};return e.forEach((s)=>{t[s]=this.get(s)}),t}removeMany(e){e.forEach((t)=>this.remove(t))}}var Qp={local:new re("local"),session:new re("session")};function Zp(e="local",t){return new re(e,t)}var _n="./Switch-rbxpzn5g.stx";var Gn="./Table-0a4y46vd.stx";var Yn="./TableBody-y49bqb1p.stx";var Qn="./TableCell-jhvsxw8b.stx";var ea="./TableHead-e9xvjx2j.stx";var sa="./TableHeader-krzcx4sv.stx";var na="./TableRow-dt8e11aj.stx";var ra="./Tab-46mxm7f8.stx";var la="./TabList-5xwk2zmz.stx";var da="./TabPanel-5htevsq6.stx";var ua="./Tabs-bp03efe6.stx";var fa="./Teleport-vqs75x36.stx";var ga="./Textarea-9xmhjqp8.stx";var xa="./Tooltip-4fv809dm.stx";var wa="./Transition-7m0mk45s.stx";var ka="./Video-sc26cz9v.stx";var $a="./VirtualList-fa7v5a3h.stx";var Ta="./VirtualTable-kp7b3wyv.stx";var Ea=0;function Re(e="a11y"){return`${e}-${++Ea}-${Date.now()}`}function Uu(e,t,s={}){let{visible:o=!1,id:n=Re("label")}=s,a=document.createElement(o?"label":"span");if(a.id=n,a.textContent=e,!o)Object.assign(a.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"});if(t)if(t.setAttribute("aria-labelledby",n),t.parentElement)t.parentElement.insertBefore(a,t);else document.body.appendChild(a);return n}function Gu(e,t){let s=Re("desc"),o=document.createElement("span");if(o.id=s,o.textContent=e,Object.assign(o.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t)if(t.setAttribute("aria-describedby",s),t.parentElement)t.parentElement.insertBefore(o,t);else document.body.appendChild(o);return s}function Ju(e,t="polite"){let s=document.createElement("div");s.setAttribute("role","status"),s.setAttribute("aria-live",t),s.setAttribute("aria-atomic","true"),Object.assign(s.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),document.body.appendChild(s),setTimeout(()=>{s.textContent=e},100),setTimeout(()=>{s.parentNode?.removeChild(s)},1000)}function ve(e){let t=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(t)).filter((s)=>s.offsetParent!==null)}function Yu(e,t={}){let{initialFocus:s,returnFocus:o,escapeDeactivates:n=!0,clickOutsideDeactivates:a=!0,allowOutsideClick:r=!1,onActivate:i,onDeactivate:c}=t,p=!1,u=!1,d=null,g=(v)=>{if(u)return;if(n&&v.key==="Escape"){v.preventDefault(),C();return}if(v.key==="Tab"){let E=ve(e);if(E.length===0){v.preventDefault();return}let A=E[0],S=E[E.length-1];if(v.shiftKey){if(document.activeElement===A)v.preventDefault(),S.focus()}else if(document.activeElement===S)v.preventDefault(),A.focus()}},m=(v)=>{if(u)return;if(!e.contains(v.target)){if(typeof r==="function"){if(!r(v)&&a)C()}else if(!r&&a)C()}};function k(){if(p)return;p=!0,d=document.activeElement;let v=s||ve(e)[0];if(v&&typeof v.focus==="function")v.focus();document.addEventListener("keydown",g),document.addEventListener("click",m),i?.()}function C(){if(!p)return;p=!1;let v=o||d;if(v&&typeof v.focus==="function")v.focus();document.removeEventListener("keydown",g),document.removeEventListener("click",m),c?.()}function y(){u=!0}function b(){u=!1}return{activate:k,deactivate:C,pause:y,unpause:b}}function Xu(e,t={}){let{selector:s='[role="option"], [role="menuitem"], [role="tab"], button',initialIndex:o=0,orientation:n="both",loop:a=!0,onFocusChange:r}=t,i=o,c=()=>Array.from(e.querySelectorAll(s)),p=(d)=>{let g=c();if(d<0||d>=g.length)return;g.forEach((m,k)=>{if(k===d){if(m.setAttribute("tabindex","0"),typeof m.focus==="function")m.focus()}else m.setAttribute("tabindex","-1")}),i=d,r?.(d,g[d])},u=(d)=>{let m=c().length-1,k=!1,C=i;switch(d.key){case"ArrowRight":if(n==="horizontal"||n==="both"){if(C=i+1,C>m)C=a?0:m;k=!0}break;case"ArrowLeft":if(n==="horizontal"||n==="both"){if(C=i-1,C<0)C=a?m:0;k=!0}break;case"ArrowDown":if(n==="vertical"||n==="both"){if(C=i+1,C>m)C=a?0:m;k=!0}break;case"ArrowUp":if(n==="vertical"||n==="both"){if(C=i-1,C<0)C=a?m:0;k=!0}break;case"Home":C=0,k=!0;break;case"End":C=m,k=!0;break}if(k)d.preventDefault(),p(C)};return p(o),e.addEventListener("keydown",u),()=>{e.removeEventListener("keydown",u)}}var Qu={Enter:"Enter",Space:" ",Escape:"Escape",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Tab:"Tab",Home:"Home",End:"End",PageUp:"PageUp",PageDown:"PageDown"};function Zu(e){return document.activeElement===e}function eh(e,t){let s=t||document.activeElement,o=ve(document.body),n=o.indexOf(s);if(n===-1)return;let a=e==="next"?n+1:n-1,r=o[a];if(r)r.focus()}function th(e){if(e.getAttribute("aria-hidden")==="true")return!1;let t=window.getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden")return!1;return!0}var sh={setExpanded(e,t){e.setAttribute("aria-expanded",String(t))},setSelected(e,t){e.setAttribute("aria-selected",String(t))},setChecked(e,t){e.setAttribute("aria-checked",String(t))},setDisabled(e,t){if(e.setAttribute("aria-disabled",String(t)),t)e.setAttribute("tabindex","-1");else e.removeAttribute("tabindex")},setHidden(e,t){if(t)e.setAttribute("aria-hidden","true");else e.removeAttribute("aria-hidden")},setPressed(e,t){e.setAttribute("aria-pressed",String(t))},setInvalid(e,t){e.setAttribute("aria-invalid",String(t))},setRequired(e,t){e.setAttribute("aria-required",String(t))},setLive(e,t){e.setAttribute("aria-live",t)},setBusy(e,t){e.setAttribute("aria-busy",String(t))}};function oh(e){let t=document.createElement("span");return t.textContent=e,t.className="sr-only",Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t}function nh(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-reduced-motion: reduce)").matches;return!1}function ah(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-contrast: high)").matches;return!1}function rh(){if(typeof window.matchMedia==="function"){if(window.matchMedia("(prefers-color-scheme: dark)").matches)return"dark";if(window.matchMedia("(prefers-color-scheme: light)").matches)return"light"}return null}function ih(e,t="Skip to main content"){let s=document.createElement("a");return s.href=`#${e}`,s.textContent=t,s.className="skip-link",Object.assign(s.style,{position:"absolute",top:"-40px",left:"0",background:"#000",color:"#fff",padding:"8px",textDecoration:"none",zIndex:"100"}),s.addEventListener("focus",()=>{s.style.top="0"}),s.addEventListener("blur",()=>{s.style.top="-40px"}),s}function lh(e){let t=[],s=(o)=>{let n=e.getAttribute(o);if(n){let a=n.split(" ");for(let r of a)if(!document.getElementById(r))t.push(`${o} references non-existent ID: ${r}`)}};return s("aria-labelledby"),s("aria-describedby"),s("aria-controls"),s("aria-owns"),s("aria-activedescendant"),t}var Ia=(e,t,s,o)=>s*e/o+t,Aa=(e,t,s,o)=>(e/=o,s*e*e+t),Pa=(e,t,s,o)=>(e/=o,-s*e*(e-2)+t),La=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e+t;return e--,-s/2*(e*(e-2)-1)+t},Oa=(e,t,s,o)=>(e/=o,s*e*e*e+t),Na=(e,t,s,o)=>(e/=o,e--,s*(e*e*e+1)+t),Da=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e+t;return e-=2,s/2*(e*e*e+2)+t},Ma=(e,t,s,o)=>(e/=o,s*e*e*e*e+t),Ra=(e,t,s,o)=>(e/=o,e--,-s*(e*e*e*e-1)+t),za=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e+t;return e-=2,-s/2*(e*e*e*e-2)+t},ja=(e,t,s,o)=>(e/=o,s*e*e*e*e*e+t),Ha=(e,t,s,o)=>(e/=o,e--,s*(e*e*e*e*e+1)+t),Fa=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e*e+t;return e-=2,s/2*(e*e*e*e*e+2)+t},Va=(e,t,s,o)=>-s*Math.cos(e/o*(Math.PI/2))+s+t,Ba=(e,t,s,o)=>s*Math.sin(e/o*(Math.PI/2))+t,qa=(e,t,s,o)=>-s/2*(Math.cos(Math.PI*e/o)-1)+t,Wa=(e,t,s,o)=>e===0?t:s*2**(10*(e/o-1))+t,Ka=(e,t,s,o)=>e===o?t+s:s*(-(2**(-10*e/o))+1)+t,_a=(e,t,s,o)=>{if(e===0)return t;if(e===o)return t+s;if(e/=o/2,e<1)return s/2*2**(10*(e-1))+t;return e--,s/2*(-(2**(-10*e))+2)+t},Ua=(e,t,s,o)=>(e/=o,-s*(Math.sqrt(1-e*e)-1)+t),Ga=(e,t,s,o)=>(e/=o,e--,s*Math.sqrt(1-e*e)+t),Ja=(e,t,s,o)=>{if(e/=o/2,e<1)return-s/2*(Math.sqrt(1-e*e)-1)+t;return e-=2,s/2*(Math.sqrt(1-e*e)+1)+t},Ya=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!a)a=o*0.3;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);return e-=1,-(r*2**(10*e)*Math.sin((e*o-n)*(2*Math.PI)/a))+t},Xa=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!a)a=o*0.3;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);return r*2**(-10*e)*Math.sin((e*o-n)*(2*Math.PI)/a)+s+t},Qa=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o/2,e===2)return t+s;if(!a)a=o*0.44999999999999996;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);if(e<1)return e-=1,-0.5*(r*2**(10*e)*Math.sin((e*o-n)*(2*Math.PI)/a))+t;return e-=1,r*2**(-10*e)*Math.sin((e*o-n)*(2*Math.PI)/a)*0.5+s+t},Za=(e,t,s,o)=>(e/=o,s*e*e*(2.70158*e-1.70158)+t),er=(e,t,s,o)=>(e/=o,e--,s*(e*e*(2.70158*e+1.70158)+1)+t),tr=(e,t,s,o)=>{let n=1.70158;if(e/=o/2,e<1)return n*=1.525,s/2*(e*e*((n+1)*e-n))+t;return e-=2,n*=1.525,s/2*(e*e*((n+1)*e+n)+2)+t},we=(e,t,s,o)=>{if(e/=o,e<0.36363636363636365)return s*(7.5625*e*e)+t;else if(e<0.7272727272727273)return e-=0.5454545454545454,s*(7.5625*e*e+0.75)+t;else if(e<0.9090909090909091)return e-=0.8181818181818182,s*(7.5625*e*e+0.9375)+t;else return e-=0.9545454545454546,s*(7.5625*e*e+0.984375)+t},ze=(e,t,s,o)=>s-we(o-e,0,s,o)+t,sr=(e,t,s,o)=>{if(e<o/2)return ze(e*2,0,s,o)*0.5+t;return we(e*2-o,0,s,o)*0.5+s*0.5+t},dh={linear:Ia,easeInQuad:Aa,easeOutQuad:Pa,easeInOutQuad:La,easeInCubic:Oa,easeOutCubic:Na,easeInOutCubic:Da,easeInQuart:Ma,easeOutQuart:Ra,easeInOutQuart:za,easeInQuint:ja,easeOutQuint:Ha,easeInOutQuint:Fa,easeInSine:Va,easeOutSine:Ba,easeInOutSine:qa,easeInExpo:Wa,easeOutExpo:Ka,easeInOutExpo:_a,easeInCirc:Ua,easeOutCirc:Ga,easeInOutCirc:Ja,easeInElastic:Ya,easeOutElastic:Xa,easeInOutElastic:Qa,easeInBack:Za,easeOutBack:er,easeInOutBack:tr,easeInBounce:ze,easeOutBounce:we,easeInOutBounce:sr};function or(e,t={}){let{duration:s="1s",timing:o="ease",delay:n="0s",iteration:a="1",direction:r="normal",fill:i="both",playState:c="running"}=t;return`${e} ${s} ${o} ${n} ${a} ${r} ${i} ${c}`}function je(e,t,s={}){e.style.animation=or(t,s)}function uh(e){e.style.animation=""}function nr(e){return new Promise((t)=>{let s=()=>{e.removeEventListener("animationend",s),t()};e.addEventListener("animationend",s)})}function hh(e,t,s={}){let{stagger:o=100,...n}=s;e.forEach((a,r)=>{let i=`${r*o}ms`;je(a,t,{...n,delay:i})})}async function fh(e,t){for(let s of t)je(e,s.name,s.options),await nr(e)}var mh={fadeIn:"animate-fade-in",fadeOut:"animate-fade-out",slideInUp:"animate-slide-in-up",slideInDown:"animate-slide-in-down",slideInLeft:"animate-slide-in-left",slideInRight:"animate-slide-in-right",zoomIn:"animate-zoom-in",zoomOut:"animate-zoom-out",bounce:"animate-bounce",spin:"animate-spin",ping:"animate-ping",pulse:"animate-pulse"};function gh(e,t,s=1000){return new Promise((o)=>{e.classList.add(t),setTimeout(()=>{e.classList.remove(t),o()},s)})}function bh(e,t){let s=`
11
+ `)}`)}return{valid:r.length===0,errors:r}}function H(e,t,s){return(o)=>St(e,o,t,s)}function Vi(e,t,s="value"){if(!t.validate(e,s,"assertion"))throw Error(t.message(e,s,"assertion"))}function Bi(e,t,s="value"){if(!t.validate(e,s,"warning"))console.warn(t.message(e,s,"warning"))}var Et="./Button-55ahz0j6.stx";var It={variant:l.oneOf(["primary","secondary","outline","ghost","danger"]),size:l.oneOf(["xs","sm","md","lg","xl"]),disabled:l.boolean,loading:l.boolean,type:l.oneOf(["button","submit","reset"]),fullWidth:l.boolean,label:l.string,text:l.string,leftIcon:l.string,rightIcon:l.string,className:l.string,onClick:l.func},Ui=H("Button",It);function Gi(e){return Oe(e,"Button","onClick")}function Ji(e){if(e&&!["primary","secondary","outline","ghost","danger"].includes(e))throw J.invalidProp("Button","variant",e,["primary","secondary","outline","ghost","danger"])}function Yi(e){if(e&&!["xs","sm","md","lg","xl"].includes(e))throw J.invalidProp("Button","size",e,["xs","sm","md","lg","xl"])}var Pt="./Calendar-5vs6x7gj.stx";var Ot="./DateRangePicker-4zmf34e4.stx";var Dt="./EmptyState-snj7gbsn.stx";var Rt="./ErrorState-py6hga8x.stx";var jt="./ThemeToggle-4wm9zare.stx";var Ft="./Card-r55zpjqh.stx";var Bt="./Checkbox-m90hgax3.stx";var Wt="./ChoiceChips-8dcf172n.stx";var _t="./Combobox-9n04ec5w.stx";var Gt="./ComboboxButton-4r6a45s1.stx";var Yt="./ComboboxInput-1gyfpnca.stx";var Qt="./ComboboxOption-wkw70js7.stx";var es="./ComboboxOptions-zhr9b6rx.stx";var ss="./CommandPalette-qqjdbcyg.stx";var ns="./CommandPaletteItem-7290ce1z.stx";var rs="./Dialog-gec1h2y7.stx";var ls="./DialogBackdrop-de5m5m4w.stx";var ds="./DialogDescription-gth4c2kx.stx";var us="./DialogPanel-dj0qjfdq.stx";var fs="./DialogTitle-ke58hh68.stx";var gs="./Drawer-4rqfcg4f.stx";var xs="./Dropdown-hb8ks69x.stx";var ws="./DropdownButton-wxc25hsy.stx";var ks="./DropdownItem-af0vzc8a.stx";var $s="./DropdownItems-bkz7jkyz.stx";var Ts="./Form-cybgg9ym.stx";var Es={action:l.string,method:l.oneOf(["GET","POST","PUT","DELETE","PATCH"]),validationSchema:l.object,initialValues:l.object,validateOnChange:l.boolean,validateOnBlur:l.boolean,onSubmit:l.func,onError:l.func,className:l.string},dc=H("Form",Es);var As="./GroupedList-mx0b5fe7.stx";var Ls="./GroupedListRow-nz8b6vx4.stx";var Ns="./Image-16s7e6m2.stx";var Ms="./EmailInput-57626391.stx";var zs="./NumberInput-pq4k2k4k.stx";var Hs="./PasswordInput-dg41ktgd.stx";var Vs="./SearchInput-w15r5t95.stx";var qs="./TextInput-6q6t1kqd.stx";var Ws={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string},Ks={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,leftIcon:l.string,rightIcon:l.string,clearable:l.boolean,maxLength:l.number,showCount:l.boolean,type:l.oneOf(["text","date","time","datetime-local","month","week","url","tel","color","search","email","number","password"]),pattern:l.string,list:l.string,minLength:l.number,htmlSize:l.number,autofocus:l.boolean},_s={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,min:l.number,max:l.number,step:l.number,showControls:l.boolean},Us={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,showStrength:l.boolean},Gs={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,onSearch:l.func,loading:l.boolean},Ec=H("TextInput",Ks),Ic=H("EmailInput",Ws),Ac=H("PasswordInput",Us),Pc=H("NumberInput",_s),Lc=H("SearchInput",Gs);var Ys="./Listbox-83j2q4x6.stx";var Qs="./ListboxButton-gan8e3nw.stx";var eo="./ListboxLabel-ka0hfm7b.stx";var so="./ListboxOption-gpaqvk3s.stx";var no="./ListboxOptions-2928864k.stx";var ro="./FilterChip-00ja5jhz.stx";var lo="./FilterChips-7pnzycfd.stx";var po="./ListRow-8d3e1yxh.stx";var ho="./NavBar-qqrrhdnk.stx";var mo="./SectionCard-8ctdacjr.stx";var bo="./TabBar-8143650x.stx";var vo="./TabBarItem-kddfnhk3.stx";var yo="./Navigator-1yk1c3pp.stx";var Co="./Notification-b3cz24f0.stx";var So="./Pager-kh6s65t2.stx";var Eo="./PagerDots-076w890y.stx";var Ao="./Pagination-8bhbkpcp.stx";var Lo="./Checkout-crbegxyv.stx";var No="./DefaultPaymentMethod-ss3x61tr.stx";var Mo="./PaymentMethods-z4hhr0kv.stx";var zo="./SubscriptionCheckout-rdcv32n1.stx";var Ho="./Popover-jjt7p7sn.stx";var Vo="./PopoverButton-ks3cttd9.stx";var qo="./PopoverPanel-ddgj4gz3.stx";var Ko="./Portal-m73vz879.stx";var Uo="./Progress-2qzb77kc.stx";var Jo="./Radio-8153x74w.stx";var Xo="./RadioGroup-smqcqgds.stx";var Zo="./RadioGroupDescription-z34r9avr.stx";var tn="./RadioGroupLabel-ka0hfm7b.stx";var on="./RadioGroupOption-twcw1b2a.stx";var an="./SegmentedControl-9hd6y7pq.stx";var ln="./Select-61zv5tr7.stx";var dn="./Sidebar-8dygywjv.stx";var un="./SidebarFooter-s7skj92y.stx";var fn="./SidebarHeader-x7jdhmyr.stx";var gn="./SidebarItem-r4f2pref.stx";var xn="./SidebarPinned-48kyk193.stx";var wn="./SidebarSection-5sqza2j6.stx";var kn="./SidebarSpace-bwv98azf.stx";var $n="./SidebarSpaces-mdtrynr2.stx";var Tn="./SidebarSpaceSwitcher-1mycft2g.stx";var ae={blue:"#0088ff",red:"#ff383c",pink:"#ff2d55",orange:"#ff8d28",yellow:"#ffcc00",green:"#34c759",teal:"#00c3d0",cyan:"#00c0e8",indigo:"#6155f5",purple:"#cb30e0",brown:"#ac7f5e",gray:"#8e8e93"},_={pane:["bg-[#f2f2f4]/90 dark:bg-[#1c1c1e]/88","backdrop-blur-[50px] backdrop-saturate-[180%]","text-black dark:text-white","select-none"].join(" "),selection:"accent",layers:{shimmerRim:!0},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[10px] pb-[10px]",sectionHeader:["group/section flex w-full items-center","pl-[8px] pr-[6px] pt-[16px] pb-[5px]","text-[11px] font-semibold leading-[13px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/60"].join(" "),sectionChevron:["i-f7-chevron-down h-[11px] w-[11px] ml-auto","text-[#3c3c43]/45 dark:text-[#ebebf5]/45","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col",item:{base:["flex w-full items-center","h-[32px] rounded-[8px] pl-[4px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-black dark:text-white","transition-colors duration-150 ease-out","cursor-default"].join(" "),hover:"hover:bg-black/4 dark:hover:bg-white/6",active:"",pressed:"active:bg-black/10 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[18px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[11px] w-[11px]","text-[#3c3c43]/55 dark:text-[#ebebf5]/55","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[20px] w-[22px] shrink-0 items-center justify-center mr-[7px]",icon:"h-[17px] w-[17px]",image:"h-[20px] w-[20px] rounded-[4px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[13px] leading-[16px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/60"].join(" "),indentPerLevel:16}},En={selection:"classes",pane:"bg-[#f4f4f3] dark:bg-neutral-950 text-zinc-950 dark:text-white select-none",layers:{},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-5",sectionHeader:"group/section flex w-full items-center gap-2.5 px-4 pb-2 pt-5 text-[13px] font-semibold uppercase tracking-[0.12em] text-zinc-400 dark:text-zinc-500",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[16px] px-3.5 py-2 text-[14px] leading-tight transition-colors duration-150",hover:"hover:bg-[#ececea] hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e7e7e5] text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-[#e2e2e0] dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-500 dark:text-zinc-500",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/70 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},In={selection:"classes",pane:"bg-[#f3f3f1]/48 dark:bg-neutral-950/32 backdrop-blur-3xl backdrop-saturate-150 text-zinc-950 dark:text-white select-none",layers:{tint:"bg-[linear-gradient(112deg,rgba(255,255,255,0.20)_0%,rgba(255,255,255,0.04)_45%,rgba(226,226,222,0.16)_100%)] dark:bg-[linear-gradient(112deg,rgba(255,255,255,0.08)_0%,rgba(255,255,255,0.02)_46%,rgba(255,255,255,0.06)_100%)]"},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-2",sectionHeader:"group/section flex w-full items-center gap-2.5 px-3 pb-1.5 pt-3 rounded-[14px] text-[12px] font-semibold uppercase tracking-[0.10em] text-zinc-500/80 dark:text-zinc-400/80",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[14px] px-3 py-1.5 text-[13.5px] leading-tight transition-colors duration-150",hover:"hover:bg-white/38 hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e8e8e6]/90 text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-white/50 dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-600 dark:text-zinc-400",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/72 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},An={selection:"classes",pane:["bg-[#f7f5f1]/92 dark:bg-[#1a1a1c]/92","backdrop-blur-[40px] backdrop-saturate-[160%]","text-[#2c2a28] dark:text-[#ededf0]","select-none"].join(" "),layers:{tint:["bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,251,242,0.55))_0%,rgba(255,255,255,0)_38%)]","dark:bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,255,255,0.05))_0%,rgba(255,255,255,0)_42%)]"].join(" ")},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[16px] pb-[8px]",sectionHeader:["group/section flex w-full items-center","px-[8px] pt-[14px] pb-[4px]","text-[11px] font-medium leading-[13px]","opacity-55"].join(" "),sectionChevron:["i-f7-chevron-down h-[10px] w-[10px] ml-auto","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col space-y-[2px]",item:{base:["flex w-full items-center","h-[30px] rounded-[8px] pl-[6px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-current","transition-[background-color,box-shadow,color] duration-150 ease-out","cursor-default"].join(" "),hover:"hover:bg-white/55 dark:hover:bg-white/8",active:["bg-white dark:bg-white/14","font-medium","shadow-[0_1px_2px_rgba(0,0,0,0.08)] dark:shadow-[0_1px_2px_rgba(0,0,0,0.35)]","ring-1 ring-black/5 dark:ring-white/8"].join(" "),pressed:"active:bg-white/80 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[16px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[10px] w-[10px] opacity-45","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[18px] w-[18px] shrink-0 items-center justify-center mr-[8px]",icon:"h-[16px] w-[16px]",image:"h-[18px] w-[18px] rounded-[5px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[12px] leading-[16px] opacity-45"].join(" "),indentPerLevel:14}},Pn={..._,pane:"bg-stone-100 dark:bg-neutral-900 text-black dark:text-white select-none",layers:{}},Ln={..._,pane:"bg-transparent text-black dark:text-white select-none",layers:{}},On={..._,pane:"bg-white/50 dark:bg-black/40 backdrop-blur-3xl backdrop-saturate-200 text-black dark:text-white select-none",layers:{}},Ne={macos:_,tahoe:_,"macos-tahoe":_,"macos-latest":_,arc:An,workspace:En,desktop:In,solid:Pn,transparent:Ln,vibrancy:On};function vp(e){return Ne[e||"macos"]||Ne.macos}function wp(e){if(!e)return;return ae[e]||e}var Nn=ae.gray;function q(e,t,s){return`color-mix(in oklab, ${e} ${t}%, ${s})`}function De(e){return{light:{from:q(e,35,"#ffffff"),to:q(e,12.5,"#ffffff"),ink:q(e,22,"#17171b"),accent:q(e,88,"#2a2a30")},dark:{from:q(e,27,"#101014"),to:q(e,10,"#08080b"),ink:q(e,12,"#f4f4f7"),accent:q(e,74,"#ffffff")}}}function Cp(e,t){return`linear-gradient(180deg, ${e} 0%, ${t} 100%)`}function Dn(e){if(!e)return De(Nn);if(typeof e!=="string")return e;return De(ae[e]||e)}function Mn(e){return[`--stx-space-light-from: ${e.light.from}`,`--stx-space-light-to: ${e.light.to}`,`--stx-space-light-ink: ${e.light.ink}`,`--stx-space-light-accent: ${e.light.accent}`,`--stx-space-dark-from: ${e.dark.from}`,`--stx-space-dark-to: ${e.dark.to}`,`--stx-space-dark-ink: ${e.dark.ink}`,`--stx-space-dark-accent: ${e.dark.accent}`].join("; ")}function Me(e,t,s,o){if(!e||!e.label)return null;return{id:e.id||`${t}-${s}`,label:e.label,icon:e.icon||o}}function Rn(e){let t=Dn(e.tint);return{id:e.id,label:e.label||"",icon:e.icon||"",pinned:e.pinned||[],sections:e.sections||[],action:Me(e.action,e.id,"action","i-f7-plus"),clear:Me(e.clear,e.id,"clear","i-f7-arrow-down"),tint:t,style:Mn(t),deferred:e.deferred===!0,showTitle:e.showTitle??!0}}function $p(e){return(e||[]).map(Rn)}function Sp(e,t){if(!t)return 0;let s=e.findIndex((o)=>o.id===t);return s===-1?0:s}function Tp(e){return e.map((t)=>t.tint)}var jn="./Skeleton-m4p66zcs.stx";var Fn="./Spinner-vhnc3y03.stx";var Bn="./Stepper-68gxcmej.stx";var Wn="./StepperStep-zf4pq1s0.stx";class re{storage;namespace;watchers=new Map;encryptionKey="stx-storage-key";constructor(e="local",t=""){if(this.storage=e==="local"?globalThis.localStorage:globalThis.sessionStorage,this.namespace=t,typeof window<"u")window.addEventListener("storage",this.handleStorageEvent.bind(this))}handleStorageEvent(e){if(!e.key)return;let t=this.namespace&&e.key.startsWith(`${this.namespace}:`)?e.key.slice(this.namespace.length+1):e.key,s=this.watchers.get(t);if(s){let o=e.oldValue?JSON.parse(e.oldValue).value:null,n=e.newValue?JSON.parse(e.newValue).value:null;s.forEach((a)=>a(n,o,t))}}encrypt(e){let t="";for(let s=0;s<e.length;s++)t+=String.fromCharCode(e.charCodeAt(s)^this.encryptionKey.charCodeAt(s%this.encryptionKey.length));return btoa(t)}decrypt(e){try{let t=atob(e),s="";for(let o=0;o<t.length;o++)s+=String.fromCharCode(t.charCodeAt(o)^this.encryptionKey.charCodeAt(o%this.encryptionKey.length));return s}catch{return e}}compress(e){if(e.length<100)return e;let t={},s=256,o=[],n="";for(let a=0;a<e.length;a++){let r=e.charAt(a),i=n+r;if(t[i]!==void 0)n=i;else o.push(n.length>1?t[n]:n.charCodeAt(0)),t[i]=s++,n=r}if(n!=="")o.push(n.length>1?t[n]:n.charCodeAt(0));return JSON.stringify(o)}decompress(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return e;let s={},o=256,n=String.fromCharCode(t[0]),a=n;for(let r=1;r<t.length;r++){let i=t[r],c;if(s[i]!==void 0)c=s[i];else if(i===o)c=n+n.charAt(0);else return e;a+=c,s[o++]=n+c.charAt(0),n=c}return a}catch{return e}}getKey(e){return this.namespace?`${this.namespace}:${e}`:e}set(e,t,s){let o=this.getKey(e),n=this.get(e),a={value:t,timestamp:Date.now(),expire:s?.expire,encrypted:s?.encrypt||!1,compressed:s?.compress||!1};try{let r=JSON.stringify(a);if(s?.compress)r=this.compress(r);if(s?.encrypt)r=this.encrypt(r);this.storage.setItem(o,r),this.notifyWatchers(e,t,n)}catch(r){console.error("Storage set error:",r)}}get(e){let t=this.getKey(e);try{let s=this.storage.getItem(t);if(!s)return null;if(s.match(/^[A-Z0-9+/]+=*$/i))try{s=this.decrypt(s)}catch{}if(s.startsWith("["))try{s=this.decompress(s)}catch{}let o=JSON.parse(s);if(o.expire&&Date.now()-o.timestamp>o.expire)return this.remove(e),null;return o.value}catch(s){return console.error("Storage get error:",s),null}}watch(e,t){if(!this.watchers.has(e))this.watchers.set(e,new Set);return this.watchers.get(e).add(t),()=>{let s=this.watchers.get(e);if(s){if(s.delete(t),s.size===0)this.watchers.delete(e)}}}notifyWatchers(e,t,s){let o=this.watchers.get(e);if(o)o.forEach((n)=>n(t,s,e))}remove(e){let t=this.getKey(e),s=this.get(e);this.storage.removeItem(t),this.notifyWatchers(e,null,s)}clear(){if(this.namespace)this.keys().forEach((t)=>this.remove(t));else this.storage.clear()}has(e){return this.get(e)!==null}keys(){let e=Object.keys(this.storage);if(this.namespace){let t=`${this.namespace}:`;return e.filter((s)=>s.startsWith(t)).map((s)=>s.slice(t.length))}return e}size(){return this.keys().length}getQuota(){if("storage"in navigator&&"estimate"in navigator.storage)return null;try{let e=0;for(let s=0;s<this.storage.length;s++){let o=this.storage.key(s);if(o){let n=this.storage.getItem(o)||"";e+=o.length+n.length}}let t=5242880;return{usage:e*2,quota:t,percentage:e*2/t*100}}catch{return null}}setMany(e,t){Object.entries(e).forEach(([s,o])=>{this.set(s,o,t)})}getMany(e){let t={};return e.forEach((s)=>{t[s]=this.get(s)}),t}removeMany(e){e.forEach((t)=>this.remove(t))}}var Qp={local:new re("local"),session:new re("session")};function Zp(e="local",t){return new re(e,t)}var _n="./Switch-rbxpzn5g.stx";var Gn="./Table-0a4y46vd.stx";var Yn="./TableBody-y49bqb1p.stx";var Qn="./TableCell-jhvsxw8b.stx";var ea="./TableHead-e9xvjx2j.stx";var sa="./TableHeader-krzcx4sv.stx";var na="./TableRow-dt8e11aj.stx";var ra="./Tab-46mxm7f8.stx";var la="./TabList-5xwk2zmz.stx";var da="./TabPanel-5htevsq6.stx";var ua="./Tabs-bp03efe6.stx";var fa="./Teleport-vqs75x36.stx";var ga="./Textarea-9xmhjqp8.stx";var xa="./Tooltip-p5c3avt1.stx";var wa="./Transition-7m0mk45s.stx";var ka="./Video-sc26cz9v.stx";var $a="./VirtualList-fa7v5a3h.stx";var Ta="./VirtualTable-kp7b3wyv.stx";var Ea=0;function Re(e="a11y"){return`${e}-${++Ea}-${Date.now()}`}function Uu(e,t,s={}){let{visible:o=!1,id:n=Re("label")}=s,a=document.createElement(o?"label":"span");if(a.id=n,a.textContent=e,!o)Object.assign(a.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"});if(t)if(t.setAttribute("aria-labelledby",n),t.parentElement)t.parentElement.insertBefore(a,t);else document.body.appendChild(a);return n}function Gu(e,t){let s=Re("desc"),o=document.createElement("span");if(o.id=s,o.textContent=e,Object.assign(o.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t)if(t.setAttribute("aria-describedby",s),t.parentElement)t.parentElement.insertBefore(o,t);else document.body.appendChild(o);return s}function Ju(e,t="polite"){let s=document.createElement("div");s.setAttribute("role","status"),s.setAttribute("aria-live",t),s.setAttribute("aria-atomic","true"),Object.assign(s.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),document.body.appendChild(s),setTimeout(()=>{s.textContent=e},100),setTimeout(()=>{s.parentNode?.removeChild(s)},1000)}function ve(e){let t=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(t)).filter((s)=>s.offsetParent!==null)}function Yu(e,t={}){let{initialFocus:s,returnFocus:o,escapeDeactivates:n=!0,clickOutsideDeactivates:a=!0,allowOutsideClick:r=!1,onActivate:i,onDeactivate:c}=t,p=!1,u=!1,d=null,g=(v)=>{if(u)return;if(n&&v.key==="Escape"){v.preventDefault(),C();return}if(v.key==="Tab"){let E=ve(e);if(E.length===0){v.preventDefault();return}let A=E[0],S=E[E.length-1];if(v.shiftKey){if(document.activeElement===A)v.preventDefault(),S.focus()}else if(document.activeElement===S)v.preventDefault(),A.focus()}},m=(v)=>{if(u)return;if(!e.contains(v.target)){if(typeof r==="function"){if(!r(v)&&a)C()}else if(!r&&a)C()}};function k(){if(p)return;p=!0,d=document.activeElement;let v=s||ve(e)[0];if(v&&typeof v.focus==="function")v.focus();document.addEventListener("keydown",g),document.addEventListener("click",m),i?.()}function C(){if(!p)return;p=!1;let v=o||d;if(v&&typeof v.focus==="function")v.focus();document.removeEventListener("keydown",g),document.removeEventListener("click",m),c?.()}function y(){u=!0}function b(){u=!1}return{activate:k,deactivate:C,pause:y,unpause:b}}function Xu(e,t={}){let{selector:s='[role="option"], [role="menuitem"], [role="tab"], button',initialIndex:o=0,orientation:n="both",loop:a=!0,onFocusChange:r}=t,i=o,c=()=>Array.from(e.querySelectorAll(s)),p=(d)=>{let g=c();if(d<0||d>=g.length)return;g.forEach((m,k)=>{if(k===d){if(m.setAttribute("tabindex","0"),typeof m.focus==="function")m.focus()}else m.setAttribute("tabindex","-1")}),i=d,r?.(d,g[d])},u=(d)=>{let m=c().length-1,k=!1,C=i;switch(d.key){case"ArrowRight":if(n==="horizontal"||n==="both"){if(C=i+1,C>m)C=a?0:m;k=!0}break;case"ArrowLeft":if(n==="horizontal"||n==="both"){if(C=i-1,C<0)C=a?m:0;k=!0}break;case"ArrowDown":if(n==="vertical"||n==="both"){if(C=i+1,C>m)C=a?0:m;k=!0}break;case"ArrowUp":if(n==="vertical"||n==="both"){if(C=i-1,C<0)C=a?m:0;k=!0}break;case"Home":C=0,k=!0;break;case"End":C=m,k=!0;break}if(k)d.preventDefault(),p(C)};return p(o),e.addEventListener("keydown",u),()=>{e.removeEventListener("keydown",u)}}var Qu={Enter:"Enter",Space:" ",Escape:"Escape",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Tab:"Tab",Home:"Home",End:"End",PageUp:"PageUp",PageDown:"PageDown"};function Zu(e){return document.activeElement===e}function eh(e,t){let s=t||document.activeElement,o=ve(document.body),n=o.indexOf(s);if(n===-1)return;let a=e==="next"?n+1:n-1,r=o[a];if(r)r.focus()}function th(e){if(e.getAttribute("aria-hidden")==="true")return!1;let t=window.getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden")return!1;return!0}var sh={setExpanded(e,t){e.setAttribute("aria-expanded",String(t))},setSelected(e,t){e.setAttribute("aria-selected",String(t))},setChecked(e,t){e.setAttribute("aria-checked",String(t))},setDisabled(e,t){if(e.setAttribute("aria-disabled",String(t)),t)e.setAttribute("tabindex","-1");else e.removeAttribute("tabindex")},setHidden(e,t){if(t)e.setAttribute("aria-hidden","true");else e.removeAttribute("aria-hidden")},setPressed(e,t){e.setAttribute("aria-pressed",String(t))},setInvalid(e,t){e.setAttribute("aria-invalid",String(t))},setRequired(e,t){e.setAttribute("aria-required",String(t))},setLive(e,t){e.setAttribute("aria-live",t)},setBusy(e,t){e.setAttribute("aria-busy",String(t))}};function oh(e){let t=document.createElement("span");return t.textContent=e,t.className="sr-only",Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t}function nh(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-reduced-motion: reduce)").matches;return!1}function ah(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-contrast: high)").matches;return!1}function rh(){if(typeof window.matchMedia==="function"){if(window.matchMedia("(prefers-color-scheme: dark)").matches)return"dark";if(window.matchMedia("(prefers-color-scheme: light)").matches)return"light"}return null}function ih(e,t="Skip to main content"){let s=document.createElement("a");return s.href=`#${e}`,s.textContent=t,s.className="skip-link",Object.assign(s.style,{position:"absolute",top:"-40px",left:"0",background:"#000",color:"#fff",padding:"8px",textDecoration:"none",zIndex:"100"}),s.addEventListener("focus",()=>{s.style.top="0"}),s.addEventListener("blur",()=>{s.style.top="-40px"}),s}function lh(e){let t=[],s=(o)=>{let n=e.getAttribute(o);if(n){let a=n.split(" ");for(let r of a)if(!document.getElementById(r))t.push(`${o} references non-existent ID: ${r}`)}};return s("aria-labelledby"),s("aria-describedby"),s("aria-controls"),s("aria-owns"),s("aria-activedescendant"),t}var Ia=(e,t,s,o)=>s*e/o+t,Aa=(e,t,s,o)=>(e/=o,s*e*e+t),Pa=(e,t,s,o)=>(e/=o,-s*e*(e-2)+t),La=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e+t;return e--,-s/2*(e*(e-2)-1)+t},Oa=(e,t,s,o)=>(e/=o,s*e*e*e+t),Na=(e,t,s,o)=>(e/=o,e--,s*(e*e*e+1)+t),Da=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e+t;return e-=2,s/2*(e*e*e+2)+t},Ma=(e,t,s,o)=>(e/=o,s*e*e*e*e+t),Ra=(e,t,s,o)=>(e/=o,e--,-s*(e*e*e*e-1)+t),za=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e+t;return e-=2,-s/2*(e*e*e*e-2)+t},ja=(e,t,s,o)=>(e/=o,s*e*e*e*e*e+t),Ha=(e,t,s,o)=>(e/=o,e--,s*(e*e*e*e*e+1)+t),Fa=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e*e+t;return e-=2,s/2*(e*e*e*e*e+2)+t},Va=(e,t,s,o)=>-s*Math.cos(e/o*(Math.PI/2))+s+t,Ba=(e,t,s,o)=>s*Math.sin(e/o*(Math.PI/2))+t,qa=(e,t,s,o)=>-s/2*(Math.cos(Math.PI*e/o)-1)+t,Wa=(e,t,s,o)=>e===0?t:s*2**(10*(e/o-1))+t,Ka=(e,t,s,o)=>e===o?t+s:s*(-(2**(-10*e/o))+1)+t,_a=(e,t,s,o)=>{if(e===0)return t;if(e===o)return t+s;if(e/=o/2,e<1)return s/2*2**(10*(e-1))+t;return e--,s/2*(-(2**(-10*e))+2)+t},Ua=(e,t,s,o)=>(e/=o,-s*(Math.sqrt(1-e*e)-1)+t),Ga=(e,t,s,o)=>(e/=o,e--,s*Math.sqrt(1-e*e)+t),Ja=(e,t,s,o)=>{if(e/=o/2,e<1)return-s/2*(Math.sqrt(1-e*e)-1)+t;return e-=2,s/2*(Math.sqrt(1-e*e)+1)+t},Ya=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!a)a=o*0.3;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);return e-=1,-(r*2**(10*e)*Math.sin((e*o-n)*(2*Math.PI)/a))+t},Xa=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!a)a=o*0.3;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);return r*2**(-10*e)*Math.sin((e*o-n)*(2*Math.PI)/a)+s+t},Qa=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o/2,e===2)return t+s;if(!a)a=o*0.44999999999999996;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);if(e<1)return e-=1,-0.5*(r*2**(10*e)*Math.sin((e*o-n)*(2*Math.PI)/a))+t;return e-=1,r*2**(-10*e)*Math.sin((e*o-n)*(2*Math.PI)/a)*0.5+s+t},Za=(e,t,s,o)=>(e/=o,s*e*e*(2.70158*e-1.70158)+t),er=(e,t,s,o)=>(e/=o,e--,s*(e*e*(2.70158*e+1.70158)+1)+t),tr=(e,t,s,o)=>{let n=1.70158;if(e/=o/2,e<1)return n*=1.525,s/2*(e*e*((n+1)*e-n))+t;return e-=2,n*=1.525,s/2*(e*e*((n+1)*e+n)+2)+t},we=(e,t,s,o)=>{if(e/=o,e<0.36363636363636365)return s*(7.5625*e*e)+t;else if(e<0.7272727272727273)return e-=0.5454545454545454,s*(7.5625*e*e+0.75)+t;else if(e<0.9090909090909091)return e-=0.8181818181818182,s*(7.5625*e*e+0.9375)+t;else return e-=0.9545454545454546,s*(7.5625*e*e+0.984375)+t},ze=(e,t,s,o)=>s-we(o-e,0,s,o)+t,sr=(e,t,s,o)=>{if(e<o/2)return ze(e*2,0,s,o)*0.5+t;return we(e*2-o,0,s,o)*0.5+s*0.5+t},dh={linear:Ia,easeInQuad:Aa,easeOutQuad:Pa,easeInOutQuad:La,easeInCubic:Oa,easeOutCubic:Na,easeInOutCubic:Da,easeInQuart:Ma,easeOutQuart:Ra,easeInOutQuart:za,easeInQuint:ja,easeOutQuint:Ha,easeInOutQuint:Fa,easeInSine:Va,easeOutSine:Ba,easeInOutSine:qa,easeInExpo:Wa,easeOutExpo:Ka,easeInOutExpo:_a,easeInCirc:Ua,easeOutCirc:Ga,easeInOutCirc:Ja,easeInElastic:Ya,easeOutElastic:Xa,easeInOutElastic:Qa,easeInBack:Za,easeOutBack:er,easeInOutBack:tr,easeInBounce:ze,easeOutBounce:we,easeInOutBounce:sr};function or(e,t={}){let{duration:s="1s",timing:o="ease",delay:n="0s",iteration:a="1",direction:r="normal",fill:i="both",playState:c="running"}=t;return`${e} ${s} ${o} ${n} ${a} ${r} ${i} ${c}`}function je(e,t,s={}){e.style.animation=or(t,s)}function uh(e){e.style.animation=""}function nr(e){return new Promise((t)=>{let s=()=>{e.removeEventListener("animationend",s),t()};e.addEventListener("animationend",s)})}function hh(e,t,s={}){let{stagger:o=100,...n}=s;e.forEach((a,r)=>{let i=`${r*o}ms`;je(a,t,{...n,delay:i})})}async function fh(e,t){for(let s of t)je(e,s.name,s.options),await nr(e)}var mh={fadeIn:"animate-fade-in",fadeOut:"animate-fade-out",slideInUp:"animate-slide-in-up",slideInDown:"animate-slide-in-down",slideInLeft:"animate-slide-in-left",slideInRight:"animate-slide-in-right",zoomIn:"animate-zoom-in",zoomOut:"animate-zoom-out",bounce:"animate-bounce",spin:"animate-spin",ping:"animate-ping",pulse:"animate-pulse"};function gh(e,t,s=1000){return new Promise((o)=>{e.classList.add(t),setTimeout(()=>{e.classList.remove(t),o()},s)})}function bh(e,t){let s=`
12
12
  @keyframes ${e} {
13
13
  ${Object.entries(t).map(([n,a])=>{let r=Object.entries(a).map(([i,c])=>`${i}: ${c};`).join(" ");return`${n} { ${r} }`}).join(`
14
14
  `)}
@@ -1,5 +1,11 @@
1
1
  /** Read real host bounds, returning coordinates relative to the panel's positioning parent. */
2
- export declare function measureTooltipPosition(trigger: HTMLElement | NativeTooltipView, panel: HTMLElement | NativeTooltipView, preferred?: TooltipSide): Promise<unknown>;
2
+ export declare function measureTooltipPosition(trigger: HTMLElement | NativeTooltipView, panel: HTMLElement | NativeTooltipView, preferred?: TooltipSide, viewportPresentation?: boolean): Promise<unknown>;
3
+ /**
4
+ * Craft presents a non-modal Modal in viewport coordinates while retaining its
5
+ * logical parent. There is no host layout-change subscription yet: sample only
6
+ * while open, serially, and ignore replies after close/removal. Never reparent.
7
+ */
8
+ export declare function trackNativePopup(trigger: NativeTooltipView, panel: NativeTooltipView, preferred: TooltipSide, apply: (style: Record<string, unknown>) => void, warn?: (message: string) => void): () => void;
3
9
  /** Position in viewport coordinates; flip when possible, then keep every edge readable. */
4
10
  export declare function tooltipPosition(anchor: TooltipAnchor, panel: { width: number, height: number }, viewport: { width: number, height: number }, preferred?: TooltipSide): {
5
11
  left: unknown;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/components",
3
3
  "type": "module",
4
- "version": "0.2.611",
4
+ "version": "0.2.613",
5
5
  "description": "A modern component library built with STX, featuring headwind utility classes and TypeScript syntax highlighting.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -77,8 +77,8 @@
77
77
  "dependencies": {
78
78
  "@iconify-json/f7": "^1.2.2",
79
79
  "@stacksjs/ts-css": "^0.3.11",
80
- "@stacksjs/stx": "0.2.611",
81
- "bun-plugin-stx": "0.2.611",
80
+ "@stacksjs/stx": "0.2.613",
81
+ "bun-plugin-stx": "0.2.613",
82
82
  "ts-syntax-highlighter": "^0.2.17",
83
83
  "ts-video-player": "^0.1.9"
84
84
  },
@@ -8,11 +8,28 @@ export const popoverInstanceId = $uid
8
8
  </script>
9
9
 
10
10
  <script client>
11
+ import { trackNativePopup } from '../../utils/tooltip-position'
11
12
  const emit = defineEmits()
12
13
  const popoverInstanceId = {{ popoverInstanceId }}
13
14
  const isOpen = state(false)
15
+ const mounted = state(false)
16
+ const rootRef = useRef('rootRef')
17
+ const tree = window.stx._host
18
+ const nativePopup = !!tree.isNative
14
19
  let rootEl = null
15
20
  let outsideHandler = null
21
+ let stopPositioning = null
22
+
23
+ function ownPart(marker) {
24
+ if (!rootEl) return null
25
+ return tree.descendants(rootEl).find(node => {
26
+ if (tree.getAttribute(node, marker) == null) return false
27
+ for (let parent = tree.parent(node); parent; parent = tree.parent(parent)) {
28
+ if (tree.getAttribute(parent, 'data-stx-popover') != null) return parent === rootEl
29
+ }
30
+ return false
31
+ }) || null
32
+ }
16
33
 
17
34
  /*
18
35
  * The trigger carries the open state for assistive tech. `isOpen` already
@@ -22,13 +39,14 @@ let outsideHandler = null
22
39
  */
23
40
  function syncExpanded() {
24
41
  if (!rootEl) return
25
- const trigger = rootEl.querySelector('[data-stx-popover-button]')
42
+ const trigger = ownPart('data-stx-popover-button')
26
43
  if (!trigger) return
27
44
  trigger.setAttribute('aria-expanded', isOpen() ? 'true' : 'false')
28
- const panel = rootEl.querySelector('[data-stx-popover-panel]')
45
+ const panel = ownPart('data-stx-popover-panel')
29
46
  if (!panel) return
30
- if (!panel.id) panel.id = 'stx-popover-panel-' + popoverInstanceId
31
- trigger.setAttribute('aria-controls', panel.id)
47
+ const panelId = tree.getAttribute(panel, 'id') || 'stx-popover-panel-' + popoverInstanceId
48
+ tree.setAttribute(panel, 'id', panelId)
49
+ tree.setAttribute(trigger, 'aria-controls', panelId)
32
50
  }
33
51
 
34
52
  function open() { if (!isOpen()) { isOpen.set(true); emit('change', true); syncExpanded() } }
@@ -61,10 +79,12 @@ function onEscape() {
61
79
  }
62
80
 
63
81
  onMount(() => {
64
- rootEl = document.querySelector(`[data-popover-id="${popoverInstanceId}"]`)
82
+ rootEl = rootRef.value
65
83
  syncExpanded()
84
+ mounted.set(true)
85
+ if (nativePopup) return
66
86
  outsideHandler = (event) => {
67
- if (!isOpen()) return
87
+ if (!isOpen() || !window.stx.overlays.isTop(popoverInstanceId)) return
68
88
  if (rootEl && !rootEl.contains(event.target)) close()
69
89
  }
70
90
  document.addEventListener('click', outsideHandler, true)
@@ -79,11 +99,31 @@ onMount(() => {
79
99
  * trap Tab or move focus.
80
100
  */
81
101
  effect(() => {
82
- if (isOpen()) window.stx.overlays.open(popoverInstanceId, { modal: false, panel: () => rootEl, onEscape })
102
+ if (!mounted()) return
103
+ if (stopPositioning) { stopPositioning(); stopPositioning = null }
104
+ if (isOpen()) {
105
+ const panel = ownPart('data-stx-popover-panel')
106
+ try {
107
+ if (nativePopup && !window.craft?.capabilities?.viewMeasure)
108
+ throw new Error('Native Popover requires viewMeasure support')
109
+ window.stx.overlays.open(popoverInstanceId, { modal: false, root: nativePopup ? panel : null, panel: () => rootEl, onEscape, onBackdrop: close })
110
+ if (nativePopup) {
111
+ const trigger = ownPart('data-stx-popover-button')
112
+ if (!trigger) throw new Error('Native Popover requires a PopoverButton anchor')
113
+ stopPositioning = trackNativePopup(trigger, panel, tree.getAttribute(panel, 'data-stx-popover-position') || 'bottom', style => tree.setStyle(panel, style))
114
+ }
115
+ }
116
+ catch (error) {
117
+ window.stx.overlays.close(popoverInstanceId)
118
+ console.warn('[stx:popover] ' + ((error && error.message) || String(error)))
119
+ close()
120
+ }
121
+ }
83
122
  else window.stx.overlays.close(popoverInstanceId)
84
123
  })
85
124
 
86
125
  onDestroy(() => {
126
+ if (stopPositioning) stopPositioning()
87
127
  window.stx.overlays.close(popoverInstanceId)
88
128
  if (outsideHandler) document.removeEventListener('click', outsideHandler, true)
89
129
  })
@@ -95,6 +135,7 @@ defineExpose({ isOpen, toggle, open, close })
95
135
 
96
136
  <component
97
137
  :is="{{ as }}"
138
+ x-ref="rootRef"
98
139
  class="{{ popoverClasses }}"
99
140
  data-stx-popover
100
141
  data-popover-id="{{ popoverInstanceId }}"
@@ -9,12 +9,12 @@ export const buttonClasses = `${baseClasses} ${className}`.trim()
9
9
 
10
10
  <script client>
11
11
  const emit = defineEmits()
12
- const isDisabled = {{ disabled }}
12
+ const isDisabled = useReactiveProp('disabled', {{ disabled }})
13
13
 
14
14
  function onClick(event) {
15
- if (isDisabled) return
15
+ if (isDisabled()) return
16
16
  emit('click', event)
17
- event.currentTarget.dispatchEvent(new CustomEvent('stx:popover-toggle', { bubbles: true }))
17
+ window.stx._host.emitComponentEvent(event.currentTarget, new CustomEvent('stx:popover-toggle', { bubbles: true }))
18
18
  }
19
19
  </script>
20
20
 
@@ -23,7 +23,8 @@ function onClick(event) {
23
23
  class="{{ buttonClasses }}"
24
24
  data-stx-popover-button
25
25
  aria-expanded="false"
26
- @if(disabled)disabled aria-disabled="true"@endif
26
+ :disabled="isDisabled()"
27
+ :aria-disabled="isDisabled() ? 'true' : 'false'"
27
28
  @click="onClick($event)"
28
29
  >
29
30
  <slot />
@@ -17,7 +17,10 @@ export const panelClasses = `${baseClasses} ${positionClasses[position] || posit
17
17
  <component
18
18
  :is="{{ as }}"
19
19
  class="{{ panelClasses }}"
20
+ data-native="Modal"
21
+ visible="false"
20
22
  data-stx-popover-panel
23
+ data-stx-popover-position="{{ position }}"
21
24
  >
22
25
  <slot />
23
26
  </component>
@@ -55,8 +55,10 @@ export const arrowClass = `absolute w-0 h-0 border-4 border-transparent ${arrowC
55
55
  </script>
56
56
 
57
57
  <script client>
58
- import { measureTooltipPosition } from '../../utils/tooltip-position'
58
+ import { measureTooltipPosition, trackNativePopup } from '../../utils/tooltip-position'
59
59
  import { portalElement } from '../../utils/element-portal'
60
+ const nativePopup = !!window.stx._host.isNative
61
+ const mounted = state(false)
60
62
  const delay = {{ delay }}
61
63
  // A live prop: a tooltip is commonly suppressed by state the page only learns
62
64
  // about later — while a field is being edited, or once a hint has been read —
@@ -68,7 +70,7 @@ const preferredSide = {{ position }}
68
70
  // The body portal uses viewport coordinates. Fixed positioning also prevents
69
71
  // a static body's margins from shifting the measured placement offscreen.
70
72
  const panelLimits = 'position:fixed;max-width:calc(100vw - 16px);margin:0;'
71
- const panelStyle = state(panelLimits)
73
+ const panelStyle = state(nativePopup ? { position: 'absolute', margin: 0, transform: [] } : panelLimits)
72
74
  const arrowStyle = state('')
73
75
  const isDisabled = useReactiveProp('disabled', {{ disabled }})
74
76
  // Reactive prop binding — parent can drive `show` via signals. See #1704.
@@ -80,6 +82,7 @@ let destroyed = false
80
82
  // Use the actual offset parent, so a tooltip inside a modal or a transformed
81
83
  // container still gets viewport bounds rather than assuming document origin.
82
84
  async function positionTooltip() {
85
+ if (nativePopup) return
83
86
  const generation = ++positionGeneration
84
87
  if (destroyed || !isVisible() || isDisabled()) return
85
88
  const trigger = triggerRef.value
@@ -108,21 +111,26 @@ async function positionTooltip() {
108
111
  // ancestors, and resize; the composable removes these listeners on teardown.
109
112
  effect(() => {
110
113
  ++positionGeneration
111
- if (isVisible() && !isDisabled()) nextTick(positionTooltip)
114
+ if (!nativePopup && isVisible() && !isDisabled()) nextTick(positionTooltip)
112
115
  })
113
116
  useEventListener('resize', positionTooltip)
114
117
  useEventListener('scroll', positionTooltip, { capture: true, passive: true })
115
118
 
116
119
  function showTooltip() {
117
120
  if (isDisabled()) return
121
+ if (timeoutId) clearTimeout(timeoutId)
118
122
  if (delay > 0) {
119
- timeoutId = setTimeout(() => isVisible.set(true), delay)
123
+ timeoutId = setTimeout(() => { if (!destroyed && !isDisabled()) isVisible.set(true) }, delay)
120
124
  }
121
125
  else {
122
126
  isVisible.set(true)
123
127
  }
124
128
  }
125
129
 
130
+ function toggleTouch() {
131
+ if (nativePopup) isVisible() ? hideTooltip() : showTooltip()
132
+ }
133
+
126
134
  function hideTooltip() {
127
135
  ++positionGeneration
128
136
  if (timeoutId) {
@@ -148,8 +156,22 @@ function hideTooltip() {
148
156
  * dialog stays (stacksjs/stx#2057). It listened on the document itself, where
149
157
  * the dialog's listener could take the same Escape.
150
158
  */
159
+ let stopPositioning = null
151
160
  effect(() => {
152
- if (isVisible()) window.stx.overlays.open(tooltipId, { modal: false, panel: null, onEscape: hideTooltip })
161
+ if (!mounted()) return
162
+ if (stopPositioning) { stopPositioning(); stopPositioning = null }
163
+ if (isVisible() && !isDisabled()) {
164
+ try {
165
+ if (nativePopup && !window.craft?.capabilities?.viewMeasure)
166
+ throw new Error('Native Tooltip requires viewMeasure support')
167
+ window.stx.overlays.open(tooltipId, { modal: false, root: nativePopup ? panelRef.value : null, panel: null, onEscape: hideTooltip, onBackdrop: hideTooltip })
168
+ if (nativePopup) stopPositioning = trackNativePopup(triggerRef.value, panelRef.value, preferredSide, style => panelStyle.set(style))
169
+ }
170
+ catch (error) {
171
+ console.warn('[stx:tooltip] ' + ((error && error.message) || String(error)))
172
+ hideTooltip()
173
+ }
174
+ }
153
175
  else window.stx.overlays.close(tooltipId)
154
176
  })
155
177
 
@@ -157,6 +179,7 @@ onDestroy(() => {
157
179
  destroyed = true
158
180
  ++positionGeneration
159
181
  if (timeoutId) clearTimeout(timeoutId)
182
+ if (stopPositioning) stopPositioning()
160
183
  window.stx.overlays.close(tooltipId)
161
184
  })
162
185
 
@@ -194,11 +217,12 @@ function describeTrigger() {
194
217
  let restorePanel = null
195
218
  onMount(() => {
196
219
  describeTrigger()
220
+ mounted.set(true)
197
221
  // The panel already belongs to this setup scope. Moving the same node keeps
198
222
  // its reactive bindings and refs, unlike passing them through another scope.
199
223
  nextTick(() => {
200
224
  const panel = panelRef.value
201
- if (panel && panel.isConnected) restorePanel = portalElement(panel, panel.ownerDocument.body)
225
+ if (!nativePopup && !destroyed && panel && panel.isConnected) restorePanel = portalElement(panel, panel.ownerDocument.body)
202
226
  })
203
227
  })
204
228
  onDestroy(() => { if (restorePanel) restorePanel() })
@@ -210,7 +234,9 @@ onDestroy(() => { if (restorePanel) restorePanel() })
210
234
  bubble anywhere. `describeTrigger` below moves that onto the control
211
235
  itself (stacksjs/stx#2048). --}}
212
236
  <span
237
+ data-native="Pressable"
213
238
  x-ref="triggerRef"
239
+ @click="toggleTouch()"
214
240
  @mouseenter="showTooltip()"
215
241
  @mouseleave="hideTooltip()"
216
242
  @focusin="showTooltip()"
@@ -220,16 +246,18 @@ onDestroy(() => { if (restorePanel) restorePanel() })
220
246
  </span>
221
247
 
222
248
  <span
249
+ data-native="Modal"
250
+ visible="false"
223
251
  x-ref="panelRef"
224
252
  :style="panelStyle"
225
253
  id="{{ tooltipId }}"
226
- :show="isVisible() && !{{ disabled }}"
254
+ :show="isVisible() && !isDisabled()"
227
255
  class="{{ tooltipClasses }}"
228
256
  role="tooltip"
229
257
  @mouseenter="showTooltip()"
230
258
  @mouseleave="hideTooltip()"
231
259
  >
232
260
  <span class="block" style="max-height:calc(100vh - 32px);overflow-y:auto;">{{ content }}</span>
233
- <span class="{{ arrowClass }}" :style="arrowStyle"></span>
261
+ <span :show="!nativePopup" class="{{ arrowClass }}" :style="arrowStyle"></span>
234
262
  </span>
235
263
  </span>
@@ -17,11 +17,11 @@ interface NativeTooltipView {
17
17
  }
18
18
 
19
19
  /** Read real host bounds, returning coordinates relative to the panel's positioning parent. */
20
- export async function measureTooltipPosition(trigger: HTMLElement | NativeTooltipView, panel: HTMLElement | NativeTooltipView, preferred: TooltipSide = 'top') {
20
+ export async function measureTooltipPosition(trigger: HTMLElement | NativeTooltipView, panel: HTMLElement | NativeTooltipView, preferred: TooltipSide = 'top', viewportPresentation = false) {
21
21
  if ('measure' in trigger) {
22
22
  if (!('measure' in panel)) throw new Error('Tooltip panel requires native viewMeasure support')
23
23
  const [anchor, bounds, origin] = await Promise.all([
24
- trigger.measure(), panel.measure(), panel.parentElement?.measure(),
24
+ trigger.measure(), panel.measure(), viewportPresentation ? undefined : panel.parentElement?.measure(),
25
25
  ])
26
26
  for (const box of [bounds, origin]) {
27
27
  if (box && (box.unit !== anchor.unit || box.coordinateSpace !== anchor.coordinateSpace
@@ -41,6 +41,44 @@ export async function measureTooltipPosition(trigger: HTMLElement | NativeToolti
41
41
  return { ...point, left: point.left - (origin?.left ?? 0), top: point.top - (origin?.top ?? 0) }
42
42
  }
43
43
 
44
+ /**
45
+ * Craft presents a non-modal Modal in viewport coordinates while retaining its
46
+ * logical parent. There is no host layout-change subscription yet: sample only
47
+ * while open, serially, and ignore replies after close/removal. Never reparent.
48
+ */
49
+ export function trackNativePopup(
50
+ trigger: NativeTooltipView,
51
+ panel: NativeTooltipView,
52
+ preferred: TooltipSide,
53
+ apply: (style: Record<string, unknown>) => void,
54
+ warn: (message: string) => void = console.warn,
55
+ ): () => void {
56
+ let active = true
57
+ let timer: ReturnType<typeof setTimeout> | undefined
58
+ let previous = ''
59
+ let reported = false
60
+ async function update(): Promise<void> {
61
+ try {
62
+ const point = await measureTooltipPosition(trigger, panel, preferred, true)
63
+ if (!active) return
64
+ if (point) {
65
+ const style = { position: 'absolute', left: point.left, top: point.top, right: 'auto', bottom: 'auto', margin: 0, marginTop: 0, marginBottom: 0, marginLeft: 0, marginRight: 0, transform: [] }
66
+ const signature = JSON.stringify(style)
67
+ if (signature !== previous) { apply(style); previous = signature }
68
+ }
69
+ }
70
+ catch (error) {
71
+ if (active && !reported) {
72
+ reported = true
73
+ warn('[stx:popup] Could not measure native popup: ' + (error instanceof Error ? error.message : String(error)))
74
+ }
75
+ }
76
+ if (active) timer = setTimeout(update, 250)
77
+ }
78
+ void update()
79
+ return () => { active = false; clearTimeout(timer) }
80
+ }
81
+
44
82
  /** Position in viewport coordinates; flip when possible, then keep every edge readable. */
45
83
  export function tooltipPosition(anchor: TooltipAnchor, panel: { width: number, height: number }, viewport: { width: number, height: number }, preferred: TooltipSide = 'top') {
46
84
  const gap = 8