sqlmesh 0.181.2.dev24__py3-none-any.whl → 0.181.2.dev26__py3-none-any.whl
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.
- sqlmesh/_version.py +2 -2
- {sqlmesh-0.181.2.dev24.dist-info → sqlmesh-0.181.2.dev26.dist-info}/METADATA +1 -1
- {sqlmesh-0.181.2.dev24.dist-info → sqlmesh-0.181.2.dev26.dist-info}/RECORD +50 -50
- web/client/dist/assets/Audits-CQSghR1z.js +1 -0
- web/client/dist/assets/Banner-B0bpqtD_.js +1 -0
- web/client/dist/assets/{ChevronDownIcon-BZk6URUK.js → ChevronDownIcon-BCSgClK9.js} +1 -1
- web/client/dist/assets/{ChevronRightIcon-Ctcbr61G.js → ChevronRightIcon-Bcz9goZS.js} +1 -1
- web/client/dist/assets/Content-BhpD1QIh.js +10 -0
- web/client/dist/assets/Content-DcS8joWy.js +1 -0
- web/client/dist/assets/Data-Cx_yMlp4.js +1 -0
- web/client/dist/assets/{DataCatalog-BRzSrlJL.js → DataCatalog-HXtPC12m.js} +1 -1
- web/client/dist/assets/{Editor-7muj9lbw.js → Editor-DOjTVzHs.js} +1 -1
- web/client/dist/assets/Editor-DlcCcxAF.js +1 -0
- web/client/dist/assets/Errors-RKQ2D8gd.js +1 -0
- web/client/dist/assets/FileExplorer-CstWOCnn.js +2 -0
- web/client/dist/assets/{Footer-Cnu_IoqE.js → Footer-CpMoFxgd.js} +1 -1
- web/client/dist/assets/{Header-NJkxh8bb.js → Header-mC2S0YQz.js} +1 -1
- web/client/dist/assets/Input-BmfZ-VnW.js +41 -0
- web/client/dist/assets/Lineage-VCDzvguV.js +1 -0
- web/client/dist/assets/ListboxShow-CVN-1wre.js +1 -0
- web/client/dist/assets/ModelLineage-DxdKn0Xe.js +1 -0
- web/client/dist/assets/Models-BMTG-GKX.js +1 -0
- web/client/dist/assets/{Page-DxTzPmYT.js → Page-DrM7FMiZ.js} +1 -1
- web/client/dist/assets/{Plan-B2b637kI.js → Plan-Cwr9Ts3u.js} +1 -1
- web/client/dist/assets/PlusCircleIcon-DPJ5E9WX.js +1 -0
- web/client/dist/assets/ReportErrors-DXdPHMbP.js +1 -0
- web/client/dist/assets/Root-DyEjo8XJ.js +1 -0
- web/client/dist/assets/{SearchList-9n_6_E0k.js → SearchList-CJR2axiJ.js} +1 -1
- web/client/dist/assets/SelectEnvironment-BhhJ4ZjZ.js +2 -0
- web/client/dist/assets/{SourceList-Chz492Ne.js → SourceList-CXyYEJjr.js} +1 -1
- web/client/dist/assets/{SourceListItem-DIieM0S_.js → SourceListItem-DVQwSGMy.js} +1 -1
- web/client/dist/assets/{SplitPane-CmzNrZQN.js → SplitPane-B5WJSZPo.js} +1 -1
- web/client/dist/assets/Tests-BjGO6Jnt.js +1 -0
- web/client/dist/assets/{Welcome-DxKW_LKA.js → Welcome-DMIPcEFX.js} +1 -1
- web/client/dist/assets/{context-DhymIb_N.js → context-DeHggMKx.js} +37 -37
- web/client/dist/assets/context-Dwh4I8fp.js +1 -0
- web/client/dist/assets/{editor-Bf9rhumO.js → editor-intN6ort.js} +1 -1
- web/client/dist/assets/file-ZamfLSgo.js +1 -0
- web/client/dist/assets/floating-ui.react-dom-dR28niet.js +1 -0
- web/client/dist/assets/{help-DtLmoC0U.js → help-BzkjAMMJ.js} +1 -1
- web/client/dist/assets/{index-CLuHMKlN.js → index-BObtdpsN.js} +1 -1
- web/client/dist/assets/{index-KZcJd7F1.js → index-EyUZDtV7.js} +1 -1
- web/client/dist/assets/plan-gWbTulhw.js +1 -0
- web/client/dist/assets/popover-CA0_-cE5.js +13 -0
- web/client/dist/assets/{project-CjyecwCx.js → project-BX-rNI7d.js} +1 -1
- web/client/dist/index.html +1 -1
- web/client/dist/assets/Audits-7rP8WdsD.js +0 -1
- web/client/dist/assets/Banner-jMPu9_jP.js +0 -1
- web/client/dist/assets/Content-C43kcRta.js +0 -10
- web/client/dist/assets/Content-DITnFT31.js +0 -1
- web/client/dist/assets/Data-B5q1KzIa.js +0 -1
- web/client/dist/assets/Editor-CAMzYH0x.js +0 -1
- web/client/dist/assets/Errors-Bbd2EOQg.js +0 -1
- web/client/dist/assets/FileExplorer-DMR02idl.js +0 -5
- web/client/dist/assets/Input-CYm3h-zG.js +0 -41
- web/client/dist/assets/Lineage-HZl7aUI5.js +0 -1
- web/client/dist/assets/ListboxShow-CwgOYGSe.js +0 -1
- web/client/dist/assets/ModelLineage-Bnes5PV4.js +0 -1
- web/client/dist/assets/Models-B_sukTY5.js +0 -1
- web/client/dist/assets/PlusCircleIcon-FgfUjgrM.js +0 -1
- web/client/dist/assets/ReportErrors-xnNgNULg.js +0 -1
- web/client/dist/assets/Root-BMcIwqdc.js +0 -1
- web/client/dist/assets/SelectEnvironment-DC6x26Ax.js +0 -2
- web/client/dist/assets/Tests-DbVFKqeG.js +0 -1
- web/client/dist/assets/context-CzM900aY.js +0 -1
- web/client/dist/assets/file-CcK5Oobc.js +0 -1
- web/client/dist/assets/index-BdXOfeCo.js +0 -1
- web/client/dist/assets/plan-e4fPD47J.js +0 -1
- web/client/dist/assets/transition-C8EjNcgL.js +0 -4
- {sqlmesh-0.181.2.dev24.dist-info → sqlmesh-0.181.2.dev26.dist-info}/WHEEL +0 -0
- {sqlmesh-0.181.2.dev24.dist-info → sqlmesh-0.181.2.dev26.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.181.2.dev24.dist-info → sqlmesh-0.181.2.dev26.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.181.2.dev24.dist-info → sqlmesh-0.181.2.dev26.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{r as i,j as u,R as re,f as gn,ac as Zr,ad as pe,ae as Qr,a2 as Jr,c as L,W as hn,b as X,w as eo,h as to,a as no,A as ro,L as oo,S as so,m as io}from"./index-KZcJd7F1.js";import{u as k,M as lt}from"./project-CjyecwCx.js";import{r as ao,R as co}from"./index-BdXOfeCo.js";import{u as uo,o as lo,s as fo,f as go,a as ho,b as po,h as mo,l as vo,c as yo,d as Co,e as xo,z as So,g as bo,i as wo,R as Eo,j as Do,k as To}from"./Input-CYm3h-zG.js";import{M as Oo}from"./file-CcK5Oobc.js";import{useFileExplorer as Ge}from"./context-CzM900aY.js";import{u as pn,S as Io}from"./SearchList-9n_6_E0k.js";import{u as Qe}from"./editor-Bf9rhumO.js";import{F as Po}from"./ChevronDownIcon-BZk6URUK.js";import{F as Ro}from"./ChevronRightIcon-Ctcbr61G.js";import"./help-6Q7f7fjd.js";import"./transition-C8EjNcgL.js";function Mo({title:t,titleId:e,...n},r){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?i.createElement("title",{id:e},t):null,i.createElement("path",{d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625Z"}),i.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"}))}const No=i.forwardRef(Mo);function Ao({title:t,titleId:e,...n},r){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?i.createElement("title",{id:e},t):null,i.createElement("path",{d:"M19.906 9c.382 0 .749.057 1.094.162V9a3 3 0 0 0-3-3h-3.879a.75.75 0 0 1-.53-.22L11.47 3.66A2.25 2.25 0 0 0 9.879 3H6a3 3 0 0 0-3 3v3.162A3.756 3.756 0 0 1 4.094 9h15.812ZM4.094 10.5a2.25 2.25 0 0 0-2.227 2.568l.857 6A2.25 2.25 0 0 0 4.951 21H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-2.227-2.568H4.094Z"}))}const _o=i.forwardRef(Ao);function jo({title:t,titleId:e,...n},r){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?i.createElement("title",{id:e},t):null,i.createElement("path",{d:"M19.5 21a3 3 0 0 0 3-3v-4.5a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3V18a3 3 0 0 0 3 3h15ZM1.5 10.146V6a3 3 0 0 1 3-3h5.379a2.25 2.25 0 0 1 1.59.659l2.122 2.121c.14.141.331.22.53.22H19.5a3 3 0 0 1 3 3v1.146A4.483 4.483 0 0 0 19.5 9h-15a4.483 4.483 0 0 0-3 1.146Z"}))}const Fo=i.forwardRef(jo);function P(t,e,{checkForDefaultPrevented:n=!0}={}){return function(o){if(t==null||t(o),n===!1||!o.defaultPrevented)return e==null?void 0:e(o)}}function Te(t,e=[]){let n=[];function r(s,a){const c=i.createContext(a),d=n.length;n=[...n,a];const l=h=>{var y;const{scope:g,children:m,...C}=h,p=((y=g==null?void 0:g[t])==null?void 0:y[d])||c,v=i.useMemo(()=>C,Object.values(C));return u.jsx(p.Provider,{value:v,children:m})};l.displayName=s+"Provider";function f(h,g){var p;const m=((p=g==null?void 0:g[t])==null?void 0:p[d])||c,C=i.useContext(m);if(C)return C;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[l,f]}const o=()=>{const s=n.map(a=>i.createContext(a));return function(c){const d=(c==null?void 0:c[t])||s;return i.useMemo(()=>({[`__scope${t}`]:{...c,[t]:d}}),[c,d])}};return o.scopeName=t,[r,Lo(o,...e)]}function Lo(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((c,{useScope:d,scopeName:l})=>{const h=d(s)[`__scope${l}`];return{...c,...h}},{});return i.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}function Ut(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function mn(...t){return e=>{let n=!1;const r=t.map(o=>{const s=Ut(o,e);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Ut(t[o],null)}}}}function $(...t){return i.useCallback(mn(...t),t)}function He(t){const e=ko(t),n=i.forwardRef((r,o)=>{const{children:s,...a}=r,c=i.Children.toArray(s),d=c.find(Ho);if(d){const l=d.props.children,f=c.map(h=>h===d?i.Children.count(l)>1?i.Children.only(null):i.isValidElement(l)?l.props.children:null:h);return u.jsx(e,{...a,ref:o,children:i.isValidElement(l)?i.cloneElement(l,void 0,f):null})}return u.jsx(e,{...a,ref:o,children:s})});return n.displayName=`${t}.Slot`,n}function ko(t){const e=i.forwardRef((n,r)=>{const{children:o,...s}=n,a=i.isValidElement(o)?Bo(o):void 0,c=$(a,r);if(i.isValidElement(o)){const d=$o(s,o.props);return o.type!==i.Fragment&&(d.ref=c),i.cloneElement(o,d)}return i.Children.count(o)>1?i.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Uo=Symbol("radix.slottable");function Ho(t){return i.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Uo}function $o(t,e){const n={...e};for(const r in e){const o=t[r],s=e[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const d=s(...c);return o(...c),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...t,...n}}function Bo(t){var r,o;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Go=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],B=Go.reduce((t,e)=>{const n=He(`Primitive.${e}`),r=i.forwardRef((o,s)=>{const{asChild:a,...c}=o,d=a?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(d,{...c,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function vn(t,e){t&&ao.flushSync(()=>t.dispatchEvent(e))}function yn(t){const e=t+"CollectionProvider",[n,r]=Te(e),[o,s]=n(e,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:v,children:y}=p,w=re.useRef(null),b=re.useRef(new Map).current;return u.jsx(o,{scope:v,itemMap:b,collectionRef:w,children:y})};a.displayName=e;const c=t+"CollectionSlot",d=He(c),l=re.forwardRef((p,v)=>{const{scope:y,children:w}=p,b=s(c,y),E=$(v,b.collectionRef);return u.jsx(d,{ref:E,children:w})});l.displayName=c;const f=t+"CollectionItemSlot",h="data-radix-collection-item",g=He(f),m=re.forwardRef((p,v)=>{const{scope:y,children:w,...b}=p,E=re.useRef(null),I=$(v,E),R=s(f,y);return re.useEffect(()=>(R.itemMap.set(E,{ref:E,...b}),()=>void R.itemMap.delete(E))),u.jsx(g,{[h]:"",ref:I,children:w})});m.displayName=f;function C(p){const v=s(t+"CollectionConsumer",p);return re.useCallback(()=>{const w=v.collectionRef.current;if(!w)return[];const b=Array.from(w.querySelectorAll(`[${h}]`));return Array.from(v.itemMap.values()).sort((R,T)=>b.indexOf(R.ref.current)-b.indexOf(T.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:a,Slot:l,ItemSlot:m},C,r]}var Ko=i.createContext(void 0);function Cn(t){const e=i.useContext(Ko);return t||e||"ltr"}function J(t){const e=i.useRef(t);return i.useEffect(()=>{e.current=t}),i.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function Wo(t,e=globalThis==null?void 0:globalThis.document){const n=J(t);i.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var Vo="DismissableLayer",dt="dismissableLayer.update",Yo="dismissableLayer.pointerDownOutside",Xo="dismissableLayer.focusOutside",Ht,xn=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Sn=i.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...d}=t,l=i.useContext(xn),[f,h]=i.useState(null),g=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=i.useState({}),C=$(e,T=>h(T)),p=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=p.indexOf(v),w=f?p.indexOf(f):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,E=w>=y,I=Zo(T=>{const M=T.target,_=[...l.branches].some(F=>F.contains(M));!E||_||(o==null||o(T),a==null||a(T),T.defaultPrevented||c==null||c())},g),R=Qo(T=>{const M=T.target;[...l.branches].some(F=>F.contains(M))||(s==null||s(T),a==null||a(T),T.defaultPrevented||c==null||c())},g);return Wo(T=>{w===l.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&c&&(T.preventDefault(),c()))},g),i.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Ht=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),$t(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Ht)}},[f,g,n,l]),i.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),$t())},[f,l]),i.useEffect(()=>{const T=()=>m({});return document.addEventListener(dt,T),()=>document.removeEventListener(dt,T)},[]),u.jsx(B.div,{...d,ref:C,style:{pointerEvents:b?E?"auto":"none":void 0,...t.style},onFocusCapture:P(t.onFocusCapture,R.onFocusCapture),onBlurCapture:P(t.onBlurCapture,R.onBlurCapture),onPointerDownCapture:P(t.onPointerDownCapture,I.onPointerDownCapture)})});Sn.displayName=Vo;var zo="DismissableLayerBranch",qo=i.forwardRef((t,e)=>{const n=i.useContext(xn),r=i.useRef(null),o=$(e,r);return i.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),u.jsx(B.div,{...t,ref:o})});qo.displayName=zo;function Zo(t,e=globalThis==null?void 0:globalThis.document){const n=J(t),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const s=c=>{if(c.target&&!r.current){let d=function(){bn(Yo,n,l,{discrete:!0})};const l={originalEvent:c};c.pointerType==="touch"?(e.removeEventListener("click",o.current),o.current=d,e.addEventListener("click",o.current,{once:!0})):d()}else e.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",s),e.removeEventListener("click",o.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function Qo(t,e=globalThis==null?void 0:globalThis.document){const n=J(t),r=i.useRef(!1);return i.useEffect(()=>{const o=s=>{s.target&&!r.current&&bn(Xo,n,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function $t(){const t=new CustomEvent(dt);document.dispatchEvent(t)}function bn(t,e,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&o.addEventListener(t,e,{once:!0}),r?vn(o,s):o.dispatchEvent(s)}var Je=0;function Jo(){i.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Bt()),document.body.insertAdjacentElement("beforeend",t[1]??Bt()),Je++,()=>{Je===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Je--}},[])}function Bt(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var et="focusScope.autoFocusOnMount",tt="focusScope.autoFocusOnUnmount",Gt={bubbles:!1,cancelable:!0},es="FocusScope",wn=i.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=t,[c,d]=i.useState(null),l=J(o),f=J(s),h=i.useRef(null),g=$(e,p=>d(p)),m=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let p=function(b){if(m.paused||!c)return;const E=b.target;c.contains(E)?h.current=E:oe(h.current,{select:!0})},v=function(b){if(m.paused||!c)return;const E=b.relatedTarget;E!==null&&(c.contains(E)||oe(h.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const I of b)I.removedNodes.length>0&&oe(c)};document.addEventListener("focusin",p),document.addEventListener("focusout",v);const w=new MutationObserver(y);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",v),w.disconnect()}}},[r,c,m.paused]),i.useEffect(()=>{if(c){Wt.add(m);const p=document.activeElement;if(!c.contains(p)){const y=new CustomEvent(et,Gt);c.addEventListener(et,l),c.dispatchEvent(y),y.defaultPrevented||(ts(is(En(c)),{select:!0}),document.activeElement===p&&oe(c))}return()=>{c.removeEventListener(et,l),setTimeout(()=>{const y=new CustomEvent(tt,Gt);c.addEventListener(tt,f),c.dispatchEvent(y),y.defaultPrevented||oe(p??document.body,{select:!0}),c.removeEventListener(tt,f),Wt.remove(m)},0)}}},[c,l,f,m]);const C=i.useCallback(p=>{if(!n&&!r||m.paused)return;const v=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,y=document.activeElement;if(v&&y){const w=p.currentTarget,[b,E]=ns(w);b&&E?!p.shiftKey&&y===E?(p.preventDefault(),n&&oe(b,{select:!0})):p.shiftKey&&y===b&&(p.preventDefault(),n&&oe(E,{select:!0})):y===w&&p.preventDefault()}},[n,r,m.paused]);return u.jsx(B.div,{tabIndex:-1,...a,ref:g,onKeyDown:C})});wn.displayName=es;function ts(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(oe(r,{select:e}),document.activeElement!==n)return}function ns(t){const e=En(t),n=Kt(e,t),r=Kt(e.reverse(),t);return[n,r]}function En(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Kt(t,e){for(const n of t)if(!rs(n,{upTo:e}))return n}function rs(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function os(t){return t instanceof HTMLInputElement&&"select"in t}function oe(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&os(t)&&e&&t.select()}}var Wt=ss();function ss(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=Vt(t,e),t.unshift(e)},remove(e){var n;t=Vt(t,e),(n=t[0])==null||n.resume()}}}function Vt(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function is(t){return t.filter(e=>e.tagName!=="A")}var se=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},as=gn[" useId ".trim().toString()]||(()=>{}),cs=0;function us(t){const[e,n]=i.useState(as());return se(()=>{n(r=>r??String(cs++))},[t]),e?`radix-${e}`:""}var ls="Arrow",Dn=i.forwardRef((t,e)=>{const{children:n,width:r=10,height:o=5,...s}=t;return u.jsx(B.svg,{...s,ref:e,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});Dn.displayName=ls;var ds=Dn;function fs(t){const[e,n]=i.useState(void 0);return se(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,c;if("borderBoxSize"in s){const d=s.borderBoxSize,l=Array.isArray(d)?d[0]:d;a=l.inlineSize,c=l.blockSize}else a=t.offsetWidth,c=t.offsetHeight;n({width:a,height:c})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var xt="Popper",[Tn,On]=Te(xt),[gs,In]=Tn(xt),Pn=t=>{const{__scopePopper:e,children:n}=t,[r,o]=i.useState(null);return u.jsx(gs,{scope:e,anchor:r,onAnchorChange:o,children:n})};Pn.displayName=xt;var Rn="PopperAnchor",Mn=i.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...o}=t,s=In(Rn,n),a=i.useRef(null),c=$(e,a);return i.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:u.jsx(B.div,{...o,ref:c})});Mn.displayName=Rn;var St="PopperContent",[hs,ps]=Tn(St),Nn=i.forwardRef((t,e)=>{var ne,ye,Y,Ce,Ft,Lt;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:l=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:g=!1,updatePositionStrategy:m="optimized",onPlaced:C,...p}=t,v=In(St,n),[y,w]=i.useState(null),b=$(e,xe=>w(xe)),[E,I]=i.useState(null),R=fs(E),T=(R==null?void 0:R.width)??0,M=(R==null?void 0:R.height)??0,_=r+(s!=="center"?"-"+s:""),F=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},D=Array.isArray(l)?l:[l],A=D.length>0,K={padding:F,boundary:D.filter(vs),altBoundary:A},{refs:ee,floatingStyles:te,placement:V,isPositioned:U,middlewareData:S}=uo({strategy:"fixed",placement:_,whileElementsMounted:(...xe)=>yo(...xe,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[lo({mainAxis:o+M,alignmentAxis:a}),d&&fo({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?vo():void 0,...K}),d&&go({...K}),ho({...K,apply:({elements:xe,rects:kt,availableWidth:Yr,availableHeight:Xr})=>{const{width:zr,height:qr}=kt.reference,Ne=xe.floating.style;Ne.setProperty("--radix-popper-available-width",`${Yr}px`),Ne.setProperty("--radix-popper-available-height",`${Xr}px`),Ne.setProperty("--radix-popper-anchor-width",`${zr}px`),Ne.setProperty("--radix-popper-anchor-height",`${qr}px`)}}),E&&po({element:E,padding:c}),ys({arrowWidth:T,arrowHeight:M}),g&&mo({strategy:"referenceHidden",...K})]}),[x,N]=jn(V),j=J(C);se(()=>{U&&(j==null||j())},[U,j]);const H=(ne=S.arrow)==null?void 0:ne.x,me=(ye=S.arrow)==null?void 0:ye.y,ve=((Y=S.arrow)==null?void 0:Y.centerOffset)!==0,[Me,ie]=i.useState();return se(()=>{y&&ie(window.getComputedStyle(y).zIndex)},[y]),u.jsx("div",{ref:ee.setFloating,"data-radix-popper-content-wrapper":"",style:{...te,transform:U?te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Me,"--radix-popper-transform-origin":[(Ce=S.transformOrigin)==null?void 0:Ce.x,(Ft=S.transformOrigin)==null?void 0:Ft.y].join(" "),...((Lt=S.hide)==null?void 0:Lt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:u.jsx(hs,{scope:n,placedSide:x,onArrowChange:I,arrowX:H,arrowY:me,shouldHideArrow:ve,children:u.jsx(B.div,{"data-side":x,"data-align":N,...p,ref:b,style:{...p.style,animation:U?void 0:"none"}})})})});Nn.displayName=St;var An="PopperArrow",ms={top:"bottom",right:"left",bottom:"top",left:"right"},_n=i.forwardRef(function(e,n){const{__scopePopper:r,...o}=e,s=ps(An,r),a=ms[s.placedSide];return u.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:u.jsx(ds,{...o,ref:n,style:{...o.style,display:"block"}})})});_n.displayName=An;function vs(t){return t!==null}var ys=t=>({name:"transformOrigin",options:t,fn(e){var v,y,w;const{placement:n,rects:r,middlewareData:o}=e,a=((v=o.arrow)==null?void 0:v.centerOffset)!==0,c=a?0:t.arrowWidth,d=a?0:t.arrowHeight,[l,f]=jn(n),h={start:"0%",center:"50%",end:"100%"}[f],g=(((y=o.arrow)==null?void 0:y.x)??0)+c/2,m=(((w=o.arrow)==null?void 0:w.y)??0)+d/2;let C="",p="";return l==="bottom"?(C=a?h:`${g}px`,p=`${-d}px`):l==="top"?(C=a?h:`${g}px`,p=`${r.floating.height+d}px`):l==="right"?(C=`${-d}px`,p=a?h:`${m}px`):l==="left"&&(C=`${r.floating.width+d}px`,p=a?h:`${m}px`),{data:{x:C,y:p}}}});function jn(t){const[e,n="center"]=t.split("-");return[e,n]}var Cs=Pn,xs=Mn,Ss=Nn,bs=_n,ws="Portal",Fn=i.forwardRef((t,e)=>{var c;const{container:n,...r}=t,[o,s]=i.useState(!1);se(()=>s(!0),[]);const a=n||o&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return a?co.createPortal(u.jsx(B.div,{...r,ref:e}),a):null});Fn.displayName=ws;function Es(t,e){return i.useReducer((n,r)=>e[n][r]??n,t)}var Oe=t=>{const{present:e,children:n}=t,r=Ds(e),o=typeof n=="function"?n({present:r.isPresent}):i.Children.only(n),s=$(r.ref,Ts(o));return typeof n=="function"||r.isPresent?i.cloneElement(o,{ref:s}):null};Oe.displayName="Presence";function Ds(t){const[e,n]=i.useState(),r=i.useRef(null),o=i.useRef(t),s=i.useRef("none"),a=t?"mounted":"unmounted",[c,d]=Es(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const l=Ae(r.current);s.current=c==="mounted"?l:"none"},[c]),se(()=>{const l=r.current,f=o.current;if(f!==t){const g=s.current,m=Ae(l);t?d("MOUNT"):m==="none"||(l==null?void 0:l.display)==="none"?d("UNMOUNT"):d(f&&g!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,d]),se(()=>{if(e){let l;const f=e.ownerDocument.defaultView??window,h=m=>{const p=Ae(r.current).includes(m.animationName);if(m.target===e&&p&&(d("ANIMATION_END"),!o.current)){const v=e.style.animationFillMode;e.style.animationFillMode="forwards",l=f.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=v)})}},g=m=>{m.target===e&&(s.current=Ae(r.current))};return e.addEventListener("animationstart",g),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{f.clearTimeout(l),e.removeEventListener("animationstart",g),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else d("ANIMATION_END")},[e,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:i.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function Ae(t){return(t==null?void 0:t.animationName)||"none"}function Ts(t){var r,o;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Os=gn[" useInsertionEffect ".trim().toString()]||se;function Is({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[o,s,a]=Ps({defaultProp:e,onChange:n}),c=t!==void 0,d=c?t:o;{const f=i.useRef(t!==void 0);i.useEffect(()=>{const h=f.current;h!==c&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=c},[c,r])}const l=i.useCallback(f=>{var h;if(c){const g=Rs(f)?f(t):f;g!==t&&((h=a.current)==null||h.call(a,g))}else s(f)},[c,t,s,a]);return[d,l]}function Ps({defaultProp:t,onChange:e}){const[n,r]=i.useState(t),o=i.useRef(n),s=i.useRef(e);return Os(()=>{s.current=e},[e]),i.useEffect(()=>{var a;o.current!==n&&((a=s.current)==null||a.call(s,n),o.current=n)},[n,o]),[n,r,s]}function Rs(t){return typeof t=="function"}var nt="rovingFocusGroup.onEntryFocus",Ms={bubbles:!1,cancelable:!0},Ie="RovingFocusGroup",[ft,Ln,Ns]=yn(Ie),[As,kn]=Te(Ie,[Ns]),[_s,js]=As(Ie),Un=i.forwardRef((t,e)=>u.jsx(ft.Provider,{scope:t.__scopeRovingFocusGroup,children:u.jsx(ft.Slot,{scope:t.__scopeRovingFocusGroup,children:u.jsx(Fs,{...t,ref:e})})}));Un.displayName=Ie;var Fs=i.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:l,preventScrollOnEntryFocus:f=!1,...h}=t,g=i.useRef(null),m=$(e,g),C=Cn(s),[p,v]=Is({prop:a,defaultProp:c??null,onChange:d,caller:Ie}),[y,w]=i.useState(!1),b=J(l),E=Ln(n),I=i.useRef(!1),[R,T]=i.useState(0);return i.useEffect(()=>{const M=g.current;if(M)return M.addEventListener(nt,b),()=>M.removeEventListener(nt,b)},[b]),u.jsx(_s,{scope:n,orientation:r,dir:C,loop:o,currentTabStopId:p,onItemFocus:i.useCallback(M=>v(M),[v]),onItemShiftTab:i.useCallback(()=>w(!0),[]),onFocusableItemAdd:i.useCallback(()=>T(M=>M+1),[]),onFocusableItemRemove:i.useCallback(()=>T(M=>M-1),[]),children:u.jsx(B.div,{tabIndex:y||R===0?-1:0,"data-orientation":r,...h,ref:m,style:{outline:"none",...t.style},onMouseDown:P(t.onMouseDown,()=>{I.current=!0}),onFocus:P(t.onFocus,M=>{const _=!I.current;if(M.target===M.currentTarget&&_&&!y){const F=new CustomEvent(nt,Ms);if(M.currentTarget.dispatchEvent(F),!F.defaultPrevented){const D=E().filter(V=>V.focusable),A=D.find(V=>V.active),K=D.find(V=>V.id===p),te=[A,K,...D].filter(Boolean).map(V=>V.ref.current);Bn(te,f)}}I.current=!1}),onBlur:P(t.onBlur,()=>w(!1))})})}),Hn="RovingFocusGroupItem",$n=i.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:a,...c}=t,d=us(),l=s||d,f=js(Hn,n),h=f.currentTabStopId===l,g=Ln(n),{onFocusableItemAdd:m,onFocusableItemRemove:C,currentTabStopId:p}=f;return i.useEffect(()=>{if(r)return m(),()=>C()},[r,m,C]),u.jsx(ft.ItemSlot,{scope:n,id:l,focusable:r,active:o,children:u.jsx(B.span,{tabIndex:h?0:-1,"data-orientation":f.orientation,...c,ref:e,onMouseDown:P(t.onMouseDown,v=>{r?f.onItemFocus(l):v.preventDefault()}),onFocus:P(t.onFocus,()=>f.onItemFocus(l)),onKeyDown:P(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=Us(v,f.orientation,f.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let b=g().filter(E=>E.focusable).map(E=>E.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const E=b.indexOf(v.currentTarget);b=f.loop?Hs(b,E+1):b.slice(E+1)}setTimeout(()=>Bn(b))}}),children:typeof a=="function"?a({isCurrentTabStop:h,hasTabStop:p!=null}):a})})});$n.displayName=Hn;var Ls={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ks(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function Us(t,e,n){const r=ks(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Ls[r]}function Bn(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function Hs(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var $s=Un,Bs=$n,Gn=Co(),rt=function(){},Ke=i.forwardRef(function(t,e){var n=i.useRef(null),r=i.useState({onScrollCapture:rt,onWheelCapture:rt,onTouchMoveCapture:rt}),o=r[0],s=r[1],a=t.forwardProps,c=t.children,d=t.className,l=t.removeScrollBar,f=t.enabled,h=t.shards,g=t.sideCar,m=t.noIsolation,C=t.inert,p=t.allowPinchZoom,v=t.as,y=v===void 0?"div":v,w=t.gapMode,b=Zr(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=g,I=xo([n,e]),R=pe(pe({},b),o);return i.createElement(i.Fragment,null,f&&i.createElement(E,{sideCar:Gn,removeScrollBar:l,shards:h,noIsolation:m,inert:C,setCallbacks:s,allowPinchZoom:!!p,lockRef:n,gapMode:w}),a?i.cloneElement(i.Children.only(c),pe(pe({},R),{ref:I})):i.createElement(y,pe({},R,{className:d,ref:I}),c))});Ke.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ke.classNames={fullWidth:bo,zeroRight:So};var gt=!1;if(typeof window<"u")try{var _e=Object.defineProperty({},"passive",{get:function(){return gt=!0,!0}});window.addEventListener("test",_e,_e),window.removeEventListener("test",_e,_e)}catch{gt=!1}var fe=gt?{passive:!1}:!1,Gs=function(t){return t.tagName==="TEXTAREA"},Kn=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!Gs(t)&&n[e]==="visible")},Ks=function(t){return Kn(t,"overflowY")},Ws=function(t){return Kn(t,"overflowX")},Yt=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Wn(t,r);if(o){var s=Vn(t,r),a=s[1],c=s[2];if(a>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Vs=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},Ys=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},Wn=function(t,e){return t==="v"?Ks(e):Ws(e)},Vn=function(t,e){return t==="v"?Vs(e):Ys(e)},Xs=function(t,e){return t==="h"&&e==="rtl"?-1:1},zs=function(t,e,n,r,o){var s=Xs(t,window.getComputedStyle(e).direction),a=s*r,c=n.target,d=e.contains(c),l=!1,f=a>0,h=0,g=0;do{var m=Vn(t,c),C=m[0],p=m[1],v=m[2],y=p-v-s*C;(C||y)&&Wn(t,c)&&(h+=y,g+=C),c instanceof ShadowRoot?c=c.host:c=c.parentNode}while(!d&&c!==document.body||d&&(e.contains(c)||e===c));return(f&&Math.abs(h)<1||!f&&Math.abs(g)<1)&&(l=!0),l},je=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Xt=function(t){return[t.deltaX,t.deltaY]},zt=function(t){return t&&"current"in t?t.current:t},qs=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Zs=function(t){return`
|
|
2
|
-
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
3
|
-
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
4
|
-
`)},Qs=0,ge=[];function Js(t){var e=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(Qs++)[0],s=i.useState(wo)[0],a=i.useRef(t);i.useEffect(function(){a.current=t},[t]),i.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(o));var p=Qr([t.lockRef.current],(t.shards||[]).map(zt),!0).filter(Boolean);return p.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[t.inert,t.lockRef.current,t.shards]);var c=i.useCallback(function(p,v){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!a.current.allowPinchZoom;var y=je(p),w=n.current,b="deltaX"in p?p.deltaX:w[0]-y[0],E="deltaY"in p?p.deltaY:w[1]-y[1],I,R=p.target,T=Math.abs(b)>Math.abs(E)?"h":"v";if("touches"in p&&T==="h"&&R.type==="range")return!1;var M=Yt(T,R);if(!M)return!0;if(M?I=T:(I=T==="v"?"h":"v",M=Yt(T,R)),!M)return!1;if(!r.current&&"changedTouches"in p&&(b||E)&&(r.current=I),!I)return!0;var _=r.current||I;return zs(_,v,p,_==="h"?b:E)},[]),d=i.useCallback(function(p){var v=p;if(!(!ge.length||ge[ge.length-1]!==s)){var y="deltaY"in v?Xt(v):je(v),w=e.current.filter(function(I){return I.name===v.type&&(I.target===v.target||v.target===I.shadowParent)&&qs(I.delta,y)})[0];if(w&&w.should){v.cancelable&&v.preventDefault();return}if(!w){var b=(a.current.shards||[]).map(zt).filter(Boolean).filter(function(I){return I.contains(v.target)}),E=b.length>0?c(v,b[0]):!a.current.noIsolation;E&&v.cancelable&&v.preventDefault()}}},[]),l=i.useCallback(function(p,v,y,w){var b={name:p,delta:v,target:y,should:w,shadowParent:ei(y)};e.current.push(b),setTimeout(function(){e.current=e.current.filter(function(E){return E!==b})},1)},[]),f=i.useCallback(function(p){n.current=je(p),r.current=void 0},[]),h=i.useCallback(function(p){l(p.type,Xt(p),p.target,c(p,t.lockRef.current))},[]),g=i.useCallback(function(p){l(p.type,je(p),p.target,c(p,t.lockRef.current))},[]);i.useEffect(function(){return ge.push(s),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:g}),document.addEventListener("wheel",d,fe),document.addEventListener("touchmove",d,fe),document.addEventListener("touchstart",f,fe),function(){ge=ge.filter(function(p){return p!==s}),document.removeEventListener("wheel",d,fe),document.removeEventListener("touchmove",d,fe),document.removeEventListener("touchstart",f,fe)}},[]);var m=t.removeScrollBar,C=t.inert;return i.createElement(i.Fragment,null,C?i.createElement(s,{styles:Zs(o)}):null,m?i.createElement(Eo,{gapMode:t.gapMode}):null)}function ei(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const ti=Do(Gn,Js);var Yn=i.forwardRef(function(t,e){return i.createElement(Ke,pe({},t,{ref:e,sideCar:ti}))});Yn.classNames=Ke.classNames;var ht=["Enter"," "],ni=["ArrowDown","PageUp","Home"],Xn=["ArrowUp","PageDown","End"],ri=[...ni,...Xn],oi={ltr:[...ht,"ArrowRight"],rtl:[...ht,"ArrowLeft"]},si={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Pe="Menu",[we,ii,ai]=yn(Pe),[ue,zn]=Te(Pe,[ai,On,kn]),We=On(),qn=kn(),[ci,le]=ue(Pe),[ui,Re]=ue(Pe),Zn=t=>{const{__scopeMenu:e,open:n=!1,children:r,dir:o,onOpenChange:s,modal:a=!0}=t,c=We(e),[d,l]=i.useState(null),f=i.useRef(!1),h=J(s),g=Cn(o);return i.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",C,{capture:!0,once:!0}),document.addEventListener("pointermove",C,{capture:!0,once:!0})},C=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}),document.removeEventListener("pointermove",C,{capture:!0})}},[]),u.jsx(Cs,{...c,children:u.jsx(ci,{scope:e,open:n,onOpenChange:h,content:d,onContentChange:l,children:u.jsx(ui,{scope:e,onClose:i.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:f,dir:g,modal:a,children:r})})})};Zn.displayName=Pe;var li="MenuAnchor",bt=i.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,o=We(n);return u.jsx(xs,{...o,...r,ref:e})});bt.displayName=li;var wt="MenuPortal",[di,Qn]=ue(wt,{forceMount:void 0}),Jn=t=>{const{__scopeMenu:e,forceMount:n,children:r,container:o}=t,s=le(wt,e);return u.jsx(di,{scope:e,forceMount:n,children:u.jsx(Oe,{present:n||s.open,children:u.jsx(Fn,{asChild:!0,container:o,children:r})})})};Jn.displayName=wt;var Z="MenuContent",[fi,Et]=ue(Z),er=i.forwardRef((t,e)=>{const n=Qn(Z,t.__scopeMenu),{forceMount:r=n.forceMount,...o}=t,s=le(Z,t.__scopeMenu),a=Re(Z,t.__scopeMenu);return u.jsx(we.Provider,{scope:t.__scopeMenu,children:u.jsx(Oe,{present:r||s.open,children:u.jsx(we.Slot,{scope:t.__scopeMenu,children:a.modal?u.jsx(gi,{...o,ref:e}):u.jsx(hi,{...o,ref:e})})})})}),gi=i.forwardRef((t,e)=>{const n=le(Z,t.__scopeMenu),r=i.useRef(null),o=$(e,r);return i.useEffect(()=>{const s=r.current;if(s)return To(s)},[]),u.jsx(Dt,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:P(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),hi=i.forwardRef((t,e)=>{const n=le(Z,t.__scopeMenu);return u.jsx(Dt,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),pi=He("MenuContent.ScrollLock"),Dt=i.forwardRef((t,e)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEntryFocus:d,onEscapeKeyDown:l,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:C,...p}=t,v=le(Z,n),y=Re(Z,n),w=We(n),b=qn(n),E=ii(n),[I,R]=i.useState(null),T=i.useRef(null),M=$(e,T,v.onContentChange),_=i.useRef(0),F=i.useRef(""),D=i.useRef(0),A=i.useRef(null),K=i.useRef("right"),ee=i.useRef(0),te=C?Yn:i.Fragment,V=C?{as:pi,allowPinchZoom:!0}:void 0,U=x=>{var ne,ye;const N=F.current+x,j=E().filter(Y=>!Y.disabled),H=document.activeElement,me=(ne=j.find(Y=>Y.ref.current===H))==null?void 0:ne.textValue,ve=j.map(Y=>Y.textValue),Me=Oi(ve,N,me),ie=(ye=j.find(Y=>Y.textValue===Me))==null?void 0:ye.ref.current;(function Y(Ce){F.current=Ce,window.clearTimeout(_.current),Ce!==""&&(_.current=window.setTimeout(()=>Y(""),1e3))})(N),ie&&setTimeout(()=>ie.focus())};i.useEffect(()=>()=>window.clearTimeout(_.current),[]),Jo();const S=i.useCallback(x=>{var j,H;return K.current===((j=A.current)==null?void 0:j.side)&&Pi(x,(H=A.current)==null?void 0:H.area)},[]);return u.jsx(fi,{scope:n,searchRef:F,onItemEnter:i.useCallback(x=>{S(x)&&x.preventDefault()},[S]),onItemLeave:i.useCallback(x=>{var N;S(x)||((N=T.current)==null||N.focus(),R(null))},[S]),onTriggerLeave:i.useCallback(x=>{S(x)&&x.preventDefault()},[S]),pointerGraceTimerRef:D,onPointerGraceIntentChange:i.useCallback(x=>{A.current=x},[]),children:u.jsx(te,{...V,children:u.jsx(wn,{asChild:!0,trapped:o,onMountAutoFocus:P(s,x=>{var N;x.preventDefault(),(N=T.current)==null||N.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:u.jsx(Sn,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:l,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:g,onDismiss:m,children:u.jsx($s,{asChild:!0,...b,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:I,onCurrentTabStopIdChange:R,onEntryFocus:P(d,x=>{y.isUsingKeyboardRef.current||x.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsx(Ss,{role:"menu","aria-orientation":"vertical","data-state":mr(v.open),"data-radix-menu-content":"",dir:y.dir,...w,...p,ref:M,style:{outline:"none",...p.style},onKeyDown:P(p.onKeyDown,x=>{const j=x.target.closest("[data-radix-menu-content]")===x.currentTarget,H=x.ctrlKey||x.altKey||x.metaKey,me=x.key.length===1;j&&(x.key==="Tab"&&x.preventDefault(),!H&&me&&U(x.key));const ve=T.current;if(x.target!==ve||!ri.includes(x.key))return;x.preventDefault();const ie=E().filter(ne=>!ne.disabled).map(ne=>ne.ref.current);Xn.includes(x.key)&&ie.reverse(),Di(ie)}),onBlur:P(t.onBlur,x=>{x.currentTarget.contains(x.target)||(window.clearTimeout(_.current),F.current="")}),onPointerMove:P(t.onPointerMove,Ee(x=>{const N=x.target,j=ee.current!==x.clientX;if(x.currentTarget.contains(N)&&j){const H=x.clientX>ee.current?"right":"left";K.current=H,ee.current=x.clientX}}))})})})})})})});er.displayName=Z;var mi="MenuGroup",Tt=i.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return u.jsx(B.div,{role:"group",...r,ref:e})});Tt.displayName=mi;var vi="MenuLabel",tr=i.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return u.jsx(B.div,{...r,ref:e})});tr.displayName=vi;var $e="MenuItem",qt="menu.itemSelect",Ve=i.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:r,...o}=t,s=i.useRef(null),a=Re($e,t.__scopeMenu),c=Et($e,t.__scopeMenu),d=$(e,s),l=i.useRef(!1),f=()=>{const h=s.current;if(!n&&h){const g=new CustomEvent(qt,{bubbles:!0,cancelable:!0});h.addEventListener(qt,m=>r==null?void 0:r(m),{once:!0}),vn(h,g),g.defaultPrevented?l.current=!1:a.onClose()}};return u.jsx(nr,{...o,ref:d,disabled:n,onClick:P(t.onClick,f),onPointerDown:h=>{var g;(g=t.onPointerDown)==null||g.call(t,h),l.current=!0},onPointerUp:P(t.onPointerUp,h=>{var g;l.current||(g=h.currentTarget)==null||g.click()}),onKeyDown:P(t.onKeyDown,h=>{const g=c.searchRef.current!=="";n||g&&h.key===" "||ht.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});Ve.displayName=$e;var nr=i.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=t,a=Et($e,n),c=qn(n),d=i.useRef(null),l=$(e,d),[f,h]=i.useState(!1),[g,m]=i.useState("");return i.useEffect(()=>{const C=d.current;C&&m((C.textContent??"").trim())},[s.children]),u.jsx(we.ItemSlot,{scope:n,disabled:r,textValue:o??g,children:u.jsx(Bs,{asChild:!0,...c,focusable:!r,children:u.jsx(B.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:l,onPointerMove:P(t.onPointerMove,Ee(C=>{r?a.onItemLeave(C):(a.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:P(t.onPointerLeave,Ee(C=>a.onItemLeave(C))),onFocus:P(t.onFocus,()=>h(!0)),onBlur:P(t.onBlur,()=>h(!1))})})})}),yi="MenuCheckboxItem",rr=i.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:r,...o}=t;return u.jsx(cr,{scope:t.__scopeMenu,checked:n,children:u.jsx(Ve,{role:"menuitemcheckbox","aria-checked":Be(n)?"mixed":n,...o,ref:e,"data-state":It(n),onSelect:P(o.onSelect,()=>r==null?void 0:r(Be(n)?!0:!n),{checkForDefaultPrevented:!1})})})});rr.displayName=yi;var or="MenuRadioGroup",[Ci,xi]=ue(or,{value:void 0,onValueChange:()=>{}}),sr=i.forwardRef((t,e)=>{const{value:n,onValueChange:r,...o}=t,s=J(r);return u.jsx(Ci,{scope:t.__scopeMenu,value:n,onValueChange:s,children:u.jsx(Tt,{...o,ref:e})})});sr.displayName=or;var ir="MenuRadioItem",ar=i.forwardRef((t,e)=>{const{value:n,...r}=t,o=xi(ir,t.__scopeMenu),s=n===o.value;return u.jsx(cr,{scope:t.__scopeMenu,checked:s,children:u.jsx(Ve,{role:"menuitemradio","aria-checked":s,...r,ref:e,"data-state":It(s),onSelect:P(r.onSelect,()=>{var a;return(a=o.onValueChange)==null?void 0:a.call(o,n)},{checkForDefaultPrevented:!1})})})});ar.displayName=ir;var Ot="MenuItemIndicator",[cr,Si]=ue(Ot,{checked:!1}),ur=i.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:r,...o}=t,s=Si(Ot,n);return u.jsx(Oe,{present:r||Be(s.checked)||s.checked===!0,children:u.jsx(B.span,{...o,ref:e,"data-state":It(s.checked)})})});ur.displayName=Ot;var bi="MenuSeparator",lr=i.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return u.jsx(B.div,{role:"separator","aria-orientation":"horizontal",...r,ref:e})});lr.displayName=bi;var wi="MenuArrow",dr=i.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,o=We(n);return u.jsx(bs,{...o,...r,ref:e})});dr.displayName=wi;var Ei="MenuSub",[qu,fr]=ue(Ei),Se="MenuSubTrigger",gr=i.forwardRef((t,e)=>{const n=le(Se,t.__scopeMenu),r=Re(Se,t.__scopeMenu),o=fr(Se,t.__scopeMenu),s=Et(Se,t.__scopeMenu),a=i.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=s,l={__scopeMenu:t.__scopeMenu},f=i.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return i.useEffect(()=>f,[f]),i.useEffect(()=>{const h=c.current;return()=>{window.clearTimeout(h),d(null)}},[c,d]),u.jsx(bt,{asChild:!0,...l,children:u.jsx(nr,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":mr(n.open),...t,ref:mn(e,o.onTriggerChange),onClick:h=>{var g;(g=t.onClick)==null||g.call(t,h),!(t.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:P(t.onPointerMove,Ee(h=>{s.onItemEnter(h),!h.defaultPrevented&&!t.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:P(t.onPointerLeave,Ee(h=>{var m,C;f();const g=(m=n.content)==null?void 0:m.getBoundingClientRect();if(g){const p=(C=n.content)==null?void 0:C.dataset.side,v=p==="right",y=v?-5:5,w=g[v?"left":"right"],b=g[v?"right":"left"];s.onPointerGraceIntentChange({area:[{x:h.clientX+y,y:h.clientY},{x:w,y:g.top},{x:b,y:g.top},{x:b,y:g.bottom},{x:w,y:g.bottom}],side:p}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(h),h.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:P(t.onKeyDown,h=>{var m;const g=s.searchRef.current!=="";t.disabled||g&&h.key===" "||oi[r.dir].includes(h.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),h.preventDefault())})})})});gr.displayName=Se;var hr="MenuSubContent",pr=i.forwardRef((t,e)=>{const n=Qn(Z,t.__scopeMenu),{forceMount:r=n.forceMount,...o}=t,s=le(Z,t.__scopeMenu),a=Re(Z,t.__scopeMenu),c=fr(hr,t.__scopeMenu),d=i.useRef(null),l=$(e,d);return u.jsx(we.Provider,{scope:t.__scopeMenu,children:u.jsx(Oe,{present:r||s.open,children:u.jsx(we.Slot,{scope:t.__scopeMenu,children:u.jsx(Dt,{id:c.contentId,"aria-labelledby":c.triggerId,...o,ref:l,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var h;a.isUsingKeyboardRef.current&&((h=d.current)==null||h.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:P(t.onFocusOutside,f=>{f.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:P(t.onEscapeKeyDown,f=>{a.onClose(),f.preventDefault()}),onKeyDown:P(t.onKeyDown,f=>{var m;const h=f.currentTarget.contains(f.target),g=si[a.dir].includes(f.key);h&&g&&(s.onOpenChange(!1),(m=c.trigger)==null||m.focus(),f.preventDefault())})})})})})});pr.displayName=hr;function mr(t){return t?"open":"closed"}function Be(t){return t==="indeterminate"}function It(t){return Be(t)?"indeterminate":t?"checked":"unchecked"}function Di(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function Ti(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function Oi(t,e,n){const o=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let a=Ti(t,Math.max(s,0));o.length===1&&(a=a.filter(l=>l!==n));const d=a.find(l=>l.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function Ii(t,e){const{x:n,y:r}=t;let o=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const c=e[s],d=e[a],l=c.x,f=c.y,h=d.x,g=d.y;f>r!=g>r&&n<(h-l)*(r-f)/(g-f)+l&&(o=!o)}return o}function Pi(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return Ii(n,e)}function Ee(t){return e=>e.pointerType==="mouse"?t(e):void 0}var Ri=Zn,Mi=bt,Ni=Jn,Ai=er,_i=Tt,ji=tr,Fi=Ve,Li=rr,ki=sr,Ui=ar,Hi=ur,$i=lr,Bi=dr,Gi=gr,Ki=pr,Pt="ContextMenu",[Wi,Zu]=Te(Pt,[zn]),G=zn(),[Vi,vr]=Wi(Pt),yr=t=>{const{__scopeContextMenu:e,children:n,onOpenChange:r,dir:o,modal:s=!0}=t,[a,c]=i.useState(!1),d=G(e),l=J(r),f=i.useCallback(h=>{c(h),l(h)},[l]);return u.jsx(Vi,{scope:e,open:a,onOpenChange:f,modal:s,children:u.jsx(Ri,{...d,dir:o,open:a,onOpenChange:f,modal:s,children:n})})};yr.displayName=Pt;var Cr="ContextMenuTrigger",xr=i.forwardRef((t,e)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=t,s=vr(Cr,n),a=G(n),c=i.useRef({x:0,y:0}),d=i.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...c.current})}),l=i.useRef(0),f=i.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{c.current={x:g.clientX,y:g.clientY},s.onOpenChange(!0)};return i.useEffect(()=>f,[f]),i.useEffect(()=>void(r&&f()),[r,f]),u.jsxs(u.Fragment,{children:[u.jsx(Mi,{...a,virtualRef:d}),u.jsx(B.span,{"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:e,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:r?t.onContextMenu:P(t.onContextMenu,g=>{f(),h(g),g.preventDefault()}),onPointerDown:r?t.onPointerDown:P(t.onPointerDown,Fe(g=>{f(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:r?t.onPointerMove:P(t.onPointerMove,Fe(f)),onPointerCancel:r?t.onPointerCancel:P(t.onPointerCancel,Fe(f)),onPointerUp:r?t.onPointerUp:P(t.onPointerUp,Fe(f))})]})});xr.displayName=Cr;var Yi="ContextMenuPortal",Sr=t=>{const{__scopeContextMenu:e,...n}=t,r=G(e);return u.jsx(Ni,{...r,...n})};Sr.displayName=Yi;var br="ContextMenuContent",wr=i.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=vr(br,n),s=G(n),a=i.useRef(!1);return u.jsx(Ai,{...s,...r,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:c=>{var d;(d=t.onCloseAutoFocus)==null||d.call(t,c),!c.defaultPrevented&&a.current&&c.preventDefault(),a.current=!1},onInteractOutside:c=>{var d;(d=t.onInteractOutside)==null||d.call(t,c),!c.defaultPrevented&&!o.modal&&(a.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});wr.displayName=br;var Xi="ContextMenuGroup",zi=i.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=G(n);return u.jsx(_i,{...o,...r,ref:e})});zi.displayName=Xi;var qi="ContextMenuLabel",Zi=i.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=G(n);return u.jsx(ji,{...o,...r,ref:e})});Zi.displayName=qi;var Qi="ContextMenuItem",Er=i.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=G(n);return u.jsx(Fi,{...o,...r,ref:e})});Er.displayName=Qi;var Ji="ContextMenuCheckboxItem",ea=i.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=G(n);return u.jsx(Li,{...o,...r,ref:e})});ea.displayName=Ji;var ta="ContextMenuRadioGroup",na=i.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=G(n);return u.jsx(ki,{...o,...r,ref:e})});na.displayName=ta;var ra="ContextMenuRadioItem",oa=i.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=G(n);return u.jsx(Ui,{...o,...r,ref:e})});oa.displayName=ra;var sa="ContextMenuItemIndicator",ia=i.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=G(n);return u.jsx(Hi,{...o,...r,ref:e})});ia.displayName=sa;var aa="ContextMenuSeparator",Dr=i.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=G(n);return u.jsx($i,{...o,...r,ref:e})});Dr.displayName=aa;var ca="ContextMenuArrow",ua=i.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=G(n);return u.jsx(Bi,{...o,...r,ref:e})});ua.displayName=ca;var la="ContextMenuSubTrigger",da=i.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=G(n);return u.jsx(Gi,{...o,...r,ref:e})});da.displayName=la;var fa="ContextMenuSubContent",ga=i.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=G(n);return u.jsx(Ki,{...o,...r,ref:e,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ga.displayName=fa;function Fe(t){return e=>e.pointerType!=="mouse"?t(e):void 0}var ha=yr,pa=xr,ma=Sr,va=wr,Q=Er,Zt=Dr;const Tr=i.createContext({dragDropManager:void 0});function z(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Qt=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Jt=function(){return Math.random().toString(36).substring(7).split("").join(".")},en={INIT:"@@redux/INIT"+Jt(),REPLACE:"@@redux/REPLACE"+Jt()};function ya(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Or(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(z(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(z(1));return n(Or)(t,e)}if(typeof t!="function")throw new Error(z(2));var o=t,s=e,a=[],c=a,d=!1;function l(){c===a&&(c=a.slice())}function f(){if(d)throw new Error(z(3));return s}function h(p){if(typeof p!="function")throw new Error(z(4));if(d)throw new Error(z(5));var v=!0;return l(),c.push(p),function(){if(v){if(d)throw new Error(z(6));v=!1,l();var w=c.indexOf(p);c.splice(w,1),a=null}}}function g(p){if(!ya(p))throw new Error(z(7));if(typeof p.type>"u")throw new Error(z(8));if(d)throw new Error(z(9));try{d=!0,s=o(s,p)}finally{d=!1}for(var v=a=c,y=0;y<v.length;y++){var w=v[y];w()}return p}function m(p){if(typeof p!="function")throw new Error(z(10));o=p,g({type:en.REPLACE})}function C(){var p,v=h;return p={subscribe:function(w){if(typeof w!="object"||w===null)throw new Error(z(11));function b(){w.next&&w.next(f())}b();var E=v(b);return{unsubscribe:E}}},p[Qt]=function(){return this},p}return g({type:en.INIT}),r={dispatch:g,subscribe:h,getState:f,replaceReducer:m},r[Qt]=C,r}function O(t,e,...n){if(Ca()&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){let r;if(e===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let o=0;r=new Error(e.replace(/%s/g,function(){return n[o++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function Ca(){return typeof process<"u"&&!0}function xa(t,e,n){return e.split(".").reduce((r,o)=>r&&r[o]?r[o]:n||null,t)}function Sa(t,e){return t.filter(n=>n!==e)}function Ir(t){return typeof t=="object"}function ba(t,e){const n=new Map,r=s=>{n.set(s,n.has(s)?n.get(s)+1:1)};t.forEach(r),e.forEach(r);const o=[];return n.forEach((s,a)=>{s===1&&o.push(a)}),o}function wa(t,e){return t.filter(n=>e.indexOf(n)>-1)}const Rt="dnd-core/INIT_COORDS",Ye="dnd-core/BEGIN_DRAG",Mt="dnd-core/PUBLISH_DRAG_SOURCE",Xe="dnd-core/HOVER",ze="dnd-core/DROP",qe="dnd-core/END_DRAG";function tn(t,e){return{type:Rt,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const Ea={type:Rt,payload:{clientOffset:null,sourceClientOffset:null}};function Da(t){return function(n=[],r={publishSource:!0}){const{publishSource:o=!0,clientOffset:s,getSourceClientOffset:a}=r,c=t.getMonitor(),d=t.getRegistry();t.dispatch(tn(s)),Ta(n,c,d);const l=Pa(n,c);if(l==null){t.dispatch(Ea);return}let f=null;if(s){if(!a)throw new Error("getSourceClientOffset must be defined");Oa(a),f=a(l)}t.dispatch(tn(s,f));const g=d.getSource(l).beginDrag(c,l);if(g==null)return;Ia(g),d.pinSource(l);const m=d.getSourceType(l);return{type:Ye,payload:{itemType:m,item:g,sourceId:l,clientOffset:s||null,sourceClientOffset:f||null,isSourcePublic:!!o}}}}function Ta(t,e,n){O(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){O(n.getSource(r),"Expected sourceIds to be registered.")})}function Oa(t){O(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Ia(t){O(Ir(t),"Item must be an object.")}function Pa(t,e){let n=null;for(let r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function Ra(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ma(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){Ra(t,o,n[o])})}return t}function Na(t){return function(n={}){const r=t.getMonitor(),o=t.getRegistry();Aa(r),Fa(r).forEach((a,c)=>{const d=_a(a,c,o,r),l={type:ze,payload:{dropResult:Ma({},n,d)}};t.dispatch(l)})}}function Aa(t){O(t.isDragging(),"Cannot call drop while not dragging."),O(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function _a(t,e,n,r){const o=n.getTarget(t);let s=o?o.drop(r,t):void 0;return ja(s),typeof s>"u"&&(s=e===0?{}:r.getDropResult()),s}function ja(t){O(typeof t>"u"||Ir(t),"Drop result must either be an object or undefined.")}function Fa(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function La(t){return function(){const n=t.getMonitor(),r=t.getRegistry();ka(n);const o=n.getSourceId();return o!=null&&(r.getSource(o,!0).endDrag(n,o),r.unpinSource()),{type:qe}}}function ka(t){O(t.isDragging(),"Cannot call endDrag while not dragging.")}function pt(t,e){return e===null?t===null:Array.isArray(t)?t.some(n=>n===e):t===e}function Ua(t){return function(n,{clientOffset:r}={}){Ha(n);const o=n.slice(0),s=t.getMonitor(),a=t.getRegistry(),c=s.getItemType();return Ba(o,a,c),$a(o,s,a),Ga(o,s,a),{type:Xe,payload:{targetIds:o,clientOffset:r||null}}}}function Ha(t){O(Array.isArray(t),"Expected targetIds to be an array.")}function $a(t,e,n){O(e.isDragging(),"Cannot call hover while not dragging."),O(!e.didDrop(),"Cannot call hover after drop.");for(let r=0;r<t.length;r++){const o=t[r];O(t.lastIndexOf(o)===r,"Expected targetIds to be unique in the passed array.");const s=n.getTarget(o);O(s,"Expected targetIds to be registered.")}}function Ba(t,e,n){for(let r=t.length-1;r>=0;r--){const o=t[r],s=e.getTargetType(o);pt(s,n)||t.splice(r,1)}}function Ga(t,e,n){t.forEach(function(r){n.getTarget(r).hover(e,r)})}function Ka(t){return function(){if(t.getMonitor().isDragging())return{type:Mt}}}function Wa(t){return{beginDrag:Da(t),publishDragSource:Ka(t),hover:Ua(t),drop:Na(t),endDrag:La(t)}}class Va{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:n}=this.store;function r(s){return(...a)=>{const c=s.apply(e,a);typeof c<"u"&&n(c)}}const o=Wa(this);return Object.keys(o).reduce((s,a)=>{const c=o[a];return s[a]=r(c),s},{})}dispatch(e){this.store.dispatch(e)}constructor(e,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}}function Ya(t,e){return{x:t.x+e.x,y:t.y+e.y}}function Pr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Xa(t){const{clientOffset:e,initialClientOffset:n,initialSourceClientOffset:r}=t;return!e||!n||!r?null:Pr(Ya(e,r),n)}function za(t){const{clientOffset:e,initialClientOffset:n}=t;return!e||!n?null:Pr(e,n)}const be=[],Nt=[];be.__IS_NONE__=!0;Nt.__IS_ALL__=!0;function qa(t,e){return t===be?!1:t===Nt||typeof e>"u"?!0:wa(e,t).length>0}class Za{subscribeToStateChange(e,n={}){const{handlerIds:r}=n;O(typeof e=="function","listener must be a function."),O(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let o=this.store.getState().stateId;const s=()=>{const a=this.store.getState(),c=a.stateId;try{c===o||c===o+1&&!qa(a.dirtyHandlerIds,r)||e()}finally{o=c}};return this.store.subscribe(s)}subscribeToOffsetChange(e){O(typeof e=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const o=this.store.getState().dragOffset;o!==n&&(n=o,e())};return this.store.subscribe(r)}canDragSource(e){if(!e)return!1;const n=this.registry.getSource(e);return O(n,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:n.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const n=this.registry.getTarget(e);if(O(n,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(e),o=this.getItemType();return pt(r,o)&&n.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const n=this.registry.getSource(e,!0);if(O(n,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(e),o=this.getItemType();return r!==o?!1:n.isDragging(this,e)}isOverTarget(e,n={shallow:!1}){if(!e)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const o=this.registry.getTargetType(e),s=this.getItemType();if(s&&!pt(o,s))return!1;const a=this.getTargetIds();if(!a.length)return!1;const c=a.indexOf(e);return r?c===a.length-1:c>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Xa(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return za(this.store.getState().dragOffset)}constructor(e,n){this.store=e,this.registry=n}}const nn=typeof global<"u"?global:self,Rr=nn.MutationObserver||nn.WebKitMutationObserver;function Mr(t){return function(){const n=setTimeout(o,0),r=setInterval(o,50);function o(){clearTimeout(n),clearInterval(r),t()}}}function Qa(t){let e=1;const n=new Rr(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const Ja=typeof Rr=="function"?Qa:Mr;class ec{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,o=e.length-this.index;r<o;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Ja(this.flush),this.requestErrorThrow=Mr(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class tc{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class nc{create(e){const n=this.freeTasks,r=n.length?n.pop():new tc(this.onError,o=>n[n.length]=o);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const Nr=new ec,rc=new nc(Nr.registerPendingError);function oc(t){Nr.enqueueTask(rc.create(t))}const At="dnd-core/ADD_SOURCE",_t="dnd-core/ADD_TARGET",jt="dnd-core/REMOVE_SOURCE",Ze="dnd-core/REMOVE_TARGET";function sc(t){return{type:At,payload:{sourceId:t}}}function ic(t){return{type:_t,payload:{targetId:t}}}function ac(t){return{type:jt,payload:{sourceId:t}}}function cc(t){return{type:Ze,payload:{targetId:t}}}function uc(t){O(typeof t.canDrag=="function","Expected canDrag to be a function."),O(typeof t.beginDrag=="function","Expected beginDrag to be a function."),O(typeof t.endDrag=="function","Expected endDrag to be a function.")}function lc(t){O(typeof t.canDrop=="function","Expected canDrop to be a function."),O(typeof t.hover=="function","Expected hover to be a function."),O(typeof t.drop=="function","Expected beginDrag to be a function.")}function mt(t,e){if(e&&Array.isArray(t)){t.forEach(n=>mt(n,!1));return}O(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var q;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(q||(q={}));let dc=0;function fc(){return dc++}function gc(t){const e=fc().toString();switch(t){case q.SOURCE:return`S${e}`;case q.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function rn(t){switch(t[0]){case"S":return q.SOURCE;case"T":return q.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function on(t,e){const n=t.entries();let r=!1;do{const{done:o,value:[,s]}=n.next();if(s===e)return!0;r=!!o}while(!r);return!1}class hc{addSource(e,n){mt(e),uc(n);const r=this.addHandler(q.SOURCE,e,n);return this.store.dispatch(sc(r)),r}addTarget(e,n){mt(e,!0),lc(n);const r=this.addHandler(q.TARGET,e,n);return this.store.dispatch(ic(r)),r}containsHandler(e){return on(this.dragSources,e)||on(this.dropTargets,e)}getSource(e,n=!1){return O(this.isSourceId(e),"Expected a valid source ID."),n&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return O(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return O(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return O(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return rn(e)===q.SOURCE}isTargetId(e){return rn(e)===q.TARGET}removeSource(e){O(this.getSource(e),"Expected an existing source."),this.store.dispatch(ac(e)),oc(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){O(this.getTarget(e),"Expected an existing target."),this.store.dispatch(cc(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const n=this.getSource(e);O(n,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=n}unpinSource(){O(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,n,r){const o=gc(e);return this.types.set(o,n),e===q.SOURCE?this.dragSources.set(o,r):e===q.TARGET&&this.dropTargets.set(o,r),o}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const pc=(t,e)=>t===e;function mc(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function vc(t,e,n=pc){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function yc(t=be,e){switch(e.type){case Xe:break;case At:case _t:case Ze:case jt:return be;case Ye:case Mt:case qe:case ze:default:return Nt}const{targetIds:n=[],prevTargetIds:r=[]}=e.payload,o=ba(n,r);if(!(o.length>0||!vc(n,r)))return be;const a=r[r.length-1],c=n[n.length-1];return a!==c&&(a&&o.push(a),c&&o.push(c)),o}function Cc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){Cc(t,o,n[o])})}return t}const sn={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Sc(t=sn,e){const{payload:n}=e;switch(e.type){case Rt:case Ye:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Xe:return mc(t.clientOffset,n.clientOffset)?t:xc({},t,{clientOffset:n.clientOffset});case qe:case ze:return sn;default:return t}}function bc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function he(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){bc(t,o,n[o])})}return t}const wc={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Ec(t=wc,e){const{payload:n}=e;switch(e.type){case Ye:return he({},t,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Mt:return he({},t,{isSourcePublic:!0});case Xe:return he({},t,{targetIds:n.targetIds});case Ze:return t.targetIds.indexOf(n.targetId)===-1?t:he({},t,{targetIds:Sa(t.targetIds,n.targetId)});case ze:return he({},t,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case qe:return he({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function Dc(t=0,e){switch(e.type){case At:case _t:return t+1;case jt:case Ze:return t-1;default:return t}}function Tc(t=0){return t+1}function Oc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ic(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){Oc(t,o,n[o])})}return t}function Pc(t={},e){return{dirtyHandlerIds:yc(t.dirtyHandlerIds,{type:e.type,payload:Ic({},e.payload,{prevTargetIds:xa(t,"dragOperation.targetIds",[])})}),dragOffset:Sc(t.dragOffset,e),refCount:Dc(t.refCount,e),dragOperation:Ec(t.dragOperation,e),stateId:Tc(t.stateId)}}function Rc(t,e=void 0,n={},r=!1){const o=Mc(r),s=new Za(o,new hc(o)),a=new Va(o,s),c=t(a,e,n);return a.receiveBackend(c),a}function Mc(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Or(Pc,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function Nc(t,e){if(t==null)return{};var n=Ac(t,e),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(o=0;o<s.length;o++)r=s[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Ac(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,s;for(s=0;s<r.length;s++)o=r[s],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}let an=0;const Ue=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var _c=i.memo(function(e){var{children:n}=e,r=Nc(e,["children"]);const[o,s]=jc(r);return i.useEffect(()=>{if(s){const a=Ar();return++an,()=>{--an===0&&(a[Ue]=null)}}},[]),u.jsx(Tr.Provider,{value:o,children:n})});function jc(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=Fc(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[e,n]}function Fc(t,e=Ar(),n,r){const o=e;return o[Ue]||(o[Ue]={dragDropManager:Rc(t,e,n,r)}),o[Ue]}function Ar(){return typeof global<"u"?global:window}var ot,cn;function Lc(){return cn||(cn=1,ot=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,o,s;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!t(e[o],n[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;o--!==0;){var a=s[o];if(!t(e[a],n[a]))return!1}return!0}return e!==e&&n!==n}),ot}var kc=Lc();const Uc=Jr(kc),ae=typeof window<"u"?i.useLayoutEffect:i.useEffect;function _r(t,e,n){const[r,o]=i.useState(()=>e(t)),s=i.useCallback(()=>{const a=e(t);Uc(r,a)||(o(a),n&&n())},[r,t,n]);return ae(s),[r,s]}function Hc(t,e,n){const[r,o]=_r(t,e,n);return ae(function(){const a=t.getHandlerId();if(a!=null)return t.subscribeToStateChange(o,{handlerIds:[a]})},[t,o]),r}function jr(t,e,n){return Hc(e,t||(()=>({})),()=>n.reconnect())}function Fr(t,e){const n=[...e||[]];return e==null&&typeof t!="function"&&n.push(t),i.useMemo(()=>typeof t=="function"?t():t,n)}function $c(t){return i.useMemo(()=>t.hooks.dragSource(),[t])}function Bc(t){return i.useMemo(()=>t.hooks.dragPreview(),[t])}let st=!1,it=!1;class Gc{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){O(!st,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return st=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{st=!1}}isDragging(){if(!this.sourceId)return!1;O(!it,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return it=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{it=!1}}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,n){return this.internalMonitor.isOverTarget(e,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let at=!1;class Kc{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}canDrop(){if(!this.targetId)return!1;O(!at,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return at=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{at=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function Wc(t,e,n){const r=n.getRegistry(),o=r.addTarget(t,e);return[o,()=>r.removeTarget(o)]}function Vc(t,e,n){const r=n.getRegistry(),o=r.addSource(t,e);return[o,()=>r.removeSource(o)]}function vt(t,e,n,r){let o;if(o!==void 0)return!!o;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const s=Object.keys(t),a=Object.keys(e);if(s.length!==a.length)return!1;const c=Object.prototype.hasOwnProperty.bind(e);for(let d=0;d<s.length;d++){const l=s[d];if(!c(l))return!1;const f=t[l],h=e[l];if(o=void 0,o===!1||o===void 0&&f!==h)return!1}return!0}function yt(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Yc(t){if(typeof t.type=="string")return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function Xc(t){return(e=null,n=null)=>{if(!i.isValidElement(e)){const s=e;return t(s,n),s}const r=e;return Yc(r),zc(r,n?s=>t(s,n):t)}}function Lr(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{const o=Xc(r);e[n]=()=>o}}),e}function un(t,e){typeof t=="function"?t(e):t.current=e}function zc(t,e){const n=t.ref;return O(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?i.cloneElement(t,{ref:r=>{un(n,r),un(e,r)}}):i.cloneElement(t,{ref:e})}class qc{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?e?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),n):(this.lastConnectedDragSource=e,n):n}reconnectDragPreview(e=!1){const n=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!vt(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!vt(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=Lr({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,yt(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,yt(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class Zc{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!vt(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=Lr({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,yt(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function de(){const{dragDropManager:t}=i.useContext(Tr);return O(t!=null,"Expected drag drop context"),t}function Qc(t,e){const n=de(),r=i.useMemo(()=>new qc(n.getBackend()),[n]);return ae(()=>(r.dragSourceOptions=t||null,r.reconnect(),()=>r.disconnectDragSource()),[r,t]),ae(()=>(r.dragPreviewOptions=e||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,e]),r}function Jc(){const t=de();return i.useMemo(()=>new Gc(t),[t])}class eu{beginDrag(){const e=this.spec,n=this.monitor;let r=null;return typeof e.item=="object"?r=e.item:typeof e.item=="function"?r=e.item(n):r={},r??null}canDrag(){const e=this.spec,n=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(n):!0}isDragging(e,n){const r=this.spec,o=this.monitor,{isDragging:s}=r;return s?s(o):n===e.getSourceId()}endDrag(){const e=this.spec,n=this.monitor,r=this.connector,{end:o}=e;o&&o(n.getItem(),n),r.reconnect()}constructor(e,n,r){this.spec=e,this.monitor=n,this.connector=r}}function tu(t,e,n){const r=i.useMemo(()=>new eu(t,e,n),[e,n]);return i.useEffect(()=>{r.spec=t},[t]),r}function nu(t){return i.useMemo(()=>{const e=t.type;return O(e!=null,"spec.type must be defined"),e},[t])}function ru(t,e,n){const r=de(),o=tu(t,e,n),s=nu(t);ae(function(){if(s!=null){const[c,d]=Vc(s,o,r);return e.receiveHandlerId(c),n.receiveHandlerId(c),d}},[r,e,n,o,s])}function kr(t,e){const n=Fr(t,e);O(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=Jc(),o=Qc(n.options,n.previewOptions);return ru(n,r,o),[jr(n.collect,r,o),$c(o),Bc(o)]}function ou(t){const n=de().getMonitor(),[r,o]=_r(n,t);return i.useEffect(()=>n.subscribeToOffsetChange(o)),i.useEffect(()=>n.subscribeToStateChange(o)),r}function su(t){return i.useMemo(()=>t.hooks.dropTarget(),[t])}function iu(t){const e=de(),n=i.useMemo(()=>new Zc(e.getBackend()),[e]);return ae(()=>(n.dropTargetOptions=t||null,n.reconnect(),()=>n.disconnectDropTarget()),[t]),n}function au(){const t=de();return i.useMemo(()=>new Kc(t),[t])}function cu(t){const{accept:e}=t;return i.useMemo(()=>(O(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class uu{canDrop(){const e=this.spec,n=this.monitor;return e.canDrop?e.canDrop(n.getItem(),n):!0}hover(){const e=this.spec,n=this.monitor;e.hover&&e.hover(n.getItem(),n)}drop(){const e=this.spec,n=this.monitor;if(e.drop)return e.drop(n.getItem(),n)}constructor(e,n){this.spec=e,this.monitor=n}}function lu(t,e){const n=i.useMemo(()=>new uu(t,e),[e]);return i.useEffect(()=>{n.spec=t},[t]),n}function du(t,e,n){const r=de(),o=lu(t,e),s=cu(t);ae(function(){const[c,d]=Wc(s,o,r);return e.receiveHandlerId(c),n.receiveHandlerId(c),d},[r,e,o,n,s.map(a=>a.toString()).join("|")])}function fu(t,e){const n=Fr(t,e),r=au(),o=iu(n.options);return du(n,r,o),[jr(n.collect,r,o),su(o)]}function Ur(t){let e=null;return()=>(e==null&&(e=t()),e)}function gu(t,e){return t.filter(n=>n!==e)}function hu(t,e){const n=new Set,r=s=>n.add(s);t.forEach(r),e.forEach(r);const o=[];return n.forEach(s=>o.push(s)),o}class pu{enter(e){const n=this.entered.length,r=o=>this.isNodeInDocument(o)&&(!o.contains||o.contains(e));return this.entered=hu(this.entered.filter(r),[e]),n===0&&this.entered.length>0}leave(e){const n=this.entered.length;return this.entered=gu(this.entered.filter(this.isNodeInDocument),e),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class mu{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const o=this.config.exposeProperties[r];o!=null&&(n[r]={value:o(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,n){return n===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const Hr="__NATIVE_FILE__",$r="__NATIVE_URL__",Br="__NATIVE_TEXT__",Gr="__NATIVE_HTML__",ln=Object.freeze(Object.defineProperty({__proto__:null,FILE:Hr,HTML:Gr,TEXT:Br,URL:$r},Symbol.toStringTag,{value:"Module"}));function ct(t,e,n){const r=e.reduce((o,s)=>o||t.getData(s),"");return r??n}const Ct={[Hr]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[Gr]:{exposeProperties:{html:(t,e)=>ct(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[$r]:{exposeProperties:{urls:(t,e)=>ct(t,e,"").split(`
|
|
5
|
-
`),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[Br]:{exposeProperties:{text:(t,e)=>ct(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function vu(t,e){const n=Ct[t];if(!n)throw new Error(`native type ${t} has no configuration`);const r=new mu(n);return r.loadDataTransfer(e),r}function ut(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(Ct).filter(n=>{const r=Ct[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(o=>e.indexOf(o)>-1):!1})[0]||null}const yu=Ur(()=>/firefox/i.test(navigator.userAgent)),Kr=Ur(()=>!!window.safari);class dn{interpolate(e){const{xs:n,ys:r,c1s:o,c2s:s,c3s:a}=this;let c=n.length-1;if(e===n[c])return r[c];let d=0,l=a.length-1,f;for(;d<=l;){f=Math.floor(.5*(d+l));const m=n[f];if(m<e)d=f+1;else if(m>e)l=f-1;else return r[f]}c=Math.max(0,l);const h=e-n[c],g=h*h;return r[c]+o[c]*h+s[c]*g+a[c]*h*g}constructor(e,n){const{length:r}=e,o=[];for(let m=0;m<r;m++)o.push(m);o.sort((m,C)=>e[m]<e[C]?-1:1);const s=[],a=[];let c,d;for(let m=0;m<r-1;m++)c=e[m+1]-e[m],d=n[m+1]-n[m],s.push(c),a.push(d/c);const l=[a[0]];for(let m=0;m<s.length-1;m++){const C=a[m],p=a[m+1];if(C*p<=0)l.push(0);else{c=s[m];const v=s[m+1],y=c+v;l.push(3*y/((y+v)/C+(y+c)/p))}}l.push(a[a.length-1]);const f=[],h=[];let g;for(let m=0;m<l.length-1;m++){g=a[m];const C=l[m],p=1/s[m],v=C+l[m+1]-g-g;f.push((g-C-v)*p),h.push(v*p*p)}this.xs=e,this.ys=n,this.c1s=l,this.c2s=f,this.c3s=h}}const Cu=1;function Wr(t){const e=t.nodeType===Cu?t:t.parentElement;if(!e)return null;const{top:n,left:r}=e.getBoundingClientRect();return{x:r,y:n}}function Le(t){return{x:t.clientX,y:t.clientY}}function xu(t){var e;return t.nodeName==="IMG"&&(yu()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function Su(t,e,n,r){let o=t?e.width:n,s=t?e.height:r;return Kr()&&t&&(s/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:s}}function bu(t,e,n,r,o){const s=xu(e),c=Wr(s?t:e),d={x:n.x-c.x,y:n.y-c.y},{offsetWidth:l,offsetHeight:f}=t,{anchorX:h,anchorY:g}=r,{dragPreviewWidth:m,dragPreviewHeight:C}=Su(s,e,l,f),p=()=>{let R=new dn([0,.5,1],[d.y,d.y/f*C,d.y+C-f]).interpolate(g);return Kr()&&s&&(R+=(window.devicePixelRatio-1)*C),R},v=()=>new dn([0,.5,1],[d.x,d.x/l*m,d.x+m-l]).interpolate(h),{offsetX:y,offsetY:w}=o,b=y===0||y,E=w===0||w;return{x:b?y:v(),y:E?w:p()}}class wu{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,n){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=n}}function Eu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function fn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){Eu(t,o,n[o])})}return t}class Du{profile(){var e,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,n,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,n),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,n,r){this.sourceNodes.set(e,n),this.sourceNodeOptions.set(e,r);const o=a=>this.handleDragStart(a,e),s=a=>this.handleSelectStart(a);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",o),n.addEventListener("selectstart",s),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),n.removeEventListener("dragstart",o),n.removeEventListener("selectstart",s),n.setAttribute("draggable","false")}}connectDropTarget(e,n){const r=a=>this.handleDragEnter(a,e),o=a=>this.handleDragOver(a,e),s=a=>this.handleDrop(a,e);return n.addEventListener("dragenter",r),n.addEventListener("dragover",o),n.addEventListener("drop",s),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",o),n.removeEventListener("drop",s)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(e);return fn({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(e);return fn({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(ln).some(n=>ln[n]===e)}beginDragNativeItem(e,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=vu(e,n),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,n){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(e,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(e,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(e,n){this.dropTargetIds.unshift(n)}constructor(e,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=o=>{const s=this.sourceNodes.get(o);return s&&Wr(s)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=o=>!!(o&&this.document&&this.document.body&&this.document.body.contains(o)),this.endDragIfSourceWasRemovedFromDOM=()=>{const o=this.currentDragSourceNode;o==null||this.isNodeInDocument(o)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=o=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(o||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=o=>{if(o.defaultPrevented)return;const{dragStartSourceIds:s}=this;this.dragStartSourceIds=null;const a=Le(o);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(s||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:a});const{dataTransfer:c}=o,d=ut(c);if(this.monitor.isDragging()){if(c&&typeof c.setDragImage=="function"){const f=this.monitor.getSourceId(),h=this.sourceNodes.get(f),g=this.sourcePreviewNodes.get(f)||h;if(g){const{anchorX:m,anchorY:C,offsetX:p,offsetY:v}=this.getCurrentSourcePreviewNodeOptions(),b=bu(h,g,a,{anchorX:m,anchorY:C},{offsetX:p,offsetY:v});c.setDragImage(g,b.x,b.y)}}try{c==null||c.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(o.target);const{captureDraggingState:l}=this.getCurrentSourcePreviewNodeOptions();l?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(d)this.beginDragNativeItem(d);else{if(c&&!c.types&&(o.target&&!o.target.hasAttribute||!o.target.hasAttribute("draggable")))return;o.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=o=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var s;(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(o.dataTransfer)}if(!this.enterLeaveCounter.enter(o.target)||this.monitor.isDragging())return;const{dataTransfer:c}=o,d=ut(c);d&&this.beginDragNativeItem(d,c)},this.handleTopDragEnter=o=>{const{dragEnterTargetIds:s}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=o.altKey,s.length>0&&this.actions.hover(s,{clientOffset:Le(o)}),s.some(c=>this.monitor.canDropOnTarget(c))&&(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=o=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var s;(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(o.dataTransfer)}},this.handleTopDragOver=o=>{const{dragOverTargetIds:s}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none");return}this.altKeyPressed=o.altKey,this.lastClientOffset=Le(o),this.scheduleHover(s),(s||[]).some(c=>this.monitor.canDropOnTarget(c))?(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?o.preventDefault():(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=o=>{this.isDraggingNativeItem()&&o.preventDefault(),this.enterLeaveCounter.leave(o.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=o=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var s;o.preventDefault(),(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(o.dataTransfer)}else ut(o.dataTransfer)&&o.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=o=>{const{dropTargetIds:s}=this;this.dropTargetIds=[],this.actions.hover(s,{clientOffset:Le(o)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=o=>{const s=o.target;typeof s.dragDrop=="function"&&(s.tagName==="INPUT"||s.tagName==="SELECT"||s.tagName==="TEXTAREA"||s.isContentEditable||(o.preventDefault(),s.dragDrop()))},this.options=new wu(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new pu(this.isNodeInDocument)}}let ke;function Vr(){return ke||(ke=new Image,ke.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),ke}const Tu=function(e,n,r){return new Du(e,n,r)};function ce({file:t,className:e,style:n}){const r=k(D=>D.selectedFile),o=k(D=>D.setSelectedFile),s=k(D=>D.activeRange),a=k(D=>D.setActiveRange),c=k(D=>D.inActiveRange),d=Qe(D=>D.addTab),l=Qe(D=>D.selectTab),f=Qe(D=>D.createTab),[h,g]=i.useState(!1),m=pn(()=>g(!0),{threshold:50,onFinish(){g(!1)},onCancel(){g(!1)}}),{setArtifactRename:C,renameArtifact:p,artifactRename:v,selectArtifactsInRange:y,removeArtifactWithConfirmation:w}=Ge(),[b,E]=i.useState(!1),[{isDragging:I},R,T]=kr(()=>({type:"artifact",item:t,end(){g(!1)},canDrag(){return v!==t&&h},collect(D){return{isDragging:D.isDragging()}}}),[t,v,h]);i.useEffect(()=>{T(Vr(),{captureDraggingState:!0})},[T]);function M(D){D.stopPropagation(),D.shiftKey&&D.preventDefault();let A=s;D.metaKey?(c(t)?A=A.filter(K=>K!==t):A.push(t),a(A)):D.shiftKey&&A.length>0?y(t):(A.length>0&&(A=[]),A.push(t),a(A),o(t))}function _(){const D=f(t);d(D),l(D)}const F=s.length>1&&c(t);return u.jsx("div",{...m,ref:R,children:u.jsxs(W.Container,{artifact:t,isSelected:r===t,className:L(v===t&&"bg-primary-10",b&&"bg-primary-10",h&&"bg-primary-10 !cursor-grabbing outline-2 !outline-primary-500",I&&"opacity-50",e),style:n,onDoubleClick:D=>{D.stopPropagation(),_()},handleSelect:M,children:[u.jsx(ce.Icons,{}),v===t?u.jsx(W.Rename,{artifact:v,rename:p,close:()=>C(void 0)}):u.jsxs(W.ContextMenu,{trigger:u.jsx(W.ContextMenuTrigger,{children:u.jsx(ce.Display,{file:t})}),onOpenChange:E,children:[r!==t&&u.jsxs(Q,{className:L("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",F?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:F,onClick:D=>{D.stopPropagation()},onSelect:D=>{D.stopPropagation(),_()},children:["Open in New Tab",u.jsx("div",{className:"ml-auto pl-5"})]}),u.jsxs(Q,{className:L("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",F?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:F,onClick:D=>{D.stopPropagation()},onSelect:D=>{D.stopPropagation(),C(t)},children:["Rename",u.jsx("div",{className:"ml-auto pl-5"})]}),u.jsxs(Q,{className:"py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-danger-500 hover:bg-danger-500 hover:text-light",onSelect:D=>{D.stopPropagation(),w(t)},children:["Remove ",c(t)?s.length:"",u.jsx("div",{className:"ml-auto pl-5"})]})]})]})})}function Ou({file:t}){return u.jsx("span",{title:t.name,className:L("inline-block overflow-hidden overflow-ellipsis py-[0.125rem]"),children:hn(t.name,50,20)})}function Iu(){return u.jsx("div",{className:"flex items-center",children:u.jsx(No,{className:"inline-block w-3 ml-1 mr-2"})})}ce.Display=Ou;ce.Icons=Iu;const De=function t({directory:e,className:n,style:r}){const o=k(S=>S.selectedFile),s=k(S=>S.activeRange),a=k(S=>S.setActiveRange),c=k(S=>S.inActiveRange),[d,l]=i.useState(e.isOpened),[f,h]=i.useState(!1),[g,m]=i.useState(!1),C=pn(()=>m(!0),{threshold:50,onFinish(){m(!1)},onCancel(){m(!1)}}),{setArtifactRename:p,renameArtifact:v,artifactRename:y,createDirectory:w,createFile:b,moveArtifacts:E,removeArtifactWithConfirmation:I,selectArtifactsInRange:R}=Ge(),[{isOver:T},M]=fu(()=>({accept:"artifact",drop(S,x){if(X(x.canDrop()))return;const N=c(S)?s:[S];E(N,e),e.open()},canDrop(S,x){const N=c(S)?s:[S];return x.isOver({shallow:!0})&&to(N)&&N.reduce((j,H)=>!(X(j)||H.parent===e||H===e||H instanceof lt&&H.hasDirectory(e)),!0)},collect(S){return{isOver:S.isOver({shallow:!0})&&S.canDrop()}}}),[s]),[{isDragging:_},F,D]=kr(()=>({type:"artifact",item:e,end(){m(!1)},canDrag(){return y!==e&&g},collect(S){return{isDragging:S.isDragging()}}}),[e,y,g]),[A,K,ee,te]=i.useMemo(()=>{if(s.length<2)return[!1,!1,!1,!1];let S=!0,x=!0,N=!0;for(const j of Array.from(s))j instanceof lt&&S?(x&&(x=j.isOpened),N&&(N=j.isClosed)):S=!1;return[S,x,N,X(x)&&X(N)]},[s]);i.useEffect(()=>{e.syncStateOpen=l},[e]),i.useEffect(()=>{D(Vr(),{captureDraggingState:!0})},[D]),i.useEffect(()=>{eo(o)||d||e.hasFile(o)&&e.open()},[o]);function V(S){S.stopPropagation(),S.shiftKey||S.metaKey?S.preventDefault():e.toggle();let x=s;S.metaKey?(c(e)?x=x.filter(N=>N!==e):x.push(e),a(x)):S.shiftKey&&x.length>0?R(e):(x.length>0&&(x=[]),x.push(e),a(x))}const U=s.length>1&&c(e);return u.jsx("div",{className:L("h-full",_&&"opacity-50"),children:u.jsxs("div",{ref:M,className:L(T&&X(_)&&"bg-primary-5"),children:[e.withParent&&u.jsx("div",{...C,ref:e.withParent?F:void 0,children:u.jsxs(W.Container,{artifact:e,className:L(y===e&&"bg-primary-10",g&&"bg-primary-10 !cursor-grabbing",f&&"bg-primary-10",n),style:r,handleSelect:V,children:[u.jsx(t.Icons,{isOpen:d||T&&X(_)}),y===e?u.jsx(W.Rename,{artifact:y,rename:v,close:()=>p(void 0)}):u.jsxs(W.ContextMenu,{trigger:u.jsx(W.ContextMenuTrigger,{children:u.jsx(t.Display,{directory:e})}),onOpenChange:h,children:[u.jsxs(Q,{className:L("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",U&&X(A)?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:U&&X(A),onSelect:S=>{S.stopPropagation(),s.length>1&&c(e)?s.forEach(x=>{K?x.collapse():ee?x.expand():te&&(x.isOpened?x.collapse():x.expand())}):e.isOpened?e.collapse():e.expand(),a([])},children:[A&&K&&"Collapse All",A&&ee&&"Expand All",A&&te&&"Toggle All",X(A)&&e.isOpened&&"Collapse",X(A)&&e.isClosed&&"Expand",u.jsx("div",{className:"ml-auto pl-5"})]}),u.jsx(Zt,{className:"h-[1px] bg-accent-200 m-2"}),u.jsxs(Q,{className:L("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",U?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:U,onSelect:S=>{S.stopPropagation(),b(e)},children:["New File",u.jsx("div",{className:"ml-auto pl-5"})]}),u.jsxs(Q,{className:L("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",U?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:U,onSelect:S=>{S.stopPropagation(),w(e)},children:["New Folder",u.jsx("div",{className:"ml-auto pl-5"})]}),u.jsx(Zt,{className:"h-[1px] bg-accent-200 m-2"}),u.jsxs(Q,{className:L("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",U?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:U,onClick:S=>{S.stopPropagation()},onSelect:S=>{S.stopPropagation(),p(e)},children:["Rename",u.jsx("div",{className:"ml-auto pl-5"})]}),u.jsxs(Q,{className:"py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-danger-500 hover:bg-danger-500 hover:text-light",onSelect:S=>{S.stopPropagation(),I(e)},children:["Remove ",c(e)?s.length:"",u.jsx("div",{className:"ml-auto pl-5"})]})]})]})}),(T&&X(_)||d||!e.withParent)&&e.withDirectories&&u.jsx("ul",{className:L(c(e)&&"bg-primary-5"),children:e.directories.map(S=>u.jsx("li",{title:S.name,children:u.jsx(t,{directory:S,style:{paddingLeft:e.withParent?`${e.level/2+.25}rem`:0}},S.id)},S.id))}),(T&&X(_)||d||!e.withParent)&&e.withFiles&&u.jsx("ul",{className:L(c(e)&&"bg-primary-5"),children:e.files.map(S=>u.jsx("li",{title:S.name,children:u.jsx(ce,{file:S,style:{paddingLeft:e.withParent?`${e.level/2+.25}rem`:0}},S.id)},S.id))})]})})};function Pu({directory:t}){return u.jsxs("div",{className:"w-full flex justify-between items-center py-[0.125rem]",children:[u.jsx("span",{title:t.name,className:"overflow-hidden overflow-ellipsis whitespace-nowrap",children:hn(t.name,50,20)}),u.jsx("span",{className:"inline-block text-xs rounded-full px-2 bg-neutral-10 ml-2",children:t.directories.length+t.files.length})]})}function Ru({hasChevron:t=!0,hasFolder:e=!0,isOpen:n=!1,className:r}){const o=n?Po:Ro,s=n?_o:Fo;return u.jsxs("div",{className:L("flex items-center mr-2",r),children:[t&&u.jsx(o,{className:"inline-block w-5"}),e&&u.jsx(s,{className:"inline-block w-4 fill-primary-500"})]})}De.Icons=Ru;De.Display=Pu;const Mu={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"};function Nu(){const t=k(a=>a.activeRange),e=k(a=>a.inActiveRange),{isDragging:n,currentOffset:r,artifact:o}=ou(a=>({artifact:a.getItem(),isDragging:a.isDragging(),currentOffset:a.getSourceClientOffset()})),s=i.useMemo(()=>Array.from(e(o)?t:new Set([o])).filter(Boolean),[t,o]);return u.jsx(u.Fragment,{children:n&&u.jsx("div",{style:Mu,children:u.jsx("div",{style:Au(r),className:"!cursor-grabbing !rounded-lg overflow-hidden",children:s.map(a=>u.jsxs("span",{children:[a instanceof lt&&u.jsxs(W.Container,{artifact:a,className:"bg-theme",children:[u.jsx(De.Icons,{hasChevron:!1}),u.jsx(De.Display,{directory:a})]},a.path),a instanceof Oo&&u.jsxs(W.Container,{artifact:a,className:"bg-theme",children:[u.jsx(ce.Icons,{}),u.jsx(ce.Display,{file:a})]},a.path)]},a.id))})})})}function Au(t){if(t==null)return{display:"none"};const{x:e,y:n}=t;return{display:"inline-block",transform:`translate(${e}px, ${n}px)`,filter:"drop-shadow(0 2px 12px rgba(0,0,0,0.45))"}}const W=function t({className:e}){const n=k(g=>g.project),r=k(g=>g.setSelectedFile),o=k(g=>g.activeRange),s=k(g=>g.setActiveRange),a=no(g=>g.addConfirmation),{isFetching:c}=ro(),{removeArtifacts:d,createDirectory:l,createFile:f}=Ge();function h(g){g.key==="Escape"&&s([]),g.ctrlKey&&g.key==="Backspace"&&o.length>0&&a({headline:"Removing Selected Files/Directories",description:`Are you sure you want to remove ${o.length} items?`,yesText:"Yes, Remove",noText:"No, Cancel",details:Array.from(o).map(m=>m.path),action:()=>{d(o)}})}return u.jsx("div",{tabIndex:0,className:L("flex flex-col w-full h-full overflow-hidden text-sm text-neutral-500 dark:text-neutral-400 font-regular select-none",e),onKeyDown:h,children:c?u.jsx("div",{className:"flex justify-center items-center w-full h-full",children:u.jsxs(oo,{className:"inline-block",children:[u.jsx(so,{className:"w-3 h-3 border border-neutral-10 mr-2"}),u.jsx("h3",{className:"text-md",children:"Getting Project Files..."})]})}):u.jsxs(u.Fragment,{children:[u.jsx(Io,{list:n.allFiles,searchBy:"path",displayBy:"name",size:io.sm,onSelect:r,direction:"top",isFullWidth:!0}),u.jsxs(t.ContextMenu,{trigger:u.jsx(t.ContextMenuTrigger,{className:"h-full pb-1",children:u.jsx(_c,{backend:Tu,children:u.jsxs("div",{className:"w-full relative h-full px-1 overflow-hidden overflow-y-auto hover:scrollbar scrollbar--vertical",children:[u.jsx(Nu,{}),u.jsx(De,{className:"z-20 relative",directory:n},n.id)]})})}),children:[u.jsxs(Q,{className:"py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 hover:bg-accent-500 hover:text-light",onSelect:g=>{g.stopPropagation(),f(n)},children:["New File",u.jsx("div",{className:"ml-auto pl-5"})]}),u.jsxs(Q,{className:"py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 hover:bg-accent-500 hover:text-light",onSelect:g=>{g.stopPropagation(),l(n)},children:["New Folder",u.jsx("div",{className:"ml-auto pl-5"})]})]},n.id)]})})};function _u({trigger:t,children:e,onOpenChange:n}){return u.jsxs(ha,{onOpenChange:n,children:[t,u.jsx(ma,{children:u.jsx(va,{className:"bg-light rounded-md overflow-hidden shadow-lg py-2 px-1 z-50",onClick:r=>{r.stopPropagation()},children:e})})]})}function ju({children:t,className:e}){return u.jsx(pa,{className:L("flex w-full overflow-hidden",e),onContextMenu:n=>{n.stopPropagation()},children:t})}function Fu({artifact:t,rename:e,close:n}){const r=re.useRef(null),[o,s]=i.useState("");return i.useEffect(()=>{s(t.name),setTimeout(()=>{var a;(a=r.current)==null||a.focus()},100)},[t]),u.jsx("div",{className:"w-full flex items-center py-[0.125rem] pr-2",children:u.jsx("input",{ref:r,type:"text",className:"w-full overflow-hidden overflow-ellipsis bg-primary-900 text-primary-100",value:o,onInput:a=>{a.stopPropagation(),s(a.target.value)},onBlur:a=>{a.stopPropagation(),n()},onKeyDown:a=>{a.key==="Enter"&&(a.stopPropagation(),o.trim()!==""&&o!==t.name&&e(t,o),n()),a.key==="Escape"&&(a.stopPropagation(),n())}})})}function Lu({artifact:t,children:e,isSelected:n=!1,className:r,style:o,handleSelect:s,onDoubleClick:a}){const{setArtifactRename:c,isBottomGroupInActiveRange:d,isTopGroupInActiveRange:l,isMiddleGroupInActiveRange:f}=Ge(),h=k(m=>m.activeRange),g=k(m=>m.inActiveRange);return u.jsx("span",{tabIndex:0,className:L("w-full flex items-center group/file px-2",r,l(t)?"rounded-t-md":d(t)?"rounded-b-md":f(t)?"":g(t)&&"rounded-md",g(t)&&h.length>1&&h.indexOf(t)<h.length-1?"border-b border-primary-400":"border-b border-transparent",g(t)?"bg-primary-10 dark:bg-primary-20":n&&"rounded-md bg-neutral-10 text-neutral-600 dark:bg-dark-lighter dark:text-primary-500"),style:o,onClick:s,onDoubleClick:a,onKeyDown:m=>{m.key==="Enter"&&(m.stopPropagation(),c(t),s==null||s(m)),m.key===" "&&(m.stopPropagation(),s==null||s(m))},children:e})}W.ContextMenu=_u;W.ContextMenuTrigger=ju;W.Rename=Fu;W.Container=Lu;export{W as default};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import{r as c,R as J,j as U,b as Jn,c as we,f as eo,ad as ge,ac as pn,ae as to,m as ee,i as Bt}from"./index-KZcJd7F1.js";import{r as ot,R as no}from"./index-BdXOfeCo.js";function oo({title:e,titleId:t,...n},o){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?c.createElement("title",{id:t},e):null,c.createElement("path",{fillRule:"evenodd",d:"M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z",clipRule:"evenodd"}))}const ro=c.forwardRef(oo);function co({title:e,titleId:t,...n},o){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?c.createElement("title",{id:t},e):null,c.createElement("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",clipRule:"evenodd"}))}const io=c.forwardRef(co);function so({title:e,titleId:t,...n},o){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?c.createElement("title",{id:t},e):null,c.createElement("path",{fillRule:"evenodd",d:"M11.47 4.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1-1.06 1.06L12 6.31 8.78 9.53a.75.75 0 0 1-1.06-1.06l3.75-3.75Zm-3.75 9.75a.75.75 0 0 1 1.06 0L12 17.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0l-3.75-3.75a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const ao=c.forwardRef(so);function lo({title:e,titleId:t,...n},o){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?c.createElement("title",{id:t},e):null,c.createElement("path",{fillRule:"evenodd",d:"M11.47 7.72a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06L12 9.31l-6.97 6.97a.75.75 0 0 1-1.06-1.06l7.5-7.5Z",clipRule:"evenodd"}))}const uo=c.forwardRef(lo);function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},O.apply(null,arguments)}const fo=J.forwardRef(function({type:t="text",value:n,placeholder:o,className:r,disabled:i=!1,autoFocus:a=!1,onInput:s,onKeyDown:l},u){return n=n??"",U.jsx("input",{ref:u,className:we("placeholder:text-neutral-300 dark:placeholder:text-neutral-700",i&&"opacity-50 cursor-not-allowed",r),type:t,value:n,placeholder:o,disabled:i,autoFocus:a,readOnly:Jn(!!s),onInput:s,onKeyDown:l})});function Wt(e,[t,n]){return Math.min(n,Math.max(t,e))}function z(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function Ot(e,t=[]){let n=[];function o(i,a){const s=c.createContext(a),l=n.length;n=[...n,a];function u(d){const{scope:x,children:m,...h}=d,f=(x==null?void 0:x[e][l])||s,v=c.useMemo(()=>h,Object.values(h));return c.createElement(f.Provider,{value:v},m)}function p(d,x){const m=(x==null?void 0:x[e][l])||s,h=c.useContext(m);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,p]}const r=()=>{const i=n.map(a=>c.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return r.scopeName=e,[o,po(r,...t)]}function po(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const a=o.reduce((s,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...s,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function mo(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function mn(...e){return t=>e.forEach(n=>mo(n,t))}function K(...e){return c.useCallback(mn(...e),e)}const Be=c.forwardRef((e,t)=>{const{children:n,...o}=e,r=c.Children.toArray(n),i=r.find(vo);if(i){const a=i.props.children,s=r.map(l=>l===i?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:l);return c.createElement(bt,O({},o,{ref:t}),c.isValidElement(a)?c.cloneElement(a,void 0,s):null)}return c.createElement(bt,O({},o,{ref:t}),n)});Be.displayName="Slot";const bt=c.forwardRef((e,t)=>{const{children:n,...o}=e;return c.isValidElement(n)?c.cloneElement(n,{...go(o,n.props),ref:t?mn(t,n.ref):n.ref}):c.Children.count(n)>1?c.Children.only(null):null});bt.displayName="SlotClone";const ho=({children:e})=>c.createElement(c.Fragment,null,e);function vo(e){return c.isValidElement(e)&&e.type===ho}function go(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...s)=>{i(...s),r(...s)}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function wo(e){const t=e+"CollectionProvider",[n,o]=Ot(t),[r,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:h,children:f}=m,v=J.useRef(null),g=J.useRef(new Map).current;return J.createElement(r,{scope:h,itemMap:g,collectionRef:v},f)},s=e+"CollectionSlot",l=J.forwardRef((m,h)=>{const{scope:f,children:v}=m,g=i(s,f),w=K(h,g.collectionRef);return J.createElement(Be,{ref:w},v)}),u=e+"CollectionItemSlot",p="data-radix-collection-item",d=J.forwardRef((m,h)=>{const{scope:f,children:v,...g}=m,w=J.useRef(null),$=K(h,w),b=i(u,f);return J.useEffect(()=>(b.itemMap.set(w,{ref:w,...g}),()=>void b.itemMap.delete(w))),J.createElement(Be,{[p]:"",ref:$},v)});function x(m){const h=i(e+"CollectionConsumer",m);return J.useCallback(()=>{const v=h.collectionRef.current;if(!v)return[];const g=Array.from(v.querySelectorAll(`[${p}]`));return Array.from(h.itemMap.values()).sort((b,y)=>g.indexOf(b.ref.current)-g.indexOf(y.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},x,o]}const xo=c.createContext(void 0);function $o(e){const t=c.useContext(xo);return e||t||"ltr"}const bo=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Z=bo.reduce((e,t)=>{const n=c.forwardRef((o,r)=>{const{asChild:i,...a}=o,s=i?Be:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(s,O({},a,{ref:r}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function yo(e,t){e&&ot.flushSync(()=>e.dispatchEvent(t))}function de(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var o;return(o=t.current)===null||o===void 0?void 0:o.call(t,...n)},[])}function Eo(e,t=globalThis==null?void 0:globalThis.document){const n=de(e);c.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o),()=>t.removeEventListener("keydown",o)},[n,t])}const yt="dismissableLayer.update",So="dismissableLayer.pointerDownOutside",Co="dismissableLayer.focusOutside";let Ht;const Ro=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Po=c.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,p=c.useContext(Ro),[d,x]=c.useState(null),m=(n=d==null?void 0:d.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=c.useState({}),f=K(t,E=>x(E)),v=Array.from(p.layers),[g]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),w=v.indexOf(g),$=d?v.indexOf(d):-1,b=p.layersWithOutsidePointerEventsDisabled.size>0,y=$>=w,R=To(E=>{const A=E.target,_=[...p.branches].some(I=>I.contains(A));!y||_||(i==null||i(E),s==null||s(E),E.defaultPrevented||l==null||l())},m),S=Oo(E=>{const A=E.target;[...p.branches].some(I=>I.contains(A))||(a==null||a(E),s==null||s(E),E.defaultPrevented||l==null||l())},m);return Eo(E=>{$===p.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&l&&(E.preventDefault(),l()))},m),c.useEffect(()=>{if(d)return o&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Ht=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(d)),p.layers.add(d),Vt(),()=>{o&&p.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Ht)}},[d,m,o,p]),c.useEffect(()=>()=>{d&&(p.layers.delete(d),p.layersWithOutsidePointerEventsDisabled.delete(d),Vt())},[d,p]),c.useEffect(()=>{const E=()=>h({});return document.addEventListener(yt,E),()=>document.removeEventListener(yt,E)},[]),c.createElement(Z.div,O({},u,{ref:f,style:{pointerEvents:b?y?"auto":"none":void 0,...e.style},onFocusCapture:z(e.onFocusCapture,S.onFocusCapture),onBlurCapture:z(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:z(e.onPointerDownCapture,R.onPointerDownCapture)}))});function To(e,t=globalThis==null?void 0:globalThis.document){const n=de(e),o=c.useRef(!1),r=c.useRef(()=>{});return c.useEffect(()=>{const i=s=>{if(s.target&&!o.current){let u=function(){hn(So,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Oo(e,t=globalThis==null?void 0:globalThis.document){const n=de(e),o=c.useRef(!1);return c.useEffect(()=>{const r=i=>{i.target&&!o.current&&hn(Co,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Vt(){const e=new CustomEvent(yt);document.dispatchEvent(e)}function hn(e,t,n,{discrete:o}){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?yo(r,i):r.dispatchEvent(i)}let ft=0;function Ao(){c.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:jt()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:jt()),ft++,()=>{ft===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),ft--}},[])}function jt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const pt="focusScope.autoFocusOnMount",mt="focusScope.autoFocusOnUnmount",Ut={bubbles:!1,cancelable:!0},Do=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:i,...a}=e,[s,l]=c.useState(null),u=de(r),p=de(i),d=c.useRef(null),x=K(t,f=>l(f)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(o){let f=function($){if(m.paused||!s)return;const b=$.target;s.contains(b)?d.current=b:ve(d.current,{select:!0})},v=function($){if(m.paused||!s)return;const b=$.relatedTarget;b!==null&&(s.contains(b)||ve(d.current,{select:!0}))},g=function($){const b=document.activeElement;for(const y of $)y.removedNodes.length>0&&(s!=null&&s.contains(b)||ve(s))};document.addEventListener("focusin",f),document.addEventListener("focusout",v);const w=new MutationObserver(g);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",v),w.disconnect()}}},[o,s,m.paused]),c.useEffect(()=>{if(s){Kt.add(m);const f=document.activeElement;if(!s.contains(f)){const g=new CustomEvent(pt,Ut);s.addEventListener(pt,u),s.dispatchEvent(g),g.defaultPrevented||(_o(Lo(vn(s)),{select:!0}),document.activeElement===f&&ve(s))}return()=>{s.removeEventListener(pt,u),setTimeout(()=>{const g=new CustomEvent(mt,Ut);s.addEventListener(mt,p),s.dispatchEvent(g),g.defaultPrevented||ve(f??document.body,{select:!0}),s.removeEventListener(mt,p),Kt.remove(m)},0)}}},[s,u,p,m]);const h=c.useCallback(f=>{if(!n&&!o||m.paused)return;const v=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,g=document.activeElement;if(v&&g){const w=f.currentTarget,[$,b]=Io(w);$&&b?!f.shiftKey&&g===b?(f.preventDefault(),n&&ve($,{select:!0})):f.shiftKey&&g===$&&(f.preventDefault(),n&&ve(b,{select:!0})):g===w&&f.preventDefault()}},[n,o,m.paused]);return c.createElement(Z.div,O({tabIndex:-1},a,{ref:x,onKeyDown:h}))});function _o(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(ve(o,{select:t}),document.activeElement!==n)return}function Io(e){const t=vn(e),n=zt(t,e),o=zt(t.reverse(),e);return[n,o]}function vn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function zt(e,t){for(const n of e)if(!No(n,{upTo:t}))return n}function No(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Mo(e){return e instanceof HTMLInputElement&&"select"in e}function ve(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Mo(e)&&t&&e.select()}}const Kt=ko();function ko(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Yt(e,t),e.unshift(t)},remove(t){var n;e=Yt(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Yt(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Lo(e){return e.filter(t=>t.tagName!=="A")}const te=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},Fo=eo.useId||(()=>{});let Bo=0;function gn(e){const[t,n]=c.useState(Fo());return te(()=>{n(o=>o??String(Bo++))},[e]),e||(t?`radix-${t}`:"")}const Wo=["top","right","bottom","left"],xe=Math.min,G=Math.max,Je=Math.round,Ue=Math.floor,ie=e=>({x:e,y:e}),Ho={left:"right",right:"left",bottom:"top",top:"bottom"},Vo={start:"end",end:"start"};function Et(e,t,n){return G(e,xe(t,n))}function fe(e,t){return typeof e=="function"?e(t):e}function pe(e){return e.split("-")[0]}function _e(e){return e.split("-")[1]}function At(e){return e==="x"?"y":"x"}function Dt(e){return e==="y"?"height":"width"}function ue(e){return["top","bottom"].includes(pe(e))?"y":"x"}function _t(e){return At(ue(e))}function jo(e,t,n){n===void 0&&(n=!1);const o=_e(e),r=_t(e),i=Dt(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=et(a)),[a,et(a)]}function Uo(e){const t=et(e);return[St(e),t,St(t)]}function St(e){return e.replace(/start|end/g,t=>Vo[t])}function zo(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:a;default:return[]}}function Ko(e,t,n,o){const r=_e(e);let i=zo(pe(e),n==="start",o);return r&&(i=i.map(a=>a+"-"+r),t&&(i=i.concat(i.map(St)))),i}function et(e){return e.replace(/left|right|bottom|top/g,t=>Ho[t])}function Yo(e){return{top:0,right:0,bottom:0,left:0,...e}}function wn(e){return typeof e!="number"?Yo(e):{top:e,right:e,bottom:e,left:e}}function tt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Xt(e,t,n){let{reference:o,floating:r}=e;const i=ue(t),a=_t(t),s=Dt(a),l=pe(t),u=i==="y",p=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,x=o[s]/2-r[s]/2;let m;switch(l){case"top":m={x:p,y:o.y-r.height};break;case"bottom":m={x:p,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:d};break;case"left":m={x:o.x-r.width,y:d};break;default:m={x:o.x,y:o.y}}switch(_e(t)){case"start":m[a]-=x*(n&&u?-1:1);break;case"end":m[a]+=x*(n&&u?-1:1);break}return m}const Xo=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:p,y:d}=Xt(u,o,l),x=o,m={},h=0;for(let f=0;f<s.length;f++){const{name:v,fn:g}=s[f],{x:w,y:$,data:b,reset:y}=await g({x:p,y:d,initialPlacement:o,placement:x,strategy:r,middlewareData:m,rects:u,platform:a,elements:{reference:e,floating:t}});p=w??p,d=$??d,m={...m,[v]:{...m[v],...b}},y&&h<=50&&(h++,typeof y=="object"&&(y.placement&&(x=y.placement),y.rects&&(u=y.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):y.rects),{x:p,y:d}=Xt(u,x,l)),f=-1)}return{x:p,y:d,placement:x,strategy:r,middlewareData:m}};async function We(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:x=!1,padding:m=0}=fe(t,e),h=wn(m),v=s[x?d==="floating"?"reference":"floating":d],g=tt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:p,strategy:l})),w=d==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,$=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),b=await(i.isElement==null?void 0:i.isElement($))?await(i.getScale==null?void 0:i.getScale($))||{x:1,y:1}:{x:1,y:1},y=tt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:$,strategy:l}):w);return{top:(g.top-y.top+h.top)/b.y,bottom:(y.bottom-g.bottom+h.bottom)/b.y,left:(g.left-y.left+h.left)/b.x,right:(y.right-g.right+h.right)/b.x}}const Zo=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:u,padding:p=0}=fe(e,t)||{};if(u==null)return{};const d=wn(p),x={x:n,y:o},m=_t(r),h=Dt(m),f=await a.getDimensions(u),v=m==="y",g=v?"top":"left",w=v?"bottom":"right",$=v?"clientHeight":"clientWidth",b=i.reference[h]+i.reference[m]-x[m]-i.floating[h],y=x[m]-i.reference[m],R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let S=R?R[$]:0;(!S||!await(a.isElement==null?void 0:a.isElement(R)))&&(S=s.floating[$]||i.floating[h]);const E=b/2-y/2,A=S/2-f[h]/2-1,_=xe(d[g],A),I=xe(d[w],A),F=_,D=S-f[h]-I,W=S/2-f[h]/2+E,T=Et(F,W,D),N=!l.arrow&&_e(r)!=null&&W!==T&&i.reference[h]/2-(W<F?_:I)-f[h]/2<0,V=N?W<F?W-F:W-D:0;return{[m]:x[m]+V,data:{[m]:T,centerOffset:W-T-V,...N&&{alignmentOffset:V}},reset:N}}}),qo=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:x,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:f=!0,...v}=fe(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=pe(r),w=ue(s),$=pe(s)===s,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),y=x||($||!f?[et(s)]:Uo(s)),R=h!=="none";!x&&R&&y.push(...Ko(s,f,h,b));const S=[s,...y],E=await We(t,v),A=[];let _=((o=i.flip)==null?void 0:o.overflows)||[];if(p&&A.push(E[g]),d){const T=jo(r,a,b);A.push(E[T[0]],E[T[1]])}if(_=[..._,{placement:r,overflows:A}],!A.every(T=>T<=0)){var I,F;const T=(((I=i.flip)==null?void 0:I.index)||0)+1,N=S[T];if(N){var D;const P=d==="alignment"?w!==ue(N):!1,B=((D=_[0])==null?void 0:D.overflows[0])>0;if(!P||B)return{data:{index:T,overflows:_},reset:{placement:N}}}let V=(F=_.filter(P=>P.overflows[0]<=0).sort((P,B)=>P.overflows[1]-B.overflows[1])[0])==null?void 0:F.placement;if(!V)switch(m){case"bestFit":{var W;const P=(W=_.filter(B=>{if(R){const j=ue(B.placement);return j===w||j==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(j=>j>0).reduce((j,me)=>j+me,0)]).sort((B,j)=>B[1]-j[1])[0])==null?void 0:W[0];P&&(V=P);break}case"initialPlacement":V=s;break}if(r!==V)return{reset:{placement:V}}}return{}}}};function Zt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function qt(e){return Wo.some(t=>e[t]>=0)}const Go=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=fe(e,t);switch(o){case"referenceHidden":{const i=await We(t,{...r,elementContext:"reference"}),a=Zt(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:qt(a)}}}case"escaped":{const i=await We(t,{...r,altBoundary:!0}),a=Zt(i,n.floating);return{data:{escapedOffsets:a,escaped:qt(a)}}}default:return{}}}}};async function Qo(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=pe(n),s=_e(n),l=ue(n)==="y",u=["left","top"].includes(a)?-1:1,p=i&&l?-1:1,d=fe(t,e);let{mainAxis:x,crossAxis:m,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof h=="number"&&(m=s==="end"?h*-1:h),l?{x:m*p,y:x*u}:{x:x*u,y:m*p}}const Jo=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:a,middlewareData:s}=t,l=await Qo(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:a}}}}},er=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:v=>{let{x:g,y:w}=v;return{x:g,y:w}}},...l}=fe(e,t),u={x:n,y:o},p=await We(t,l),d=ue(pe(r)),x=At(d);let m=u[x],h=u[d];if(i){const v=x==="y"?"top":"left",g=x==="y"?"bottom":"right",w=m+p[v],$=m-p[g];m=Et(w,m,$)}if(a){const v=d==="y"?"top":"left",g=d==="y"?"bottom":"right",w=h+p[v],$=h-p[g];h=Et(w,h,$)}const f=s.fn({...t,[x]:m,[d]:h});return{...f,data:{x:f.x-n,y:f.y-o,enabled:{[x]:i,[d]:a}}}}}},tr=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=fe(e,t),p={x:n,y:o},d=ue(r),x=At(d);let m=p[x],h=p[d];const f=fe(s,t),v=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(l){const $=x==="y"?"height":"width",b=i.reference[x]-i.floating[$]+v.mainAxis,y=i.reference[x]+i.reference[$]-v.mainAxis;m<b?m=b:m>y&&(m=y)}if(u){var g,w;const $=x==="y"?"width":"height",b=["top","left"].includes(pe(r)),y=i.reference[d]-i.floating[$]+(b&&((g=a.offset)==null?void 0:g[d])||0)+(b?0:v.crossAxis),R=i.reference[d]+i.reference[$]+(b?0:((w=a.offset)==null?void 0:w[d])||0)-(b?v.crossAxis:0);h<y?h=y:h>R&&(h=R)}return{[x]:m,[d]:h}}}},nr=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...u}=fe(e,t),p=await We(t,u),d=pe(r),x=_e(r),m=ue(r)==="y",{width:h,height:f}=i.floating;let v,g;d==="top"||d==="bottom"?(v=d,g=x===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,v=x==="end"?"top":"bottom");const w=f-p.top-p.bottom,$=h-p.left-p.right,b=xe(f-p[v],w),y=xe(h-p[g],$),R=!t.middlewareData.shift;let S=b,E=y;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=$),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(S=w),R&&!x){const _=G(p.left,0),I=G(p.right,0),F=G(p.top,0),D=G(p.bottom,0);m?E=h-2*(_!==0||I!==0?_+I:G(p.left,p.right)):S=f-2*(F!==0||D!==0?F+D:G(p.top,p.bottom))}await l({...t,availableWidth:E,availableHeight:S});const A=await a.getDimensions(s.floating);return h!==A.width||f!==A.height?{reset:{rects:!0}}:{}}}};function rt(){return typeof window<"u"}function Ie(e){return xn(e)?(e.nodeName||"").toLowerCase():"#document"}function Q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ae(e){var t;return(t=(xn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xn(e){return rt()?e instanceof Node||e instanceof Q(e).Node:!1}function re(e){return rt()?e instanceof Element||e instanceof Q(e).Element:!1}function se(e){return rt()?e instanceof HTMLElement||e instanceof Q(e).HTMLElement:!1}function Gt(e){return!rt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Q(e).ShadowRoot}function Ve(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ce(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function or(e){return["table","td","th"].includes(Ie(e))}function ct(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function It(e){const t=Nt(),n=re(e)?ce(e):e;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function rr(e){let t=$e(e);for(;se(t)&&!Ae(t);){if(It(t))return t;if(ct(t))return null;t=$e(t)}return null}function Nt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ae(e){return["html","body","#document"].includes(Ie(e))}function ce(e){return Q(e).getComputedStyle(e)}function it(e){return re(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $e(e){if(Ie(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Gt(e)&&e.host||ae(e);return Gt(t)?t.host:t}function $n(e){const t=$e(e);return Ae(t)?e.ownerDocument?e.ownerDocument.body:e.body:se(t)&&Ve(t)?t:$n(t)}function He(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=$n(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),a=Q(r);if(i){const s=Ct(a);return t.concat(a,a.visualViewport||[],Ve(r)?r:[],s&&n?He(s):[])}return t.concat(r,He(r,[],n))}function Ct(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bn(e){const t=ce(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=se(e),i=r?e.offsetWidth:n,a=r?e.offsetHeight:o,s=Je(n)!==i||Je(o)!==a;return s&&(n=i,o=a),{width:n,height:o,$:s}}function Mt(e){return re(e)?e:e.contextElement}function Te(e){const t=Mt(e);if(!se(t))return ie(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=bn(t);let a=(i?Je(n.width):n.width)/o,s=(i?Je(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const cr=ie(0);function yn(e){const t=Q(e);return!Nt()||!t.visualViewport?cr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ir(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Q(e)?!1:t}function be(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=Mt(e);let a=ie(1);t&&(o?re(o)&&(a=Te(o)):a=Te(e));const s=ir(i,n,o)?yn(i):ie(0);let l=(r.left+s.x)/a.x,u=(r.top+s.y)/a.y,p=r.width/a.x,d=r.height/a.y;if(i){const x=Q(i),m=o&&re(o)?Q(o):o;let h=x,f=Ct(h);for(;f&&o&&m!==h;){const v=Te(f),g=f.getBoundingClientRect(),w=ce(f),$=g.left+(f.clientLeft+parseFloat(w.paddingLeft))*v.x,b=g.top+(f.clientTop+parseFloat(w.paddingTop))*v.y;l*=v.x,u*=v.y,p*=v.x,d*=v.y,l+=$,u+=b,h=Q(f),f=Ct(h)}}return tt({width:p,height:d,x:l,y:u})}function kt(e,t){const n=it(e).scrollLeft;return t?t.left+n:be(ae(e)).left+n}function En(e,t,n){n===void 0&&(n=!1);const o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-(n?0:kt(e,o)),i=o.top+t.scrollTop;return{x:r,y:i}}function sr(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",a=ae(o),s=t?ct(t.floating):!1;if(o===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},u=ie(1);const p=ie(0),d=se(o);if((d||!d&&!i)&&((Ie(o)!=="body"||Ve(a))&&(l=it(o)),se(o))){const m=be(o);u=Te(o),p.x=m.x+o.clientLeft,p.y=m.y+o.clientTop}const x=a&&!d&&!i?En(a,l,!0):ie(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+p.x+x.x,y:n.y*u.y-l.scrollTop*u.y+p.y+x.y}}function ar(e){return Array.from(e.getClientRects())}function lr(e){const t=ae(e),n=it(e),o=e.ownerDocument.body,r=G(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=G(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+kt(e);const s=-n.scrollTop;return ce(o).direction==="rtl"&&(a+=G(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:s}}function ur(e,t){const n=Q(e),o=ae(e),r=n.visualViewport;let i=o.clientWidth,a=o.clientHeight,s=0,l=0;if(r){i=r.width,a=r.height;const u=Nt();(!u||u&&t==="fixed")&&(s=r.offsetLeft,l=r.offsetTop)}return{width:i,height:a,x:s,y:l}}function dr(e,t){const n=be(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=se(e)?Te(e):ie(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=r*i.x,u=o*i.y;return{width:a,height:s,x:l,y:u}}function Qt(e,t,n){let o;if(t==="viewport")o=ur(e,n);else if(t==="document")o=lr(ae(e));else if(re(t))o=dr(t,n);else{const r=yn(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return tt(o)}function Sn(e,t){const n=$e(e);return n===t||!re(n)||Ae(n)?!1:ce(n).position==="fixed"||Sn(n,t)}function fr(e,t){const n=t.get(e);if(n)return n;let o=He(e,[],!1).filter(s=>re(s)&&Ie(s)!=="body"),r=null;const i=ce(e).position==="fixed";let a=i?$e(e):e;for(;re(a)&&!Ae(a);){const s=ce(a),l=It(a);!l&&s.position==="fixed"&&(r=null),(i?!l&&!r:!l&&s.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Ve(a)&&!l&&Sn(e,a))?o=o.filter(p=>p!==a):r=s,a=$e(a)}return t.set(e,o),o}function pr(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?ct(t)?[]:fr(t,this._c):[].concat(n),o],s=a[0],l=a.reduce((u,p)=>{const d=Qt(t,p,r);return u.top=G(d.top,u.top),u.right=xe(d.right,u.right),u.bottom=xe(d.bottom,u.bottom),u.left=G(d.left,u.left),u},Qt(t,s,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function mr(e){const{width:t,height:n}=bn(e);return{width:t,height:n}}function hr(e,t,n){const o=se(t),r=ae(t),i=n==="fixed",a=be(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=ie(0);function u(){l.x=kt(r)}if(o||!o&&!i)if((Ie(t)!=="body"||Ve(r))&&(s=it(t)),o){const m=be(t,!0,i,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else r&&u();i&&!o&&r&&u();const p=r&&!o&&!i?En(r,s):ie(0),d=a.left+s.scrollLeft-l.x-p.x,x=a.top+s.scrollTop-l.y-p.y;return{x:d,y:x,width:a.width,height:a.height}}function ht(e){return ce(e).position==="static"}function Jt(e,t){if(!se(e)||ce(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ae(e)===n&&(n=n.ownerDocument.body),n}function Cn(e,t){const n=Q(e);if(ct(e))return n;if(!se(e)){let r=$e(e);for(;r&&!Ae(r);){if(re(r)&&!ht(r))return r;r=$e(r)}return n}let o=Jt(e,t);for(;o&&or(o)&&ht(o);)o=Jt(o,t);return o&&Ae(o)&&ht(o)&&!It(o)?n:o||rr(e)||n}const vr=async function(e){const t=this.getOffsetParent||Cn,n=this.getDimensions,o=await n(e.floating);return{reference:hr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function gr(e){return ce(e).direction==="rtl"}const wr={convertOffsetParentRelativeRectToViewportRelativeRect:sr,getDocumentElement:ae,getClippingRect:pr,getOffsetParent:Cn,getElementRects:vr,getClientRects:ar,getDimensions:mr,getScale:Te,isElement:re,isRTL:gr};function Rn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xr(e,t){let n=null,o;const r=ae(e);function i(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:p,top:d,width:x,height:m}=u;if(s||t(),!x||!m)return;const h=Ue(d),f=Ue(r.clientWidth-(p+x)),v=Ue(r.clientHeight-(d+m)),g=Ue(p),$={rootMargin:-h+"px "+-f+"px "+-v+"px "+-g+"px",threshold:G(0,xe(1,l))||1};let b=!0;function y(R){const S=R[0].intersectionRatio;if(S!==l){if(!b)return a();S?a(!1,S):o=setTimeout(()=>{a(!1,1e-7)},1e3)}S===1&&!Rn(u,e.getBoundingClientRect())&&a(),b=!1}try{n=new IntersectionObserver(y,{...$,root:r.ownerDocument})}catch{n=new IntersectionObserver(y,$)}n.observe(e)}return a(!0),i}function $r(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=Mt(e),p=r||i?[...u?He(u):[],...He(t)]:[];p.forEach(g=>{r&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const d=u&&s?xr(u,n):null;let x=-1,m=null;a&&(m=new ResizeObserver(g=>{let[w]=g;w&&w.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var $;($=m)==null||$.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let h,f=l?be(e):null;l&&v();function v(){const g=be(e);f&&!Rn(f,g)&&n(),f=g,h=requestAnimationFrame(v)}return n(),()=>{var g;p.forEach(w=>{r&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),d==null||d(),(g=m)==null||g.disconnect(),m=null,l&&cancelAnimationFrame(h)}}const br=Jo,yr=er,Er=qo,Sr=nr,Cr=Go,en=Zo,Rr=tr,Pr=(e,t,n)=>{const o=new Map,r={platform:wr,...n},i={...r.platform,_c:o};return Xo(e,t,{...r,platform:i})};var qe=typeof document<"u"?c.useLayoutEffect:c.useEffect;function nt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!nt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!nt(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Pn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tn(e,t){const n=Pn(e);return Math.round(t*n)/n}function vt(e){const t=c.useRef(e);return qe(()=>{t.current=e}),t}function Tr(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[p,d]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[x,m]=c.useState(o);nt(x,o)||m(o);const[h,f]=c.useState(null),[v,g]=c.useState(null),w=c.useCallback(P=>{P!==R.current&&(R.current=P,f(P))},[]),$=c.useCallback(P=>{P!==S.current&&(S.current=P,g(P))},[]),b=i||h,y=a||v,R=c.useRef(null),S=c.useRef(null),E=c.useRef(p),A=l!=null,_=vt(l),I=vt(r),F=vt(u),D=c.useCallback(()=>{if(!R.current||!S.current)return;const P={placement:t,strategy:n,middleware:x};I.current&&(P.platform=I.current),Pr(R.current,S.current,P).then(B=>{const j={...B,isPositioned:F.current!==!1};W.current&&!nt(E.current,j)&&(E.current=j,ot.flushSync(()=>{d(j)}))})},[x,t,n,I,F]);qe(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(P=>({...P,isPositioned:!1})))},[u]);const W=c.useRef(!1);qe(()=>(W.current=!0,()=>{W.current=!1}),[]),qe(()=>{if(b&&(R.current=b),y&&(S.current=y),b&&y){if(_.current)return _.current(b,y,D);D()}},[b,y,D,_,A]);const T=c.useMemo(()=>({reference:R,floating:S,setReference:w,setFloating:$}),[w,$]),N=c.useMemo(()=>({reference:b,floating:y}),[b,y]),V=c.useMemo(()=>{const P={position:n,left:0,top:0};if(!N.floating)return P;const B=tn(N.floating,p.x),j=tn(N.floating,p.y);return s?{...P,transform:"translate("+B+"px, "+j+"px)",...Pn(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:j}},[n,s,N.floating,p.x,p.y]);return c.useMemo(()=>({...p,update:D,refs:T,elements:N,floatingStyles:V}),[p,D,T,N,V])}const Or=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?en({element:o.current,padding:r}).fn(n):{}:o?en({element:o,padding:r}).fn(n):{}}}},Ar=(e,t)=>({...br(e),options:[e,t]}),Dr=(e,t)=>({...yr(e),options:[e,t]}),_r=(e,t)=>({...Rr(e),options:[e,t]}),Ir=(e,t)=>({...Er(e),options:[e,t]}),Nr=(e,t)=>({...Sr(e),options:[e,t]}),Mr=(e,t)=>({...Cr(e),options:[e,t]}),kr=(e,t)=>({...Or(e),options:[e,t]});function Lr(e){const[t,n]=c.useState(void 0);return te(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}const Tn="Popper",[On,An]=Ot(Tn),[Fr,Dn]=On(Tn),Br=e=>{const{__scopePopper:t,children:n}=e,[o,r]=c.useState(null);return c.createElement(Fr,{scope:t,anchor:o,onAnchorChange:r},n)},Wr="PopperAnchor",Hr=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,i=Dn(Wr,n),a=c.useRef(null),s=K(t,a);return c.useEffect(()=>{i.onAnchorChange((o==null?void 0:o.current)||a.current)}),o?null:c.createElement(Z.div,O({},r,{ref:s}))}),_n="PopperContent",[Vr,Ii]=On(_n),jr=c.forwardRef((e,t)=>{var n,o,r,i,a,s,l,u;const{__scopePopper:p,side:d="bottom",sideOffset:x=0,align:m="center",alignOffset:h=0,arrowPadding:f=0,collisionBoundary:v=[],collisionPadding:g=0,sticky:w="partial",hideWhenDetached:$=!1,avoidCollisions:b=!0,onPlaced:y,...R}=e,S=Dn(_n,p),[E,A]=c.useState(null),_=K(t,X=>A(X)),[I,F]=c.useState(null),D=Lr(I),W=(n=D==null?void 0:D.width)!==null&&n!==void 0?n:0,T=(o=D==null?void 0:D.height)!==null&&o!==void 0?o:0,N=d+(m!=="center"?"-"+m:""),V=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},P=Array.isArray(v)?v:[v],B=P.length>0,j={padding:V,boundary:P.filter(Ur),altBoundary:B},{refs:me,floatingStyles:Se,placement:Me,isPositioned:ne,middlewareData:oe}=Tr({strategy:"fixed",placement:N,whileElementsMounted:$r,elements:{reference:S.anchor},middleware:[Ar({mainAxis:x+T,alignmentAxis:h}),b&&Dr({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?_r():void 0,...j}),b&&Ir({...j}),Nr({...j,apply:({elements:X,rects:ke,availableWidth:Le,availableHeight:Fe})=>{const{width:Gn,height:Qn}=ke.reference,je=X.floating.style;je.setProperty("--radix-popper-available-width",`${Le}px`),je.setProperty("--radix-popper-available-height",`${Fe}px`),je.setProperty("--radix-popper-anchor-width",`${Gn}px`),je.setProperty("--radix-popper-anchor-height",`${Qn}px`)}}),I&&kr({element:I,padding:f}),zr({arrowWidth:W,arrowHeight:T}),$&&Mr({strategy:"referenceHidden"})]}),[he,C]=In(Me),M=de(y);te(()=>{ne&&(M==null||M())},[ne,M]);const Y=(r=oe.arrow)===null||r===void 0?void 0:r.x,H=(i=oe.arrow)===null||i===void 0?void 0:i.y,k=((a=oe.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[L,q]=c.useState();return te(()=>{E&&q(window.getComputedStyle(E).zIndex)},[E]),c.createElement("div",{ref:me.setFloating,"data-radix-popper-content-wrapper":"",style:{...Se,transform:ne?Se.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:L,"--radix-popper-transform-origin":[(s=oe.transformOrigin)===null||s===void 0?void 0:s.x,(l=oe.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},c.createElement(Vr,{scope:p,placedSide:he,onArrowChange:F,arrowX:Y,arrowY:H,shouldHideArrow:k},c.createElement(Z.div,O({"data-side":he,"data-align":C},R,{ref:_,style:{...R.style,animation:ne?void 0:"none",opacity:(u=oe.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))});function Ur(e){return e!==null}const zr=e=>({name:"transformOrigin",options:e,fn(t){var n,o,r,i,a;const{placement:s,rects:l,middlewareData:u}=t,d=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,x=d?0:e.arrowWidth,m=d?0:e.arrowHeight,[h,f]=In(s),v={start:"0%",center:"50%",end:"100%"}[f],g=((o=(r=u.arrow)===null||r===void 0?void 0:r.x)!==null&&o!==void 0?o:0)+x/2,w=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+m/2;let $="",b="";return h==="bottom"?($=d?v:`${g}px`,b=`${-m}px`):h==="top"?($=d?v:`${g}px`,b=`${l.floating.height+m}px`):h==="right"?($=`${-m}px`,b=d?v:`${w}px`):h==="left"&&($=`${l.floating.width+m}px`,b=d?v:`${w}px`),{data:{x:$,y:b}}}});function In(e){const[t,n="center"]=e.split("-");return[t,n]}const Kr=Br,Yr=Hr,Xr=jr,Zr=c.forwardRef((e,t)=>{var n;const{container:o=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...r}=e;return o?no.createPortal(c.createElement(Z.div,O({},r,{ref:t})),o):null});function nn({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=qr({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:o,s=de(n),l=c.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else r(u)},[i,e,r,s]);return[a,l]}function qr({defaultProp:e,onChange:t}){const n=c.useState(e),[o]=n,r=c.useRef(o),i=de(t);return c.useEffect(()=>{r.current!==o&&(i(o),r.current=o)},[o,r,i]),n}function Gr(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Qr(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Jr(...e){return t=>e.forEach(n=>Qr(n,t))}const Nn=c.forwardRef((e,t)=>{const{children:n,...o}=e,r=c.Children.toArray(n),i=r.find(tc);if(i){const a=i.props.children,s=r.map(l=>l===i?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:l);return c.createElement(Rt,O({},o,{ref:t}),c.isValidElement(a)?c.cloneElement(a,void 0,s):null)}return c.createElement(Rt,O({},o,{ref:t}),n)});Nn.displayName="Slot";const Rt=c.forwardRef((e,t)=>{const{children:n,...o}=e;return c.isValidElement(n)?c.cloneElement(n,{...nc(o,n.props),ref:t?Jr(t,n.ref):n.ref}):c.Children.count(n)>1?c.Children.only(null):null});Rt.displayName="SlotClone";const ec=({children:e})=>c.createElement(c.Fragment,null,e);function tc(e){return c.isValidElement(e)&&e.type===ec}function nc(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...s)=>{i(...s),r(...s)}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}const oc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],rc=oc.reduce((e,t)=>{const n=c.forwardRef((o,r)=>{const{asChild:i,...a}=o,s=i?Nn:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(s,O({},a,{ref:r}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),cc=c.forwardRef((e,t)=>c.createElement(rc.span,O({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));var ic=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ce=new WeakMap,ze=new WeakMap,Ke={},gt=0,Mn=function(e){return e&&(e.host||Mn(e.parentNode))},sc=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Mn(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ac=function(e,t,n,o){var r=sc(t,Array.isArray(e)?e:[e]);Ke[n]||(Ke[n]=new WeakMap);var i=Ke[n],a=[],s=new Set,l=new Set(r),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};r.forEach(u);var p=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(x){if(s.has(x))p(x);else try{var m=x.getAttribute(o),h=m!==null&&m!=="false",f=(Ce.get(x)||0)+1,v=(i.get(x)||0)+1;Ce.set(x,f),i.set(x,v),a.push(x),f===1&&h&&ze.set(x,!0),v===1&&x.setAttribute(n,"true"),h||x.setAttribute(o,"true")}catch(g){console.error("aria-hidden: cannot operate on ",x,g)}})};return p(t),s.clear(),gt++,function(){a.forEach(function(d){var x=Ce.get(d)-1,m=i.get(d)-1;Ce.set(d,x),i.set(d,m),x||(ze.has(d)||d.removeAttribute(o),ze.delete(d)),m||d.removeAttribute(n)}),gt--,gt||(Ce=new WeakMap,Ce=new WeakMap,ze=new WeakMap,Ke={})}},lc=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=ic(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live]"))),ac(o,r,n,"aria-hidden")):function(){return null}},Ge="right-scroll-bar-position",Qe="width-before-scroll-bar",uc="with-scroll-bars-hidden",dc="--removed-body-scroll-bar-size";function wt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function fc(e,t){var n=c.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var pc=typeof window<"u"?c.useLayoutEffect:c.useEffect,on=new WeakMap;function mc(e,t){var n=fc(null,function(o){return e.forEach(function(r){return wt(r,o)})});return pc(function(){var o=on.get(n);if(o){var r=new Set(o),i=new Set(e),a=n.current;r.forEach(function(s){i.has(s)||wt(s,null)}),i.forEach(function(s){r.has(s)||wt(s,a)})}on.set(n,e)},[e]),n}function hc(e){return e}function vc(e,t){t===void 0&&(t=hc);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,o);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(o=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){o=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var l=function(){var p=a;a=[],p.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(p){a.push(p),u()},filter:function(p){return a=a.filter(p),n}}}};return r}function gc(e){e===void 0&&(e={});var t=vc(null);return t.options=ge({async:!0,ssr:!1},e),t}var kn=function(e){var t=e.sideCar,n=pn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return c.createElement(o,ge({},n))};kn.isSideCarExport=!0;function wc(e,t){return e.useMedium(t),kn}var Ln=gc(),xt=function(){},st=c.forwardRef(function(e,t){var n=c.useRef(null),o=c.useState({onScrollCapture:xt,onWheelCapture:xt,onTouchMoveCapture:xt}),r=o[0],i=o[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,p=e.enabled,d=e.shards,x=e.sideCar,m=e.noIsolation,h=e.inert,f=e.allowPinchZoom,v=e.as,g=v===void 0?"div":v,w=pn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),$=x,b=mc([n,t]),y=ge(ge({},w),r);return c.createElement(c.Fragment,null,p&&c.createElement($,{sideCar:Ln,removeScrollBar:u,shards:d,noIsolation:m,inert:h,setCallbacks:i,allowPinchZoom:!!f,lockRef:n}),a?c.cloneElement(c.Children.only(s),ge(ge({},y),{ref:b})):c.createElement(g,ge({},y,{className:l,ref:b}),s))});st.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};st.classNames={fullWidth:Qe,zeroRight:Ge};var xc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $c(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=xc();return t&&e.setAttribute("nonce",t),e}function bc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function yc(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ec=function(){var e=0,t=null;return{add:function(n){e==0&&(t=$c())&&(bc(t,n),yc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Sc=function(){var e=Ec();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Fn=function(){var e=Sc(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Cc={left:0,top:0,right:0,gap:0},$t=function(e){return parseInt(e||"",10)||0},Rc=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[$t(n),$t(o),$t(r)]},Pc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Cc;var t=Rc(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Tc=Fn(),Oe="data-scroll-locked",Oc=function(e,t,n,o){var r=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
-
.`.concat(uc,` {
|
|
3
|
-
overflow: hidden `).concat(o,`;
|
|
4
|
-
padding-right: `).concat(s,"px ").concat(o,`;
|
|
5
|
-
}
|
|
6
|
-
body[`).concat(Oe,`] {
|
|
7
|
-
overflow: hidden `).concat(o,`;
|
|
8
|
-
overscroll-behavior: contain;
|
|
9
|
-
`).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
|
|
10
|
-
padding-left: `.concat(r,`px;
|
|
11
|
-
padding-top: `).concat(i,`px;
|
|
12
|
-
padding-right: `).concat(a,`px;
|
|
13
|
-
margin-left:0;
|
|
14
|
-
margin-top:0;
|
|
15
|
-
margin-right: `).concat(s,"px ").concat(o,`;
|
|
16
|
-
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.`).concat(Ge,` {
|
|
20
|
-
right: `).concat(s,"px ").concat(o,`;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.`).concat(Qe,` {
|
|
24
|
-
margin-right: `).concat(s,"px ").concat(o,`;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.`).concat(Ge," .").concat(Ge,` {
|
|
28
|
-
right: 0 `).concat(o,`;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.`).concat(Qe," .").concat(Qe,` {
|
|
32
|
-
margin-right: 0 `).concat(o,`;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
body[`).concat(Oe,`] {
|
|
36
|
-
`).concat(dc,": ").concat(s,`px;
|
|
37
|
-
}
|
|
38
|
-
`)},rn=function(){var e=parseInt(document.body.getAttribute(Oe)||"0",10);return isFinite(e)?e:0},Ac=function(){c.useEffect(function(){return document.body.setAttribute(Oe,(rn()+1).toString()),function(){var e=rn()-1;e<=0?document.body.removeAttribute(Oe):document.body.setAttribute(Oe,e.toString())}},[])},Dc=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;Ac();var i=c.useMemo(function(){return Pc(r)},[r]);return c.createElement(Tc,{styles:Oc(i,!t,r,n?"":"!important")})},Pt=!1;if(typeof window<"u")try{var Ye=Object.defineProperty({},"passive",{get:function(){return Pt=!0,!0}});window.addEventListener("test",Ye,Ye),window.removeEventListener("test",Ye,Ye)}catch{Pt=!1}var Re=Pt?{passive:!1}:!1,_c=function(e){return e.tagName==="TEXTAREA"},Bn=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!_c(e)&&n[t]==="visible")},Ic=function(e){return Bn(e,"overflowY")},Nc=function(e){return Bn(e,"overflowX")},cn=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=Wn(e,n);if(o){var r=Hn(e,n),i=r[1],a=r[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Mc=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},kc=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},Wn=function(e,t){return e==="v"?Ic(t):Nc(t)},Hn=function(e,t){return e==="v"?Mc(t):kc(t)},Lc=function(e,t){return e==="h"&&t==="rtl"?-1:1},Fc=function(e,t,n,o,r){var i=Lc(e,window.getComputedStyle(t).direction),a=i*o,s=n.target,l=t.contains(s),u=!1,p=a>0,d=0,x=0;do{var m=Hn(e,s),h=m[0],f=m[1],v=m[2],g=f-v-i*h;(h||g)&&Wn(e,s)&&(d+=g,x+=h),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(p&&d===0||!p&&x===0)&&(u=!0),u},Xe=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},sn=function(e){return[e.deltaX,e.deltaY]},an=function(e){return e&&"current"in e?e.current:e},Bc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Wc=function(e){return`
|
|
39
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},Hc=0,Pe=[];function Vc(e){var t=c.useRef([]),n=c.useRef([0,0]),o=c.useRef(),r=c.useState(Hc++)[0],i=c.useState(function(){return Fn()})[0],a=c.useRef(e);c.useEffect(function(){a.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var f=to([e.lockRef.current],(e.shards||[]).map(an),!0).filter(Boolean);return f.forEach(function(v){return v.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),f.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var s=c.useCallback(function(f,v){if("touches"in f&&f.touches.length===2)return!a.current.allowPinchZoom;var g=Xe(f),w=n.current,$="deltaX"in f?f.deltaX:w[0]-g[0],b="deltaY"in f?f.deltaY:w[1]-g[1],y,R=f.target,S=Math.abs($)>Math.abs(b)?"h":"v";if("touches"in f&&S==="h"&&R.type==="range")return!1;var E=cn(S,R);if(!E)return!0;if(E?y=S:(y=S==="v"?"h":"v",E=cn(S,R)),!E)return!1;if(!o.current&&"changedTouches"in f&&($||b)&&(o.current=y),!y)return!0;var A=o.current||y;return Fc(A,v,f,A==="h"?$:b)},[]),l=c.useCallback(function(f){var v=f;if(!(!Pe.length||Pe[Pe.length-1]!==i)){var g="deltaY"in v?sn(v):Xe(v),w=t.current.filter(function(y){return y.name===v.type&&y.target===v.target&&Bc(y.delta,g)})[0];if(w&&w.should){v.cancelable&&v.preventDefault();return}if(!w){var $=(a.current.shards||[]).map(an).filter(Boolean).filter(function(y){return y.contains(v.target)}),b=$.length>0?s(v,$[0]):!a.current.noIsolation;b&&v.cancelable&&v.preventDefault()}}},[]),u=c.useCallback(function(f,v,g,w){var $={name:f,delta:v,target:g,should:w};t.current.push($),setTimeout(function(){t.current=t.current.filter(function(b){return b!==$})},1)},[]),p=c.useCallback(function(f){n.current=Xe(f),o.current=void 0},[]),d=c.useCallback(function(f){u(f.type,sn(f),f.target,s(f,e.lockRef.current))},[]),x=c.useCallback(function(f){u(f.type,Xe(f),f.target,s(f,e.lockRef.current))},[]);c.useEffect(function(){return Pe.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:x}),document.addEventListener("wheel",l,Re),document.addEventListener("touchmove",l,Re),document.addEventListener("touchstart",p,Re),function(){Pe=Pe.filter(function(f){return f!==i}),document.removeEventListener("wheel",l,Re),document.removeEventListener("touchmove",l,Re),document.removeEventListener("touchstart",p,Re)}},[]);var m=e.removeScrollBar,h=e.inert;return c.createElement(c.Fragment,null,h?c.createElement(i,{styles:Wc(r)}):null,m?c.createElement(Dc,{gapMode:"margin"}):null)}const jc=wc(Ln,Vc);var Vn=c.forwardRef(function(e,t){return c.createElement(st,ge({},e,{ref:t,sideCar:jc}))});Vn.classNames=st.classNames;const Uc=[" ","Enter","ArrowUp","ArrowDown"],zc=[" ","Enter"],at="Select",[lt,ut,Kc]=wo(at),[Ne,Ni]=Ot(at,[Kc,An]),Lt=An(),[Yc,ye]=Ne(at),[Xc,Zc]=Ne(at),qc=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:i,value:a,defaultValue:s,onValueChange:l,dir:u,name:p,autoComplete:d,disabled:x,required:m}=e,h=Lt(t),[f,v]=c.useState(null),[g,w]=c.useState(null),[$,b]=c.useState(!1),y=$o(u),[R=!1,S]=nn({prop:o,defaultProp:r,onChange:i}),[E,A]=nn({prop:a,defaultProp:s,onChange:l}),_=c.useRef(null),I=f?!!f.closest("form"):!0,[F,D]=c.useState(new Set),W=Array.from(F).map(T=>T.props.value).join(";");return c.createElement(Kr,h,c.createElement(Yc,{required:m,scope:t,trigger:f,onTriggerChange:v,valueNode:g,onValueNodeChange:w,valueNodeHasChildren:$,onValueNodeHasChildrenChange:b,contentId:gn(),value:E,onValueChange:A,open:R,onOpenChange:S,dir:y,triggerPointerDownPosRef:_,disabled:x},c.createElement(lt.Provider,{scope:t},c.createElement(Xc,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(T=>{D(N=>new Set(N).add(T))},[]),onNativeOptionRemove:c.useCallback(T=>{D(N=>{const V=new Set(N);return V.delete(T),V})},[])},n)),I?c.createElement(Kn,{key:W,"aria-hidden":!0,required:m,tabIndex:-1,name:p,autoComplete:d,value:E,onChange:T=>A(T.target.value),disabled:x},E===void 0?c.createElement("option",{value:""}):null,Array.from(F)):null))},Gc="SelectTrigger",Qc=c.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,i=Lt(n),a=ye(Gc,n),s=a.disabled||o,l=K(t,a.onTriggerChange),u=ut(n),[p,d,x]=Yn(h=>{const f=u().filter(w=>!w.disabled),v=f.find(w=>w.value===a.value),g=Xn(f,h,v);g!==void 0&&a.onValueChange(g.value)}),m=()=>{s||(a.onOpenChange(!0),x())};return c.createElement(Yr,O({asChild:!0},i),c.createElement(Z.button,O({type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":a.value===void 0?"":void 0},r,{ref:l,onClick:z(r.onClick,h=>{h.currentTarget.focus()}),onPointerDown:z(r.onPointerDown,h=>{const f=h.target;f.hasPointerCapture(h.pointerId)&&f.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&(m(),a.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)},h.preventDefault())}),onKeyDown:z(r.onKeyDown,h=>{const f=p.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&d(h.key),!(f&&h.key===" ")&&Uc.includes(h.key)&&(m(),h.preventDefault())})})))}),Jc="SelectValue",ei=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:i,placeholder:a,...s}=e,l=ye(Jc,n),{onValueNodeHasChildrenChange:u}=l,p=i!==void 0,d=K(t,l.onValueNodeChange);return te(()=>{u(p)},[u,p]),c.createElement(Z.span,O({},s,{ref:d,style:{pointerEvents:"none"}}),l.value===void 0&&a!==void 0?a:i)}),ti=c.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return c.createElement(Z.span,O({"aria-hidden":!0},r,{ref:t}),o||"▼")}),ni=e=>c.createElement(Zr,O({asChild:!0},e)),De="SelectContent",oi=c.forwardRef((e,t)=>{const n=ye(De,e.__scopeSelect),[o,r]=c.useState();if(te(()=>{r(new DocumentFragment)},[]),!n.open){const i=o;return i?ot.createPortal(c.createElement(jn,{scope:e.__scopeSelect},c.createElement(lt.Slot,{scope:e.__scopeSelect},c.createElement("div",null,e.children))),i):null}return c.createElement(ri,O({},e,{ref:t}))}),le=10,[jn,Ee]=Ne(De),ri=c.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:l,align:u,alignOffset:p,arrowPadding:d,collisionBoundary:x,collisionPadding:m,sticky:h,hideWhenDetached:f,avoidCollisions:v,...g}=e,w=ye(De,n),[$,b]=c.useState(null),[y,R]=c.useState(null),S=K(t,C=>b(C)),[E,A]=c.useState(null),[_,I]=c.useState(null),F=ut(n),[D,W]=c.useState(!1),T=c.useRef(!1);c.useEffect(()=>{if($)return lc($)},[$]),Ao();const N=c.useCallback(C=>{const[M,...Y]=F().map(L=>L.ref.current),[H]=Y.slice(-1),k=document.activeElement;for(const L of C)if(L===k||(L==null||L.scrollIntoView({block:"nearest"}),L===M&&y&&(y.scrollTop=0),L===H&&y&&(y.scrollTop=y.scrollHeight),L==null||L.focus(),document.activeElement!==k))return},[F,y]),V=c.useCallback(()=>N([E,$]),[N,E,$]);c.useEffect(()=>{D&&V()},[D,V]);const{onOpenChange:P,triggerPointerDownPosRef:B}=w;c.useEffect(()=>{if($){let C={x:0,y:0};const M=H=>{var k,L,q,X;C={x:Math.abs(Math.round(H.pageX)-((k=(L=B.current)===null||L===void 0?void 0:L.x)!==null&&k!==void 0?k:0)),y:Math.abs(Math.round(H.pageY)-((q=(X=B.current)===null||X===void 0?void 0:X.y)!==null&&q!==void 0?q:0))}},Y=H=>{C.x<=10&&C.y<=10?H.preventDefault():$.contains(H.target)||P(!1),document.removeEventListener("pointermove",M),B.current=null};return B.current!==null&&(document.addEventListener("pointermove",M),document.addEventListener("pointerup",Y,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",M),document.removeEventListener("pointerup",Y,{capture:!0})}}},[$,P,B]),c.useEffect(()=>{const C=()=>P(!1);return window.addEventListener("blur",C),window.addEventListener("resize",C),()=>{window.removeEventListener("blur",C),window.removeEventListener("resize",C)}},[P]);const[j,me]=Yn(C=>{const M=F().filter(k=>!k.disabled),Y=M.find(k=>k.ref.current===document.activeElement),H=Xn(M,C,Y);H&&setTimeout(()=>H.ref.current.focus())}),Se=c.useCallback((C,M,Y)=>{const H=!T.current&&!Y;(w.value!==void 0&&w.value===M||H)&&(A(C),H&&(T.current=!0))},[w.value]),Me=c.useCallback(()=>$==null?void 0:$.focus(),[$]),ne=c.useCallback((C,M,Y)=>{const H=!T.current&&!Y;(w.value!==void 0&&w.value===M||H)&&I(C)},[w.value]),oe=o==="popper"?ln:ci,he=oe===ln?{side:s,sideOffset:l,align:u,alignOffset:p,arrowPadding:d,collisionBoundary:x,collisionPadding:m,sticky:h,hideWhenDetached:f,avoidCollisions:v}:{};return c.createElement(jn,{scope:n,content:$,viewport:y,onViewportChange:R,itemRefCallback:Se,selectedItem:E,onItemLeave:Me,itemTextRefCallback:ne,focusSelectedItem:V,selectedItemText:_,position:o,isPositioned:D,searchRef:j},c.createElement(Vn,{as:Be,allowPinchZoom:!0},c.createElement(Do,{asChild:!0,trapped:w.open,onMountAutoFocus:C=>{C.preventDefault()},onUnmountAutoFocus:z(r,C=>{var M;(M=w.trigger)===null||M===void 0||M.focus({preventScroll:!0}),C.preventDefault()})},c.createElement(Po,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:C=>C.preventDefault(),onDismiss:()=>w.onOpenChange(!1)},c.createElement(oe,O({role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:C=>C.preventDefault()},g,he,{onPlaced:()=>W(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:z(g.onKeyDown,C=>{const M=C.ctrlKey||C.altKey||C.metaKey;if(C.key==="Tab"&&C.preventDefault(),!M&&C.key.length===1&&me(C.key),["ArrowUp","ArrowDown","Home","End"].includes(C.key)){let H=F().filter(k=>!k.disabled).map(k=>k.ref.current);if(["ArrowUp","End"].includes(C.key)&&(H=H.slice().reverse()),["ArrowUp","ArrowDown"].includes(C.key)){const k=C.target,L=H.indexOf(k);H=H.slice(L+1)}setTimeout(()=>N(H)),C.preventDefault()}})}))))))}),ci=c.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,i=ye(De,n),a=Ee(De,n),[s,l]=c.useState(null),[u,p]=c.useState(null),d=K(t,S=>p(S)),x=ut(n),m=c.useRef(!1),h=c.useRef(!0),{viewport:f,selectedItem:v,selectedItemText:g,focusSelectedItem:w}=a,$=c.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&f&&v&&g){const S=i.trigger.getBoundingClientRect(),E=u.getBoundingClientRect(),A=i.valueNode.getBoundingClientRect(),_=g.getBoundingClientRect();if(i.dir!=="rtl"){const k=_.left-E.left,L=A.left-k,q=S.left-L,X=S.width+q,ke=Math.max(X,E.width),Le=window.innerWidth-le,Fe=Wt(L,[le,Le-ke]);s.style.minWidth=X+"px",s.style.left=Fe+"px"}else{const k=E.right-_.right,L=window.innerWidth-A.right-k,q=window.innerWidth-S.right-L,X=S.width+q,ke=Math.max(X,E.width),Le=window.innerWidth-le,Fe=Wt(L,[le,Le-ke]);s.style.minWidth=X+"px",s.style.right=Fe+"px"}const I=x(),F=window.innerHeight-le*2,D=f.scrollHeight,W=window.getComputedStyle(u),T=parseInt(W.borderTopWidth,10),N=parseInt(W.paddingTop,10),V=parseInt(W.borderBottomWidth,10),P=parseInt(W.paddingBottom,10),B=T+N+D+P+V,j=Math.min(v.offsetHeight*5,B),me=window.getComputedStyle(f),Se=parseInt(me.paddingTop,10),Me=parseInt(me.paddingBottom,10),ne=S.top+S.height/2-le,oe=F-ne,he=v.offsetHeight/2,C=v.offsetTop+he,M=T+N+C,Y=B-M;if(M<=ne){const k=v===I[I.length-1].ref.current;s.style.bottom="0px";const L=u.clientHeight-f.offsetTop-f.offsetHeight,q=Math.max(oe,he+(k?Me:0)+L+V),X=M+q;s.style.height=X+"px"}else{const k=v===I[0].ref.current;s.style.top="0px";const q=Math.max(ne,T+f.offsetTop+(k?Se:0)+he)+Y;s.style.height=q+"px",f.scrollTop=M-ne+f.offsetTop}s.style.margin=`${le}px 0`,s.style.minHeight=j+"px",s.style.maxHeight=F+"px",o==null||o(),requestAnimationFrame(()=>m.current=!0)}},[x,i.trigger,i.valueNode,s,u,f,v,g,i.dir,o]);te(()=>$(),[$]);const[b,y]=c.useState();te(()=>{u&&y(window.getComputedStyle(u).zIndex)},[u]);const R=c.useCallback(S=>{S&&h.current===!0&&($(),w==null||w(),h.current=!1)},[$,w]);return c.createElement(ii,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:m,onScrollButtonChange:R},c.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b}},c.createElement(Z.div,O({},r,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}}))))}),ln=c.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=le,...i}=e,a=Lt(n);return c.createElement(Xr,O({},a,i,{ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[ii,Ft]=Ne(De,{}),un="SelectViewport",si=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Ee(un,n),i=Ft(un,n),a=K(t,r.onViewportChange),s=c.useRef(0);return c.createElement(c.Fragment,null,c.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),c.createElement(lt.Slot,{scope:n},c.createElement(Z.div,O({"data-radix-select-viewport":"",role:"presentation"},o,{ref:a,style:{position:"relative",flex:1,overflow:"auto",...o.style},onScroll:z(o.onScroll,l=>{const u=l.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:d}=i;if(d!=null&&d.current&&p){const x=Math.abs(s.current-u.scrollTop);if(x>0){const m=window.innerHeight-le*2,h=parseFloat(p.style.minHeight),f=parseFloat(p.style.height),v=Math.max(h,f);if(v<m){const g=v+x,w=Math.min(m,g),$=g-w;p.style.height=w+"px",p.style.bottom==="0px"&&(u.scrollTop=$>0?$:0,p.style.justifyContent="flex-end")}}}s.current=u.scrollTop})}))))}),ai="SelectGroup",[Mi,ki]=Ne(ai),Tt="SelectItem",[li,Un]=Ne(Tt),ui=c.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:i,...a}=e,s=ye(Tt,n),l=Ee(Tt,n),u=s.value===o,[p,d]=c.useState(i??""),[x,m]=c.useState(!1),h=K(t,g=>{var w;return(w=l.itemRefCallback)===null||w===void 0?void 0:w.call(l,g,o,r)}),f=gn(),v=()=>{r||(s.onValueChange(o),s.onOpenChange(!1))};return c.createElement(li,{scope:n,value:o,disabled:r,textId:f,isSelected:u,onItemTextChange:c.useCallback(g=>{d(w=>{var $;return w||(($=g==null?void 0:g.textContent)!==null&&$!==void 0?$:"").trim()})},[])},c.createElement(lt.ItemSlot,{scope:n,value:o,disabled:r,textValue:p},c.createElement(Z.div,O({role:"option","aria-labelledby":f,"data-highlighted":x?"":void 0,"aria-selected":u&&x,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1},a,{ref:h,onFocus:z(a.onFocus,()=>m(!0)),onBlur:z(a.onBlur,()=>m(!1)),onPointerUp:z(a.onPointerUp,v),onPointerMove:z(a.onPointerMove,g=>{if(r){var w;(w=l.onItemLeave)===null||w===void 0||w.call(l)}else g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:z(a.onPointerLeave,g=>{if(g.currentTarget===document.activeElement){var w;(w=l.onItemLeave)===null||w===void 0||w.call(l)}}),onKeyDown:z(a.onKeyDown,g=>{var w;((w=l.searchRef)===null||w===void 0?void 0:w.current)!==""&&g.key===" "||(zc.includes(g.key)&&v(),g.key===" "&&g.preventDefault())})}))))}),Ze="SelectItemText",di=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...i}=e,a=ye(Ze,n),s=Ee(Ze,n),l=Un(Ze,n),u=Zc(Ze,n),[p,d]=c.useState(null),x=K(t,g=>d(g),l.onItemTextChange,g=>{var w;return(w=s.itemTextRefCallback)===null||w===void 0?void 0:w.call(s,g,l.value,l.disabled)}),m=p==null?void 0:p.textContent,h=c.useMemo(()=>c.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},m),[l.disabled,l.value,m]),{onNativeOptionAdd:f,onNativeOptionRemove:v}=u;return te(()=>(f(h),()=>v(h)),[f,v,h]),c.createElement(c.Fragment,null,c.createElement(Z.span,O({id:l.textId},i,{ref:x})),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?ot.createPortal(i.children,a.valueNode):null)}),fi="SelectItemIndicator",pi=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return Un(fi,n).isSelected?c.createElement(Z.span,O({"aria-hidden":!0},o,{ref:t})):null}),dn="SelectScrollUpButton",mi=c.forwardRef((e,t)=>{const n=Ee(dn,e.__scopeSelect),o=Ft(dn,e.__scopeSelect),[r,i]=c.useState(!1),a=K(t,o.onScrollButtonChange);return te(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=s.scrollTop>0;i(u)};const s=n.viewport;return l(),s.addEventListener("scroll",l),()=>s.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),r?c.createElement(zn,O({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}})):null}),fn="SelectScrollDownButton",hi=c.forwardRef((e,t)=>{const n=Ee(fn,e.__scopeSelect),o=Ft(fn,e.__scopeSelect),[r,i]=c.useState(!1),a=K(t,o.onScrollButtonChange);return te(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=s.scrollHeight-s.clientHeight,p=Math.ceil(s.scrollTop)<u;i(p)};const s=n.viewport;return l(),s.addEventListener("scroll",l),()=>s.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),r?c.createElement(zn,O({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}})):null}),zn=c.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,i=Ee("SelectScrollButton",n),a=c.useRef(null),s=ut(n),l=c.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return c.useEffect(()=>()=>l(),[l]),te(()=>{var u;const p=s().find(d=>d.ref.current===document.activeElement);p==null||(u=p.ref.current)===null||u===void 0||u.scrollIntoView({block:"nearest"})},[s]),c.createElement(Z.div,O({"aria-hidden":!0},r,{ref:t,style:{flexShrink:0,...r.style},onPointerDown:z(r.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(o,50))}),onPointerMove:z(r.onPointerMove,()=>{var u;(u=i.onItemLeave)===null||u===void 0||u.call(i),a.current===null&&(a.current=window.setInterval(o,50))}),onPointerLeave:z(r.onPointerLeave,()=>{l()})}))}),Kn=c.forwardRef((e,t)=>{const{value:n,...o}=e,r=c.useRef(null),i=K(t,r),a=Gr(n);return c.useEffect(()=>{const s=r.current,l=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==n&&p){const d=new Event("change",{bubbles:!0});p.call(s,n),s.dispatchEvent(d)}},[a,n]),c.createElement(cc,{asChild:!0},c.createElement("select",O({},o,{ref:i,defaultValue:n})))});Kn.displayName="BubbleSelect";function Yn(e){const t=de(e),n=c.useRef(""),o=c.useRef(0),r=c.useCallback(a=>{const s=n.current+a;t(s),function l(u){n.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>l(""),1e3))}(s)},[t]),i=c.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,i]}function Xn(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=vi(e,Math.max(i,0));r.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function vi(e,t){return e.map((n,o)=>e[(t+o)%e.length])}const gi=qc,wi=Qc,xi=ei,$i=ti,bi=ni,yi=oi,Ei=si,Si=ui,Ci=di,Ri=pi,Pi=mi,Ti=hi,Oi=J.forwardRef(function({list:t=[],required:n=!1,disabled:o=!1,autoFocus:r=!1,size:i=ee.md,name:a,value:s="default",className:l,onChange:u},p){const d=t.find(x=>x.value===s)??t[0]??{value:s};return o=o||t.length<2,U.jsxs(gi,{name:a,value:d.value,disabled:o,required:n,onValueChange:u,children:[U.jsxs(wi,{ref:p,className:we(l,o&&"opacity-50 cursor-not-allowed"),autoFocus:r,children:[U.jsx(xi,{}),U.jsx($i,{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-1",children:U.jsx(ao,{className:"w-4","aria-hidden":"true"})})]}),U.jsx(bi,{className:"z-50",children:U.jsxs(yi,{className:we("overflow-auto rounded-md bg-theme p-1 shadow-2xl border-2 border-neutral-200 dark:border-neutral-700 ring-opacity-5 focus:outline-none",i===ee.sm&&"text-xs",i===ee.md&&"text-sm",i===ee.lg&&"text-sm"),children:[U.jsx(Pi,{className:"flex items-center justify-center h-3 cursor-default",children:U.jsx(uo,{className:"w-4","aria-hidden":"true"})}),U.jsx(Ei,{className:"p-1",children:t.map(({text:x,value:m})=>U.jsx(Ai,{value:m,children:x},m))}),U.jsx(Ti,{className:"flex items-center justify-center h-3 cursor-default",children:U.jsx(io,{className:"w-4","aria-hidden":"true"})})]})})]})});function Ai({disabled:e=!1,value:t,children:n,className:o}){return U.jsxs(Si,{value:t,className:we("leading-none rounded-md flex items-center h-[25px] pr-[35px] pl-[25px] relative select-none data-[disabled]:pointer-events-none data-[highlighted]:outline-none data-[highlighted]:bg-brand-500 data-[highlighted]:text-brand-100",e&&"opacity-50 cursor-not-allowed",o),children:[U.jsx(Ci,{children:n}),U.jsx(Ri,{className:"absolute left-0 w-4 inline-flex items-center justify-center",children:U.jsx(ro,{})})]})}function dt({label:e,info:t,size:n=ee.md,className:o,children:r,disabled:i=!1,required:a=!1,autoFocus:s=!1}){const l=we("text-left relative block bg-theme-lighter border-neutral-200 dark:border-neutral-700","focus:outline-none focus:border-secondary-500","ring-secondary-300 ring-opacity-60 ring-offset ring-offset-secondary-100",n===ee.sm&&"px-2 py-0.5 text-xs leading-4 border-2 focus:ring-2 rounded-[0.25rem] min-w-[7rem]",n===ee.md&&"px-3 py-2 text-sm leading-4 border-2 focus:ring-4 rounded-md min-w-[10rem]",n===ee.lg&&"px-3 py-2 text-sm leading-6 border-2 focus:ring-4 rounded-md min-w-[10rem]");return U.jsxs("div",{className:we("inline-block relative m-1 text-left",i&&"opacity-50 cursor-not-allowed",o),children:[Bt(e)&&U.jsx(Zn,{size:n,children:e}),typeof r=="function"?r({disabled:i,required:a,autoFocus:s,size:n,className:l}):r,Bt(t)&&U.jsx(qn,{children:t})]})}function Zn({htmlFor:e,className:t,children:n,size:o=ee.md}){return U.jsx("label",{htmlFor:e,className:we("block mb-1 px-2 text-sm whitespace-nowrap",o===ee.sm&&"text-xs",o===ee.md&&"text-sm",o===ee.lg&&"text-md",t),children:n})}function qn({className:e,children:t}){return U.jsx("small",{className:we("block text-xs mt-1 px-3 text-neutral-400 dark:text-neutral-600",e),children:t})}dt.Label=Zn;dt.Info=qn;dt.Textfield=fo;dt.Selector=Oi;export{ao as F,dt as I,Dc as R,O as _,Nr as a,kr as b,$r as c,gc as d,mc as e,Ir as f,Qe as g,Mr as h,Fn as i,wc as j,lc as k,_r as l,uo as m,io as n,Ar as o,ro as p,Dr as s,Tr as u,Ge as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as u,U as c,a as n,w as a,j as s,e as f}from"./index-KZcJd7F1.js";import{L as g}from"./context-DhymIb_N.js";import x from"./ModelLineage-Bnes5PV4.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./index-BdXOfeCo.js";import"./Input-CYm3h-zG.js";import"./editor-Bf9rhumO.js";import"./file-CcK5Oobc.js";import"./project-CjyecwCx.js";import"./help-6Q7f7fjd.js";import"./SourceList-Chz492Ne.js";import"./index-CLuHMKlN.js";import"./transition-C8EjNcgL.js";import"./ListboxShow-CwgOYGSe.js";import"./SearchList-9n_6_E0k.js";function S(){const l=u(),{modelName:t}=c(),i=n(e=>e.models),o=n(e=>e.lastSelectedModel),r=a(t)||t===(o==null?void 0:o.name)?o:i.get(encodeURI(t));function d(e){const m=i.get(e);a(m)||l(f.LineageModels+"/"+m.name)}function p(e){console.log(e==null?void 0:e.message)}return s.jsx("div",{className:"flex overflow-hidden w-full h-full",children:s.jsx(g,{showColumns:!0,handleClickModel:d,handleError:p,children:s.jsx(x,{model:r})})})}export{S as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as u,R as Q,j as S,b as Oe,c as _}from"./index-KZcJd7F1.js";import{R as oe,i as P,o as f,U as E,y as k,u as F,r as Se,J as Le,K as we,p as H,H as Ie,k as q,b as Te,F as De,c as $e,C,I as V,h as X,j as Fe,G as Pe,z as g,A as Ee,T as ke,x as ee,P as Ce,D as je}from"./transition-C8EjNcgL.js";import{n as Ne,p as Ae}from"./Input-CYm3h-zG.js";function Me({title:e,titleId:r,...t},o){return u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":r},t),e?u.createElement("title",{id:r},e):null,u.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"}))}const Be=u.forwardRef(Me);function ae(e,r){let[t,o]=u.useState(e),a=oe(e);return P(()=>o(a.current),[a,o,...r]),t}function Ue(e,r,t){let[o,a]=u.useState(t),n=e!==void 0,l=u.useRef(n),s=u.useRef(!1),p=u.useRef(!1);return n&&!l.current&&!s.current?(s.current=!0,l.current=n,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!n&&l.current&&!p.current&&(p.current=!0,l.current=n,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[n?e:o,f(v=>(n||a(v),r==null?void 0:r(v)))]}function te(e){return[e.screenX,e.screenY]}function Qe(){let e=u.useRef([-1,-1]);return{wasMoved(r){let t=te(r);return e.current[0]===t[0]&&e.current[1]===t[1]?!1:(e.current=t,!0)},update(r){e.current=te(r)}}}function ze(e){throw new Error("Unexpected object: "+e)}var L=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(L||{});function He(e,r){let t=r.resolveItems();if(t.length<=0)return null;let o=r.resolveActiveIndex(),a=o??-1;switch(e.focus){case 0:{for(let n=0;n<t.length;++n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 1:{for(let n=a-1;n>=0;--n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 2:{for(let n=a+1;n<t.length;++n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 3:{for(let n=t.length-1;n>=0;--n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 4:{for(let n=0;n<t.length;++n)if(r.resolveId(t[n],n,t)===e.id)return n;return o}case 5:return null;default:ze(e)}}function le(e={},r=null,t=[]){for(let[o,a]of Object.entries(e))se(t,ie(r,o),a);return t}function ie(e,r){return e?e+"["+r+"]":r}function se(e,r,t){if(Array.isArray(t))for(let[o,a]of t.entries())se(e,ie(r,o.toString()),a);else t instanceof Date?e.push([r,t.toISOString()]):typeof t=="boolean"?e.push([r,t?"1":"0"]):typeof t=="string"?e.push([r,t]):typeof t=="number"?e.push([r,`${t}`]):t==null?e.push([r,""]):le(t,r,e)}function gt(e){var r,t;let o=(r=e==null?void 0:e.form)!=null?r:e.closest("form");if(o){for(let a of o.elements)if(a!==e&&(a.tagName==="INPUT"&&a.type==="submit"||a.tagName==="BUTTON"&&a.type==="submit"||a.nodeName==="INPUT"&&a.type==="image")){a.click();return}(t=o.requestSubmit)==null||t.call(o)}}let re=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function ne(e){var r,t;let o=(r=e.innerText)!=null?r:"",a=e.cloneNode(!0);if(!(a instanceof HTMLElement))return o;let n=!1;for(let s of a.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),n=!0;let l=n?(t=a.innerText)!=null?t:"":o;return re.test(l)&&(l=l.replace(re,"")),l}function qe(e){let r=e.getAttribute("aria-label");if(typeof r=="string")return r.trim();let t=e.getAttribute("aria-labelledby");if(t){let o=t.split(" ").map(a=>{let n=document.getElementById(a);if(n){let l=n.getAttribute("aria-label");return typeof l=="string"?l.trim():ne(n).trim()}return null}).filter(Boolean);if(o.length>0)return o.join(", ")}return ne(e).trim()}function Ve(e){let r=u.useRef(""),t=u.useRef("");return f(()=>{let o=e.current;if(!o)return"";let a=o.innerText;if(r.current===a)return t.current;let n=qe(o).trim().toLowerCase();return r.current=a,t.current=n,n})}var Ge=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ge||{}),Ke=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Ke||{}),We=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(We||{}),Xe=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.RegisterLabel=7]="RegisterLabel",e))(Xe||{});function W(e,r=t=>t){let t=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,o=Ce(r(e.options.slice()),n=>n.dataRef.current.domRef.current),a=t?o.indexOf(t):null;return a===-1&&(a=null),{options:o,activeOptionIndex:a}}let Ze={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let r=e.activeOptionIndex,{isSelected:t}=e.dataRef.current,o=e.options.findIndex(a=>t(a.dataRef.current.value));return o!==-1&&(r=o),{...e,listboxState:0,activeOptionIndex:r}},2(e,r){var t;if(e.dataRef.current.disabled||e.listboxState===1)return e;let o=W(e),a=He(r,{resolveItems:()=>o.options,resolveActiveIndex:()=>o.activeOptionIndex,resolveId:n=>n.id,resolveDisabled:n=>n.dataRef.current.disabled});return{...e,...o,searchQuery:"",activeOptionIndex:a,activationTrigger:(t=r.trigger)!=null?t:1}},3:(e,r)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let t=e.searchQuery!==""?0:1,o=e.searchQuery+r.value.toLowerCase(),a=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+t).concat(e.options.slice(0,e.activeOptionIndex+t)):e.options).find(l=>{var s;return!l.dataRef.current.disabled&&((s=l.dataRef.current.textValue)==null?void 0:s.startsWith(o))}),n=a?e.options.indexOf(a):-1;return n===-1||n===e.activeOptionIndex?{...e,searchQuery:o}:{...e,searchQuery:o,activeOptionIndex:n,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,r)=>{let t={id:r.id,dataRef:r.dataRef},o=W(e,a=>[...a,t]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(r.dataRef.current.value)&&(o.activeOptionIndex=o.options.indexOf(t)),{...e,...o}},6:(e,r)=>{let t=W(e,o=>{let a=o.findIndex(n=>n.id===r.id);return a!==-1&&o.splice(a,1),o});return{...e,...t,activationTrigger:1}},7:(e,r)=>({...e,labelId:r.id})},Z=u.createContext(null);Z.displayName="ListboxActionsContext";function j(e){let r=u.useContext(Z);if(r===null){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,j),t}return r}let J=u.createContext(null);J.displayName="ListboxDataContext";function N(e){let r=u.useContext(J);if(r===null){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,N),t}return r}function Je(e,r){return F(r.type,Ze,e,r)}let Ye=u.Fragment;function _e(e,r){let{value:t,defaultValue:o,form:a,name:n,onChange:l,by:s=(c,d)=>c===d,disabled:p=!1,horizontal:v=!1,multiple:h=!1,...I}=e;const $=v?"horizontal":"vertical";let T=k(r),[R=h?[]:void 0,w]=Ue(t,l,o),[x,i]=u.useReducer(Je,{dataRef:u.createRef(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),m=u.useRef({static:!1,hold:!1}),A=u.useRef(null),M=u.useRef(null),G=u.useRef(null),y=f(typeof s=="string"?(c,d)=>{let O=s;return(c==null?void 0:c[O])===(d==null?void 0:d[O])}:s),D=u.useCallback(c=>F(b.mode,{1:()=>R.some(d=>y(d,c)),0:()=>y(R,c)}),[R]),b=u.useMemo(()=>({...x,value:R,disabled:p,mode:h?1:0,orientation:$,compare:y,isSelected:D,optionsPropsRef:m,labelRef:A,buttonRef:M,optionsRef:G}),[R,p,h,x]);P(()=>{x.dataRef.current=b},[b]),Se([b.buttonRef,b.optionsRef],(c,d)=>{var O;i({type:1}),Le(d,we.Loose)||(c.preventDefault(),(O=b.buttonRef.current)==null||O.focus())},b.listboxState===0);let ue=u.useMemo(()=>({open:b.listboxState===0,disabled:p,value:R}),[b,p,R]),ce=f(c=>{let d=b.options.find(O=>O.id===c);d&&K(d.dataRef.current.value)}),de=f(()=>{if(b.activeOptionIndex!==null){let{dataRef:c,id:d}=b.options[b.activeOptionIndex];K(c.current.value),i({type:2,focus:L.Specific,id:d})}}),fe=f(()=>i({type:0})),pe=f(()=>i({type:1})),be=f((c,d,O)=>c===L.Specific?i({type:2,focus:L.Specific,id:d,trigger:O}):i({type:2,focus:c,trigger:O})),ve=f((c,d)=>(i({type:5,id:c,dataRef:d}),()=>i({type:6,id:c}))),xe=f(c=>(i({type:7,id:c}),()=>i({type:7,id:null}))),K=f(c=>F(b.mode,{0(){return w==null?void 0:w(c)},1(){let d=b.value.slice(),O=d.findIndex(U=>y(U,c));return O===-1?d.push(c):d.splice(O,1),w==null?void 0:w(d)}})),me=f(c=>i({type:3,value:c})),ge=f(()=>i({type:4})),he=u.useMemo(()=>({onChange:K,registerOption:ve,registerLabel:xe,goToOption:be,closeListbox:pe,openListbox:fe,selectActiveOption:de,selectOption:ce,search:me,clearSearch:ge}),[]),Re={ref:T},B=u.useRef(null),ye=H();return u.useEffect(()=>{B.current&&o!==void 0&&ye.addEventListener(B.current,"reset",()=>{w==null||w(o)})},[B,w]),Q.createElement(Z.Provider,{value:he},Q.createElement(J.Provider,{value:b},Q.createElement(Ie,{value:F(b.listboxState,{0:q.Open,1:q.Closed})},n!=null&&R!=null&&le({[n]:R}).map(([c,d],O)=>Q.createElement(Te,{features:$e.Hidden,ref:O===0?U=>{var Y;B.current=(Y=U==null?void 0:U.closest("form"))!=null?Y:null}:void 0,...De({key:c,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:a,disabled:p,name:c,value:d})})),C({ourProps:Re,theirProps:I,slot:ue,defaultTag:Ye,name:"Listbox"}))))}let et="button";function tt(e,r){var t;let o=V(),{id:a=`headlessui-listbox-button-${o}`,...n}=e,l=N("Listbox.Button"),s=j("Listbox.Button"),p=k(l.buttonRef,r),v=H(),h=f(x=>{switch(x.key){case g.Space:case g.Enter:case g.ArrowDown:x.preventDefault(),s.openListbox(),v.nextFrame(()=>{l.value||s.goToOption(L.First)});break;case g.ArrowUp:x.preventDefault(),s.openListbox(),v.nextFrame(()=>{l.value||s.goToOption(L.Last)});break}}),I=f(x=>{switch(x.key){case g.Space:x.preventDefault();break}}),$=f(x=>{if(Ee(x.currentTarget))return x.preventDefault();l.listboxState===0?(s.closeListbox(),v.nextFrame(()=>{var i;return(i=l.buttonRef.current)==null?void 0:i.focus({preventScroll:!0})})):(x.preventDefault(),s.openListbox())}),T=ae(()=>{if(l.labelId)return[l.labelId,a].join(" ")},[l.labelId,a]),R=u.useMemo(()=>({open:l.listboxState===0,disabled:l.disabled,value:l.value}),[l]),w={ref:p,id:a,type:ke(e,l.buttonRef),"aria-haspopup":"listbox","aria-controls":(t=l.optionsRef.current)==null?void 0:t.id,"aria-expanded":l.listboxState===0,"aria-labelledby":T,disabled:l.disabled,onKeyDown:h,onKeyUp:I,onClick:$};return C({ourProps:w,theirProps:n,slot:R,defaultTag:et,name:"Listbox.Button"})}let rt="label";function nt(e,r){let t=V(),{id:o=`headlessui-listbox-label-${t}`,...a}=e,n=N("Listbox.Label"),l=j("Listbox.Label"),s=k(n.labelRef,r);P(()=>l.registerLabel(o),[o]);let p=f(()=>{var h;return(h=n.buttonRef.current)==null?void 0:h.focus({preventScroll:!0})}),v=u.useMemo(()=>({open:n.listboxState===0,disabled:n.disabled}),[n]);return C({ourProps:{ref:s,id:o,onClick:p},theirProps:a,slot:v,defaultTag:rt,name:"Listbox.Label"})}let ot="ul",at=ee.RenderStrategy|ee.Static;function lt(e,r){var t;let o=V(),{id:a=`headlessui-listbox-options-${o}`,...n}=e,l=N("Listbox.Options"),s=j("Listbox.Options"),p=k(l.optionsRef,r),v=H(),h=H(),I=Fe(),$=I!==null?(I&q.Open)===q.Open:l.listboxState===0;u.useEffect(()=>{var i;let m=l.optionsRef.current;m&&l.listboxState===0&&m!==((i=Pe(m))==null?void 0:i.activeElement)&&m.focus({preventScroll:!0})},[l.listboxState,l.optionsRef]);let T=f(i=>{switch(h.dispose(),i.key){case g.Space:if(l.searchQuery!=="")return i.preventDefault(),i.stopPropagation(),s.search(i.key);case g.Enter:if(i.preventDefault(),i.stopPropagation(),l.activeOptionIndex!==null){let{dataRef:m}=l.options[l.activeOptionIndex];s.onChange(m.current.value)}l.mode===0&&(s.closeListbox(),X().nextFrame(()=>{var m;return(m=l.buttonRef.current)==null?void 0:m.focus({preventScroll:!0})}));break;case F(l.orientation,{vertical:g.ArrowDown,horizontal:g.ArrowRight}):return i.preventDefault(),i.stopPropagation(),s.goToOption(L.Next);case F(l.orientation,{vertical:g.ArrowUp,horizontal:g.ArrowLeft}):return i.preventDefault(),i.stopPropagation(),s.goToOption(L.Previous);case g.Home:case g.PageUp:return i.preventDefault(),i.stopPropagation(),s.goToOption(L.First);case g.End:case g.PageDown:return i.preventDefault(),i.stopPropagation(),s.goToOption(L.Last);case g.Escape:return i.preventDefault(),i.stopPropagation(),s.closeListbox(),v.nextFrame(()=>{var m;return(m=l.buttonRef.current)==null?void 0:m.focus({preventScroll:!0})});case g.Tab:i.preventDefault(),i.stopPropagation();break;default:i.key.length===1&&(s.search(i.key),h.setTimeout(()=>s.clearSearch(),350));break}}),R=ae(()=>{var i;return(i=l.buttonRef.current)==null?void 0:i.id},[l.buttonRef.current]),w=u.useMemo(()=>({open:l.listboxState===0}),[l]),x={"aria-activedescendant":l.activeOptionIndex===null||(t=l.options[l.activeOptionIndex])==null?void 0:t.id,"aria-multiselectable":l.mode===1?!0:void 0,"aria-labelledby":R,"aria-orientation":l.orientation,id:a,onKeyDown:T,role:"listbox",tabIndex:0,ref:p};return C({ourProps:x,theirProps:n,slot:w,defaultTag:ot,features:at,visible:$,name:"Listbox.Options"})}let it="li";function st(e,r){let t=V(),{id:o=`headlessui-listbox-option-${t}`,disabled:a=!1,value:n,...l}=e,s=N("Listbox.Option"),p=j("Listbox.Option"),v=s.activeOptionIndex!==null?s.options[s.activeOptionIndex].id===o:!1,h=s.isSelected(n),I=u.useRef(null),$=Ve(I),T=oe({disabled:a,value:n,domRef:I,get textValue(){return $()}}),R=k(r,I);P(()=>{if(s.listboxState!==0||!v||s.activationTrigger===0)return;let y=X();return y.requestAnimationFrame(()=>{var D,b;(b=(D=I.current)==null?void 0:D.scrollIntoView)==null||b.call(D,{block:"nearest"})}),y.dispose},[I,v,s.listboxState,s.activationTrigger,s.activeOptionIndex]),P(()=>p.registerOption(o,T),[T,o]);let w=f(y=>{if(a)return y.preventDefault();p.onChange(n),s.mode===0&&(p.closeListbox(),X().nextFrame(()=>{var D;return(D=s.buttonRef.current)==null?void 0:D.focus({preventScroll:!0})}))}),x=f(()=>{if(a)return p.goToOption(L.Nothing);p.goToOption(L.Specific,o)}),i=Qe(),m=f(y=>i.update(y)),A=f(y=>{i.wasMoved(y)&&(a||v||p.goToOption(L.Specific,o,0))}),M=f(y=>{i.wasMoved(y)&&(a||v&&p.goToOption(L.Nothing))}),G=u.useMemo(()=>({active:v,selected:h,disabled:a}),[v,h,a]);return C({ourProps:{id:o,ref:R,role:"option",tabIndex:a===!0?void 0:-1,"aria-disabled":a===!0?!0:void 0,"aria-selected":h,disabled:void 0,onClick:w,onFocus:x,onPointerEnter:m,onMouseEnter:m,onPointerMove:A,onMouseMove:A,onPointerLeave:M,onMouseLeave:M},theirProps:l,slot:G,defaultTag:it,name:"Listbox.Option"})}let ut=E(_e),ct=E(tt),dt=E(nt),ft=E(lt),pt=E(st),z=Object.assign(ut,{Button:ct,Label:dt,Options:ft,Option:pt});function bt({title:e,titleId:r,...t},o){return u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":r},t),e?u.createElement("title",{id:r},e):null,u.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z",clipRule:"evenodd"}))}const ht=u.forwardRef(bt);function Rt({options:e,value:r=[]}){const[t,o]=u.useState([]);return u.useEffect(()=>{o(r)},[r]),S.jsx(z,{value:t,onChange:a=>{var n;o(a);for(const l in e)(n=e[l])==null||n.call(e,a.includes(l))},multiple:!0,children:S.jsxs("div",{className:"relative flex",children:[S.jsxs(z.Button,{className:"flex items-center relative w-full bg-primary-10 text-xs rounded-full text-primary-500 py-1 px-2 text-center focus:outline-none focus-visible:border-accent-500 focus-visible:ring-2 focus-visible:ring-light focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-brand-300 cursor-pointer",children:[S.jsxs("span",{className:"flex truncate items-center",children:[S.jsx(Be,{className:"h-3 w-3 mr-0 sm:mr-1"})," ",S.jsx("span",{className:"sr-only sm:not-sr-only",children:"Show"})]}),S.jsx(Ne,{className:"ml-2 h-4 w-4","aria-hidden":"true"})]}),S.jsx(je,{as:u.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:S.jsx(z.Options,{className:"absolute top-8 right-0 z-50 max-h-60 min-w-16 overflow-auto rounded-md bg-theme py-2 shadow-lg ring-2 ring-primary-10 ring-opacity-5 focus:outline-none sm:text-sm",children:Object.keys(e).filter(a=>e[a]).map(a=>S.jsx(z.Option,{className:({active:n,disabled:l})=>_("relative cursor-default select-none py-1 pl-10 pr-4",l?"opacity-50 cursor-not-allowed":"",n?"bg-primary-10 text-primary-500":"text-neutral-700 dark:text-neutral-300"),value:a,disabled:Oe(!!e[a]),children:({selected:n})=>S.jsxs(S.Fragment,{children:[S.jsx("span",{children:a}),S.jsx("span",{className:_("absolute inset-y-0 left-0 flex items-center pl-3 text-primary-500",n?"block":"hidden"),children:S.jsx(Ae,{className:"h-4 w-4","aria-hidden":"true"})})]})},a))})})]})})}export{ht as F,Rt as L,Ue as T,L as c,le as e,He as f,gt as p,Ve as s,Qe as u};
|