1import{i as e,n as t,t as n}from"./jsx-runtime-Dk72oS4N.js";import{n as r,r as i}from"./dist-CWLky9Ub.js";import{t as a}from"./utils-DOQQTBMN.js";import{Ot as o,_t as s,bt as c,gt as l,ht as u,vt as d,xt as f,yt as p}from"./index-DT2bybze.js";var m=e(t(),1),h=n(),g=Object.defineProperty,_=(e,t)=>g(e,`name`,{value:t,configurable:!0});function v(e){let t=e+`CollectionProvider`,[n,a]=c(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=_(e=>{let{scope:t,children:n}=e,r=m.useRef(null),i=m.useRef(new Map).current;return(0,h.jsx)(o,{scope:t,itemMap:i,collectionRef:r,children:n})},`CollectionProvider`);l.displayName=t;let u=e+`CollectionSlot`,d=r(u),f=m.forwardRef((e,t)=>{let{scope:n,children:r}=e,a=s(u,n),o=i(t,a.collectionRef);return(0,h.jsx)(d,{ref:o,children:r})});f.displayName=u;let p=e+`CollectionItemSlot`,g=`data-radix-collection-item`,v=r(p),y=m.forwardRef((e,t)=>{let{scope:n,children:r,...a}=e,o=m.useRef(null),c=i(t,o),l=s(p,n);return m.useEffect(()=>(l.itemMap.set(o,{ref:o,...a}),()=>void l.itemMap.delete(o))),(0,h.jsx)(v,{[g]:``,ref:c,children:r})});y.displayName=p;function b(t){let n=s(e+`CollectionConsumer`,t);return m.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return _(b,`useCollection`),[{Provider:l,Slot:f,ItemSlot:y},b,a]}_(v,`createCollection`);var y=new WeakMap,b=class e extends Map{static{_(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],y.set(this,!0)}set(e,t){return y.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=C(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=x(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=x(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return x(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function x(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=S(e,t);return n===-1?void 0:e[n]}_(x,`at`);function S(e,t){let n=e.length,r=C(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}_(S,`toSafeIndex`);function C(e){return e!==e||e===0?0:Math.trunc(e)}_(C,`toSafeInteger`);function ee(e){let t=e+`CollectionProvider`,[n,a]=c(t),[o,s]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new b,setItemMap:_(()=>void 0,`setItemMap`)}),l=_(({state:e,...t})=>e?(0,h.jsx)(d,{...t,state:e}):(0,h.jsx)(u,{...t}),`CollectionProvider`);l.displayName=t;let u=_(e=>{let t=S();return(0,h.jsx)(d,{...e,state:t})},`CollectionInit`);u.displayName=t+`Init`;let d=_(e=>{let{scope:t,children:n,state:r}=e,a=m.useRef(null),[s,c]=m.useState(null),l=i(a,c),[u,d]=r;return m.useEffect(()=>{if(!s)return;let e=D(()=>{});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s]),(0,h.jsx)(o,{scope:t,itemMap:u,setItemMap:d,collectionRef:l,collectionRefObject:a,collectionElement:s,children:n})},`CollectionProviderImpl`);d.displayName=t+`Impl`;let f=e+`CollectionSlot`,p=r(f),g=m.forwardRef((e,t)=>
1{let{scope:n,children:r}=e,a=s(f,n),o=i(t,a.collectionRef);return(0,h.jsx)(p,{ref:o,children:r})});g.displayName=f;let v=e+`CollectionItemSlot`,y=r(v),x=m.forwardRef((e,t)=>{let{scope:n,children:r,...a}=e,o=m.useRef(null),[c,l]=m.useState(null),u=i(t,o,l),{setItemMap:d}=s(v,n),f=m.useRef(a);w(f.current,a)||(f.current=a);let p=f.current;return m.useEffect(()=>{let e=p;return d(t=>c?t.has(c)?t.set(c,{...e,element:c}).toSorted(E):(t.set(c,{...e,element:c}),t.toSorted(E)):t),()=>{d(e=>!c||!e.has(c)?e:(e.delete(c),new b(e)))}},[c,p,d]),(0,h.jsx)(y,{"data-radix-collection-item":``,ref:u,children:r})});x.displayName=v;function S(){return m.useState(new b)}_(S,`useInitCollection`);function C(t){let{itemMap:n}=s(e+`CollectionConsumer`,t);return n}return _(C,`useCollection`),[{Provider:l,Slot:g,ItemSlot:x},{createCollectionScope:a,useCollection:C,useInitCollection:S}]}_(ee,`createCollection`);function w(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}_(w,`shallowEqual`);function T(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}_(T,`isElementPreceding`);function E(e,t){return!e[1].element||!t[1].element?0:T(e[1].element,t[1].element)?-1:1}_(E,`sortByDocumentPosition`);function D(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}_(D,`getChildListObserver`);var te=Object.defineProperty,O=(e,t)=>te(e,`name`,{value:t,configurable:!0}),k=`Collapsible`,[ne,A]=c(k),[re,j]=ne(k),ie=m.forwardRef(O(function(e,t){let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...c}=e,[u,f]=s({prop:r,defaultProp:i??!1,onChange:o,caller:k});return(0,h.jsx)(re,{scope:n,disabled:a,contentId:d(),open:u,onOpenToggle:m.useCallback(()=>f(e=>!e),[f]),children:(0,h.jsx)(l.div,{"data-state":N(u),"data-disabled":a?``:void 0,...c,ref:t})})},`Collapsible`)),ae=`CollapsibleTrigger`,oe=m.forwardRef(O(function(e,t){let{__scopeCollapsible:n,...r}=e,i=j(ae,n);return(0,h.jsx)(l.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":N(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:f(e.onClick,i.onOpenToggle)})},`CollapsibleTrigger`)),M=`CollapsibleContent`,se=m.forwardRef(O(function(e,t){let{forceMount:n,...r}=e,i=j(M,e.__scopeCollapsible);return(0,h.jsx)(u,{present:n||i.open,children:({present:e})=>(0,h.jsx)(ce,{...r,ref:t,present:e})})},`CollapsibleContent`)),ce=m.forwardRef(O(function(e,t){let{__scopeCollapsible:n,present:r,children:a,...o}=e,s=j(M,n),[c,u]=m.useState(r),d=m.useRef(null),f=i(t,d),g=m.useRef(0),_=g.current,v=m.useRef(0),y=v.current,b=s.open||c,x=m.useRef(b),S=m.useRef(void 0);return m.useEffect(()=>{let e=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(e)},[]),p(()=>{let e=d.current;if(e){S.current=S.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();g.current=t.height,v.current=t.width,x.current||(e.style.transitionDuration=S.current.transitionDuration,e.style.animationName=S.current.animationName),u(r)}},[s.open,r]),(0,h.jsx)(l.div,{"data-state":N(s.open),"data-disabled":s.disabled?``:void 0,id:s.contentId,hidden:!b,...o,ref:f,style:{"--radix-collapsible-content-height":_?`${_}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:b&&a})},`CollapsibleContentImpl`));function N(e){return e?`open`:`closed`}O(N,`getState`);var le=ie,ue=oe,de=se,fe=Object.defineProperty,pe=(e,t)=>fe(e,`name`,{value:t,configurable:!0}),me=m.createContext(void 0);function P(e){let t=m.useContext(me);return e||t||`ltr`}pe(P,`useDirection`);var he=Object.defineProperty,F=(e,t)=>he(e,`name`,{value:t,configurable:!0}),I=`Accordion`,ge=[`Home`,`End`,`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`],[L,_e,ve]=v(I),[R,ye]=c(I,[ve,A]),z=A(),be=m.forwardRef(F(function(e,t){let{type:n,...r}=e,i=r,a=r;return(0,h.jsx)(L.Provider,{scope:e.__scopeAccordion,children:n===`multiple`?(0,h.jsx)(we,{...a,ref:t}):(0,h.jsx)(Ce,{...i,ref:t})})},`Accordion`)),[B,xe]=R(I),[V,Se]=R(I,{collapsible:!1}
1),Ce=m.forwardRef(F(function(e,t){let{value:n,defaultValue:r,onValueChange:i=F(()=>{},`onValueChange`),collapsible:a=!1,...o}=e,[c,l]=s({prop:n,defaultProp:r??``,onChange:i,caller:I});return(0,h.jsx)(B,{scope:e.__scopeAccordion,value:m.useMemo(()=>c?[c]:[],[c]),onItemOpen:l,onItemClose:m.useCallback(()=>a&&l(``),[a,l]),children:(0,h.jsx)(V,{scope:e.__scopeAccordion,collapsible:a,children:(0,h.jsx)(U,{...o,ref:t})})})},`AccordionImplSingle`)),we=m.forwardRef(F(function(e,t){let{value:n,defaultValue:r,onValueChange:i=F(()=>{},`onValueChange`),...a}=e,[o,c]=s({prop:n,defaultProp:r??[],onChange:i,caller:I}),l=m.useCallback(e=>c((t=[])=>[...t,e]),[c]),u=m.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return(0,h.jsx)(B,{scope:e.__scopeAccordion,value:o,onItemOpen:l,onItemClose:u,children:(0,h.jsx)(V,{scope:e.__scopeAccordion,collapsible:!0,children:(0,h.jsx)(U,{...a,ref:t})})})},`AccordionImplMultiple`)),[Te,H]=R(I),U=m.forwardRef(F(function(e,t){let{__scopeAccordion:n,disabled:r,dir:a,orientation:o=`vertical`,...s}=e,c=m.useRef(null),u=i(c,t),d=_e(n),p=P(a)===`ltr`,g=f(e.onKeyDown,e=>{if(!ge.includes(e.key))return;let t=e.target,n=d().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),i=n.length;if(r===-1)return;e.preventDefault();let a=r,s=i-1,c=F(()=>{a=r+1,a>s&&(a=0)},`moveNext`),l=F(()=>{a=r-1,a<0&&(a=s)},`movePrev`);switch(e.key){case`Home`:a=0;break;case`End`:a=s;break;case`ArrowRight`:o===`horizontal`&&(p?c():l());break;case`ArrowDown`:o===`vertical`&&c();break;case`ArrowLeft`:o===`horizontal`&&(p?l():c());break;case`ArrowUp`:o===`vertical`&&l()}n[a%i].ref.current?.focus()});return(0,h.jsx)(Te,{scope:n,disabled:r,direction:a,orientation:o,children:(0,h.jsx)(L.Slot,{scope:n,children:(0,h.jsx)(l.div,{...s,"data-orientation":o,ref:u,onKeyDown:r?void 0:g})})})},`AccordionImpl`)),W=`AccordionItem`,[Ee,G]=R(W),De=m.forwardRef(F(function(e,t){let{__scopeAccordion:n,value:r,...i}=e,a=H(W,n),o=xe(W,n),s=z(n),c=d(),l=r&&o.value.includes(r)||!1,u=a.disabled||e.disabled;return(0,h.jsx)(Ee,{scope:n,open:l,disabled:u,triggerId:c,children:(0,h.jsx)(le,{"data-orientation":a.orientation,"data-state":q(l),...s,...i,ref:t,disabled:u,open:l,onOpenChange:e=>{e?o.onItemOpen(r):o.onItemClose(r)}})})},`AccordionItem`)),Oe=`AccordionHeader`,ke=m.forwardRef(F(function(e,t){let{__scopeAccordion:n,...r}=e,i=H(I,n),a=G(Oe,n);return(0,h.jsx)(l.h3,{"data-orientation":i.orientation,"data-state":q(a.open),"data-disabled":a.disabled?``:void 0,...r,ref:t})},`AccordionHeader`)),K=`AccordionTrigger`,Ae=m.forwardRef(F(function(e,t){let{__scopeAccordion:n,...r}=e,i=H(I,n),a=G(K,n),o=Se(K,n),s=z(n);return(0,h.jsx)(L.ItemSlot,{scope:n,children:(0,h.jsx)(ue,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...r,ref:t})})},`AccordionTrigger`)),je=`AccordionContent`,Me=m.forwardRef(F(function(e,t){let{__scopeAccordion:n,...r}=e,i=H(I,n),a=G(je,n),o=z(n);return(0,h.jsx)(de,{role:`region`,"aria-labelledby":a.triggerId,"data-orientation":i.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":`var(--radix-collapsible-content-height)`,"--radix-accordion-content-width":`var(--radix-collapsible-content-width)`,...e.style}})},`AccordionContent`));function q(e){return e?`open`:`closed`}F(q,`getState`);var J=be,Ne=De,Pe=ke,Y=Ae,X=Me,Fe=J,Z=m.forwardRef(({className:e,...t},n)=>(0,h.jsx)(Ne,{ref:n,className:a(`border-b`,e),...t}));Z.displayName=`AccordionItem`;var Q=m.forwardRef(({className:e,children:t,...n},r)=>(0,h.jsx)(Pe,{className:`flex`,children:(0,h.jsxs)(Y,{ref:r,className:a(`flex flex-1 items-center justify-between py-4 text-sm font-medium cursor-pointer transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180`,e),...n,children:[t,(0,h.jsx)(o,{className:`h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200`})]})}));Q.displayName=Y.displayName;var $=m.forwardRef(({className:e,children:t,...n},r)=>(0,h.jsx)(X,{ref:r,className:`overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down`,...n,children:(0,h.jsx)(`div`,{className:a(`pb-4 pt-0`,e),children:t})}));$.displayName=X.displayName;export{Q as i,$ as n,Z as r,Fe as t};
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.