canny-ui-react 6.5.0 → 6.6.0
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.
|
@@ -2,6 +2,11 @@ import type { AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes, ReactN
|
|
|
2
2
|
import type { SxProp } from '../Layout/sx';
|
|
3
3
|
export interface NavbarProps extends HTMLAttributes<HTMLElement> {
|
|
4
4
|
solid?: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Background (solid, no glass, when raised). `'base'` (default) sits on the page tone; `'raised'` uses the
|
|
7
|
+
* surface of drawers, dialogs and menus (white in light mode).
|
|
8
|
+
*/
|
|
9
|
+
surface?: 'base' | 'raised';
|
|
5
10
|
/**
|
|
6
11
|
* One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
|
|
7
12
|
* responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
|
|
@@ -12,6 +12,11 @@ export interface SidebarProps extends HTMLAttributes<HTMLElement> {
|
|
|
12
12
|
* menu button such as `NavbarToggle`. Ignored at 900px and wider.
|
|
13
13
|
*/
|
|
14
14
|
mobileOpen?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Background. `'base'` (default) sits on the page tone; `'raised'` uses the
|
|
17
|
+
* surface of drawers, dialogs and menus (white in light mode).
|
|
18
|
+
*/
|
|
19
|
+
surface?: 'base' | 'raised';
|
|
15
20
|
/**
|
|
16
21
|
* Turns on the mobile drawer for a `responsive` sidebar. Called with `false` when
|
|
17
22
|
* the backdrop is clicked or Escape is pressed.
|
package/dist/index.cjs
CHANGED
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
*
|
|
172
172
|
* This source code is licensed under the ISC license.
|
|
173
173
|
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
-
*/const nP=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Wt=xe("x",nP),rP=S.forwardRef(function({color:e="primary",size:n,prefix:r,suffix:o,clearable:s=!1,onClear:i,showPasswordToggle:a=!1,filled:c=!1,type:u="text",disabled:d,className:f,style:h,sx:m,value:g,defaultValue:y,onChange:v,...x},w){const b=g!==void 0,[C,P]=S.useState(y!=null?String(y):""),R=b?String(g??""):C,M=S.useRef(null);S.useImperativeHandle(w,()=>M.current,[]);const[j,T]=S.useState(!1),E=a&&j&&u==="password"?"text":u,k=s&&!d&&R!=="",_=k||a,$=r!=null||o!=null||_,G=O=>{b||P(O.target.value),v==null||v(O)},Q=O=>{var X;O.preventDefault(),b||P("");const D=M.current;if(D){const A=(X=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:X.set;A==null||A.call(D,""),D.dispatchEvent(new Event("input",{bubbles:!0}))}i==null||i()},V=se($?void 0:m,$?void 0:h,"input",e!=="primary"&&e,n==="sm"||n==="lg"?n:null,c&&"filled",f),I=l.jsx("input",{ref:M,type:E,className:V.className,style:V.style,disabled:d,value:b?g:void 0,defaultValue:b?void 0:y,onChange:G,...x});if(!$)return l.jsxs(l.Fragment,{children:[V.styleTag,I]});const L=se(m,h,"cny-input-affix",r!=null&&"has-prefix",o!=null&&!_&&"has-suffix",_&&"has-action");return l.jsxs("span",{className:L.className,style:L.style,children:[L.styleTag,r!=null&&l.jsx("span",{className:"cny-input-prefix",children:r}),I,o!=null&&!_&&l.jsx("span",{className:"cny-input-suffix",children:o}),k&&l.jsx("button",{type:"button",className:"cny-input-action",onClick:Q,"aria-label":"Clear",tabIndex:-1,children:l.jsx(Wt,{size:14,"aria-hidden":"true"})}),a&&u==="password"&&l.jsx("button",{type:"button",className:"cny-input-action",onClick:()=>T(O=>!O),"aria-label":j?"Hide password":"Show password","aria-pressed":j,children:j?l.jsx(LS,{size:14,"aria-hidden":"true"}):l.jsx(FS,{size:14,"aria-hidden":"true"})})]})}),oP=S.forwardRef(function({color:e="default",className:n,style:r,sx:o,children:s,...i},a){const{className:c,style:u,styleTag:d}=se(o,r,"card",e!=="default"&&e,n);return l.jsxs("div",{ref:a,className:c,style:u,...i,children:[d,s]})}),sP={info:Rp,success:Sp,warning:Ep,danger:Cp};function iP({color:t}){const e=sP[t];return l.jsx(e,{size:16,className:"alert-icon-glyph","aria-hidden":"true"})}const aP=S.forwardRef(function({color:e="info",solid:n=!1,title:r,className:o,style:s,sx:i,children:a,icon:c,action:u,onDismiss:d,dismissLabel:f="Dismiss",...h},m){const g=c!==!1,y=c&&c!==!0?c:l.jsx(iP,{color:e}),{className:v,style:x,styleTag:w}=se(i,s,"alert",e,n&&"solid",o),b=e==="danger"?"alert":"status";return l.jsxs("div",{ref:m,role:b,className:v,style:x,...h,children:[w,g&&l.jsx("span",{className:"alert-icon","aria-hidden":"true",children:y}),l.jsxs("div",{className:"alert-content",children:[r&&l.jsx("p",{className:"alert-title",children:r}),a&&l.jsx("p",{className:"alert-body",children:a})]}),u&&l.jsx("div",{className:"alert-action",children:u}),d&&l.jsx("button",{type:"button",className:"alert-close",onClick:d,"aria-label":f,children:l.jsx(Wt,{size:14,"aria-hidden":"true"})})]})}),cP=S.forwardRef(function({size:e="md",status:n,src:r,alt:o,className:s,style:i,sx:a,children:c,...u},d){const{className:f,style:h,styleTag:m}=se(a,i,"avatar",e!=="md"&&e,n,s);return l.jsxs("span",{ref:d,className:f,style:h,...u,children:[m,r?l.jsx("img",{src:r,alt:o??""}):c]})}),lP=S.forwardRef(function({className:e,children:n,...r},o){return l.jsx("div",{ref:o,className:U("avatar-stack",e),...r,children:n})}),uP=S.forwardRef(function({value:e=0,color:n="primary",indeterminate:r=!1,className:o,style:s,sx:i,...a},c){const u=Math.max(0,Math.min(100,e)),d=r?s??{}:{...s??{},"--value":`${u}%`},{className:f,style:h,styleTag:m}=se(i,d,"progress",r&&"indeterminate",n!=="primary"&&n,o);return l.jsxs("div",{ref:c,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":r?void 0:u,className:f,style:h,...a,children:[m,l.jsx("span",{className:"progress-bar"})]})}),dP=S.forwardRef(function({value:e,size:n="md",showLabel:r=!0,className:o,style:s,sx:i,...a},c){const u=Math.max(0,Math.min(100,e)),d={...s??{},"--value":u},{className:f,style:h,styleTag:m}=se(i,d,"progress-ring",n==="lg"&&"lg",o);return l.jsxs("span",{ref:c,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":u,className:f,style:h,...a,children:[m,r&&l.jsxs("span",{children:[u,"%"]})]})}),fP={both:{overflowX:"auto",overflowY:"auto"},x:{overflowX:"auto",overflowY:"hidden"},y:{overflowX:"hidden",overflowY:"auto"}},jp=S.forwardRef(function({variant:e="default",tone:n="neutral",axis:r="both",maxHeight:o,maxWidth:s,region:i=!1,className:a,style:c,sx:u,children:d,...f},h){const m={...fP[r],maxHeight:o,maxWidth:s,...c??{}},{className:g,style:y,styleTag:v}=se(u,m,i?"cny-scroll-region":"cny-scroll",e!=="default"&&e,n==="primary"&&"primary",a);return l.jsxs("div",{ref:h,className:g,style:y,...f,children:[v,d]})}),hP=S.forwardRef(function(e,n){return l.jsx(jp,{ref:n,region:!0,...e})}),ia=S.forwardRef(function({shape:e="text",width:n,height:r,className:o,style:s,sx:i,...a},c){const{className:u,style:d,styleTag:f}=se(i,{...s??{},width:n,height:r},"skeleton",e,o);return l.jsx("span",{ref:c,"aria-hidden":"true",className:u,style:d,...a,children:f})}),pP=S.forwardRef(function({solid:e=!1,className:n,style:r,sx:o,children:s,...i},a){const{className:c,style:u,styleTag:d}=se(o,r,"cny-navbar",e&&"solid",n);return l.jsxs("header",{ref:a,className:c,style:u,...i,children:[d,s]})}),mP=S.forwardRef(function({mark:e=!0,className:n,children:r,...o},s){return l.jsxs("a",{ref:s,className:U("cny-navbar-brand",n),...o,children:[e&&l.jsx("span",{className:"brand-mark","aria-hidden":"true"}),r]})}),gP=S.forwardRef(function({className:e,children:n,...r},o){return l.jsx("nav",{ref:o,className:U("cny-navbar-nav",e),...r,children:n})}),yP=S.forwardRef(function({active:e=!1,className:n,children:r,...o},s){return l.jsx("a",{ref:s,"aria-current":e?"page":void 0,className:U("cny-navbar-item",e&&"active",n),...o,children:r})}),vP=S.forwardRef(function({className:e,children:n,...r},o){return l.jsx("div",{ref:o,className:U("cny-navbar-actions",e),...r,children:n})}),xP=S.forwardRef(function({open:e=!1,className:n,children:r,"aria-label":o,...s},i){return l.jsx("button",{ref:i,type:"button","aria-expanded":e,"aria-label":o??(e?"Close menu":"Open menu"),className:U("cny-navbar-toggle",n),...s,children:r??l.jsx(XS,{size:20,"aria-hidden":"true"})})}),bP="(max-width: 900px)",wP=S.forwardRef(function({width:e="default",sticky:n=!1,collapsed:r=!1,responsive:o=!1,mobileOpen:s=!1,onMobileOpenChange:i,className:a,style:c,sx:u,children:d,...f},h){const m=o&&!!i,g=m&&s,y=S.useRef(null);S.useEffect(()=>{var P;if(!g)return;if(typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(bP).matches){const R=((P=y.current)==null?void 0:P.querySelector('[data-cny-sidebar-item][tabindex="0"]'))??y.current;R==null||R.focus()}const C=R=>{R.key==="Escape"&&(i==null||i(!1))};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[g,i]);const{className:v,style:x,styleTag:w}=se(u,c,"cny-sidebar",e!=="default"&&e,n&&"sticky",r&&!g&&"collapsed",o&&"responsive",m&&"mobile-drawer",g&&"mobile-open",a);return l.jsxs(l.Fragment,{children:[m&&l.jsx("div",{className:U("cny-sidebar-backdrop",g&&"open"),"aria-hidden":"true",onClick:()=>i==null?void 0:i(!1)}),l.jsxs("aside",{ref:b=>{y.current=b,typeof h=="function"?h(b):h&&(h.current=b)},tabIndex:m?-1:void 0,className:v,style:x,...f,children:[w,d]})]})}),CP=S.forwardRef(function({className:e,children:n,...r},o){return l.jsx("div",{ref:o,className:U("cny-sidebar-header",e),...r,children:n})}),SP=S.forwardRef(function({className:e,children:n,...r},o){return l.jsx("div",{ref:o,className:U("cny-sidebar-footer",e),...r,children:n})}),PP=S.forwardRef(function({collapsed:e=!1,onClick:n,className:r,children:o,...s},i){return l.jsx("button",{ref:i,type:"button","aria-expanded":!e,"aria-label":e?"Expand sidebar":"Collapse sidebar",className:U("cny-sidebar-toggle",e&&"collapsed",r),onClick:n,...s,children:o??l.jsx(JS,{size:16,"aria-hidden":"true"})})});function aa(t){const e=Array.from(t.querySelectorAll("[data-cny-sidebar-item]")),n=[];if(e.forEach(o=>{o.hasAttribute("aria-disabled")?o.setAttribute("tabindex","-1"):n.push(o)}),n.length===0)return;const r=n.find(o=>o.classList.contains("active"))??n[0];n.forEach(o=>o.setAttribute("tabindex",o===r?"0":"-1"))}const RP=S.forwardRef(function({title:e,className:n,children:r,...o},s){const i=S.useRef(null),a=S.useCallback(c=>{const u=i.current;if(!u)return;const f=Array.from(u.querySelectorAll("[data-cny-sidebar-item]")).filter(y=>!y.hasAttribute("aria-disabled"));if(f.length===0)return;const h=f.findIndex(y=>y===document.activeElement);let m=h;switch(c.key){case"ArrowDown":c.preventDefault(),m=h<f.length-1?h+1:0;break;case"ArrowUp":c.preventDefault(),m=h<=0?f.length-1:h-1;break;case"Home":c.preventDefault(),m=0;break;case"End":c.preventDefault(),m=f.length-1;break;default:return}const g=f[m];g&&g!==document.activeElement&&(f.forEach(y=>y.setAttribute("tabindex","-1")),g.setAttribute("tabindex","0"),g.focus())},[]);return S.useLayoutEffect(()=>{const c=i.current;if(!c||(aa(c),typeof MutationObserver>"u"))return;const u=new MutationObserver(()=>aa(c));return u.observe(c,{childList:!0,subtree:!0}),()=>u.disconnect()},[]),l.jsxs("div",{ref:s,className:U("cny-sidebar-section",n),...o,children:[e&&l.jsx("div",{className:"cny-sidebar-title",children:e}),l.jsx("nav",{ref:i,className:"cny-sidebar-nav",onKeyDown:a,children:r})]})}),TP=S.forwardRef(function({active:e=!1,disabled:n=!1,icon:r,badge:o,className:s,children:i,...a},c){const u=S.useRef(null),d=S.useId();S.useLayoutEffect(()=>{const h=u.current;if(!h)return;const m=h.closest('[class*="cny-sidebar-nav"]');m&&aa(m)},[e,n]);const f=typeof i=="string"&&!a["aria-label"]?i:void 0;return l.jsxs("a",{ref:h=>{u.current=h,typeof c=="function"?c(h):c&&(c.current=h)},"data-cny-sidebar-item":d,"aria-current":e?"page":void 0,"aria-disabled":n||void 0,"aria-label":f,className:U("cny-sidebar-item",e&&"active",n&&"disabled",s),...a,children:[r&&l.jsx("span",{className:"cny-sidebar-item-icon","aria-hidden":"true",children:r}),l.jsx("span",{className:"cny-sidebar-item-label",children:i}),o&&l.jsx("span",{className:"cny-sidebar-item-badge",children:o})]})});function MP(t){const e=[];return t.display&&e.push(t.display),t.direction==="row"?e.push("flex-row"):t.direction==="column"?e.push("flex-col"):t.direction==="row-reverse"?e.push("flex-row-reverse"):t.direction==="column-reverse"&&e.push("flex-col-reverse"),t.align&&e.push(`items-${t.align==="start"||t.align==="end",t.align}`),t.justify&&e.push(`justify-${t.justify}`),t.wrap&&e.push("flex-wrap"),t.p!==void 0&&e.push(`p-${t.p}`),t.px!==void 0&&e.push(`px-${t.px}`),t.py!==void 0&&e.push(`py-${t.py}`),t.pt!==void 0&&e.push(`pt-${t.pt}`),t.pr!==void 0&&e.push(`pr-${t.pr}`),t.pb!==void 0&&e.push(`pb-${t.pb}`),t.pl!==void 0&&e.push(`pl-${t.pl}`),t.m!==void 0&&e.push(`m-${t.m}`),t.mx!==void 0&&e.push(`mx-${t.mx}`),t.my!==void 0&&e.push(`my-${t.my}`),t.mt!==void 0&&e.push(`mt-${t.mt}`),t.mr!==void 0&&e.push(`mr-${t.mr}`),t.mb!==void 0&&e.push(`mb-${t.mb}`),t.ml!==void 0&&e.push(`ml-${t.ml}`),t.gap!==void 0&&e.push(`gap-${t.gap}`),t.gapX!==void 0&&e.push(`gap-x-${t.gapX}`),t.gapY!==void 0&&e.push(`gap-y-${t.gapY}`),t.w&&e.push(`w-${t.w}`),t.h&&e.push(`h-${t.h}`),t.grow&&e.push("flex-1"),e}const Dn=S.forwardRef(function({as:e,className:n,style:r,children:o,...s},i){const a=e??"div",{layoutProps:c,domProps:u}=EP(s),{sx:d,...f}=c,h=d?Na(d):void 0,m=U(...MP(f),h==null?void 0:h.className,n),g=h!=null&&h.style||r?{...h==null?void 0:h.style,...r}:void 0,y=S.createElement(a,{ref:i,className:m||void 0,style:g,...u},o);return h!=null&&h.css?S.createElement(S.Fragment,null,S.createElement(ka,{css:h.css}),y):y});function EP(t){const e=new Set(["p","px","py","pt","pr","pb","pl","m","mx","my","mt","mr","mb","ml","gap","gapX","gapY","display","direction","align","justify","wrap","w","h","grow","sx"]),n={},r={};for(const[o,s]of Object.entries(t))e.has(o)?n[o]=s:r[o]=s;return{layoutProps:n,domProps:r}}const jP=S.forwardRef(function(e,n){return l.jsx(Dn,{ref:n,display:"flex",direction:"column",...e})}),AP=S.forwardRef(function(e,n){const{align:r="center",...o}=e;return l.jsx(Dn,{ref:n,display:"flex",direction:"row",align:r,...o})}),sd=t=>t.map(e=>`minmax(0,${e}fr)`).join(" "),DP=S.forwardRef(function({cols:e,minColWidth:n,ratio:r,template:o,className:s,sx:i,...a},c){let u;if(o)u=o;else if(r)if(Array.isArray(r))u=sd(r);else{const f={};for(const[h,m]of Object.entries(r))m&&(f[h]=sd(m));u=f}else n&&(u=`repeat(auto-fit, minmax(${n}, 1fr))`);const d=u?{gridTemplateColumns:u,...i??{}}:i;return l.jsx(Dn,{ref:c,display:"grid",className:U(!u&&e&&`grid-cols-${e}`,s),sx:d,...a})}),IP=S.forwardRef(function({size:e="lg",className:n,...r},o){return l.jsx(Dn,{ref:o,className:U("cny-container",e,n),...r})}),kP=S.forwardRef(function({orientation:e="horizontal",className:n,style:r,sx:o,...s},i){const{className:a,style:c,styleTag:u}=se(o,r,"cny-divider",e,n);return e==="vertical"?l.jsxs(l.Fragment,{children:[u,l.jsx("span",{ref:i,role:"separator","aria-orientation":"vertical",className:a,style:c,...s})]}):l.jsxs(l.Fragment,{children:[u,l.jsx("hr",{ref:i,className:a,style:c,...s})]})}),NP=S.forwardRef(function({className:e,style:n,sx:r,...o},s){const{className:i,style:a,styleTag:c}=se(r,n,"cny-spacer",e);return l.jsx("span",{ref:s,"aria-hidden":"true",className:i,style:a,...o,children:c})}),_P=S.forwardRef(function({ratio:e=16/9,className:n,style:r,sx:o,children:s,...i},a){const{className:c,style:u,styleTag:d}=se(o,{aspectRatio:String(e),...r},"aspect-ratio",n);return l.jsxs("div",{ref:a,className:c,style:u,...i,children:[d,s]})}),OP=S.forwardRef(function(e,n){return l.jsx(Dn,{ref:n,display:"flex",align:"center",justify:"center",...e})}),LP=S.forwardRef(function(e,n){const{align:r="center",gap:o=2,wrap:s=!0,...i}=e;return l.jsx(Dn,{ref:n,display:"flex",direction:"row",align:r,gap:o,wrap:s,...i})}),$P={display:"h1",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",lead:"p",body:"p",small:"small",caption:"span",code:"code",kbd:"kbd"},FP=S.forwardRef(function({as:e,variant:n="body",weight:r,align:o,color:s,truncate:i=!1,className:a,style:c,sx:u,children:d,...f},h){const m=e??$P[n],{className:g,style:y,styleTag:v}=se(u,c,"cny-text",`cny-text-${n}`,r&&`cny-weight-${r}`,o&&`cny-text-${o}`,s&&`text-${s}`,i&&"truncate",a);return S.createElement(m,{ref:h,className:g,style:y,...f},v,d)});function VP({label:t,hint:e,error:n,required:r=!1,optional:o=!1,counter:s,maxLength:i,state:a,className:c,style:u,sx:d,children:f,...h}){const m=S.useId(),g=S.Children.only(f),y=g.props.id??m,v=n!=null&&n!==!1,x=a??(v?"danger":"default"),w=e||n?`${y}-hint`:void 0,b=S.cloneElement(g,{id:y,"aria-invalid":v||g.props["aria-invalid"]||void 0,"aria-describedby":w??g.props["aria-describedby"],className:U(g.props.className,x!=="default"&&x)}),C=i!=null&&s!=null&&s>i?"danger":"default",{className:P,style:R,styleTag:M}=se(d,u,"cny-field",c);return l.jsxs("div",{className:P,style:R,...h,children:[M,(t!=null||s!=null)&&l.jsxs("div",{className:"cny-field-label-row",children:[t!=null?l.jsxs("label",{htmlFor:y,className:"cny-field-label",children:[t,r&&l.jsx("span",{className:"cny-field-required","aria-hidden":"true",children:"*"}),o&&!r&&l.jsx("span",{className:"cny-field-optional",children:"optional"})]}):l.jsx("span",{}),s!=null&&l.jsx("span",{className:U("cny-field-counter",C==="danger"&&"danger"),"aria-live":"polite",children:i!=null?`${s}/${i}`:s})]}),b,(n||e)&&l.jsx("span",{id:w,className:U("cny-field-hint",x!=="default"&&x),children:n??e})]})}const BP=S.forwardRef(function({color:e="primary",size:n,autoGrow:r=!1,maxRows:o=12,className:s,style:i,sx:a,onChange:c,...u},d){const f=S.useRef(null);S.useImperativeHandle(d,()=>f.current,[]);const h=S.useCallback(()=>{const x=f.current;if(!x||!r)return;x.style.height="auto";const b=parseFloat(getComputedStyle(x).lineHeight||"20")*o;x.style.height=`${Math.min(x.scrollHeight,b)}px`,x.style.overflowY=x.scrollHeight>b?"auto":"hidden"},[r,o]);S.useEffect(()=>{h()},[h,u.value,u.defaultValue]);const m=x=>{c==null||c(x),r&&h()},{className:g,style:y,styleTag:v}=se(a,i,"input",e!=="primary"&&e,n==="sm"||n==="lg"?n:null,r&&"cny-textarea-autogrow",s);return l.jsxs(l.Fragment,{children:[v,l.jsx("textarea",{ref:f,className:g,style:y,onChange:m,...u})]})});var GP=Object.defineProperty,zP=(t,e)=>GP(t,"name",{value:e,configurable:!0});function Ar(t,[e,n]){return Math.min(n,Math.max(e,t))}zP(Ar,"clamp");var UP=Object.defineProperty,Ne=(t,e)=>UP(t,"name",{value:e,configurable:!0}),ca="dismissableLayer.update",HP="dismissableLayer.pointerDownOutside",WP="dismissableLayer.focusOutside",id,Ap=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Ur=p.forwardRef(Ne(function(e,n){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:c,onDismiss:u,...d}=e,f=p.useContext(Ap),[h,m]=p.useState(null),g=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=p.useState({}),v=ie(n,m),x=Array.from(f.layers),[w]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=w?x.indexOf(w):-1,C=h?x.indexOf(h):-1,P=f.layersWithOutsidePointerEventsDisabled.size>0,R=C>=b,M=p.useRef(!1),j=Ip(_=>{i==null||i(_),c==null||c(_),_.defaultPrevented||u==null||u()},{ownerDocument:g,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:M,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:p.useCallback(_=>{if(!(_ instanceof Node))return!1;const $=[...f.branches].some(G=>G.contains(_));return R&&!$},[f.branches,R])}),T=kp(_=>{if(o&&M.current)return;const $=_.target;[...f.branches].some(Q=>Q.contains($))||(a==null||a(_),c==null||c(_),_.defaultPrevented||u==null||u())},g),E=h?C===x.length-1:!1,k=Qe(_=>{_.key==="Escape"&&(s==null||s(_),!_.defaultPrevented&&u&&(_.preventDefault(),u()))});return p.useEffect(()=>{if(E)return g.addEventListener("keydown",k,{capture:!0}),()=>g.removeEventListener("keydown",k,{capture:!0})},[g,E,k]),p.useEffect(()=>{if(h)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(id=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),la(),()=>{r&&(f.layersWithOutsidePointerEventsDisabled.delete(h),f.layersWithOutsidePointerEventsDisabled.size===0&&(g.body.style.pointerEvents=id))}},[h,g,r,f]),p.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),la())},[h,f]),p.useEffect(()=>{const _=Ne(()=>y({}),"handleUpdate");return document.addEventListener(ca,_),()=>document.removeEventListener(ca,_)},[]),l.jsx(re.div,{...d,ref:v,style:{pointerEvents:P?R?"auto":"none":void 0,...e.style},onFocusCapture:H(e.onFocusCapture,T.onFocusCapture),onBlurCapture:H(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:H(e.onPointerDownCapture,j.onPointerDownCapture)})},"DismissableLayer"));function Dp(){const t=p.useContext(Ap),[e,n]=p.useState(null);return p.useEffect(()=>{if(e)return t.dismissableSurfaces.add(e),()=>{t.dismissableSurfaces.delete(e)}},[e,t.dismissableSurfaces]),n}Ne(Dp,"useDismissableLayerSurface");var KP=Ne(()=>!0,"IS_TRUE");function Ip(t,e){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:s,shouldHandlePointerDownOutside:i=KP}=e,a=Qe(t),c=p.useRef(!1),u=p.useRef(!1),d=p.useRef(new Map),f=p.useRef(()=>{});return p.useEffect(()=>{function h(){u.current=!1,o.current=!1,d.current.clear()}Ne(h,"resetOutsideInteraction");function m(){return Array.from(d.current.values()).some(Boolean)}Ne(m,"isOutsideInteractionIntercepted");function g(b){if(!u.current)return;const C=b.target;C instanceof Node&&[...s].some(R=>R.contains(C))||d.current.set(b.type,!0),b.type==="click"&&window.setTimeout(()=>{u.current&&f.current()},0)}Ne(g,"handleInteractionCapture");function y(b){u.current&&d.current.set(b.type,!1)}Ne(y,"handleInteractionBubble");const v=Ne(b=>{if(b.target&&!c.current){let C=function(){n.removeEventListener("click",f.current);const R=m();h(),R||mc(HP,a,P,{discrete:!0})};if(Ne(C,"handleAndDispatchPointerDownOutsideEvent"),!i(b.target)){n.removeEventListener("click",f.current),h(),c.current=!1;return}const P={originalEvent:b};u.current=!0,o.current=r&&b.button===0,d.current.clear(),!r||b.button!==0?C():(n.removeEventListener("click",f.current),f.current=C,n.addEventListener("click",f.current,{once:!0}))}else n.removeEventListener("click",f.current),h();c.current=!1},"handlePointerDown"),x=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const b of x)n.addEventListener(b,g,!0),n.addEventListener(b,y);const w=window.setTimeout(()=>{n.addEventListener("pointerdown",v)},0);return()=>{window.clearTimeout(w),n.removeEventListener("pointerdown",v),n.removeEventListener("click",f.current);for(const b of x)n.removeEventListener(b,g,!0),n.removeEventListener(b,y)}},[n,a,r,o,s,i]),{onPointerDownCapture:Ne(()=>c.current=!0,"onPointerDownCapture")}}Ne(Ip,"usePointerDownOutside");function kp(t,e=globalThis==null?void 0:globalThis.document){const n=Qe(t),r=p.useRef(!1);return p.useEffect(()=>{const o=Ne(s=>{s.target&&!r.current&&mc(WP,n,{originalEvent:s},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[e,n]),{onFocusCapture:Ne(()=>r.current=!0,"onFocusCapture"),onBlurCapture:Ne(()=>r.current=!1,"onBlurCapture")}}Ne(kp,"useFocusOutside");function la(){const t=new CustomEvent(ca);document.dispatchEvent(t)}Ne(la,"dispatchUpdate");function mc(t,e,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&o.addEventListener(t,e,{once:!0}),r?dc(o,s):o.dispatchEvent(s)}Ne(mc,"handleAndDispatchCustomEvent");var YP=Object.defineProperty,gc=(t,e)=>YP(t,"name",{value:e,configurable:!0}),yo=0,Pt=null;function XP(t){return ur(),t.children}gc(XP,"FocusGuards");function ur(){p.useEffect(()=>{Pt||(Pt={start:ua(),end:ua()});const{start:t,end:e}=Pt;return document.body.firstElementChild!==t&&document.body.insertAdjacentElement("afterbegin",t),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),yo++,()=>{yo===1&&(Pt==null||Pt.start.remove(),Pt==null||Pt.end.remove(),Pt=null),yo=Math.max(0,yo-1)}},[])}gc(ur,"useFocusGuards");function ua(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}gc(ua,"createFocusGuard");var qP=Object.defineProperty,Xe=(t,e)=>qP(t,"name",{value:e,configurable:!0}),fi="focusScope.autoFocusOnMount",hi="focusScope.autoFocusOnUnmount",ad={bubbles:!1,cancelable:!0},hs=p.forwardRef(Xe(function(e,n){const{loop:r=!1,trapped:o=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...a}=e,[c,u]=p.useState(null),d=Qe(s),f=Qe(i),h=p.useRef(null),m=ie(n,u),g=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(o){let v=function(C){if(g.paused||!c)return;const P=C.target;c.contains(P)?h.current=P:Lt(h.current,{select:!0})},x=function(C){if(g.paused||!c)return;const P=C.relatedTarget;P!==null&&(c.contains(P)||Lt(h.current,{select:!0}))},w=function(C){if(document.activeElement===document.body)for(const R of C)R.removedNodes.length>0&&Lt(c)};Xe(v,"handleFocusIn"),Xe(x,"handleFocusOut"),Xe(w,"handleMutations"),document.addEventListener("focusin",v),document.addEventListener("focusout",x);const b=new MutationObserver(w);return c&&b.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",x),b.disconnect()}}},[o,c,g.paused]),p.useEffect(()=>{if(c){cd.add(g);const v=document.activeElement;if(!c.contains(v)){const w=new CustomEvent(fi,ad);c.addEventListener(fi,d),c.dispatchEvent(w),w.defaultPrevented||(Np(Fp(yc(c)),{select:!0}),document.activeElement===v&&Lt(c))}return()=>{c.removeEventListener(fi,d),setTimeout(()=>{const w=new CustomEvent(hi,ad);c.addEventListener(hi,f),c.dispatchEvent(w),w.defaultPrevented||Lt(v??document.body,{select:!0}),c.removeEventListener(hi,f),cd.remove(g)},0)}}},[c,d,f,g]);const y=p.useCallback(v=>{if(!r&&!o||g.paused)return;const x=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,w=document.activeElement;if(x&&w){const b=v.currentTarget,[C,P]=_p(b);C&&P?!v.shiftKey&&w===P?(v.preventDefault(),r&&Lt(C,{select:!0})):v.shiftKey&&w===C&&(v.preventDefault(),r&&Lt(P,{select:!0})):w===b&&v.preventDefault()}},[r,o,g.paused]);return l.jsx(re.div,{tabIndex:-1,...a,ref:m,onKeyDown:y})},"FocusScope"));function Np(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(Lt(r,{select:e}),document.activeElement!==n)return}Xe(Np,"focusFirst");function _p(t){const e=yc(t),n=da(e,t),r=da(e.reverse(),t);return[n,r]}Xe(_p,"getTabbableEdges");function yc(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:Xe(r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)e.push(n.currentNode);return e}Xe(yc,"getTabbableCandidates");function da(t,e){const n=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(const r of t)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Op(r,{upTo:e})))return r}Xe(da,"findVisible");function Op(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}Xe(Op,"isHidden");function Lp(t){return t instanceof HTMLInputElement&&"select"in t}Xe(Lp,"isSelectableInput");function Lt(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&Lp(t)&&e&&t.select()}}Xe(Lt,"focus");var cd=$p();function $p(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=fa(t,e),t.unshift(e)},remove(e){var n;t=fa(t,e),(n=t[0])==null||n.resume()}}}Xe($p,"createFocusScopesStack");function fa(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}Xe(fa,"arrayRemove");function Fp(t){return t.filter(e=>e.tagName!=="A")}Xe(Fp,"removeLinks");const ZP=["top","right","bottom","left"],on=Math.min,at=Math.max,es=Math.round,vo=Math.floor,It=t=>({x:t,y:t}),QP={left:"right",right:"left",bottom:"top",top:"bottom"};function ha(t,e,n){return at(t,on(e,n))}function Bt(t,e){return typeof t=="function"?t(e):t}function Gt(t){return t.split("-")[0]}function dr(t){return t.split("-")[1]}function vc(t){return t==="x"?"y":"x"}function xc(t){return t==="y"?"height":"width"}function At(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function bc(t){return vc(At(t))}function JP(t,e,n){n===void 0&&(n=!1);const r=dr(t),o=bc(t),s=xc(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(i=ts(i)),[i,ts(i)]}function eR(t){const e=ts(t);return[pa(t),e,pa(e)]}function pa(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const ld=["left","right"],ud=["right","left"],tR=["top","bottom"],nR=["bottom","top"];function rR(t,e,n){switch(t){case"top":case"bottom":return n?e?ud:ld:e?ld:ud;case"left":case"right":return e?tR:nR;default:return[]}}function oR(t,e,n,r){const o=dr(t);let s=rR(Gt(t),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),e&&(s=s.concat(s.map(pa)))),s}function ts(t){const e=Gt(t);return QP[e]+t.slice(e.length)}function sR(t){return{top:0,right:0,bottom:0,left:0,...t}}function Vp(t){return typeof t!="number"?sR(t):{top:t,right:t,bottom:t,left:t}}function ns(t){const{x:e,y:n,width:r,height:o}=t;return{width:r,height:o,top:n,left:e,right:e+r,bottom:n+o,x:e,y:n}}function dd(t,e,n){let{reference:r,floating:o}=t;const s=At(e),i=bc(e),a=xc(i),c=Gt(e),u=s==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let m;switch(c){case"top":m={x:d,y:r.y-o.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-o.width,y:f};break;default:m={x:r.x,y:r.y}}switch(dr(e)){case"start":m[i]-=h*(n&&u?-1:1);break;case"end":m[i]+=h*(n&&u?-1:1);break}return m}async function iR(t,e){var n;e===void 0&&(e={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=Bt(e,t),g=Vp(m),v=a[h?f==="floating"?"reference":"floating":f],x=ns(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:c})),w=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},P=ns(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:b,strategy:c}):w);return{top:(x.top-P.top+g.top)/C.y,bottom:(P.bottom-x.bottom+g.bottom)/C.y,left:(x.left-P.left+g.left)/C.x,right:(P.right-x.right+g.right)/C.x}}const aR=50,cR=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=i.detectOverflow?i:{...i,detectOverflow:iR},c=await(i.isRTL==null?void 0:i.isRTL(e));let u=await i.getElementRects({reference:t,floating:e,strategy:o}),{x:d,y:f}=dd(u,r,c),h=r,m=0;const g={};for(let y=0;y<s.length;y++){const v=s[y];if(!v)continue;const{name:x,fn:w}=v,{x:b,y:C,data:P,reset:R}=await w({x:d,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:g,rects:u,platform:a,elements:{reference:t,floating:e}});d=b??d,f=C??f,g[x]={...g[x],...P},R&&m<aR&&(m++,typeof R=="object"&&(R.placement&&(h=R.placement),R.rects&&(u=R.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:o}):R.rects),{x:d,y:f}=dd(u,h,c)),y=-1)}return{x:d,y:f,placement:h,strategy:o,middlewareData:g}},lR=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=e,{element:u,padding:d=0}=Bt(t,e)||{};if(u==null)return{};const f=Vp(d),h={x:n,y:r},m=bc(o),g=xc(m),y=await i.getDimensions(u),v=m==="y",x=v?"top":"left",w=v?"bottom":"right",b=v?"clientHeight":"clientWidth",C=s.reference[g]+s.reference[m]-h[m]-s.floating[g],P=h[m]-s.reference[m],R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let M=R?R[b]:0;(!M||!await(i.isElement==null?void 0:i.isElement(R)))&&(M=a.floating[b]||s.floating[g]);const j=C/2-P/2,T=M/2-y[g]/2-1,E=on(f[x],T),k=on(f[w],T),_=E,$=M-y[g]-k,G=M/2-y[g]/2+j,Q=ha(_,G,$),V=!c.arrow&&dr(o)!=null&&G!==Q&&s.reference[g]/2-(G<_?E:k)-y[g]/2<0,I=V?G<_?G-_:G-$:0;return{[m]:h[m]+I,data:{[m]:Q,centerOffset:G-Q-I,...V&&{alignmentOffset:I}},reset:V}}}),uR=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:u}=e,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...v}=Bt(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=Gt(o),w=At(a),b=Gt(a)===a,C=await(c.isRTL==null?void 0:c.isRTL(u.floating)),P=h||(b||!y?[ts(a)]:eR(a)),R=g!=="none";!h&&R&&P.push(...oR(a,y,g,C));const M=[a,...P],j=await c.detectOverflow(e,v),T=[];let E=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&T.push(j[x]),f){const G=JP(o,i,C);T.push(j[G[0]],j[G[1]])}if(E=[...E,{placement:o,overflows:T}],!T.every(G=>G<=0)){var k,_;const G=(((k=s.flip)==null?void 0:k.index)||0)+1,Q=M[G];if(Q&&(!(f==="alignment"?w!==At(Q):!1)||E.every(L=>At(L.placement)===w?L.overflows[0]>0:!0)))return{data:{index:G,overflows:E},reset:{placement:Q}};let V=(_=E.filter(I=>I.overflows[0]<=0).sort((I,L)=>I.overflows[1]-L.overflows[1])[0])==null?void 0:_.placement;if(!V)switch(m){case"bestFit":{var $;const I=($=E.filter(L=>{if(R){const O=At(L.placement);return O===w||O==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(O=>O>0).reduce((O,D)=>O+D,0)]).sort((L,O)=>L[1]-O[1])[0])==null?void 0:$[0];I&&(V=I);break}case"initialPlacement":V=a;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function fd(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function hd(t){return ZP.some(e=>t[e]>=0)}const dR=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:r}=e,{strategy:o="referenceHidden",...s}=Bt(t,e);switch(o){case"referenceHidden":{const i=await r.detectOverflow(e,{...s,elementContext:"reference"}),a=fd(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:hd(a)}}}case"escaped":{const i=await r.detectOverflow(e,{...s,altBoundary:!0}),a=fd(i,n.floating);return{data:{escapedOffsets:a,escaped:hd(a)}}}default:return{}}}}},Bp=new Set(["left","top"]);async function fR(t,e){const{placement:n,platform:r,elements:o}=t,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Gt(n),a=dr(n),c=At(n)==="y",u=Bp.has(i)?-1:1,d=s&&c?-1:1,f=Bt(e,t);let{mainAxis:h,crossAxis:m,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof g=="number"&&(m=a==="end"?g*-1:g),c?{x:m*d,y:h*u}:{x:h*u,y:m*d}}const hR=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=e,c=await fR(e,t);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},pR=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o,platform:s}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:x=>{let{x:w,y:b}=x;return{x:w,y:b}}},...u}=Bt(t,e),d={x:n,y:r},f=await s.detectOverflow(e,u),h=At(Gt(o)),m=vc(h);let g=d[m],y=d[h];if(i){const x=m==="y"?"top":"left",w=m==="y"?"bottom":"right",b=g+f[x],C=g-f[w];g=ha(b,g,C)}if(a){const x=h==="y"?"top":"left",w=h==="y"?"bottom":"right",b=y+f[x],C=y-f[w];y=ha(b,y,C)}const v=c.fn({...e,[m]:g,[h]:y});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[m]:i,[h]:a}}}}}},mR=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=e,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=Bt(t,e),d={x:n,y:r},f=At(o),h=vc(f);let m=d[h],g=d[f];const y=Bt(a,e),v=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const b=h==="y"?"height":"width",C=s.reference[h]-s.floating[b]+v.mainAxis,P=s.reference[h]+s.reference[b]-v.mainAxis;m<C?m=C:m>P&&(m=P)}if(u){var x,w;const b=h==="y"?"width":"height",C=Bp.has(Gt(o)),P=s.reference[f]-s.floating[b]+(C&&((x=i.offset)==null?void 0:x[f])||0)+(C?0:v.crossAxis),R=s.reference[f]+s.reference[b]+(C?0:((w=i.offset)==null?void 0:w[f])||0)-(C?v.crossAxis:0);g<P?g=P:g>R&&(g=R)}return{[h]:m,[f]:g}}}},gR=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:o,rects:s,platform:i,elements:a}=e,{apply:c=()=>{},...u}=Bt(t,e),d=await i.detectOverflow(e,u),f=Gt(o),h=dr(o),m=At(o)==="y",{width:g,height:y}=s.floating;let v,x;f==="top"||f==="bottom"?(v=f,x=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(x=f,v=h==="end"?"top":"bottom");const w=y-d.top-d.bottom,b=g-d.left-d.right,C=on(y-d[v],w),P=on(g-d[x],b),R=!e.middlewareData.shift;let M=C,j=P;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(j=b),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(M=w),R&&!h){const E=at(d.left,0),k=at(d.right,0),_=at(d.top,0),$=at(d.bottom,0);m?j=g-2*(E!==0||k!==0?E+k:at(d.left,d.right)):M=y-2*(_!==0||$!==0?_+$:at(d.top,d.bottom))}await c({...e,availableWidth:j,availableHeight:M});const T=await i.getDimensions(a.floating);return g!==T.width||y!==T.height?{reset:{rects:!0}}:{}}}};function ps(){return typeof window<"u"}function fr(t){return Gp(t)?(t.nodeName||"").toLowerCase():"#document"}function ct(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function _t(t){var e;return(e=(Gp(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Gp(t){return ps()?t instanceof Node||t instanceof ct(t).Node:!1}function xt(t){return ps()?t instanceof Element||t instanceof ct(t).Element:!1}function Kt(t){return ps()?t instanceof HTMLElement||t instanceof ct(t).HTMLElement:!1}function pd(t){return!ps()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ct(t).ShadowRoot}function Hr(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=bt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&o!=="inline"&&o!=="contents"}function yR(t){return/^(table|td|th)$/.test(fr(t))}function ms(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const vR=/transform|translate|scale|rotate|perspective|filter/,xR=/paint|layout|strict|content/,bn=t=>!!t&&t!=="none";let pi;function wc(t){const e=xt(t)?bt(t):t;return bn(e.transform)||bn(e.translate)||bn(e.scale)||bn(e.rotate)||bn(e.perspective)||!Cc()&&(bn(e.backdropFilter)||bn(e.filter))||vR.test(e.willChange||"")||xR.test(e.contain||"")}function bR(t){let e=sn(t);for(;Kt(e)&&!Jn(e);){if(wc(e))return e;if(ms(e))return null;e=sn(e)}return null}function Cc(){return pi==null&&(pi=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),pi}function Jn(t){return/^(html|body|#document)$/.test(fr(t))}function bt(t){return ct(t).getComputedStyle(t)}function gs(t){return xt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function sn(t){if(fr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||pd(t)&&t.host||_t(t);return pd(e)?e.host:e}function zp(t){const e=sn(t);return Jn(e)?t.ownerDocument?t.ownerDocument.body:t.body:Kt(e)&&Hr(e)?e:zp(e)}function Dr(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=zp(t),s=o===((r=t.ownerDocument)==null?void 0:r.body),i=ct(o);if(s){const a=ma(i);return e.concat(i,i.visualViewport||[],Hr(o)?o:[],a&&n?Dr(a):[])}else return e.concat(o,Dr(o,[],n))}function ma(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Up(t){const e=bt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const o=Kt(t),s=o?t.offsetWidth:n,i=o?t.offsetHeight:r,a=es(n)!==s||es(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Sc(t){return xt(t)?t:t.contextElement}function Yn(t){const e=Sc(t);if(!Kt(e))return It(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:s}=Up(e);let i=(s?es(n.width):n.width)/r,a=(s?es(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const wR=It(0);function Hp(t){const e=ct(t);return!Cc()||!e.visualViewport?wR:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function CR(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==ct(t)?!1:e}function Mn(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),s=Sc(t);let i=It(1);e&&(r?xt(r)&&(i=Yn(r)):i=Yn(t));const a=CR(s,n,r)?Hp(s):It(0);let c=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const h=ct(s),m=r&&xt(r)?ct(r):r;let g=h,y=ma(g);for(;y&&r&&m!==g;){const v=Yn(y),x=y.getBoundingClientRect(),w=bt(y),b=x.left+(y.clientLeft+parseFloat(w.paddingLeft))*v.x,C=x.top+(y.clientTop+parseFloat(w.paddingTop))*v.y;c*=v.x,u*=v.y,d*=v.x,f*=v.y,c+=b,u+=C,g=ct(y),y=ma(g)}}return ns({width:d,height:f,x:c,y:u})}function ys(t,e){const n=gs(t).scrollLeft;return e?e.left+n:Mn(_t(t)).left+n}function Wp(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-ys(t,n),o=n.top+e.scrollTop;return{x:r,y:o}}function SR(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t;const s=o==="fixed",i=_t(r),a=e?ms(e.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},u=It(1);const d=It(0),f=Kt(r);if((f||!f&&!s)&&((fr(r)!=="body"||Hr(i))&&(c=gs(r)),f)){const m=Mn(r);u=Yn(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const h=i&&!f&&!s?Wp(i,c):It(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-c.scrollTop*u.y+d.y+h.y}}function PR(t){return Array.from(t.getClientRects())}function RR(t){const e=_t(t),n=gs(t),r=t.ownerDocument.body,o=at(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=at(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ys(t);const a=-n.scrollTop;return bt(r).direction==="rtl"&&(i+=at(e.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const md=25;function TR(t,e){const n=ct(t),r=_t(t),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const d=Cc();(!d||d&&e==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const u=ys(r);if(u<=0){const d=r.ownerDocument,f=d.body,h=getComputedStyle(f),m=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(r.clientWidth-f.clientWidth-m);g<=md&&(s-=g)}else u<=md&&(s+=u);return{width:s,height:i,x:a,y:c}}function MR(t,e){const n=Mn(t,!0,e==="fixed"),r=n.top+t.clientTop,o=n.left+t.clientLeft,s=Kt(t)?Yn(t):It(1),i=t.clientWidth*s.x,a=t.clientHeight*s.y,c=o*s.x,u=r*s.y;return{width:i,height:a,x:c,y:u}}function gd(t,e,n){let r;if(e==="viewport")r=TR(t,n);else if(e==="document")r=RR(_t(t));else if(xt(e))r=MR(e,n);else{const o=Hp(t);r={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return ns(r)}function Kp(t,e){const n=sn(t);return n===e||!xt(n)||Jn(n)?!1:bt(n).position==="fixed"||Kp(n,e)}function ER(t,e){const n=e.get(t);if(n)return n;let r=Dr(t,[],!1).filter(a=>xt(a)&&fr(a)!=="body"),o=null;const s=bt(t).position==="fixed";let i=s?sn(t):t;for(;xt(i)&&!Jn(i);){const a=bt(i),c=wc(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Hr(i)&&!c&&Kp(t,i))?r=r.filter(d=>d!==i):o=a,i=sn(i)}return e.set(t,r),r}function jR(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const i=[...n==="clippingAncestors"?ms(e)?[]:ER(e,this._c):[].concat(n),r],a=gd(e,i[0],o);let c=a.top,u=a.right,d=a.bottom,f=a.left;for(let h=1;h<i.length;h++){const m=gd(e,i[h],o);c=at(m.top,c),u=on(m.right,u),d=on(m.bottom,d),f=at(m.left,f)}return{width:u-f,height:d-c,x:f,y:c}}function AR(t){const{width:e,height:n}=Up(t);return{width:e,height:n}}function DR(t,e,n){const r=Kt(e),o=_t(e),s=n==="fixed",i=Mn(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const c=It(0);function u(){c.x=ys(o)}if(r||!r&&!s)if((fr(e)!=="body"||Hr(o))&&(a=gs(e)),r){const m=Mn(e,!0,s,e);c.x=m.x+e.clientLeft,c.y=m.y+e.clientTop}else o&&u();s&&!r&&o&&u();const d=o&&!r&&!s?Wp(o,a):It(0),f=i.left+a.scrollLeft-c.x-d.x,h=i.top+a.scrollTop-c.y-d.y;return{x:f,y:h,width:i.width,height:i.height}}function mi(t){return bt(t).position==="static"}function yd(t,e){if(!Kt(t)||bt(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return _t(t)===n&&(n=n.ownerDocument.body),n}function Yp(t,e){const n=ct(t);if(ms(t))return n;if(!Kt(t)){let o=sn(t);for(;o&&!Jn(o);){if(xt(o)&&!mi(o))return o;o=sn(o)}return n}let r=yd(t,e);for(;r&&yR(r)&&mi(r);)r=yd(r,e);return r&&Jn(r)&&mi(r)&&!wc(r)?n:r||bR(t)||n}const IR=async function(t){const e=this.getOffsetParent||Yp,n=this.getDimensions,r=await n(t.floating);return{reference:DR(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function kR(t){return bt(t).direction==="rtl"}const NR={convertOffsetParentRelativeRectToViewportRelativeRect:SR,getDocumentElement:_t,getClippingRect:jR,getOffsetParent:Yp,getElementRects:IR,getClientRects:PR,getDimensions:AR,getScale:Yn,isElement:xt,isRTL:kR};function Xp(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function _R(t,e){let n=null,r;const o=_t(t);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const u=t.getBoundingClientRect(),{left:d,top:f,width:h,height:m}=u;if(a||e(),!h||!m)return;const g=vo(f),y=vo(o.clientWidth-(d+h)),v=vo(o.clientHeight-(f+m)),x=vo(d),b={rootMargin:-g+"px "+-y+"px "+-v+"px "+-x+"px",threshold:at(0,on(1,c))||1};let C=!0;function P(R){const M=R[0].intersectionRatio;if(M!==c){if(!C)return i();M?i(!1,M):r=setTimeout(()=>{i(!1,1e-7)},1e3)}M===1&&!Xp(u,t.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(P,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(P,b)}n.observe(t)}return i(!0),s}function OR(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Sc(t),d=o||s?[...u?Dr(u):[],...e?Dr(e):[]]:[];d.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=u&&a?_R(u,n):null;let h=-1,m=null;i&&(m=new ResizeObserver(x=>{let[w]=x;w&&w.target===u&&m&&e&&(m.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(e)})),n()}),u&&!c&&m.observe(u),e&&m.observe(e));let g,y=c?Mn(t):null;c&&v();function v(){const x=Mn(t);y&&!Xp(y,x)&&n(),y=x,g=requestAnimationFrame(v)}return n(),()=>{var x;d.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),f==null||f(),(x=m)==null||x.disconnect(),m=null,c&&cancelAnimationFrame(g)}}const LR=hR,$R=pR,FR=uR,VR=gR,BR=dR,vd=lR,GR=mR,zR=(t,e,n)=>{const r=new Map,o={platform:NR,...n},s={...o.platform,_c:r};return cR(t,e,{...o,platform:s})};var UR=typeof document<"u",HR=function(){},Bo=UR?S.useLayoutEffect:HR;function rs(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!rs(t[r],e[r]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&t.$$typeof)&&!rs(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function qp(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function xd(t,e){const n=qp(t);return Math.round(e*n)/n}function gi(t){const e=p.useRef(t);return Bo(()=>{e.current=t}),e}function WR(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:u}=t,[d,f]=p.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,m]=p.useState(r);rs(h,r)||m(r);const[g,y]=p.useState(null),[v,x]=p.useState(null),w=p.useCallback(L=>{L!==R.current&&(R.current=L,y(L))},[]),b=p.useCallback(L=>{L!==M.current&&(M.current=L,x(L))},[]),C=s||g,P=i||v,R=p.useRef(null),M=p.useRef(null),j=p.useRef(d),T=c!=null,E=gi(c),k=gi(o),_=gi(u),$=p.useCallback(()=>{if(!R.current||!M.current)return;const L={placement:e,strategy:n,middleware:h};k.current&&(L.platform=k.current),zR(R.current,M.current,L).then(O=>{const D={...O,isPositioned:_.current!==!1};G.current&&!rs(j.current,D)&&(j.current=D,Lr.flushSync(()=>{f(D)}))})},[h,e,n,k,_]);Bo(()=>{u===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,f(L=>({...L,isPositioned:!1})))},[u]);const G=p.useRef(!1);Bo(()=>(G.current=!0,()=>{G.current=!1}),[]),Bo(()=>{if(C&&(R.current=C),P&&(M.current=P),C&&P){if(E.current)return E.current(C,P,$);$()}},[C,P,$,E,T]);const Q=p.useMemo(()=>({reference:R,floating:M,setReference:w,setFloating:b}),[w,b]),V=p.useMemo(()=>({reference:C,floating:P}),[C,P]),I=p.useMemo(()=>{const L={position:n,left:0,top:0};if(!V.floating)return L;const O=xd(V.floating,d.x),D=xd(V.floating,d.y);return a?{...L,transform:"translate("+O+"px, "+D+"px)",...qp(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:D}},[n,a,V.floating,d.x,d.y]);return p.useMemo(()=>({...d,update:$,refs:Q,elements:V,floatingStyles:I}),[d,$,Q,V,I])}const KR=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:o}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?vd({element:r.current,padding:o}).fn(n):{}:r?vd({element:r,padding:o}).fn(n):{}}}},YR=(t,e)=>{const n=LR(t);return{name:n.name,fn:n.fn,options:[t,e]}},XR=(t,e)=>{const n=$R(t);return{name:n.name,fn:n.fn,options:[t,e]}},qR=(t,e)=>({fn:GR(t).fn,options:[t,e]}),ZR=(t,e)=>{const n=FR(t);return{name:n.name,fn:n.fn,options:[t,e]}},QR=(t,e)=>{const n=VR(t);return{name:n.name,fn:n.fn,options:[t,e]}},JR=(t,e)=>{const n=BR(t);return{name:n.name,fn:n.fn,options:[t,e]}},eT=(t,e)=>{const n=KR(t);return{name:n.name,fn:n.fn,options:[t,e]}};var tT=Object.defineProperty,nT=(t,e)=>tT(t,"name",{value:e,configurable:!0}),rT=p.forwardRef(nT(function(e,n){const{children:r,width:o=10,height:s=5,...i}=e;return l.jsx(re.svg,{...i,ref:n,width:o,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:l.jsx("polygon",{points:"0,0 30,0 15,10"})})},"Arrow")),oT=rT,sT=Object.defineProperty,iT=(t,e)=>sT(t,"name",{value:e,configurable:!0});function hr(t){const[e,n]=p.useState(void 0);return Ee(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,a=u.blockSize}else i=t.offsetWidth,a=t.offsetHeight;n({width:i,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}iT(hr,"useSize");var aT=Object.defineProperty,$t=(t,e)=>aT(t,"name",{value:e,configurable:!0}),Zp="Popper",[Qp,dn]=Re(Zp),[cT,Jp]=Qp(Zp),lT=$t(t=>{const{__scopePopper:e,children:n}=t,[r,o]=p.useState(null),[s,i]=p.useState(void 0);return l.jsx(cT,{scope:e,anchor:r,onAnchorChange:o,placementState:s,setPlacementState:i,children:n})},"Popper"),uT="PopperAnchor",dT=p.forwardRef($t(function(e,n){const{__scopePopper:r,virtualRef:o,...s}=e,i=Jp(uT,r),a=p.useRef(null),c=i.onAnchorChange,u=p.useCallback(y=>{a.current=y,y&&c(y)},[c]),d=ie(n,u),f=p.useRef(null);p.useEffect(()=>{if(!o)return;const y=f.current;f.current=o.current,y!==f.current&&c(f.current)});const h=i.placementState&&vs(i.placementState),m=h==null?void 0:h[0],g=h==null?void 0:h[1];return o?null:l.jsx(re.div,{"data-radix-popper-side":m,"data-radix-popper-align":g,...s,ref:d})},"PopperAnchor")),em="PopperContent",[fT,hT]=Qp(em),pT=p.forwardRef($t(function(e,n){var z,Z,le,ce,F,q,he;const{__scopePopper:r,side:o="bottom",sideOffset:s=0,align:i="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:y,...v}=e,x=Jp(em,r),[w,b]=p.useState(null),C=ie(n,b),[P,R]=p.useState(null),M=hr(P),j=(M==null?void 0:M.width)??0,T=(M==null?void 0:M.height)??0,E=o+(i!=="center"?"-"+i:""),k=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},_=Array.isArray(d)?d:[d],$=_.length>0,G={padding:k,boundary:_.filter(tm),altBoundary:$},{refs:Q,floatingStyles:V,placement:I,isPositioned:L,middlewareData:O}=WR({strategy:"fixed",placement:E,whileElementsMounted:$t((...ue)=>OR(...ue,{animationFrame:g==="always"}),"whileElementsMounted"),elements:{reference:x.anchor},middleware:[YR({mainAxis:s+T,alignmentAxis:a}),u&&XR({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?qR():void 0,...G}),u&&ZR({...G}),QR({...G,apply:$t(({elements:ue,rects:He,availableWidth:ve,availableHeight:qe})=>{const{width:gn,height:pe}=He.reference,we=ue.floating.style;we.setProperty("--radix-popper-available-width",`${ve}px`),we.setProperty("--radix-popper-available-height",`${qe}px`),we.setProperty("--radix-popper-anchor-width",`${gn}px`),we.setProperty("--radix-popper-anchor-height",`${pe}px`)},"apply")}),P&&eT({element:P,padding:c}),vT({arrowWidth:j,arrowHeight:T}),m&&JR({strategy:"referenceHidden",...G,boundary:$?G.boundary:void 0})]}),D=x.setPlacementState;Ee(()=>(D(I),()=>{D(void 0)}),[I,D]);const[X,A]=vs(I),B=Qe(y);Ee(()=>{L&&(B==null||B())},[L,B]);const ee=(z=O.arrow)==null?void 0:z.x,K=(Z=O.arrow)==null?void 0:Z.y,W=((le=O.arrow)==null?void 0:le.centerOffset)!==0,[oe,Y]=p.useState();return Ee(()=>{w&&Y(window.getComputedStyle(w).zIndex)},[w]),l.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:L?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[(ce=O.transformOrigin)==null?void 0:ce.x,(F=O.transformOrigin)==null?void 0:F.y].join(" "),...((q=O.hide)==null?void 0:q.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(fT,{scope:r,placedSide:X,placedAlign:A,onArrowChange:R,arrowX:ee,arrowY:K,shouldHideArrow:W,children:l.jsx(re.div,{"data-side":X,"data-align":A,...v,ref:C,style:{...v.style,animation:L?(he=v.style)==null?void 0:he.animation:"none"}})})})},"PopperContent")),mT="PopperArrow",gT={top:"bottom",right:"left",bottom:"top",left:"right"},yT=p.forwardRef($t(function(e,n){const{__scopePopper:r,...o}=e,s=hT(mT,r),i=gT[s.placedSide];return l.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:l.jsx(oT,{...o,ref:n,style:{...o.style,display:"block"}})})},"PopperArrow"));function tm(t){return t!==null}$t(tm,"isNotNull");var vT=$t(t=>({name:"transformOrigin",options:t,fn(e){var v,x,w;const{placement:n,rects:r,middlewareData:o}=e,i=((v=o.arrow)==null?void 0:v.centerOffset)!==0,a=i?0:t.arrowWidth,c=i?0:t.arrowHeight,[u,d]=vs(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(((x=o.arrow)==null?void 0:x.x)??0)+a/2,m=(((w=o.arrow)==null?void 0:w.y)??0)+c/2;let g="",y="";return u==="bottom"?(g=i?f:`${h}px`,y=`${-c}px`):u==="top"?(g=i?f:`${h}px`,y=`${r.floating.height+c}px`):u==="right"?(g=`${-c}px`,y=i?f:`${m}px`):u==="left"&&(g=`${r.floating.width+c}px`,y=i?f:`${m}px`),{data:{x:g,y}}}}),"transformOrigin");function vs(t){const[e,n="center"]=t.split("-");return[e,n]}$t(vs,"getSideAndAlignFromPlacement");var Wr=lT,Kr=dT,xs=pT,nm=yT,xT=Object.defineProperty,bT=(t,e)=>xT(t,"name",{value:e,configurable:!0}),Yr=p.forwardRef(bT(function(e,n){var c;const{container:r,...o}=e,[s,i]=p.useState(!1);Ee(()=>i(!0),[]);const a=r||s&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return a?Lr.createPortal(l.jsx(re.div,{...o,ref:n}),a):null},"Portal")),wT=Object.defineProperty,zt=(t,e)=>wT(t,"name",{value:e,configurable:!0});function rm(t,e){return p.useReducer((n,r)=>e[n][r]??n,t)}zt(rm,"useStateMachine");var Ue=zt(t=>{const{present:e,children:n}=t,r=om(e),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),s=sm(r.ref,im(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:s}):null},"Presence");function om(t){const[e,n]=p.useState(),r=p.useRef(null),o=p.useRef(t),s=p.useRef("none"),i=p.useRef(void 0),a=t?"mounted":"unmounted",[c,u]=rm(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{c==="mounted"?(s.current=i.current??Bn(r.current),i.current=void 0):s.current="none"},[c]),Ee(()=>{const d=r.current,f=o.current;if(f!==t){const m=s.current,g=Bn(d);t?(i.current=g,u("MOUNT")):g==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(f&&m!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,u]),Ee(()=>{if(e){let d;const f=e.ownerDocument.defaultView??window,h=zt(g=>{const v=Bn(r.current).includes(CSS.escape(g.animationName));if(g.target===e&&v&&(u("ANIMATION_END"),!o.current)){const x=e.style.animationFillMode;e.style.animationFillMode="forwards",d=f.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=x)})}},"handleAnimationEnd"),m=zt(g=>{g.target===e&&(s.current=Bn(r.current))},"handleAnimationStart");return e.addEventListener("animationstart",m),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{f.clearTimeout(d),e.removeEventListener("animationstart",m),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else u("ANIMATION_END")},[e,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:p.useCallback(d=>{if(d){const f=getComputedStyle(d);r.current=f,i.current=Bn(f)}else r.current=null;n(d)},[])}}zt(om,"usePresence");function ga(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}zt(ga,"setRef");function sm(...t){const e=p.useRef(t);return e.current=t,p.useCallback(n=>{const r=e.current;let o=!1;const s=r.map(i=>{const a=ga(i,n);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let i=0;i<s.length;i++){const a=s[i];typeof a=="function"?a():ga(r[i],null)}}},[])}zt(sm,"useStableComposedRefs");function Bn(t){return(t==null?void 0:t.animationName)||"none"}zt(Bn,"getAnimationName");function im(t){var r,o;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}zt(im,"getElementRef");var CT=Object.defineProperty,ST=(t,e)=>CT(t,"name",{value:e,configurable:!0});function Pc(t){const e=p.useRef({value:t,previous:t});return p.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}ST(Pc,"usePrevious");var PT=Object.defineProperty,RT=(t,e)=>PT(t,"name",{value:e,configurable:!0}),am=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"}),cm=p.forwardRef(RT(function(e,n){return l.jsx(re.span,{...e,ref:n,style:{...am,...e.style}})},"VisuallyHidden")),TT=cm,MT=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Ln=new WeakMap,xo=new WeakMap,bo={},yi=0,lm=function(t){return t&&(t.host||lm(t.parentNode))},ET=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=lm(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},jT=function(t,e,n,r){var o=ET(e,Array.isArray(t)?t:[t]);bo[n]||(bo[n]=new WeakMap);var s=bo[n],i=[],a=new Set,c=new Set(o),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};o.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(h){if(a.has(h))d(h);else try{var m=h.getAttribute(r),g=m!==null&&m!=="false",y=(Ln.get(h)||0)+1,v=(s.get(h)||0)+1;Ln.set(h,y),s.set(h,v),i.push(h),y===1&&g&&xo.set(h,!0),v===1&&h.setAttribute(n,"true"),g||h.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return d(e),a.clear(),yi++,function(){i.forEach(function(f){var h=Ln.get(f)-1,m=s.get(f)-1;Ln.set(f,h),s.set(f,m),h||(xo.has(f)||f.removeAttribute(r),xo.delete(f)),m||f.removeAttribute(n)}),yi--,yi||(Ln=new WeakMap,Ln=new WeakMap,xo=new WeakMap,bo={})}},bs=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),o=MT(t);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),jT(r,o,n,"aria-hidden")):function(){return null}},jt=function(){return jt=Object.assign||function(e){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},jt.apply(this,arguments)};function um(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n}function AT(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,s;r<o;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}var Go="right-scroll-bar-position",zo="width-before-scroll-bar",DT="with-scroll-bars-hidden",IT="--removed-body-scroll-bar-size";function vi(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function kT(t,e){var n=S.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=e,n.facade}var NT=typeof window<"u"?p.useLayoutEffect:p.useEffect,bd=new WeakMap;function _T(t,e){var n=kT(null,function(r){return t.forEach(function(o){return vi(o,r)})});return NT(function(){var r=bd.get(n);if(r){var o=new Set(r),s=new Set(t),i=n.current;o.forEach(function(a){s.has(a)||vi(a,null)}),s.forEach(function(a){o.has(a)||vi(a,i)})}bd.set(n,t)},[t]),n}function OT(t){return t}function LT(t,e){e===void 0&&(e=OT);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(s){var i=e(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var d=i;i=[],d.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return o}function $T(t){t===void 0&&(t={});var e=LT(null);return e.options=jt({async:!0,ssr:!1},t),e}var dm=function(t){var e=t.sideCar,n=um(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return p.createElement(r,jt({},n))};dm.isSideCarExport=!0;function FT(t,e){return t.useMedium(e),dm}var fm=$T(),xi=function(){},ws=p.forwardRef(function(t,e){var n=p.useRef(null),r=p.useState({onScrollCapture:xi,onWheelCapture:xi,onTouchMoveCapture:xi}),o=r[0],s=r[1],i=t.forwardProps,a=t.children,c=t.className,u=t.removeScrollBar,d=t.enabled,f=t.shards,h=t.sideCar,m=t.noRelative,g=t.noIsolation,y=t.inert,v=t.allowPinchZoom,x=t.as,w=x===void 0?"div":x,b=t.gapMode,C=um(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=h,R=_T([n,e]),M=jt(jt({},C),o);return p.createElement(p.Fragment,null,d&&p.createElement(P,{sideCar:fm,removeScrollBar:u,shards:f,noRelative:m,noIsolation:g,inert:y,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:b}),i?p.cloneElement(p.Children.only(a),jt(jt({},M),{ref:R})):p.createElement(w,jt({},M,{className:c,ref:R}),a))});ws.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ws.classNames={fullWidth:zo,zeroRight:Go};var VT=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function BT(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=VT();return e&&t.setAttribute("nonce",e),t}function GT(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function zT(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var UT=function(){var t=0,e=null;return{add:function(n){t==0&&(e=BT())&&(GT(e,n),zT(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},HT=function(){var t=UT();return function(e,n){p.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},hm=function(){var t=HT(),e=function(n){var r=n.styles,o=n.dynamic;return t(r,o),null};return e},WT={left:0,top:0,right:0,gap:0},bi=function(t){return parseInt(t||"",10)||0},KT=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],o=e[t==="padding"?"paddingRight":"marginRight"];return[bi(n),bi(r),bi(o)]},YT=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return WT;var e=KT(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},XT=hm(),Xn="data-scroll-locked",qT=function(t,e,n,r){var o=t.left,s=t.top,i=t.right,a=t.gap;return n===void 0&&(n="margin"),`
|
|
174
|
+
*/const nP=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Wt=xe("x",nP),rP=S.forwardRef(function({color:e="primary",size:n,prefix:r,suffix:o,clearable:s=!1,onClear:i,showPasswordToggle:a=!1,filled:c=!1,type:u="text",disabled:d,className:f,style:h,sx:m,value:g,defaultValue:y,onChange:v,...x},w){const b=g!==void 0,[C,P]=S.useState(y!=null?String(y):""),R=b?String(g??""):C,M=S.useRef(null);S.useImperativeHandle(w,()=>M.current,[]);const[j,T]=S.useState(!1),E=a&&j&&u==="password"?"text":u,k=s&&!d&&R!=="",_=k||a,$=r!=null||o!=null||_,G=O=>{b||P(O.target.value),v==null||v(O)},Q=O=>{var X;O.preventDefault(),b||P("");const D=M.current;if(D){const A=(X=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:X.set;A==null||A.call(D,""),D.dispatchEvent(new Event("input",{bubbles:!0}))}i==null||i()},V=se($?void 0:m,$?void 0:h,"input",e!=="primary"&&e,n==="sm"||n==="lg"?n:null,c&&"filled",f),I=l.jsx("input",{ref:M,type:E,className:V.className,style:V.style,disabled:d,value:b?g:void 0,defaultValue:b?void 0:y,onChange:G,...x});if(!$)return l.jsxs(l.Fragment,{children:[V.styleTag,I]});const L=se(m,h,"cny-input-affix",r!=null&&"has-prefix",o!=null&&!_&&"has-suffix",_&&"has-action");return l.jsxs("span",{className:L.className,style:L.style,children:[L.styleTag,r!=null&&l.jsx("span",{className:"cny-input-prefix",children:r}),I,o!=null&&!_&&l.jsx("span",{className:"cny-input-suffix",children:o}),k&&l.jsx("button",{type:"button",className:"cny-input-action",onClick:Q,"aria-label":"Clear",tabIndex:-1,children:l.jsx(Wt,{size:14,"aria-hidden":"true"})}),a&&u==="password"&&l.jsx("button",{type:"button",className:"cny-input-action",onClick:()=>T(O=>!O),"aria-label":j?"Hide password":"Show password","aria-pressed":j,children:j?l.jsx(LS,{size:14,"aria-hidden":"true"}):l.jsx(FS,{size:14,"aria-hidden":"true"})})]})}),oP=S.forwardRef(function({color:e="default",className:n,style:r,sx:o,children:s,...i},a){const{className:c,style:u,styleTag:d}=se(o,r,"card",e!=="default"&&e,n);return l.jsxs("div",{ref:a,className:c,style:u,...i,children:[d,s]})}),sP={info:Rp,success:Sp,warning:Ep,danger:Cp};function iP({color:t}){const e=sP[t];return l.jsx(e,{size:16,className:"alert-icon-glyph","aria-hidden":"true"})}const aP=S.forwardRef(function({color:e="info",solid:n=!1,title:r,className:o,style:s,sx:i,children:a,icon:c,action:u,onDismiss:d,dismissLabel:f="Dismiss",...h},m){const g=c!==!1,y=c&&c!==!0?c:l.jsx(iP,{color:e}),{className:v,style:x,styleTag:w}=se(i,s,"alert",e,n&&"solid",o),b=e==="danger"?"alert":"status";return l.jsxs("div",{ref:m,role:b,className:v,style:x,...h,children:[w,g&&l.jsx("span",{className:"alert-icon","aria-hidden":"true",children:y}),l.jsxs("div",{className:"alert-content",children:[r&&l.jsx("p",{className:"alert-title",children:r}),a&&l.jsx("p",{className:"alert-body",children:a})]}),u&&l.jsx("div",{className:"alert-action",children:u}),d&&l.jsx("button",{type:"button",className:"alert-close",onClick:d,"aria-label":f,children:l.jsx(Wt,{size:14,"aria-hidden":"true"})})]})}),cP=S.forwardRef(function({size:e="md",status:n,src:r,alt:o,className:s,style:i,sx:a,children:c,...u},d){const{className:f,style:h,styleTag:m}=se(a,i,"avatar",e!=="md"&&e,n,s);return l.jsxs("span",{ref:d,className:f,style:h,...u,children:[m,r?l.jsx("img",{src:r,alt:o??""}):c]})}),lP=S.forwardRef(function({className:e,children:n,...r},o){return l.jsx("div",{ref:o,className:U("avatar-stack",e),...r,children:n})}),uP=S.forwardRef(function({value:e=0,color:n="primary",indeterminate:r=!1,className:o,style:s,sx:i,...a},c){const u=Math.max(0,Math.min(100,e)),d=r?s??{}:{...s??{},"--value":`${u}%`},{className:f,style:h,styleTag:m}=se(i,d,"progress",r&&"indeterminate",n!=="primary"&&n,o);return l.jsxs("div",{ref:c,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":r?void 0:u,className:f,style:h,...a,children:[m,l.jsx("span",{className:"progress-bar"})]})}),dP=S.forwardRef(function({value:e,size:n="md",showLabel:r=!0,className:o,style:s,sx:i,...a},c){const u=Math.max(0,Math.min(100,e)),d={...s??{},"--value":u},{className:f,style:h,styleTag:m}=se(i,d,"progress-ring",n==="lg"&&"lg",o);return l.jsxs("span",{ref:c,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":u,className:f,style:h,...a,children:[m,r&&l.jsxs("span",{children:[u,"%"]})]})}),fP={both:{overflowX:"auto",overflowY:"auto"},x:{overflowX:"auto",overflowY:"hidden"},y:{overflowX:"hidden",overflowY:"auto"}},jp=S.forwardRef(function({variant:e="default",tone:n="neutral",axis:r="both",maxHeight:o,maxWidth:s,region:i=!1,className:a,style:c,sx:u,children:d,...f},h){const m={...fP[r],maxHeight:o,maxWidth:s,...c??{}},{className:g,style:y,styleTag:v}=se(u,m,i?"cny-scroll-region":"cny-scroll",e!=="default"&&e,n==="primary"&&"primary",a);return l.jsxs("div",{ref:h,className:g,style:y,...f,children:[v,d]})}),hP=S.forwardRef(function(e,n){return l.jsx(jp,{ref:n,region:!0,...e})}),ia=S.forwardRef(function({shape:e="text",width:n,height:r,className:o,style:s,sx:i,...a},c){const{className:u,style:d,styleTag:f}=se(i,{...s??{},width:n,height:r},"skeleton",e,o);return l.jsx("span",{ref:c,"aria-hidden":"true",className:u,style:d,...a,children:f})}),pP=S.forwardRef(function({solid:e=!1,surface:n="base",className:r,style:o,sx:s,children:i,...a},c){const{className:u,style:d,styleTag:f}=se(s,o,"cny-navbar",e&&"solid",n==="raised"&&"raised",r);return l.jsxs("header",{ref:c,className:u,style:d,...a,children:[f,i]})}),mP=S.forwardRef(function({mark:e=!0,className:n,children:r,...o},s){return l.jsxs("a",{ref:s,className:U("cny-navbar-brand",n),...o,children:[e&&l.jsx("span",{className:"brand-mark","aria-hidden":"true"}),r]})}),gP=S.forwardRef(function({className:e,children:n,...r},o){return l.jsx("nav",{ref:o,className:U("cny-navbar-nav",e),...r,children:n})}),yP=S.forwardRef(function({active:e=!1,className:n,children:r,...o},s){return l.jsx("a",{ref:s,"aria-current":e?"page":void 0,className:U("cny-navbar-item",e&&"active",n),...o,children:r})}),vP=S.forwardRef(function({className:e,children:n,...r},o){return l.jsx("div",{ref:o,className:U("cny-navbar-actions",e),...r,children:n})}),xP=S.forwardRef(function({open:e=!1,className:n,children:r,"aria-label":o,...s},i){return l.jsx("button",{ref:i,type:"button","aria-expanded":e,"aria-label":o??(e?"Close menu":"Open menu"),className:U("cny-navbar-toggle",n),...s,children:r??l.jsx(XS,{size:20,"aria-hidden":"true"})})}),bP="(max-width: 900px)",wP=S.forwardRef(function({width:e="default",sticky:n=!1,collapsed:r=!1,responsive:o=!1,mobileOpen:s=!1,onMobileOpenChange:i,surface:a="base",className:c,style:u,sx:d,children:f,...h},m){const g=o&&!!i,y=g&&s,v=S.useRef(null);S.useEffect(()=>{var R;if(!y)return;if(typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(bP).matches){const M=((R=v.current)==null?void 0:R.querySelector('[data-cny-sidebar-item][tabindex="0"]'))??v.current;M==null||M.focus()}const P=M=>{M.key==="Escape"&&(i==null||i(!1))};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[y,i]);const{className:x,style:w,styleTag:b}=se(d,u,"cny-sidebar",e!=="default"&&e,n&&"sticky",r&&!y&&"collapsed",o&&"responsive",a==="raised"&&"raised",g&&"mobile-drawer",y&&"mobile-open",c);return l.jsxs(l.Fragment,{children:[g&&l.jsx("div",{className:U("cny-sidebar-backdrop",y&&"open"),"aria-hidden":"true",onClick:()=>i==null?void 0:i(!1)}),l.jsxs("aside",{ref:C=>{v.current=C,typeof m=="function"?m(C):m&&(m.current=C)},tabIndex:g?-1:void 0,className:x,style:w,...h,children:[b,f]})]})}),CP=S.forwardRef(function({className:e,children:n,...r},o){return l.jsx("div",{ref:o,className:U("cny-sidebar-header",e),...r,children:n})}),SP=S.forwardRef(function({className:e,children:n,...r},o){return l.jsx("div",{ref:o,className:U("cny-sidebar-footer",e),...r,children:n})}),PP=S.forwardRef(function({collapsed:e=!1,onClick:n,className:r,children:o,...s},i){return l.jsx("button",{ref:i,type:"button","aria-expanded":!e,"aria-label":e?"Expand sidebar":"Collapse sidebar",className:U("cny-sidebar-toggle",e&&"collapsed",r),onClick:n,...s,children:o??l.jsx(JS,{size:16,"aria-hidden":"true"})})});function aa(t){const e=Array.from(t.querySelectorAll("[data-cny-sidebar-item]")),n=[];if(e.forEach(o=>{o.hasAttribute("aria-disabled")?o.setAttribute("tabindex","-1"):n.push(o)}),n.length===0)return;const r=n.find(o=>o.classList.contains("active"))??n[0];n.forEach(o=>o.setAttribute("tabindex",o===r?"0":"-1"))}const RP=S.forwardRef(function({title:e,className:n,children:r,...o},s){const i=S.useRef(null),a=S.useCallback(c=>{const u=i.current;if(!u)return;const f=Array.from(u.querySelectorAll("[data-cny-sidebar-item]")).filter(y=>!y.hasAttribute("aria-disabled"));if(f.length===0)return;const h=f.findIndex(y=>y===document.activeElement);let m=h;switch(c.key){case"ArrowDown":c.preventDefault(),m=h<f.length-1?h+1:0;break;case"ArrowUp":c.preventDefault(),m=h<=0?f.length-1:h-1;break;case"Home":c.preventDefault(),m=0;break;case"End":c.preventDefault(),m=f.length-1;break;default:return}const g=f[m];g&&g!==document.activeElement&&(f.forEach(y=>y.setAttribute("tabindex","-1")),g.setAttribute("tabindex","0"),g.focus())},[]);return S.useLayoutEffect(()=>{const c=i.current;if(!c||(aa(c),typeof MutationObserver>"u"))return;const u=new MutationObserver(()=>aa(c));return u.observe(c,{childList:!0,subtree:!0}),()=>u.disconnect()},[]),l.jsxs("div",{ref:s,className:U("cny-sidebar-section",n),...o,children:[e&&l.jsx("div",{className:"cny-sidebar-title",children:e}),l.jsx("nav",{ref:i,className:"cny-sidebar-nav",onKeyDown:a,children:r})]})}),TP=S.forwardRef(function({active:e=!1,disabled:n=!1,icon:r,badge:o,className:s,children:i,...a},c){const u=S.useRef(null),d=S.useId();S.useLayoutEffect(()=>{const h=u.current;if(!h)return;const m=h.closest('[class*="cny-sidebar-nav"]');m&&aa(m)},[e,n]);const f=typeof i=="string"&&!a["aria-label"]?i:void 0;return l.jsxs("a",{ref:h=>{u.current=h,typeof c=="function"?c(h):c&&(c.current=h)},"data-cny-sidebar-item":d,"aria-current":e?"page":void 0,"aria-disabled":n||void 0,"aria-label":f,className:U("cny-sidebar-item",e&&"active",n&&"disabled",s),...a,children:[r&&l.jsx("span",{className:"cny-sidebar-item-icon","aria-hidden":"true",children:r}),l.jsx("span",{className:"cny-sidebar-item-label",children:i}),o&&l.jsx("span",{className:"cny-sidebar-item-badge",children:o})]})});function MP(t){const e=[];return t.display&&e.push(t.display),t.direction==="row"?e.push("flex-row"):t.direction==="column"?e.push("flex-col"):t.direction==="row-reverse"?e.push("flex-row-reverse"):t.direction==="column-reverse"&&e.push("flex-col-reverse"),t.align&&e.push(`items-${t.align==="start"||t.align==="end",t.align}`),t.justify&&e.push(`justify-${t.justify}`),t.wrap&&e.push("flex-wrap"),t.p!==void 0&&e.push(`p-${t.p}`),t.px!==void 0&&e.push(`px-${t.px}`),t.py!==void 0&&e.push(`py-${t.py}`),t.pt!==void 0&&e.push(`pt-${t.pt}`),t.pr!==void 0&&e.push(`pr-${t.pr}`),t.pb!==void 0&&e.push(`pb-${t.pb}`),t.pl!==void 0&&e.push(`pl-${t.pl}`),t.m!==void 0&&e.push(`m-${t.m}`),t.mx!==void 0&&e.push(`mx-${t.mx}`),t.my!==void 0&&e.push(`my-${t.my}`),t.mt!==void 0&&e.push(`mt-${t.mt}`),t.mr!==void 0&&e.push(`mr-${t.mr}`),t.mb!==void 0&&e.push(`mb-${t.mb}`),t.ml!==void 0&&e.push(`ml-${t.ml}`),t.gap!==void 0&&e.push(`gap-${t.gap}`),t.gapX!==void 0&&e.push(`gap-x-${t.gapX}`),t.gapY!==void 0&&e.push(`gap-y-${t.gapY}`),t.w&&e.push(`w-${t.w}`),t.h&&e.push(`h-${t.h}`),t.grow&&e.push("flex-1"),e}const Dn=S.forwardRef(function({as:e,className:n,style:r,children:o,...s},i){const a=e??"div",{layoutProps:c,domProps:u}=EP(s),{sx:d,...f}=c,h=d?Na(d):void 0,m=U(...MP(f),h==null?void 0:h.className,n),g=h!=null&&h.style||r?{...h==null?void 0:h.style,...r}:void 0,y=S.createElement(a,{ref:i,className:m||void 0,style:g,...u},o);return h!=null&&h.css?S.createElement(S.Fragment,null,S.createElement(ka,{css:h.css}),y):y});function EP(t){const e=new Set(["p","px","py","pt","pr","pb","pl","m","mx","my","mt","mr","mb","ml","gap","gapX","gapY","display","direction","align","justify","wrap","w","h","grow","sx"]),n={},r={};for(const[o,s]of Object.entries(t))e.has(o)?n[o]=s:r[o]=s;return{layoutProps:n,domProps:r}}const jP=S.forwardRef(function(e,n){return l.jsx(Dn,{ref:n,display:"flex",direction:"column",...e})}),AP=S.forwardRef(function(e,n){const{align:r="center",...o}=e;return l.jsx(Dn,{ref:n,display:"flex",direction:"row",align:r,...o})}),sd=t=>t.map(e=>`minmax(0,${e}fr)`).join(" "),DP=S.forwardRef(function({cols:e,minColWidth:n,ratio:r,template:o,className:s,sx:i,...a},c){let u;if(o)u=o;else if(r)if(Array.isArray(r))u=sd(r);else{const f={};for(const[h,m]of Object.entries(r))m&&(f[h]=sd(m));u=f}else n&&(u=`repeat(auto-fit, minmax(${n}, 1fr))`);const d=u?{gridTemplateColumns:u,...i??{}}:i;return l.jsx(Dn,{ref:c,display:"grid",className:U(!u&&e&&`grid-cols-${e}`,s),sx:d,...a})}),IP=S.forwardRef(function({size:e="lg",className:n,...r},o){return l.jsx(Dn,{ref:o,className:U("cny-container",e,n),...r})}),kP=S.forwardRef(function({orientation:e="horizontal",className:n,style:r,sx:o,...s},i){const{className:a,style:c,styleTag:u}=se(o,r,"cny-divider",e,n);return e==="vertical"?l.jsxs(l.Fragment,{children:[u,l.jsx("span",{ref:i,role:"separator","aria-orientation":"vertical",className:a,style:c,...s})]}):l.jsxs(l.Fragment,{children:[u,l.jsx("hr",{ref:i,className:a,style:c,...s})]})}),NP=S.forwardRef(function({className:e,style:n,sx:r,...o},s){const{className:i,style:a,styleTag:c}=se(r,n,"cny-spacer",e);return l.jsx("span",{ref:s,"aria-hidden":"true",className:i,style:a,...o,children:c})}),_P=S.forwardRef(function({ratio:e=16/9,className:n,style:r,sx:o,children:s,...i},a){const{className:c,style:u,styleTag:d}=se(o,{aspectRatio:String(e),...r},"aspect-ratio",n);return l.jsxs("div",{ref:a,className:c,style:u,...i,children:[d,s]})}),OP=S.forwardRef(function(e,n){return l.jsx(Dn,{ref:n,display:"flex",align:"center",justify:"center",...e})}),LP=S.forwardRef(function(e,n){const{align:r="center",gap:o=2,wrap:s=!0,...i}=e;return l.jsx(Dn,{ref:n,display:"flex",direction:"row",align:r,gap:o,wrap:s,...i})}),$P={display:"h1",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",lead:"p",body:"p",small:"small",caption:"span",code:"code",kbd:"kbd"},FP=S.forwardRef(function({as:e,variant:n="body",weight:r,align:o,color:s,truncate:i=!1,className:a,style:c,sx:u,children:d,...f},h){const m=e??$P[n],{className:g,style:y,styleTag:v}=se(u,c,"cny-text",`cny-text-${n}`,r&&`cny-weight-${r}`,o&&`cny-text-${o}`,s&&`text-${s}`,i&&"truncate",a);return S.createElement(m,{ref:h,className:g,style:y,...f},v,d)});function VP({label:t,hint:e,error:n,required:r=!1,optional:o=!1,counter:s,maxLength:i,state:a,className:c,style:u,sx:d,children:f,...h}){const m=S.useId(),g=S.Children.only(f),y=g.props.id??m,v=n!=null&&n!==!1,x=a??(v?"danger":"default"),w=e||n?`${y}-hint`:void 0,b=S.cloneElement(g,{id:y,"aria-invalid":v||g.props["aria-invalid"]||void 0,"aria-describedby":w??g.props["aria-describedby"],className:U(g.props.className,x!=="default"&&x)}),C=i!=null&&s!=null&&s>i?"danger":"default",{className:P,style:R,styleTag:M}=se(d,u,"cny-field",c);return l.jsxs("div",{className:P,style:R,...h,children:[M,(t!=null||s!=null)&&l.jsxs("div",{className:"cny-field-label-row",children:[t!=null?l.jsxs("label",{htmlFor:y,className:"cny-field-label",children:[t,r&&l.jsx("span",{className:"cny-field-required","aria-hidden":"true",children:"*"}),o&&!r&&l.jsx("span",{className:"cny-field-optional",children:"optional"})]}):l.jsx("span",{}),s!=null&&l.jsx("span",{className:U("cny-field-counter",C==="danger"&&"danger"),"aria-live":"polite",children:i!=null?`${s}/${i}`:s})]}),b,(n||e)&&l.jsx("span",{id:w,className:U("cny-field-hint",x!=="default"&&x),children:n??e})]})}const BP=S.forwardRef(function({color:e="primary",size:n,autoGrow:r=!1,maxRows:o=12,className:s,style:i,sx:a,onChange:c,...u},d){const f=S.useRef(null);S.useImperativeHandle(d,()=>f.current,[]);const h=S.useCallback(()=>{const x=f.current;if(!x||!r)return;x.style.height="auto";const b=parseFloat(getComputedStyle(x).lineHeight||"20")*o;x.style.height=`${Math.min(x.scrollHeight,b)}px`,x.style.overflowY=x.scrollHeight>b?"auto":"hidden"},[r,o]);S.useEffect(()=>{h()},[h,u.value,u.defaultValue]);const m=x=>{c==null||c(x),r&&h()},{className:g,style:y,styleTag:v}=se(a,i,"input",e!=="primary"&&e,n==="sm"||n==="lg"?n:null,r&&"cny-textarea-autogrow",s);return l.jsxs(l.Fragment,{children:[v,l.jsx("textarea",{ref:f,className:g,style:y,onChange:m,...u})]})});var GP=Object.defineProperty,zP=(t,e)=>GP(t,"name",{value:e,configurable:!0});function Ar(t,[e,n]){return Math.min(n,Math.max(e,t))}zP(Ar,"clamp");var UP=Object.defineProperty,Ne=(t,e)=>UP(t,"name",{value:e,configurable:!0}),ca="dismissableLayer.update",HP="dismissableLayer.pointerDownOutside",WP="dismissableLayer.focusOutside",id,Ap=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Ur=p.forwardRef(Ne(function(e,n){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:c,onDismiss:u,...d}=e,f=p.useContext(Ap),[h,m]=p.useState(null),g=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=p.useState({}),v=ie(n,m),x=Array.from(f.layers),[w]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=w?x.indexOf(w):-1,C=h?x.indexOf(h):-1,P=f.layersWithOutsidePointerEventsDisabled.size>0,R=C>=b,M=p.useRef(!1),j=Ip(_=>{i==null||i(_),c==null||c(_),_.defaultPrevented||u==null||u()},{ownerDocument:g,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:M,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:p.useCallback(_=>{if(!(_ instanceof Node))return!1;const $=[...f.branches].some(G=>G.contains(_));return R&&!$},[f.branches,R])}),T=kp(_=>{if(o&&M.current)return;const $=_.target;[...f.branches].some(Q=>Q.contains($))||(a==null||a(_),c==null||c(_),_.defaultPrevented||u==null||u())},g),E=h?C===x.length-1:!1,k=Qe(_=>{_.key==="Escape"&&(s==null||s(_),!_.defaultPrevented&&u&&(_.preventDefault(),u()))});return p.useEffect(()=>{if(E)return g.addEventListener("keydown",k,{capture:!0}),()=>g.removeEventListener("keydown",k,{capture:!0})},[g,E,k]),p.useEffect(()=>{if(h)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(id=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),la(),()=>{r&&(f.layersWithOutsidePointerEventsDisabled.delete(h),f.layersWithOutsidePointerEventsDisabled.size===0&&(g.body.style.pointerEvents=id))}},[h,g,r,f]),p.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),la())},[h,f]),p.useEffect(()=>{const _=Ne(()=>y({}),"handleUpdate");return document.addEventListener(ca,_),()=>document.removeEventListener(ca,_)},[]),l.jsx(re.div,{...d,ref:v,style:{pointerEvents:P?R?"auto":"none":void 0,...e.style},onFocusCapture:H(e.onFocusCapture,T.onFocusCapture),onBlurCapture:H(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:H(e.onPointerDownCapture,j.onPointerDownCapture)})},"DismissableLayer"));function Dp(){const t=p.useContext(Ap),[e,n]=p.useState(null);return p.useEffect(()=>{if(e)return t.dismissableSurfaces.add(e),()=>{t.dismissableSurfaces.delete(e)}},[e,t.dismissableSurfaces]),n}Ne(Dp,"useDismissableLayerSurface");var KP=Ne(()=>!0,"IS_TRUE");function Ip(t,e){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:s,shouldHandlePointerDownOutside:i=KP}=e,a=Qe(t),c=p.useRef(!1),u=p.useRef(!1),d=p.useRef(new Map),f=p.useRef(()=>{});return p.useEffect(()=>{function h(){u.current=!1,o.current=!1,d.current.clear()}Ne(h,"resetOutsideInteraction");function m(){return Array.from(d.current.values()).some(Boolean)}Ne(m,"isOutsideInteractionIntercepted");function g(b){if(!u.current)return;const C=b.target;C instanceof Node&&[...s].some(R=>R.contains(C))||d.current.set(b.type,!0),b.type==="click"&&window.setTimeout(()=>{u.current&&f.current()},0)}Ne(g,"handleInteractionCapture");function y(b){u.current&&d.current.set(b.type,!1)}Ne(y,"handleInteractionBubble");const v=Ne(b=>{if(b.target&&!c.current){let C=function(){n.removeEventListener("click",f.current);const R=m();h(),R||mc(HP,a,P,{discrete:!0})};if(Ne(C,"handleAndDispatchPointerDownOutsideEvent"),!i(b.target)){n.removeEventListener("click",f.current),h(),c.current=!1;return}const P={originalEvent:b};u.current=!0,o.current=r&&b.button===0,d.current.clear(),!r||b.button!==0?C():(n.removeEventListener("click",f.current),f.current=C,n.addEventListener("click",f.current,{once:!0}))}else n.removeEventListener("click",f.current),h();c.current=!1},"handlePointerDown"),x=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const b of x)n.addEventListener(b,g,!0),n.addEventListener(b,y);const w=window.setTimeout(()=>{n.addEventListener("pointerdown",v)},0);return()=>{window.clearTimeout(w),n.removeEventListener("pointerdown",v),n.removeEventListener("click",f.current);for(const b of x)n.removeEventListener(b,g,!0),n.removeEventListener(b,y)}},[n,a,r,o,s,i]),{onPointerDownCapture:Ne(()=>c.current=!0,"onPointerDownCapture")}}Ne(Ip,"usePointerDownOutside");function kp(t,e=globalThis==null?void 0:globalThis.document){const n=Qe(t),r=p.useRef(!1);return p.useEffect(()=>{const o=Ne(s=>{s.target&&!r.current&&mc(WP,n,{originalEvent:s},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[e,n]),{onFocusCapture:Ne(()=>r.current=!0,"onFocusCapture"),onBlurCapture:Ne(()=>r.current=!1,"onBlurCapture")}}Ne(kp,"useFocusOutside");function la(){const t=new CustomEvent(ca);document.dispatchEvent(t)}Ne(la,"dispatchUpdate");function mc(t,e,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&o.addEventListener(t,e,{once:!0}),r?dc(o,s):o.dispatchEvent(s)}Ne(mc,"handleAndDispatchCustomEvent");var YP=Object.defineProperty,gc=(t,e)=>YP(t,"name",{value:e,configurable:!0}),yo=0,Pt=null;function XP(t){return ur(),t.children}gc(XP,"FocusGuards");function ur(){p.useEffect(()=>{Pt||(Pt={start:ua(),end:ua()});const{start:t,end:e}=Pt;return document.body.firstElementChild!==t&&document.body.insertAdjacentElement("afterbegin",t),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),yo++,()=>{yo===1&&(Pt==null||Pt.start.remove(),Pt==null||Pt.end.remove(),Pt=null),yo=Math.max(0,yo-1)}},[])}gc(ur,"useFocusGuards");function ua(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}gc(ua,"createFocusGuard");var qP=Object.defineProperty,Xe=(t,e)=>qP(t,"name",{value:e,configurable:!0}),fi="focusScope.autoFocusOnMount",hi="focusScope.autoFocusOnUnmount",ad={bubbles:!1,cancelable:!0},hs=p.forwardRef(Xe(function(e,n){const{loop:r=!1,trapped:o=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...a}=e,[c,u]=p.useState(null),d=Qe(s),f=Qe(i),h=p.useRef(null),m=ie(n,u),g=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(o){let v=function(C){if(g.paused||!c)return;const P=C.target;c.contains(P)?h.current=P:Lt(h.current,{select:!0})},x=function(C){if(g.paused||!c)return;const P=C.relatedTarget;P!==null&&(c.contains(P)||Lt(h.current,{select:!0}))},w=function(C){if(document.activeElement===document.body)for(const R of C)R.removedNodes.length>0&&Lt(c)};Xe(v,"handleFocusIn"),Xe(x,"handleFocusOut"),Xe(w,"handleMutations"),document.addEventListener("focusin",v),document.addEventListener("focusout",x);const b=new MutationObserver(w);return c&&b.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",x),b.disconnect()}}},[o,c,g.paused]),p.useEffect(()=>{if(c){cd.add(g);const v=document.activeElement;if(!c.contains(v)){const w=new CustomEvent(fi,ad);c.addEventListener(fi,d),c.dispatchEvent(w),w.defaultPrevented||(Np(Fp(yc(c)),{select:!0}),document.activeElement===v&&Lt(c))}return()=>{c.removeEventListener(fi,d),setTimeout(()=>{const w=new CustomEvent(hi,ad);c.addEventListener(hi,f),c.dispatchEvent(w),w.defaultPrevented||Lt(v??document.body,{select:!0}),c.removeEventListener(hi,f),cd.remove(g)},0)}}},[c,d,f,g]);const y=p.useCallback(v=>{if(!r&&!o||g.paused)return;const x=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,w=document.activeElement;if(x&&w){const b=v.currentTarget,[C,P]=_p(b);C&&P?!v.shiftKey&&w===P?(v.preventDefault(),r&&Lt(C,{select:!0})):v.shiftKey&&w===C&&(v.preventDefault(),r&&Lt(P,{select:!0})):w===b&&v.preventDefault()}},[r,o,g.paused]);return l.jsx(re.div,{tabIndex:-1,...a,ref:m,onKeyDown:y})},"FocusScope"));function Np(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(Lt(r,{select:e}),document.activeElement!==n)return}Xe(Np,"focusFirst");function _p(t){const e=yc(t),n=da(e,t),r=da(e.reverse(),t);return[n,r]}Xe(_p,"getTabbableEdges");function yc(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:Xe(r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)e.push(n.currentNode);return e}Xe(yc,"getTabbableCandidates");function da(t,e){const n=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(const r of t)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Op(r,{upTo:e})))return r}Xe(da,"findVisible");function Op(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}Xe(Op,"isHidden");function Lp(t){return t instanceof HTMLInputElement&&"select"in t}Xe(Lp,"isSelectableInput");function Lt(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&Lp(t)&&e&&t.select()}}Xe(Lt,"focus");var cd=$p();function $p(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=fa(t,e),t.unshift(e)},remove(e){var n;t=fa(t,e),(n=t[0])==null||n.resume()}}}Xe($p,"createFocusScopesStack");function fa(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}Xe(fa,"arrayRemove");function Fp(t){return t.filter(e=>e.tagName!=="A")}Xe(Fp,"removeLinks");const ZP=["top","right","bottom","left"],on=Math.min,at=Math.max,es=Math.round,vo=Math.floor,It=t=>({x:t,y:t}),QP={left:"right",right:"left",bottom:"top",top:"bottom"};function ha(t,e,n){return at(t,on(e,n))}function Bt(t,e){return typeof t=="function"?t(e):t}function Gt(t){return t.split("-")[0]}function dr(t){return t.split("-")[1]}function vc(t){return t==="x"?"y":"x"}function xc(t){return t==="y"?"height":"width"}function At(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function bc(t){return vc(At(t))}function JP(t,e,n){n===void 0&&(n=!1);const r=dr(t),o=bc(t),s=xc(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(i=ts(i)),[i,ts(i)]}function eR(t){const e=ts(t);return[pa(t),e,pa(e)]}function pa(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const ld=["left","right"],ud=["right","left"],tR=["top","bottom"],nR=["bottom","top"];function rR(t,e,n){switch(t){case"top":case"bottom":return n?e?ud:ld:e?ld:ud;case"left":case"right":return e?tR:nR;default:return[]}}function oR(t,e,n,r){const o=dr(t);let s=rR(Gt(t),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),e&&(s=s.concat(s.map(pa)))),s}function ts(t){const e=Gt(t);return QP[e]+t.slice(e.length)}function sR(t){return{top:0,right:0,bottom:0,left:0,...t}}function Vp(t){return typeof t!="number"?sR(t):{top:t,right:t,bottom:t,left:t}}function ns(t){const{x:e,y:n,width:r,height:o}=t;return{width:r,height:o,top:n,left:e,right:e+r,bottom:n+o,x:e,y:n}}function dd(t,e,n){let{reference:r,floating:o}=t;const s=At(e),i=bc(e),a=xc(i),c=Gt(e),u=s==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let m;switch(c){case"top":m={x:d,y:r.y-o.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-o.width,y:f};break;default:m={x:r.x,y:r.y}}switch(dr(e)){case"start":m[i]-=h*(n&&u?-1:1);break;case"end":m[i]+=h*(n&&u?-1:1);break}return m}async function iR(t,e){var n;e===void 0&&(e={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=Bt(e,t),g=Vp(m),v=a[h?f==="floating"?"reference":"floating":f],x=ns(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:c})),w=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},P=ns(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:b,strategy:c}):w);return{top:(x.top-P.top+g.top)/C.y,bottom:(P.bottom-x.bottom+g.bottom)/C.y,left:(x.left-P.left+g.left)/C.x,right:(P.right-x.right+g.right)/C.x}}const aR=50,cR=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=i.detectOverflow?i:{...i,detectOverflow:iR},c=await(i.isRTL==null?void 0:i.isRTL(e));let u=await i.getElementRects({reference:t,floating:e,strategy:o}),{x:d,y:f}=dd(u,r,c),h=r,m=0;const g={};for(let y=0;y<s.length;y++){const v=s[y];if(!v)continue;const{name:x,fn:w}=v,{x:b,y:C,data:P,reset:R}=await w({x:d,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:g,rects:u,platform:a,elements:{reference:t,floating:e}});d=b??d,f=C??f,g[x]={...g[x],...P},R&&m<aR&&(m++,typeof R=="object"&&(R.placement&&(h=R.placement),R.rects&&(u=R.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:o}):R.rects),{x:d,y:f}=dd(u,h,c)),y=-1)}return{x:d,y:f,placement:h,strategy:o,middlewareData:g}},lR=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=e,{element:u,padding:d=0}=Bt(t,e)||{};if(u==null)return{};const f=Vp(d),h={x:n,y:r},m=bc(o),g=xc(m),y=await i.getDimensions(u),v=m==="y",x=v?"top":"left",w=v?"bottom":"right",b=v?"clientHeight":"clientWidth",C=s.reference[g]+s.reference[m]-h[m]-s.floating[g],P=h[m]-s.reference[m],R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let M=R?R[b]:0;(!M||!await(i.isElement==null?void 0:i.isElement(R)))&&(M=a.floating[b]||s.floating[g]);const j=C/2-P/2,T=M/2-y[g]/2-1,E=on(f[x],T),k=on(f[w],T),_=E,$=M-y[g]-k,G=M/2-y[g]/2+j,Q=ha(_,G,$),V=!c.arrow&&dr(o)!=null&&G!==Q&&s.reference[g]/2-(G<_?E:k)-y[g]/2<0,I=V?G<_?G-_:G-$:0;return{[m]:h[m]+I,data:{[m]:Q,centerOffset:G-Q-I,...V&&{alignmentOffset:I}},reset:V}}}),uR=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:u}=e,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...v}=Bt(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=Gt(o),w=At(a),b=Gt(a)===a,C=await(c.isRTL==null?void 0:c.isRTL(u.floating)),P=h||(b||!y?[ts(a)]:eR(a)),R=g!=="none";!h&&R&&P.push(...oR(a,y,g,C));const M=[a,...P],j=await c.detectOverflow(e,v),T=[];let E=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&T.push(j[x]),f){const G=JP(o,i,C);T.push(j[G[0]],j[G[1]])}if(E=[...E,{placement:o,overflows:T}],!T.every(G=>G<=0)){var k,_;const G=(((k=s.flip)==null?void 0:k.index)||0)+1,Q=M[G];if(Q&&(!(f==="alignment"?w!==At(Q):!1)||E.every(L=>At(L.placement)===w?L.overflows[0]>0:!0)))return{data:{index:G,overflows:E},reset:{placement:Q}};let V=(_=E.filter(I=>I.overflows[0]<=0).sort((I,L)=>I.overflows[1]-L.overflows[1])[0])==null?void 0:_.placement;if(!V)switch(m){case"bestFit":{var $;const I=($=E.filter(L=>{if(R){const O=At(L.placement);return O===w||O==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(O=>O>0).reduce((O,D)=>O+D,0)]).sort((L,O)=>L[1]-O[1])[0])==null?void 0:$[0];I&&(V=I);break}case"initialPlacement":V=a;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function fd(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function hd(t){return ZP.some(e=>t[e]>=0)}const dR=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:r}=e,{strategy:o="referenceHidden",...s}=Bt(t,e);switch(o){case"referenceHidden":{const i=await r.detectOverflow(e,{...s,elementContext:"reference"}),a=fd(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:hd(a)}}}case"escaped":{const i=await r.detectOverflow(e,{...s,altBoundary:!0}),a=fd(i,n.floating);return{data:{escapedOffsets:a,escaped:hd(a)}}}default:return{}}}}},Bp=new Set(["left","top"]);async function fR(t,e){const{placement:n,platform:r,elements:o}=t,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Gt(n),a=dr(n),c=At(n)==="y",u=Bp.has(i)?-1:1,d=s&&c?-1:1,f=Bt(e,t);let{mainAxis:h,crossAxis:m,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof g=="number"&&(m=a==="end"?g*-1:g),c?{x:m*d,y:h*u}:{x:h*u,y:m*d}}const hR=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=e,c=await fR(e,t);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},pR=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o,platform:s}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:x=>{let{x:w,y:b}=x;return{x:w,y:b}}},...u}=Bt(t,e),d={x:n,y:r},f=await s.detectOverflow(e,u),h=At(Gt(o)),m=vc(h);let g=d[m],y=d[h];if(i){const x=m==="y"?"top":"left",w=m==="y"?"bottom":"right",b=g+f[x],C=g-f[w];g=ha(b,g,C)}if(a){const x=h==="y"?"top":"left",w=h==="y"?"bottom":"right",b=y+f[x],C=y-f[w];y=ha(b,y,C)}const v=c.fn({...e,[m]:g,[h]:y});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[m]:i,[h]:a}}}}}},mR=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=e,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=Bt(t,e),d={x:n,y:r},f=At(o),h=vc(f);let m=d[h],g=d[f];const y=Bt(a,e),v=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const b=h==="y"?"height":"width",C=s.reference[h]-s.floating[b]+v.mainAxis,P=s.reference[h]+s.reference[b]-v.mainAxis;m<C?m=C:m>P&&(m=P)}if(u){var x,w;const b=h==="y"?"width":"height",C=Bp.has(Gt(o)),P=s.reference[f]-s.floating[b]+(C&&((x=i.offset)==null?void 0:x[f])||0)+(C?0:v.crossAxis),R=s.reference[f]+s.reference[b]+(C?0:((w=i.offset)==null?void 0:w[f])||0)-(C?v.crossAxis:0);g<P?g=P:g>R&&(g=R)}return{[h]:m,[f]:g}}}},gR=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:o,rects:s,platform:i,elements:a}=e,{apply:c=()=>{},...u}=Bt(t,e),d=await i.detectOverflow(e,u),f=Gt(o),h=dr(o),m=At(o)==="y",{width:g,height:y}=s.floating;let v,x;f==="top"||f==="bottom"?(v=f,x=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(x=f,v=h==="end"?"top":"bottom");const w=y-d.top-d.bottom,b=g-d.left-d.right,C=on(y-d[v],w),P=on(g-d[x],b),R=!e.middlewareData.shift;let M=C,j=P;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(j=b),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(M=w),R&&!h){const E=at(d.left,0),k=at(d.right,0),_=at(d.top,0),$=at(d.bottom,0);m?j=g-2*(E!==0||k!==0?E+k:at(d.left,d.right)):M=y-2*(_!==0||$!==0?_+$:at(d.top,d.bottom))}await c({...e,availableWidth:j,availableHeight:M});const T=await i.getDimensions(a.floating);return g!==T.width||y!==T.height?{reset:{rects:!0}}:{}}}};function ps(){return typeof window<"u"}function fr(t){return Gp(t)?(t.nodeName||"").toLowerCase():"#document"}function ct(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function _t(t){var e;return(e=(Gp(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Gp(t){return ps()?t instanceof Node||t instanceof ct(t).Node:!1}function xt(t){return ps()?t instanceof Element||t instanceof ct(t).Element:!1}function Kt(t){return ps()?t instanceof HTMLElement||t instanceof ct(t).HTMLElement:!1}function pd(t){return!ps()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ct(t).ShadowRoot}function Hr(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=bt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&o!=="inline"&&o!=="contents"}function yR(t){return/^(table|td|th)$/.test(fr(t))}function ms(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const vR=/transform|translate|scale|rotate|perspective|filter/,xR=/paint|layout|strict|content/,bn=t=>!!t&&t!=="none";let pi;function wc(t){const e=xt(t)?bt(t):t;return bn(e.transform)||bn(e.translate)||bn(e.scale)||bn(e.rotate)||bn(e.perspective)||!Cc()&&(bn(e.backdropFilter)||bn(e.filter))||vR.test(e.willChange||"")||xR.test(e.contain||"")}function bR(t){let e=sn(t);for(;Kt(e)&&!Jn(e);){if(wc(e))return e;if(ms(e))return null;e=sn(e)}return null}function Cc(){return pi==null&&(pi=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),pi}function Jn(t){return/^(html|body|#document)$/.test(fr(t))}function bt(t){return ct(t).getComputedStyle(t)}function gs(t){return xt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function sn(t){if(fr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||pd(t)&&t.host||_t(t);return pd(e)?e.host:e}function zp(t){const e=sn(t);return Jn(e)?t.ownerDocument?t.ownerDocument.body:t.body:Kt(e)&&Hr(e)?e:zp(e)}function Dr(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=zp(t),s=o===((r=t.ownerDocument)==null?void 0:r.body),i=ct(o);if(s){const a=ma(i);return e.concat(i,i.visualViewport||[],Hr(o)?o:[],a&&n?Dr(a):[])}else return e.concat(o,Dr(o,[],n))}function ma(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Up(t){const e=bt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const o=Kt(t),s=o?t.offsetWidth:n,i=o?t.offsetHeight:r,a=es(n)!==s||es(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Sc(t){return xt(t)?t:t.contextElement}function Yn(t){const e=Sc(t);if(!Kt(e))return It(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:s}=Up(e);let i=(s?es(n.width):n.width)/r,a=(s?es(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const wR=It(0);function Hp(t){const e=ct(t);return!Cc()||!e.visualViewport?wR:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function CR(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==ct(t)?!1:e}function Mn(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),s=Sc(t);let i=It(1);e&&(r?xt(r)&&(i=Yn(r)):i=Yn(t));const a=CR(s,n,r)?Hp(s):It(0);let c=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const h=ct(s),m=r&&xt(r)?ct(r):r;let g=h,y=ma(g);for(;y&&r&&m!==g;){const v=Yn(y),x=y.getBoundingClientRect(),w=bt(y),b=x.left+(y.clientLeft+parseFloat(w.paddingLeft))*v.x,C=x.top+(y.clientTop+parseFloat(w.paddingTop))*v.y;c*=v.x,u*=v.y,d*=v.x,f*=v.y,c+=b,u+=C,g=ct(y),y=ma(g)}}return ns({width:d,height:f,x:c,y:u})}function ys(t,e){const n=gs(t).scrollLeft;return e?e.left+n:Mn(_t(t)).left+n}function Wp(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-ys(t,n),o=n.top+e.scrollTop;return{x:r,y:o}}function SR(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t;const s=o==="fixed",i=_t(r),a=e?ms(e.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},u=It(1);const d=It(0),f=Kt(r);if((f||!f&&!s)&&((fr(r)!=="body"||Hr(i))&&(c=gs(r)),f)){const m=Mn(r);u=Yn(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const h=i&&!f&&!s?Wp(i,c):It(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-c.scrollTop*u.y+d.y+h.y}}function PR(t){return Array.from(t.getClientRects())}function RR(t){const e=_t(t),n=gs(t),r=t.ownerDocument.body,o=at(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=at(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ys(t);const a=-n.scrollTop;return bt(r).direction==="rtl"&&(i+=at(e.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const md=25;function TR(t,e){const n=ct(t),r=_t(t),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const d=Cc();(!d||d&&e==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const u=ys(r);if(u<=0){const d=r.ownerDocument,f=d.body,h=getComputedStyle(f),m=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(r.clientWidth-f.clientWidth-m);g<=md&&(s-=g)}else u<=md&&(s+=u);return{width:s,height:i,x:a,y:c}}function MR(t,e){const n=Mn(t,!0,e==="fixed"),r=n.top+t.clientTop,o=n.left+t.clientLeft,s=Kt(t)?Yn(t):It(1),i=t.clientWidth*s.x,a=t.clientHeight*s.y,c=o*s.x,u=r*s.y;return{width:i,height:a,x:c,y:u}}function gd(t,e,n){let r;if(e==="viewport")r=TR(t,n);else if(e==="document")r=RR(_t(t));else if(xt(e))r=MR(e,n);else{const o=Hp(t);r={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return ns(r)}function Kp(t,e){const n=sn(t);return n===e||!xt(n)||Jn(n)?!1:bt(n).position==="fixed"||Kp(n,e)}function ER(t,e){const n=e.get(t);if(n)return n;let r=Dr(t,[],!1).filter(a=>xt(a)&&fr(a)!=="body"),o=null;const s=bt(t).position==="fixed";let i=s?sn(t):t;for(;xt(i)&&!Jn(i);){const a=bt(i),c=wc(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Hr(i)&&!c&&Kp(t,i))?r=r.filter(d=>d!==i):o=a,i=sn(i)}return e.set(t,r),r}function jR(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const i=[...n==="clippingAncestors"?ms(e)?[]:ER(e,this._c):[].concat(n),r],a=gd(e,i[0],o);let c=a.top,u=a.right,d=a.bottom,f=a.left;for(let h=1;h<i.length;h++){const m=gd(e,i[h],o);c=at(m.top,c),u=on(m.right,u),d=on(m.bottom,d),f=at(m.left,f)}return{width:u-f,height:d-c,x:f,y:c}}function AR(t){const{width:e,height:n}=Up(t);return{width:e,height:n}}function DR(t,e,n){const r=Kt(e),o=_t(e),s=n==="fixed",i=Mn(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const c=It(0);function u(){c.x=ys(o)}if(r||!r&&!s)if((fr(e)!=="body"||Hr(o))&&(a=gs(e)),r){const m=Mn(e,!0,s,e);c.x=m.x+e.clientLeft,c.y=m.y+e.clientTop}else o&&u();s&&!r&&o&&u();const d=o&&!r&&!s?Wp(o,a):It(0),f=i.left+a.scrollLeft-c.x-d.x,h=i.top+a.scrollTop-c.y-d.y;return{x:f,y:h,width:i.width,height:i.height}}function mi(t){return bt(t).position==="static"}function yd(t,e){if(!Kt(t)||bt(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return _t(t)===n&&(n=n.ownerDocument.body),n}function Yp(t,e){const n=ct(t);if(ms(t))return n;if(!Kt(t)){let o=sn(t);for(;o&&!Jn(o);){if(xt(o)&&!mi(o))return o;o=sn(o)}return n}let r=yd(t,e);for(;r&&yR(r)&&mi(r);)r=yd(r,e);return r&&Jn(r)&&mi(r)&&!wc(r)?n:r||bR(t)||n}const IR=async function(t){const e=this.getOffsetParent||Yp,n=this.getDimensions,r=await n(t.floating);return{reference:DR(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function kR(t){return bt(t).direction==="rtl"}const NR={convertOffsetParentRelativeRectToViewportRelativeRect:SR,getDocumentElement:_t,getClippingRect:jR,getOffsetParent:Yp,getElementRects:IR,getClientRects:PR,getDimensions:AR,getScale:Yn,isElement:xt,isRTL:kR};function Xp(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function _R(t,e){let n=null,r;const o=_t(t);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const u=t.getBoundingClientRect(),{left:d,top:f,width:h,height:m}=u;if(a||e(),!h||!m)return;const g=vo(f),y=vo(o.clientWidth-(d+h)),v=vo(o.clientHeight-(f+m)),x=vo(d),b={rootMargin:-g+"px "+-y+"px "+-v+"px "+-x+"px",threshold:at(0,on(1,c))||1};let C=!0;function P(R){const M=R[0].intersectionRatio;if(M!==c){if(!C)return i();M?i(!1,M):r=setTimeout(()=>{i(!1,1e-7)},1e3)}M===1&&!Xp(u,t.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(P,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(P,b)}n.observe(t)}return i(!0),s}function OR(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Sc(t),d=o||s?[...u?Dr(u):[],...e?Dr(e):[]]:[];d.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=u&&a?_R(u,n):null;let h=-1,m=null;i&&(m=new ResizeObserver(x=>{let[w]=x;w&&w.target===u&&m&&e&&(m.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(e)})),n()}),u&&!c&&m.observe(u),e&&m.observe(e));let g,y=c?Mn(t):null;c&&v();function v(){const x=Mn(t);y&&!Xp(y,x)&&n(),y=x,g=requestAnimationFrame(v)}return n(),()=>{var x;d.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),f==null||f(),(x=m)==null||x.disconnect(),m=null,c&&cancelAnimationFrame(g)}}const LR=hR,$R=pR,FR=uR,VR=gR,BR=dR,vd=lR,GR=mR,zR=(t,e,n)=>{const r=new Map,o={platform:NR,...n},s={...o.platform,_c:r};return cR(t,e,{...o,platform:s})};var UR=typeof document<"u",HR=function(){},Bo=UR?S.useLayoutEffect:HR;function rs(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!rs(t[r],e[r]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&t.$$typeof)&&!rs(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function qp(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function xd(t,e){const n=qp(t);return Math.round(e*n)/n}function gi(t){const e=p.useRef(t);return Bo(()=>{e.current=t}),e}function WR(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:u}=t,[d,f]=p.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,m]=p.useState(r);rs(h,r)||m(r);const[g,y]=p.useState(null),[v,x]=p.useState(null),w=p.useCallback(L=>{L!==R.current&&(R.current=L,y(L))},[]),b=p.useCallback(L=>{L!==M.current&&(M.current=L,x(L))},[]),C=s||g,P=i||v,R=p.useRef(null),M=p.useRef(null),j=p.useRef(d),T=c!=null,E=gi(c),k=gi(o),_=gi(u),$=p.useCallback(()=>{if(!R.current||!M.current)return;const L={placement:e,strategy:n,middleware:h};k.current&&(L.platform=k.current),zR(R.current,M.current,L).then(O=>{const D={...O,isPositioned:_.current!==!1};G.current&&!rs(j.current,D)&&(j.current=D,Lr.flushSync(()=>{f(D)}))})},[h,e,n,k,_]);Bo(()=>{u===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,f(L=>({...L,isPositioned:!1})))},[u]);const G=p.useRef(!1);Bo(()=>(G.current=!0,()=>{G.current=!1}),[]),Bo(()=>{if(C&&(R.current=C),P&&(M.current=P),C&&P){if(E.current)return E.current(C,P,$);$()}},[C,P,$,E,T]);const Q=p.useMemo(()=>({reference:R,floating:M,setReference:w,setFloating:b}),[w,b]),V=p.useMemo(()=>({reference:C,floating:P}),[C,P]),I=p.useMemo(()=>{const L={position:n,left:0,top:0};if(!V.floating)return L;const O=xd(V.floating,d.x),D=xd(V.floating,d.y);return a?{...L,transform:"translate("+O+"px, "+D+"px)",...qp(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:D}},[n,a,V.floating,d.x,d.y]);return p.useMemo(()=>({...d,update:$,refs:Q,elements:V,floatingStyles:I}),[d,$,Q,V,I])}const KR=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:o}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?vd({element:r.current,padding:o}).fn(n):{}:r?vd({element:r,padding:o}).fn(n):{}}}},YR=(t,e)=>{const n=LR(t);return{name:n.name,fn:n.fn,options:[t,e]}},XR=(t,e)=>{const n=$R(t);return{name:n.name,fn:n.fn,options:[t,e]}},qR=(t,e)=>({fn:GR(t).fn,options:[t,e]}),ZR=(t,e)=>{const n=FR(t);return{name:n.name,fn:n.fn,options:[t,e]}},QR=(t,e)=>{const n=VR(t);return{name:n.name,fn:n.fn,options:[t,e]}},JR=(t,e)=>{const n=BR(t);return{name:n.name,fn:n.fn,options:[t,e]}},eT=(t,e)=>{const n=KR(t);return{name:n.name,fn:n.fn,options:[t,e]}};var tT=Object.defineProperty,nT=(t,e)=>tT(t,"name",{value:e,configurable:!0}),rT=p.forwardRef(nT(function(e,n){const{children:r,width:o=10,height:s=5,...i}=e;return l.jsx(re.svg,{...i,ref:n,width:o,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:l.jsx("polygon",{points:"0,0 30,0 15,10"})})},"Arrow")),oT=rT,sT=Object.defineProperty,iT=(t,e)=>sT(t,"name",{value:e,configurable:!0});function hr(t){const[e,n]=p.useState(void 0);return Ee(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,a=u.blockSize}else i=t.offsetWidth,a=t.offsetHeight;n({width:i,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}iT(hr,"useSize");var aT=Object.defineProperty,$t=(t,e)=>aT(t,"name",{value:e,configurable:!0}),Zp="Popper",[Qp,dn]=Re(Zp),[cT,Jp]=Qp(Zp),lT=$t(t=>{const{__scopePopper:e,children:n}=t,[r,o]=p.useState(null),[s,i]=p.useState(void 0);return l.jsx(cT,{scope:e,anchor:r,onAnchorChange:o,placementState:s,setPlacementState:i,children:n})},"Popper"),uT="PopperAnchor",dT=p.forwardRef($t(function(e,n){const{__scopePopper:r,virtualRef:o,...s}=e,i=Jp(uT,r),a=p.useRef(null),c=i.onAnchorChange,u=p.useCallback(y=>{a.current=y,y&&c(y)},[c]),d=ie(n,u),f=p.useRef(null);p.useEffect(()=>{if(!o)return;const y=f.current;f.current=o.current,y!==f.current&&c(f.current)});const h=i.placementState&&vs(i.placementState),m=h==null?void 0:h[0],g=h==null?void 0:h[1];return o?null:l.jsx(re.div,{"data-radix-popper-side":m,"data-radix-popper-align":g,...s,ref:d})},"PopperAnchor")),em="PopperContent",[fT,hT]=Qp(em),pT=p.forwardRef($t(function(e,n){var z,Z,le,ce,F,q,he;const{__scopePopper:r,side:o="bottom",sideOffset:s=0,align:i="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:y,...v}=e,x=Jp(em,r),[w,b]=p.useState(null),C=ie(n,b),[P,R]=p.useState(null),M=hr(P),j=(M==null?void 0:M.width)??0,T=(M==null?void 0:M.height)??0,E=o+(i!=="center"?"-"+i:""),k=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},_=Array.isArray(d)?d:[d],$=_.length>0,G={padding:k,boundary:_.filter(tm),altBoundary:$},{refs:Q,floatingStyles:V,placement:I,isPositioned:L,middlewareData:O}=WR({strategy:"fixed",placement:E,whileElementsMounted:$t((...ue)=>OR(...ue,{animationFrame:g==="always"}),"whileElementsMounted"),elements:{reference:x.anchor},middleware:[YR({mainAxis:s+T,alignmentAxis:a}),u&&XR({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?qR():void 0,...G}),u&&ZR({...G}),QR({...G,apply:$t(({elements:ue,rects:He,availableWidth:ve,availableHeight:qe})=>{const{width:gn,height:pe}=He.reference,we=ue.floating.style;we.setProperty("--radix-popper-available-width",`${ve}px`),we.setProperty("--radix-popper-available-height",`${qe}px`),we.setProperty("--radix-popper-anchor-width",`${gn}px`),we.setProperty("--radix-popper-anchor-height",`${pe}px`)},"apply")}),P&&eT({element:P,padding:c}),vT({arrowWidth:j,arrowHeight:T}),m&&JR({strategy:"referenceHidden",...G,boundary:$?G.boundary:void 0})]}),D=x.setPlacementState;Ee(()=>(D(I),()=>{D(void 0)}),[I,D]);const[X,A]=vs(I),B=Qe(y);Ee(()=>{L&&(B==null||B())},[L,B]);const ee=(z=O.arrow)==null?void 0:z.x,K=(Z=O.arrow)==null?void 0:Z.y,W=((le=O.arrow)==null?void 0:le.centerOffset)!==0,[oe,Y]=p.useState();return Ee(()=>{w&&Y(window.getComputedStyle(w).zIndex)},[w]),l.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:L?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[(ce=O.transformOrigin)==null?void 0:ce.x,(F=O.transformOrigin)==null?void 0:F.y].join(" "),...((q=O.hide)==null?void 0:q.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(fT,{scope:r,placedSide:X,placedAlign:A,onArrowChange:R,arrowX:ee,arrowY:K,shouldHideArrow:W,children:l.jsx(re.div,{"data-side":X,"data-align":A,...v,ref:C,style:{...v.style,animation:L?(he=v.style)==null?void 0:he.animation:"none"}})})})},"PopperContent")),mT="PopperArrow",gT={top:"bottom",right:"left",bottom:"top",left:"right"},yT=p.forwardRef($t(function(e,n){const{__scopePopper:r,...o}=e,s=hT(mT,r),i=gT[s.placedSide];return l.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:l.jsx(oT,{...o,ref:n,style:{...o.style,display:"block"}})})},"PopperArrow"));function tm(t){return t!==null}$t(tm,"isNotNull");var vT=$t(t=>({name:"transformOrigin",options:t,fn(e){var v,x,w;const{placement:n,rects:r,middlewareData:o}=e,i=((v=o.arrow)==null?void 0:v.centerOffset)!==0,a=i?0:t.arrowWidth,c=i?0:t.arrowHeight,[u,d]=vs(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(((x=o.arrow)==null?void 0:x.x)??0)+a/2,m=(((w=o.arrow)==null?void 0:w.y)??0)+c/2;let g="",y="";return u==="bottom"?(g=i?f:`${h}px`,y=`${-c}px`):u==="top"?(g=i?f:`${h}px`,y=`${r.floating.height+c}px`):u==="right"?(g=`${-c}px`,y=i?f:`${m}px`):u==="left"&&(g=`${r.floating.width+c}px`,y=i?f:`${m}px`),{data:{x:g,y}}}}),"transformOrigin");function vs(t){const[e,n="center"]=t.split("-");return[e,n]}$t(vs,"getSideAndAlignFromPlacement");var Wr=lT,Kr=dT,xs=pT,nm=yT,xT=Object.defineProperty,bT=(t,e)=>xT(t,"name",{value:e,configurable:!0}),Yr=p.forwardRef(bT(function(e,n){var c;const{container:r,...o}=e,[s,i]=p.useState(!1);Ee(()=>i(!0),[]);const a=r||s&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return a?Lr.createPortal(l.jsx(re.div,{...o,ref:n}),a):null},"Portal")),wT=Object.defineProperty,zt=(t,e)=>wT(t,"name",{value:e,configurable:!0});function rm(t,e){return p.useReducer((n,r)=>e[n][r]??n,t)}zt(rm,"useStateMachine");var Ue=zt(t=>{const{present:e,children:n}=t,r=om(e),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),s=sm(r.ref,im(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:s}):null},"Presence");function om(t){const[e,n]=p.useState(),r=p.useRef(null),o=p.useRef(t),s=p.useRef("none"),i=p.useRef(void 0),a=t?"mounted":"unmounted",[c,u]=rm(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{c==="mounted"?(s.current=i.current??Bn(r.current),i.current=void 0):s.current="none"},[c]),Ee(()=>{const d=r.current,f=o.current;if(f!==t){const m=s.current,g=Bn(d);t?(i.current=g,u("MOUNT")):g==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(f&&m!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,u]),Ee(()=>{if(e){let d;const f=e.ownerDocument.defaultView??window,h=zt(g=>{const v=Bn(r.current).includes(CSS.escape(g.animationName));if(g.target===e&&v&&(u("ANIMATION_END"),!o.current)){const x=e.style.animationFillMode;e.style.animationFillMode="forwards",d=f.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=x)})}},"handleAnimationEnd"),m=zt(g=>{g.target===e&&(s.current=Bn(r.current))},"handleAnimationStart");return e.addEventListener("animationstart",m),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{f.clearTimeout(d),e.removeEventListener("animationstart",m),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else u("ANIMATION_END")},[e,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:p.useCallback(d=>{if(d){const f=getComputedStyle(d);r.current=f,i.current=Bn(f)}else r.current=null;n(d)},[])}}zt(om,"usePresence");function ga(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}zt(ga,"setRef");function sm(...t){const e=p.useRef(t);return e.current=t,p.useCallback(n=>{const r=e.current;let o=!1;const s=r.map(i=>{const a=ga(i,n);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let i=0;i<s.length;i++){const a=s[i];typeof a=="function"?a():ga(r[i],null)}}},[])}zt(sm,"useStableComposedRefs");function Bn(t){return(t==null?void 0:t.animationName)||"none"}zt(Bn,"getAnimationName");function im(t){var r,o;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}zt(im,"getElementRef");var CT=Object.defineProperty,ST=(t,e)=>CT(t,"name",{value:e,configurable:!0});function Pc(t){const e=p.useRef({value:t,previous:t});return p.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}ST(Pc,"usePrevious");var PT=Object.defineProperty,RT=(t,e)=>PT(t,"name",{value:e,configurable:!0}),am=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"}),cm=p.forwardRef(RT(function(e,n){return l.jsx(re.span,{...e,ref:n,style:{...am,...e.style}})},"VisuallyHidden")),TT=cm,MT=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Ln=new WeakMap,xo=new WeakMap,bo={},yi=0,lm=function(t){return t&&(t.host||lm(t.parentNode))},ET=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=lm(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},jT=function(t,e,n,r){var o=ET(e,Array.isArray(t)?t:[t]);bo[n]||(bo[n]=new WeakMap);var s=bo[n],i=[],a=new Set,c=new Set(o),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};o.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(h){if(a.has(h))d(h);else try{var m=h.getAttribute(r),g=m!==null&&m!=="false",y=(Ln.get(h)||0)+1,v=(s.get(h)||0)+1;Ln.set(h,y),s.set(h,v),i.push(h),y===1&&g&&xo.set(h,!0),v===1&&h.setAttribute(n,"true"),g||h.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return d(e),a.clear(),yi++,function(){i.forEach(function(f){var h=Ln.get(f)-1,m=s.get(f)-1;Ln.set(f,h),s.set(f,m),h||(xo.has(f)||f.removeAttribute(r),xo.delete(f)),m||f.removeAttribute(n)}),yi--,yi||(Ln=new WeakMap,Ln=new WeakMap,xo=new WeakMap,bo={})}},bs=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),o=MT(t);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),jT(r,o,n,"aria-hidden")):function(){return null}},jt=function(){return jt=Object.assign||function(e){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},jt.apply(this,arguments)};function um(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n}function AT(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,s;r<o;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}var Go="right-scroll-bar-position",zo="width-before-scroll-bar",DT="with-scroll-bars-hidden",IT="--removed-body-scroll-bar-size";function vi(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function kT(t,e){var n=S.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=e,n.facade}var NT=typeof window<"u"?p.useLayoutEffect:p.useEffect,bd=new WeakMap;function _T(t,e){var n=kT(null,function(r){return t.forEach(function(o){return vi(o,r)})});return NT(function(){var r=bd.get(n);if(r){var o=new Set(r),s=new Set(t),i=n.current;o.forEach(function(a){s.has(a)||vi(a,null)}),s.forEach(function(a){o.has(a)||vi(a,i)})}bd.set(n,t)},[t]),n}function OT(t){return t}function LT(t,e){e===void 0&&(e=OT);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(s){var i=e(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var d=i;i=[],d.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return o}function $T(t){t===void 0&&(t={});var e=LT(null);return e.options=jt({async:!0,ssr:!1},t),e}var dm=function(t){var e=t.sideCar,n=um(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return p.createElement(r,jt({},n))};dm.isSideCarExport=!0;function FT(t,e){return t.useMedium(e),dm}var fm=$T(),xi=function(){},ws=p.forwardRef(function(t,e){var n=p.useRef(null),r=p.useState({onScrollCapture:xi,onWheelCapture:xi,onTouchMoveCapture:xi}),o=r[0],s=r[1],i=t.forwardProps,a=t.children,c=t.className,u=t.removeScrollBar,d=t.enabled,f=t.shards,h=t.sideCar,m=t.noRelative,g=t.noIsolation,y=t.inert,v=t.allowPinchZoom,x=t.as,w=x===void 0?"div":x,b=t.gapMode,C=um(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=h,R=_T([n,e]),M=jt(jt({},C),o);return p.createElement(p.Fragment,null,d&&p.createElement(P,{sideCar:fm,removeScrollBar:u,shards:f,noRelative:m,noIsolation:g,inert:y,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:b}),i?p.cloneElement(p.Children.only(a),jt(jt({},M),{ref:R})):p.createElement(w,jt({},M,{className:c,ref:R}),a))});ws.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ws.classNames={fullWidth:zo,zeroRight:Go};var VT=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function BT(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=VT();return e&&t.setAttribute("nonce",e),t}function GT(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function zT(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var UT=function(){var t=0,e=null;return{add:function(n){t==0&&(e=BT())&&(GT(e,n),zT(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},HT=function(){var t=UT();return function(e,n){p.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},hm=function(){var t=HT(),e=function(n){var r=n.styles,o=n.dynamic;return t(r,o),null};return e},WT={left:0,top:0,right:0,gap:0},bi=function(t){return parseInt(t||"",10)||0},KT=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],o=e[t==="padding"?"paddingRight":"marginRight"];return[bi(n),bi(r),bi(o)]},YT=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return WT;var e=KT(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},XT=hm(),Xn="data-scroll-locked",qT=function(t,e,n,r){var o=t.left,s=t.top,i=t.right,a=t.gap;return n===void 0&&(n="margin"),`
|
|
175
175
|
.`.concat(DT,` {
|
|
176
176
|
overflow: hidden `).concat(r,`;
|
|
177
177
|
padding-right: `).concat(a,"px ").concat(r,`;
|