canny-ui-react 6.3.0 → 6.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
*
|
|
167
167
|
* This source code is licensed under the ISC license.
|
|
168
168
|
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
-
*/const qS=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Wt=ve("x",qS),ZS=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,N=s&&!d&&R!=="",O=N||a,$=r!=null||o!=null||O,V=L=>{b||P(L.target.value),v==null||v(L)},q=L=>{var X;L.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()},G=ae($?void 0:m,$?void 0:h,"input",e!=="primary"&&e,n==="sm"||n==="lg"?n:null,c&&"filled",f),k=l.jsx("input",{ref:M,type:E,className:G.className,style:G.style,disabled:d,value:b?g:void 0,defaultValue:b?void 0:y,onChange:V,...x});if(!$)return l.jsxs(l.Fragment,{children:[G.styleTag,k]});const F=ae(m,h,"cny-input-affix",r!=null&&"has-prefix",o!=null&&!O&&"has-suffix",O&&"has-action");return l.jsxs("span",{className:F.className,style:F.style,children:[F.styleTag,r!=null&&l.jsx("span",{className:"cny-input-prefix",children:r}),k,o!=null&&!O&&l.jsx("span",{className:"cny-input-suffix",children:o}),N&&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(L=>!L),"aria-label":j?"Hide password":"Show password","aria-pressed":j,children:j?l.jsx(kS,{size:14,"aria-hidden":"true"}):l.jsx(_S,{size:14,"aria-hidden":"true"})})]})}),QS=S.forwardRef(function({color:e="default",className:n,style:r,sx:o,children:s,...i},a){const{className:c,style:u,styleTag:d}=ae(o,r,"card",e!=="default"&&e,n);return l.jsxs("div",{ref:a,className:c,style:u,...i,children:[d,s]})}),JS={info:Cp,success:bp,warning:Rp,danger:xp};function eP({color:t}){const e=JS[t];return l.jsx(e,{size:16,className:"alert-icon-glyph","aria-hidden":"true"})}const tP=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(eP,{color:e}),{className:v,style:x,styleTag:w}=ae(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"})})]})}),nP=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}=ae(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]})}),rP=S.forwardRef(function({className:e,children:n,...r},o){return l.jsx("div",{ref:o,className:H("avatar-stack",e),...r,children:n})}),oP=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}=ae(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"})]})}),sP=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}=ae(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,"%"]})]})}),iP={both:{overflowX:"auto",overflowY:"auto"},x:{overflowX:"auto",overflowY:"hidden"},y:{overflowX:"hidden",overflowY:"auto"}},Tp=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={...iP[r],maxHeight:o,maxWidth:s,...c??{}},{className:g,style:y,styleTag:v}=ae(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]})}),aP=S.forwardRef(function(e,n){return l.jsx(Tp,{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}=ae(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})}),cP=S.forwardRef(function({solid:e=!1,className:n,style:r,sx:o,children:s,...i},a){const{className:c,style:u,styleTag:d}=ae(o,r,"cny-navbar",e&&"solid",n);return l.jsxs("header",{ref:a,className:c,style:u,...i,children:[d,s]})}),lP=S.forwardRef(function({mark:e=!0,className:n,children:r,...o},s){return l.jsxs("a",{ref:s,className:H("cny-navbar-brand",n),...o,children:[e&&l.jsx("span",{className:"brand-mark","aria-hidden":"true"}),r]})}),uP=S.forwardRef(function({className:e,children:n,...r},o){return l.jsx("nav",{ref:o,className:H("cny-navbar-nav",e),...r,children:n})}),dP=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:H("cny-navbar-item",e&&"active",n),...o,children:r})}),fP=S.forwardRef(function({className:e,children:n,...r},o){return l.jsx("div",{ref:o,className:H("cny-navbar-actions",e),...r,children:n})}),hP=S.forwardRef(function({width:e="default",sticky:n=!1,collapsed:r=!1,responsive:o=!1,className:s,style:i,sx:a,children:c,...u},d){const{className:f,style:h,styleTag:m}=ae(a,i,"cny-sidebar",e!=="default"&&e,n&&"sticky",r&&"collapsed",o&&"responsive",s);return l.jsxs("aside",{ref:d,className:f,style:h,...u,children:[m,c]})}),pP=S.forwardRef(function({className:e,children:n,...r},o){return l.jsx("div",{ref:o,className:H("cny-sidebar-header",e),...r,children:n})}),mP=S.forwardRef(function({className:e,children:n,...r},o){return l.jsx("div",{ref:o,className:H("cny-sidebar-footer",e),...r,children:n})}),gP=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:H("cny-sidebar-toggle",e&&"collapsed",r),onClick:n,...s,children:o??l.jsx(KS,{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 yP=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:H("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})]})}),vP=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:H("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",{children:i}),o&&l.jsx("span",{className:"cny-sidebar-item-badge",children:o})]})});function xP(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 An=S.forwardRef(function({as:e,className:n,style:r,children:o,...s},i){const a=e??"div",{layoutProps:c,domProps:u}=bP(s),{sx:d,...f}=c,h=d?Ia(d):void 0,m=H(...xP(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("style",{dangerouslySetInnerHTML:{__html:h.css}}),y):y});function bP(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 wP=S.forwardRef(function(e,n){return l.jsx(An,{ref:n,display:"flex",direction:"column",...e})}),CP=S.forwardRef(function(e,n){const{align:r="center",...o}=e;return l.jsx(An,{ref:n,display:"flex",direction:"row",align:r,...o})}),rd=t=>t.map(e=>`minmax(0,${e}fr)`).join(" "),SP=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=rd(r);else{const f={};for(const[h,m]of Object.entries(r))m&&(f[h]=rd(m));u=f}else n&&(u=`repeat(auto-fit, minmax(${n}, 1fr))`);const d=u?{gridTemplateColumns:u,...i??{}}:i;return l.jsx(An,{ref:c,display:"grid",className:H(!u&&e&&`grid-cols-${e}`,s),sx:d,...a})}),PP=S.forwardRef(function({size:e="lg",className:n,...r},o){return l.jsx(An,{ref:o,className:H("cny-container",e,n),...r})}),RP=S.forwardRef(function({orientation:e="horizontal",className:n,style:r,sx:o,...s},i){const{className:a,style:c,styleTag:u}=ae(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})]})}),TP=S.forwardRef(function({className:e,style:n,sx:r,...o},s){const{className:i,style:a,styleTag:c}=ae(r,n,"cny-spacer",e);return l.jsx("span",{ref:s,"aria-hidden":"true",className:i,style:a,...o,children:c})}),MP=S.forwardRef(function({ratio:e=16/9,className:n,style:r,sx:o,children:s,...i},a){const{className:c,style:u,styleTag:d}=ae(o,{aspectRatio:String(e),...r},"aspect-ratio",n);return l.jsxs("div",{ref:a,className:c,style:u,...i,children:[d,s]})}),EP=S.forwardRef(function(e,n){return l.jsx(An,{ref:n,display:"flex",align:"center",justify:"center",...e})}),jP=S.forwardRef(function(e,n){const{align:r="center",gap:o=2,wrap:s=!0,...i}=e;return l.jsx(An,{ref:n,display:"flex",direction:"row",align:r,gap:o,wrap:s,...i})}),AP={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"},DP=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??AP[n],{className:g,style:y,styleTag:v}=ae(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 IP({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:H(g.props.className,x!=="default"&&x)}),C=i!=null&&s!=null&&s>i?"danger":"default",{className:P,style:R,styleTag:M}=ae(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:H("cny-field-counter",C==="danger"&&"danger"),"aria-live":"polite",children:i!=null?`${s}/${i}`:s})]}),b,(n||e)&&l.jsx("span",{id:w,className:H("cny-field-hint",x!=="default"&&x),children:n??e})]})}const kP=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}=ae(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 NP=Object.defineProperty,_P=(t,e)=>NP(t,"name",{value:e,configurable:!0});function jr(t,[e,n]){return Math.min(n,Math.max(e,t))}_P(jr,"clamp");var OP=Object.defineProperty,ke=(t,e)=>OP(t,"name",{value:e,configurable:!0}),ca="dismissableLayer.update",LP="dismissableLayer.pointerDownOutside",$P="dismissableLayer.focusOutside",od,Mp=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),zr=p.forwardRef(ke(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(Mp),[h,m]=p.useState(null),g=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=p.useState({}),v=ce(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=jp(O=>{i==null||i(O),c==null||c(O),O.defaultPrevented||u==null||u()},{ownerDocument:g,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:M,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:p.useCallback(O=>{if(!(O instanceof Node))return!1;const $=[...f.branches].some(V=>V.contains(O));return R&&!$},[f.branches,R])}),T=Ap(O=>{if(o&&M.current)return;const $=O.target;[...f.branches].some(q=>q.contains($))||(a==null||a(O),c==null||c(O),O.defaultPrevented||u==null||u())},g),E=h?C===x.length-1:!1,N=qe(O=>{O.key==="Escape"&&(s==null||s(O),!O.defaultPrevented&&u&&(O.preventDefault(),u()))});return p.useEffect(()=>{if(E)return g.addEventListener("keydown",N,{capture:!0}),()=>g.removeEventListener("keydown",N,{capture:!0})},[g,E,N]),p.useEffect(()=>{if(h)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(od=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=od))}},[h,g,r,f]),p.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),la())},[h,f]),p.useEffect(()=>{const O=ke(()=>y({}),"handleUpdate");return document.addEventListener(ca,O),()=>document.removeEventListener(ca,O)},[]),l.jsx(te.div,{...d,ref:v,style:{pointerEvents:P?R?"auto":"none":void 0,...e.style},onFocusCapture:U(e.onFocusCapture,T.onFocusCapture),onBlurCapture:U(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,j.onPointerDownCapture)})},"DismissableLayer"));function Ep(){const t=p.useContext(Mp),[e,n]=p.useState(null);return p.useEffect(()=>{if(e)return t.dismissableSurfaces.add(e),()=>{t.dismissableSurfaces.delete(e)}},[e,t.dismissableSurfaces]),n}ke(Ep,"useDismissableLayerSurface");var FP=ke(()=>!0,"IS_TRUE");function jp(t,e){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:s,shouldHandlePointerDownOutside:i=FP}=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()}ke(h,"resetOutsideInteraction");function m(){return Array.from(d.current.values()).some(Boolean)}ke(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)}ke(g,"handleInteractionCapture");function y(b){u.current&&d.current.set(b.type,!1)}ke(y,"handleInteractionBubble");const v=ke(b=>{if(b.target&&!c.current){let C=function(){n.removeEventListener("click",f.current);const R=m();h(),R||hc(LP,a,P,{discrete:!0})};if(ke(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:ke(()=>c.current=!0,"onPointerDownCapture")}}ke(jp,"usePointerDownOutside");function Ap(t,e=globalThis==null?void 0:globalThis.document){const n=qe(t),r=p.useRef(!1);return p.useEffect(()=>{const o=ke(s=>{s.target&&!r.current&&hc($P,n,{originalEvent:s},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[e,n]),{onFocusCapture:ke(()=>r.current=!0,"onFocusCapture"),onBlurCapture:ke(()=>r.current=!1,"onBlurCapture")}}ke(Ap,"useFocusOutside");function la(){const t=new CustomEvent(ca);document.dispatchEvent(t)}ke(la,"dispatchUpdate");function hc(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?lc(o,s):o.dispatchEvent(s)}ke(hc,"handleAndDispatchCustomEvent");var VP=Object.defineProperty,pc=(t,e)=>VP(t,"name",{value:e,configurable:!0}),yo=0,Pt=null;function BP(t){return lr(),t.children}pc(BP,"FocusGuards");function lr(){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)}},[])}pc(lr,"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}pc(ua,"createFocusGuard");var GP=Object.defineProperty,Ke=(t,e)=>GP(t,"name",{value:e,configurable:!0}),fi="focusScope.autoFocusOnMount",hi="focusScope.autoFocusOnUnmount",sd={bubbles:!1,cancelable:!0},hs=p.forwardRef(Ke(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=ce(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)};Ke(v,"handleFocusIn"),Ke(x,"handleFocusOut"),Ke(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){id.add(g);const v=document.activeElement;if(!c.contains(v)){const w=new CustomEvent(fi,sd);c.addEventListener(fi,d),c.dispatchEvent(w),w.defaultPrevented||(Dp(Op(mc(c)),{select:!0}),document.activeElement===v&&Lt(c))}return()=>{c.removeEventListener(fi,d),setTimeout(()=>{const w=new CustomEvent(hi,sd);c.addEventListener(hi,f),c.dispatchEvent(w),w.defaultPrevented||Lt(v??document.body,{select:!0}),c.removeEventListener(hi,f),id.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]=Ip(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(te.div,{tabIndex:-1,...a,ref:m,onKeyDown:y})},"FocusScope"));function Dp(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(Lt(r,{select:e}),document.activeElement!==n)return}Ke(Dp,"focusFirst");function Ip(t){const e=mc(t),n=da(e,t),r=da(e.reverse(),t);return[n,r]}Ke(Ip,"getTabbableEdges");function mc(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:Ke(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}Ke(mc,"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}):kp(r,{upTo:e})))return r}Ke(da,"findVisible");function kp(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}Ke(kp,"isHidden");function Np(t){return t instanceof HTMLInputElement&&"select"in t}Ke(Np,"isSelectableInput");function Lt(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&Np(t)&&e&&t.select()}}Ke(Lt,"focus");var id=_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()}}}Ke(_p,"createFocusScopesStack");function fa(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}Ke(fa,"arrayRemove");function Op(t){return t.filter(e=>e.tagName!=="A")}Ke(Op,"removeLinks");const zP=["top","right","bottom","left"],on=Math.min,st=Math.max,es=Math.round,vo=Math.floor,It=t=>({x:t,y:t}),UP={left:"right",right:"left",bottom:"top",top:"bottom"};function ha(t,e,n){return st(t,on(e,n))}function Bt(t,e){return typeof t=="function"?t(e):t}function Gt(t){return t.split("-")[0]}function ur(t){return t.split("-")[1]}function gc(t){return t==="x"?"y":"x"}function yc(t){return t==="y"?"height":"width"}function At(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function vc(t){return gc(At(t))}function HP(t,e,n){n===void 0&&(n=!1);const r=ur(t),o=vc(t),s=yc(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 WP(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 ad=["left","right"],cd=["right","left"],KP=["top","bottom"],YP=["bottom","top"];function XP(t,e,n){switch(t){case"top":case"bottom":return n?e?cd:ad:e?ad:cd;case"left":case"right":return e?KP:YP;default:return[]}}function qP(t,e,n,r){const o=ur(t);let s=XP(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 UP[e]+t.slice(e.length)}function ZP(t){return{top:0,right:0,bottom:0,left:0,...t}}function Lp(t){return typeof t!="number"?ZP(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 ld(t,e,n){let{reference:r,floating:o}=t;const s=At(e),i=vc(e),a=yc(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(ur(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 QP(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=Lp(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 JP=50,eR=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=i.detectOverflow?i:{...i,detectOverflow:QP},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}=ld(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<JP&&(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}=ld(u,h,c)),y=-1)}return{x:d,y:f,placement:h,strategy:o,middlewareData:g}},tR=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=Lp(d),h={x:n,y:r},m=vc(o),g=yc(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),N=on(f[w],T),O=E,$=M-y[g]-N,V=M/2-y[g]/2+j,q=ha(O,V,$),G=!c.arrow&&ur(o)!=null&&V!==q&&s.reference[g]/2-(V<O?E:N)-y[g]/2<0,k=G?V<O?V-O:V-$:0;return{[m]:h[m]+k,data:{[m]:q,centerOffset:V-q-k,...G&&{alignmentOffset:k}},reset:G}}}),nR=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)]:WP(a)),R=g!=="none";!h&&R&&P.push(...qP(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 V=HP(o,i,C);T.push(j[V[0]],j[V[1]])}if(E=[...E,{placement:o,overflows:T}],!T.every(V=>V<=0)){var N,O;const V=(((N=s.flip)==null?void 0:N.index)||0)+1,q=M[V];if(q&&(!(f==="alignment"?w!==At(q):!1)||E.every(F=>At(F.placement)===w?F.overflows[0]>0:!0)))return{data:{index:V,overflows:E},reset:{placement:q}};let G=(O=E.filter(k=>k.overflows[0]<=0).sort((k,F)=>k.overflows[1]-F.overflows[1])[0])==null?void 0:O.placement;if(!G)switch(m){case"bestFit":{var $;const k=($=E.filter(F=>{if(R){const L=At(F.placement);return L===w||L==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(L=>L>0).reduce((L,D)=>L+D,0)]).sort((F,L)=>F[1]-L[1])[0])==null?void 0:$[0];k&&(G=k);break}case"initialPlacement":G=a;break}if(o!==G)return{reset:{placement:G}}}return{}}}};function ud(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function dd(t){return zP.some(e=>t[e]>=0)}const rR=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=ud(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:dd(a)}}}case"escaped":{const i=await r.detectOverflow(e,{...s,altBoundary:!0}),a=ud(i,n.floating);return{data:{escapedOffsets:a,escaped:dd(a)}}}default:return{}}}}},$p=new Set(["left","top"]);async function oR(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=ur(n),c=At(n)==="y",u=$p.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 sR=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 oR(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}}}}},iR=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=gc(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}}}}}},aR=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=gc(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=$p.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}}}},cR=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=ur(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=st(d.left,0),N=st(d.right,0),O=st(d.top,0),$=st(d.bottom,0);m?j=g-2*(E!==0||N!==0?E+N:st(d.left,d.right)):M=y-2*(O!==0||$!==0?O+$:st(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 dr(t){return Fp(t)?(t.nodeName||"").toLowerCase():"#document"}function it(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function _t(t){var e;return(e=(Fp(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Fp(t){return ps()?t instanceof Node||t instanceof it(t).Node:!1}function xt(t){return ps()?t instanceof Element||t instanceof it(t).Element:!1}function Kt(t){return ps()?t instanceof HTMLElement||t instanceof it(t).HTMLElement:!1}function fd(t){return!ps()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof it(t).ShadowRoot}function Ur(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 lR(t){return/^(table|td|th)$/.test(dr(t))}function ms(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const uR=/transform|translate|scale|rotate|perspective|filter/,dR=/paint|layout|strict|content/,xn=t=>!!t&&t!=="none";let pi;function xc(t){const e=xt(t)?bt(t):t;return xn(e.transform)||xn(e.translate)||xn(e.scale)||xn(e.rotate)||xn(e.perspective)||!bc()&&(xn(e.backdropFilter)||xn(e.filter))||uR.test(e.willChange||"")||dR.test(e.contain||"")}function fR(t){let e=sn(t);for(;Kt(e)&&!Qn(e);){if(xc(e))return e;if(ms(e))return null;e=sn(e)}return null}function bc(){return pi==null&&(pi=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),pi}function Qn(t){return/^(html|body|#document)$/.test(dr(t))}function bt(t){return it(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(dr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||fd(t)&&t.host||_t(t);return fd(e)?e.host:e}function Vp(t){const e=sn(t);return Qn(e)?t.ownerDocument?t.ownerDocument.body:t.body:Kt(e)&&Ur(e)?e:Vp(e)}function Ar(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=Vp(t),s=o===((r=t.ownerDocument)==null?void 0:r.body),i=it(o);if(s){const a=ma(i);return e.concat(i,i.visualViewport||[],Ur(o)?o:[],a&&n?Ar(a):[])}else return e.concat(o,Ar(o,[],n))}function ma(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Bp(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 wc(t){return xt(t)?t:t.contextElement}function Kn(t){const e=wc(t);if(!Kt(e))return It(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:s}=Bp(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 hR=It(0);function Gp(t){const e=it(t);return!bc()||!e.visualViewport?hR:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function pR(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==it(t)?!1:e}function Tn(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),s=wc(t);let i=It(1);e&&(r?xt(r)&&(i=Kn(r)):i=Kn(t));const a=pR(s,n,r)?Gp(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=it(s),m=r&&xt(r)?it(r):r;let g=h,y=ma(g);for(;y&&r&&m!==g;){const v=Kn(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=it(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:Tn(_t(t)).left+n}function zp(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 mR(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)&&((dr(r)!=="body"||Ur(i))&&(c=gs(r)),f)){const m=Tn(r);u=Kn(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const h=i&&!f&&!s?zp(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 gR(t){return Array.from(t.getClientRects())}function yR(t){const e=_t(t),n=gs(t),r=t.ownerDocument.body,o=st(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=st(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ys(t);const a=-n.scrollTop;return bt(r).direction==="rtl"&&(i+=st(e.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const hd=25;function vR(t,e){const n=it(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=bc();(!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<=hd&&(s-=g)}else u<=hd&&(s+=u);return{width:s,height:i,x:a,y:c}}function xR(t,e){const n=Tn(t,!0,e==="fixed"),r=n.top+t.clientTop,o=n.left+t.clientLeft,s=Kt(t)?Kn(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 pd(t,e,n){let r;if(e==="viewport")r=vR(t,n);else if(e==="document")r=yR(_t(t));else if(xt(e))r=xR(e,n);else{const o=Gp(t);r={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return ns(r)}function Up(t,e){const n=sn(t);return n===e||!xt(n)||Qn(n)?!1:bt(n).position==="fixed"||Up(n,e)}function bR(t,e){const n=e.get(t);if(n)return n;let r=Ar(t,[],!1).filter(a=>xt(a)&&dr(a)!=="body"),o=null;const s=bt(t).position==="fixed";let i=s?sn(t):t;for(;xt(i)&&!Qn(i);){const a=bt(i),c=xc(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Ur(i)&&!c&&Up(t,i))?r=r.filter(d=>d!==i):o=a,i=sn(i)}return e.set(t,r),r}function wR(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const i=[...n==="clippingAncestors"?ms(e)?[]:bR(e,this._c):[].concat(n),r],a=pd(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=pd(e,i[h],o);c=st(m.top,c),u=on(m.right,u),d=on(m.bottom,d),f=st(m.left,f)}return{width:u-f,height:d-c,x:f,y:c}}function CR(t){const{width:e,height:n}=Bp(t);return{width:e,height:n}}function SR(t,e,n){const r=Kt(e),o=_t(e),s=n==="fixed",i=Tn(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((dr(e)!=="body"||Ur(o))&&(a=gs(e)),r){const m=Tn(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?zp(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 md(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 Hp(t,e){const n=it(t);if(ms(t))return n;if(!Kt(t)){let o=sn(t);for(;o&&!Qn(o);){if(xt(o)&&!mi(o))return o;o=sn(o)}return n}let r=md(t,e);for(;r&&lR(r)&&mi(r);)r=md(r,e);return r&&Qn(r)&&mi(r)&&!xc(r)?n:r||fR(t)||n}const PR=async function(t){const e=this.getOffsetParent||Hp,n=this.getDimensions,r=await n(t.floating);return{reference:SR(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function RR(t){return bt(t).direction==="rtl"}const TR={convertOffsetParentRelativeRectToViewportRelativeRect:mR,getDocumentElement:_t,getClippingRect:wR,getOffsetParent:Hp,getElementRects:PR,getClientRects:gR,getDimensions:CR,getScale:Kn,isElement:xt,isRTL:RR};function Wp(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function MR(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:st(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&&!Wp(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 ER(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=wc(t),d=o||s?[...u?Ar(u):[],...e?Ar(e):[]]:[];d.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=u&&a?MR(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?Tn(t):null;c&&v();function v(){const x=Tn(t);y&&!Wp(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 jR=sR,AR=iR,DR=nR,IR=cR,kR=rR,gd=tR,NR=aR,_R=(t,e,n)=>{const r=new Map,o={platform:TR,...n},s={...o.platform,_c:r};return eR(t,e,{...o,platform:s})};var OR=typeof document<"u",LR=function(){},Bo=OR?S.useLayoutEffect:LR;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 Kp(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function yd(t,e){const n=Kp(t);return Math.round(e*n)/n}function gi(t){const e=p.useRef(t);return Bo(()=>{e.current=t}),e}function $R(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(F=>{F!==R.current&&(R.current=F,y(F))},[]),b=p.useCallback(F=>{F!==M.current&&(M.current=F,x(F))},[]),C=s||g,P=i||v,R=p.useRef(null),M=p.useRef(null),j=p.useRef(d),T=c!=null,E=gi(c),N=gi(o),O=gi(u),$=p.useCallback(()=>{if(!R.current||!M.current)return;const F={placement:e,strategy:n,middleware:h};N.current&&(F.platform=N.current),_R(R.current,M.current,F).then(L=>{const D={...L,isPositioned:O.current!==!1};V.current&&!rs(j.current,D)&&(j.current=D,Or.flushSync(()=>{f(D)}))})},[h,e,n,N,O]);Bo(()=>{u===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,f(F=>({...F,isPositioned:!1})))},[u]);const V=p.useRef(!1);Bo(()=>(V.current=!0,()=>{V.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]),G=p.useMemo(()=>({reference:C,floating:P}),[C,P]),k=p.useMemo(()=>{const F={position:n,left:0,top:0};if(!G.floating)return F;const L=yd(G.floating,d.x),D=yd(G.floating,d.y);return a?{...F,transform:"translate("+L+"px, "+D+"px)",...Kp(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:D}},[n,a,G.floating,d.x,d.y]);return p.useMemo(()=>({...d,update:$,refs:q,elements:G,floatingStyles:k}),[d,$,q,G,k])}const FR=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?gd({element:r.current,padding:o}).fn(n):{}:r?gd({element:r,padding:o}).fn(n):{}}}},VR=(t,e)=>{const n=jR(t);return{name:n.name,fn:n.fn,options:[t,e]}},BR=(t,e)=>{const n=AR(t);return{name:n.name,fn:n.fn,options:[t,e]}},GR=(t,e)=>({fn:NR(t).fn,options:[t,e]}),zR=(t,e)=>{const n=DR(t);return{name:n.name,fn:n.fn,options:[t,e]}},UR=(t,e)=>{const n=IR(t);return{name:n.name,fn:n.fn,options:[t,e]}},HR=(t,e)=>{const n=kR(t);return{name:n.name,fn:n.fn,options:[t,e]}},WR=(t,e)=>{const n=FR(t);return{name:n.name,fn:n.fn,options:[t,e]}};var KR=Object.defineProperty,YR=(t,e)=>KR(t,"name",{value:e,configurable:!0}),XR=p.forwardRef(YR(function(e,n){const{children:r,width:o=10,height:s=5,...i}=e;return l.jsx(te.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")),qR=XR,ZR=Object.defineProperty,QR=(t,e)=>ZR(t,"name",{value:e,configurable:!0});function fr(t){const[e,n]=p.useState(void 0);return Te(()=>{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}QR(fr,"useSize");var JR=Object.defineProperty,$t=(t,e)=>JR(t,"name",{value:e,configurable:!0}),Yp="Popper",[Xp,dn]=Ce(Yp),[eT,qp]=Xp(Yp),tT=$t(t=>{const{__scopePopper:e,children:n}=t,[r,o]=p.useState(null),[s,i]=p.useState(void 0);return l.jsx(eT,{scope:e,anchor:r,onAnchorChange:o,placementState:s,setPlacementState:i,children:n})},"Popper"),nT="PopperAnchor",rT=p.forwardRef($t(function(e,n){const{__scopePopper:r,virtualRef:o,...s}=e,i=qp(nT,r),a=p.useRef(null),c=i.onAnchorChange,u=p.useCallback(y=>{a.current=y,y&&c(y)},[c]),d=ce(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(te.div,{"data-radix-popper-side":m,"data-radix-popper-align":g,...s,ref:d})},"PopperAnchor")),Zp="PopperContent",[oT,sT]=Xp(Zp),iT=p.forwardRef($t(function(e,n){var z,I,ne,ie,oe,se,Me;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=qp(Zp,r),[w,b]=p.useState(null),C=ce(n,b),[P,R]=p.useState(null),M=fr(P),j=(M==null?void 0:M.width)??0,T=(M==null?void 0:M.height)??0,E=o+(i!=="center"?"-"+i:""),N=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},O=Array.isArray(d)?d:[d],$=O.length>0,V={padding:N,boundary:O.filter(Qp),altBoundary:$},{refs:q,floatingStyles:G,placement:k,isPositioned:F,middlewareData:L}=$R({strategy:"fixed",placement:E,whileElementsMounted:$t((...lt)=>ER(...lt,{animationFrame:g==="always"}),"whileElementsMounted"),elements:{reference:x.anchor},middleware:[VR({mainAxis:s+T,alignmentAxis:a}),u&&BR({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?GR():void 0,...V}),u&&zR({...V}),UR({...V,apply:$t(({elements:lt,rects:ht,availableWidth:me,availableHeight:Ye})=>{const{width:ro,height:ge}=ht.reference,Se=lt.floating.style;Se.setProperty("--radix-popper-available-width",`${me}px`),Se.setProperty("--radix-popper-available-height",`${Ye}px`),Se.setProperty("--radix-popper-anchor-width",`${ro}px`),Se.setProperty("--radix-popper-anchor-height",`${ge}px`)},"apply")}),P&&WR({element:P,padding:c}),uT({arrowWidth:j,arrowHeight:T}),m&&HR({strategy:"referenceHidden",...V,boundary:$?V.boundary:void 0})]}),D=x.setPlacementState;Te(()=>(D(k),()=>{D(void 0)}),[k,D]);const[X,A]=vs(k),B=qe(y);Te(()=>{F&&(B==null||B())},[F,B]);const Q=(z=L.arrow)==null?void 0:z.x,K=(I=L.arrow)==null?void 0:I.y,W=((ne=L.arrow)==null?void 0:ne.centerOffset)!==0,[re,Y]=p.useState();return Te(()=>{w&&Y(window.getComputedStyle(w).zIndex)},[w]),l.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:F?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:re,"--radix-popper-transform-origin":[(ie=L.transformOrigin)==null?void 0:ie.x,(oe=L.transformOrigin)==null?void 0:oe.y].join(" "),...((se=L.hide)==null?void 0:se.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(oT,{scope:r,placedSide:X,placedAlign:A,onArrowChange:R,arrowX:Q,arrowY:K,shouldHideArrow:W,children:l.jsx(te.div,{"data-side":X,"data-align":A,...v,ref:C,style:{...v.style,animation:F?(Me=v.style)==null?void 0:Me.animation:"none"}})})})},"PopperContent")),aT="PopperArrow",cT={top:"bottom",right:"left",bottom:"top",left:"right"},lT=p.forwardRef($t(function(e,n){const{__scopePopper:r,...o}=e,s=sT(aT,r),i=cT[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(qR,{...o,ref:n,style:{...o.style,display:"block"}})})},"PopperArrow"));function Qp(t){return t!==null}$t(Qp,"isNotNull");var uT=$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 Hr=tT,Wr=rT,xs=iT,Jp=lT,dT=Object.defineProperty,fT=(t,e)=>dT(t,"name",{value:e,configurable:!0}),Kr=p.forwardRef(fT(function(e,n){var c;const{container:r,...o}=e,[s,i]=p.useState(!1);Te(()=>i(!0),[]);const a=r||s&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return a?Or.createPortal(l.jsx(te.div,{...o,ref:n}),a):null},"Portal")),hT=Object.defineProperty,zt=(t,e)=>hT(t,"name",{value:e,configurable:!0});function em(t,e){return p.useReducer((n,r)=>e[n][r]??n,t)}zt(em,"useStateMachine");var ze=zt(t=>{const{present:e,children:n}=t,r=tm(e),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),s=nm(r.ref,rm(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:s}):null},"Presence");function tm(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]=em(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??Vn(r.current),i.current=void 0):s.current="none"},[c]),Te(()=>{const d=r.current,f=o.current;if(f!==t){const m=s.current,g=Vn(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]),Te(()=>{if(e){let d;const f=e.ownerDocument.defaultView??window,h=zt(g=>{const v=Vn(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=Vn(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=Vn(f)}else r.current=null;n(d)},[])}}zt(tm,"usePresence");function ga(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}zt(ga,"setRef");function nm(...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(nm,"useStableComposedRefs");function Vn(t){return(t==null?void 0:t.animationName)||"none"}zt(Vn,"getAnimationName");function rm(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(rm,"getElementRef");var pT=Object.defineProperty,mT=(t,e)=>pT(t,"name",{value:e,configurable:!0});function Cc(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])}mT(Cc,"usePrevious");var gT=Object.defineProperty,yT=(t,e)=>gT(t,"name",{value:e,configurable:!0}),om=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"}),sm=p.forwardRef(yT(function(e,n){return l.jsx(te.span,{...e,ref:n,style:{...om,...e.style}})},"VisuallyHidden")),vT=sm,xT=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},On=new WeakMap,xo=new WeakMap,bo={},yi=0,im=function(t){return t&&(t.host||im(t.parentNode))},bT=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=im(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})},wT=function(t,e,n,r){var o=bT(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=(On.get(h)||0)+1,v=(s.get(h)||0)+1;On.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=On.get(f)-1,m=s.get(f)-1;On.set(f,h),s.set(f,m),h||(xo.has(f)||f.removeAttribute(r),xo.delete(f)),m||f.removeAttribute(n)}),yi--,yi||(On=new WeakMap,On=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=xT(t);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),wT(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 am(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 CT(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",ST="with-scroll-bars-hidden",PT="--removed-body-scroll-bar-size";function vi(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function RT(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 TT=typeof window<"u"?p.useLayoutEffect:p.useEffect,vd=new WeakMap;function MT(t,e){var n=RT(null,function(r){return t.forEach(function(o){return vi(o,r)})});return TT(function(){var r=vd.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)})}vd.set(n,t)},[t]),n}function ET(t){return t}function jT(t,e){e===void 0&&(e=ET);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 AT(t){t===void 0&&(t={});var e=jT(null);return e.options=jt({async:!0,ssr:!1},t),e}var cm=function(t){var e=t.sideCar,n=am(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))};cm.isSideCarExport=!0;function DT(t,e){return t.useMedium(e),cm}var lm=AT(),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=am(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=h,R=MT([n,e]),M=jt(jt({},C),o);return p.createElement(p.Fragment,null,d&&p.createElement(P,{sideCar:lm,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 IT=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function kT(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=IT();return e&&t.setAttribute("nonce",e),t}function NT(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function _T(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var OT=function(){var t=0,e=null;return{add:function(n){t==0&&(e=kT())&&(NT(e,n),_T(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},LT=function(){var t=OT();return function(e,n){p.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},um=function(){var t=LT(),e=function(n){var r=n.styles,o=n.dynamic;return t(r,o),null};return e},$T={left:0,top:0,right:0,gap:0},bi=function(t){return parseInt(t||"",10)||0},FT=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)]},VT=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return $T;var e=FT(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])}},BT=um(),Yn="data-scroll-locked",GT=function(t,e,n,r){var o=t.left,s=t.top,i=t.right,a=t.gap;return n===void 0&&(n="margin"),`
|
|
169
|
+
*/const qS=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Wt=ve("x",qS),ZS=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,N=s&&!d&&R!=="",O=N||a,$=r!=null||o!=null||O,V=L=>{b||P(L.target.value),v==null||v(L)},q=L=>{var X;L.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()},G=ae($?void 0:m,$?void 0:h,"input",e!=="primary"&&e,n==="sm"||n==="lg"?n:null,c&&"filled",f),k=l.jsx("input",{ref:M,type:E,className:G.className,style:G.style,disabled:d,value:b?g:void 0,defaultValue:b?void 0:y,onChange:V,...x});if(!$)return l.jsxs(l.Fragment,{children:[G.styleTag,k]});const F=ae(m,h,"cny-input-affix",r!=null&&"has-prefix",o!=null&&!O&&"has-suffix",O&&"has-action");return l.jsxs("span",{className:F.className,style:F.style,children:[F.styleTag,r!=null&&l.jsx("span",{className:"cny-input-prefix",children:r}),k,o!=null&&!O&&l.jsx("span",{className:"cny-input-suffix",children:o}),N&&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(L=>!L),"aria-label":j?"Hide password":"Show password","aria-pressed":j,children:j?l.jsx(kS,{size:14,"aria-hidden":"true"}):l.jsx(_S,{size:14,"aria-hidden":"true"})})]})}),QS=S.forwardRef(function({color:e="default",className:n,style:r,sx:o,children:s,...i},a){const{className:c,style:u,styleTag:d}=ae(o,r,"card",e!=="default"&&e,n);return l.jsxs("div",{ref:a,className:c,style:u,...i,children:[d,s]})}),JS={info:Cp,success:bp,warning:Rp,danger:xp};function eP({color:t}){const e=JS[t];return l.jsx(e,{size:16,className:"alert-icon-glyph","aria-hidden":"true"})}const tP=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(eP,{color:e}),{className:v,style:x,styleTag:w}=ae(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"})})]})}),nP=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}=ae(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]})}),rP=S.forwardRef(function({className:e,children:n,...r},o){return l.jsx("div",{ref:o,className:H("avatar-stack",e),...r,children:n})}),oP=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}=ae(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"})]})}),sP=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}=ae(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,"%"]})]})}),iP={both:{overflowX:"auto",overflowY:"auto"},x:{overflowX:"auto",overflowY:"hidden"},y:{overflowX:"hidden",overflowY:"auto"}},Tp=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={...iP[r],maxHeight:o,maxWidth:s,...c??{}},{className:g,style:y,styleTag:v}=ae(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]})}),aP=S.forwardRef(function(e,n){return l.jsx(Tp,{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}=ae(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})}),cP=S.forwardRef(function({solid:e=!1,className:n,style:r,sx:o,children:s,...i},a){const{className:c,style:u,styleTag:d}=ae(o,r,"cny-navbar",e&&"solid",n);return l.jsxs("header",{ref:a,className:c,style:u,...i,children:[d,s]})}),lP=S.forwardRef(function({mark:e=!0,className:n,children:r,...o},s){return l.jsxs("a",{ref:s,className:H("cny-navbar-brand",n),...o,children:[e&&l.jsx("span",{className:"brand-mark","aria-hidden":"true"}),r]})}),uP=S.forwardRef(function({className:e,children:n,...r},o){return l.jsx("nav",{ref:o,className:H("cny-navbar-nav",e),...r,children:n})}),dP=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:H("cny-navbar-item",e&&"active",n),...o,children:r})}),fP=S.forwardRef(function({className:e,children:n,...r},o){return l.jsx("div",{ref:o,className:H("cny-navbar-actions",e),...r,children:n})}),hP=S.forwardRef(function({width:e="default",sticky:n=!1,collapsed:r=!1,responsive:o=!1,className:s,style:i,sx:a,children:c,...u},d){const{className:f,style:h,styleTag:m}=ae(a,i,"cny-sidebar",e!=="default"&&e,n&&"sticky",r&&"collapsed",o&&"responsive",s);return l.jsxs("aside",{ref:d,className:f,style:h,...u,children:[m,c]})}),pP=S.forwardRef(function({className:e,children:n,...r},o){return l.jsx("div",{ref:o,className:H("cny-sidebar-header",e),...r,children:n})}),mP=S.forwardRef(function({className:e,children:n,...r},o){return l.jsx("div",{ref:o,className:H("cny-sidebar-footer",e),...r,children:n})}),gP=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:H("cny-sidebar-toggle",e&&"collapsed",r),onClick:n,...s,children:o??l.jsx(KS,{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 yP=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:H("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})]})}),vP=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:H("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 xP(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 An=S.forwardRef(function({as:e,className:n,style:r,children:o,...s},i){const a=e??"div",{layoutProps:c,domProps:u}=bP(s),{sx:d,...f}=c,h=d?Ia(d):void 0,m=H(...xP(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("style",{dangerouslySetInnerHTML:{__html:h.css}}),y):y});function bP(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 wP=S.forwardRef(function(e,n){return l.jsx(An,{ref:n,display:"flex",direction:"column",...e})}),CP=S.forwardRef(function(e,n){const{align:r="center",...o}=e;return l.jsx(An,{ref:n,display:"flex",direction:"row",align:r,...o})}),rd=t=>t.map(e=>`minmax(0,${e}fr)`).join(" "),SP=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=rd(r);else{const f={};for(const[h,m]of Object.entries(r))m&&(f[h]=rd(m));u=f}else n&&(u=`repeat(auto-fit, minmax(${n}, 1fr))`);const d=u?{gridTemplateColumns:u,...i??{}}:i;return l.jsx(An,{ref:c,display:"grid",className:H(!u&&e&&`grid-cols-${e}`,s),sx:d,...a})}),PP=S.forwardRef(function({size:e="lg",className:n,...r},o){return l.jsx(An,{ref:o,className:H("cny-container",e,n),...r})}),RP=S.forwardRef(function({orientation:e="horizontal",className:n,style:r,sx:o,...s},i){const{className:a,style:c,styleTag:u}=ae(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})]})}),TP=S.forwardRef(function({className:e,style:n,sx:r,...o},s){const{className:i,style:a,styleTag:c}=ae(r,n,"cny-spacer",e);return l.jsx("span",{ref:s,"aria-hidden":"true",className:i,style:a,...o,children:c})}),MP=S.forwardRef(function({ratio:e=16/9,className:n,style:r,sx:o,children:s,...i},a){const{className:c,style:u,styleTag:d}=ae(o,{aspectRatio:String(e),...r},"aspect-ratio",n);return l.jsxs("div",{ref:a,className:c,style:u,...i,children:[d,s]})}),EP=S.forwardRef(function(e,n){return l.jsx(An,{ref:n,display:"flex",align:"center",justify:"center",...e})}),jP=S.forwardRef(function(e,n){const{align:r="center",gap:o=2,wrap:s=!0,...i}=e;return l.jsx(An,{ref:n,display:"flex",direction:"row",align:r,gap:o,wrap:s,...i})}),AP={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"},DP=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??AP[n],{className:g,style:y,styleTag:v}=ae(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 IP({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:H(g.props.className,x!=="default"&&x)}),C=i!=null&&s!=null&&s>i?"danger":"default",{className:P,style:R,styleTag:M}=ae(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:H("cny-field-counter",C==="danger"&&"danger"),"aria-live":"polite",children:i!=null?`${s}/${i}`:s})]}),b,(n||e)&&l.jsx("span",{id:w,className:H("cny-field-hint",x!=="default"&&x),children:n??e})]})}const kP=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}=ae(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 NP=Object.defineProperty,_P=(t,e)=>NP(t,"name",{value:e,configurable:!0});function jr(t,[e,n]){return Math.min(n,Math.max(e,t))}_P(jr,"clamp");var OP=Object.defineProperty,ke=(t,e)=>OP(t,"name",{value:e,configurable:!0}),ca="dismissableLayer.update",LP="dismissableLayer.pointerDownOutside",$P="dismissableLayer.focusOutside",od,Mp=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),zr=p.forwardRef(ke(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(Mp),[h,m]=p.useState(null),g=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=p.useState({}),v=ce(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=jp(O=>{i==null||i(O),c==null||c(O),O.defaultPrevented||u==null||u()},{ownerDocument:g,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:M,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:p.useCallback(O=>{if(!(O instanceof Node))return!1;const $=[...f.branches].some(V=>V.contains(O));return R&&!$},[f.branches,R])}),T=Ap(O=>{if(o&&M.current)return;const $=O.target;[...f.branches].some(q=>q.contains($))||(a==null||a(O),c==null||c(O),O.defaultPrevented||u==null||u())},g),E=h?C===x.length-1:!1,N=qe(O=>{O.key==="Escape"&&(s==null||s(O),!O.defaultPrevented&&u&&(O.preventDefault(),u()))});return p.useEffect(()=>{if(E)return g.addEventListener("keydown",N,{capture:!0}),()=>g.removeEventListener("keydown",N,{capture:!0})},[g,E,N]),p.useEffect(()=>{if(h)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(od=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=od))}},[h,g,r,f]),p.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),la())},[h,f]),p.useEffect(()=>{const O=ke(()=>y({}),"handleUpdate");return document.addEventListener(ca,O),()=>document.removeEventListener(ca,O)},[]),l.jsx(te.div,{...d,ref:v,style:{pointerEvents:P?R?"auto":"none":void 0,...e.style},onFocusCapture:U(e.onFocusCapture,T.onFocusCapture),onBlurCapture:U(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,j.onPointerDownCapture)})},"DismissableLayer"));function Ep(){const t=p.useContext(Mp),[e,n]=p.useState(null);return p.useEffect(()=>{if(e)return t.dismissableSurfaces.add(e),()=>{t.dismissableSurfaces.delete(e)}},[e,t.dismissableSurfaces]),n}ke(Ep,"useDismissableLayerSurface");var FP=ke(()=>!0,"IS_TRUE");function jp(t,e){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:s,shouldHandlePointerDownOutside:i=FP}=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()}ke(h,"resetOutsideInteraction");function m(){return Array.from(d.current.values()).some(Boolean)}ke(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)}ke(g,"handleInteractionCapture");function y(b){u.current&&d.current.set(b.type,!1)}ke(y,"handleInteractionBubble");const v=ke(b=>{if(b.target&&!c.current){let C=function(){n.removeEventListener("click",f.current);const R=m();h(),R||hc(LP,a,P,{discrete:!0})};if(ke(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:ke(()=>c.current=!0,"onPointerDownCapture")}}ke(jp,"usePointerDownOutside");function Ap(t,e=globalThis==null?void 0:globalThis.document){const n=qe(t),r=p.useRef(!1);return p.useEffect(()=>{const o=ke(s=>{s.target&&!r.current&&hc($P,n,{originalEvent:s},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[e,n]),{onFocusCapture:ke(()=>r.current=!0,"onFocusCapture"),onBlurCapture:ke(()=>r.current=!1,"onBlurCapture")}}ke(Ap,"useFocusOutside");function la(){const t=new CustomEvent(ca);document.dispatchEvent(t)}ke(la,"dispatchUpdate");function hc(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?lc(o,s):o.dispatchEvent(s)}ke(hc,"handleAndDispatchCustomEvent");var VP=Object.defineProperty,pc=(t,e)=>VP(t,"name",{value:e,configurable:!0}),yo=0,Pt=null;function BP(t){return lr(),t.children}pc(BP,"FocusGuards");function lr(){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)}},[])}pc(lr,"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}pc(ua,"createFocusGuard");var GP=Object.defineProperty,Ke=(t,e)=>GP(t,"name",{value:e,configurable:!0}),fi="focusScope.autoFocusOnMount",hi="focusScope.autoFocusOnUnmount",sd={bubbles:!1,cancelable:!0},hs=p.forwardRef(Ke(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=ce(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)};Ke(v,"handleFocusIn"),Ke(x,"handleFocusOut"),Ke(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){id.add(g);const v=document.activeElement;if(!c.contains(v)){const w=new CustomEvent(fi,sd);c.addEventListener(fi,d),c.dispatchEvent(w),w.defaultPrevented||(Dp(Op(mc(c)),{select:!0}),document.activeElement===v&&Lt(c))}return()=>{c.removeEventListener(fi,d),setTimeout(()=>{const w=new CustomEvent(hi,sd);c.addEventListener(hi,f),c.dispatchEvent(w),w.defaultPrevented||Lt(v??document.body,{select:!0}),c.removeEventListener(hi,f),id.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]=Ip(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(te.div,{tabIndex:-1,...a,ref:m,onKeyDown:y})},"FocusScope"));function Dp(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(Lt(r,{select:e}),document.activeElement!==n)return}Ke(Dp,"focusFirst");function Ip(t){const e=mc(t),n=da(e,t),r=da(e.reverse(),t);return[n,r]}Ke(Ip,"getTabbableEdges");function mc(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:Ke(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}Ke(mc,"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}):kp(r,{upTo:e})))return r}Ke(da,"findVisible");function kp(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}Ke(kp,"isHidden");function Np(t){return t instanceof HTMLInputElement&&"select"in t}Ke(Np,"isSelectableInput");function Lt(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&Np(t)&&e&&t.select()}}Ke(Lt,"focus");var id=_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()}}}Ke(_p,"createFocusScopesStack");function fa(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}Ke(fa,"arrayRemove");function Op(t){return t.filter(e=>e.tagName!=="A")}Ke(Op,"removeLinks");const zP=["top","right","bottom","left"],on=Math.min,st=Math.max,es=Math.round,vo=Math.floor,It=t=>({x:t,y:t}),UP={left:"right",right:"left",bottom:"top",top:"bottom"};function ha(t,e,n){return st(t,on(e,n))}function Bt(t,e){return typeof t=="function"?t(e):t}function Gt(t){return t.split("-")[0]}function ur(t){return t.split("-")[1]}function gc(t){return t==="x"?"y":"x"}function yc(t){return t==="y"?"height":"width"}function At(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function vc(t){return gc(At(t))}function HP(t,e,n){n===void 0&&(n=!1);const r=ur(t),o=vc(t),s=yc(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 WP(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 ad=["left","right"],cd=["right","left"],KP=["top","bottom"],YP=["bottom","top"];function XP(t,e,n){switch(t){case"top":case"bottom":return n?e?cd:ad:e?ad:cd;case"left":case"right":return e?KP:YP;default:return[]}}function qP(t,e,n,r){const o=ur(t);let s=XP(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 UP[e]+t.slice(e.length)}function ZP(t){return{top:0,right:0,bottom:0,left:0,...t}}function Lp(t){return typeof t!="number"?ZP(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 ld(t,e,n){let{reference:r,floating:o}=t;const s=At(e),i=vc(e),a=yc(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(ur(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 QP(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=Lp(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 JP=50,eR=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=i.detectOverflow?i:{...i,detectOverflow:QP},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}=ld(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<JP&&(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}=ld(u,h,c)),y=-1)}return{x:d,y:f,placement:h,strategy:o,middlewareData:g}},tR=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=Lp(d),h={x:n,y:r},m=vc(o),g=yc(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),N=on(f[w],T),O=E,$=M-y[g]-N,V=M/2-y[g]/2+j,q=ha(O,V,$),G=!c.arrow&&ur(o)!=null&&V!==q&&s.reference[g]/2-(V<O?E:N)-y[g]/2<0,k=G?V<O?V-O:V-$:0;return{[m]:h[m]+k,data:{[m]:q,centerOffset:V-q-k,...G&&{alignmentOffset:k}},reset:G}}}),nR=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)]:WP(a)),R=g!=="none";!h&&R&&P.push(...qP(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 V=HP(o,i,C);T.push(j[V[0]],j[V[1]])}if(E=[...E,{placement:o,overflows:T}],!T.every(V=>V<=0)){var N,O;const V=(((N=s.flip)==null?void 0:N.index)||0)+1,q=M[V];if(q&&(!(f==="alignment"?w!==At(q):!1)||E.every(F=>At(F.placement)===w?F.overflows[0]>0:!0)))return{data:{index:V,overflows:E},reset:{placement:q}};let G=(O=E.filter(k=>k.overflows[0]<=0).sort((k,F)=>k.overflows[1]-F.overflows[1])[0])==null?void 0:O.placement;if(!G)switch(m){case"bestFit":{var $;const k=($=E.filter(F=>{if(R){const L=At(F.placement);return L===w||L==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(L=>L>0).reduce((L,D)=>L+D,0)]).sort((F,L)=>F[1]-L[1])[0])==null?void 0:$[0];k&&(G=k);break}case"initialPlacement":G=a;break}if(o!==G)return{reset:{placement:G}}}return{}}}};function ud(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function dd(t){return zP.some(e=>t[e]>=0)}const rR=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=ud(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:dd(a)}}}case"escaped":{const i=await r.detectOverflow(e,{...s,altBoundary:!0}),a=ud(i,n.floating);return{data:{escapedOffsets:a,escaped:dd(a)}}}default:return{}}}}},$p=new Set(["left","top"]);async function oR(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=ur(n),c=At(n)==="y",u=$p.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 sR=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 oR(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}}}}},iR=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=gc(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}}}}}},aR=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=gc(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=$p.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}}}},cR=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=ur(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=st(d.left,0),N=st(d.right,0),O=st(d.top,0),$=st(d.bottom,0);m?j=g-2*(E!==0||N!==0?E+N:st(d.left,d.right)):M=y-2*(O!==0||$!==0?O+$:st(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 dr(t){return Fp(t)?(t.nodeName||"").toLowerCase():"#document"}function it(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function _t(t){var e;return(e=(Fp(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Fp(t){return ps()?t instanceof Node||t instanceof it(t).Node:!1}function xt(t){return ps()?t instanceof Element||t instanceof it(t).Element:!1}function Kt(t){return ps()?t instanceof HTMLElement||t instanceof it(t).HTMLElement:!1}function fd(t){return!ps()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof it(t).ShadowRoot}function Ur(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 lR(t){return/^(table|td|th)$/.test(dr(t))}function ms(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const uR=/transform|translate|scale|rotate|perspective|filter/,dR=/paint|layout|strict|content/,xn=t=>!!t&&t!=="none";let pi;function xc(t){const e=xt(t)?bt(t):t;return xn(e.transform)||xn(e.translate)||xn(e.scale)||xn(e.rotate)||xn(e.perspective)||!bc()&&(xn(e.backdropFilter)||xn(e.filter))||uR.test(e.willChange||"")||dR.test(e.contain||"")}function fR(t){let e=sn(t);for(;Kt(e)&&!Qn(e);){if(xc(e))return e;if(ms(e))return null;e=sn(e)}return null}function bc(){return pi==null&&(pi=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),pi}function Qn(t){return/^(html|body|#document)$/.test(dr(t))}function bt(t){return it(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(dr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||fd(t)&&t.host||_t(t);return fd(e)?e.host:e}function Vp(t){const e=sn(t);return Qn(e)?t.ownerDocument?t.ownerDocument.body:t.body:Kt(e)&&Ur(e)?e:Vp(e)}function Ar(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=Vp(t),s=o===((r=t.ownerDocument)==null?void 0:r.body),i=it(o);if(s){const a=ma(i);return e.concat(i,i.visualViewport||[],Ur(o)?o:[],a&&n?Ar(a):[])}else return e.concat(o,Ar(o,[],n))}function ma(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Bp(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 wc(t){return xt(t)?t:t.contextElement}function Kn(t){const e=wc(t);if(!Kt(e))return It(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:s}=Bp(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 hR=It(0);function Gp(t){const e=it(t);return!bc()||!e.visualViewport?hR:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function pR(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==it(t)?!1:e}function Tn(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),s=wc(t);let i=It(1);e&&(r?xt(r)&&(i=Kn(r)):i=Kn(t));const a=pR(s,n,r)?Gp(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=it(s),m=r&&xt(r)?it(r):r;let g=h,y=ma(g);for(;y&&r&&m!==g;){const v=Kn(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=it(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:Tn(_t(t)).left+n}function zp(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 mR(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)&&((dr(r)!=="body"||Ur(i))&&(c=gs(r)),f)){const m=Tn(r);u=Kn(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const h=i&&!f&&!s?zp(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 gR(t){return Array.from(t.getClientRects())}function yR(t){const e=_t(t),n=gs(t),r=t.ownerDocument.body,o=st(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=st(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ys(t);const a=-n.scrollTop;return bt(r).direction==="rtl"&&(i+=st(e.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const hd=25;function vR(t,e){const n=it(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=bc();(!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<=hd&&(s-=g)}else u<=hd&&(s+=u);return{width:s,height:i,x:a,y:c}}function xR(t,e){const n=Tn(t,!0,e==="fixed"),r=n.top+t.clientTop,o=n.left+t.clientLeft,s=Kt(t)?Kn(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 pd(t,e,n){let r;if(e==="viewport")r=vR(t,n);else if(e==="document")r=yR(_t(t));else if(xt(e))r=xR(e,n);else{const o=Gp(t);r={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return ns(r)}function Up(t,e){const n=sn(t);return n===e||!xt(n)||Qn(n)?!1:bt(n).position==="fixed"||Up(n,e)}function bR(t,e){const n=e.get(t);if(n)return n;let r=Ar(t,[],!1).filter(a=>xt(a)&&dr(a)!=="body"),o=null;const s=bt(t).position==="fixed";let i=s?sn(t):t;for(;xt(i)&&!Qn(i);){const a=bt(i),c=xc(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Ur(i)&&!c&&Up(t,i))?r=r.filter(d=>d!==i):o=a,i=sn(i)}return e.set(t,r),r}function wR(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const i=[...n==="clippingAncestors"?ms(e)?[]:bR(e,this._c):[].concat(n),r],a=pd(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=pd(e,i[h],o);c=st(m.top,c),u=on(m.right,u),d=on(m.bottom,d),f=st(m.left,f)}return{width:u-f,height:d-c,x:f,y:c}}function CR(t){const{width:e,height:n}=Bp(t);return{width:e,height:n}}function SR(t,e,n){const r=Kt(e),o=_t(e),s=n==="fixed",i=Tn(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((dr(e)!=="body"||Ur(o))&&(a=gs(e)),r){const m=Tn(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?zp(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 md(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 Hp(t,e){const n=it(t);if(ms(t))return n;if(!Kt(t)){let o=sn(t);for(;o&&!Qn(o);){if(xt(o)&&!mi(o))return o;o=sn(o)}return n}let r=md(t,e);for(;r&&lR(r)&&mi(r);)r=md(r,e);return r&&Qn(r)&&mi(r)&&!xc(r)?n:r||fR(t)||n}const PR=async function(t){const e=this.getOffsetParent||Hp,n=this.getDimensions,r=await n(t.floating);return{reference:SR(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function RR(t){return bt(t).direction==="rtl"}const TR={convertOffsetParentRelativeRectToViewportRelativeRect:mR,getDocumentElement:_t,getClippingRect:wR,getOffsetParent:Hp,getElementRects:PR,getClientRects:gR,getDimensions:CR,getScale:Kn,isElement:xt,isRTL:RR};function Wp(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function MR(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:st(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&&!Wp(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 ER(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=wc(t),d=o||s?[...u?Ar(u):[],...e?Ar(e):[]]:[];d.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=u&&a?MR(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?Tn(t):null;c&&v();function v(){const x=Tn(t);y&&!Wp(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 jR=sR,AR=iR,DR=nR,IR=cR,kR=rR,gd=tR,NR=aR,_R=(t,e,n)=>{const r=new Map,o={platform:TR,...n},s={...o.platform,_c:r};return eR(t,e,{...o,platform:s})};var OR=typeof document<"u",LR=function(){},Bo=OR?S.useLayoutEffect:LR;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 Kp(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function yd(t,e){const n=Kp(t);return Math.round(e*n)/n}function gi(t){const e=p.useRef(t);return Bo(()=>{e.current=t}),e}function $R(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(F=>{F!==R.current&&(R.current=F,y(F))},[]),b=p.useCallback(F=>{F!==M.current&&(M.current=F,x(F))},[]),C=s||g,P=i||v,R=p.useRef(null),M=p.useRef(null),j=p.useRef(d),T=c!=null,E=gi(c),N=gi(o),O=gi(u),$=p.useCallback(()=>{if(!R.current||!M.current)return;const F={placement:e,strategy:n,middleware:h};N.current&&(F.platform=N.current),_R(R.current,M.current,F).then(L=>{const D={...L,isPositioned:O.current!==!1};V.current&&!rs(j.current,D)&&(j.current=D,Or.flushSync(()=>{f(D)}))})},[h,e,n,N,O]);Bo(()=>{u===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,f(F=>({...F,isPositioned:!1})))},[u]);const V=p.useRef(!1);Bo(()=>(V.current=!0,()=>{V.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]),G=p.useMemo(()=>({reference:C,floating:P}),[C,P]),k=p.useMemo(()=>{const F={position:n,left:0,top:0};if(!G.floating)return F;const L=yd(G.floating,d.x),D=yd(G.floating,d.y);return a?{...F,transform:"translate("+L+"px, "+D+"px)",...Kp(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:D}},[n,a,G.floating,d.x,d.y]);return p.useMemo(()=>({...d,update:$,refs:q,elements:G,floatingStyles:k}),[d,$,q,G,k])}const FR=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?gd({element:r.current,padding:o}).fn(n):{}:r?gd({element:r,padding:o}).fn(n):{}}}},VR=(t,e)=>{const n=jR(t);return{name:n.name,fn:n.fn,options:[t,e]}},BR=(t,e)=>{const n=AR(t);return{name:n.name,fn:n.fn,options:[t,e]}},GR=(t,e)=>({fn:NR(t).fn,options:[t,e]}),zR=(t,e)=>{const n=DR(t);return{name:n.name,fn:n.fn,options:[t,e]}},UR=(t,e)=>{const n=IR(t);return{name:n.name,fn:n.fn,options:[t,e]}},HR=(t,e)=>{const n=kR(t);return{name:n.name,fn:n.fn,options:[t,e]}},WR=(t,e)=>{const n=FR(t);return{name:n.name,fn:n.fn,options:[t,e]}};var KR=Object.defineProperty,YR=(t,e)=>KR(t,"name",{value:e,configurable:!0}),XR=p.forwardRef(YR(function(e,n){const{children:r,width:o=10,height:s=5,...i}=e;return l.jsx(te.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")),qR=XR,ZR=Object.defineProperty,QR=(t,e)=>ZR(t,"name",{value:e,configurable:!0});function fr(t){const[e,n]=p.useState(void 0);return Te(()=>{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}QR(fr,"useSize");var JR=Object.defineProperty,$t=(t,e)=>JR(t,"name",{value:e,configurable:!0}),Yp="Popper",[Xp,dn]=Ce(Yp),[eT,qp]=Xp(Yp),tT=$t(t=>{const{__scopePopper:e,children:n}=t,[r,o]=p.useState(null),[s,i]=p.useState(void 0);return l.jsx(eT,{scope:e,anchor:r,onAnchorChange:o,placementState:s,setPlacementState:i,children:n})},"Popper"),nT="PopperAnchor",rT=p.forwardRef($t(function(e,n){const{__scopePopper:r,virtualRef:o,...s}=e,i=qp(nT,r),a=p.useRef(null),c=i.onAnchorChange,u=p.useCallback(y=>{a.current=y,y&&c(y)},[c]),d=ce(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(te.div,{"data-radix-popper-side":m,"data-radix-popper-align":g,...s,ref:d})},"PopperAnchor")),Zp="PopperContent",[oT,sT]=Xp(Zp),iT=p.forwardRef($t(function(e,n){var z,I,ne,ie,oe,se,Me;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=qp(Zp,r),[w,b]=p.useState(null),C=ce(n,b),[P,R]=p.useState(null),M=fr(P),j=(M==null?void 0:M.width)??0,T=(M==null?void 0:M.height)??0,E=o+(i!=="center"?"-"+i:""),N=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},O=Array.isArray(d)?d:[d],$=O.length>0,V={padding:N,boundary:O.filter(Qp),altBoundary:$},{refs:q,floatingStyles:G,placement:k,isPositioned:F,middlewareData:L}=$R({strategy:"fixed",placement:E,whileElementsMounted:$t((...lt)=>ER(...lt,{animationFrame:g==="always"}),"whileElementsMounted"),elements:{reference:x.anchor},middleware:[VR({mainAxis:s+T,alignmentAxis:a}),u&&BR({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?GR():void 0,...V}),u&&zR({...V}),UR({...V,apply:$t(({elements:lt,rects:ht,availableWidth:me,availableHeight:Ye})=>{const{width:ro,height:ge}=ht.reference,Se=lt.floating.style;Se.setProperty("--radix-popper-available-width",`${me}px`),Se.setProperty("--radix-popper-available-height",`${Ye}px`),Se.setProperty("--radix-popper-anchor-width",`${ro}px`),Se.setProperty("--radix-popper-anchor-height",`${ge}px`)},"apply")}),P&&WR({element:P,padding:c}),uT({arrowWidth:j,arrowHeight:T}),m&&HR({strategy:"referenceHidden",...V,boundary:$?V.boundary:void 0})]}),D=x.setPlacementState;Te(()=>(D(k),()=>{D(void 0)}),[k,D]);const[X,A]=vs(k),B=qe(y);Te(()=>{F&&(B==null||B())},[F,B]);const Q=(z=L.arrow)==null?void 0:z.x,K=(I=L.arrow)==null?void 0:I.y,W=((ne=L.arrow)==null?void 0:ne.centerOffset)!==0,[re,Y]=p.useState();return Te(()=>{w&&Y(window.getComputedStyle(w).zIndex)},[w]),l.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:F?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:re,"--radix-popper-transform-origin":[(ie=L.transformOrigin)==null?void 0:ie.x,(oe=L.transformOrigin)==null?void 0:oe.y].join(" "),...((se=L.hide)==null?void 0:se.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(oT,{scope:r,placedSide:X,placedAlign:A,onArrowChange:R,arrowX:Q,arrowY:K,shouldHideArrow:W,children:l.jsx(te.div,{"data-side":X,"data-align":A,...v,ref:C,style:{...v.style,animation:F?(Me=v.style)==null?void 0:Me.animation:"none"}})})})},"PopperContent")),aT="PopperArrow",cT={top:"bottom",right:"left",bottom:"top",left:"right"},lT=p.forwardRef($t(function(e,n){const{__scopePopper:r,...o}=e,s=sT(aT,r),i=cT[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(qR,{...o,ref:n,style:{...o.style,display:"block"}})})},"PopperArrow"));function Qp(t){return t!==null}$t(Qp,"isNotNull");var uT=$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 Hr=tT,Wr=rT,xs=iT,Jp=lT,dT=Object.defineProperty,fT=(t,e)=>dT(t,"name",{value:e,configurable:!0}),Kr=p.forwardRef(fT(function(e,n){var c;const{container:r,...o}=e,[s,i]=p.useState(!1);Te(()=>i(!0),[]);const a=r||s&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return a?Or.createPortal(l.jsx(te.div,{...o,ref:n}),a):null},"Portal")),hT=Object.defineProperty,zt=(t,e)=>hT(t,"name",{value:e,configurable:!0});function em(t,e){return p.useReducer((n,r)=>e[n][r]??n,t)}zt(em,"useStateMachine");var ze=zt(t=>{const{present:e,children:n}=t,r=tm(e),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),s=nm(r.ref,rm(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:s}):null},"Presence");function tm(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]=em(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??Vn(r.current),i.current=void 0):s.current="none"},[c]),Te(()=>{const d=r.current,f=o.current;if(f!==t){const m=s.current,g=Vn(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]),Te(()=>{if(e){let d;const f=e.ownerDocument.defaultView??window,h=zt(g=>{const v=Vn(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=Vn(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=Vn(f)}else r.current=null;n(d)},[])}}zt(tm,"usePresence");function ga(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}zt(ga,"setRef");function nm(...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(nm,"useStableComposedRefs");function Vn(t){return(t==null?void 0:t.animationName)||"none"}zt(Vn,"getAnimationName");function rm(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(rm,"getElementRef");var pT=Object.defineProperty,mT=(t,e)=>pT(t,"name",{value:e,configurable:!0});function Cc(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])}mT(Cc,"usePrevious");var gT=Object.defineProperty,yT=(t,e)=>gT(t,"name",{value:e,configurable:!0}),om=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"}),sm=p.forwardRef(yT(function(e,n){return l.jsx(te.span,{...e,ref:n,style:{...om,...e.style}})},"VisuallyHidden")),vT=sm,xT=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},On=new WeakMap,xo=new WeakMap,bo={},yi=0,im=function(t){return t&&(t.host||im(t.parentNode))},bT=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=im(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})},wT=function(t,e,n,r){var o=bT(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=(On.get(h)||0)+1,v=(s.get(h)||0)+1;On.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=On.get(f)-1,m=s.get(f)-1;On.set(f,h),s.set(f,m),h||(xo.has(f)||f.removeAttribute(r),xo.delete(f)),m||f.removeAttribute(n)}),yi--,yi||(On=new WeakMap,On=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=xT(t);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),wT(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 am(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 CT(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",ST="with-scroll-bars-hidden",PT="--removed-body-scroll-bar-size";function vi(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function RT(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 TT=typeof window<"u"?p.useLayoutEffect:p.useEffect,vd=new WeakMap;function MT(t,e){var n=RT(null,function(r){return t.forEach(function(o){return vi(o,r)})});return TT(function(){var r=vd.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)})}vd.set(n,t)},[t]),n}function ET(t){return t}function jT(t,e){e===void 0&&(e=ET);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 AT(t){t===void 0&&(t={});var e=jT(null);return e.options=jt({async:!0,ssr:!1},t),e}var cm=function(t){var e=t.sideCar,n=am(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))};cm.isSideCarExport=!0;function DT(t,e){return t.useMedium(e),cm}var lm=AT(),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=am(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=h,R=MT([n,e]),M=jt(jt({},C),o);return p.createElement(p.Fragment,null,d&&p.createElement(P,{sideCar:lm,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 IT=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function kT(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=IT();return e&&t.setAttribute("nonce",e),t}function NT(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function _T(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var OT=function(){var t=0,e=null;return{add:function(n){t==0&&(e=kT())&&(NT(e,n),_T(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},LT=function(){var t=OT();return function(e,n){p.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},um=function(){var t=LT(),e=function(n){var r=n.styles,o=n.dynamic;return t(r,o),null};return e},$T={left:0,top:0,right:0,gap:0},bi=function(t){return parseInt(t||"",10)||0},FT=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)]},VT=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return $T;var e=FT(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])}},BT=um(),Yn="data-scroll-locked",GT=function(t,e,n,r){var o=t.left,s=t.top,i=t.right,a=t.gap;return n===void 0&&(n="margin"),`
|
|
170
170
|
.`.concat(ST,` {
|
|
171
171
|
overflow: hidden `).concat(r,`;
|
|
172
172
|
padding-right: `).concat(a,"px ").concat(r,`;
|