1import{r as N,R as k}from"./chunk-62JRHF6Z-zNziGdWE.js";import{$ as Q}from"./filterDOMProps-Dod4lsw2.js";import{$ as U,d as E,h as L,e as D,b as x,c as w,j as X,k as Y,f as Z,g as ee,F as te,G as re,i as ne,t as oe}from"./index-Cp5s4RKm.js";import{$ as ae}from"./I18nProvider-D87RN2Wa.js";function ie(t){let{ref:e,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=t,i=N.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),u=U(d=>{r&&W(d,e)&&(o&&o(d),i.current.isPointerDown=!0)}),a=U(d=>{r&&r(d)});N.useEffect(()=>{let d=i.current;if(n)return;const l=e.current,s=E(l);if(typeof PointerEvent<"u"){let c=f=>{d.isPointerDown&&W(f,e)&&a(f),d.isPointerDown=!1};return s.addEventListener("pointerdown",u,!0),s.addEventListener("click",c,!0),()=>{s.removeEventListener("pointerdown",u,!0),s.removeEventListener("click",c,!0)}}},[e,n])}function W(t,e){if(t.button>0)return!1;let r=L(t);if(r){const n=r.ownerDocument;if(!n||!D(n.documentElement,r)||r.closest("[data-react-aria-top-layer]"))return!1}return e.current?!t.composedPath().includes(e.current):!1}const q=k.createContext(null),M="react-aria-focus-scope-restore";let v=null;function Ee(t){let{children:e,contain:r,restoreFocus:n,autoFocus:o}=t,i=N.useRef(null),u=N.useRef(null),a=N.useRef([]),{parentNode:d}=N.useContext(q)||{},l=N.useMemo(()=>new K({scopeRef:a}),[a]);x(()=>{let f=d||m.root;if(m.getTreeNode(f.scopeRef)&&v&&!I(v,f.scopeRef)){let b=m.getTreeNode(v);b&&(f=b)}f.addChild(l),m.addNode(l)},[l,d]),x(()=>{let f=m.getTreeNode(a);f&&(f.contain=!!r)},[r]),x(()=>{var f;let b=(f=i.current)===null||f===void 0?void 0:f.nextSibling,$=[],S=p=>p.stopPropagation();for(;b&&b!==u.current;)$.push(b),b.addEventListener(M,S),b=b.nextSibling;return a.current=$,()=>{for(let p of $)p.removeEventListener(M,S)}},[e]),be(a,n,r),se(a,r),pe(a,n,r),de(a,o),N.useEffect(()=>{const f=w(E(a.current?a.current[0]:void 0));let b=null;if(T(f,a.current)){for(let $ of m.traverse())$.scopeRef&&T(f,$.scopeRef.current)&&(b=$);b===m.getTreeNode(a)&&(v=b.scopeRef)}},[a]),x(()=>()=>{var f,b,$;let S=($=(b=m.getTreeNode(a))===null||b===void 0||(f=b.parent)===null||f===void 0?void 0:f.scopeRef)!==null&&$!==void 0?$:null;(a===v||I(a,v))&&(!S||m.getTreeNode(S))&&(v=S),m.removeTreeNode(a)},[a]);let s=N.useMemo(()=>le(a),[]),c=N.useMemo(()=>({focusManager:s,parentNode:l}),[l,s]);return k.createElement(q.Provider,{value:c},k.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:i}),e,k.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:u}))}function le(t){return{focusNext(e={}){let r=t.current,{from:n,tabbable:o,wrap:i,accept:u}=e;var a;let d=n||w(E((a=r[0])!==null&&a!==void 0?a:void 0)),l=r[0].previousElementSibling,s=C(r),c=h(s,{tabbable:o,accept:u},r);c.currentNode=T(d,r)?d:l;let f=c.nextNode();return!f&&i&&(c.currentNode=l,f=c.nextNode()),f&&g(f,!0),f},focusPrevious(e={}){let r=t.current,{from:n,tabbable:o,wrap:i,accept:u}=e;var a;let d=n||w(E((a=r[0])!==null&&a!==void 0?a:void 0)),l=r[r.length-1].nextElementSibling,s=C(r),c=h(s,{tabbable:o,accept:u},r);c.currentNode=T(d,r)?d:l;let f=c.previousNode();return!f&&i&&(c.currentNode=l,f=c.previousNode()),f&&g(f,!0),f},focusFirst(e={}){let r=t.current,{tabbable:n,accept:o}=e,i=C(r),u=h(i,{tabbable:n,accept:o},r);u.currentNode=r[0].previousElementSibling;let a=u.nextNode();return a&&g(a,!0),a},focusLast(e={}){let r=t.current,{tabbable:n,accept:o}=e,i=C(r),u=h(i,{tabbable:n,accept:o},r);u.currentNode=r[r.length-1].nextElementSibling;let a=u.previousNode();return a&&g(a,!0),a}}}function C(t){return t[0].parentElement}function F(t){let e=m.getTreeNode(v);for(;e&&e.scopeRef!==t;){if(e.contain)return!1;e=e.parent}return!0}function ue(t){if(!t.form)return Array.from(E(t).querySelectorAll(`input[type="radio"][name="${CSS.escape(t.name)}"]`)).filter(n=>!n.form);const e=t.form.elements.namedItem(t.name);let r=ne(t);return e instanceof r.RadioNodeList?Array.from(e).filter(n=>n instanceof r.HTMLInputElement):e instanceof r.HTMLInputElement?[e]:[]}function ce(t){if(t.checked)return!0;const e=ue(t);return e.length>0&&!e.some(r=>r.checked)}function se(t,e){let r=N.useRef(void 0),n=N.useRef(void 0);x(()=>{let o=t.current;if(!e){n.current&&(cancelAnimationFrame(n.current),n.current=void 0);return}const i=E(o?o[0]:void 0);let u=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!F(t)||l.isComposing)return;let s=w(i),c=t.current;if(!c||!T(s,c))return;let f=C(c),b=h(f,{tabbable:!0},c);if(!s)return;b.currentNode=s;let $=l.shiftKey?b.previousNode():b.nextNode();$||(b.currentNode=l.shiftKey?c[c.length-1].nextElementSibling:c[0].previousElementSibling,$=l.shiftKey?b.previousNode():b.nextNode()),l.preventDefault(),$&&g($,!0)},a=l=>{(!v||I(v,t))&&T(L(l),t.current)?(v=t,r.current=L(l)):F(t)&&!R(L(l),t)?r.current?r.current.focus():v&&v.current&&O(v.current):F(t)&&(r.current=L(l))},d=l=>{n.current&&cancelAnimationFrame(n.current),n.current=requestAnimationFrame(()=>{let s=re(),c=(s==="virtual"||s===null)&&X()&&Y(),f=w(i);if(!c&&f&&F(t)&&!R(f,t)){v=t;let $=L(l);if($&&$.isConnected){var b;r.current=$,(b=r.current)===null||b===void 0||b.focus()}else v.current&&O(v.current)}})};return i.addEventListener("keydown",u,!1),i.addEventListener("focusin",a,!1),o?.forEach(l=>l.addEventListener("focusin",a,!1)),o?.forEach(l=>l.addEventListener("focusout",d,!1)),()=>{i.removeEventListener("keydown",u,!1),i.removeEventListener("focusin",a,!1),o?.forEach(l=>l.removeEventListener("focusin",a,!1)),o?.forEach(l=>l.removeEventListener("focusout",d,!1))}},[t,e]),x(()=>()=>{n.current&&cancelAnimationFrame(n.current)},[n])}function V(t){return R(t)}function T(t,e){return!t||!e?!1:e.some(r=>D(r,t))}function R(t,e=null){if(t instanceof Element&&t.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of m.traverse(m.getTreeNode(e)))if(r&&T(t,r.current))return!0;return!1}function fe(t){return R(t,v)}function I(t,e){var r;let n=(r=m.getTreeNode(e))===null||r===void 0?void 0:r.parent;for(;n;){if(n.scopeRef===t)return!0;n=n.parent}return!1}function g(t,e=!1){if(t!=null&&!e)try{te(t)}catch{}else if(t!=null)try{t.focus()}catch{}}function j(t,e=!0){let r=t[0].previousElementSibling,n=C(t),o=h(n,{tabbable:e},t);o.currentNode=r;let i=o.nextNode();return e&&!i&&(n=C(t),o=h(n,{tabbable:!1},t),o.currentNode=r,i=o.nextNode()),i}function O(t,e=!0){g(j(t,e))}function de(t,e){const r=k.useRef(e);N.useEffect(()=>{if(r.current){v=t;const n=E(t.current?t.current[0]:void 0);!T(w(n),v.current)&&t.current&&O(t.current)}r.current=!1},[t])}function be(t,e,r){x(()=>
vendor: 4,357 bytes, line 1
1{if(e||r)return;let n=t.current;const o=E(n?n[0]:void 0);let i=u=>{let a=L(u);T(a,t.current)?v=t:V(a)||(v=null)};return o.addEventListener("focusin",i,!1),n?.forEach(u=>u.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),n?.forEach(u=>u.removeEventListener("focusin",i,!1))}},[t,e,r])}function B(t){let e=m.getTreeNode(v);for(;e&&e.scopeRef!==t;){if(e.nodeToRestore)return!1;e=e.parent}return e?.scopeRef===t}function pe(t,e,r){const n=N.useRef(typeof document<"u"?w(E(t.current?t.current[0]:void 0)):null);x(()=>{let o=t.current;const i=E(o?o[0]:void 0);if(!e||r)return;let u=()=>{(!v||I(v,t))&&T(w(i),t.current)&&(v=t)};return i.addEventListener("focusin",u,!1),o?.forEach(a=>a.addEventListener("focusin",u,!1)),()=>{i.removeEventListener("focusin",u,!1),o?.forEach(a=>a.removeEventListener("focusin",u,!1))}},[t,r]),x(()=>{const o=E(t.current?t.current[0]:void 0);if(!e)return;let i=u=>{if(u.key!=="Tab"||u.altKey||u.ctrlKey||u.metaKey||!F(t)||u.isComposing)return;let a=o.activeElement;if(!R(a,t)||!B(t))return;let d=m.getTreeNode(t);if(!d)return;let l=d.nodeToRestore,s=h(o.body,{tabbable:!0});s.currentNode=a;let c=u.shiftKey?s.previousNode():s.nextNode();if((!l||!l.isConnected||l===o.body)&&(l=void 0,d.nodeToRestore=void 0),(!c||!R(c,t))&&l){s.currentNode=l;do c=u.shiftKey?s.previousNode():s.nextNode();while(R(c,t));u.preventDefault(),u.stopPropagation(),c?g(c,!0):V(l)?g(l,!0):a.blur()}};return r||o.addEventListener("keydown",i,!0),()=>{r||o.removeEventListener("keydown",i,!0)}},[t,e,r]),x(()=>{const o=E(t.current?t.current[0]:void 0);if(!e)return;let i=m.getTreeNode(t);if(i){var u;return i.nodeToRestore=(u=n.current)!==null&&u!==void 0?u:void 0,()=>{let a=m.getTreeNode(t);if(!a)return;let d=a.nodeToRestore,l=w(o);if(e&&d&&(l&&R(l,t)||l===o.body&&B(t))){let s=m.clone();requestAnimationFrame(()=>{if(o.activeElement===o.body){let c=s.getTreeNode(t);for(;c;){if(c.nodeToRestore&&c.nodeToRestore.isConnected){G(c.nodeToRestore);return}c=c.parent}for(c=s.getTreeNode(t);c;){if(c.scopeRef&&c.scopeRef.current&&m.getTreeNode(c.scopeRef)){let f=j(c.scopeRef.current,!0);G(f);return}c=c.parent}}})}}}},[t,e])}function G(t){t.dispatchEvent(new CustomEvent(M,{bubbles:!0,cancelable:!0}))&&g(t)}function h(t,e,r){let n=e?.tabbable?Z:ee,o=t?.nodeType===Node.ELEMENT_NODE?t:null,i=E(o),u=ae(i,t||i,NodeFilter.SHOW_ELEMENT,{acceptNode(a){return D(e?.from,a)||e?.tabbable&&a.tagName==="INPUT"&&a.getAttribute("type")==="radio"&&(!ce(a)||u.currentNode.tagName==="INPUT"&&u.currentNode.type==="radio"&&u.currentNode.name===a.name)?NodeFilter.FILTER_REJECT:n(a)&&(!r||T(a,r))&&(!e?.accept||e.accept(a))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e?.from&&(u.currentNode=e.from),u}function ge(t,e={}){return{focusNext(r={}){let n=t.current;if(!n)return null;let{from:o,tabbable:i=e.tabbable,wrap:u=e.wrap,accept:a=e.accept}=r,d=o||w(E(n)),l=h(n,{tabbable:i,accept:a});D(n,d)&&(l.currentNode=d);let s=l.nextNode();return!s&&u&&(l.currentNode=n,s=l.nextNode()),s&&g(s,!0),s},focusPrevious(r=e){let n=t.current;if(!n)return null;let{from:o,tabbable:i=e.tabbable,wrap:u=e.wrap,accept:a=e.accept}=r,d=o||w(E(n)),l=h(n,{tabbable:i,accept:a});if(D(n,d))l.currentNode=d;else{let c=A(l);return c&&g(c,!0),c??null}let s=l.previousNode();if(!s&&u){l.currentNode=n;let c=A(l);if(!c)return null;s=c}return s&&g(s,!0),s??null},focusFirst(r=e){let n=t.current;if(!n)return null;let{tabbable:o=e.tabbable,accept:i=e.accept}=r,a=h(n,{tabbable:o,accept:i}).nextNode();return a&&g(a,!0),a},focusLast(r=e){let n=t.current;if(!n)return null;let{tabbable:o=e.tabbable,accept:i=e.accept}=r,u=h(n,{tabbable:o,accept:i}),a=A(u);return a&&g(a,!0),a??null}}}function A(t){let e,r;do r=t.lastChild(),r&&(e=r);while(r);return e}class z{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,r,n){let o=this.fastMap.get(r??null);if(!o)return;let i=new K({scopeRef:e});o.addChild(i),i.parent=o,this.fastMap.set(e,i),n&&(i.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let r=this.fastMap.get(e);if(!r)return;let n=r.parent;for(let i of this.traverse())i!==r&&r.nodeToRestore&&i.nodeToRestore&&r.scopeRef&&r.scopeRef.current&&T(i.nodeToRestore,r.scopeRef.current)&&(i.nodeToRestore=r.nodeToRestore);let o=r.children;n&&(n.removeChild(r),o.size>0&&o.forEach(i=>
1n&&n.addChild(i))),this.fastMap.delete(r.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let r of e.children)yield*this.traverse(r)}clone(){var e;let r=new z;var n;for(let o of this.traverse())r.addTreeNode(o.scopeRef,(n=(e=o.parent)===null||e===void 0?void 0:e.scopeRef)!==null&&n!==void 0?n:null,o.nodeToRestore);return r}constructor(){this.fastMap=new Map,this.root=new K({scopeRef:null}),this.fastMap.set(null,this.root)}}class K{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let m=new z;var J={ease:[.36,.66,.4,1]},he={scaleSpring:{enter:{transform:"scale(1)",opacity:1,transition:{type:"spring",bounce:0,duration:.2}},exit:{transform:"scale(0.85)",opacity:0,transition:{type:"easeOut",duration:.15}}},scaleSpringOpacity:{initial:{opacity:0,transform:"scale(0.8)"},enter:{opacity:1,transform:"scale(1)",transition:{type:"spring",bounce:0,duration:.3}},exit:{opacity:0,transform:"scale(0.96)",transition:{type:"easeOut",bounce:0,duration:.15}}},fade:{enter:{opacity:1,transition:{duration:.4,ease:J.ease}},exit:{opacity:0,transition:{duration:.3,ease:J.ease}}},collapse:{enter:{opacity:1,height:"auto",transition:{height:{type:"spring",bounce:0,duration:.3},opacity:{easings:"ease",duration:.4}}},exit:{opacity:0,height:0,transition:{easings:"ease",duration:.3}}}};function Te(t){let[e,r]=Q(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const n=N.useCallback(()=>{r(!0)},[r]),o=N.useCallback(()=>{r(!1)},[r]),i=N.useCallback(()=>{r(!e)},[r,e]);return{isOpen:e,setOpen:r,open:n,close:o,toggle:i}}var y=[];function we(t,e){const{disableOutsideEvents:r=!0,isDismissable:n=!1,isKeyboardDismissDisabled:o=!1,isOpen:i,onClose:u,shouldCloseOnBlur:a,shouldCloseOnInteractOutside:d}=t;N.useEffect(()=>{if(i&&!y.includes(e))return y.push(e),()=>{let p=y.indexOf(e);p>=0&&y.splice(p,1)}},[i,e]);const l=()=>{y[y.length-1]===e&&u&&u()},s=p=>{(!d||d(p.target))&&(y[y.length-1]===e&&r&&(p.stopPropagation(),p.preventDefault()),S(e)!=="pressEnd"&&l())},c=p=>{(!d||d(p.target))&&(y[y.length-1]===e&&r&&(p.stopPropagation(),p.preventDefault()),l())},f=p=>{p.key==="Escape"&&!o&&!p.nativeEvent.isComposing&&(p.stopPropagation(),p.preventDefault(),l())};ie({isDisabled:!(n&&i),onInteractOutside:n&&i?c:void 0,onInteractOutsideStart:s,ref:e});const{focusWithinProps:b}=oe({isDisabled:!a,onBlurWithin:p=>{!p.relatedTarget||fe(p.relatedTarget)||(!d||d(p.relatedTarget))&&l()}}),$=p=>{p.target===p.currentTarget&&p.preventDefault()};function S(p){const _=p.current;if(!_)return"unknown";const P=(_.getAttribute("role")||"").toLowerCase(),H=_.getAttribute("aria-modal");return(P==="dialog"||P==="alertdialog")&&(H===null||H.toLowerCase()==="true")?"pressEnd":["listbox","menu","tree","grid","combobox"].includes(P)?"pressStart":"unknown"}return{overlayProps:{onKeyDown:f,...b},underlayProps:{onPointerDown:$}}}export{Te as $,he as T,h as a,J as b,Ee as c,ie as d,ge as e,we 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.