vendor: 4,728 bytes, line 1
1import{C as e,Ct as t,D as n,F as r,M as i,N as a,U as o,bt as s,ct as c,et as l,ht as u,j as d,mt as f,o as p,s as m,tt as h,u as g,wt as _,xt as v}from"./BQ5i3HPE.js";import"./xihTtKlq.js";import{A as y,B as b,C as x,D as S,E as C,F as w,G as T,H as E,I as ee,K as te,M as ne,N as D,O,P as re,Q as ie,R as ae,S as oe,T as k,Y as se,a as A,c as ce,et as le,g as ue,i as de,j as fe,l as j,m as M,n as pe,o as me,q as he,r as ge,s as _e,u as N,w as P,y as ve,z as ye}from"./C9eliEmi.js";import{t as be}from"./7dkakuwt.js";var xe=new WeakMap;function Se(e){return xe.has(e)||xe.set(e,O(e).getComputedStyle(e)),xe.get(e)}var Ce=new Set([`menu`,`listbox`,`dialog`,`grid`,`tree`,`region`,`application`]),we=e=>Ce.has(e),Te=e=>e.getAttribute(`aria-controls`)?.split(` `)||[];function Ee(e,t){let n=new Set,r=S(e),i=e=>{let a=e.querySelectorAll(`[aria-controls]`);for(let e of a){if(e.getAttribute(`aria-expanded`)!==`true`)continue;let a=Te(e);for(let e of a){if(!e||n.has(e))continue;n.add(e);let a=r.getElementById(e);if(a){let e=a.getAttribute(`role`),n=a.getAttribute(`aria-modal`)===`true`;if(e&&we(e)&&!n&&(a===t||a.contains(t)||i(a)))return!0}}}return!1};return i(e)}function De(e,t){let n=S(e),r=new Set,i=e=>{let a=e.querySelectorAll(`[aria-controls]`);for(let e of a){if(e.getAttribute(`aria-expanded`)!==`true`)continue;let a=Te(e);for(let e of a){if(!e||r.has(e))continue;r.add(e);let a=n.getElementById(e);if(a){let e=a.getAttribute(`role`),n=a.getAttribute(`aria-modal`)===`true`;e&&Ce.has(e)&&!n&&(t(a),i(a))}}}};i(e)}function Oe(e){let t=new Set;return De(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function ke(e){let t=e.getAttribute(`role`);return!!(t&&Ce.has(t))}function Ae(e){return e.hasAttribute(`aria-controls`)&&e.getAttribute(`aria-expanded`)===`true`}function je(e){return Ae(e)?!0:!!e.querySelector?.(`[aria-controls][aria-expanded="true"]`)}function Me(e){if(!e.id)return!1;let t=S(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&ke(e))}var Ne=e=>D(e)&&e.tagName===`IFRAME`,Pe=/^(audio|video|details)$/;function Fe(e){let t=e.getAttribute(`tabindex`);return t?parseInt(t,10):NaN}var Ie=e=>!Number.isNaN(Fe(e)),Le=e=>Fe(e)<0;function Re(e){return re(e)&&e.type===`radio`}function ze(e){if(!Re(e)||!e.name||e.checked)return!0;let t=`input[type="radio"][name="${CSS.escape(e.name)}"]`,n=e.form??e.ownerDocument,r=Array.from(n.querySelectorAll(t)).filter(t=>t.form===e.form&&I(t)),i=r.find(e=>e.checked);return i?i===e:r[0]===e}function Be(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;let n=t(e);return(n===!0?e.shadowRoot:n)||null}function Ve(e,t,n){let r=[...e],i=[...e],a=new Set,o=new Map;e.forEach((e,t)=>o.set(e,t));let s=0;for(;s<i.length;){let e=i[s++];if(!e||a.has(e))continue;a.add(e);let c=Be(e,t);if(c){let t=Array.from(c.querySelectorAll(F)).filter(n),a=o.get(e);if(a!==void 0){let e=a+1;r.splice(e,0,...t),t.forEach((t,n)=>{o.set(t,e+n)});for(let n=e+t.length;n<r.length;n++)o.set(r[n],n)}else{let e=r.length;r.push(...t),t.forEach((t,n)=>{o.set(t,e+n)})}i.push(...t)}}return r}var F=`input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type`,He=(e,t={})=>{if(!e)return[];let{includeContainer:n=!1,getShadowRoot:r}=t,i=Array.from(e.querySelectorAll(F));(n==1||n==`if-empty`&&i.length===0)&&D(e)&&I(e)&&i.unshift(e);let a=[];for(let e of i)if(I(e)){if(Ne(e)&&e.contentDocument){let t=e.contentDocument.body;a.push(...He(t,{getShadowRoot:r}));continue}a.push(e)}return r?Ve(a,r,I):a};function I(e){return!D(e)||e.closest(`[inert]`)?!1:e.matches(F)&&ne(e)}function L(e,t={}){if(!e)return[];let{includeContainer:n,getShadowRoot:r}=t,i=Array.from(e.querySelectorAll(F));n&&R(e)&&i.unshift(e);let a=[];for(let e of i)if(R(e)){if(Ne(e)&&e.contentDocument){let t=e.contentDocument.body;a.push(...L(t,{getShadowRoot:r}));continue}a.push(e)}if(r){let e=Ve(a,r,R);return!e.length&&n?i:e}return!a.length&&n?i:a}function R(e){return D(e)&&e.tabIndex>0?!0:!I(e)||Le(e)?!1:ze(e)}function Ue(e,t={}){let n=L(e,t);return[n[0]||null,n[n.length-1]||null]}function z(e){return e.tabIndex<0&&(Pe.test(e.localName)||fe(e))&&!Ie(e)?0:e.tabIndex}function B(e){let{root:t,getInitialEl:n,filter:r,enabled:i=!0}=e;if(!i)return;let a=typeof n==`function`?n():n;return a||=t?.querySelector(`[data-autofocus],[autofocus]`),a||=L(t).filter(e=>!r||r(e)).find(e=>!e.hasAttribute(`data-no-autofocus`)),a||t||void 0}function V(e){let t=C(e);return w(t)?k(t).body:D(t)&&H(t)?t:V(t)}
1function We(e,t=[]){let n=V(e),r=n===e.ownerDocument.body,i=O(n);return r?t.concat(i,i.visualViewport||[],H(n)?n:[]):t.concat(n,We(n,[]))}var Ge=/auto|scroll|overlay|hidden|clip/,Ke=new Set([`inline`,`contents`]);function H(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=O(e).getComputedStyle(e);return Ge.test(t+r+n)&&!Ke.has(i)}function qe(e,t){return Array.from(e?.querySelectorAll(t)??[])}function U(e,t){if(!e)return b;let n=Object.keys(t).reduce((t,n)=>(t[n]=e.style.getPropertyValue(n),t),{});return Ye(n,t)?b:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute(`style`)})}function Je(e,t,n){if(!e)return b;let r=e.style.getPropertyValue(t);return r===n?b:(e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute(`style`)})}function Ye(e,t){return Object.keys(e).every(n=>e[n]===t[n])}function Xe(e,t,n){let{signal:r}=t;return[new Promise((t,i)=>{let a=setTimeout(()=>{i(Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener(`abort`,()=>{clearTimeout(a),i(new DOMException(`Promise aborted`,`AbortError`))}),e.then(e=>{r.aborted||(clearTimeout(a),t(e))}).catch(e=>{r.aborted||(clearTimeout(a),i(e))})}),()=>t.abort()]}function Ze(e,t){let{timeout:n,rootNode:r}=t,i=O(r),a=k(r),o=new i.AbortController;return Xe(new Promise(t=>{let n=e();if(n){t(n);return}let r=new i.MutationObserver(()=>{let n=e();n&&n.isConnected&&(r.disconnect(),t(n))});r.observe(a.body,{childList:!0,subtree:!0})}),o,n)}function Qe(e){let t={each(t){for(let n=0;n<e.frames?.length;n+=1){let r=e.frames[n];r&&t(r)}},addEventListener(e,n,r){return t.each(t=>{try{t.document.addEventListener(e,n,r)}catch{}}),()=>{try{t.removeEventListener(e,n,r)}catch{}}},removeEventListener(e,n,r){t.each(t=>{try{t.document.removeEventListener(e,n,r)}catch{}})}};return t}function $e(e){let t=e.frameElement==null?null:e.parent;return{addEventListener:(e,n,r)=>{try{t?.addEventListener(e,n,r)}catch{}return()=>{try{t?.removeEventListener(e,n,r)}catch{}}},removeEventListener:(e,n,r)=>{try{t?.removeEventListener(e,n,r)}catch{}}}}var et=`pointerdown.outside`,tt=`focus.outside`;function nt(e){for(let t of e)if(D(t)&&I(t))return!0;return!1}var rt=e=>`clientY`in e;function it(e,t){if(!rt(t)||!e)return!1;let n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function at(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function ot(e,t){if(!t||!rt(e))return!1;let n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,i=t.scrollWidth>t.clientWidth,a=i&&e.clientY>t.offsetTop+t.clientHeight;return at({x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(i?16:0)},{x:e.clientX,y:e.clientY})?r||a:!1}function st(e,t){let{exclude:n,onFocusOutside:r,onPointerDownOutside:i,onInteractOutside:a,defer:o,followControlledElements:s=!0}=t;if(!e)return;let c=k(e),l=O(e),u=Qe(l),d=$e(l);function f(t,r){if(!D(r)||!r.isConnected||x(e,r)||it(e,t)||s&&Ee(e,r))return!1;let i=c.querySelector(`[aria-controls="${e.id}"]`);return i&&ot(t,V(i))||ot(t,V(e))?!1:!n?.(r)}let p=new Set,m=ee(e?.getRootNode()),h=!1;function g(t){h=!0;let n=()=>{h=!1};c.addEventListener(`pointerup`,n,{once:!0}),l.addEventListener(`pointerup`,n,{once:!0});function r(n){let r=o&&!oe()?j:e=>e(),s=n??t,c=s?.composedPath?.()??[s?.target];r(()=>{let n=m?c[0]:M(t);if(e&&f(t,n)){if(i||a){let t=se(i,a);e.addEventListener(et,t,{once:!0})}lt(e,et,{bubbles:!1,cancelable:!0,detail:{originalEvent:s,contextmenu:ue(s),focusable:nt(c),target:n}})}})}t.pointerType===`touch`?(p.forEach(e=>e()),p.add(N(c,`click`,r,{once:!0})),p.add(d.addEventListener(`click`,r,{once:!0})),p.add(u.addEventListener(`click`,r,{once:!0}))):r()}let _=new Set,v=setTimeout(()=>{_.add(N(c,`pointerdown`,g,!0)),_.add(d.addEventListener(`pointerdown`,g,!0)),_.add(u.addEventListener(`pointerdown`,g,!0))},0);function y(t){h||(o?j:e=>e())(()=>{let n=t?.composedPath?.()??[t?.target],i=m?n[0]:M(t);if(e&&f(t,i)){if(r||a){let t=se(r,a);e.addEventListener(tt,t,{once:!0})}lt(e,tt,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:I(i),target:i}})}})}return oe()||(_.add(N(c,`focusin`,y,!0)),_.add(d.addEventListener(`focusin`,y,!0)),_.add(u.addEventListener(`focusin`,y,!0))),()=>
1{clearTimeout(v),p.forEach(e=>e()),_.forEach(e=>e())}}function ct(e,t){let{defer:n}=t,r=n?j:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(st(n,t))})),()=>{i.forEach(e=>e?.())}}function lt(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,n);return e.dispatchEvent(r)}function ut(e,t){return N(k(e),`keydown`,e=>{e.key===`Escape`&&(e.isComposing||t?.(e))},{capture:!0})}var dt=`layer:request-dismiss`,W={layers:[],branches:[],recentlyRemoved:new Set,count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){return this.indexOf(e)<(this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1)},isTopMost(e){return this.layers[this.count()-1]?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){let n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(e=>e.type===t)},getParentLayerOfType(e,t){let n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(e=>e.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!(this.getNestedLayers(e).some(e=>x(e.node,t))||this.recentlyRemoved.size>0)},isInBranch(e){return Array.from(this.branches).some(t=>x(t,e))},add(e){let t=this.indexOf(e.node);t!==-1&&this.layers.splice(t,1),this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);t<0||(this.layers[t].styleTargets?.forEach(e=>{let t=e();t&&pt(t)}),this.recentlyRemoved.add(e),ce(()=>this.recentlyRemoved.delete(e)),t<this.count()-1&&this.getNestedLayers(e).forEach(t=>W.dismiss(t.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{ft(e,t,e.node),e.styleTargets?.forEach(n=>{let r=n();if(!r||r===e.node)return;ft(e,t,r);let{zIndex:i}=Se(e.node);r.style.setProperty(`--z-index`,i)})})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){let n=this.indexOf(e);if(n===-1)return;let r=this.layers[n];ht(e,dt,e=>{r.requestDismiss?.(e),e.defaultPrevented||r?.dismiss()}),mt(e,dt,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function ft(e,t,n){n.style.setProperty(`--layer-index`,`${t}`),n.removeAttribute(`data-nested`),n.removeAttribute(`data-has-nested`),W.getParentLayerOfType(e.node,e.type)&&n.setAttribute(`data-nested`,e.type);let r=W.countNestedLayersOfType(e.node,e.type);r>0&&n.setAttribute(`data-has-nested`,e.type),n.style.setProperty(`--nested-layer-count`,`${r}`)}function pt(e){e.style.removeProperty(`--layer-index`),e.style.removeProperty(`--nested-layer-count`),e.style.removeProperty(`--z-index`),e.removeAttribute(`data-nested`),e.removeAttribute(`data-has-nested`)}function mt(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(r)}function ht(e,t,n){e.addEventListener(t,n,{once:!0})}var gt=new WeakMap,G=new WeakMap;function _t(e){return W.isBelowPointerBlockingLayer(e)?`none`:`auto`}function vt(e){let t=_t(e);e.style.pointerEvents!==t&&(e.style.pointerEvents=t)}function yt(e){if(G.has(e))return;let t=O(e);if(t.MutationObserver===void 0)return;let n=new t.MutationObserver(()=>{G.has(e)&&vt(e)});n.observe(e,{attributes:!0,attributeFilter:[`style`]}),G.set(e,n)}function bt(){W.layers.forEach(({node:e})=>{vt(e),yt(e)})}function xt(e){let t=G.get(e);t&&(t.disconnect(),G.delete(e)),e.style.pointerEvents=``}function St(e,t){let n=k(e),r=[];return W.hasPointerBlockingLayer()&&!n.body.hasAttribute(`data-inert`)&&(gt.set(n.body,n.body.style.pointerEvents),queueMicrotask(()=>{let e=n.body;e&&(e.style.pointerEvents=`none`,e.setAttribute(`data-inert`,``))}
1)),t?.forEach(e=>{let[t,n]=Ze(()=>{let t=e();return D(t)?t:null},{timeout:1e3});t.then(e=>r.push(U(e,{pointerEvents:`auto`}))),r.push(n)}),()=>{W.hasPointerBlockingLayer()||(queueMicrotask(()=>{let e=n.body;if(!e)return;let t=gt.get(e);t!==void 0&&(e.style.pointerEvents=t,gt.delete(e)),e.removeAttribute(`data-inert`),e.style.length===0&&e.removeAttribute(`style`)}),r.forEach(e=>e()))}}function Ct(e,t){let{warnOnMissingNode:n=!0}=t;if(n&&!e){T("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;let{onDismiss:r,onRequestDismiss:i,pointerBlocking:a,exclude:o,debug:s,type:c=`dialog`,layerStyleTargets:l}=t,u={dismiss:r,node:e,type:c,pointerBlocking:a,requestDismiss:i,styleTargets:l};W.add(u),bt();function d(n){let i=M(n.detail.originalEvent);W.isBelowPointerBlockingLayer(e)||W.isInBranch(i)||(t.onPointerDownOutside?.(n),t.onInteractOutside?.(n),!n.defaultPrevented&&(s&&console.log(`onPointerDownOutside:`,n.detail.originalEvent),r?.()))}function f(e){let n=M(e.detail.originalEvent);W.isInBranch(n)||(t.onFocusOutside?.(e),t.onInteractOutside?.(e),!e.defaultPrevented&&(s&&console.log(`onFocusOutside:`,e.detail.originalEvent),r?.()))}function p(n){W.isTopMost(e)&&(t.onEscapeKeyDown?.(n),!n.defaultPrevented&&r&&(n.preventDefault(),r()))}function m(n){if(!e)return!1;let r=typeof o==`function`?o():o,i=Array.isArray(r)?r:[r],a=t.persistentElements?.map(e=>e()).filter(D);return a&&i.push(...a),i.some(e=>x(e,n))||W.isInNestedLayer(e,n)}let h=[a?St(e,t.persistentElements):void 0,ut(e,p),ct(e,{exclude:m,onFocusOutside:f,onPointerDownOutside:d,defer:t.defer})];return()=>{W.remove(e),bt(),xt(e),h.forEach(e=>e?.())}}function wt(e,t){let{defer:n}=t,r=n?j:e=>e(),i=[];return i.push(r(()=>{let n=ie(e)?e():e;i.push(Ct(n,t))})),()=>{i.forEach(e=>e?.())}}var K=le(),Tt=a(`<div></div>`);function Et(t,r){u(r,!0);let a=p(r,[`$$slots`,`$$events`,`$$legacy`]),s=K.consume(),l=c(()=>r.element),m=c(()=>v(a,[`element`])),_=c(()=>A(s().getBackdropProps(),o(m)));var y=i(),b=h(y),x=t=>{var n=i(),r=h(n);e(r,()=>o(l),()=>o(_)),d(t,n)},S=e=>{var t=Tt();g(t,()=>({...o(_)})),d(e,t)};n(b,e=>{o(l)?e(x):e(S,-1)}),d(t,y),f()}var Dt=a(`<button><!></button>`);function Ot(r,a){u(a,!0);let m=p(a,[`$$slots`,`$$events`,`$$legacy`]),_=K.consume(),y=c(()=>a.element),b=c(()=>a.children),x=c(()=>v(m,[`element`,`children`])),S=c(()=>A(_().getCloseTriggerProps(),o(x)));var C=i(),w=h(C),T=t=>{var n=i(),r=h(n);e(r,()=>o(y),()=>o(S)),d(t,n)},E=n=>{var r=Dt();g(r,()=>({...o(S)}));var i=l(r);e(i,()=>o(b)??t),s(r),d(n,r)};n(w,e=>{o(y)?e(T):e(E,-1)}),d(r,C),f()}var kt=a(`<div><!></div>`);function At(r,a){u(a,!0);let m=p(a,[`$$slots`,`$$events`,`$$legacy`]),_=K.consume(),y=c(()=>a.element),b=c(()=>a.children),x=c(()=>v(m,[`element`,`children`])),S=c(()=>A(_().getContentProps(),o(x)));var C=i(),w=h(C),T=t=>{var n=i(),r=h(n);e(r,()=>o(y),()=>o(S)),d(t,n)},E=n=>{var r=kt();g(r,()=>({...o(S)}));var i=l(r);e(i,()=>o(b)??t),s(r),d(n,r)};n(w,e=>{o(y)?e(T):e(E,-1)}),d(r,C),f()}var jt=a(`<div><!></div>`);function Mt(r,a){u(a,!0);let m=p(a,[`$$slots`,`$$events`,`$$legacy`]),_=K.consume(),y=c(()=>a.element),b=c(()=>a.children),x=c(()=>v(m,[`element`,`children`])),S=c(()=>A(_().getDescriptionProps(),o(x)));var C=i(),w=h(C),T=t=>{var n=i(),r=h(n);e(r,()=>o(y),()=>o(S)),d(t,n)},E=n=>{var r=jt();g(r,()=>({...o(S)}));var i=l(r);e(i,()=>o(b)??t),s(r),d(n,r)};n(w,e=>{o(y)?e(T):e(E,-1)}),d(r,C),f()}var Nt=a(`<div><!></div>`);function Pt(r,a){u(a,!0);let m=p(a,[`$$slots`,`$$events`,`$$legacy`]),_=K.consume(),y=c(()=>a.element),b=c(()=>a.children),x=c(()=>v(m,[`element`,`children`])),S=c(()=>A(_().getPositionerProps(),o(x)));var C=i(),w=h(C),T=t=>{var n=i(),r=h(n);e(r,()=>o(y),()=>o(S)),d(t,n)},E=n=>{var r=Nt();g(r,()=>({...o(S)}));var i=l(r);e(i,()=>o(b)??t),s(r),d(n,r)};n(w,e=>{o(y)?e(T):e(E,-1)}),d(r,C),f()}function Ft(t,n){u(n,!0),p(n,[`$$slots`,`$$events`,`$$legacy`]);let r=K.consume(),a=c(()=>n.children);var s=i(),l=h(s);e(l,()=>o(a),()=>r),d(t,s),f()}function It(n,r){u(r,!0),p(r,[`$$slots`,`$$events`,`$$legacy`]);let a=c(()=>r.children),s=c(()=>r.value);K.provide(()=>o(s)());var l=i(),m=h(l);e(m,()=>o(a)??t),d(n,l),f()}var q=ge(`dialog`).parts(`trigger`,`backdrop`,`positioner`,`content`,`title`,`description`,`closeTrigger`).build(),Lt=e=>e.ids?.positioner??`dialog:${e.id}:positioner`,Rt=e=>e.ids?.backdrop??`dialog:${e.id}:backdrop`,zt=e=>e.ids?.content??`dialog:${e.id}:content`,Bt=(e,t)=>
vendor: 17,040 bytes, line 1
1{let n=e.ids?.trigger;return n==null?t?`dialog:${e.id}:trigger:${t}`:`dialog:${e.id}:trigger`:ie(n)?n(t):n},Vt=e=>e.ids?.title??`dialog:${e.id}:title`,Ht=e=>e.ids?.description??`dialog:${e.id}:description`,Ut=e=>e.ids?.closeTrigger??`dialog:${e.id}:close`,J=e=>e.getById(zt(e)),Wt=e=>e.getById(Lt(e)),Gt=e=>e.getById(Rt(e)),Kt=e=>e.getById(Bt(e)),qt=e=>e.getById(Vt(e)),Jt=e=>e.getById(Ht(e)),Yt=e=>e.getById(Ut(e)),Xt=e=>qe(e.getRootNode(),`[data-scope="dialog"][data-part="trigger"]${ye(e.id)}`),Zt=(e,t)=>t==null?Kt(e)??Xt(e)[0]:e.getById(Bt(e,t));function Qt(e,t){let{state:n,send:r,context:i,prop:a,scope:o}=e,s=a(`aria-label`),c=n.matches(`open`),l=i.get(`triggerValue`);return{open:c,setOpen(e){n.matches(`open`)!==e&&r({type:e?`OPEN`:`CLOSE`})},triggerValue:l,setTriggerValue(e){r({type:`TRIGGER_VALUE.SET`,value:e})},getTriggerProps(e={}){let{value:n}=e,i=n!=null&&l===n;return t.button({...q.trigger.attrs,dir:a(`dir`),id:Bt(o,n),"data-ownedby":o.id,"data-value":n,"aria-haspopup":`dialog`,type:`button`,"aria-expanded":n==null?c:c&&i,"data-state":c?`open`:`closed`,"aria-controls":zt(o),"data-current":ae(i),onClick(e){e.defaultPrevented||r({type:c&&n!=null&&!i?`TRIGGER_VALUE.SET`:`TOGGLE`,value:n})}})},getBackdropProps(){return t.element({...q.backdrop.attrs,dir:a(`dir`),hidden:!c,id:Rt(o),"data-state":c?`open`:`closed`})},getPositionerProps(){return t.element({...q.positioner.attrs,dir:a(`dir`),id:Lt(o),style:te({pointerEvents:!c||!a(`modal`)?`none`:void 0})})},getContentProps(){let e=i.get(`rendered`);return t.element({...q.content.attrs,dir:a(`dir`),role:a(`role`),hidden:!c,id:zt(o),tabIndex:-1,"data-state":c?`open`:`closed`,"aria-modal":a(`modal`),"aria-label":s||void 0,"aria-labelledby":s||!e.title?void 0:Vt(o),"aria-describedby":e.description?Ht(o):void 0,style:te({pointerEvents:a(`modal`)?void 0:`auto`})})},getTitleProps(){return t.element({...q.title.attrs,dir:a(`dir`),id:Vt(o)})},getDescriptionProps(){return t.element({...q.description.attrs,dir:a(`dir`),id:Ht(o)})},getCloseTriggerProps(){return t.button({...q.closeTrigger.attrs,dir:a(`dir`),id:Ut(o),type:`button`,onClick(e){e.defaultPrevented||(e.stopPropagation(),r({type:`CLOSE`}))}})}}}var Y=new WeakMap,X=new WeakMap,Z={},$t=0,en=e=>e&&(e.host||en(e.parentNode)),tn=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=en(t);return n&&e.contains(n)?n:(console.error(`[zag-js > ariaHidden] target`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(e=>!!e),nn=new Set([`script`,`output`,`status`,`next-route-announcer`]),rn=e=>nn.has(e.localName)||e.role===`status`||e.hasAttribute(`aria-live`)?!0:e.matches(`[data-live-announcer]`),an=(e,t)=>{let{parentNode:n,markerName:r,controlAttribute:i,explicitBooleanValue:a,followControlledElements:o=!0}=t,s=tn(n,Array.isArray(e)?e:[e]);Z[r]||(Z[r]=new WeakMap);let c=Z[r],l=[],u=new Set,d=new Set(s),f=e=>{e&&!u.has(e)&&(u.add(e),f(e.parentNode))};s.forEach(e=>{f(e),o&&D(e)&&De(e,e=>{f(e)})});let p=e=>{e&&!d.has(e)&&Array.prototype.forEach.call(e.children,e=>{if(u.has(e))p(e);else try{if(rn(e))return;let t=e.getAttribute(i),n=a?t===`true`:t!==null&&t!==`false`,o=(Y.get(e)||0)+1,s=(c.get(e)||0)+1;Y.set(e,o),c.set(e,s),l.push(e),o===1&&n&&X.set(e,!0),s===1&&e.setAttribute(r,``),n||e.setAttribute(i,a?`true`:``)}catch(t){console.error(`[zag-js > ariaHidden] cannot operate on `,e,t)}})};return p(n),u.clear(),$t++,()=>{l.forEach(e=>{let t=Y.get(e)-1,n=c.get(e)-1;Y.set(e,t),c.set(e,n),t||(X.has(e)||e.removeAttribute(i),X.delete(e)),n||e.removeAttribute(r)}),$t--,$t||(Y=new WeakMap,Y=new WeakMap,X=new WeakMap,Z={})}},on=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,sn=(e,t=on(e),n=`data-aria-hidden`,r=!0)=>{if(t)return an(e,{parentNode:t,markerName:n,controlAttribute:`aria-hidden`,explicitBooleanValue:!0,followControlledElements:r})},cn=e=>{let t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function ln(e,t={}){let{defer:n=!0}=t,r=n?cn:e=>e(),i=[];return i.push(r(()=>{let t=(typeof e==`function`?e():e).filter(Boolean);t.length!==0&&i.push(sn(t))})),()=>{i.forEach(e=>e?.())}}var un=Object.defineProperty,dn=(e,t,n)=>t in e?un(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Q=(e,t,n)=>dn(e,typeof t==`symbol`?t:t+``,n),fn={activateTrap(e,t){if(e.length>0){let n=e[e.length-1];n!==t&&n.pause()}let n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},pn=[],mn=class{constructor(e,t){Q(this,`trapStack`),Q(this,`config`),Q(this,`doc`),Q(this,`state`,{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Q(this,`lastInteractionType`,`keyboard`),Q(this,`portalContainers`,new Set),Q(this,`listenerCleanups`,[]),Q(this,`handleFocus`,e=>{let t=M(e),n=this.findContainerIndex(t,e)>=0;if(n||y(t))n&&(this.state.mostRecentlyFocusedNode=t);else{e.stopImmediatePropagation();let t,n=!0;if(this.state.mostRecentlyFocusedNode){if(z(this.state.mostRecentlyFocusedNode)>0){let e=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:r}=this.state.containerGroups[e];if(r.length>0){let e=r.findIndex(e=>e===this.state.mostRecentlyFocusedNode);e>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?e+1<r.length&&(t=r[e+1],n=!1):e-1>=0&&(t=r[e-1],n=!1))}}else this.state.containerGroups.some(e=>e.tabbableNodes.some(e=>z(e)>0))||(n=!1)}else n=!1;n&&(t=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),t?this.tryFocus(t):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),Q(this,`handlePointerDown`,e=>{this.lastInteractionType=`pointer`;let t=M(e);if(!(this.findContainerIndex(t,e)>=0)){if($(this.config.clickOutsideDeactivates,e)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}$(this.config.allowOutsideClick,e)||e.preventDefault()}}),Q(this,`handleClick`,e=>{let t=M(e);this.findContainerIndex(t,e)>=0||$(this.config.clickOutsideDeactivates,e)||$(this.config.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())}),Q(this,`handleTabKey`,e=>{if(this.lastInteractionType=`keyboard`,this.config.isKeyForward(e)||this.config.isKeyBackward(e)){this.state.recentNavEvent=e;let t=this.config.isKeyBackward(e),n=this.findNextNavNode({event:e,isBackward:t});if(!n)return;gn(e)&&e.preventDefault(),this.tryFocus(n)}}),Q(this,`handleEscapeKey`,e=>{yn(e)&&$(this.config.escapeDeactivates,e)!==!1&&(e.preventDefault(),this.deactivate())}),Q(this,`_mutationObserver`),Q(this,`setupMutationObserver`,()=>{let e=this.doc.defaultView||window;this._mutationObserver=new e.MutationObserver(e=>{e.some(e=>Array.from(e.removedNodes).some(e=>e===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),e.some(e=>e.type===`attributes`&&(e.attributeName===`aria-controls`||e.attributeName===`aria-expanded`)||e.type===`childList`&&e.addedNodes.length>0&&Array.from(e.addedNodes).some(e=>{if(e.nodeType!==Node.ELEMENT_NODE)return!1;let t=e;return je(t)?!0:t.id&&!this.state.containers.some(e=>e.contains(t))?Me(t):!1}))&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Q(this,`updateObservedNodes`,()=>{this._mutationObserver?.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(e=>{this._mutationObserver?.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-controls`,`aria-expanded`]})}),this.portalContainers.forEach(e=>{this.observePortalContainer(e)}))}),Q(this,`getInitialFocusNode`,()=>{let e=this.getNodeForOption(`initialFocus`,{hasFallback:!0});if(e===!1)return!1;if(e===void 0||e&&!I(e)){let t=P(this.doc);if(t&&this.findContainerIndex(t)>=0)e=t;else{let t=this.state.tabbableGroups[0];e=t&&t.firstTabbableNode||this.getNodeForOption(`fallbackFocus`)}}else e===null&&(e=this.getNodeForOption(`fallbackFocus`));if(!e||(e.isConnected||(e=this.getNodeForOption(`fallbackFocus`)),!e||!e.isConnected))throw Error(`Your focus-trap needs to have at least one focusable element`);return e}),Q(this,`tryFocus`,(e,t)=>{if(e!==!1&&e!==P(this.doc)){if(!e||!e.focus){this.tryFocus(this.getInitialFocusNode());return}e.focus({preventScroll:!!this.config.preventScroll,...t}),this.state.mostRecentlyFocusedNode=e,xn(e)&&e.select()}}),Q(this,`deactivate`,e=>{if(!this.state.active)return this;let t={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...e};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),fn.deactivateTrap(this.trapStack,this),this.portalContainers.clear();let n=this.getOption(t,`onDeactivate`),r=this.getOption(t,`onPostDeactivate`),i=this.getOption(t,`checkCanReturnFocus`),a=this.getOption(t,`returnFocus`,`returnFocusOnDeactivate`);n?.();let o=()=>{bn(()=>{if(a&&this.isSafeToOverrideFocus()){let e=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation),t=this.lastInteractionType===`keyboard`?{focusVisible:!0}:void 0;this.tryFocus(e,t)}r?.()})};return a&&i?(i(this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation)).then(o,o),this):(o(),this)}),Q(this,`pause`,e=>{if(this.state.paused||!this.state.active)return this;let t=this.getOption(e,`onPause`),n=this.getOption(e,`onPostPause`);return this.state.paused=!0,t?.(),this.removeListeners(),this.updateObservedNodes(),n?.(),this}),Q(this,`unpause`,e=>{if(!this.state.paused||!this.state.active)return this;let t=this.getOption(e,`onUnpause`),n=this.getOption(e,`onPostUnpause`);this.state.paused=!1,t?.();try{this.updateTabbableNodes()}catch{}this.attachListeners();try{this.commitInitialFocus()}catch{}return this.updateObservedNodes(),n?.(),this}),Q(this,`updateContainerElements`,e=>(this.state.containers=Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Q(this,`getReturnFocusNode`,e=>{let t=this.getNodeForOption(`setReturnFocus`,{params:[e]});return t||t!==!1&&e}),Q(this,`getOption`,(e,t,n)=>e&&e[t]!==void 0?e[t]:this.config[n||t]),Q(this,`getNodeForOption`,(e,{hasFallback:t=!1,params:n=[]}={})=>{let r=this.config[e];if(typeof r==`function`&&(r=r(...n)),r===!0&&(r=void 0),!r){if(r===void 0||r===!1)return r;throw Error(`\`${e}\` was specified but was not a node, or did not return a node`)}let i=r;if(typeof r==`string`){try{i=this.doc.querySelector(r)}catch(t){throw Error(`\`${e}\` appears to be an invalid selector; error="${t.message}"`)}if(!i&&!t)throw Error(`\`${e}\` as selector refers to no known node`)}return i}),Q(this,`findNextNavNode`,e=>{let{event:t,isBackward:n=!1}=e,r=e.target||M(t);this.updateTabbableNodes();let i=null;if(this.state.tabbableGroups.length>0){let e=this.findContainerIndex(r,t),a=e>=0?this.state.containerGroups[e]:void 0;if(e<0)i=n?this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:this.state.tabbableGroups[0].firstTabbableNode;else if(n){let n=this.state.tabbableGroups.findIndex(({firstTabbableNode:e})=>r===e);if(n<0&&(a?.container===r||I(r)&&!R(r)&&!a?.nextTabbableNode(r,!1))&&(n=e),n>=0){let e=n===0?this.state.tabbableGroups.length-1:n-1,t=this.state.tabbableGroups[e];i=z(r)>=0?t.lastTabbableNode:t.lastDomTabbableNode}else gn(t)||(i=a?.nextTabbableNode(r,!1))}else{let n=this.state.tabbableGroups.findIndex(({lastTabbableNode:e})=>r===e);if(n<0&&(a?.container===r||I(r)&&!R(r)&&!a?.nextTabbableNode(r))&&(n=e),n>=0){let e=n===this.state.tabbableGroups.length-1?0:n+1,t=this.state.tabbableGroups[e];i=z(r)>=0?t.firstTabbableNode:t.firstDomTabbableNode}else gn(t)||(i=a?.nextTabbableNode(r))}}else i=this.getNodeForOption(`fallbackFocus`);return i}),this.trapStack=t.trapStack||pn;let n={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:_n,isKeyBackward:vn,...t};this.doc=n.document||k(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){let t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){this._mutationObserver?.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-controls`,`aria-expanded`]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{Oe(e).forEach(e=>{this.addPortalContainer(e)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){let n=typeof t?.composedPath==`function`?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:i})=>r.contains(e)||n?.includes(r)||i.find(t=>t===e)||this.isControlledElement(r,e)||this.isPersistentElement(e,t))}isControlledElement(e,t){return this.config.followControlledElements?Ee(e,t):!1}isPersistentElement(e,t){let n=this.config.persistentElements;if(!n||n.length===0)return!1;let r=typeof t?.composedPath==`function`?t.composedPath():void 0;return n.some(t=>{let n=t();return x(n,e)||n!=null&&r?.includes(n)})}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{let t=L(e,{getShadowRoot:this.config.getShadowRoot}),n=He(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],i=t[t.length-1],a=r,o=i,s=!1;for(let e=0;e<t.length;e++)if(z(t[e])>0){s=!0;break}function c(e,r=!0){let i=t.indexOf(e);if(i>=0)return t[i+(r?1:-1)];let a=n.indexOf(e);if(!(a<0)){if(r){for(let e=a+1;e<n.length;e++)if(R(n[e]))return n[e]}else for(let e=a-1;e>=0;e--)if(R(n[e]))return n[e]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:s,firstTabbableNode:r,lastTabbableNode:i,firstDomTabbableNode:a,lastDomTabbableNode:o,nextTabbableNode:c}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption(`fallbackFocus`))throw Error(`Your focus-trap must have at least one container with at least one tabbable node in it at all times`);if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw Error(`At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.`)}attachListeners(){if(this.state.active)return fn.activateTrap(this.trapStack,this),this.listenerCleanups.push(N(this.doc,`focusin`,this.handleFocus,!0),N(this.doc,`mousedown`,this.handlePointerDown,{capture:!0,passive:!1}),N(this.doc,`touchstart`,this.handlePointerDown,{capture:!0,passive:!1}),N(this.doc,`click`,this.handleClick,{capture:!0,passive:!1}),N(this.doc,`keydown`,this.handleTabKey,{capture:!0,passive:!1}),N(this.doc,`keydown`,this.handleEscapeKey)),this}commitInitialFocus(){return this.state.delayInitialFocusTimer=this.config.delayInitialFocus?bn(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this}addListeners(){if(this.state.active)return this.attachListeners(),this.commitInitialFocus(),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}containsElement(e){return this.state.containers.some(t=>x(t,e))}isSafeToOverrideFocus(){let e=P(this.doc);return!e||e===this.doc.body||this.containsElement(e)?!0:this.trapStack.some(t=>t!==this&&t.containsElement(e))}activate(e){if(this.state.active)return this;let t=this.getOption(e,`onActivate`),n=this.getOption(e,`onPostActivate`),r=this.getOption(e,`checkCanFocusTrap`);r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=P(this.doc),t?.();let i=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n?.()};return r?(r(this.state.containers.concat()).then(i,i),this):(i(),this)}},hn=e=>e?.type===`keydown`,gn=e=>hn(e)&&e?.key===`Tab`,_n=e=>hn(e)&&e.key===`Tab`&&!e?.shiftKey,vn=e=>hn(e)&&e.key===`Tab`&&e?.shiftKey,$=(e,...t)=>typeof e==`function`?e(...t):e,yn=e=>!e.isComposing&&e.key===`Escape`,bn=e=>setTimeout(e,0),xn=e=>e.localName===`input`&&`select`in e&&typeof e.select==`function`;function Sn(e,t={}){let n,r=j(()=>{let r=(Array.isArray(e)?e:[e]).map(e=>typeof e==`function`?e():e).filter(e=>e!=null);if(r.length===0)return;let i=r[0];n=new mn(r,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:i,...t,document:k(i)});try{n.activate()}catch{}});return function(){n?.deactivate(),r()}}var Cn=`data-scroll-lock`,wn=new WeakMap;function Tn(e){let t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?`paddingLeft`:`paddingRight`}function En(e){let t=Se(e)?.scrollbarGutter;
1return t===`stable`||t?.startsWith(`stable `)===!0}function Dn(e){let{documentElement:t,body:n}=e;return H(t)?t:n}function On(e){let t=e.defaultView??window,{documentElement:n,body:r}=e,i=Dn(e),a=En(n)||En(r),o=t.innerWidth-n.clientWidth;r.setAttribute(Cn,``);let s=()=>Je(n,`--scrollbar-width`,`${o}px`),c=Tn(n),l=[s(),ve()?(()=>{let{scrollX:e,scrollY:n,visualViewport:i}=t,s=i?.offsetLeft??0,l=i?.offsetTop??0,u={position:`fixed`,overflow:`hidden`,top:`${-(n-Math.floor(l))}px`,left:`${-(e-Math.floor(s))}px`,right:`0`};!a&&o>0&&(u[c]=`${o}px`);let d=U(r,u);return()=>{d?.(),t.scrollTo({left:e,top:n,behavior:`instant`})}})():(()=>{let e={overflow:`hidden`};return!a&&o>0&&(e[c]=`${o}px`),U(i,e)})()];return()=>{l.forEach(e=>e?.()),r.removeAttribute(Cn)}}function kn(e){let t=e??document,n=wn.get(t);n||(n={count:0,cleanup:On(t)},wn.set(t,n)),n.count++;let r=n,i=!1;return()=>{i||(i=!0,r.count--,r.count===0&&(r.cleanup(),wn.delete(t)))}}var An=E({props({props:e,scope:t}){let n=e.role===`alertdialog`,r=n?()=>Yt(t):void 0,i=typeof e.modal!=`boolean`||e.modal;return{role:`dialog`,modal:i,trapFocus:i,preventScroll:i,closeOnInteractOutside:i&&!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r,...e}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`closed`},context({bindable:e,prop:t,scope:n}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}})),triggerValue:e(()=>({defaultValue:t(`defaultTriggerValue`)??null,value:t(`triggerValue`),onChange(e){let r=t(`onTriggerValueChange`);r&&r({value:e,triggerElement:Zt(n,e)})}}))}},watch({track:e,action:t,prop:n}){e([()=>n(`open`)],()=>{t([`toggleVisibility`])})},states:{open:{entry:[`checkRenderedElements`,`setInitialFocus`],effects:[`trackDismissableElement`,`trapFocus`,`preventScroll`,`hideContentBelow`],on:{"CONTROLLED.CLOSE":{target:`closed`},CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"TRIGGER_VALUE.SET":{actions:[`setTriggerValue`]}}},closed:{on:{"CONTROLLED.OPEN":{target:`open`},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`]}],TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`]}],"TRIGGER_VALUE.SET":{actions:[`setTriggerValue`]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e(`open`)!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return wt(()=>J(e),{type:`dialog`,defer:!0,pointerBlocking:n(`modal`),layerStyleTargets:[()=>Gt(e),()=>
1Wt(e)],exclude:[Kt(e),...Xt(e)].filter(Boolean),onInteractOutside(e){n(`onInteractOutside`)?.(e),n(`closeOnInteractOutside`)||e.preventDefault()},persistentElements:n(`persistentElements`),onFocusOutside:n(`onFocusOutside`),onPointerDownOutside:n(`onPointerDownOutside`),onRequestDismiss:n(`onRequestDismiss`),onEscapeKeyDown(e){n(`onEscapeKeyDown`)?.(e),n(`closeOnEscape`)||e.preventDefault()},onDismiss(){t({type:`CLOSE`,src:`interact-outside`})}})},preventScroll({scope:e,prop:t}){if(t(`preventScroll`))return kn(e.getDoc())},trapFocus({scope:e,prop:t,context:n}){return t(`trapFocus`)?Sn(()=>J(e),{preventScroll:!0,returnFocusOnDeactivate:!!t(`restoreFocus`),initialFocus:()=>B({root:J(e),getInitialEl:t(`initialFocusEl`)}),setReturnFocus:r=>{let i=t(`finalFocusEl`)?.();if(i)return i;let a=n.get(`triggerValue`);if(a){let t=Zt(e,a);if(t)return t}return Xt(e)[0]||r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t(`modal`)?ln(()=>[J(e)],{defer:!0}):void 0}},actions:{setInitialFocus({prop:e,scope:t}){e(`trapFocus`)||j(()=>{B({root:J(t),getInitialEl:e(`initialFocusEl`)})?.focus({preventScroll:!0})})},checkRenderedElements({context:e,scope:t}){j(()=>{e.set(`rendered`,{title:!!qt(t),description:!!Jt(t)})})},invokeOnClose({prop:e}){e(`onOpenChange`)?.({open:!1})},invokeOnOpen({prop:e}){e(`onOpenChange`)?.({open:!0})},setTriggerValue({context:e,event:t}){t.value!==void 0&&e.set(`triggerValue`,t.value)},toggleVisibility({prop:e,send:t,event:n}){t({type:e(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:n})}}}}),jn=_e()(`triggerValue.aria-label.closeOnEscape.closeOnInteractOutside.defaultTriggerValue.defaultOpen.dir.finalFocusEl.getRootNode.id.ids.initialFocusEl.modal.onTriggerValueChange.onEscapeKeyDown.onFocusOutside.onInteractOutside.onOpenChange.onPointerDownOutside.onRequestDismiss.open.persistentElements.preventScroll.restoreFocus.role.trapFocus`.split(`.`)),Mn=he(jn);function Nn(e){let t=pe.consume(),n=de(An,()=>({dir:t().dir,...typeof e==`function`?e():e})),r=c(()=>Qt(n,me));return()=>o(r)}function Pn(n,a){let s=r();u(a,!0);let l=p(a,[`$$slots`,`$$events`,`$$legacy`]),m=c(()=>Mn(l)),g=c(()=>_(o(m),2)),v=c(()=>o(g)[0]),y=c(()=>o(g)[1]),b=c(()=>o(y).children),x=Nn(()=>({...o(v),id:s}));K.provide(()=>x());var S=i(),C=h(S);e(C,()=>o(b)??t),d(n,S),f()}var Fn=a(`<div><!></div>`);function In(r,a){u(a,!0);let m=p(a,[`$$slots`,`$$events`,`$$legacy`]),_=K.consume(),y=c(()=>a.element),b=c(()=>a.children),x=c(()=>v(m,[`element`,`children`])),S=c(()=>A(_().getTitleProps(),o(x)));var C=i(),w=h(C),T=t=>{var n=i(),r=h(n);e(r,()=>o(y),()=>o(S)),d(t,n)},E=n=>{var r=Fn();g(r,()=>({...o(S)}));var i=l(r);e(i,()=>o(b)??t),s(r),d(n,r)};n(w,e=>{o(y)?e(T):e(E,-1)}),d(r,C),f()}var Ln=a(`<button><!></button>`);function Rn(r,a){u(a,!0);let m=p(a,[`$$slots`,`$$events`,`$$legacy`]),_=K.consume(),y=c(()=>a.element),b=c(()=>a.children),x=c(()=>v(m,[`element`,`children`])),S=c(()=>A(_().getTriggerProps(),o(x)));var C=i(),w=h(C),T=t=>{var n=i(),r=h(n);e(r,()=>o(y),()=>o(S)),d(t,n)},E=n=>{var r=Ln();g(r,()=>({...o(S)}));var i=l(r);e(i,()=>o(b)??t),s(r),d(n,r)};n(w,e=>{o(y)?e(T):e(E,-1)}),d(r,C),f()}var zn=Object.assign(Pn,{Provider:It,Context:Ft,Trigger:Rn,Backdrop:Et,Positioner:Pt,Content:At,Title:In,Description:Mt,CloseTrigger:Ot});function Bn(e,t){let n=p(t,[`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]];be(e,m({name:`x`},()=>n,{get iconNode(){return r}}))}export{ln as a,We as c,L as d,Se as f,Sn as i,B as l,zn as n,wt as o,kn as r,qe as s,Bn as t,Ue as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.