@tom2012/cc-web 2026.5.6-b → 2026.5.11-a
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/backend/dist/flows/runner.d.ts +44 -0
- package/backend/dist/flows/runner.d.ts.map +1 -0
- package/backend/dist/flows/runner.js +635 -0
- package/backend/dist/flows/runner.js.map +1 -0
- package/backend/dist/flows/store.d.ts +22 -0
- package/backend/dist/flows/store.d.ts.map +1 -0
- package/backend/dist/flows/store.js +172 -0
- package/backend/dist/flows/store.js.map +1 -0
- package/backend/dist/flows/types.d.ts +100 -0
- package/backend/dist/flows/types.d.ts.map +1 -0
- package/backend/dist/flows/types.js +9 -0
- package/backend/dist/flows/types.js.map +1 -0
- package/backend/dist/index.d.ts.map +1 -1
- package/backend/dist/index.js +7 -0
- package/backend/dist/index.js.map +1 -1
- package/backend/dist/memory-watcher.d.ts +4 -0
- package/backend/dist/memory-watcher.d.ts.map +1 -0
- package/backend/dist/memory-watcher.js +168 -0
- package/backend/dist/memory-watcher.js.map +1 -0
- package/backend/dist/routes/flows.d.ts +3 -0
- package/backend/dist/routes/flows.d.ts.map +1 -0
- package/backend/dist/routes/flows.js +242 -0
- package/backend/dist/routes/flows.js.map +1 -0
- package/backend/dist/terminal-manager.d.ts.map +1 -1
- package/backend/dist/terminal-manager.js +8 -0
- package/backend/dist/terminal-manager.js.map +1 -1
- package/frontend/dist/assets/{ChatOverlay-Dewml63P.js → ChatOverlay-Ct1m15Dk.js} +2 -2
- package/frontend/dist/assets/{GraphPreview-DKqon8iY.js → GraphPreview-IDDWUi1B.js} +1 -1
- package/frontend/dist/assets/{MobilePage-0yihNWS5.js → MobilePage-BRP4SLiF.js} +3 -3
- package/frontend/dist/assets/{OfficePreview-CLoz-Kzs.js → OfficePreview-B4QZEfSm.js} +2 -2
- package/frontend/dist/assets/{PdfPreview-ceFK86bz.js → PdfPreview-CvZCjr-d.js} +1 -1
- package/frontend/dist/assets/{ProjectPage-Dx8ti9Xg.js → ProjectPage-Bs1gxdab.js} +5 -5
- package/frontend/dist/assets/SettingsPage-o22IibLP.js +13 -0
- package/frontend/dist/assets/{SkillHubPage-0i_Vbges.js → SkillHubPage-CLmpUunb.js} +1 -1
- package/frontend/dist/assets/{chevron-down-CabXIthZ.js → chevron-down-32f0yTtz.js} +1 -1
- package/frontend/dist/assets/{index-QPAdq047.js → index-CYDEi7bW.js} +1 -1
- package/frontend/dist/assets/{index-DKiLzICV.js → index-CnWFjJXL.js} +1 -1
- package/frontend/dist/assets/{index-PkEuCOb6.js → index-UY0eavsu.js} +2 -2
- package/frontend/dist/assets/index-nnLME6Go.css +1 -0
- package/frontend/dist/assets/{jszip.min-C5eqdtGO.js → jszip.min-Ck9hK0ej.js} +1 -1
- package/frontend/dist/assets/{search-CO9hGSbE.js → search-dQcnN5dL.js} +1 -1
- package/frontend/dist/assets/select-DL3Al66W.js +13 -0
- package/frontend/dist/index.html +2 -2
- package/package.json +1 -1
- package/frontend/dist/assets/SettingsPage-DqXMFZN7.js +0 -13
- package/frontend/dist/assets/index-BJDTvhqr.css +0 -1
- package/frontend/dist/assets/index-DFmoROkt.js +0 -13
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{c as e,r as t,j as n,U as r,W as o,R as i,$ as a,aY as l,a1 as s,a0 as c,aX as f,V as u,Y as d,d as p,a_ as m,aZ as h}from"./index-PkEuCOb6.js";import{u as g}from"./index-QPAdq047.js";
|
|
2
|
-
/**
|
|
3
|
-
* @license lucide-react v0.309.0 - ISC
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the ISC license.
|
|
6
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/const y=e("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"}]]),v=e("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"}]]);
|
|
8
|
-
/**
|
|
9
|
-
* @license lucide-react v0.309.0 - ISC
|
|
10
|
-
*
|
|
11
|
-
* This source code is licensed under the ISC license.
|
|
12
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
13
|
-
*/function w(e){const r=x(e),o=t.forwardRef((e,o)=>{const{children:i,...a}=e,l=t.Children.toArray(i),s=l.find(R);if(s){const e=s.props.children,i=l.map(n=>n===s?t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null:n);return n.jsx(r,{...a,ref:o,children:t.isValidElement(e)?t.cloneElement(e,void 0,i):null})}return n.jsx(r,{...a,ref:o,children:i})});return o.displayName=`${e}.Slot`,o}function x(e){const n=t.forwardRef((e,n)=>{const{children:o,...i}=e;if(t.isValidElement(o)){const e=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}(o),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}}(i,o.props);return o.type!==t.Fragment&&(a.ref=n?r(n,e):e),t.cloneElement(o,a)}return t.Children.count(o)>1?t.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var b=Symbol("radix.slottable");function R(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===b}function A(e){const t=e+"CollectionProvider",[r,l]=o(t),[s,c]=r(t,{collectionRef:{current:null},itemMap:new Map}),f=e=>{const{scope:t,children:r}=e,o=i.useRef(null),a=i.useRef(new Map).current;return n.jsx(s,{scope:t,itemMap:a,collectionRef:o,children:r})};f.displayName=t;const u=e+"CollectionSlot",d=w(u),p=i.forwardRef((e,t)=>{const{scope:r,children:o}=e,i=c(u,r),l=a(t,i.collectionRef);return n.jsx(d,{ref:l,children:o})});p.displayName=u;const m=e+"CollectionItemSlot",h="data-radix-collection-item",g=w(m),y=i.forwardRef((e,t)=>{const{scope:r,children:o,...l}=e,s=i.useRef(null),f=a(t,s),u=c(m,r);return i.useEffect(()=>(u.itemMap.set(s,{ref:s,...l}),()=>{u.itemMap.delete(s)})),n.jsx(g,{[h]:"",ref:f,children:o})});return y.displayName=m,[{Provider:f,Slot:p,ItemSlot:y},function(t){const n=c(e+"CollectionConsumer",t);return i.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])},l]}var S="rovingFocusGroup.onEntryFocus",C={bubbles:!1,cancelable:!0},T="RovingFocusGroup",[E,P,D]=A(T),[O,j]=o(T,[D]),[F,L]=O(T),k=t.forwardRef((e,t)=>n.jsx(E.Provider,{scope:e.__scopeRovingFocusGroup,children:n.jsx(E.Slot,{scope:e.__scopeRovingFocusGroup,children:n.jsx(M,{...e,ref:t})})}));k.displayName=T;var M=t.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:o,orientation:i,loop:l=!1,dir:d,currentTabStopId:p,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:h,onEntryFocus:y,preventScrollOnEntryFocus:v=!1,...w}=e,x=t.useRef(null),b=a(r,x),R=g(d),[A,E]=f({prop:p,defaultProp:m??null,onChange:h,caller:T}),[D,O]=t.useState(!1),j=u(y),L=P(o),k=t.useRef(!1),[M,I]=t.useState(0);return t.useEffect(()=>{const e=x.current;if(e)return e.addEventListener(S,j),()=>e.removeEventListener(S,j)},[j]),n.jsx(F,{scope:o,orientation:i,dir:R,loop:l,currentTabStopId:A,onItemFocus:t.useCallback(e=>E(e),[E]),onItemShiftTab:t.useCallback(()=>O(!0),[]),onFocusableItemAdd:t.useCallback(()=>I(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>I(e=>e-1),[]),children:n.jsx(s.div,{tabIndex:D||0===M?-1:0,"data-orientation":i,...w,ref:b,style:{outline:"none",...e.style},onMouseDown:c(e.onMouseDown,()=>{k.current=!0}),onFocus:c(e.onFocus,e=>{const t=!k.current;if(e.target===e.currentTarget&&t&&!D){const t=new CustomEvent(S,C);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=L().filter(e=>e.focusable);H([e.find(e=>e.active),e.find(e=>e.id===A),...e].filter(Boolean).map(e=>e.ref.current),v)}}k.current=!1}),onBlur:c(e.onBlur,()=>O(!1))})})}),I="RovingFocusGroupItem",N=t.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:o,focusable:i=!0,active:a=!1,tabStopId:f,children:u,...d}=e,p=l(),m=f||p,h=L(I,o),g=h.currentTabStopId===m,y=P(o),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:x}=h;return t.useEffect(()=>{if(i)return v(),()=>w()},[i,v,w]),n.jsx(E.ItemSlot,{scope:o,id:m,focusable:i,active:a,children:n.jsx(s.span,{tabIndex:g?0:-1,"data-orientation":h.orientation,...d,ref:r,onMouseDown:c(e.onMouseDown,e=>{i?h.onItemFocus(m):e.preventDefault()}),onFocus:c(e.onFocus,()=>h.onItemFocus(m)),onKeyDown:c(e.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:_[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(()=>H(o))}var n,r}),children:"function"==typeof u?u({isCurrentTabStop:g,hasTabStop:null!=x}):u})})});N.displayName=I;var _={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function H(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 W=k,z=N,$="Tabs",[V]=o($,[j]),B=j(),[K,Y]=V($),G=t.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,onValueChange:i,defaultValue:a,orientation:c="horizontal",dir:u,activationMode:d="automatic",...p}=e,m=g(u),[h,y]=f({prop:o,onChange:i,defaultProp:a??"",caller:$});return n.jsx(K,{scope:r,baseId:l(),value:h,onValueChange:y,orientation:c,dir:m,activationMode:d,children:n.jsx(s.div,{dir:m,"data-orientation":c,...p,ref:t})})});G.displayName=$;var X="TabsList",U=t.forwardRef((e,t)=>{const{__scopeTabs:r,loop:o=!0,...i}=e,a=Y(X,r),l=B(r);return n.jsx(W,{asChild:!0,...l,orientation:a.orientation,dir:a.dir,loop:o,children:n.jsx(s.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});U.displayName=X;var q="TabsTrigger",Z=t.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,disabled:i=!1,...a}=e,l=Y(q,r),f=B(r),u=ee(l.baseId,o),d=te(l.baseId,o),p=o===l.value;return n.jsx(z,{asChild:!0,...f,focusable:!i,active:p,children:n.jsx(s.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":d,"data-state":p?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u,...a,ref:t,onMouseDown:c(e.onMouseDown,e=>{i||0!==e.button||!1!==e.ctrlKey?e.preventDefault():l.onValueChange(o)}),onKeyDown:c(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&l.onValueChange(o)}),onFocus:c(e.onFocus,()=>{const e="manual"!==l.activationMode;p||i||!e||l.onValueChange(o)})})})});Z.displayName=q;var J="TabsContent",Q=t.forwardRef((e,r)=>{const{__scopeTabs:o,value:i,forceMount:a,children:l,...c}=e,f=Y(J,o),u=ee(f.baseId,i),p=te(f.baseId,i),m=i===f.value,h=t.useRef(m);return t.useEffect(()=>{const e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),n.jsx(d,{present:a||m,children:({present:t})=>n.jsx(s.div,{"data-state":m?"active":"inactive","data-orientation":f.orientation,role:"tabpanel","aria-labelledby":u,hidden:!t,id:p,tabIndex:0,...c,ref:r,style:{...e.style,animationDuration:h.current?"0s":void 0},children:t&&l})})});function ee(e,t){return`${e}-trigger-${t}`}function te(e,t){return`${e}-content-${t}`}Q.displayName=J;var ne=U,re=Z,oe=Q;const ie=G,ae=t.forwardRef(({className:e,...t},r)=>n.jsx(ne,{ref:r,className:p("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}));ae.displayName=ne.displayName;const le=t.forwardRef(({className:e,...t},r)=>n.jsx(re,{ref:r,className:p("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}));le.displayName=re.displayName;const se=t.forwardRef(({className:e,...t},r)=>n.jsx(oe,{ref:r,className:p("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));se.displayName=oe.displayName;const ce=["top","right","bottom","left"],fe=Math.min,ue=Math.max,de=Math.round,pe=Math.floor,me=e=>({x:e,y:e}),he={left:"right",right:"left",bottom:"top",top:"bottom"};function ge(e,t,n){return ue(e,fe(t,n))}function ye(e,t){return"function"==typeof e?e(t):e}function ve(e){return e.split("-")[0]}function we(e){return e.split("-")[1]}function xe(e){return"x"===e?"y":"x"}function be(e){return"y"===e?"height":"width"}function Re(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function Ae(e){return xe(Re(e))}function Se(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ce=["left","right"],Te=["right","left"],Ee=["top","bottom"],Pe=["bottom","top"];function De(e,t,n,r){const o=we(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Te:Ce:t?Ce:Te;case"left":case"right":return t?Ee:Pe;default:return[]}}(ve(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(Se)))),i}function Oe(e){const t=ve(e);return he[t]+e.slice(t.length)}function je(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 Fe(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 Le(e,t,n){let{reference:r,floating:o}=e;const i=Re(t),a=Ae(t),l=be(a),s=ve(t),c="y"===i,f=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,d=r[l]/2-o[l]/2;let p;switch(s){case"top":p={x:f,y:r.y-o.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-o.width,y:u};break;default:p={x:r.x,y:r.y}}switch(we(t)){case"start":p[a]-=d*(n&&c?-1:1);break;case"end":p[a]+=d*(n&&c?-1:1)}return p}async function ke(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:d=!1,padding:p=0}=ye(t,e),m=je(p),h=l[d?"floating"===u?"reference":"floating":u],g=Fe(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(l.floating)),boundary:c,rootBoundary:f,strategy:s})),y="floating"===u?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.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=Fe(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:v,strategy:s}):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 Me(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ie(e){return ce.some(t=>e[t]>=0)}const Ne=new Set(["left","top"]);function _e(){return"undefined"!=typeof window}function He(e){return $e(e)?(e.nodeName||"").toLowerCase():"#document"}function We(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ze(e){var t;return null==(t=($e(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function $e(e){return!!_e()&&(e instanceof Node||e instanceof We(e).Node)}function Ve(e){return!!_e()&&(e instanceof Element||e instanceof We(e).Element)}function Be(e){return!!_e()&&(e instanceof HTMLElement||e instanceof We(e).HTMLElement)}function Ke(e){return!(!_e()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof We(e).ShadowRoot)}function Ye(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=nt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function Ge(e){return/^(table|td|th)$/.test(He(e))}function Xe(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const Ue=/transform|translate|scale|rotate|perspective|filter/,qe=/paint|layout|strict|content/,Ze=e=>!!e&&"none"!==e;let Je;function Qe(e){const t=Ve(e)?nt(e):e;return Ze(t.transform)||Ze(t.translate)||Ze(t.scale)||Ze(t.rotate)||Ze(t.perspective)||!et()&&(Ze(t.backdropFilter)||Ze(t.filter))||Ue.test(t.willChange||"")||qe.test(t.contain||"")}function et(){return null==Je&&(Je="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Je}function tt(e){return/^(html|body|#document)$/.test(He(e))}function nt(e){return We(e).getComputedStyle(e)}function rt(e){return Ve(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ot(e){if("html"===He(e))return e;const t=e.assignedSlot||e.parentNode||Ke(e)&&e.host||ze(e);return Ke(t)?t.host:t}function it(e){const t=ot(e);return tt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Be(t)&&Ye(t)?t:it(t)}function at(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=it(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=We(o);if(i){const e=lt(a);return t.concat(a,a.visualViewport||[],Ye(o)?o:[],e&&n?at(e):[])}return t.concat(o,at(o,[],n))}function lt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function st(e){const t=nt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Be(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=de(n)!==i||de(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function ct(e){return Ve(e)?e:e.contextElement}function ft(e){const t=ct(e);if(!Be(t))return me(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=st(t);let a=(i?de(n.width):n.width)/r,l=(i?de(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const ut=me(0);function dt(e){const t=We(e);return et()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ut}function pt(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=ct(e);let a=me(1);t&&(r?Ve(r)&&(a=ft(r)):a=ft(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==We(e))&&t}(i,n,r)?dt(i):me(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,f=o.width/a.x,u=o.height/a.y;if(i){const e=We(i),t=r&&Ve(r)?We(r):r;let n=e,o=lt(n);for(;o&&r&&t!==n;){const e=ft(o),t=o.getBoundingClientRect(),r=nt(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,f*=e.x,u*=e.y,s+=i,c+=a,n=We(o),o=lt(n)}}return Fe({width:f,height:u,x:s,y:c})}function mt(e,t){const n=rt(e).scrollLeft;return t?t.left+n:pt(ze(e)).left+n}function ht(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-mt(e,n),y:n.top+t.scrollTop}}function gt(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=We(e),r=ze(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=et();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}const c=mt(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:l,y:s}}(e,n);else if("document"===t)r=function(e){const t=ze(e),n=rt(e),r=e.ownerDocument.body,o=ue(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ue(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+mt(e);const l=-n.scrollTop;return"rtl"===nt(r).direction&&(a+=ue(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}(ze(e));else if(Ve(t))r=function(e,t){const n=pt(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Be(e)?ft(e):me(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=dt(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Fe(r)}function yt(e,t){const n=ot(e);return!(n===t||!Ve(n)||tt(n))&&("fixed"===nt(n).position||yt(n,t))}function vt(e,t,n){const r=Be(t),o=ze(t),i="fixed"===n,a=pt(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=me(0);function c(){s.x=mt(o)}if(r||!r&&!i)if(("body"!==He(t)||Ye(o))&&(l=rt(t)),r){const e=pt(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const f=!o||r||i?me(0):ht(o,l);return{x:a.left+l.scrollLeft-s.x-f.x,y:a.top+l.scrollTop-s.y-f.y,width:a.width,height:a.height}}function wt(e){return"static"===nt(e).position}function xt(e,t){if(!Be(e)||"fixed"===nt(e).position)return null;if(t)return t(e);let n=e.offsetParent;return ze(e)===n&&(n=n.ownerDocument.body),n}function bt(e,t){const n=We(e);if(Xe(e))return n;if(!Be(e)){let t=ot(e);for(;t&&!tt(t);){if(Ve(t)&&!wt(t))return t;t=ot(t)}return n}let r=xt(e,t);for(;r&&Ge(r)&&wt(r);)r=xt(r,t);return r&&tt(r)&&wt(r)&&!Qe(r)?n:r||function(e){let t=ot(e);for(;Be(t)&&!tt(t);){if(Qe(t))return t;if(Xe(t))return null;t=ot(t)}return null}(e)||n}const Rt={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=ze(r),l=!!t&&Xe(t.floating);if(r===a||l&&i)return n;let s={scrollLeft:0,scrollTop:0},c=me(1);const f=me(0),u=Be(r);if((u||!u&&!i)&&(("body"!==He(r)||Ye(a))&&(s=rt(r)),u)){const e=pt(r);c=ft(r),f.x=e.x+r.clientLeft,f.y=e.y+r.clientTop}const d=!a||u||i?me(0):ht(a,s);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+f.x+d.x,y:n.y*c.y-s.scrollTop*c.y+f.y+d.y}},getDocumentElement:ze,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?Xe(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=at(e,[],!1).filter(e=>Ve(e)&&"body"!==He(e)),o=null;const i="fixed"===nt(e).position;let a=i?ot(e):e;for(;Ve(a)&&!tt(a);){const t=nt(a),n=Qe(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||Ye(a)&&!n&&yt(e,a))?r=r.filter(e=>e!==a):o=t,a=ot(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=gt(t,i[0],o);let l=a.top,s=a.right,c=a.bottom,f=a.left;for(let u=1;u<i.length;u++){const e=gt(t,i[u],o);l=ue(e.top,l),s=fe(e.right,s),c=fe(e.bottom,c),f=ue(e.left,f)}return{width:s-f,height:c-l,x:f,y:l}},getOffsetParent:bt,getElementRects:async function(e){const t=this.getOffsetParent||bt,n=this.getDimensions,r=await n(e.floating);return{reference:vt(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}=st(e);return{width:t,height:n}},getScale:ft,isElement:Ve,isRTL:function(e){return"rtl"===nt(e).direction}};function At(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function St(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=ct(e),f=o||i?[...c?at(c):[],...t?at(t):[]]:[];f.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const u=c&&l?function(e,t){let n,r=null;const o=ze(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const c=e.getBoundingClientRect(),{left:f,top:u,width:d,height:p}=c;if(l||t(),!d||!p)return;const m={rootMargin:-pe(u)+"px "+-pe(o.clientWidth-(f+d))+"px "+-pe(o.clientHeight-(u+p))+"px "+-pe(f)+"px",threshold:ue(0,fe(1,s))||1};let h=!0;function g(t){const r=t[0].intersectionRatio;if(r!==s){if(!h)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||At(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&&!s&&m.observe(c),t&&m.observe(t));let h=s?pt(e):null;return s&&function t(){const r=pt(e);h&&!At(h,r)&&n();h=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;f.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==u||u(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(d)}}const Ct=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:l}=t,s=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=ve(n),l=we(n),s="y"===Re(n),c=Ne.has(a)?-1:1,f=i&&s?-1:1,u=ye(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:m}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&"number"==typeof m&&(p="end"===l?-1*m:m),s?{x:p*f,y:d*c}:{x:d*c,y:p*f}}(t,e);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},Tt=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:l=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=ye(e,t),f={x:n,y:r},u=await i.detectOverflow(t,c),d=Re(ve(o)),p=xe(d);let m=f[p],h=f[d];if(a){const e="y"===p?"bottom":"right";m=ge(m+u["y"===p?"top":"left"],m,m-u[e])}if(l){const e="y"===d?"bottom":"right";h=ge(h+u["y"===d?"top":"left"],h,h-u[e])}const g=s.fn({...t,[p]:m,[d]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:a,[d]:l}}}}}},Et=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:l,platform:s,elements:c}=t,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=ye(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=ve(o),v=Re(l),w=ve(l)===l,x=await(null==s.isRTL?void 0:s.isRTL(c.floating)),b=d||(w||!h?[Oe(l)]:function(e){const t=Oe(e);return[Se(e),t,Se(t)]}(l)),R="none"!==m;!d&&R&&b.push(...De(l,h,m,x));const A=[l,...b],S=await s.detectOverflow(t,g),C=[];let T=(null==(r=i.flip)?void 0:r.overflows)||[];if(f&&C.push(S[y]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=we(e),o=Ae(e),i=be(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Oe(a)),[a,Oe(a)]}(o,a,x);C.push(S[e[0]],S[e[1]])}if(T=[...T,{placement:o,overflows:C}],!C.every(e=>e<=0)){var E,P;const e=((null==(E=i.flip)?void 0:E.index)||0)+1,t=A[e];if(t){if(!("alignment"===u&&v!==Re(t))||T.every(e=>Re(e.placement)!==v||e.overflows[0]>0))return{data:{index:e,overflows:T},reset:{placement:t}}}let n=null==(P=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:P.placement;if(!n)switch(p){case"bestFit":{var D;const e=null==(D=T.filter(e=>{if(R){const t=Re(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:D[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},Pt=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:l}=t,{apply:s=()=>{},...c}=ye(e,t),f=await a.detectOverflow(t,c),u=ve(o),d=we(o),p="y"===Re(o),{width:m,height:h}=i.floating;let g,y;"top"===u||"bottom"===u?(g=u,y=d===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(y=u,g="end"===d?"top":"bottom");const v=h-f.top-f.bottom,w=m-f.left-f.right,x=fe(h-f[g],v),b=fe(m-f[y],w),R=!t.middlewareData.shift;let A=x,S=b;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=w),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(A=v),R&&!d){const e=ue(f.left,0),t=ue(f.right,0),n=ue(f.top,0),r=ue(f.bottom,0);p?S=m-2*(0!==e||0!==t?e+t:ue(f.left,f.right)):A=h-2*(0!==n||0!==r?n+r:ue(f.top,f.bottom))}await s({...t,availableWidth:S,availableHeight:A});const C=await a.getDimensions(l.floating);return m!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}},Dt=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=ye(e,t);switch(o){case"referenceHidden":{const e=Me(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ie(e)}}}case"escaped":{const e=Me(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ie(e)}}}default:return{}}}}},Ot=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:s}=t,{element:c,padding:f=0}=ye(e,t)||{};if(null==c)return{};const u=je(f),d={x:n,y:r},p=Ae(o),m=be(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 A=R?R[w]:0;A&&await(null==a.isElement?void 0:a.isElement(R))||(A=l.floating[w]||i.floating[m]);const S=x/2-b/2,C=A/2-h[m]/2-1,T=fe(u[y],C),E=fe(u[v],C),P=T,D=A-h[m]-E,O=A/2-h[m]/2+S,j=ge(P,O,D),F=!s.arrow&&null!=we(o)&&O!==j&&i.reference[m]/2-(O<P?T:E)-h[m]/2<0,L=F?O<P?O-P:O-D:0;return{[p]:d[p]+L,data:{[p]:j,centerOffset:O-j-L,...F&&{alignmentOffset:L}},reset:F}}}),jt=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=ye(e,t),f={x:n,y:r},u=Re(o),d=xe(u);let p=f[d],m=f[u];const h=ye(l,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){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=Ne.has(ve(o)),n=i.reference[u]-i.floating[e]+(t&&(null==(y=a.offset)?void 0:y[u])||0)+(t?0:g.crossAxis),r=i.reference[u]+i.reference[e]+(t?0:(null==(v=a.offset)?void 0:v[u])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[d]:p,[u]:m}}}},Ft=(e,t,n)=>{const r=new Map,o={platform:Rt,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=a.detectOverflow?a:{...a,detectOverflow:ke},s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:u}=Le(c,r,s),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:f,y:u,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:c,platform:l,elements:{reference:e,floating:t}});f=null!=v?v:f,u=null!=w?w:u,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:f,y:u}=Le(c,d,s))),h=-1)}return{x:f,y:u,placement:d,strategy:o,middlewareData:m}})(e,t,{...o,platform:i})};var Lt="undefined"!=typeof document?t.useLayoutEffect:function(){};function kt(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(!kt(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)&&!kt(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Mt(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function It(e,t){const n=Mt(e);return Math.round(t*n)/n}function Nt(e){const n=t.useRef(e);return Lt(()=>{n.current=e}),n}const _t=(e,t)=>{const n=Ct(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ht=(e,t)=>{const n=Tt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wt=(e,t)=>{const n=Et(e);return{name:n.name,fn:n.fn,options:[e,t]}},zt=(e,t)=>{const n=Pt(e);return{name:n.name,fn:n.fn,options:[e,t]}},$t=(e,t)=>{const n=Dt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vt=(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?Ot({element:n.current,padding:r}).fn(t):{}:n?Ot({element:n,padding:r}).fn(t):{};var o}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Bt=t.forwardRef((e,t)=>{const{children:r,width:o=10,height:i=5,...a}=e;return n.jsx(s.svg,{...a,ref:t,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:n.jsx("polygon",{points:"0,0 30,0 15,10"})})});Bt.displayName="Arrow";var Kt=Bt;function Yt(e){const[n,r]=t.useState(void 0);return h(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[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=e.offsetWidth,i=e.offsetHeight;r({width:o,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),n}var Gt="Popper",[Xt,Ut]=o(Gt),[qt,Zt]=Xt(Gt),Jt=e=>{const{__scopePopper:r,children:o}=e,[i,a]=t.useState(null);return n.jsx(qt,{scope:r,anchor:i,onAnchorChange:a,children:o})};Jt.displayName=Gt;var Qt="PopperAnchor",en=t.forwardRef((e,r)=>{const{__scopePopper:o,virtualRef:i,...l}=e,c=Zt(Qt,o),f=t.useRef(null),u=a(r,f),d=t.useRef(null);return t.useEffect(()=>{const e=d.current;d.current=(null==i?void 0:i.current)||f.current,e!==d.current&&c.onAnchorChange(d.current)}),i?null:n.jsx(s.div,{...l,ref:u})});en.displayName=Qt;var tn="PopperContent",[nn,rn]=Xt(tn),on=t.forwardRef((e,r)=>{var o,i,l,c,f,d;const{__scopePopper:p,side:g="bottom",sideOffset:y=0,align:v="center",alignOffset:w=0,arrowPadding:x=0,avoidCollisions:b=!0,collisionBoundary:R=[],collisionPadding:A=0,sticky:S="partial",hideWhenDetached:C=!1,updatePositionStrategy:T="optimized",onPlaced:E,...P}=e,D=Zt(tn,p),[O,j]=t.useState(null),F=a(r,e=>j(e)),[L,k]=t.useState(null),M=Yt(L),I=(null==M?void 0:M.width)??0,N=(null==M?void 0:M.height)??0,_=g+("center"!==v?"-"+v:""),H="number"==typeof A?A:{top:0,right:0,bottom:0,left:0,...A},W=Array.isArray(R)?R:[R],z=W.length>0,$={padding:H,boundary:W.filter(cn),altBoundary:z},{refs:V,floatingStyles:B,placement:K,isPositioned:Y,middlewareData:G}=function(e){void 0===e&&(e={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:s=!0,whileElementsMounted:c,open:f}=e,[u,d]=t.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[p,h]=t.useState(o);kt(p,o)||h(o);const[g,y]=t.useState(null),[v,w]=t.useState(null),x=t.useCallback(e=>{e!==S.current&&(S.current=e,y(e))},[]),b=t.useCallback(e=>{e!==C.current&&(C.current=e,w(e))},[]),R=a||g,A=l||v,S=t.useRef(null),C=t.useRef(null),T=t.useRef(u),E=null!=c,P=Nt(c),D=Nt(i),O=Nt(f),j=t.useCallback(()=>{if(!S.current||!C.current)return;const e={placement:n,strategy:r,middleware:p};D.current&&(e.platform=D.current),Ft(S.current,C.current,e).then(e=>{const t={...e,isPositioned:!1!==O.current};F.current&&!kt(T.current,t)&&(T.current=t,m.flushSync(()=>{d(t)}))})},[p,n,r,D,O]);Lt(()=>{!1===f&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[f]);const F=t.useRef(!1);Lt(()=>(F.current=!0,()=>{F.current=!1}),[]),Lt(()=>{if(R&&(S.current=R),A&&(C.current=A),R&&A){if(P.current)return P.current(R,A,j);j()}},[R,A,j,P,E]);const L=t.useMemo(()=>({reference:S,floating:C,setReference:x,setFloating:b}),[x,b]),k=t.useMemo(()=>({reference:R,floating:A}),[R,A]),M=t.useMemo(()=>{const e={position:r,left:0,top:0};if(!k.floating)return e;const t=It(k.floating,u.x),n=It(k.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...Mt(k.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,s,k.floating,u.x,u.y]);return t.useMemo(()=>({...u,update:j,refs:L,elements:k,floatingStyles:M}),[u,j,L,k,M])}({strategy:"fixed",placement:_,whileElementsMounted:(...e)=>St(...e,{animationFrame:"always"===T}),elements:{reference:D.anchor},middleware:[_t({mainAxis:y+N,alignmentAxis:w}),b&&Ht({mainAxis:!0,crossAxis:!1,limiter:"partial"===S?{fn:jt(X).fn,options:[X,U]}:void 0,...$}),b&&Wt({...$}),zt({...$,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`)}}),L&&Vt({element:L,padding:x}),fn({arrowWidth:I,arrowHeight:N}),C&&$t({strategy:"referenceHidden",...$})]});var X,U;const[q,Z]=un(K),J=u(E);h(()=>{Y&&(null==J||J())},[Y,J]);const Q=null==(o=G.arrow)?void 0:o.x,ee=null==(i=G.arrow)?void 0:i.y,te=0!==(null==(l=G.arrow)?void 0:l.centerOffset),[ne,re]=t.useState();return h(()=>{O&&re(window.getComputedStyle(O).zIndex)},[O]),n.jsx("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:Y?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[null==(c=G.transformOrigin)?void 0:c.x,null==(f=G.transformOrigin)?void 0:f.y].join(" "),...(null==(d=G.hide)?void 0:d.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:n.jsx(nn,{scope:p,placedSide:q,onArrowChange:k,arrowX:Q,arrowY:ee,shouldHideArrow:te,children:n.jsx(s.div,{"data-side":q,"data-align":Z,...P,ref:F,style:{...P.style,animation:Y?void 0:"none"}})})})});on.displayName=tn;var an="PopperArrow",ln={top:"bottom",right:"left",bottom:"top",left:"right"},sn=t.forwardRef(function(e,t){const{__scopePopper:r,...o}=e,i=rn(an,r),a=ln[i.placedSide];return n.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:n.jsx(Kt,{...o,ref:t,style:{...o.style,display:"block"}})})});function cn(e){return null!==e}sn.displayName=an;var fn=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o;const{placement:i,rects:a,middlewareData:l}=t,s=0!==(null==(n=l.arrow)?void 0:n.centerOffset),c=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[u,d]=un(i),p={start:"0%",center:"50%",end:"100%"}[d],m=((null==(r=l.arrow)?void 0:r.x)??0)+c/2,h=((null==(o=l.arrow)?void 0:o.y)??0)+f/2;let g="",y="";return"bottom"===u?(g=s?p:`${m}px`,y=-f+"px"):"top"===u?(g=s?p:`${m}px`,y=`${a.floating.height+f}px`):"right"===u?(g=-f+"px",y=s?p:`${h}px`):"left"===u&&(g=`${a.floating.width+f}px`,y=s?p:`${h}px`),{data:{x:g,y:y}}}});function un(e){const[t,n="center"]=e.split("-");return[t,n]}var dn=Jt,pn=en,mn=on,hn=sn;export{pn as A,mn as C,z as I,dn as R,y as S,ie as T,v as U,ae as a,le as b,se as c,Ut as d,j as e,A as f,W as g,hn as h,Yt as u};
|