@tom2012/cc-web 2026.4.26-b → 2026.4.26-d
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.
- package/README.md +1 -1
- package/backend/dist/approval-manager.d.ts.map +1 -1
- package/backend/dist/approval-manager.js +19 -1
- package/backend/dist/approval-manager.js.map +1 -1
- package/backend/dist/hooks-manager.d.ts.map +1 -1
- package/backend/dist/hooks-manager.js +10 -1
- package/backend/dist/hooks-manager.js.map +1 -1
- package/backend/dist/index.d.ts.map +1 -1
- package/backend/dist/index.js +99 -120
- package/backend/dist/index.js.map +1 -1
- package/backend/dist/notify-service.d.ts.map +1 -1
- package/backend/dist/notify-service.js +55 -18
- package/backend/dist/notify-service.js.map +1 -1
- package/backend/dist/plugin-manager.d.ts +3 -1
- package/backend/dist/plugin-manager.d.ts.map +1 -1
- package/backend/dist/plugin-manager.js +6 -1
- package/backend/dist/plugin-manager.js.map +1 -1
- package/backend/dist/routes/claude.d.ts.map +1 -1
- package/backend/dist/routes/claude.js +2 -1
- package/backend/dist/routes/claude.js.map +1 -1
- package/backend/dist/routes/filesystem.d.ts.map +1 -1
- package/backend/dist/routes/filesystem.js +88 -25
- package/backend/dist/routes/filesystem.js.map +1 -1
- package/backend/dist/routes/git.d.ts.map +1 -1
- package/backend/dist/routes/git.js +15 -1
- package/backend/dist/routes/git.js.map +1 -1
- package/backend/dist/routes/notify.d.ts.map +1 -1
- package/backend/dist/routes/notify.js +3 -7
- package/backend/dist/routes/notify.js.map +1 -1
- package/backend/dist/routes/plugin-bridge.d.ts.map +1 -1
- package/backend/dist/routes/plugin-bridge.js +53 -3
- package/backend/dist/routes/plugin-bridge.js.map +1 -1
- package/backend/dist/routes/projects.d.ts.map +1 -1
- package/backend/dist/routes/projects.js +22 -1
- package/backend/dist/routes/projects.js.map +1 -1
- package/frontend/dist/assets/{AssistantMessageContent-BBXSX58q.js → AssistantMessageContent-DqHct3Ck.js} +2 -2
- package/frontend/dist/assets/{GraphPreview-BAnpFmtm.js → GraphPreview-DDzwYb3w.js} +2 -2
- package/frontend/dist/assets/MobilePage-5nKL4ztD.js +14 -0
- package/frontend/dist/assets/{OfficePreview-C6EJB80i.js → OfficePreview-BUzkkas_.js} +2 -2
- package/frontend/dist/assets/{ProjectPage-fWJrKu-y.js → ProjectPage-CNFXiRv-.js} +5 -5
- package/frontend/dist/assets/SettingsPage-Dhmz6Kys.js +13 -0
- package/frontend/dist/assets/{SkillHubPage-DJzYMG0j.js → SkillHubPage-DRLSM0ND.js} +3 -3
- package/frontend/dist/assets/{chevron-down-CxmD4ySz.js → chevron-down-CtzzxYuu.js} +1 -1
- package/frontend/dist/assets/{chevron-up-BznxDhNi.js → chevron-up-CBkngNQ6.js} +1 -1
- package/frontend/dist/assets/index-BrpW1kym.js +75 -0
- package/frontend/dist/assets/index-CR3beFmz.css +1 -0
- package/frontend/dist/assets/{index-BptnURrX.js → index-UPu5taSd.js} +1 -1
- package/frontend/dist/assets/index-YAu_Jeuq.js +13 -0
- package/frontend/dist/assets/{jszip.min-CfribT02.js → jszip.min-CIqhAS2U.js} +1 -1
- package/frontend/dist/assets/{search-BPzU-LtZ.js → search-W7udjbkr.js} +1 -1
- package/frontend/dist/index.html +2 -2
- package/package.json +1 -1
- package/frontend/dist/assets/MobilePage-BR1R_xht.js +0 -14
- package/frontend/dist/assets/SettingsPage-BxT6q4Fq.js +0 -13
- package/frontend/dist/assets/index-Big9FXD0.css +0 -1
- package/frontend/dist/assets/index-CxHOCf_s.js +0 -75
- package/frontend/dist/assets/index-DwNsYVM3.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,bl as t,bm as n,c as r,j as o,U as i,W as a,R as s,$ as l,b4 as c,a1 as u,a0 as f,b3 as d,V as p,Y as m,d as h,b5 as g,aR as y}from"./index-CxHOCf_s.js";const v={},w=(e,t,n,r)=>{S(n)&&v[n]||(S(n)&&(v[n]=new Date),((e,t,n,r)=>{var o,i,a,s;const l=[n,{code:t,...r||{}}];if(null==(i=null==(o=null==e?void 0:e.services)?void 0:o.logger)?void 0:i.forward)return e.services.logger.forward(l,"warn","react-i18next::",!0);S(l[0])&&(l[0]=`react-i18next:: ${l[0]}`),(null==(s=null==(a=null==e?void 0:e.services)?void 0:a.logger)?void 0:s.warn)?e.services.logger.warn(...l):(null==console?void 0:console.warn)&&console.warn(...l)})(e,t,n,r))},x=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},b=(e,t,n)=>{e.loadNamespaces(t,x(e,n))},R=(e,t,n,r)=>{if(S(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return b(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,x(e,r))},S=e=>"string"==typeof e,A=e.createContext();class C{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var E={exports:{}},O={},T=e;var P="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},j=T.useState,N=T.useEffect,D=T.useLayoutEffect,k=T.useDebugValue;function L(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!P(e,n)}catch(r){return!0}}var F="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=j({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return D(function(){o.value=n,o.getSnapshot=t,L(o)&&i({inst:o})},[e,n,t]),N(function(){return L(o)&&i({inst:o}),e(function(){L(o)&&i({inst:o})})},[e]),k(n),n};O.useSyncExternalStore=void 0!==T.useSyncExternalStore?T.useSyncExternalStore:F,E.exports=O;var _=E.exports;const I={t:(e,t)=>{if(S(t))return t;if("object"==typeof(n=t)&&null!==n&&S(t.defaultValue))return t.defaultValue;var n;if("function"==typeof e)return"";if(Array.isArray(e)){const t=e[e.length-1];return"function"==typeof t?"":t}return e},ready:!1},M=()=>()=>{},z=(r,o={})=>{var i,a,s;const{i18n:l}=o,{i18n:c,defaultNS:u}=e.useContext(A)||{},f=l||c||n();f&&!f.reportNamespaces&&(f.reportNamespaces=new C),f||w(f,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const d=e.useMemo(()=>{var e;return{...t(),...null==(e=null==f?void 0:f.options)?void 0:e.react,...o}},[f,o]),{useSuspense:p,keyPrefix:m}=d,h=u||(null==(i=null==f?void 0:f.options)?void 0:i.defaultNS),g=S(h)?[h]:h||["translation"],y=e.useMemo(()=>g,g);null==(s=null==(a=null==f?void 0:f.reportNamespaces)?void 0:a.addUsedNamespaces)||s.call(a,y);const v=e.useRef(0),x=e.useCallback(e=>{if(!f)return M;const{bindI18n:t,bindI18nStore:n}=d,r=()=>{v.current+=1,e()};return t&&f.on(t,r),n&&f.store.on(n,r),()=>{t&&t.split(" ").forEach(e=>f.off(e,r)),n&&n.split(" ").forEach(e=>f.store.off(e,r))}},[f,d]),E=e.useRef(),O=e.useCallback(()=>{if(!f)return I;const e=!(!f.isInitialized&&!f.initializedStoreOnce)&&y.every(e=>((e,t,n={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):(w(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0))(e,f,d)),t=o.lng||f.language,n=v.current,r=E.current;if(r&&r.ready===e&&r.lng===t&&r.keyPrefix===m&&r.revision===n)return r;const i={t:f.getFixedT(t,"fallback"===d.nsMode?y:y[0],m),ready:e,lng:t,keyPrefix:m,revision:n};return E.current=i,i},[f,y,m,d,o.lng]),[T,P]=e.useState(0),{t:j,ready:N}=_.useSyncExternalStore(x,O,O);e.useEffect(()=>{if(f&&!N&&!p){const e=()=>P(e=>e+1);o.lng?R(f,o.lng,y,e):b(f,y,e)}},[f,o.lng,y,N,p,T]);const D=f||{},k=e.useRef(null),L=e.useRef(),F=e=>{const t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;const n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,"__original"))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch(r){}return n},z=e.useMemo(()=>{const e=D,t=null==e?void 0:e.language;let n=e;e&&(k.current&&k.current.__original===e?L.current!==t?(n=F(e),k.current=n,L.current=t):n=k.current:(n=F(e),k.current=n,L.current=t));const r=N||p?j:(...e)=>(w(f,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),j(...e)),o=[r,n,N];return o.t=r,o.i18n=n,o.ready=N,o},[j,D,N,D.resolvedLanguage,D.language,D.languages]);if(f&&p&&!N)throw new Promise(e=>{const t=()=>e();o.lng?R(f,o.lng,y,t):b(f,y,t)});return z},H=r("Save",[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]]),W=r("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);function V(t){const n=$(t),r=e.forwardRef((t,r)=>{const{children:i,...a}=t,s=e.Children.toArray(i),l=s.find(U);if(l){const t=l.props.children,i=s.map(n=>n===l?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n);return o.jsx(n,{...a,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,i):null})}return o.jsx(n,{...a,ref:r,children:i})});return r.displayName=`${t}.Slot`,r}function $(t){const n=e.forwardRef((t,n)=>{const{children:r,...o}=t;if(e.isValidElement(r)){const t=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;if(o)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o)return e.props.ref;return e.props.ref||e.ref}(r),a=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,r.props);return r.type!==e.Fragment&&(a.ref=n?i(n,t):t),e.cloneElement(r,a)}return e.Children.count(r)>1?e.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var B=Symbol("radix.slottable");function U(t){return e.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===B}function K(e){const t=e+"CollectionProvider",[n,r]=a(t),[i,c]=n(t,{collectionRef:{current:null},itemMap:new Map}),u=e=>{const{scope:t,children:n}=e,r=s.useRef(null),a=s.useRef(new Map).current;return o.jsx(i,{scope:t,itemMap:a,collectionRef:r,children:n})};u.displayName=t;const f=e+"CollectionSlot",d=V(f),p=s.forwardRef((e,t)=>{const{scope:n,children:r}=e,i=c(f,n),a=l(t,i.collectionRef);return o.jsx(d,{ref:a,children:r})});p.displayName=f;const m=e+"CollectionItemSlot",h="data-radix-collection-item",g=V(m),y=s.forwardRef((e,t)=>{const{scope:n,children:r,...i}=e,a=s.useRef(null),u=l(t,a),f=c(m,n);return s.useEffect(()=>(f.itemMap.set(a,{ref:a,...i}),()=>{f.itemMap.delete(a)})),o.jsx(g,{[h]:"",ref:u,children:r})});return y.displayName=m,[{Provider:u,Slot:p,ItemSlot:y},function(t){const n=c(e+"CollectionConsumer",t);return s.useCallback(()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${h}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},r]}var Y=e.createContext(void 0);function G(t){const n=e.useContext(Y);return t||n||"ltr"}var X="rovingFocusGroup.onEntryFocus",q={bubbles:!1,cancelable:!0},Z="RovingFocusGroup",[J,Q,ee]=K(Z),[te,ne]=a(Z,[ee]),[re,oe]=te(Z),ie=e.forwardRef((e,t)=>o.jsx(J.Provider,{scope:e.__scopeRovingFocusGroup,children:o.jsx(J.Slot,{scope:e.__scopeRovingFocusGroup,children:o.jsx(ae,{...e,ref:t})})}));ie.displayName=Z;var ae=e.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:r,orientation:i,loop:a=!1,dir:s,currentTabStopId:c,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:h,onEntryFocus:g,preventScrollOnEntryFocus:y=!1,...v}=t,w=e.useRef(null),x=l(n,w),b=G(s),[R,S]=d({prop:c,defaultProp:m??null,onChange:h,caller:Z}),[A,C]=e.useState(!1),E=p(g),O=Q(r),T=e.useRef(!1),[P,j]=e.useState(0);return e.useEffect(()=>{const e=w.current;if(e)return e.addEventListener(X,E),()=>e.removeEventListener(X,E)},[E]),o.jsx(re,{scope:r,orientation:i,dir:b,loop:a,currentTabStopId:R,onItemFocus:e.useCallback(e=>S(e),[S]),onItemShiftTab:e.useCallback(()=>C(!0),[]),onFocusableItemAdd:e.useCallback(()=>j(e=>e+1),[]),onFocusableItemRemove:e.useCallback(()=>j(e=>e-1),[]),children:o.jsx(u.div,{tabIndex:A||0===P?-1:0,"data-orientation":i,...v,ref:x,style:{outline:"none",...t.style},onMouseDown:f(t.onMouseDown,()=>{T.current=!0}),onFocus:f(t.onFocus,e=>{const t=!T.current;if(e.target===e.currentTarget&&t&&!A){const t=new CustomEvent(X,q);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=O().filter(e=>e.focusable);ue([e.find(e=>e.active),e.find(e=>e.id===R),...e].filter(Boolean).map(e=>e.ref.current),y)}}T.current=!1}),onBlur:f(t.onBlur,()=>C(!1))})})}),se="RovingFocusGroupItem",le=e.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:r,focusable:i=!0,active:a=!1,tabStopId:s,children:l,...d}=t,p=c(),m=s||p,h=oe(se,r),g=h.currentTabStopId===m,y=Q(r),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:x}=h;return e.useEffect(()=>{if(i)return v(),()=>w()},[i,v,w]),o.jsx(J.ItemSlot,{scope:r,id:m,focusable:i,active:a,children:o.jsx(u.span,{tabIndex:g?0:-1,"data-orientation":h.orientation,...d,ref:n,onMouseDown:f(t.onMouseDown,e=>{i?h.onItemFocus(m):e.preventDefault()}),onFocus:f(t.onFocus,()=>h.onItemFocus(m)),onKeyDown:f(t.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void h.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:ce[r]}(e,h.orientation,h.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=y().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=h.loop?(r=i+1,(n=o).map((e,t)=>n[(r+t)%n.length])):o.slice(i+1)}setTimeout(()=>ue(o))}var n,r}),children:"function"==typeof l?l({isCurrentTabStop:g,hasTabStop:null!=x}):l})})});le.displayName=se;var ce={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ue(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var fe=ie,de=le,pe="Tabs",[me]=a(pe,[ne]),he=ne(),[ge,ye]=me(pe),ve=e.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:s="horizontal",dir:l,activationMode:f="automatic",...p}=e,m=G(l),[h,g]=d({prop:r,onChange:i,defaultProp:a??"",caller:pe});return o.jsx(ge,{scope:n,baseId:c(),value:h,onValueChange:g,orientation:s,dir:m,activationMode:f,children:o.jsx(u.div,{dir:m,"data-orientation":s,...p,ref:t})})});ve.displayName=pe;var we="TabsList",xe=e.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,a=ye(we,n),s=he(n);return o.jsx(fe,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:o.jsx(u.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});xe.displayName=we;var be="TabsTrigger",Re=e.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,s=ye(be,n),l=he(n),c=Ce(s.baseId,r),d=Ee(s.baseId,r),p=r===s.value;return o.jsx(de,{asChild:!0,...l,focusable:!i,active:p,children:o.jsx(u.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":d,"data-state":p?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...a,ref:t,onMouseDown:f(e.onMouseDown,e=>{i||0!==e.button||!1!==e.ctrlKey?e.preventDefault():s.onValueChange(r)}),onKeyDown:f(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&s.onValueChange(r)}),onFocus:f(e.onFocus,()=>{const e="manual"!==s.activationMode;p||i||!e||s.onValueChange(r)})})})});Re.displayName=be;var Se="TabsContent",Ae=e.forwardRef((t,n)=>{const{__scopeTabs:r,value:i,forceMount:a,children:s,...l}=t,c=ye(Se,r),f=Ce(c.baseId,i),d=Ee(c.baseId,i),p=i===c.value,h=e.useRef(p);return e.useEffect(()=>{const e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),o.jsx(m,{present:a||p,children:({present:e})=>o.jsx(u.div,{"data-state":p?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":f,hidden:!e,id:d,tabIndex:0,...l,ref:n,style:{...t.style,animationDuration:h.current?"0s":void 0},children:e&&s})})});function Ce(e,t){return`${e}-trigger-${t}`}function Ee(e,t){return`${e}-content-${t}`}Ae.displayName=Se;var Oe=xe,Te=Re,Pe=Ae;const je=ve,Ne=e.forwardRef(({className:e,...t},n)=>o.jsx(Oe,{ref:n,className:h("flex rounded-md bg-muted p-1 text-muted-foreground data-[orientation=horizontal]:h-10 data-[orientation=horizontal]:items-center data-[orientation=horizontal]:justify-center data-[orientation=horizontal]:inline-flex data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-center data-[orientation=vertical]:justify-start",e),...t}));Ne.displayName=Oe.displayName;const De=e.forwardRef(({className:e,...t},n)=>o.jsx(Te,{ref:n,className:h("inline-flex items-center justify-center whitespace-nowrap rounded-sm text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm data-[orientation=horizontal]:px-3 data-[orientation=horizontal]:py-1.5",e),...t}));De.displayName=Te.displayName;const ke=e.forwardRef(({className:e,...t},n)=>o.jsx(Pe,{ref:n,className:h("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));ke.displayName=Pe.displayName;const Le=["top","right","bottom","left"],Fe=Math.min,_e=Math.max,Ie=Math.round,Me=Math.floor,ze=e=>({x:e,y:e}),He={left:"right",right:"left",bottom:"top",top:"bottom"};function We(e,t,n){return _e(e,Fe(t,n))}function Ve(e,t){return"function"==typeof e?e(t):e}function $e(e){return e.split("-")[0]}function Be(e){return e.split("-")[1]}function Ue(e){return"x"===e?"y":"x"}function Ke(e){return"y"===e?"height":"width"}function Ye(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function Ge(e){return Ue(Ye(e))}function Xe(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const qe=["left","right"],Ze=["right","left"],Je=["top","bottom"],Qe=["bottom","top"];function et(e,t,n,r){const o=Be(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Ze:qe:t?qe:Ze;case"left":case"right":return t?Je:Qe;default:return[]}}($e(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(Xe)))),i}function tt(e){const t=$e(e);return He[t]+e.slice(t.length)}function nt(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function rt(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ot(e,t,n){let{reference:r,floating:o}=e;const i=Ye(t),a=Ge(t),s=Ke(a),l=$e(t),c="y"===i,u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Be(t)){case"start":p[a]-=d*(n&&c?-1:1);break;case"end":p[a]+=d*(n&&c?-1:1)}return p}async function it(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=Ve(t,e),m=nt(p),h=s[d?"floating"===f?"reference":"floating":f],g=rt(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===f?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),w=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},x=rt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:v,strategy:l}):y);return{top:(g.top-x.top+m.top)/w.y,bottom:(x.bottom-g.bottom+m.bottom)/w.y,left:(g.left-x.left+m.left)/w.x,right:(x.right-g.right+m.right)/w.x}}function at(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function st(e){return Le.some(t=>e[t]>=0)}const lt=new Set(["left","top"]);function ct(){return"undefined"!=typeof window}function ut(e){return pt(e)?(e.nodeName||"").toLowerCase():"#document"}function ft(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function dt(e){var t;return null==(t=(pt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function pt(e){return!!ct()&&(e instanceof Node||e instanceof ft(e).Node)}function mt(e){return!!ct()&&(e instanceof Element||e instanceof ft(e).Element)}function ht(e){return!!ct()&&(e instanceof HTMLElement||e instanceof ft(e).HTMLElement)}function gt(e){return!(!ct()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ft(e).ShadowRoot)}function yt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ot(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function vt(e){return/^(table|td|th)$/.test(ut(e))}function wt(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const xt=/transform|translate|scale|rotate|perspective|filter/,bt=/paint|layout|strict|content/,Rt=e=>!!e&&"none"!==e;let St;function At(e){const t=mt(e)?Ot(e):e;return Rt(t.transform)||Rt(t.translate)||Rt(t.scale)||Rt(t.rotate)||Rt(t.perspective)||!Ct()&&(Rt(t.backdropFilter)||Rt(t.filter))||xt.test(t.willChange||"")||bt.test(t.contain||"")}function Ct(){return null==St&&(St="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),St}function Et(e){return/^(html|body|#document)$/.test(ut(e))}function Ot(e){return ft(e).getComputedStyle(e)}function Tt(e){return mt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pt(e){if("html"===ut(e))return e;const t=e.assignedSlot||e.parentNode||gt(e)&&e.host||dt(e);return gt(t)?t.host:t}function jt(e){const t=Pt(e);return Et(t)?e.ownerDocument?e.ownerDocument.body:e.body:ht(t)&&yt(t)?t:jt(t)}function Nt(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=jt(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=ft(o);if(i){const e=Dt(a);return t.concat(a,a.visualViewport||[],yt(o)?o:[],e&&n?Nt(e):[])}return t.concat(o,Nt(o,[],n))}function Dt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function kt(e){const t=Ot(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ht(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Ie(n)!==i||Ie(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Lt(e){return mt(e)?e:e.contextElement}function Ft(e){const t=Lt(e);if(!ht(t))return ze(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=kt(t);let a=(i?Ie(n.width):n.width)/r,s=(i?Ie(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const _t=ze(0);function It(e){const t=ft(e);return Ct()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:_t}function Mt(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Lt(e);let a=ze(1);t&&(r?mt(r)&&(a=Ft(r)):a=Ft(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==ft(e))&&t}(i,n,r)?It(i):ze(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(i){const e=ft(i),t=r&&mt(r)?ft(r):r;let n=e,o=Dt(n);for(;o&&r&&t!==n;){const e=Ft(o),t=o.getBoundingClientRect(),r=Ot(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,f*=e.y,l+=i,c+=a,n=ft(o),o=Dt(n)}}return rt({width:u,height:f,x:l,y:c})}function zt(e,t){const n=Tt(e).scrollLeft;return t?t.left+n:Mt(dt(e)).left+n}function Ht(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-zt(e,n),y:n.top+t.scrollTop}}function Wt(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=ft(e),r=dt(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Ct();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=zt(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=dt(e),n=Tt(e),r=e.ownerDocument.body,o=_e(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=_e(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+zt(e);const s=-n.scrollTop;return"rtl"===Ot(r).direction&&(a+=_e(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(dt(e));else if(mt(t))r=function(e,t){const n=Mt(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ht(e)?Ft(e):ze(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=It(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return rt(r)}function Vt(e,t){const n=Pt(e);return!(n===t||!mt(n)||Et(n))&&("fixed"===Ot(n).position||Vt(n,t))}function $t(e,t,n){const r=ht(t),o=dt(t),i="fixed"===n,a=Mt(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=ze(0);function c(){l.x=zt(o)}if(r||!r&&!i)if(("body"!==ut(t)||yt(o))&&(s=Tt(t)),r){const e=Mt(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?ze(0):Ht(o,s);return{x:a.left+s.scrollLeft-l.x-u.x,y:a.top+s.scrollTop-l.y-u.y,width:a.width,height:a.height}}function Bt(e){return"static"===Ot(e).position}function Ut(e,t){if(!ht(e)||"fixed"===Ot(e).position)return null;if(t)return t(e);let n=e.offsetParent;return dt(e)===n&&(n=n.ownerDocument.body),n}function Kt(e,t){const n=ft(e);if(wt(e))return n;if(!ht(e)){let t=Pt(e);for(;t&&!Et(t);){if(mt(t)&&!Bt(t))return t;t=Pt(t)}return n}let r=Ut(e,t);for(;r&&vt(r)&&Bt(r);)r=Ut(r,t);return r&&Et(r)&&Bt(r)&&!At(r)?n:r||function(e){let t=Pt(e);for(;ht(t)&&!Et(t);){if(At(t))return t;if(wt(t))return null;t=Pt(t)}return null}(e)||n}const Yt={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=dt(r),s=!!t&&wt(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=ze(1);const u=ze(0),f=ht(r);if((f||!f&&!i)&&(("body"!==ut(r)||yt(a))&&(l=Tt(r)),f)){const e=Mt(r);c=Ft(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const d=!a||f||i?ze(0):Ht(a,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-l.scrollTop*c.y+u.y+d.y}},getDocumentElement:dt,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?wt(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Nt(e,[],!1).filter(e=>mt(e)&&"body"!==ut(e)),o=null;const i="fixed"===Ot(e).position;let a=i?Pt(e):e;for(;mt(a)&&!Et(a);){const t=Ot(a),n=At(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||yt(a)&&!n&&Vt(e,a))?r=r.filter(e=>e!==a):o=t,a=Pt(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=Wt(t,i[0],o);let s=a.top,l=a.right,c=a.bottom,u=a.left;for(let f=1;f<i.length;f++){const e=Wt(t,i[f],o);s=_e(e.top,s),l=Fe(e.right,l),c=Fe(e.bottom,c),u=_e(e.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:Kt,getElementRects:async function(e){const t=this.getOffsetParent||Kt,n=this.getDimensions,r=await n(e.floating);return{reference:$t(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=kt(e);return{width:t,height:n}},getScale:Ft,isElement:mt,isRTL:function(e){return"rtl"===Ot(e).direction}};function Gt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Xt(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Lt(e),u=o||i?[...c?Nt(c):[],...t?Nt(t):[]]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const f=c&&s?function(e,t){let n,r=null;const o=dt(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:f,width:d,height:p}=c;if(s||t(),!d||!p)return;const m={rootMargin:-Me(f)+"px "+-Me(o.clientWidth-(u+d))+"px "+-Me(o.clientHeight-(f+p))+"px "+-Me(u)+"px",threshold:_e(0,Fe(1,l))||1};let h=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!h)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||Gt(c,e.getBoundingClientRect())||a(),h=!1}try{r=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(y){r=new IntersectionObserver(g,m)}r.observe(e)}(!0),i}(c,n):null;let d,p=-1,m=null;a&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),c&&!l&&m.observe(c),t&&m.observe(t));let h=l?Mt(e):null;return l&&function t(){const r=Mt(e);h&&!Gt(h,r)&&n();h=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=m)||e.disconnect(),m=null,l&&cancelAnimationFrame(d)}}const qt=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=$e(n),s=Be(n),l="y"===Ye(n),c=lt.has(a)?-1:1,u=i&&l?-1:1,f=Ve(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:m}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),l?{x:p*u,y:d*c}:{x:d*c,y:p*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},Zt=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=Ve(e,t),u={x:n,y:r},f=await i.detectOverflow(t,c),d=Ye($e(o)),p=Ue(d);let m=u[p],h=u[d];if(a){const e="y"===p?"bottom":"right";m=We(m+f["y"===p?"top":"left"],m,m-f[e])}if(s){const e="y"===d?"bottom":"right";h=We(h+f["y"===d?"top":"left"],h,h-f[e])}const g=l.fn({...t,[p]:m,[d]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:a,[d]:s}}}}}},Jt=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=Ve(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=$e(o),v=Ye(s),w=$e(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),b=d||(w||!h?[tt(s)]:function(e){const t=tt(e);return[Xe(e),t,Xe(t)]}(s)),R="none"!==m;!d&&R&&b.push(...et(s,h,m,x));const S=[s,...b],A=await l.detectOverflow(t,g),C=[];let E=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&C.push(A[y]),f){const e=function(e,t,n){void 0===n&&(n=!1);const r=Be(e),o=Ge(e),i=Ke(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=tt(a)),[a,tt(a)]}(o,a,x);C.push(A[e[0]],A[e[1]])}if(E=[...E,{placement:o,overflows:C}],!C.every(e=>e<=0)){var O,T;const e=((null==(O=i.flip)?void 0:O.index)||0)+1,t=S[e];if(t){if(!("alignment"===f&&v!==Ye(t))||E.every(e=>Ye(e.placement)!==v||e.overflows[0]>0))return{data:{index:e,overflows:E},reset:{placement:t}}}let n=null==(T=E.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:T.placement;if(!n)switch(p){case"bestFit":{var P;const e=null==(P=E.filter(e=>{if(R){const t=Ye(e.placement);return t===v||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},Qt=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=Ve(e,t),u=await a.detectOverflow(t,c),f=$e(o),d=Be(o),p="y"===Ye(o),{width:m,height:h}=i.floating;let g,y;"top"===f||"bottom"===f?(g=f,y=d===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=f,g="end"===d?"top":"bottom");const v=h-u.top-u.bottom,w=m-u.left-u.right,x=Fe(h-u[g],v),b=Fe(m-u[y],w),R=!t.middlewareData.shift;let S=x,A=b;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(A=w),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(S=v),R&&!d){const e=_e(u.left,0),t=_e(u.right,0),n=_e(u.top,0),r=_e(u.bottom,0);p?A=m-2*(0!==e||0!==t?e+t:_e(u.left,u.right)):S=h-2*(0!==n||0!==r?n+r:_e(u.top,u.bottom))}await l({...t,availableWidth:A,availableHeight:S});const C=await a.getDimensions(s.floating);return m!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}},en=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=Ve(e,t);switch(o){case"referenceHidden":{const e=at(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:st(e)}}}case"escaped":{const e=at(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:st(e)}}}default:return{}}}}},tn=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Ve(e,t)||{};if(null==c)return{};const f=nt(u),d={x:n,y:r},p=Ge(o),m=Ke(p),h=await a.getDimensions(c),g="y"===p,y=g?"top":"left",v=g?"bottom":"right",w=g?"clientHeight":"clientWidth",x=i.reference[m]+i.reference[p]-d[p]-i.floating[m],b=d[p]-i.reference[p],R=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let S=R?R[w]:0;S&&await(null==a.isElement?void 0:a.isElement(R))||(S=s.floating[w]||i.floating[m]);const A=x/2-b/2,C=S/2-h[m]/2-1,E=Fe(f[y],C),O=Fe(f[v],C),T=E,P=S-h[m]-O,j=S/2-h[m]/2+A,N=We(T,j,P),D=!l.arrow&&null!=Be(o)&&j!==N&&i.reference[m]/2-(j<T?E:O)-h[m]/2<0,k=D?j<T?j-T:j-P:0;return{[p]:d[p]+k,data:{[p]:N,centerOffset:j-N-k,...D&&{alignmentOffset:k}},reset:D}}}),nn=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Ve(e,t),u={x:n,y:r},f=Ye(o),d=Ue(f);let p=u[d],m=u[f];const h=Ve(s,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const e="y"===d?"height":"width",t=i.reference[d]-i.floating[e]+g.mainAxis,n=i.reference[d]+i.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var y,v;const e="y"===d?"width":"height",t=lt.has($e(o)),n=i.reference[f]-i.floating[e]+(t&&(null==(y=a.offset)?void 0:y[f])||0)+(t?0:g.crossAxis),r=i.reference[f]+i.reference[e]+(t?0:(null==(v=a.offset)?void 0:v[f])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[d]:p,[f]:m}}}},rn=(e,t,n)=>{const r=new Map,o={platform:Yt,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:it},l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=ot(c,r,l),d=r,p=0;const m={};for(let h=0;h<i.length;h++){const n=i[h];if(!n)continue;const{name:g,fn:y}=n,{x:v,y:w,data:x,reset:b}=await y({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=v?v:u,f=null!=w?w:f,m[g]={...m[g],...x},b&&p<50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:f}=ot(c,d,l))),h=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:m}})(e,t,{...o,platform:i})};var on="undefined"!=typeof document?e.useLayoutEffect:function(){};function an(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!an(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!an(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function sn(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ln(e,t){const n=sn(e);return Math.round(t*n)/n}function cn(t){const n=e.useRef(t);return on(()=>{n.current=t}),n}const un=(e,t)=>{const n=qt(e);return{name:n.name,fn:n.fn,options:[e,t]}},fn=(e,t)=>{const n=Zt(e);return{name:n.name,fn:n.fn,options:[e,t]}},dn=(e,t)=>{const n=Jt(e);return{name:n.name,fn:n.fn,options:[e,t]}},pn=(e,t)=>{const n=Qt(e);return{name:n.name,fn:n.fn,options:[e,t]}},mn=(e,t)=>{const n=en(e);return{name:n.name,fn:n.fn,options:[e,t]}},hn=(e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?tn({element:n.current,padding:r}).fn(t):{}:n?tn({element:n,padding:r}).fn(t):{};var o}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};var gn=e.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return o.jsx(u.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:o.jsx("polygon",{points:"0,0 30,0 15,10"})})});gn.displayName="Arrow";var yn=gn;function vn(t){const[n,r]=e.useState(void 0);return y(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver(e=>{if(!Array.isArray(e))return;if(!e.length)return;const n=e[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=t.offsetWidth,i=t.offsetHeight;r({width:o,height:i})});return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}r(void 0)},[t]),n}var wn="Popper",[xn,bn]=a(wn),[Rn,Sn]=xn(wn),An=t=>{const{__scopePopper:n,children:r}=t,[i,a]=e.useState(null);return o.jsx(Rn,{scope:n,anchor:i,onAnchorChange:a,children:r})};An.displayName=wn;var Cn="PopperAnchor",En=e.forwardRef((t,n)=>{const{__scopePopper:r,virtualRef:i,...a}=t,s=Sn(Cn,r),c=e.useRef(null),f=l(n,c),d=e.useRef(null);return e.useEffect(()=>{const e=d.current;d.current=(null==i?void 0:i.current)||c.current,e!==d.current&&s.onAnchorChange(d.current)}),i?null:o.jsx(u.div,{...a,ref:f})});En.displayName=Cn;var On="PopperContent",[Tn,Pn]=xn(On),jn=e.forwardRef((t,n)=>{var r,i,a,s,c,f;const{__scopePopper:d,side:m="bottom",sideOffset:h=0,align:v="center",alignOffset:w=0,arrowPadding:x=0,avoidCollisions:b=!0,collisionBoundary:R=[],collisionPadding:S=0,sticky:A="partial",hideWhenDetached:C=!1,updatePositionStrategy:E="optimized",onPlaced:O,...T}=t,P=Sn(On,d),[j,N]=e.useState(null),D=l(n,e=>N(e)),[k,L]=e.useState(null),F=vn(k),_=(null==F?void 0:F.width)??0,I=(null==F?void 0:F.height)??0,M=m+("center"!==v?"-"+v:""),z="number"==typeof S?S:{top:0,right:0,bottom:0,left:0,...S},H=Array.isArray(R)?R:[R],W=H.length>0,V={padding:z,boundary:H.filter(Ln),altBoundary:W},{refs:$,floatingStyles:B,placement:U,isPositioned:K,middlewareData:Y}=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=t,[f,d]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[p,m]=e.useState(o);an(p,o)||m(o);const[h,y]=e.useState(null),[v,w]=e.useState(null),x=e.useCallback(e=>{e!==A.current&&(A.current=e,y(e))},[]),b=e.useCallback(e=>{e!==C.current&&(C.current=e,w(e))},[]),R=a||h,S=s||v,A=e.useRef(null),C=e.useRef(null),E=e.useRef(f),O=null!=c,T=cn(c),P=cn(i),j=cn(u),N=e.useCallback(()=>{if(!A.current||!C.current)return;const e={placement:n,strategy:r,middleware:p};P.current&&(e.platform=P.current),rn(A.current,C.current,e).then(e=>{const t={...e,isPositioned:!1!==j.current};D.current&&!an(E.current,t)&&(E.current=t,g.flushSync(()=>{d(t)}))})},[p,n,r,P,j]);on(()=>{!1===u&&E.current.isPositioned&&(E.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[u]);const D=e.useRef(!1);on(()=>(D.current=!0,()=>{D.current=!1}),[]),on(()=>{if(R&&(A.current=R),S&&(C.current=S),R&&S){if(T.current)return T.current(R,S,N);N()}},[R,S,N,T,O]);const k=e.useMemo(()=>({reference:A,floating:C,setReference:x,setFloating:b}),[x,b]),L=e.useMemo(()=>({reference:R,floating:S}),[R,S]),F=e.useMemo(()=>{const e={position:r,left:0,top:0};if(!L.floating)return e;const t=ln(L.floating,f.x),n=ln(L.floating,f.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...sn(L.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,l,L.floating,f.x,f.y]);return e.useMemo(()=>({...f,update:N,refs:k,elements:L,floatingStyles:F}),[f,N,k,L,F])}({strategy:"fixed",placement:M,whileElementsMounted:(...e)=>Xt(...e,{animationFrame:"always"===E}),elements:{reference:P.anchor},middleware:[un({mainAxis:h+I,alignmentAxis:w}),b&&fn({mainAxis:!0,crossAxis:!1,limiter:"partial"===A?{fn:nn(G).fn,options:[G,X]}:void 0,...V}),b&&dn({...V}),pn({...V,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),k&&hn({element:k,padding:x}),Fn({arrowWidth:_,arrowHeight:I}),C&&mn({strategy:"referenceHidden",...V})]});var G,X;const[q,Z]=_n(U),J=p(O);y(()=>{K&&(null==J||J())},[K,J]);const Q=null==(r=Y.arrow)?void 0:r.x,ee=null==(i=Y.arrow)?void 0:i.y,te=0!==(null==(a=Y.arrow)?void 0:a.centerOffset),[ne,re]=e.useState();return y(()=>{j&&re(window.getComputedStyle(j).zIndex)},[j]),o.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:K?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[null==(s=Y.transformOrigin)?void 0:s.x,null==(c=Y.transformOrigin)?void 0:c.y].join(" "),...(null==(f=Y.hide)?void 0:f.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:o.jsx(Tn,{scope:d,placedSide:q,onArrowChange:L,arrowX:Q,arrowY:ee,shouldHideArrow:te,children:o.jsx(u.div,{"data-side":q,"data-align":Z,...T,ref:D,style:{...T.style,animation:K?void 0:"none"}})})})});jn.displayName=On;var Nn="PopperArrow",Dn={top:"bottom",right:"left",bottom:"top",left:"right"},kn=e.forwardRef(function(e,t){const{__scopePopper:n,...r}=e,i=Pn(Nn,n),a=Dn[i.placedSide];return o.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:o.jsx(yn,{...r,ref:t,style:{...r.style,display:"block"}})})});function Ln(e){return null!==e}kn.displayName=Nn;var Fn=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o;const{placement:i,rects:a,middlewareData:s}=t,l=0!==(null==(n=s.arrow)?void 0:n.centerOffset),c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[f,d]=_n(i),p={start:"0%",center:"50%",end:"100%"}[d],m=((null==(r=s.arrow)?void 0:r.x)??0)+c/2,h=((null==(o=s.arrow)?void 0:o.y)??0)+u/2;let g="",y="";return"bottom"===f?(g=l?p:`${m}px`,y=-u+"px"):"top"===f?(g=l?p:`${m}px`,y=`${a.floating.height+u}px`):"right"===f?(g=-u+"px",y=l?p:`${h}px`):"left"===f&&(g=`${a.floating.width+u}px`,y=l?p:`${h}px`),{data:{x:g,y:y}}}});function _n(e){const[t,n="center"]=e.split("-");return[t,n]}var In=An,Mn=En,zn=jn,Hn=kn;function Wn(e,[t,n]){return Math.min(n,Math.max(t,e))}export{Mn as A,zn as C,de as I,In as R,H as S,je as T,W as U,Ne as a,De as b,ke as c,bn as d,ne as e,K as f,fe as g,Hn as h,z as i,Wn as j,vn as k,G as u};
|