@tom2012/cc-web 2026.5.24-a → 2026.5.24-c
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/__tests__/browser-chrome-e2e.test.d.ts +2 -0
- package/backend/dist/__tests__/browser-chrome-e2e.test.d.ts.map +1 -0
- package/backend/dist/__tests__/browser-chrome-e2e.test.js +121 -0
- package/backend/dist/__tests__/browser-chrome-e2e.test.js.map +1 -0
- package/backend/dist/__tests__/browser-chrome.test.d.ts +2 -0
- package/backend/dist/__tests__/browser-chrome.test.d.ts.map +1 -0
- package/backend/dist/__tests__/browser-chrome.test.js +169 -0
- package/backend/dist/__tests__/browser-chrome.test.js.map +1 -0
- package/backend/dist/__tests__/browser-proxy.test.js +81 -47
- package/backend/dist/__tests__/browser-proxy.test.js.map +1 -1
- package/backend/dist/browser-chrome/input-forwarder.d.ts +32 -0
- package/backend/dist/browser-chrome/input-forwarder.d.ts.map +1 -0
- package/backend/dist/browser-chrome/input-forwarder.js +92 -0
- package/backend/dist/browser-chrome/input-forwarder.js.map +1 -0
- package/backend/dist/browser-chrome/screencast.d.ts +21 -0
- package/backend/dist/browser-chrome/screencast.d.ts.map +1 -0
- package/backend/dist/browser-chrome/screencast.js +78 -0
- package/backend/dist/browser-chrome/screencast.js.map +1 -0
- package/backend/dist/browser-chrome/session-manager.d.ts +38 -0
- package/backend/dist/browser-chrome/session-manager.d.ts.map +1 -0
- package/backend/dist/browser-chrome/session-manager.js +175 -0
- package/backend/dist/browser-chrome/session-manager.js.map +1 -0
- package/backend/dist/index.d.ts.map +1 -1
- package/backend/dist/index.js +53 -0
- package/backend/dist/index.js.map +1 -1
- package/backend/dist/routes/browser-chrome.d.ts +4 -0
- package/backend/dist/routes/browser-chrome.d.ts.map +1 -0
- package/backend/dist/routes/browser-chrome.js +106 -0
- package/backend/dist/routes/browser-chrome.js.map +1 -0
- package/backend/dist/routes/browser-proxy.d.ts +16 -4
- package/backend/dist/routes/browser-proxy.d.ts.map +1 -1
- package/backend/dist/routes/browser-proxy.js +78 -41
- package/backend/dist/routes/browser-proxy.js.map +1 -1
- package/backend/package-lock.json +45 -0
- package/backend/package.json +1 -0
- package/frontend/dist/assets/{ChatOverlay-W-pSFHsV.js → ChatOverlay-DWnJouqf.js} +1 -1
- package/frontend/dist/assets/{GraphPreview-CcuxUzQH.js → GraphPreview-BhYiu0BC.js} +1 -1
- package/frontend/dist/assets/{MobilePage-DEBO3i1o.js → MobilePage-CpwaYT93.js} +3 -3
- package/frontend/dist/assets/{OfficePreview-DY-ew_ex.js → OfficePreview-AIsCrFJN.js} +2 -2
- package/frontend/dist/assets/{PdfPreview-Bl0MS_5m.js → PdfPreview-BOf3iH2G.js} +1 -1
- package/frontend/dist/assets/{ProjectPage-tcwSSEFX.js → ProjectPage-BLDngPUN.js} +5 -5
- package/frontend/dist/assets/SettingsPage-898duvMO.js +13 -0
- package/frontend/dist/assets/{SkillHubPage-hH5XcB57.js → SkillHubPage-Cf3oFMk3.js} +1 -1
- package/frontend/dist/assets/{chevron-down-B3q2CU-d.js → chevron-down-CWdHpHQs.js} +1 -1
- package/frontend/dist/assets/{index-CZOz50el.js → index-DoKF15jh.js} +1 -1
- package/frontend/dist/assets/{index-nYsy3LMF.js → index-DtlKk29C.js} +2 -2
- package/frontend/dist/assets/{index-DsYny3RQ.js → index-DzV3STk-.js} +1 -1
- package/frontend/dist/assets/{jszip.min-9o6zKk8v.js → jszip.min-BiyTb6vp.js} +1 -1
- package/frontend/dist/assets/{search-B9B3Cq4V.js → search-DAr7qjB5.js} +1 -1
- package/frontend/dist/assets/select-IaWIRuom.js +13 -0
- package/frontend/dist/index.html +1 -1
- package/package.json +1 -1
- package/frontend/dist/assets/SettingsPage-DU649aEa.js +0 -13
- package/frontend/dist/assets/select-BOLkADQv.js +0 -13
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{c as e,r as t,j as n,a3 as r,a5 as o,R as i,a8 as a,bj as l,aa as s,a9 as c,b3 as d,a4 as u,a6 as f,d as p,aY as m,bk as h,a7 as g,ab as v,ad as y,ae as w,af as x,ag as b,y as S}from"./index-DtlKk29C.js";import{u as R,c as C,a as j}from"./index-DzV3STk-.js";import{C as N}from"./chevron-down-CWdHpHQs.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 P=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"}]]),T=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 A(e){const r=E(e),o=t.forwardRef((e,o)=>{const{children:i,...a}=e,l=t.Children.toArray(i),s=l.find(_);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 E(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 D=Symbol("radix.slottable");function _(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===D}function I(e){const t=e+"CollectionProvider",[r,l]=o(t),[s,c]=r(t,{collectionRef:{current:null},itemMap:new Map}),d=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})};d.displayName=t;const u=e+"CollectionSlot",f=A(u),p=i.forwardRef((e,t)=>{const{scope:r,children:o}=e,i=c(u,r),l=a(t,i.collectionRef);return n.jsx(f,{ref:l,children:o})});p.displayName=u;const m=e+"CollectionItemSlot",h="data-radix-collection-item",g=A(m),v=i.forwardRef((e,t)=>{const{scope:r,children:o,...l}=e,s=i.useRef(null),d=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:d,children:o})});return v.displayName=m,[{Provider:d,Slot:p,ItemSlot:v},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 k="rovingFocusGroup.onEntryFocus",O={bubbles:!1,cancelable:!0},L="RovingFocusGroup",[M,F,H]=I(L),[V,W]=o(L,[H]),[B,z]=V(L),$=t.forwardRef((e,t)=>n.jsx(M.Provider,{scope:e.__scopeRovingFocusGroup,children:n.jsx(M.Slot,{scope:e.__scopeRovingFocusGroup,children:n.jsx(K,{...e,ref:t})})}));$.displayName=L;var K=t.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:o,orientation:i,loop:l=!1,dir:f,currentTabStopId:p,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:h,onEntryFocus:g,preventScrollOnEntryFocus:v=!1,...y}=e,w=t.useRef(null),x=a(r,w),b=R(f),[S,C]=d({prop:p,defaultProp:m??null,onChange:h,caller:L}),[j,N]=t.useState(!1),P=u(g),T=F(o),A=t.useRef(!1),[E,D]=t.useState(0);return t.useEffect(()=>{const e=w.current;if(e)return e.addEventListener(k,P),()=>e.removeEventListener(k,P)},[P]),n.jsx(B,{scope:o,orientation:i,dir:b,loop:l,currentTabStopId:S,onItemFocus:t.useCallback(e=>C(e),[C]),onItemShiftTab:t.useCallback(()=>N(!0),[]),onFocusableItemAdd:t.useCallback(()=>D(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>D(e=>e-1),[]),children:n.jsx(s.div,{tabIndex:j||0===E?-1:0,"data-orientation":i,...y,ref:x,style:{outline:"none",...e.style},onMouseDown:c(e.onMouseDown,()=>{A.current=!0}),onFocus:c(e.onFocus,e=>{const t=!A.current;if(e.target===e.currentTarget&&t&&!j){const t=new CustomEvent(k,O);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=T().filter(e=>e.focusable);G([e.find(e=>e.active),e.find(e=>e.id===S),...e].filter(Boolean).map(e=>e.ref.current),v)}}A.current=!1}),onBlur:c(e.onBlur,()=>N(!1))})})}),U="RovingFocusGroupItem",q=t.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:o,focusable:i=!0,active:a=!1,tabStopId:d,children:u,...f}=e,p=l(),m=d||p,h=z(U,o),g=h.currentTabStopId===m,v=F(o),{onFocusableItemAdd:y,onFocusableItemRemove:w,currentTabStopId:x}=h;return t.useEffect(()=>{if(i)return y(),()=>w()},[i,y,w]),n.jsx(M.ItemSlot,{scope:o,id:m,focusable:i,active:a,children:n.jsx(s.span,{tabIndex:g?0:-1,"data-orientation":h.orientation,...f,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:Y[r]}(e,h.orientation,h.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=v().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(()=>G(o))}var n,r}),children:"function"==typeof u?u({isCurrentTabStop:g,hasTabStop:null!=x}):u})})});q.displayName=U;var Y={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function G(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 X=$,Z=q,J="Tabs",[Q]=o(J,[W]),ee=W(),[te,ne]=Q(J),re=t.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,onValueChange:i,defaultValue:a,orientation:c="horizontal",dir:u,activationMode:f="automatic",...p}=e,m=R(u),[h,g]=d({prop:o,onChange:i,defaultProp:a??"",caller:J});return n.jsx(te,{scope:r,baseId:l(),value:h,onValueChange:g,orientation:c,dir:m,activationMode:f,children:n.jsx(s.div,{dir:m,"data-orientation":c,...p,ref:t})})});re.displayName=J;var oe="TabsList",ie=t.forwardRef((e,t)=>{const{__scopeTabs:r,loop:o=!0,...i}=e,a=ne(oe,r),l=ee(r);return n.jsx(X,{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})})});ie.displayName=oe;var ae="TabsTrigger",le=t.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,disabled:i=!1,...a}=e,l=ne(ae,r),d=ee(r),u=de(l.baseId,o),f=ue(l.baseId,o),p=o===l.value;return n.jsx(Z,{asChild:!0,...d,focusable:!i,active:p,children:n.jsx(s.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":f,"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)})})})});le.displayName=ae;var se="TabsContent",ce=t.forwardRef((e,r)=>{const{__scopeTabs:o,value:i,forceMount:a,children:l,...c}=e,d=ne(se,o),u=de(d.baseId,i),p=ue(d.baseId,i),m=i===d.value,h=t.useRef(m);return t.useEffect(()=>{const e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),n.jsx(f,{present:a||m,children:({present:t})=>n.jsx(s.div,{"data-state":m?"active":"inactive","data-orientation":d.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 de(e,t){return`${e}-trigger-${t}`}function ue(e,t){return`${e}-content-${t}`}ce.displayName=se;var fe=ie,pe=le,me=ce;const he=re,ge=t.forwardRef(({className:e,...t},r)=>n.jsx(fe,{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}));ge.displayName=fe.displayName;const ve=t.forwardRef(({className:e,...t},r)=>n.jsx(pe,{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}));ve.displayName=pe.displayName;const ye=t.forwardRef(({className:e,...t},r)=>n.jsx(me,{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}));ye.displayName=me.displayName;const we=["top","right","bottom","left"],xe=Math.min,be=Math.max,Se=Math.round,Re=Math.floor,Ce=e=>({x:e,y:e}),je={left:"right",right:"left",bottom:"top",top:"bottom"};function Ne(e,t,n){return be(e,xe(t,n))}function Pe(e,t){return"function"==typeof e?e(t):e}function Te(e){return e.split("-")[0]}function Ae(e){return e.split("-")[1]}function Ee(e){return"x"===e?"y":"x"}function De(e){return"y"===e?"height":"width"}function _e(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function Ie(e){return Ee(_e(e))}function ke(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Oe=["left","right"],Le=["right","left"],Me=["top","bottom"],Fe=["bottom","top"];function He(e,t,n,r){const o=Ae(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Le:Oe:t?Oe:Le;case"left":case"right":return t?Me:Fe;default:return[]}}(Te(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(ke)))),i}function Ve(e){const t=Te(e);return je[t]+e.slice(t.length)}function We(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 Be(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 ze(e,t,n){let{reference:r,floating:o}=e;const i=_e(t),a=Ie(t),l=De(a),s=Te(t),c="y"===i,d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2;let p;switch(s){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,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(Ae(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1)}return p}async function $e(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:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:p=0}=Pe(t,e),m=We(p),h=l[f?"floating"===u?"reference":"floating":u],g=Be(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:d,strategy:s})),v="floating"===u?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),w=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},x=Be(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:y,strategy:s}):v);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 Ke(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ue(e){return we.some(t=>e[t]>=0)}const qe=new Set(["left","top"]);function Ye(){return"undefined"!=typeof window}function Ge(e){return Je(e)?(e.nodeName||"").toLowerCase():"#document"}function Xe(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ze(e){var t;return null==(t=(Je(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Je(e){return!!Ye()&&(e instanceof Node||e instanceof Xe(e).Node)}function Qe(e){return!!Ye()&&(e instanceof Element||e instanceof Xe(e).Element)}function et(e){return!!Ye()&&(e instanceof HTMLElement||e instanceof Xe(e).HTMLElement)}function tt(e){return!(!Ye()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Xe(e).ShadowRoot)}function nt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ft(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function rt(e){return/^(table|td|th)$/.test(Ge(e))}function ot(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const it=/transform|translate|scale|rotate|perspective|filter/,at=/paint|layout|strict|content/,lt=e=>!!e&&"none"!==e;let st;function ct(e){const t=Qe(e)?ft(e):e;return lt(t.transform)||lt(t.translate)||lt(t.scale)||lt(t.rotate)||lt(t.perspective)||!dt()&&(lt(t.backdropFilter)||lt(t.filter))||it.test(t.willChange||"")||at.test(t.contain||"")}function dt(){return null==st&&(st="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),st}function ut(e){return/^(html|body|#document)$/.test(Ge(e))}function ft(e){return Xe(e).getComputedStyle(e)}function pt(e){return Qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function mt(e){if("html"===Ge(e))return e;const t=e.assignedSlot||e.parentNode||tt(e)&&e.host||Ze(e);return tt(t)?t.host:t}function ht(e){const t=mt(e);return ut(t)?e.ownerDocument?e.ownerDocument.body:e.body:et(t)&&nt(t)?t:ht(t)}function gt(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=ht(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=Xe(o);if(i){const e=vt(a);return t.concat(a,a.visualViewport||[],nt(o)?o:[],e&&n?gt(e):[])}return t.concat(o,gt(o,[],n))}function vt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yt(e){const t=ft(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=et(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=Se(n)!==i||Se(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function wt(e){return Qe(e)?e:e.contextElement}function xt(e){const t=wt(e);if(!et(t))return Ce(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=yt(t);let a=(i?Se(n.width):n.width)/r,l=(i?Se(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const bt=Ce(0);function St(e){const t=Xe(e);return dt()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:bt}function Rt(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=wt(e);let a=Ce(1);t&&(r?Qe(r)&&(a=xt(r)):a=xt(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Xe(e))&&t}(i,n,r)?St(i):Ce(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,d=o.width/a.x,u=o.height/a.y;if(i){const e=Xe(i),t=r&&Qe(r)?Xe(r):r;let n=e,o=vt(n);for(;o&&r&&t!==n;){const e=xt(o),t=o.getBoundingClientRect(),r=ft(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,d*=e.x,u*=e.y,s+=i,c+=a,n=Xe(o),o=vt(n)}}return Be({width:d,height:u,x:s,y:c})}function Ct(e,t){const n=pt(e).scrollLeft;return t?t.left+n:Rt(Ze(e)).left+n}function jt(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ct(e,n),y:n.top+t.scrollTop}}function Nt(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Xe(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=dt();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}const c=Ct(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=pt(e),r=e.ownerDocument.body,o=be(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=be(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ct(e);const l=-n.scrollTop;return"rtl"===ft(r).direction&&(a+=be(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}(Ze(e));else if(Qe(t))r=function(e,t){const n=Rt(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=et(e)?xt(e):Ce(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=St(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Be(r)}function Pt(e,t){const n=mt(e);return!(n===t||!Qe(n)||ut(n))&&("fixed"===ft(n).position||Pt(n,t))}function Tt(e,t,n){const r=et(t),o=Ze(t),i="fixed"===n,a=Rt(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=Ce(0);function c(){s.x=Ct(o)}if(r||!r&&!i)if(("body"!==Ge(t)||nt(o))&&(l=pt(t)),r){const e=Rt(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const d=!o||r||i?Ce(0):jt(o,l);return{x:a.left+l.scrollLeft-s.x-d.x,y:a.top+l.scrollTop-s.y-d.y,width:a.width,height:a.height}}function At(e){return"static"===ft(e).position}function Et(e,t){if(!et(e)||"fixed"===ft(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Ze(e)===n&&(n=n.ownerDocument.body),n}function Dt(e,t){const n=Xe(e);if(ot(e))return n;if(!et(e)){let t=mt(e);for(;t&&!ut(t);){if(Qe(t)&&!At(t))return t;t=mt(t)}return n}let r=Et(e,t);for(;r&&rt(r)&&At(r);)r=Et(r,t);return r&&ut(r)&&At(r)&&!ct(r)?n:r||function(e){let t=mt(e);for(;et(t)&&!ut(t);){if(ct(t))return t;if(ot(t))return null;t=mt(t)}return null}(e)||n}const _t={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=Ze(r),l=!!t&&ot(t.floating);if(r===a||l&&i)return n;let s={scrollLeft:0,scrollTop:0},c=Ce(1);const d=Ce(0),u=et(r);if((u||!u&&!i)&&(("body"!==Ge(r)||nt(a))&&(s=pt(r)),u)){const e=Rt(r);c=xt(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const f=!a||u||i?Ce(0):jt(a,s);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+d.x+f.x,y:n.y*c.y-s.scrollTop*c.y+d.y+f.y}},getDocumentElement:Ze,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?ot(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=gt(e,[],!1).filter(e=>Qe(e)&&"body"!==Ge(e)),o=null;const i="fixed"===ft(e).position;let a=i?mt(e):e;for(;Qe(a)&&!ut(a);){const t=ft(a),n=ct(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||nt(a)&&!n&&Pt(e,a))?r=r.filter(e=>e!==a):o=t,a=mt(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=Nt(t,i[0],o);let l=a.top,s=a.right,c=a.bottom,d=a.left;for(let u=1;u<i.length;u++){const e=Nt(t,i[u],o);l=be(e.top,l),s=xe(e.right,s),c=xe(e.bottom,c),d=be(e.left,d)}return{width:s-d,height:c-l,x:d,y:l}},getOffsetParent:Dt,getElementRects:async function(e){const t=this.getOffsetParent||Dt,n=this.getDimensions,r=await n(e.floating);return{reference:Tt(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}=yt(e);return{width:t,height:n}},getScale:xt,isElement:Qe,isRTL:function(e){return"rtl"===ft(e).direction}};function It(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kt(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=wt(e),d=o||i?[...c?gt(c):[],...t?gt(t):[]]:[];d.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:d,top:u,width:f,height:p}=c;if(l||t(),!f||!p)return;const m={rootMargin:-Re(u)+"px "+-Re(o.clientWidth-(d+f))+"px "+-Re(o.clientHeight-(u+p))+"px "+-Re(d)+"px",threshold:be(0,xe(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||It(c,e.getBoundingClientRect())||a(),h=!1}try{r=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(v){r=new IntersectionObserver(g,m)}r.observe(e)}(!0),i}(c,n):null;let f,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?Rt(e):null;return s&&function t(){const r=Rt(e);h&&!It(h,r)&&n();h=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==u||u(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(f)}}const Ot=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=Te(n),l=Ae(n),s="y"===_e(n),c=qe.has(a)?-1:1,d=i&&s?-1:1,u=Pe(t,e);let{mainAxis:f,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*d,y:f*c}:{x:f*c,y:p*d}}(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}}}}},Lt=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}=Pe(e,t),d={x:n,y:r},u=await i.detectOverflow(t,c),f=_e(Te(o)),p=Ee(f);let m=d[p],h=d[f];if(a){const e="y"===p?"bottom":"right";m=Ne(m+u["y"===p?"top":"left"],m,m-u[e])}if(l){const e="y"===f?"bottom":"right";h=Ne(h+u["y"===f?"top":"left"],h,h-u[e])}const g=s.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:a,[f]:l}}}}}},Mt=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:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=Pe(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=Te(o),y=_e(l),w=Te(l)===l,x=await(null==s.isRTL?void 0:s.isRTL(c.floating)),b=f||(w||!h?[Ve(l)]:function(e){const t=Ve(e);return[ke(e),t,ke(t)]}(l)),S="none"!==m;!f&&S&&b.push(...He(l,h,m,x));const R=[l,...b],C=await s.detectOverflow(t,g),j=[];let N=(null==(r=i.flip)?void 0:r.overflows)||[];if(d&&j.push(C[v]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=Ae(e),o=Ie(e),i=De(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ve(a)),[a,Ve(a)]}(o,a,x);j.push(C[e[0]],C[e[1]])}if(N=[...N,{placement:o,overflows:j}],!j.every(e=>e<=0)){var P,T;const e=((null==(P=i.flip)?void 0:P.index)||0)+1,t=R[e];if(t){if(!("alignment"===u&&y!==_e(t))||N.every(e=>_e(e.placement)!==y||e.overflows[0]>0))return{data:{index:e,overflows:N},reset:{placement:t}}}let n=null==(T=N.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 A;const e=null==(A=N.filter(e=>{if(S){const t=_e(e.placement);return t===y||"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:A[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},Ft=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}=Pe(e,t),d=await a.detectOverflow(t,c),u=Te(o),f=Ae(o),p="y"===_e(o),{width:m,height:h}=i.floating;let g,v;"top"===u||"bottom"===u?(g=u,v=f===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(v=u,g="end"===f?"top":"bottom");const y=h-d.top-d.bottom,w=m-d.left-d.right,x=xe(h-d[g],y),b=xe(m-d[v],w),S=!t.middlewareData.shift;let R=x,C=b;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(C=w),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(R=y),S&&!f){const e=be(d.left,0),t=be(d.right,0),n=be(d.top,0),r=be(d.bottom,0);p?C=m-2*(0!==e||0!==t?e+t:be(d.left,d.right)):R=h-2*(0!==n||0!==r?n+r:be(d.top,d.bottom))}await s({...t,availableWidth:C,availableHeight:R});const j=await a.getDimensions(l.floating);return m!==j.width||h!==j.height?{reset:{rects:!0}}:{}}}},Ht=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=Pe(e,t);switch(o){case"referenceHidden":{const e=Ke(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ue(e)}}}case"escaped":{const e=Ke(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ue(e)}}}default:return{}}}}},Vt=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:d=0}=Pe(e,t)||{};if(null==c)return{};const u=We(d),f={x:n,y:r},p=Ie(o),m=De(p),h=await a.getDimensions(c),g="y"===p,v=g?"top":"left",y=g?"bottom":"right",w=g?"clientHeight":"clientWidth",x=i.reference[m]+i.reference[p]-f[p]-i.floating[m],b=f[p]-i.reference[p],S=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let R=S?S[w]:0;R&&await(null==a.isElement?void 0:a.isElement(S))||(R=l.floating[w]||i.floating[m]);const C=x/2-b/2,j=R/2-h[m]/2-1,N=xe(u[v],j),P=xe(u[y],j),T=N,A=R-h[m]-P,E=R/2-h[m]/2+C,D=Ne(T,E,A),_=!s.arrow&&null!=Ae(o)&&E!==D&&i.reference[m]/2-(E<T?N:P)-h[m]/2<0,I=_?E<T?E-T:E-A:0;return{[p]:f[p]+I,data:{[p]:D,centerOffset:E-D-I,..._&&{alignmentOffset:I}},reset:_}}}),Wt=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}=Pe(e,t),d={x:n,y:r},u=_e(o),f=Ee(u);let p=d[f],m=d[u];const h=Pe(l,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+g.mainAxis,n=i.reference[f]+i.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var v,y;const e="y"===f?"width":"height",t=qe.has(Te(o)),n=i.reference[u]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[u])||0)+(t?0:g.crossAxis),r=i.reference[u]+i.reference[e]+(t?0:(null==(y=a.offset)?void 0:y[u])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[u]:m}}}},Bt=(e,t,n)=>{const r=new Map,o={platform:_t,...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:$e},s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=ze(c,r,s),f=r,p=0;const m={};for(let h=0;h<i.length;h++){const n=i[h];if(!n)continue;const{name:g,fn:v}=n,{x:y,y:w,data:x,reset:b}=await v({x:d,y:u,initialPlacement:r,placement:f,strategy:o,middlewareData:m,rects:c,platform:l,elements:{reference:e,floating:t}});d=null!=y?y:d,u=null!=w?w:u,m[g]={...m[g],...x},b&&p<50&&(p++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:d,y:u}=ze(c,f,s))),h=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:m}})(e,t,{...o,platform:i})};var zt="undefined"!=typeof document?t.useLayoutEffect:function(){};function $t(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(!$t(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)&&!$t(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Kt(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ut(e,t){const n=Kt(e);return Math.round(t*n)/n}function qt(e){const n=t.useRef(e);return zt(()=>{n.current=e}),n}const Yt=(e,t)=>{const n=Ot(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gt=(e,t)=>{const n=Lt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xt=(e,t)=>{const n=Mt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zt=(e,t)=>{const n=Ft(e);return{name:n.name,fn:n.fn,options:[e,t]}},Jt=(e,t)=>{const n=Ht(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qt=(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?Vt({element:n.current,padding:r}).fn(t):{}:n?Vt({element:n,padding:r}).fn(t):{};var o}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};var en=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"})})});en.displayName="Arrow";var tn=en;function nn(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 rn="Popper",[on,an]=o(rn),[ln,sn]=on(rn),cn=e=>{const{__scopePopper:r,children:o}=e,[i,a]=t.useState(null);return n.jsx(ln,{scope:r,anchor:i,onAnchorChange:a,children:o})};cn.displayName=rn;var dn="PopperAnchor",un=t.forwardRef((e,r)=>{const{__scopePopper:o,virtualRef:i,...l}=e,c=sn(dn,o),d=t.useRef(null),u=a(r,d),f=t.useRef(null);return t.useEffect(()=>{const e=f.current;f.current=(null==i?void 0:i.current)||d.current,e!==f.current&&c.onAnchorChange(f.current)}),i?null:n.jsx(s.div,{...l,ref:u})});un.displayName=dn;var fn="PopperContent",[pn,mn]=on(fn),hn=t.forwardRef((e,r)=>{var o,i,l,c,d,f;const{__scopePopper:p,side:g="bottom",sideOffset:v=0,align:y="center",alignOffset:w=0,arrowPadding:x=0,avoidCollisions:b=!0,collisionBoundary:S=[],collisionPadding:R=0,sticky:C="partial",hideWhenDetached:j=!1,updatePositionStrategy:N="optimized",onPlaced:P,...T}=e,A=sn(fn,p),[E,D]=t.useState(null),_=a(r,e=>D(e)),[I,k]=t.useState(null),O=nn(I),L=(null==O?void 0:O.width)??0,M=(null==O?void 0:O.height)??0,F=g+("center"!==y?"-"+y:""),H="number"==typeof R?R:{top:0,right:0,bottom:0,left:0,...R},V=Array.isArray(S)?S:[S],W=V.length>0,B={padding:H,boundary:V.filter(wn),altBoundary:W},{refs:z,floatingStyles:$,placement:K,isPositioned:U,middlewareData:q}=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:d}=e,[u,f]=t.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[p,h]=t.useState(o);$t(p,o)||h(o);const[g,v]=t.useState(null),[y,w]=t.useState(null),x=t.useCallback(e=>{e!==C.current&&(C.current=e,v(e))},[]),b=t.useCallback(e=>{e!==j.current&&(j.current=e,w(e))},[]),S=a||g,R=l||y,C=t.useRef(null),j=t.useRef(null),N=t.useRef(u),P=null!=c,T=qt(c),A=qt(i),E=qt(d),D=t.useCallback(()=>{if(!C.current||!j.current)return;const e={placement:n,strategy:r,middleware:p};A.current&&(e.platform=A.current),Bt(C.current,j.current,e).then(e=>{const t={...e,isPositioned:!1!==E.current};_.current&&!$t(N.current,t)&&(N.current=t,m.flushSync(()=>{f(t)}))})},[p,n,r,A,E]);zt(()=>{!1===d&&N.current.isPositioned&&(N.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[d]);const _=t.useRef(!1);zt(()=>(_.current=!0,()=>{_.current=!1}),[]),zt(()=>{if(S&&(C.current=S),R&&(j.current=R),S&&R){if(T.current)return T.current(S,R,D);D()}},[S,R,D,T,P]);const I=t.useMemo(()=>({reference:C,floating:j,setReference:x,setFloating:b}),[x,b]),k=t.useMemo(()=>({reference:S,floating:R}),[S,R]),O=t.useMemo(()=>{const e={position:r,left:0,top:0};if(!k.floating)return e;const t=Ut(k.floating,u.x),n=Ut(k.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...Kt(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:D,refs:I,elements:k,floatingStyles:O}),[u,D,I,k,O])}({strategy:"fixed",placement:F,whileElementsMounted:(...e)=>kt(...e,{animationFrame:"always"===N}),elements:{reference:A.anchor},middleware:[Yt({mainAxis:v+M,alignmentAxis:w}),b&&Gt({mainAxis:!0,crossAxis:!1,limiter:"partial"===C?{fn:Wt(Y).fn,options:[Y,G]}:void 0,...B}),b&&Xt({...B}),Zt({...B,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`)}}),I&&Qt({element:I,padding:x}),xn({arrowWidth:L,arrowHeight:M}),j&&Jt({strategy:"referenceHidden",...B})]});var Y,G;const[X,Z]=bn(K),J=u(P);h(()=>{U&&(null==J||J())},[U,J]);const Q=null==(o=q.arrow)?void 0:o.x,ee=null==(i=q.arrow)?void 0:i.y,te=0!==(null==(l=q.arrow)?void 0:l.centerOffset),[ne,re]=t.useState();return h(()=>{E&&re(window.getComputedStyle(E).zIndex)},[E]),n.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:U?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[null==(c=q.transformOrigin)?void 0:c.x,null==(d=q.transformOrigin)?void 0:d.y].join(" "),...(null==(f=q.hide)?void 0:f.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:n.jsx(pn,{scope:p,placedSide:X,onArrowChange:k,arrowX:Q,arrowY:ee,shouldHideArrow:te,children:n.jsx(s.div,{"data-side":X,"data-align":Z,...T,ref:_,style:{...T.style,animation:U?void 0:"none"}})})})});hn.displayName=fn;var gn="PopperArrow",vn={top:"bottom",right:"left",bottom:"top",left:"right"},yn=t.forwardRef(function(e,t){const{__scopePopper:r,...o}=e,i=mn(gn,r),a=vn[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(tn,{...o,ref:t,style:{...o.style,display:"block"}})})});function wn(e){return null!==e}yn.displayName=gn;var xn=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,d=s?0:e.arrowHeight,[u,f]=bn(i),p={start:"0%",center:"50%",end:"100%"}[f],m=((null==(r=l.arrow)?void 0:r.x)??0)+c/2,h=((null==(o=l.arrow)?void 0:o.y)??0)+d/2;let g="",v="";return"bottom"===u?(g=s?p:`${m}px`,v=-d+"px"):"top"===u?(g=s?p:`${m}px`,v=`${a.floating.height+d}px`):"right"===u?(g=-d+"px",v=s?p:`${h}px`):"left"===u&&(g=`${a.floating.width+d}px`,v=s?p:`${h}px`),{data:{x:g,y:v}}}});function bn(e){const[t,n="center"]=e.split("-");return[t,n]}var Sn=cn,Rn=un,Cn=hn,jn=yn;function Nn(e){const r=Pn(e),o=t.forwardRef((e,o)=>{const{children:i,...a}=e,l=t.Children.toArray(i),s=l.find(An);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 Pn(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 Tn=Symbol("radix.slottable");function An(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Tn}function En(e){const n=t.useRef({value:e,previous:e});return t.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}var Dn=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});t.forwardRef((e,t)=>n.jsx(s.span,{...e,ref:t,style:{...Dn,...e.style}})).displayName="VisuallyHidden";var _n=[" ","Enter","ArrowUp","ArrowDown"],In=[" ","Enter"],kn="Select",[On,Ln,Mn]=I(kn),[Fn]=o(kn,[Mn,an]),Hn=an(),[Vn,Wn]=Fn(kn),[Bn,zn]=Fn(kn),$n=e=>{const{__scopeSelect:r,children:o,open:i,defaultOpen:a,onOpenChange:s,value:c,defaultValue:u,onValueChange:f,dir:p,name:m,autoComplete:h,disabled:g,required:v,form:y}=e,w=Hn(r),[x,b]=t.useState(null),[S,C]=t.useState(null),[j,N]=t.useState(!1),P=R(p),[T,A]=d({prop:i,defaultProp:a??!1,onChange:s,caller:kn}),[E,D]=d({prop:c,defaultProp:u,onChange:f,caller:kn}),_=t.useRef(null),I=!x||(y||!!x.closest("form")),[k,O]=t.useState(new Set),L=Array.from(k).map(e=>e.props.value).join(";");return n.jsx(Sn,{...w,children:n.jsxs(Vn,{required:v,scope:r,trigger:x,onTriggerChange:b,valueNode:S,onValueNodeChange:C,valueNodeHasChildren:j,onValueNodeHasChildrenChange:N,contentId:l(),value:E,onValueChange:D,open:T,onOpenChange:A,dir:P,triggerPointerDownPosRef:_,disabled:g,children:[n.jsx(On.Provider,{scope:r,children:n.jsx(Bn,{scope:e.__scopeSelect,onNativeOptionAdd:t.useCallback(e=>{O(t=>new Set(t).add(e))},[]),onNativeOptionRemove:t.useCallback(e=>{O(t=>{const n=new Set(t);return n.delete(e),n})},[]),children:o})}),I?n.jsxs(Er,{"aria-hidden":!0,required:v,tabIndex:-1,name:m,autoComplete:h,value:E,onChange:e=>D(e.target.value),disabled:g,form:y,children:[void 0===E?n.jsx("option",{value:""}):null,Array.from(k)]},L):null]})})};$n.displayName=kn;var Kn="SelectTrigger",Un=t.forwardRef((e,r)=>{const{__scopeSelect:o,disabled:i=!1,...l}=e,d=Hn(o),u=Wn(Kn,o),f=u.disabled||i,p=a(r,u.onTriggerChange),m=Ln(o),h=t.useRef("touch"),[g,v,y]=_r(e=>{const t=m().filter(e=>!e.disabled),n=t.find(e=>e.value===u.value),r=Ir(t,e,n);void 0!==r&&u.onValueChange(r.value)}),w=e=>{f||(u.onOpenChange(!0),y()),e&&(u.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return n.jsx(Rn,{asChild:!0,...d,children:n.jsx(s.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":Dr(u.value)?"":void 0,...l,ref:p,onClick:c(l.onClick,e=>{e.currentTarget.focus(),"mouse"!==h.current&&w(e)}),onPointerDown:c(l.onPointerDown,e=>{h.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(w(e),e.preventDefault())}),onKeyDown:c(l.onKeyDown,e=>{const t=""!==g.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||v(e.key),t&&" "===e.key||_n.includes(e.key)&&(w(),e.preventDefault())})})})});Un.displayName=Kn;var qn="SelectValue",Yn=t.forwardRef((e,t)=>{const{__scopeSelect:r,className:o,style:i,children:l,placeholder:c="",...d}=e,u=Wn(qn,r),{onValueNodeHasChildrenChange:f}=u,p=void 0!==l,m=a(t,u.onValueNodeChange);return h(()=>{f(p)},[f,p]),n.jsx(s.span,{...d,ref:m,style:{pointerEvents:"none"},children:Dr(u.value)?n.jsx(n.Fragment,{children:c}):l})});Yn.displayName=qn;var Gn=t.forwardRef((e,t)=>{const{__scopeSelect:r,children:o,...i}=e;return n.jsx(s.span,{"aria-hidden":!0,...i,ref:t,children:o||"▼"})});Gn.displayName="SelectIcon";var Xn=e=>n.jsx(g,{asChild:!0,...e});Xn.displayName="SelectPortal";var Zn="SelectContent",Jn=t.forwardRef((e,r)=>{const o=Wn(Zn,e.__scopeSelect),[i,a]=t.useState();if(h(()=>{a(new DocumentFragment)},[]),!o.open){const t=i;return t?m.createPortal(n.jsx(er,{scope:e.__scopeSelect,children:n.jsx(On.Slot,{scope:e.__scopeSelect,children:n.jsx("div",{children:e.children})})}),t):null}return n.jsx(rr,{...e,ref:r})});Jn.displayName=Zn;var Qn=10,[er,tr]=Fn(Zn),nr=Nn("SelectContent.RemoveScroll"),rr=t.forwardRef((e,r)=>{const{__scopeSelect:o,position:i="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:s,onPointerDownOutside:d,side:u,sideOffset:f,align:p,alignOffset:m,arrowPadding:h,collisionBoundary:g,collisionPadding:S,sticky:R,hideWhenDetached:C,avoidCollisions:j,...N}=e,P=Wn(Zn,o),[T,A]=t.useState(null),[E,D]=t.useState(null),_=a(r,e=>A(e)),[I,k]=t.useState(null),[O,L]=t.useState(null),M=Ln(o),[F,H]=t.useState(!1),V=t.useRef(!1);t.useEffect(()=>{if(T)return v(T)},[T]),y();const W=t.useCallback(e=>{const[t,...n]=M().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(const i of e){if(i===o)return;if(null==i||i.scrollIntoView({block:"nearest"}),i===t&&E&&(E.scrollTop=0),i===r&&E&&(E.scrollTop=E.scrollHeight),null==i||i.focus(),document.activeElement!==o)return}},[M,E]),B=t.useCallback(()=>W([I,T]),[W,I,T]);t.useEffect(()=>{F&&B()},[F,B]);const{onOpenChange:z,triggerPointerDownPosRef:$}=P;t.useEffect(()=>{if(T){let e={x:0,y:0};const t=t=>{var n,r;e={x:Math.abs(Math.round(t.pageX)-((null==(n=$.current)?void 0:n.x)??0)),y:Math.abs(Math.round(t.pageY)-((null==(r=$.current)?void 0:r.y)??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():T.contains(n.target)||z(!1),document.removeEventListener("pointermove",t),$.current=null};return null!==$.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[T,z,$]),t.useEffect(()=>{const e=()=>z(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[z]);const[K,U]=_r(e=>{const t=M().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=Ir(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),q=t.useCallback((e,t,n)=>{const r=!V.current&&!n;(void 0!==P.value&&P.value===t||r)&&(k(e),r&&(V.current=!0))},[P.value]),Y=t.useCallback(()=>null==T?void 0:T.focus(),[T]),G=t.useCallback((e,t,n)=>{const r=!V.current&&!n;(void 0!==P.value&&P.value===t||r)&&L(e)},[P.value]),X="popper"===i?ir:or,Z=X===ir?{side:u,sideOffset:f,align:p,alignOffset:m,arrowPadding:h,collisionBoundary:g,collisionPadding:S,sticky:R,hideWhenDetached:C,avoidCollisions:j}:{};return n.jsx(er,{scope:o,content:T,viewport:E,onViewportChange:D,itemRefCallback:q,selectedItem:I,onItemLeave:Y,itemTextRefCallback:G,focusSelectedItem:B,selectedItemText:O,position:i,isPositioned:F,searchRef:K,children:n.jsx(w,{as:nr,allowPinchZoom:!0,children:n.jsx(x,{asChild:!0,trapped:P.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:c(l,e=>{var t;null==(t=P.trigger)||t.focus({preventScroll:!0}),e.preventDefault()}),children:n.jsx(b,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:d,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>P.onOpenChange(!1),children:n.jsx(X,{role:"listbox",id:P.contentId,"data-state":P.open?"open":"closed",dir:P.dir,onContextMenu:e=>e.preventDefault(),...N,...Z,onPlaced:()=>H(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...N.style},onKeyDown:c(N.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||U(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=M().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>W(t)),e.preventDefault()}})})})})})})});rr.displayName="SelectContentImpl";var or=t.forwardRef((e,r)=>{const{__scopeSelect:o,onPlaced:i,...l}=e,c=Wn(Zn,o),d=tr(Zn,o),[u,f]=t.useState(null),[p,m]=t.useState(null),g=a(r,e=>m(e)),v=Ln(o),y=t.useRef(!1),w=t.useRef(!0),{viewport:x,selectedItem:b,selectedItemText:S,focusSelectedItem:R}=d,j=t.useCallback(()=>{if(c.trigger&&c.valueNode&&u&&p&&x&&b&&S){const e=c.trigger.getBoundingClientRect(),t=p.getBoundingClientRect(),n=c.valueNode.getBoundingClientRect(),r=S.getBoundingClientRect();if("rtl"!==c.dir){const o=r.left-t.left,i=n.left-o,a=e.left-i,l=e.width+a,s=Math.max(l,t.width),c=window.innerWidth-Qn,d=C(i,[Qn,Math.max(Qn,c-s)]);u.style.minWidth=l+"px",u.style.left=d+"px"}else{const o=t.right-r.right,i=window.innerWidth-n.right-o,a=window.innerWidth-e.right-i,l=e.width+a,s=Math.max(l,t.width),c=window.innerWidth-Qn,d=C(i,[Qn,Math.max(Qn,c-s)]);u.style.minWidth=l+"px",u.style.right=d+"px"}const o=v(),a=window.innerHeight-2*Qn,l=x.scrollHeight,s=window.getComputedStyle(p),d=parseInt(s.borderTopWidth,10),f=parseInt(s.paddingTop,10),m=parseInt(s.borderBottomWidth,10),h=d+f+l+parseInt(s.paddingBottom,10)+m,g=Math.min(5*b.offsetHeight,h),w=window.getComputedStyle(x),R=parseInt(w.paddingTop,10),j=parseInt(w.paddingBottom,10),N=e.top+e.height/2-Qn,P=a-N,T=b.offsetHeight/2,A=d+f+(b.offsetTop+T),E=h-A;if(A<=N){const e=o.length>0&&b===o[o.length-1].ref.current;u.style.bottom="0px";const t=p.clientHeight-x.offsetTop-x.offsetHeight,n=A+Math.max(P,T+(e?j:0)+t+m);u.style.height=n+"px"}else{const e=o.length>0&&b===o[0].ref.current;u.style.top="0px";const t=Math.max(N,d+x.offsetTop+(e?R:0)+T)+E;u.style.height=t+"px",x.scrollTop=A-N+x.offsetTop}u.style.margin=`${Qn}px 0`,u.style.minHeight=g+"px",u.style.maxHeight=a+"px",null==i||i(),requestAnimationFrame(()=>y.current=!0)}},[v,c.trigger,c.valueNode,u,p,x,b,S,c.dir,i]);h(()=>j(),[j]);const[N,P]=t.useState();h(()=>{p&&P(window.getComputedStyle(p).zIndex)},[p]);const T=t.useCallback(e=>{e&&!0===w.current&&(j(),null==R||R(),w.current=!1)},[j,R]);return n.jsx(ar,{scope:o,contentWrapper:u,shouldExpandOnScrollRef:y,onScrollButtonChange:T,children:n.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:n.jsx(s.div,{...l,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});or.displayName="SelectItemAlignedPosition";var ir=t.forwardRef((e,t)=>{const{__scopeSelect:r,align:o="start",collisionPadding:i=Qn,...a}=e,l=Hn(r);return n.jsx(Cn,{...l,...a,ref:t,align:o,collisionPadding:i,style:{boxSizing:"border-box",...a.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)"}})});ir.displayName="SelectPopperPosition";var[ar,lr]=Fn(Zn,{}),sr="SelectViewport",cr=t.forwardRef((e,r)=>{const{__scopeSelect:o,nonce:i,...l}=e,d=tr(sr,o),u=lr(sr,o),f=a(r,d.onViewportChange),p=t.useRef(0);return n.jsxs(n.Fragment,{children:[n.jsx("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}"},nonce:i}),n.jsx(On.Slot,{scope:o,children:n.jsx(s.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:c(l.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=u;if((null==r?void 0:r.current)&&n){const e=Math.abs(p.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*Qn,o=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),a=Math.max(o,i);if(a<r){const o=a+e,i=Math.min(r,o),l=o-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=l>0?l:0,n.style.justifyContent="flex-end")}}}p.current=t.scrollTop})})})]})});cr.displayName=sr;var dr="SelectGroup",[ur,fr]=Fn(dr);t.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,i=l();return n.jsx(ur,{scope:r,id:i,children:n.jsx(s.div,{role:"group","aria-labelledby":i,...o,ref:t})})}).displayName=dr;var pr="SelectLabel",mr=t.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,i=fr(pr,r);return n.jsx(s.div,{id:i.id,...o,ref:t})});mr.displayName=pr;var hr="SelectItem",[gr,vr]=Fn(hr),yr=t.forwardRef((e,r)=>{const{__scopeSelect:o,value:i,disabled:d=!1,textValue:u,...f}=e,p=Wn(hr,o),m=tr(hr,o),h=p.value===i,[g,v]=t.useState(u??""),[y,w]=t.useState(!1),x=a(r,e=>{var t;return null==(t=m.itemRefCallback)?void 0:t.call(m,e,i,d)}),b=l(),S=t.useRef("touch"),R=()=>{d||(p.onValueChange(i),p.onOpenChange(!1))};if(""===i)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return n.jsx(gr,{scope:o,value:i,disabled:d,textId:b,isSelected:h,onItemTextChange:t.useCallback(e=>{v(t=>t||((null==e?void 0:e.textContent)??"").trim())},[]),children:n.jsx(On.ItemSlot,{scope:o,value:i,disabled:d,textValue:g,children:n.jsx(s.div,{role:"option","aria-labelledby":b,"data-highlighted":y?"":void 0,"aria-selected":h&&y,"data-state":h?"checked":"unchecked","aria-disabled":d||void 0,"data-disabled":d?"":void 0,tabIndex:d?void 0:-1,...f,ref:x,onFocus:c(f.onFocus,()=>w(!0)),onBlur:c(f.onBlur,()=>w(!1)),onClick:c(f.onClick,()=>{"mouse"!==S.current&&R()}),onPointerUp:c(f.onPointerUp,()=>{"mouse"===S.current&&R()}),onPointerDown:c(f.onPointerDown,e=>{S.current=e.pointerType}),onPointerMove:c(f.onPointerMove,e=>{var t;S.current=e.pointerType,d?null==(t=m.onItemLeave)||t.call(m):"mouse"===S.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:c(f.onPointerLeave,e=>{var t;e.currentTarget===document.activeElement&&(null==(t=m.onItemLeave)||t.call(m))}),onKeyDown:c(f.onKeyDown,e=>{var t;""!==(null==(t=m.searchRef)?void 0:t.current)&&" "===e.key||(In.includes(e.key)&&R()," "===e.key&&e.preventDefault())})})})})});yr.displayName=hr;var wr="SelectItemText",xr=t.forwardRef((e,r)=>{const{__scopeSelect:o,className:i,style:l,...c}=e,d=Wn(wr,o),u=tr(wr,o),f=vr(wr,o),p=zn(wr,o),[g,v]=t.useState(null),y=a(r,e=>v(e),f.onItemTextChange,e=>{var t;return null==(t=u.itemTextRefCallback)?void 0:t.call(u,e,f.value,f.disabled)}),w=null==g?void 0:g.textContent,x=t.useMemo(()=>n.jsx("option",{value:f.value,disabled:f.disabled,children:w},f.value),[f.disabled,f.value,w]),{onNativeOptionAdd:b,onNativeOptionRemove:S}=p;return h(()=>(b(x),()=>S(x)),[b,S,x]),n.jsxs(n.Fragment,{children:[n.jsx(s.span,{id:f.textId,...c,ref:y}),f.isSelected&&d.valueNode&&!d.valueNodeHasChildren?m.createPortal(c.children,d.valueNode):null]})});xr.displayName=wr;var br="SelectItemIndicator",Sr=t.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e;return vr(br,r).isSelected?n.jsx(s.span,{"aria-hidden":!0,...o,ref:t}):null});Sr.displayName=br;var Rr="SelectScrollUpButton",Cr=t.forwardRef((e,r)=>{const o=tr(Rr,e.__scopeSelect),i=lr(Rr,e.__scopeSelect),[l,s]=t.useState(!1),c=a(r,i.onScrollButtonChange);return h(()=>{if(o.viewport&&o.isPositioned){let e=function(){const e=t.scrollTop>0;s(e)};const t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),l?n.jsx(Pr,{...e,ref:c,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});Cr.displayName=Rr;var jr="SelectScrollDownButton",Nr=t.forwardRef((e,r)=>{const o=tr(jr,e.__scopeSelect),i=lr(jr,e.__scopeSelect),[l,s]=t.useState(!1),c=a(r,i.onScrollButtonChange);return h(()=>{if(o.viewport&&o.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;s(n)};const t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),l?n.jsx(Pr,{...e,ref:c,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});Nr.displayName=jr;var Pr=t.forwardRef((e,r)=>{const{__scopeSelect:o,onAutoScroll:i,...a}=e,l=tr("SelectScrollButton",o),d=t.useRef(null),u=Ln(o),f=t.useCallback(()=>{null!==d.current&&(window.clearInterval(d.current),d.current=null)},[]);return t.useEffect(()=>()=>f(),[f]),h(()=>{var e;const t=u().find(e=>e.ref.current===document.activeElement);null==(e=null==t?void 0:t.ref.current)||e.scrollIntoView({block:"nearest"})},[u]),n.jsx(s.div,{"aria-hidden":!0,...a,ref:r,style:{flexShrink:0,...a.style},onPointerDown:c(a.onPointerDown,()=>{null===d.current&&(d.current=window.setInterval(i,50))}),onPointerMove:c(a.onPointerMove,()=>{var e;null==(e=l.onItemLeave)||e.call(l),null===d.current&&(d.current=window.setInterval(i,50))}),onPointerLeave:c(a.onPointerLeave,()=>{f()})})}),Tr=t.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e;return n.jsx(s.div,{"aria-hidden":!0,...o,ref:t})});Tr.displayName="SelectSeparator";var Ar="SelectArrow";t.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,i=Hn(r),a=Wn(Ar,r),l=tr(Ar,r);return a.open&&"popper"===l.position?n.jsx(jn,{...i,...o,ref:t}):null}).displayName=Ar;var Er=t.forwardRef(({__scopeSelect:e,value:r,...o},i)=>{const l=t.useRef(null),c=a(i,l),d=En(r);return t.useEffect(()=>{const e=l.current;if(!e)return;const t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(d!==r&&n){const t=new Event("change",{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}},[d,r]),n.jsx(s.select,{...o,style:{...Dn,...o.style},ref:c,defaultValue:r})});function Dr(e){return""===e||void 0===e}function _r(e){const n=u(e),r=t.useRef(""),o=t.useRef(0),i=t.useCallback(e=>{const t=r.current+e;n(t),function e(t){r.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout(()=>e(""),1e3))}(t)},[n]),a=t.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return t.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,i,a]}function Ir(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=(a=e,l=Math.max(o,0),a.map((e,t)=>a[(l+t)%a.length]));var a,l;1===r.length&&(i=i.filter(e=>e!==n));const s=i.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return s!==n?s:void 0}Er.displayName="SelectBubbleInput";var kr=Un,Or=Gn,Lr=Xn,Mr=Jn,Fr=cr,Hr=mr,Vr=yr,Wr=xr,Br=Sr,zr=Cr,$r=Nr,Kr=Tr;const Ur=$n,qr=Yn,Yr=t.forwardRef(({className:e,children:t,...r},o)=>n.jsxs(kr,{ref:o,className:p("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,n.jsx(Or,{asChild:!0,children:n.jsx(N,{className:"h-4 w-4 opacity-50"})})]}));Yr.displayName=kr.displayName;const Gr=t.forwardRef(({className:e,...t},r)=>n.jsx(zr,{ref:r,className:p("flex cursor-default items-center justify-center py-1",e),...t,children:n.jsx(j,{className:"h-4 w-4"})}));Gr.displayName=zr.displayName;const Xr=t.forwardRef(({className:e,...t},r)=>n.jsx($r,{ref:r,className:p("flex cursor-default items-center justify-center py-1",e),...t,children:n.jsx(N,{className:"h-4 w-4"})}));Xr.displayName=$r.displayName;const Zr=t.forwardRef(({className:e,children:t,position:r="popper",...o},i)=>n.jsx(Lr,{children:n.jsxs(Mr,{ref:i,className:p("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...o,children:[n.jsx(Gr,{}),n.jsx(Fr,{className:p("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),n.jsx(Xr,{})]})}));Zr.displayName=Mr.displayName;t.forwardRef(({className:e,...t},r)=>n.jsx(Hr,{ref:r,className:p("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t})).displayName=Hr.displayName;const Jr=t.forwardRef(({className:e,children:t,...r},o)=>n.jsxs(Vr,{ref:o,className:p("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[n.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsx(Br,{children:n.jsx(S,{className:"h-4 w-4"})})}),n.jsx(Wr,{children:t})]}));Jr.displayName=Vr.displayName;t.forwardRef(({className:e,...t},r)=>n.jsx(Kr,{ref:r,className:p("-mx-1 my-1 h-px bg-muted",e),...t})).displayName=Kr.displayName;export{Rn as A,Cn as C,Z as I,Sn as R,P as S,he as T,T as U,ge as a,ve as b,ye as c,an as d,W as e,I as f,X as g,jn as h,Ur as i,Yr as j,qr as k,Zr as l,Jr as m,nn as n,En as u};
|
package/frontend/dist/index.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
11
11
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
|
12
12
|
<title>CC Web</title>
|
|
13
|
-
<script type="module" crossorigin src="/assets/index-
|
|
13
|
+
<script type="module" crossorigin src="/assets/index-DtlKk29C.js"></script>
|
|
14
14
|
<link rel="stylesheet" crossorigin href="/assets/index-B55CtERr.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
package/package.json
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{c as e,r as s,a8 as t,b3 as a,j as n,aa as c,a9 as l,a5 as i,d as r,aH as o,aJ as d,b4 as h,t as m,a0 as u,I as x,B as p,U as g,X as j,D as b,b5 as y,b6 as f,b7 as _,b8 as v,u as k,b9 as N,T as w,ba as C,bb as S,bc as M,bd as T,be as E,aI as R,bf as I,bg as P,i as H,S as F,bh as L,aD as z,L as A,s as q,bi as U}from"./index-nYsy3LMF.js";import{u as V,n as G,i as O,j as B,k as D,l as Q,m as W,S as Z,U as $,E as J,T as X,a as K,b as Y,c as ee}from"./select-BOLkADQv.js";import{C as se}from"./index-DsYny3RQ.js";import"./chevron-down-B3q2CU-d.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 te=e("Activity",[["path",{d:"M22 12h-4l-3 9L9 3l-3 9H2",key:"d5dnw9"}]]),ae=e("AlertTriangle",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),ne=e("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]),ce=e("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]),le=e("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]),ie=e("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]),re=e("UploadCloud",[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M12 12v9",key:"192myk"}],["path",{d:"m16 16-4-4-4 4",key:"119tzi"}]]);
|
|
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
|
-
*/var oe="Switch",[de]=i(oe),[he,me]=de(oe),ue=s.forwardRef((e,i)=>{const{__scopeSwitch:r,name:o,checked:d,defaultChecked:h,required:m,disabled:u,value:x="on",onCheckedChange:p,form:g,...j}=e,[b,y]=s.useState(null),f=t(i,e=>y(e)),_=s.useRef(!1),v=!b||(g||!!b.closest("form")),[k,N]=a({prop:d,defaultProp:h??!1,onChange:p,caller:oe});return n.jsxs(he,{scope:r,checked:k,disabled:u,children:[n.jsx(c.button,{type:"button",role:"switch","aria-checked":k,"aria-required":m,"data-state":je(k),"data-disabled":u?"":void 0,disabled:u,value:x,...j,ref:f,onClick:l(e.onClick,e=>{N(e=>!e),v&&(_.current=e.isPropagationStopped(),_.current||e.stopPropagation())})}),v&&n.jsx(ge,{control:b,bubbles:!_.current,name:o,value:x,checked:k,required:m,disabled:u,form:g,style:{transform:"translateX(-100%)"}})]})});ue.displayName=oe;var xe="SwitchThumb",pe=s.forwardRef((e,s)=>{const{__scopeSwitch:t,...a}=e,l=me(xe,t);return n.jsx(c.span,{"data-state":je(l.checked),"data-disabled":l.disabled?"":void 0,...a,ref:s})});pe.displayName=xe;var ge=s.forwardRef(({__scopeSwitch:e,control:a,checked:c,bubbles:l=!0,...i},r)=>{const o=s.useRef(null),d=t(o,r),h=V(c),m=G(a);return s.useEffect(()=>{const e=o.current;if(!e)return;const s=window.HTMLInputElement.prototype,t=Object.getOwnPropertyDescriptor(s,"checked").set;if(h!==c&&t){const s=new Event("click",{bubbles:l});t.call(e,c),e.dispatchEvent(s)}},[h,c,l]),n.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:c,...i,tabIndex:-1,ref:d,style:{...i.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function je(e){return e?"checked":"unchecked"}ge.displayName="SwitchBubbleInput";var be=ue,ye=pe;const fe=s.forwardRef(({className:e,...s},t)=>n.jsx(be,{className:r("peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...s,ref:t,children:n.jsx(ye,{className:r("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));fe.displayName=be.displayName;function _e(){const{t:e}=o(),[t,a]=s.useState(null),[c,l]=s.useState(!0),[i,r]=s.useState(!1),[k,N]=s.useState(!1),[w,C]=s.useState(!1),[S,M]=s.useState(!1),[T,E]=s.useState(null),[R,I]=s.useState(0),[P,H]=s.useState(""),[F,L]=s.useState("");d({onStart:e=>{E(e.projectId),I(0)},onProgress:e=>{E(e.projectId),I(e.filesTransferred)},onDone:()=>{E(null),I(0)}}),s.useEffect(()=>{let s=!1;return h().then(e=>{s||(a(e),L(e.defaultExcludes.join("\n")))}).catch(s=>m.error(e("sync_section.load_failed",{message:s.message}))).finally(()=>{s||l(!1)}),()=>{s=!0}},[e]);const z=(e,s)=>{a(t=>t?{...t,[e]:s}:t)};return c||!t?n.jsx("div",{className:"text-sm text-muted-foreground",children:e("sync_section.loading")}):n.jsxs("div",{className:"space-y-5",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-sm font-semibold mb-3",children:e("sync_section.server_section")}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[n.jsxs("div",{children:[n.jsx(u,{htmlFor:"sync-host",children:e("sync_section.host")}),n.jsx(x,{id:"sync-host",value:t.host,onChange:e=>z("host",e.target.value),placeholder:"example.com"})]}),n.jsxs("div",{children:[n.jsx(u,{htmlFor:"sync-port",children:e("sync_section.port")}),n.jsx(x,{id:"sync-port",type:"number",value:t.port,onChange:e=>z("port",Number(e.target.value)||22)})]}),n.jsxs("div",{children:[n.jsx(u,{htmlFor:"sync-user",children:e("sync_section.user")}),n.jsx(x,{id:"sync-user",value:t.user,onChange:e=>z("user",e.target.value),placeholder:"tom"})]}),n.jsxs("div",{children:[n.jsx(u,{htmlFor:"sync-remote",children:e("sync_section.remote_root")}),n.jsx(x,{id:"sync-remote",value:t.remoteRoot,onChange:e=>z("remoteRoot",e.target.value),placeholder:"/data/projects"}),n.jsx("p",{className:"text-xs text-muted-foreground mt-1",dangerouslySetInnerHTML:{__html:e("sync_section.remote_root_hint")}})]})]})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-sm font-semibold mb-3",children:e("sync_section.auth_section")}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[n.jsxs("div",{children:[n.jsx(u,{children:e("sync_section.auth_method")}),n.jsxs(O,{value:t.authMethod,onValueChange:e=>z("authMethod",e),children:[n.jsx(B,{children:n.jsx(D,{})}),n.jsxs(Q,{children:[n.jsx(W,{value:"key",children:"SSH key"}),n.jsx(W,{value:"password",children:e("sync_section.auth_password")})]})]})]}),"key"===t.authMethod?n.jsxs("div",{children:[n.jsx(u,{htmlFor:"sync-key",children:e("sync_section.key_path")}),n.jsx(x,{id:"sync-key",value:t.keyPath??"",onChange:e=>z("keyPath",e.target.value),placeholder:"~/.ssh/id_rsa"})]}):n.jsxs("div",{children:[n.jsx(u,{htmlFor:"sync-pw",children:e("sync_section.password")}),n.jsx(x,{id:"sync-pw",type:"password",value:P,onChange:e=>H(e.target.value),placeholder:t.passwordSet?e("sync_section.password_set_placeholder"):e("sync_section.password_unset_placeholder")}),n.jsx("p",{className:"text-xs text-muted-foreground mt-1",dangerouslySetInnerHTML:{__html:e("sync_section.sshpass_hint")}})]})]})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-sm font-semibold mb-3",children:e("sync_section.strategy_section")}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[n.jsxs("div",{children:[n.jsx(u,{children:e("sync_section.direction")}),n.jsxs(O,{value:t.direction,onValueChange:e=>z("direction",e),children:[n.jsx(B,{children:n.jsx(D,{})}),n.jsxs(Q,{children:[n.jsx(W,{value:"push",children:e("sync_section.push_label")}),n.jsx(W,{value:"pull",children:e("sync_section.pull_label")}),n.jsx(W,{value:"bidirectional",children:e("sync_section.bidirectional_label")})]})]})]}),n.jsxs("div",{className:"flex items-end gap-2",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx(u,{htmlFor:"sync-cron",children:e("sync_section.cron_label")}),n.jsx(x,{id:"sync-cron",value:t.schedule.cron,onChange:e=>z("schedule",{...t.schedule,cron:e.target.value}),placeholder:"0 3 * * *"}),n.jsx("p",{className:"text-xs text-muted-foreground mt-1",dangerouslySetInnerHTML:{__html:e("sync_section.cron_hint")}})]}),n.jsxs("div",{className:"flex items-center gap-2 pb-1.5",children:[n.jsx(fe,{checked:t.schedule.enabled,onCheckedChange:e=>z("schedule",{...t.schedule,enabled:e})}),n.jsx("span",{className:"text-xs text-muted-foreground",children:e("sync_section.enable_label")})]})]})]})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-sm font-semibold mb-3",children:e("sync_section.exclude_section")}),n.jsx("textarea",{value:F,onChange:e=>L(e.target.value),rows:6,className:"w-full font-mono text-xs p-2 rounded border border-input bg-background resize-y",placeholder:"node_modules/\n.git/objects/\n*.log"}),n.jsx("p",{className:"text-xs text-muted-foreground mt-1",dangerouslySetInnerHTML:{__html:e("sync_section.exclude_hint")}})]}),n.jsxs("div",{className:"flex flex-wrap gap-2 pt-2 border-t",children:[n.jsxs(p,{onClick:()=>{(async()=>{if(t){r(!0);try{const s=F.split("\n").map(e=>e.trim()).filter(Boolean),n={host:t.host,port:t.port,user:t.user,authMethod:t.authMethod,keyPath:t.keyPath,remoteRoot:t.remoteRoot,direction:t.direction,defaultExcludes:s,schedule:t.schedule};P&&"__keep__"!==P&&(n.password=P);const c=await y(n);a(c),L(c.defaultExcludes.join("\n")),H(""),m.success(e("sync_section.saved"))}catch(s){m.error(e("sync_section.save_failed",{message:s.message}))}finally{r(!1)}}})()},disabled:i,children:[i?n.jsx(g,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}):n.jsx(Z,{className:"h-3.5 w-3.5 mr-1.5"}),e("sync_section.save_button")]}),n.jsxs(p,{variant:"outline",onClick:()=>{(async()=>{N(!0);try{const s=await f();s.ok?m.success(s.message||e("sync_section.test_ok")):m.error(s.message||e("sync_section.test_failed"))}catch(s){m.error(e("sync_section.test_failed_with_reason",{message:s.message}))}finally{N(!1)}})()},disabled:k,children:[k?n.jsx(g,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}):n.jsx(ie,{className:"h-3.5 w-3.5 mr-1.5"}),e("sync_section.test_button")]}),n.jsx("div",{className:"flex-1"}),w&&T&&n.jsx("span",{className:"text-xs text-muted-foreground self-center mr-1 tabular-nums",children:R>0?e("sync_section.syncing_with_files",{project:T,files:R}):e("sync_section.syncing_no_files",{project:T})}),n.jsxs(p,{variant:"outline",onClick:()=>{(async()=>{C(!0);try{const s=await _(),t=s.results.filter(e=>e.ok).length,a=s.results.filter(e=>e.skipped).length,n=s.results.filter(e=>"cancelled"===e.reason).length,c=s.total-t-a-n;n>0?m.info(e("sync_section.bulk_cancelled_toast",{ok:t,skipped:a,cancelled:n,failed:c})):m.success(e("sync_section.bulk_done_toast",{ok:t,skipped:a,failed:c}))}catch(s){m.error(e("sync_section.bulk_failed_toast",{message:s.message}))}finally{C(!1),M(!1),E(null),I(0)}})()},disabled:w,title:e("sync_section.sync_all_title"),children:[w?n.jsx(g,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}):n.jsx($,{className:"h-3.5 w-3.5 mr-1.5"}),e("sync_section.sync_all_button")]}),w&&n.jsxs(p,{variant:"outline",onClick:()=>{(async()=>{if(w&&!S){M(!0);try{await v(),m.info(e("sync_section.cancel_requested"))}catch(s){m.error(e("sync_section.cancel_failed",{message:s.message})),M(!1)}}})()},disabled:S,title:e("sync_section.cancel_button_title"),children:[S?n.jsx(g,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}):n.jsx(j,{className:"h-3.5 w-3.5 mr-1.5"}),e("sync_section.cancel_button")]})]}),n.jsxs("div",{className:"border-t pt-4 text-xs text-muted-foreground",children:["Per-project push/pull: from inside a project, click the ",n.jsx($,{className:"inline h-3 w-3"})," / ",n.jsx(b,{className:"inline h-3 w-3"})," buttons in the header. Or call ",n.jsx("code",{children:"POST /api/sync/project/:id"})," with body ",n.jsx("code",{children:'{ "direction": "push" }'}),"."]})]})}function ve(){const e=k(),[t,a]=s.useState(null),[c,l]=s.useState(!0),[i,r]=s.useState(""),[o,d]=s.useState(!1);s.useEffect(()=>{let e=!1;return N().then(s=>{e||a(s)}).catch(()=>{e||a({configured:!1,needsReset:!1})}).finally(()=>{e||l(!1)}),()=>{e=!0}},[]);return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-sm font-semibold mb-1",children:"CCWeb Hub 直接提交"}),n.jsxs("p",{className:"text-xs text-muted-foreground",children:['配置你的 GitHub PAT 后,在 Quick Prompts / Agent Prompts 卡片右键选择"共享"时可一键直接提交 Issue 到 ',n.jsx("code",{children:"zbc0315/ccweb-hub"}),"。 ccweb 本身不自带 token —— 使用你自己的账号身份提交,归属清晰,互不影响。"]})]}),c?n.jsxs("div",{className:"text-sm text-muted-foreground flex items-center gap-2",children:[n.jsx(g,{className:"h-4 w-4 animate-spin"}),"加载中…"]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"rounded-md border px-3 py-2.5 text-xs flex items-center gap-2",children:(null==t?void 0:t.configured)?n.jsxs(n.Fragment,{children:[n.jsx(se,{className:"h-4 w-4 text-green-500 shrink-0"}),n.jsx("span",{children:"已配置 token,可直接提交"}),n.jsx("div",{className:"flex-1"}),n.jsxs(p,{size:"sm",variant:"outline",onClick:()=>{(async()=>{if(await e({title:"清除 Hub Token",description:"清除后将无法直接提交到 ccweb-hub,需要重新配置 token。确认?",destructive:!0,confirmLabel:"清除"}))try{await C(),a({configured:!1,needsReset:!1}),m.success("已清除")}catch(s){m.error(`清除失败: ${s.message}`)}})()},children:[n.jsx(w,{className:"h-3.5 w-3.5 mr-1"}),"清除"]})]}):(null==t?void 0:t.needsReset)?n.jsxs(n.Fragment,{children:[n.jsx(ae,{className:"h-4 w-4 text-amber-500 shrink-0"}),n.jsx("span",{children:"之前的 token 已失效(服务端密钥可能已轮换),请重新设置"})]}):n.jsxs(n.Fragment,{children:[n.jsx(ae,{className:"h-4 w-4 text-muted-foreground shrink-0"}),n.jsx("span",{children:"尚未配置 token"})]})}),n.jsxs("div",{className:"rounded-md border bg-muted/30 px-3 py-2.5 text-xs space-y-2",children:[n.jsx("div",{className:"font-medium text-foreground",children:"如何获取 token"}),n.jsxs("ol",{className:"list-decimal list-inside space-y-1 text-muted-foreground",children:[n.jsxs("li",{children:["打开"," ",n.jsxs("a",{href:"https://github.com/settings/personal-access-tokens/new",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:underline inline-flex items-center gap-0.5",children:["GitHub fine-grained PAT",n.jsx(J,{className:"h-3 w-3"})]})," ","创建页"]}),n.jsxs("li",{children:[n.jsx("strong",{className:"text-foreground",children:"Repository access"}),':选 "Only select repositories",添加 ',n.jsx("code",{children:"zbc0315/ccweb-hub"})]}),n.jsxs("li",{children:[n.jsx("strong",{className:"text-foreground",children:"Repository permissions → Issues"}),':设置为 "Read and write"']}),n.jsx("li",{children:"其余权限保持默认(全部无访问)"}),n.jsx("li",{children:"生成后复制 token 粘贴到下方"})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs(u,{htmlFor:"hub-token",className:"text-xs",children:["GitHub Token ",(null==t?void 0:t.configured)&&n.jsx("span",{className:"text-muted-foreground",children:"(填写会覆盖现有 token)"})]}),n.jsx(x,{id:"hub-token",type:"password",placeholder:"github_pat_...",value:i,onChange:e=>r(e.target.value),autoComplete:"off",spellCheck:!1}),n.jsxs("p",{className:"text-xs text-muted-foreground",children:["Token 以 AES-256-GCM 加密存储于 ",n.jsx("code",{children:"~/.ccweb/hub-auth/"}),";per-user 独立,不会被其他用户读到。"]})]}),n.jsx("div",{className:"flex gap-2 pt-2 border-t",children:n.jsxs(p,{onClick:()=>{(async()=>{const e=i.trim();if(e){d(!0);try{const s=await S(e);a(s),r(""),m.success("已保存")}catch(s){m.error(`保存失败: ${s.message}`)}finally{d(!1)}}else m.error("请输入 token")})()},disabled:o||!i.trim(),children:[o?n.jsx(g,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}):n.jsx(Z,{className:"h-3.5 w-3.5 mr-1.5"}),"保存"]})})]})]})}function ke(){const{t:e,i18n:s}=o();return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(le,{className:"h-4 w-4 text-muted-foreground"}),n.jsxs(O,{value:s.language,onValueChange:async t=>{if(M.includes(t)){try{localStorage.setItem(T,t)}catch{}await s.changeLanguage(t);try{await E(t)}catch{m.error(e("language.switch_failed"))}}},children:[n.jsx(B,{className:"w-40",children:n.jsx(D,{})}),n.jsxs(Q,{children:[n.jsx(W,{value:"zh",children:e("language.zh")}),n.jsx(W,{value:"en",children:e("language.en")})]})]})]})}function Ne(){const{t:e}=o(),t=R(),[a]=I(),c=a.get("tab")||"sync",[l,i]=s.useState(()=>P()),[r,d]=s.useState(!1),[h,g]=s.useState({webhookEnabled:!1}),[j,b]=s.useState(""),[y,f]=s.useState(!1),[_,v]=s.useState(()=>H(F.usageMonitorTool,"claude"));s.useEffect(()=>{L().then(e=>{g(e),b(e.webhookUrl??"")}).catch(()=>{})},[]);const k=(e,s)=>{const t=parseInt(s,10);isNaN(t)||t<1||(i(s=>({...s,[e]:t})),d(!0))};return n.jsx("div",{className:"min-h-screen bg-background",children:n.jsxs("div",{className:"max-w-3xl mx-auto p-6",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[n.jsxs(p,{variant:"ghost",size:"sm",onClick:()=>t("/"),children:[n.jsx(z,{className:"h-4 w-4 mr-1"}),e("common.back")]}),n.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:e("settings.title")})]}),n.jsxs(X,{defaultValue:c,children:[n.jsxs(K,{className:"mb-4",children:[n.jsxs(Y,{value:"sync",children:[n.jsx(re,{className:"h-3.5 w-3.5 mr-1.5"}),e("settings.tab_sync")]}),n.jsxs(Y,{value:"hub",children:[n.jsx(ce,{className:"h-3.5 w-3.5 mr-1.5"}),e("settings.tab_hub")]}),n.jsxs(Y,{value:"notifications",children:[n.jsx(ne,{className:"h-3.5 w-3.5 mr-1.5"}),e("settings.tab_notifications")]}),n.jsxs(Y,{value:"pomodoro",children:[n.jsx(A,{className:"h-3.5 w-3.5 mr-1.5"}),e("settings.tab_pomodoro")]}),n.jsxs(Y,{value:"usage",children:[n.jsx(te,{className:"h-3.5 w-3.5 mr-1.5"}),e("settings.tab_usage")]}),n.jsxs(Y,{value:"language",children:[n.jsx(le,{className:"h-3.5 w-3.5 mr-1.5"}),e("settings.tab_language")]})]}),n.jsx(ee,{value:"sync",children:n.jsx(_e,{})}),n.jsx(ee,{value:"hub",children:n.jsx(ve,{})}),n.jsx(ee,{value:"notifications",children:n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"rounded-xl border border-border p-4 space-y-2",children:[n.jsx("h3",{className:"text-sm font-medium",children:e("settings.browser_notify.title")}),n.jsx("p",{className:"text-xs text-muted-foreground",children:e("settings.browser_notify.description")})]}),n.jsxs("div",{className:"rounded-xl border border-border p-4 space-y-3",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-sm font-medium",children:e("settings.webhook.title")}),n.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:e("settings.webhook.description")})]}),n.jsxs("div",{className:"space-y-1.5",children:[n.jsx(u,{className:"text-xs",children:"Webhook URL"}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(x,{placeholder:"https://hooks.slack.com/...",value:j,onChange:e=>b(e.target.value),className:"font-mono text-xs"}),n.jsx(p,{size:"sm",onClick:()=>{(async()=>{f(!0);try{const s=await U({webhookEnabled:j.trim().length>0,webhookUrl:j.trim()||void 0});g(s),m.success(e("settings.webhook.saved"))}catch{m.error(e("settings.webhook.save_failed"))}finally{f(!1)}})()},disabled:y,children:e(y?"common.saving":"common.save")})]}),h.webhookEnabled&&h.webhookUrl&&n.jsxs("p",{className:"text-xs text-green-500",children:[e("settings.webhook.enabled_prefix")," ",h.webhookUrl]})]})]})]})}),n.jsx(ee,{value:"pomodoro",children:n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"rounded-xl border border-border p-4 space-y-4",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-sm font-medium",children:e("settings.pomodoro.section_title")}),n.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:e("settings.pomodoro.section_desc")})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-6 max-w-xs",children:[n.jsxs("div",{className:"space-y-1.5",children:[n.jsx(u,{className:"text-xs",children:e("settings.pomodoro.work_minutes")}),n.jsx(x,{type:"number",min:1,max:120,value:l.workMinutes,onChange:e=>k("workMinutes",e.target.value),className:"w-full"})]}),n.jsxs("div",{className:"space-y-1.5",children:[n.jsx(u,{className:"text-xs",children:e("settings.pomodoro.break_minutes")}),n.jsx(x,{type:"number",min:1,max:60,value:l.breakMinutes,onChange:e=>k("breakMinutes",e.target.value),className:"w-full"})]})]}),r&&n.jsxs(p,{size:"sm",onClick:()=>{q(F.pomodoroConfig,l,!0),d(!1),m.success(e("settings.pomodoro.saved"))},children:[n.jsx(Z,{className:"h-3.5 w-3.5 mr-1.5"}),e("common.save")]})]}),n.jsxs("div",{className:"rounded-xl border border-border p-4 space-y-2",children:[n.jsx("h3",{className:"text-sm font-medium",children:e("settings.pomodoro.howto_title")}),n.jsxs("ul",{className:"text-xs text-muted-foreground space-y-1 list-disc list-inside",children:[n.jsxs("li",{children:[n.jsx(A,{className:"h-3 w-3 inline-block mx-0.5"})," ",e("settings.pomodoro.howto_item_1")]}),n.jsx("li",{children:e("settings.pomodoro.howto_item_2")}),n.jsx("li",{children:e("settings.pomodoro.howto_item_3")}),n.jsx("li",{children:e("settings.pomodoro.howto_item_4")}),n.jsx("li",{children:e("settings.pomodoro.howto_item_5")})]})]})]})}),n.jsx(ee,{value:"usage",children:n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"rounded-xl border border-border p-4 space-y-4",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-sm font-medium",children:e("settings.usage.section_title")}),n.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:e("settings.usage.section_desc")})]}),n.jsx("div",{className:"grid gap-3 max-w-md",children:[{key:"claude",label:"Claude Code",desc:e("settings.usage.tool_claude_desc")},{key:"codex",label:"Codex",desc:e("settings.usage.tool_codex_desc")},{key:"opencode",label:"OpenCode",desc:e("settings.usage.tool_opencode_desc")},{key:"qwen",label:"Qwen Code",desc:e("settings.usage.tool_qwen_desc")},{key:"gemini",label:"Gemini CLI",desc:e("settings.usage.tool_gemini_desc")}].map(s=>n.jsxs("label",{className:"flex items-start gap-3 rounded-md border p-3 cursor-pointer transition-colors "+(_===s.key?"border-blue-500/50 bg-blue-500/5":"border-border hover:bg-muted/30"),children:[n.jsx("input",{type:"radio",name:"usageTool",value:s.key,checked:_===s.key,onChange:()=>{v(s.key),q(F.usageMonitorTool,s.key),window.dispatchEvent(new Event("ccweb:usage-tool-change")),m.success(e("settings.usage.switched_toast",{tool:s.label}))},className:"mt-0.5"}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm font-medium",children:s.label}),n.jsx("div",{className:"text-xs text-muted-foreground",children:s.desc})]})]},s.key))})]}),n.jsxs("div",{className:"rounded-xl border border-border p-4 space-y-2",children:[n.jsx("h3",{className:"text-sm font-medium",children:e("settings.usage.info_title")}),n.jsxs("ul",{className:"text-xs text-muted-foreground space-y-1 list-disc list-inside",children:[n.jsx("li",{children:e("settings.usage.info_item_1")}),n.jsx("li",{children:e("settings.usage.info_item_2")}),n.jsx("li",{children:e("settings.usage.info_item_3")}),n.jsx("li",{children:e("settings.usage.info_item_4")})]})]})]})}),n.jsx(ee,{value:"language",children:n.jsx("div",{className:"space-y-6",children:n.jsxs("div",{className:"rounded-xl border border-border p-4 space-y-3",children:[n.jsx("div",{children:n.jsx("h3",{className:"text-sm font-medium",children:e("language.label")})}),n.jsx(ke,{})]})})})]})]})})}export{Ne as SettingsPage};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{c as e,r as t,j as n,a3 as r,a5 as o,R as i,a8 as a,bj as l,aa as s,a9 as c,b3 as d,a4 as u,a6 as f,d as p,aY as m,bk as h,a7 as g,ab as v,ad as y,ae as w,af as x,ag as b,y as S}from"./index-nYsy3LMF.js";import{u as R,c as C,a as j}from"./index-DsYny3RQ.js";import{C as N}from"./chevron-down-B3q2CU-d.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 P=e("ExternalLink",[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]]),T=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"}]]),A=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 E(e){const r=D(e),o=t.forwardRef((e,o)=>{const{children:i,...a}=e,l=t.Children.toArray(i),s=l.find(_);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 D(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 k=Symbol("radix.slottable");function _(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===k}function I(e){const t=e+"CollectionProvider",[r,l]=o(t),[s,c]=r(t,{collectionRef:{current:null},itemMap:new Map}),d=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})};d.displayName=t;const u=e+"CollectionSlot",f=E(u),p=i.forwardRef((e,t)=>{const{scope:r,children:o}=e,i=c(u,r),l=a(t,i.collectionRef);return n.jsx(f,{ref:l,children:o})});p.displayName=u;const m=e+"CollectionItemSlot",h="data-radix-collection-item",g=E(m),v=i.forwardRef((e,t)=>{const{scope:r,children:o,...l}=e,s=i.useRef(null),d=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:d,children:o})});return v.displayName=m,[{Provider:d,Slot:p,ItemSlot:v},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 O="rovingFocusGroup.onEntryFocus",L={bubbles:!1,cancelable:!0},M="RovingFocusGroup",[F,H,V]=I(M),[W,B]=o(M,[V]),[z,$]=W(M),K=t.forwardRef((e,t)=>n.jsx(F.Provider,{scope:e.__scopeRovingFocusGroup,children:n.jsx(F.Slot,{scope:e.__scopeRovingFocusGroup,children:n.jsx(q,{...e,ref:t})})}));K.displayName=M;var q=t.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:o,orientation:i,loop:l=!1,dir:f,currentTabStopId:p,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:h,onEntryFocus:g,preventScrollOnEntryFocus:v=!1,...y}=e,w=t.useRef(null),x=a(r,w),b=R(f),[S,C]=d({prop:p,defaultProp:m??null,onChange:h,caller:M}),[j,N]=t.useState(!1),P=u(g),T=H(o),A=t.useRef(!1),[E,D]=t.useState(0);return t.useEffect(()=>{const e=w.current;if(e)return e.addEventListener(O,P),()=>e.removeEventListener(O,P)},[P]),n.jsx(z,{scope:o,orientation:i,dir:b,loop:l,currentTabStopId:S,onItemFocus:t.useCallback(e=>C(e),[C]),onItemShiftTab:t.useCallback(()=>N(!0),[]),onFocusableItemAdd:t.useCallback(()=>D(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>D(e=>e-1),[]),children:n.jsx(s.div,{tabIndex:j||0===E?-1:0,"data-orientation":i,...y,ref:x,style:{outline:"none",...e.style},onMouseDown:c(e.onMouseDown,()=>{A.current=!0}),onFocus:c(e.onFocus,e=>{const t=!A.current;if(e.target===e.currentTarget&&t&&!j){const t=new CustomEvent(O,L);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=T().filter(e=>e.focusable);X([e.find(e=>e.active),e.find(e=>e.id===S),...e].filter(Boolean).map(e=>e.ref.current),v)}}A.current=!1}),onBlur:c(e.onBlur,()=>N(!1))})})}),U="RovingFocusGroupItem",Y=t.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:o,focusable:i=!0,active:a=!1,tabStopId:d,children:u,...f}=e,p=l(),m=d||p,h=$(U,o),g=h.currentTabStopId===m,v=H(o),{onFocusableItemAdd:y,onFocusableItemRemove:w,currentTabStopId:x}=h;return t.useEffect(()=>{if(i)return y(),()=>w()},[i,y,w]),n.jsx(F.ItemSlot,{scope:o,id:m,focusable:i,active:a,children:n.jsx(s.span,{tabIndex:g?0:-1,"data-orientation":h.orientation,...f,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:G[r]}(e,h.orientation,h.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=v().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(()=>X(o))}var n,r}),children:"function"==typeof u?u({isCurrentTabStop:g,hasTabStop:null!=x}):u})})});Y.displayName=U;var G={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function X(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 Z=K,J=Y,Q="Tabs",[ee]=o(Q,[B]),te=B(),[ne,re]=ee(Q),oe=t.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,onValueChange:i,defaultValue:a,orientation:c="horizontal",dir:u,activationMode:f="automatic",...p}=e,m=R(u),[h,g]=d({prop:o,onChange:i,defaultProp:a??"",caller:Q});return n.jsx(ne,{scope:r,baseId:l(),value:h,onValueChange:g,orientation:c,dir:m,activationMode:f,children:n.jsx(s.div,{dir:m,"data-orientation":c,...p,ref:t})})});oe.displayName=Q;var ie="TabsList",ae=t.forwardRef((e,t)=>{const{__scopeTabs:r,loop:o=!0,...i}=e,a=re(ie,r),l=te(r);return n.jsx(Z,{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})})});ae.displayName=ie;var le="TabsTrigger",se=t.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,disabled:i=!1,...a}=e,l=re(le,r),d=te(r),u=ue(l.baseId,o),f=fe(l.baseId,o),p=o===l.value;return n.jsx(J,{asChild:!0,...d,focusable:!i,active:p,children:n.jsx(s.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":f,"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)})})})});se.displayName=le;var ce="TabsContent",de=t.forwardRef((e,r)=>{const{__scopeTabs:o,value:i,forceMount:a,children:l,...c}=e,d=re(ce,o),u=ue(d.baseId,i),p=fe(d.baseId,i),m=i===d.value,h=t.useRef(m);return t.useEffect(()=>{const e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),n.jsx(f,{present:a||m,children:({present:t})=>n.jsx(s.div,{"data-state":m?"active":"inactive","data-orientation":d.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 ue(e,t){return`${e}-trigger-${t}`}function fe(e,t){return`${e}-content-${t}`}de.displayName=ce;var pe=ae,me=se,he=de;const ge=oe,ve=t.forwardRef(({className:e,...t},r)=>n.jsx(pe,{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}));ve.displayName=pe.displayName;const ye=t.forwardRef(({className:e,...t},r)=>n.jsx(me,{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}));ye.displayName=me.displayName;const we=t.forwardRef(({className:e,...t},r)=>n.jsx(he,{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}));we.displayName=he.displayName;const xe=["top","right","bottom","left"],be=Math.min,Se=Math.max,Re=Math.round,Ce=Math.floor,je=e=>({x:e,y:e}),Ne={left:"right",right:"left",bottom:"top",top:"bottom"};function Pe(e,t,n){return Se(e,be(t,n))}function Te(e,t){return"function"==typeof e?e(t):e}function Ae(e){return e.split("-")[0]}function Ee(e){return e.split("-")[1]}function De(e){return"x"===e?"y":"x"}function ke(e){return"y"===e?"height":"width"}function _e(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function Ie(e){return De(_e(e))}function Oe(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Le=["left","right"],Me=["right","left"],Fe=["top","bottom"],He=["bottom","top"];function Ve(e,t,n,r){const o=Ee(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Me:Le:t?Le:Me;case"left":case"right":return t?Fe:He;default:return[]}}(Ae(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(Oe)))),i}function We(e){const t=Ae(e);return Ne[t]+e.slice(t.length)}function Be(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 ze(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 $e(e,t,n){let{reference:r,floating:o}=e;const i=_e(t),a=Ie(t),l=ke(a),s=Ae(t),c="y"===i,d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2;let p;switch(s){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,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(Ee(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(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:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:p=0}=Te(t,e),m=Be(p),h=l[f?"floating"===u?"reference":"floating":u],g=ze(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:d,strategy:s})),v="floating"===u?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),w=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},x=ze(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:y,strategy:s}):v);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 qe(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ue(e){return xe.some(t=>e[t]>=0)}const Ye=new Set(["left","top"]);function Ge(){return"undefined"!=typeof window}function Xe(e){return Qe(e)?(e.nodeName||"").toLowerCase():"#document"}function Ze(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Je(e){var t;return null==(t=(Qe(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Qe(e){return!!Ge()&&(e instanceof Node||e instanceof Ze(e).Node)}function et(e){return!!Ge()&&(e instanceof Element||e instanceof Ze(e).Element)}function tt(e){return!!Ge()&&(e instanceof HTMLElement||e instanceof Ze(e).HTMLElement)}function nt(e){return!(!Ge()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ze(e).ShadowRoot)}function rt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=pt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function ot(e){return/^(table|td|th)$/.test(Xe(e))}function it(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const at=/transform|translate|scale|rotate|perspective|filter/,lt=/paint|layout|strict|content/,st=e=>!!e&&"none"!==e;let ct;function dt(e){const t=et(e)?pt(e):e;return st(t.transform)||st(t.translate)||st(t.scale)||st(t.rotate)||st(t.perspective)||!ut()&&(st(t.backdropFilter)||st(t.filter))||at.test(t.willChange||"")||lt.test(t.contain||"")}function ut(){return null==ct&&(ct="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ct}function ft(e){return/^(html|body|#document)$/.test(Xe(e))}function pt(e){return Ze(e).getComputedStyle(e)}function mt(e){return et(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ht(e){if("html"===Xe(e))return e;const t=e.assignedSlot||e.parentNode||nt(e)&&e.host||Je(e);return nt(t)?t.host:t}function gt(e){const t=ht(e);return ft(t)?e.ownerDocument?e.ownerDocument.body:e.body:tt(t)&&rt(t)?t:gt(t)}function vt(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=gt(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=Ze(o);if(i){const e=yt(a);return t.concat(a,a.visualViewport||[],rt(o)?o:[],e&&n?vt(e):[])}return t.concat(o,vt(o,[],n))}function yt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function wt(e){const t=pt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=tt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=Re(n)!==i||Re(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function xt(e){return et(e)?e:e.contextElement}function bt(e){const t=xt(e);if(!tt(t))return je(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=wt(t);let a=(i?Re(n.width):n.width)/r,l=(i?Re(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const St=je(0);function Rt(e){const t=Ze(e);return ut()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:St}function Ct(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=xt(e);let a=je(1);t&&(r?et(r)&&(a=bt(r)):a=bt(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ze(e))&&t}(i,n,r)?Rt(i):je(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,d=o.width/a.x,u=o.height/a.y;if(i){const e=Ze(i),t=r&&et(r)?Ze(r):r;let n=e,o=yt(n);for(;o&&r&&t!==n;){const e=bt(o),t=o.getBoundingClientRect(),r=pt(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,d*=e.x,u*=e.y,s+=i,c+=a,n=Ze(o),o=yt(n)}}return ze({width:d,height:u,x:s,y:c})}function jt(e,t){const n=mt(e).scrollLeft;return t?t.left+n:Ct(Je(e)).left+n}function Nt(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-jt(e,n),y:n.top+t.scrollTop}}function Pt(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Ze(e),r=Je(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=ut();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}const c=jt(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=Je(e),n=mt(e),r=e.ownerDocument.body,o=Se(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Se(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+jt(e);const l=-n.scrollTop;return"rtl"===pt(r).direction&&(a+=Se(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}(Je(e));else if(et(t))r=function(e,t){const n=Ct(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=tt(e)?bt(e):je(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=Rt(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ze(r)}function Tt(e,t){const n=ht(e);return!(n===t||!et(n)||ft(n))&&("fixed"===pt(n).position||Tt(n,t))}function At(e,t,n){const r=tt(t),o=Je(t),i="fixed"===n,a=Ct(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=je(0);function c(){s.x=jt(o)}if(r||!r&&!i)if(("body"!==Xe(t)||rt(o))&&(l=mt(t)),r){const e=Ct(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const d=!o||r||i?je(0):Nt(o,l);return{x:a.left+l.scrollLeft-s.x-d.x,y:a.top+l.scrollTop-s.y-d.y,width:a.width,height:a.height}}function Et(e){return"static"===pt(e).position}function Dt(e,t){if(!tt(e)||"fixed"===pt(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Je(e)===n&&(n=n.ownerDocument.body),n}function kt(e,t){const n=Ze(e);if(it(e))return n;if(!tt(e)){let t=ht(e);for(;t&&!ft(t);){if(et(t)&&!Et(t))return t;t=ht(t)}return n}let r=Dt(e,t);for(;r&&ot(r)&&Et(r);)r=Dt(r,t);return r&&ft(r)&&Et(r)&&!dt(r)?n:r||function(e){let t=ht(e);for(;tt(t)&&!ft(t);){if(dt(t))return t;if(it(t))return null;t=ht(t)}return null}(e)||n}const _t={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=Je(r),l=!!t&&it(t.floating);if(r===a||l&&i)return n;let s={scrollLeft:0,scrollTop:0},c=je(1);const d=je(0),u=tt(r);if((u||!u&&!i)&&(("body"!==Xe(r)||rt(a))&&(s=mt(r)),u)){const e=Ct(r);c=bt(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const f=!a||u||i?je(0):Nt(a,s);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+d.x+f.x,y:n.y*c.y-s.scrollTop*c.y+d.y+f.y}},getDocumentElement:Je,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?it(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=vt(e,[],!1).filter(e=>et(e)&&"body"!==Xe(e)),o=null;const i="fixed"===pt(e).position;let a=i?ht(e):e;for(;et(a)&&!ft(a);){const t=pt(a),n=dt(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||rt(a)&&!n&&Tt(e,a))?r=r.filter(e=>e!==a):o=t,a=ht(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=Pt(t,i[0],o);let l=a.top,s=a.right,c=a.bottom,d=a.left;for(let u=1;u<i.length;u++){const e=Pt(t,i[u],o);l=Se(e.top,l),s=be(e.right,s),c=be(e.bottom,c),d=Se(e.left,d)}return{width:s-d,height:c-l,x:d,y:l}},getOffsetParent:kt,getElementRects:async function(e){const t=this.getOffsetParent||kt,n=this.getDimensions,r=await n(e.floating);return{reference:At(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}=wt(e);return{width:t,height:n}},getScale:bt,isElement:et,isRTL:function(e){return"rtl"===pt(e).direction}};function It(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ot(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=xt(e),d=o||i?[...c?vt(c):[],...t?vt(t):[]]:[];d.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=Je(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:d,top:u,width:f,height:p}=c;if(l||t(),!f||!p)return;const m={rootMargin:-Ce(u)+"px "+-Ce(o.clientWidth-(d+f))+"px "+-Ce(o.clientHeight-(u+p))+"px "+-Ce(d)+"px",threshold:Se(0,be(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||It(c,e.getBoundingClientRect())||a(),h=!1}try{r=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(v){r=new IntersectionObserver(g,m)}r.observe(e)}(!0),i}(c,n):null;let f,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?Ct(e):null;return s&&function t(){const r=Ct(e);h&&!It(h,r)&&n();h=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==u||u(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(f)}}const Lt=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=Ae(n),l=Ee(n),s="y"===_e(n),c=Ye.has(a)?-1:1,d=i&&s?-1:1,u=Te(t,e);let{mainAxis:f,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*d,y:f*c}:{x:f*c,y:p*d}}(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}}}}},Mt=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}=Te(e,t),d={x:n,y:r},u=await i.detectOverflow(t,c),f=_e(Ae(o)),p=De(f);let m=d[p],h=d[f];if(a){const e="y"===p?"bottom":"right";m=Pe(m+u["y"===p?"top":"left"],m,m-u[e])}if(l){const e="y"===f?"bottom":"right";h=Pe(h+u["y"===f?"top":"left"],h,h-u[e])}const g=s.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:a,[f]:l}}}}}},Ft=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:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=Te(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=Ae(o),y=_e(l),w=Ae(l)===l,x=await(null==s.isRTL?void 0:s.isRTL(c.floating)),b=f||(w||!h?[We(l)]:function(e){const t=We(e);return[Oe(e),t,Oe(t)]}(l)),S="none"!==m;!f&&S&&b.push(...Ve(l,h,m,x));const R=[l,...b],C=await s.detectOverflow(t,g),j=[];let N=(null==(r=i.flip)?void 0:r.overflows)||[];if(d&&j.push(C[v]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=Ee(e),o=Ie(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=We(a)),[a,We(a)]}(o,a,x);j.push(C[e[0]],C[e[1]])}if(N=[...N,{placement:o,overflows:j}],!j.every(e=>e<=0)){var P,T;const e=((null==(P=i.flip)?void 0:P.index)||0)+1,t=R[e];if(t){if(!("alignment"===u&&y!==_e(t))||N.every(e=>_e(e.placement)!==y||e.overflows[0]>0))return{data:{index:e,overflows:N},reset:{placement:t}}}let n=null==(T=N.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 A;const e=null==(A=N.filter(e=>{if(S){const t=_e(e.placement);return t===y||"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:A[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},Ht=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}=Te(e,t),d=await a.detectOverflow(t,c),u=Ae(o),f=Ee(o),p="y"===_e(o),{width:m,height:h}=i.floating;let g,v;"top"===u||"bottom"===u?(g=u,v=f===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(v=u,g="end"===f?"top":"bottom");const y=h-d.top-d.bottom,w=m-d.left-d.right,x=be(h-d[g],y),b=be(m-d[v],w),S=!t.middlewareData.shift;let R=x,C=b;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(C=w),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(R=y),S&&!f){const e=Se(d.left,0),t=Se(d.right,0),n=Se(d.top,0),r=Se(d.bottom,0);p?C=m-2*(0!==e||0!==t?e+t:Se(d.left,d.right)):R=h-2*(0!==n||0!==r?n+r:Se(d.top,d.bottom))}await s({...t,availableWidth:C,availableHeight:R});const j=await a.getDimensions(l.floating);return m!==j.width||h!==j.height?{reset:{rects:!0}}:{}}}},Vt=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=Te(e,t);switch(o){case"referenceHidden":{const e=qe(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ue(e)}}}case"escaped":{const e=qe(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ue(e)}}}default:return{}}}}},Wt=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:d=0}=Te(e,t)||{};if(null==c)return{};const u=Be(d),f={x:n,y:r},p=Ie(o),m=ke(p),h=await a.getDimensions(c),g="y"===p,v=g?"top":"left",y=g?"bottom":"right",w=g?"clientHeight":"clientWidth",x=i.reference[m]+i.reference[p]-f[p]-i.floating[m],b=f[p]-i.reference[p],S=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let R=S?S[w]:0;R&&await(null==a.isElement?void 0:a.isElement(S))||(R=l.floating[w]||i.floating[m]);const C=x/2-b/2,j=R/2-h[m]/2-1,N=be(u[v],j),P=be(u[y],j),T=N,A=R-h[m]-P,E=R/2-h[m]/2+C,D=Pe(T,E,A),k=!s.arrow&&null!=Ee(o)&&E!==D&&i.reference[m]/2-(E<T?N:P)-h[m]/2<0,_=k?E<T?E-T:E-A:0;return{[p]:f[p]+_,data:{[p]:D,centerOffset:E-D-_,...k&&{alignmentOffset:_}},reset:k}}}),Bt=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}=Te(e,t),d={x:n,y:r},u=_e(o),f=De(u);let p=d[f],m=d[u];const h=Te(l,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+g.mainAxis,n=i.reference[f]+i.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var v,y;const e="y"===f?"width":"height",t=Ye.has(Ae(o)),n=i.reference[u]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[u])||0)+(t?0:g.crossAxis),r=i.reference[u]+i.reference[e]+(t?0:(null==(y=a.offset)?void 0:y[u])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[u]:m}}}},zt=(e,t,n)=>{const r=new Map,o={platform:_t,...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:d,y:u}=$e(c,r,s),f=r,p=0;const m={};for(let h=0;h<i.length;h++){const n=i[h];if(!n)continue;const{name:g,fn:v}=n,{x:y,y:w,data:x,reset:b}=await v({x:d,y:u,initialPlacement:r,placement:f,strategy:o,middlewareData:m,rects:c,platform:l,elements:{reference:e,floating:t}});d=null!=y?y:d,u=null!=w?w:u,m[g]={...m[g],...x},b&&p<50&&(p++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:d,y:u}=$e(c,f,s))),h=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:m}})(e,t,{...o,platform:i})};var $t="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 qt(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ut(e,t){const n=qt(e);return Math.round(t*n)/n}function Yt(e){const n=t.useRef(e);return $t(()=>{n.current=e}),n}const Gt=(e,t)=>{const n=Lt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xt=(e,t)=>{const n=Mt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zt=(e,t)=>{const n=Ft(e);return{name:n.name,fn:n.fn,options:[e,t]}},Jt=(e,t)=>{const n=Ht(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qt=(e,t)=>{const n=Vt(e);return{name:n.name,fn:n.fn,options:[e,t]}},en=(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?Wt({element:n.current,padding:r}).fn(t):{}:n?Wt({element:n,padding:r}).fn(t):{};var o}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};var tn=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"})})});tn.displayName="Arrow";var nn=tn;function rn(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 on="Popper",[an,ln]=o(on),[sn,cn]=an(on),dn=e=>{const{__scopePopper:r,children:o}=e,[i,a]=t.useState(null);return n.jsx(sn,{scope:r,anchor:i,onAnchorChange:a,children:o})};dn.displayName=on;var un="PopperAnchor",fn=t.forwardRef((e,r)=>{const{__scopePopper:o,virtualRef:i,...l}=e,c=cn(un,o),d=t.useRef(null),u=a(r,d),f=t.useRef(null);return t.useEffect(()=>{const e=f.current;f.current=(null==i?void 0:i.current)||d.current,e!==f.current&&c.onAnchorChange(f.current)}),i?null:n.jsx(s.div,{...l,ref:u})});fn.displayName=un;var pn="PopperContent",[mn,hn]=an(pn),gn=t.forwardRef((e,r)=>{var o,i,l,c,d,f;const{__scopePopper:p,side:g="bottom",sideOffset:v=0,align:y="center",alignOffset:w=0,arrowPadding:x=0,avoidCollisions:b=!0,collisionBoundary:S=[],collisionPadding:R=0,sticky:C="partial",hideWhenDetached:j=!1,updatePositionStrategy:N="optimized",onPlaced:P,...T}=e,A=cn(pn,p),[E,D]=t.useState(null),k=a(r,e=>D(e)),[_,I]=t.useState(null),O=rn(_),L=(null==O?void 0:O.width)??0,M=(null==O?void 0:O.height)??0,F=g+("center"!==y?"-"+y:""),H="number"==typeof R?R:{top:0,right:0,bottom:0,left:0,...R},V=Array.isArray(S)?S:[S],W=V.length>0,B={padding:H,boundary:V.filter(xn),altBoundary:W},{refs:z,floatingStyles:$,placement:K,isPositioned:q,middlewareData:U}=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:d}=e,[u,f]=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,v]=t.useState(null),[y,w]=t.useState(null),x=t.useCallback(e=>{e!==C.current&&(C.current=e,v(e))},[]),b=t.useCallback(e=>{e!==j.current&&(j.current=e,w(e))},[]),S=a||g,R=l||y,C=t.useRef(null),j=t.useRef(null),N=t.useRef(u),P=null!=c,T=Yt(c),A=Yt(i),E=Yt(d),D=t.useCallback(()=>{if(!C.current||!j.current)return;const e={placement:n,strategy:r,middleware:p};A.current&&(e.platform=A.current),zt(C.current,j.current,e).then(e=>{const t={...e,isPositioned:!1!==E.current};k.current&&!Kt(N.current,t)&&(N.current=t,m.flushSync(()=>{f(t)}))})},[p,n,r,A,E]);$t(()=>{!1===d&&N.current.isPositioned&&(N.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[d]);const k=t.useRef(!1);$t(()=>(k.current=!0,()=>{k.current=!1}),[]),$t(()=>{if(S&&(C.current=S),R&&(j.current=R),S&&R){if(T.current)return T.current(S,R,D);D()}},[S,R,D,T,P]);const _=t.useMemo(()=>({reference:C,floating:j,setReference:x,setFloating:b}),[x,b]),I=t.useMemo(()=>({reference:S,floating:R}),[S,R]),O=t.useMemo(()=>{const e={position:r,left:0,top:0};if(!I.floating)return e;const t=Ut(I.floating,u.x),n=Ut(I.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...qt(I.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,s,I.floating,u.x,u.y]);return t.useMemo(()=>({...u,update:D,refs:_,elements:I,floatingStyles:O}),[u,D,_,I,O])}({strategy:"fixed",placement:F,whileElementsMounted:(...e)=>Ot(...e,{animationFrame:"always"===N}),elements:{reference:A.anchor},middleware:[Gt({mainAxis:v+M,alignmentAxis:w}),b&&Xt({mainAxis:!0,crossAxis:!1,limiter:"partial"===C?{fn:Bt(Y).fn,options:[Y,G]}:void 0,...B}),b&&Zt({...B}),Jt({...B,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`)}}),_&&en({element:_,padding:x}),bn({arrowWidth:L,arrowHeight:M}),j&&Qt({strategy:"referenceHidden",...B})]});var Y,G;const[X,Z]=Sn(K),J=u(P);h(()=>{q&&(null==J||J())},[q,J]);const Q=null==(o=U.arrow)?void 0:o.x,ee=null==(i=U.arrow)?void 0:i.y,te=0!==(null==(l=U.arrow)?void 0:l.centerOffset),[ne,re]=t.useState();return h(()=>{E&&re(window.getComputedStyle(E).zIndex)},[E]),n.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:q?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[null==(c=U.transformOrigin)?void 0:c.x,null==(d=U.transformOrigin)?void 0:d.y].join(" "),...(null==(f=U.hide)?void 0:f.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:n.jsx(mn,{scope:p,placedSide:X,onArrowChange:I,arrowX:Q,arrowY:ee,shouldHideArrow:te,children:n.jsx(s.div,{"data-side":X,"data-align":Z,...T,ref:k,style:{...T.style,animation:q?void 0:"none"}})})})});gn.displayName=pn;var vn="PopperArrow",yn={top:"bottom",right:"left",bottom:"top",left:"right"},wn=t.forwardRef(function(e,t){const{__scopePopper:r,...o}=e,i=hn(vn,r),a=yn[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(nn,{...o,ref:t,style:{...o.style,display:"block"}})})});function xn(e){return null!==e}wn.displayName=vn;var bn=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,d=s?0:e.arrowHeight,[u,f]=Sn(i),p={start:"0%",center:"50%",end:"100%"}[f],m=((null==(r=l.arrow)?void 0:r.x)??0)+c/2,h=((null==(o=l.arrow)?void 0:o.y)??0)+d/2;let g="",v="";return"bottom"===u?(g=s?p:`${m}px`,v=-d+"px"):"top"===u?(g=s?p:`${m}px`,v=`${a.floating.height+d}px`):"right"===u?(g=-d+"px",v=s?p:`${h}px`):"left"===u&&(g=`${a.floating.width+d}px`,v=s?p:`${h}px`),{data:{x:g,y:v}}}});function Sn(e){const[t,n="center"]=e.split("-");return[t,n]}var Rn=dn,Cn=fn,jn=gn,Nn=wn;function Pn(e){const r=Tn(e),o=t.forwardRef((e,o)=>{const{children:i,...a}=e,l=t.Children.toArray(i),s=l.find(En);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 Tn(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 An=Symbol("radix.slottable");function En(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===An}function Dn(e){const n=t.useRef({value:e,previous:e});return t.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}var kn=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});t.forwardRef((e,t)=>n.jsx(s.span,{...e,ref:t,style:{...kn,...e.style}})).displayName="VisuallyHidden";var _n=[" ","Enter","ArrowUp","ArrowDown"],In=[" ","Enter"],On="Select",[Ln,Mn,Fn]=I(On),[Hn]=o(On,[Fn,ln]),Vn=ln(),[Wn,Bn]=Hn(On),[zn,$n]=Hn(On),Kn=e=>{const{__scopeSelect:r,children:o,open:i,defaultOpen:a,onOpenChange:s,value:c,defaultValue:u,onValueChange:f,dir:p,name:m,autoComplete:h,disabled:g,required:v,form:y}=e,w=Vn(r),[x,b]=t.useState(null),[S,C]=t.useState(null),[j,N]=t.useState(!1),P=R(p),[T,A]=d({prop:i,defaultProp:a??!1,onChange:s,caller:On}),[E,D]=d({prop:c,defaultProp:u,onChange:f,caller:On}),k=t.useRef(null),_=!x||(y||!!x.closest("form")),[I,O]=t.useState(new Set),L=Array.from(I).map(e=>e.props.value).join(";");return n.jsx(Rn,{...w,children:n.jsxs(Wn,{required:v,scope:r,trigger:x,onTriggerChange:b,valueNode:S,onValueNodeChange:C,valueNodeHasChildren:j,onValueNodeHasChildrenChange:N,contentId:l(),value:E,onValueChange:D,open:T,onOpenChange:A,dir:P,triggerPointerDownPosRef:k,disabled:g,children:[n.jsx(Ln.Provider,{scope:r,children:n.jsx(zn,{scope:e.__scopeSelect,onNativeOptionAdd:t.useCallback(e=>{O(t=>new Set(t).add(e))},[]),onNativeOptionRemove:t.useCallback(e=>{O(t=>{const n=new Set(t);return n.delete(e),n})},[]),children:o})}),_?n.jsxs(Dr,{"aria-hidden":!0,required:v,tabIndex:-1,name:m,autoComplete:h,value:E,onChange:e=>D(e.target.value),disabled:g,form:y,children:[void 0===E?n.jsx("option",{value:""}):null,Array.from(I)]},L):null]})})};Kn.displayName=On;var qn="SelectTrigger",Un=t.forwardRef((e,r)=>{const{__scopeSelect:o,disabled:i=!1,...l}=e,d=Vn(o),u=Bn(qn,o),f=u.disabled||i,p=a(r,u.onTriggerChange),m=Mn(o),h=t.useRef("touch"),[g,v,y]=_r(e=>{const t=m().filter(e=>!e.disabled),n=t.find(e=>e.value===u.value),r=Ir(t,e,n);void 0!==r&&u.onValueChange(r.value)}),w=e=>{f||(u.onOpenChange(!0),y()),e&&(u.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return n.jsx(Cn,{asChild:!0,...d,children:n.jsx(s.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":kr(u.value)?"":void 0,...l,ref:p,onClick:c(l.onClick,e=>{e.currentTarget.focus(),"mouse"!==h.current&&w(e)}),onPointerDown:c(l.onPointerDown,e=>{h.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(w(e),e.preventDefault())}),onKeyDown:c(l.onKeyDown,e=>{const t=""!==g.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||v(e.key),t&&" "===e.key||_n.includes(e.key)&&(w(),e.preventDefault())})})})});Un.displayName=qn;var Yn="SelectValue",Gn=t.forwardRef((e,t)=>{const{__scopeSelect:r,className:o,style:i,children:l,placeholder:c="",...d}=e,u=Bn(Yn,r),{onValueNodeHasChildrenChange:f}=u,p=void 0!==l,m=a(t,u.onValueNodeChange);return h(()=>{f(p)},[f,p]),n.jsx(s.span,{...d,ref:m,style:{pointerEvents:"none"},children:kr(u.value)?n.jsx(n.Fragment,{children:c}):l})});Gn.displayName=Yn;var Xn=t.forwardRef((e,t)=>{const{__scopeSelect:r,children:o,...i}=e;return n.jsx(s.span,{"aria-hidden":!0,...i,ref:t,children:o||"▼"})});Xn.displayName="SelectIcon";var Zn=e=>n.jsx(g,{asChild:!0,...e});Zn.displayName="SelectPortal";var Jn="SelectContent",Qn=t.forwardRef((e,r)=>{const o=Bn(Jn,e.__scopeSelect),[i,a]=t.useState();if(h(()=>{a(new DocumentFragment)},[]),!o.open){const t=i;return t?m.createPortal(n.jsx(tr,{scope:e.__scopeSelect,children:n.jsx(Ln.Slot,{scope:e.__scopeSelect,children:n.jsx("div",{children:e.children})})}),t):null}return n.jsx(or,{...e,ref:r})});Qn.displayName=Jn;var er=10,[tr,nr]=Hn(Jn),rr=Pn("SelectContent.RemoveScroll"),or=t.forwardRef((e,r)=>{const{__scopeSelect:o,position:i="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:s,onPointerDownOutside:d,side:u,sideOffset:f,align:p,alignOffset:m,arrowPadding:h,collisionBoundary:g,collisionPadding:S,sticky:R,hideWhenDetached:C,avoidCollisions:j,...N}=e,P=Bn(Jn,o),[T,A]=t.useState(null),[E,D]=t.useState(null),k=a(r,e=>A(e)),[_,I]=t.useState(null),[O,L]=t.useState(null),M=Mn(o),[F,H]=t.useState(!1),V=t.useRef(!1);t.useEffect(()=>{if(T)return v(T)},[T]),y();const W=t.useCallback(e=>{const[t,...n]=M().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(const i of e){if(i===o)return;if(null==i||i.scrollIntoView({block:"nearest"}),i===t&&E&&(E.scrollTop=0),i===r&&E&&(E.scrollTop=E.scrollHeight),null==i||i.focus(),document.activeElement!==o)return}},[M,E]),B=t.useCallback(()=>W([_,T]),[W,_,T]);t.useEffect(()=>{F&&B()},[F,B]);const{onOpenChange:z,triggerPointerDownPosRef:$}=P;t.useEffect(()=>{if(T){let e={x:0,y:0};const t=t=>{var n,r;e={x:Math.abs(Math.round(t.pageX)-((null==(n=$.current)?void 0:n.x)??0)),y:Math.abs(Math.round(t.pageY)-((null==(r=$.current)?void 0:r.y)??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():T.contains(n.target)||z(!1),document.removeEventListener("pointermove",t),$.current=null};return null!==$.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[T,z,$]),t.useEffect(()=>{const e=()=>z(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[z]);const[K,q]=_r(e=>{const t=M().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=Ir(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),U=t.useCallback((e,t,n)=>{const r=!V.current&&!n;(void 0!==P.value&&P.value===t||r)&&(I(e),r&&(V.current=!0))},[P.value]),Y=t.useCallback(()=>null==T?void 0:T.focus(),[T]),G=t.useCallback((e,t,n)=>{const r=!V.current&&!n;(void 0!==P.value&&P.value===t||r)&&L(e)},[P.value]),X="popper"===i?ar:ir,Z=X===ar?{side:u,sideOffset:f,align:p,alignOffset:m,arrowPadding:h,collisionBoundary:g,collisionPadding:S,sticky:R,hideWhenDetached:C,avoidCollisions:j}:{};return n.jsx(tr,{scope:o,content:T,viewport:E,onViewportChange:D,itemRefCallback:U,selectedItem:_,onItemLeave:Y,itemTextRefCallback:G,focusSelectedItem:B,selectedItemText:O,position:i,isPositioned:F,searchRef:K,children:n.jsx(w,{as:rr,allowPinchZoom:!0,children:n.jsx(x,{asChild:!0,trapped:P.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:c(l,e=>{var t;null==(t=P.trigger)||t.focus({preventScroll:!0}),e.preventDefault()}),children:n.jsx(b,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:d,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>P.onOpenChange(!1),children:n.jsx(X,{role:"listbox",id:P.contentId,"data-state":P.open?"open":"closed",dir:P.dir,onContextMenu:e=>e.preventDefault(),...N,...Z,onPlaced:()=>H(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...N.style},onKeyDown:c(N.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||q(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=M().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>W(t)),e.preventDefault()}})})})})})})});or.displayName="SelectContentImpl";var ir=t.forwardRef((e,r)=>{const{__scopeSelect:o,onPlaced:i,...l}=e,c=Bn(Jn,o),d=nr(Jn,o),[u,f]=t.useState(null),[p,m]=t.useState(null),g=a(r,e=>m(e)),v=Mn(o),y=t.useRef(!1),w=t.useRef(!0),{viewport:x,selectedItem:b,selectedItemText:S,focusSelectedItem:R}=d,j=t.useCallback(()=>{if(c.trigger&&c.valueNode&&u&&p&&x&&b&&S){const e=c.trigger.getBoundingClientRect(),t=p.getBoundingClientRect(),n=c.valueNode.getBoundingClientRect(),r=S.getBoundingClientRect();if("rtl"!==c.dir){const o=r.left-t.left,i=n.left-o,a=e.left-i,l=e.width+a,s=Math.max(l,t.width),c=window.innerWidth-er,d=C(i,[er,Math.max(er,c-s)]);u.style.minWidth=l+"px",u.style.left=d+"px"}else{const o=t.right-r.right,i=window.innerWidth-n.right-o,a=window.innerWidth-e.right-i,l=e.width+a,s=Math.max(l,t.width),c=window.innerWidth-er,d=C(i,[er,Math.max(er,c-s)]);u.style.minWidth=l+"px",u.style.right=d+"px"}const o=v(),a=window.innerHeight-2*er,l=x.scrollHeight,s=window.getComputedStyle(p),d=parseInt(s.borderTopWidth,10),f=parseInt(s.paddingTop,10),m=parseInt(s.borderBottomWidth,10),h=d+f+l+parseInt(s.paddingBottom,10)+m,g=Math.min(5*b.offsetHeight,h),w=window.getComputedStyle(x),R=parseInt(w.paddingTop,10),j=parseInt(w.paddingBottom,10),N=e.top+e.height/2-er,P=a-N,T=b.offsetHeight/2,A=d+f+(b.offsetTop+T),E=h-A;if(A<=N){const e=o.length>0&&b===o[o.length-1].ref.current;u.style.bottom="0px";const t=p.clientHeight-x.offsetTop-x.offsetHeight,n=A+Math.max(P,T+(e?j:0)+t+m);u.style.height=n+"px"}else{const e=o.length>0&&b===o[0].ref.current;u.style.top="0px";const t=Math.max(N,d+x.offsetTop+(e?R:0)+T)+E;u.style.height=t+"px",x.scrollTop=A-N+x.offsetTop}u.style.margin=`${er}px 0`,u.style.minHeight=g+"px",u.style.maxHeight=a+"px",null==i||i(),requestAnimationFrame(()=>y.current=!0)}},[v,c.trigger,c.valueNode,u,p,x,b,S,c.dir,i]);h(()=>j(),[j]);const[N,P]=t.useState();h(()=>{p&&P(window.getComputedStyle(p).zIndex)},[p]);const T=t.useCallback(e=>{e&&!0===w.current&&(j(),null==R||R(),w.current=!1)},[j,R]);return n.jsx(lr,{scope:o,contentWrapper:u,shouldExpandOnScrollRef:y,onScrollButtonChange:T,children:n.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:n.jsx(s.div,{...l,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});ir.displayName="SelectItemAlignedPosition";var ar=t.forwardRef((e,t)=>{const{__scopeSelect:r,align:o="start",collisionPadding:i=er,...a}=e,l=Vn(r);return n.jsx(jn,{...l,...a,ref:t,align:o,collisionPadding:i,style:{boxSizing:"border-box",...a.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)"}})});ar.displayName="SelectPopperPosition";var[lr,sr]=Hn(Jn,{}),cr="SelectViewport",dr=t.forwardRef((e,r)=>{const{__scopeSelect:o,nonce:i,...l}=e,d=nr(cr,o),u=sr(cr,o),f=a(r,d.onViewportChange),p=t.useRef(0);return n.jsxs(n.Fragment,{children:[n.jsx("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}"},nonce:i}),n.jsx(Ln.Slot,{scope:o,children:n.jsx(s.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:c(l.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=u;if((null==r?void 0:r.current)&&n){const e=Math.abs(p.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*er,o=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),a=Math.max(o,i);if(a<r){const o=a+e,i=Math.min(r,o),l=o-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=l>0?l:0,n.style.justifyContent="flex-end")}}}p.current=t.scrollTop})})})]})});dr.displayName=cr;var ur="SelectGroup",[fr,pr]=Hn(ur);t.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,i=l();return n.jsx(fr,{scope:r,id:i,children:n.jsx(s.div,{role:"group","aria-labelledby":i,...o,ref:t})})}).displayName=ur;var mr="SelectLabel",hr=t.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,i=pr(mr,r);return n.jsx(s.div,{id:i.id,...o,ref:t})});hr.displayName=mr;var gr="SelectItem",[vr,yr]=Hn(gr),wr=t.forwardRef((e,r)=>{const{__scopeSelect:o,value:i,disabled:d=!1,textValue:u,...f}=e,p=Bn(gr,o),m=nr(gr,o),h=p.value===i,[g,v]=t.useState(u??""),[y,w]=t.useState(!1),x=a(r,e=>{var t;return null==(t=m.itemRefCallback)?void 0:t.call(m,e,i,d)}),b=l(),S=t.useRef("touch"),R=()=>{d||(p.onValueChange(i),p.onOpenChange(!1))};if(""===i)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return n.jsx(vr,{scope:o,value:i,disabled:d,textId:b,isSelected:h,onItemTextChange:t.useCallback(e=>{v(t=>t||((null==e?void 0:e.textContent)??"").trim())},[]),children:n.jsx(Ln.ItemSlot,{scope:o,value:i,disabled:d,textValue:g,children:n.jsx(s.div,{role:"option","aria-labelledby":b,"data-highlighted":y?"":void 0,"aria-selected":h&&y,"data-state":h?"checked":"unchecked","aria-disabled":d||void 0,"data-disabled":d?"":void 0,tabIndex:d?void 0:-1,...f,ref:x,onFocus:c(f.onFocus,()=>w(!0)),onBlur:c(f.onBlur,()=>w(!1)),onClick:c(f.onClick,()=>{"mouse"!==S.current&&R()}),onPointerUp:c(f.onPointerUp,()=>{"mouse"===S.current&&R()}),onPointerDown:c(f.onPointerDown,e=>{S.current=e.pointerType}),onPointerMove:c(f.onPointerMove,e=>{var t;S.current=e.pointerType,d?null==(t=m.onItemLeave)||t.call(m):"mouse"===S.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:c(f.onPointerLeave,e=>{var t;e.currentTarget===document.activeElement&&(null==(t=m.onItemLeave)||t.call(m))}),onKeyDown:c(f.onKeyDown,e=>{var t;""!==(null==(t=m.searchRef)?void 0:t.current)&&" "===e.key||(In.includes(e.key)&&R()," "===e.key&&e.preventDefault())})})})})});wr.displayName=gr;var xr="SelectItemText",br=t.forwardRef((e,r)=>{const{__scopeSelect:o,className:i,style:l,...c}=e,d=Bn(xr,o),u=nr(xr,o),f=yr(xr,o),p=$n(xr,o),[g,v]=t.useState(null),y=a(r,e=>v(e),f.onItemTextChange,e=>{var t;return null==(t=u.itemTextRefCallback)?void 0:t.call(u,e,f.value,f.disabled)}),w=null==g?void 0:g.textContent,x=t.useMemo(()=>n.jsx("option",{value:f.value,disabled:f.disabled,children:w},f.value),[f.disabled,f.value,w]),{onNativeOptionAdd:b,onNativeOptionRemove:S}=p;return h(()=>(b(x),()=>S(x)),[b,S,x]),n.jsxs(n.Fragment,{children:[n.jsx(s.span,{id:f.textId,...c,ref:y}),f.isSelected&&d.valueNode&&!d.valueNodeHasChildren?m.createPortal(c.children,d.valueNode):null]})});br.displayName=xr;var Sr="SelectItemIndicator",Rr=t.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e;return yr(Sr,r).isSelected?n.jsx(s.span,{"aria-hidden":!0,...o,ref:t}):null});Rr.displayName=Sr;var Cr="SelectScrollUpButton",jr=t.forwardRef((e,r)=>{const o=nr(Cr,e.__scopeSelect),i=sr(Cr,e.__scopeSelect),[l,s]=t.useState(!1),c=a(r,i.onScrollButtonChange);return h(()=>{if(o.viewport&&o.isPositioned){let e=function(){const e=t.scrollTop>0;s(e)};const t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),l?n.jsx(Tr,{...e,ref:c,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});jr.displayName=Cr;var Nr="SelectScrollDownButton",Pr=t.forwardRef((e,r)=>{const o=nr(Nr,e.__scopeSelect),i=sr(Nr,e.__scopeSelect),[l,s]=t.useState(!1),c=a(r,i.onScrollButtonChange);return h(()=>{if(o.viewport&&o.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;s(n)};const t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),l?n.jsx(Tr,{...e,ref:c,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});Pr.displayName=Nr;var Tr=t.forwardRef((e,r)=>{const{__scopeSelect:o,onAutoScroll:i,...a}=e,l=nr("SelectScrollButton",o),d=t.useRef(null),u=Mn(o),f=t.useCallback(()=>{null!==d.current&&(window.clearInterval(d.current),d.current=null)},[]);return t.useEffect(()=>()=>f(),[f]),h(()=>{var e;const t=u().find(e=>e.ref.current===document.activeElement);null==(e=null==t?void 0:t.ref.current)||e.scrollIntoView({block:"nearest"})},[u]),n.jsx(s.div,{"aria-hidden":!0,...a,ref:r,style:{flexShrink:0,...a.style},onPointerDown:c(a.onPointerDown,()=>{null===d.current&&(d.current=window.setInterval(i,50))}),onPointerMove:c(a.onPointerMove,()=>{var e;null==(e=l.onItemLeave)||e.call(l),null===d.current&&(d.current=window.setInterval(i,50))}),onPointerLeave:c(a.onPointerLeave,()=>{f()})})}),Ar=t.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e;return n.jsx(s.div,{"aria-hidden":!0,...o,ref:t})});Ar.displayName="SelectSeparator";var Er="SelectArrow";t.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,i=Vn(r),a=Bn(Er,r),l=nr(Er,r);return a.open&&"popper"===l.position?n.jsx(Nn,{...i,...o,ref:t}):null}).displayName=Er;var Dr=t.forwardRef(({__scopeSelect:e,value:r,...o},i)=>{const l=t.useRef(null),c=a(i,l),d=Dn(r);return t.useEffect(()=>{const e=l.current;if(!e)return;const t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(d!==r&&n){const t=new Event("change",{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}},[d,r]),n.jsx(s.select,{...o,style:{...kn,...o.style},ref:c,defaultValue:r})});function kr(e){return""===e||void 0===e}function _r(e){const n=u(e),r=t.useRef(""),o=t.useRef(0),i=t.useCallback(e=>{const t=r.current+e;n(t),function e(t){r.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout(()=>e(""),1e3))}(t)},[n]),a=t.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return t.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,i,a]}function Ir(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=(a=e,l=Math.max(o,0),a.map((e,t)=>a[(l+t)%a.length]));var a,l;1===r.length&&(i=i.filter(e=>e!==n));const s=i.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return s!==n?s:void 0}Dr.displayName="SelectBubbleInput";var Or=Un,Lr=Xn,Mr=Zn,Fr=Qn,Hr=dr,Vr=hr,Wr=wr,Br=br,zr=Rr,$r=jr,Kr=Pr,qr=Ar;const Ur=Kn,Yr=Gn,Gr=t.forwardRef(({className:e,children:t,...r},o)=>n.jsxs(Or,{ref:o,className:p("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,n.jsx(Lr,{asChild:!0,children:n.jsx(N,{className:"h-4 w-4 opacity-50"})})]}));Gr.displayName=Or.displayName;const Xr=t.forwardRef(({className:e,...t},r)=>n.jsx($r,{ref:r,className:p("flex cursor-default items-center justify-center py-1",e),...t,children:n.jsx(j,{className:"h-4 w-4"})}));Xr.displayName=$r.displayName;const Zr=t.forwardRef(({className:e,...t},r)=>n.jsx(Kr,{ref:r,className:p("flex cursor-default items-center justify-center py-1",e),...t,children:n.jsx(N,{className:"h-4 w-4"})}));Zr.displayName=Kr.displayName;const Jr=t.forwardRef(({className:e,children:t,position:r="popper",...o},i)=>n.jsx(Mr,{children:n.jsxs(Fr,{ref:i,className:p("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...o,children:[n.jsx(Xr,{}),n.jsx(Hr,{className:p("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),n.jsx(Zr,{})]})}));Jr.displayName=Fr.displayName;t.forwardRef(({className:e,...t},r)=>n.jsx(Vr,{ref:r,className:p("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t})).displayName=Vr.displayName;const Qr=t.forwardRef(({className:e,children:t,...r},o)=>n.jsxs(Wr,{ref:o,className:p("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[n.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsx(zr,{children:n.jsx(S,{className:"h-4 w-4"})})}),n.jsx(Br,{children:t})]}));Qr.displayName=Wr.displayName;t.forwardRef(({className:e,...t},r)=>n.jsx(qr,{ref:r,className:p("-mx-1 my-1 h-px bg-muted",e),...t})).displayName=qr.displayName;export{Cn as A,jn as C,P as E,J as I,Rn as R,T as S,ge as T,A as U,ve as a,ye as b,we as c,ln as d,B as e,I as f,Z as g,Nn as h,Ur as i,Gr as j,Yr as k,Jr as l,Qr as m,rn as n,Dn as u};
|