@wmoney/ui-kit 1.0.15 → 1.0.16
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 +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -42,7 +42,7 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.
|
|
|
42
42
|
|
|
43
43
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
44
|
|
|
45
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ru=`DialogDescriptionWarning`,iu=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${tu(ru).contentName}}.`;return l.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},au=Al,ou=Il,su=Rl,cu=Hl,lu=`[cmdk-group=""]`,uu=`[cmdk-group-items=""]`,du=`[cmdk-group-heading=""]`,fu=`[cmdk-item=""]`,pu=`${fu}:not([aria-disabled="true"])`,mu=`cmdk-item-select`,hu=`data-value`,gu=(e,t,n)=>hs(e,t,n),_u=l.createContext(void 0),vu=()=>l.useContext(_u),yu=l.createContext(void 0),bu=()=>l.useContext(yu),xu=l.createContext(void 0),Su=l.forwardRef((e,t)=>{let n=Iu(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=Iu(()=>new Set),i=Iu(()=>new Map),a=Iu(()=>new Map),o=Iu(()=>new Set),s=Pu(e),{label:c,children:u,value:d,onValueChange:f,filter:p,shouldFilter:m,loop:h,disablePointerSelection:g=!1,vimBindings:_=!0,...v}=e,y=vs(),b=vs(),x=vs(),S=l.useRef(null),C=zu();Fu(()=>{if(d!==void 0){let e=d.trim();n.current.value=e,w.emit()}},[d]),Fu(()=>{C(6,A)},[]);let w=l.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)k(),D(),C(1,O);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(y))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=j()?.id,w.emit()}),r||C(5,A),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),T=l.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,E(t,r)),C(2,()=>{D(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),C(3,()=>{k(),D(),n.current.value||O(),w.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=j();C(4,()=>{k(),t?.getAttribute(`id`)===e&&O(),w.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:y,inputId:x,labelId:b,listInnerRef:S}),[]);function E(e,t){let r=s.current?.filter??gu;return e?r(e,n.current.search,t):0}function D(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=S.current;M().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(uu);t?t.appendChild(e.parentElement===t?e:e.closest(`${uu} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${uu} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${lu}[${hu}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=M().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(hu);w.setState(`value`,e||void 0)}function k(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=E(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function A(){var e;let t=j();t&&(t.parentElement?.firstChild===t&&((e=t.closest(lu)?.querySelector(du))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function j(){return S.current?.querySelector(`${fu}[aria-selected="true"]`)}function M(){return Array.from(S.current?.querySelectorAll(pu)||[])}function N(e){let t=M()[e];t&&w.setState(`value`,t.getAttribute(hu))}function P(e){var t;let n=j(),r=M(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(hu))}function F(e){let t=j()?.closest(lu),n;for(;t&&!n;)t=e>0?Mu(t,lu):Nu(t,lu),n=t?.querySelector(pu);n?w.setState(`value`,n.getAttribute(hu)):P(e)}let I=()=>N(M().length-1),L=e=>{e.preventDefault(),e.metaKey?I():e.altKey?F(1):P(1)},R=e=>{e.preventDefault(),e.metaKey?N(0):e.altKey?F(-1):P(-1)};return l.createElement($.div,{ref:t,tabIndex:-1,...v,"cmdk-root":``,onKeyDown:e=>{var t;(t=v.onKeyDown)==null||t.call(v,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:_&&e.ctrlKey&&L(e);break;case`ArrowDown`:L(e);break;case`p`:case`k`:_&&e.ctrlKey&&R(e);break;case`ArrowUp`:R(e);break;case`Home`:e.preventDefault(),N(0);break;case`End`:e.preventDefault(),I();break;case`Enter`:{e.preventDefault();let t=j();if(t){let e=new Event(mu);t.dispatchEvent(e)}}}}},l.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:Hu},c),Vu(e,e=>l.createElement(yu.Provider,{value:w},l.createElement(_u.Provider,{value:T},e))))}),Cu=l.forwardRef((e,t)=>{let n=vs(),r=l.useRef(null),i=l.useContext(xu),a=vu(),o=Pu(e),s=o.current?.forceMount??i?.forceMount;Fu(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=Ru(n,r,[e.value,e.children,r],e.keywords),u=bu(),d=Lu(e=>e.value&&e.value===c.current),f=Lu(e=>s||a.filter()===!1?!0:e.search?e.filtered.items.get(n)>0:!0);l.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(mu,p),()=>t.removeEventListener(mu,p)},[f,e.onSelect,e.disabled]);function p(){var e,t;m(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function m(){u.setState(`value`,c.current,!0)}if(!f)return null;let{disabled:h,value:g,onSelect:_,forceMount:y,keywords:b,...x}=e;return l.createElement($.div,{ref:v(r,t),...x,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!h,"aria-selected":!!d,"data-disabled":!!h,"data-selected":!!d,onPointerMove:h||a.getDisablePointerSelection()?void 0:m,onClick:h?void 0:p},e.children)}),wu=l.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=vs(),s=l.useRef(null),c=l.useRef(null),u=vs(),d=vu(),f=Lu(e=>i||d.filter()===!1?!0:e.search?e.filtered.groups.has(o):!0);Fu(()=>d.group(o),[]),Ru(o,s,[e.value,e.heading,c]);let p=l.useMemo(()=>({id:o,forceMount:i}),[i]);return l.createElement($.div,{ref:v(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:f?void 0:!0},n&&l.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:u},n),Vu(e,e=>l.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?u:void 0},l.createElement(xu.Provider,{value:p},e))))}),Tu=l.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=l.useRef(null),a=Lu(e=>!e.search);return!n&&!a?null:l.createElement($.div,{ref:v(i,t),...r,"cmdk-separator":``,role:`separator`})}),Eu=l.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=bu(),o=Lu(e=>e.search),s=Lu(e=>e.selectedItemId),c=vu();return l.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),l.createElement($.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),Du=l.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=l.useRef(null),o=l.useRef(null),s=Lu(e=>e.selectedItemId),c=vu();return l.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),l.createElement($.div,{ref:v(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},Vu(e,e=>l.createElement(`div`,{ref:v(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),Ou=l.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return l.createElement(au,{open:n,onOpenChange:r},l.createElement(ou,{container:o},l.createElement(su,{"cmdk-overlay":``,className:i}),l.createElement(cu,{"aria-label":e.label,"cmdk-dialog":``,className:a},l.createElement(Su,{ref:t,...s}))))}),ku=l.forwardRef((e,t)=>Lu(e=>e.filtered.count===0)?l.createElement($.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),Au=l.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return l.createElement($.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Vu(e,e=>l.createElement(`div`,{"aria-hidden":!0},e)))}),ju=Object.assign(Su,{List:Du,Item:Cu,Input:Eu,Group:wu,Separator:Tu,Dialog:Ou,Empty:ku,Loading:Au});function Mu(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Nu(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Pu(e){let t=l.useRef(e);return Fu(()=>{t.current=e}),t}var Fu=typeof window>`u`?l.useEffect:l.useLayoutEffect;function Iu(e){let t=l.useRef();return t.current===void 0&&(t.current=e()),t}function Lu(e){let t=bu(),n=()=>e(t.snapshot());return l.useSyncExternalStore(t.subscribe,n,n)}function Ru(e,t,n,r=[]){let i=l.useRef(),a=vu();return Fu(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(hu,s),i.current=s}),i}var zu=()=>{let[e,t]=l.useState(),n=Iu(()=>new Map);return Fu(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function Bu(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function Vu({asChild:e,children:t},n){return e&&l.isValidElement(t)?l.cloneElement(Bu(t),{ref:t.ref},n(t.props.children)):n(t)}var Hu={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},Uu=au;function Wu({className:e,...t}){return(0,u.jsx)(ju,{"data-slot":`command`,className:q(`bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...t})}function Gu({className:e,...t}){return(0,u.jsxs)(`div`,{"data-slot":`command-input-wrapper`,className:`flex h-9 items-center gap-2 border-b px-3`,children:[(0,u.jsx)(It,{className:`size-4 shrink-0 opacity-50`}),(0,u.jsx)(ju.Input,{"data-slot":`command-input`,className:q(`placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]})}function Ku({className:e,...t}){return(0,u.jsx)(ju.List,{"data-slot":`command-list`,className:q(`max-h-75 scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function qu({...e}){return(0,u.jsx)(ju.Empty,{"data-slot":`command-empty`,className:`py-6 text-center text-sm`,...e})}function Ju({className:e,...t}){return(0,u.jsx)(ju.Group,{"data-slot":`command-group`,className:q(`text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium`,e),...t})}function Yu({className:e,...t}){return(0,u.jsx)(ju.Separator,{"data-slot":`command-separator`,className:q(`bg-border -mx-1 h-px`,e),...t})}function Xu({className:e,...t}){return(0,u.jsx)(ju.Item,{"data-slot":`command-item`,className:q(`data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...t})}var Zu=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=w(`Primitive.${t}`),r=l.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,u.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Qu=`Label`,$u=l.forwardRef((e,t)=>(0,u.jsx)(Zu.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));$u.displayName=Qu;var ed=$u;function td({className:e,...t}){return(0,u.jsx)(ed,{"data-slot":`label`,className:q(`body-md font-medium flex items-center gap-xs leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}var nd=[`top`,`right`,`bottom`,`left`],rd=Math.min,id=Math.max,ad=Math.round,od=Math.floor,sd=e=>({x:e,y:e}),cd={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function ld(e,t,n){return id(e,rd(t,n))}function ud(e,t){return typeof e==`function`?e(t):e}function dd(e){return e.split(`-`)[0]}function fd(e){return e.split(`-`)[1]}function pd(e){return e===`x`?`y`:`x`}function md(e){return e===`y`?`height`:`width`}function hd(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function gd(e){return pd(hd(e))}function _d(e,t,n){n===void 0&&(n=!1);let r=fd(e),i=gd(e),a=md(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ed(o)),[o,Ed(o)]}function vd(e){let t=Ed(e);return[yd(e),t,yd(t)]}function yd(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var bd=[`left`,`right`],xd=[`right`,`left`],Sd=[`top`,`bottom`],Cd=[`bottom`,`top`];function wd(e,t,n){switch(e){case`top`:case`bottom`:return n?t?xd:bd:t?bd:xd;case`left`:case`right`:return t?Sd:Cd;default:return[]}}function Td(e,t,n,r){let i=fd(e),a=wd(dd(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(yd)))),a}function Ed(e){let t=dd(e);return cd[t]+e.slice(t.length)}function Dd(e){return{top:0,right:0,bottom:0,left:0,...e}}function Od(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Dd(e)}function kd(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Ad(e,t,n){let{reference:r,floating:i}=e,a=hd(t),o=gd(t),s=md(o),c=dd(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(fd(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function jd(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=ud(t,e),p=Od(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=kd(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=kd(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Md=50,Nd=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:jd},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ad(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Md&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Ad(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Pd=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=ud(e,t)||{};if(l==null)return{};let d=Od(u),f={x:n,y:r},p=gd(i),m=md(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=rd(d[_],T),D=rd(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=ld(O,A,k),M=!c.arrow&&fd(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),Fd=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=ud(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=dd(r),_=hd(o),v=dd(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Ed(o)]:vd(o)),x=p!==`none`;!d&&x&&b.push(...Td(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=_d(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==hd(t))||T.every(e=>hd(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=hd(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Id(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ld(e){return nd.some(t=>e[t]>=0)}var Rd=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=ud(e,t);switch(i){case`referenceHidden`:{let e=Id(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ld(e)}}}case`escaped`:{let e=Id(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ld(e)}}}default:return{}}}}},zd=new Set([`left`,`top`]);async function Bd(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=dd(n),s=fd(n),c=hd(n)===`y`,l=zd.has(o)?-1:1,u=a&&c?-1:1,d=ud(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Vd=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Bd(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Hd=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ud(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=hd(dd(i)),p=pd(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=ld(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=ld(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Ud=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=ud(e,t),u={x:n,y:r},d=hd(i),f=pd(d),p=u[f],m=u[d],h=ud(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=zd.has(dd(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Wd=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=ud(e,t),u=await o.detectOverflow(t,l),d=dd(i),f=fd(i),p=hd(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=rd(h-u[g],v),x=rd(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=id(u.left,0),t=id(u.right,0),n=id(u.top,0),r=id(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:id(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:id(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Gd(){return typeof window<`u`}function Kd(e){return Yd(e)?(e.nodeName||``).toLowerCase():`#document`}function qd(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jd(e){return((Yd(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Yd(e){return Gd()?e instanceof Node||e instanceof qd(e).Node:!1}function Xd(e){return Gd()?e instanceof Element||e instanceof qd(e).Element:!1}function Zd(e){return Gd()?e instanceof HTMLElement||e instanceof qd(e).HTMLElement:!1}function Qd(e){return!Gd()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof qd(e).ShadowRoot}function $d(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=df(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ef(e){return/^(table|td|th)$/.test(Kd(e))}function tf(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var nf=/transform|translate|scale|rotate|perspective|filter/,rf=/paint|layout|strict|content/,af=e=>!!e&&e!==`none`,of;function sf(e){let t=Xd(e)?df(e):e;return af(t.transform)||af(t.translate)||af(t.scale)||af(t.rotate)||af(t.perspective)||!lf()&&(af(t.backdropFilter)||af(t.filter))||nf.test(t.willChange||``)||rf.test(t.contain||``)}function cf(e){let t=pf(e);for(;Zd(t)&&!uf(t);){if(sf(t))return t;if(tf(t))return null;t=pf(t)}return null}function lf(){return of??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),of}function uf(e){return/^(html|body|#document)$/.test(Kd(e))}function df(e){return qd(e).getComputedStyle(e)}function ff(e){return Xd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pf(e){if(Kd(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Qd(e)&&e.host||Jd(e);return Qd(t)?t.host:t}function mf(e){let t=pf(e);return uf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zd(t)&&$d(t)?t:mf(t)}function hf(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=mf(e),i=r===e.ownerDocument?.body,a=qd(r);if(i){let e=gf(a);return t.concat(a,a.visualViewport||[],$d(r)?r:[],e&&n?hf(e):[])}else return t.concat(r,hf(r,[],n))}function gf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _f(e){let t=df(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Zd(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ad(n)!==a||ad(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function vf(e){return Xd(e)?e:e.contextElement}function yf(e){let t=vf(e);if(!Zd(t))return sd(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=_f(t),o=(a?ad(n.width):n.width)/r,s=(a?ad(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var bf=sd(0);function xf(e){let t=qd(e);return!lf()||!t.visualViewport?bf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Sf(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qd(e)?!1:t}function Cf(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=vf(e),o=sd(1);t&&(r?Xd(r)&&(o=yf(r)):o=yf(e));let s=Sf(a,n,r)?xf(a):sd(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=qd(a),t=r&&Xd(r)?qd(r):r,n=e,i=gf(n);for(;i&&r&&t!==n;){let e=yf(i),t=i.getBoundingClientRect(),r=df(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=qd(i),i=gf(n)}}return kd({width:u,height:d,x:c,y:l})}function wf(e,t){let n=ff(e).scrollLeft;return t?t.left+n:Cf(Jd(e)).left+n}function Tf(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-wf(e,n),y:n.top+t.scrollTop}}function Ef(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Jd(r),s=t?tf(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=sd(1),u=sd(0),d=Zd(r);if((d||!d&&!a)&&((Kd(r)!==`body`||$d(o))&&(c=ff(r)),d)){let e=Cf(r);l=yf(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Tf(o,c):sd(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Df(e){return Array.from(e.getClientRects())}function Of(e){let t=Jd(e),n=ff(e),r=e.ownerDocument.body,i=id(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=id(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+wf(e),s=-n.scrollTop;return df(r).direction===`rtl`&&(o+=id(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var kf=25;function Af(e,t){let n=qd(e),r=Jd(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=lf();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=wf(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=kf&&(a-=o)}else l<=kf&&(a+=l);return{width:a,height:o,x:s,y:c}}function jf(e,t){let n=Cf(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Zd(e)?yf(e):sd(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Mf(e,t,n){let r;if(t===`viewport`)r=Af(e,n);else if(t===`document`)r=Of(Jd(e));else if(Xd(t))r=jf(t,n);else{let n=xf(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return kd(r)}function Nf(e,t){let n=pf(e);return n===t||!Xd(n)||uf(n)?!1:df(n).position===`fixed`||Nf(n,t)}function Pf(e,t){let n=t.get(e);if(n)return n;let r=hf(e,[],!1).filter(e=>Xd(e)&&Kd(e)!==`body`),i=null,a=df(e).position===`fixed`,o=a?pf(e):e;for(;Xd(o)&&!uf(o);){let t=df(o),n=sf(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||$d(o)&&!n&&Nf(e,o))?r=r.filter(e=>e!==o):i=t,o=pf(o)}return t.set(e,r),r}function Ff(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?tf(t)?[]:Pf(t,this._c):[].concat(n),r],o=Mf(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Mf(t,a[e],i);s=id(n.top,s),c=rd(n.right,c),l=rd(n.bottom,l),u=id(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function If(e){let{width:t,height:n}=_f(e);return{width:t,height:n}}function Lf(e,t,n){let r=Zd(t),i=Jd(t),a=n===`fixed`,o=Cf(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=sd(0);function l(){c.x=wf(i)}if(r||!r&&!a)if((Kd(t)!==`body`||$d(i))&&(s=ff(t)),r){let e=Cf(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Tf(i,s):sd(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Rf(e){return df(e).position===`static`}function zf(e,t){if(!Zd(e)||df(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Jd(e)===n&&(n=n.ownerDocument.body),n}function Bf(e,t){let n=qd(e);if(tf(e))return n;if(!Zd(e)){let t=pf(e);for(;t&&!uf(t);){if(Xd(t)&&!Rf(t))return t;t=pf(t)}return n}let r=zf(e,t);for(;r&&ef(r)&&Rf(r);)r=zf(r,t);return r&&uf(r)&&Rf(r)&&!sf(r)?n:r||cf(e)||n}var Vf=async function(e){let t=this.getOffsetParent||Bf,n=this.getDimensions,r=await n(e.floating);return{reference:Lf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Hf(e){return df(e).direction===`rtl`}var Uf={convertOffsetParentRelativeRectToViewportRelativeRect:Ef,getDocumentElement:Jd,getClippingRect:Ff,getOffsetParent:Bf,getElementRects:Vf,getClientRects:Df,getDimensions:If,getScale:yf,isElement:Xd,isRTL:Hf};function Wf(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Gf(e,t){let n=null,r,i=Jd(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=od(d),h=od(i.clientWidth-(u+f)),g=od(i.clientHeight-(d+p)),_=od(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:id(0,rd(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Wf(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Kf(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=vf(e),u=i||a?[...l?hf(l):[],...t?hf(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Gf(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Cf(e):null;c&&g();function g(){let t=Cf(e);h&&!Wf(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var qf=Vd,Jf=Hd,Yf=Fd,Xf=Wd,Zf=Rd,Qf=Pd,$f=Ud,ep=(e,t,n)=>{let r=new Map,i={platform:Uf,...n},a={...i.platform,_c:r};return Nd(e,t,{...i,platform:a})},tp=typeof document<`u`?l.useLayoutEffect:function(){};function np(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!np(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!np(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function rp(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ip(e,t){let n=rp(e);return Math.round(t*n)/n}function ap(e){let t=l.useRef(e);return tp(()=>{t.current=e}),t}function op(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[f,p]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=l.useState(r);np(m,r)||h(r);let[g,_]=l.useState(null),[v,y]=l.useState(null),b=l.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=l.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),S=a||g,C=o||v,w=l.useRef(null),T=l.useRef(null),E=l.useRef(f),D=c!=null,O=ap(c),k=ap(i),A=ap(u),j=l.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:m};k.current&&(e.platform=k.current),ep(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!np(E.current,t)&&(E.current=t,d.flushSync(()=>{p(t)}))})},[m,t,n,k,A]);tp(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[u]);let M=l.useRef(!1);tp(()=>(M.current=!0,()=>{M.current=!1}),[]),tp(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let N=l.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),P=l.useMemo(()=>({reference:S,floating:C}),[S,C]),F=l.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=ip(P.floating,f.x),r=ip(P.floating,f.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...rp(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,P.floating,f.x,f.y]);return l.useMemo(()=>({...f,update:j,refs:N,elements:P,floatingStyles:F}),[f,j,N,P,F])}var sp=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Qf({element:r.current,padding:i}).fn(n):r?Qf({element:r,padding:i}).fn(n):{}}}},cp=(e,t)=>{let n=qf(e);return{name:n.name,fn:n.fn,options:[e,t]}},lp=(e,t)=>{let n=Jf(e);return{name:n.name,fn:n.fn,options:[e,t]}},up=(e,t)=>({fn:$f(e).fn,options:[e,t]}),dp=(e,t)=>{let n=Yf(e);return{name:n.name,fn:n.fn,options:[e,t]}},fp=(e,t)=>{let n=Xf(e);return{name:n.name,fn:n.fn,options:[e,t]}},pp=(e,t)=>{let n=Zf(e);return{name:n.name,fn:n.fn,options:[e,t]}},mp=(e,t)=>{let n=sp(e);return{name:n.name,fn:n.fn,options:[e,t]}},hp=`Arrow`,gp=l.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,u.jsx)($.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,u.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});gp.displayName=hp;var _p=gp,vp=`Popper`,[yp,bp]=_o(vp),[xp,Sp]=yp(vp),Cp=e=>{let{__scopePopper:t,children:n}=e,[r,i]=l.useState(null);return(0,u.jsx)(xp,{scope:t,anchor:r,onAnchorChange:i,children:n})};Cp.displayName=vp;var wp=`PopperAnchor`,Tp=l.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Sp(wp,n),o=l.useRef(null),s=y(t,o),c=l.useRef(null);return l.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,u.jsx)($.div,{...i,ref:s})});Tp.displayName=wp;var Ep=`PopperContent`,[Dp,Op]=yp(Ep),kp=l.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p=`partial`,hideWhenDetached:m=!1,updatePositionStrategy:h=`optimized`,onPlaced:g,..._}=e,v=Sp(Ep,n),[b,x]=l.useState(null),S=y(t,e=>x(e)),[C,w]=l.useState(null),T=To(C),E=T?.width??0,D=T?.height??0,O=r+(a===`center`?``:`-`+a),k=typeof f==`number`?f:{top:0,right:0,bottom:0,left:0,...f},A=Array.isArray(d)?d:[d],j=A.length>0,M={padding:k,boundary:A.filter(Np),altBoundary:j},{refs:N,floatingStyles:P,placement:F,isPositioned:I,middlewareData:L}=op({strategy:`fixed`,placement:O,whileElementsMounted:(...e)=>Kf(...e,{animationFrame:h===`always`}),elements:{reference:v.anchor},middleware:[cp({mainAxis:i+D,alignmentAxis:o}),c&&lp({mainAxis:!0,crossAxis:!1,limiter:p===`partial`?up():void 0,...M}),c&&dp({...M}),fp({...M,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),C&&mp({element:C,padding:s}),Pp({arrowWidth:E,arrowHeight:D}),m&&pp({strategy:`referenceHidden`,...M})]}),[R,ee]=Fp(F),te=ys(g);yo(()=>{I&&te?.()},[I,te]);let z=L.arrow?.x,B=L.arrow?.y,ne=L.arrow?.centerOffset!==0,[re,V]=l.useState();return yo(()=>{b&&V(window.getComputedStyle(b).zIndex)},[b]),(0,u.jsx)(`div`,{ref:N.setFloating,"data-radix-popper-content-wrapper":``,style:{...P,transform:I?P.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:re,"--radix-popper-transform-origin":[L.transformOrigin?.x,L.transformOrigin?.y].join(` `),...L.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,u.jsx)(Dp,{scope:n,placedSide:R,onArrowChange:w,arrowX:z,arrowY:B,shouldHideArrow:ne,children:(0,u.jsx)($.div,{"data-side":R,"data-align":ee,..._,ref:S,style:{..._.style,animation:I?void 0:`none`}})})})});kp.displayName=Ep;var Ap=`PopperArrow`,jp={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Mp=l.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Op(Ap,n),a=jp[i.placedSide];return(0,u.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,u.jsx)(_p,{...r,ref:t,style:{...r.style,display:`block`}})})});Mp.displayName=Ap;function Np(e){return e!==null}var Pp=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Fp(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Fp(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Ip=Cp,Lp=Tp,Rp=kp,zp=Mp;function Bp(e){let t=Vp(e),n=l.forwardRef((e,n)=>{let{children:r,...i}=e,a=l.Children.toArray(r),o=a.find(Up);if(o){let e=o.props.children,r=a.map(t=>t===o?l.Children.count(e)>1?l.Children.only(null):l.isValidElement(e)?e.props.children:null:t);return(0,u.jsx)(t,{...i,ref:n,children:l.isValidElement(e)?l.cloneElement(e,void 0,r):null})}return(0,u.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Vp(e){let t=l.forwardRef((e,t)=>{let{children:n,...r}=e;if(l.isValidElement(n)){let e=Gp(n),i=Wp(r,n.props);return n.type!==l.Fragment&&(i.ref=t?v(t,e):e),l.cloneElement(n,i)}return l.Children.count(n)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Hp=Symbol(`radix.slottable`);function Up(e){return l.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Hp}function Wp(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Gp(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Kp=`Popover`,[qp,Jp]=_o(Kp,[bp]),Yp=bp(),[Xp,Zp]=qp(Kp),Qp=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=Yp(t),c=l.useRef(null),[d,f]=l.useState(!1),[p,m]=xo({prop:r,defaultProp:i??!1,onChange:a,caller:Kp});return(0,u.jsx)(Ip,{...s,children:(0,u.jsx)(Xp,{scope:t,contentId:vs(),triggerRef:c,open:p,onOpenChange:m,onOpenToggle:l.useCallback(()=>m(e=>!e),[m]),hasCustomAnchor:d,onCustomAnchorAdd:l.useCallback(()=>f(!0),[]),onCustomAnchorRemove:l.useCallback(()=>f(!1),[]),modal:o,children:n})})};Qp.displayName=Kp;var $p=`PopoverAnchor`,em=l.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Zp($p,n),a=Yp(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return l.useEffect(()=>(o(),()=>s()),[o,s]),(0,u.jsx)(Lp,{...a,...r,ref:t})});em.displayName=$p;var tm=`PopoverTrigger`,nm=l.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Zp(tm,n),a=Yp(n),o=y(t,i.triggerRef),s=(0,u.jsx)($.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":_m(i.open),...r,ref:o,onClick:Q(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,u.jsx)(Lp,{asChild:!0,...a,children:s})});nm.displayName=tm;var rm=`PopoverPortal`,[im,am]=qp(rm,{forceMount:void 0}),om=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=Zp(rm,t);return(0,u.jsx)(im,{scope:t,forceMount:n,children:(0,u.jsx)(Do,{present:n||a.open,children:(0,u.jsx)(Zs,{asChild:!0,container:i,children:r})})})};om.displayName=rm;var sm=`PopoverContent`,cm=l.forwardRef((e,t)=>{let n=am(sm,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=Zp(sm,e.__scopePopover);return(0,u.jsx)(Do,{present:r||a.open,children:a.modal?(0,u.jsx)(um,{...i,ref:t}):(0,u.jsx)(dm,{...i,ref:t})})});cm.displayName=sm;var lm=Bp(`PopoverContent.RemoveScroll`),um=l.forwardRef((e,t)=>{let n=Zp(sm,e.__scopePopover),r=l.useRef(null),i=y(t,r),a=l.useRef(!1);return l.useEffect(()=>{let e=r.current;if(e)return vl(e)},[]),(0,u.jsx)(ll,{as:lm,allowPinchZoom:!0,children:(0,u.jsx)(fm,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Q(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Q(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:Q(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),dm=l.forwardRef((e,t)=>{let n=Zp(sm,e.__scopePopover),r=l.useRef(!1),i=l.useRef(!1);return(0,u.jsx)(fm,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),fm=l.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:d,...f}=e,p=Zp(sm,n),m=Yp(n);return $s(),(0,u.jsx)(Rs,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,u.jsx)(Ds,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:d,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>p.onOpenChange(!1),children:(0,u.jsx)(Rp,{"data-state":_m(p.open),role:`dialog`,id:p.contentId,...m,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),pm=`PopoverClose`,mm=l.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Zp(pm,n);return(0,u.jsx)($.button,{type:`button`,...r,ref:t,onClick:Q(e.onClick,()=>i.onOpenChange(!1))})});mm.displayName=pm;var hm=`PopoverArrow`,gm=l.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Yp(n);return(0,u.jsx)(zp,{...i,...r,ref:t})});gm.displayName=hm;function _m(e){return e?`open`:`closed`}var vm=Qp,ym=nm,bm=om,xm=cm;function Sm({...e}){return(0,u.jsx)(vm,{"data-slot":`popover`,...e})}function Cm({...e}){return(0,u.jsx)(ym,{"data-slot":`popover-trigger`,...e})}function wm({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,u.jsx)(bm,{children:(0,u.jsx)(xm,{"data-slot":`popover-content`,align:t,sideOffset:n,className:q(`bg-input text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg border p-3 shadow-md outline-hidden`,e),...r})})}function Tm({label:e,required:t,value:n,onChange:r}){let[i,a]=(0,l.useState)(n),o=n===void 0?i:n,s=e=>{r?r(e):a(e)};return(0,u.jsxs)(`div`,{className:`mx-auto w-full sm:w-44 flex flex-col gap-1`,children:[(0,u.jsxs)(td,{htmlFor:`date-picker-simple`,className:`label-md`,children:[e,` `,t&&(0,u.jsx)(`span`,{className:`text-destructive`,children:`*`})]}),(0,u.jsxs)(Sm,{children:[(0,u.jsx)(Cm,{asChild:!0,children:(0,u.jsx)(qt,{variant:`outline`,id:`date-picker-simple`,className:`w-full justify-start px-2.5 font-normal`,children:o?Mr(o,`dd/MM/yyyy`,{locale:Sn}):(0,u.jsx)(`span`,{className:`text-muted`,children:`Selecione a data`})})}),(0,u.jsx)(wm,{className:`w-auto p-0`,align:`start`,children:(0,u.jsx)(so,{mode:`single`,selected:o,defaultMonth:o,captionLayout:`dropdown`,onSelect:e=>{s(e)}})})]})]})}function Em(e){let t=Dm(e),n=l.forwardRef((e,n)=>{let{children:r,...i}=e,a=l.Children.toArray(r),o=a.find(km);if(o){let e=o.props.children,r=a.map(t=>t===o?l.Children.count(e)>1?l.Children.only(null):l.isValidElement(e)?e.props.children:null:t);return(0,u.jsx)(t,{...i,ref:n,children:l.isValidElement(e)?l.cloneElement(e,void 0,r):null})}return(0,u.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Dm(e){let t=l.forwardRef((e,t)=>{let{children:n,...r}=e;if(l.isValidElement(n)){let e=jm(n),i=Am(r,n.props);return n.type!==l.Fragment&&(i.ref=t?v(t,e):e),l.cloneElement(n,i)}return l.Children.count(n)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Om=Symbol(`radix.slottable`);function km(e){return l.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Om}function Am(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function jm(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Mm(e){let t=e+`CollectionProvider`,[n,r]=_o(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=l.default.useRef(null),a=l.default.useRef(new Map).current;return(0,u.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Em(s),d=l.default.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,u.jsx)(c,{ref:y(t,a(s,n).collectionRef),children:r})});d.displayName=s;let f=e+`CollectionItemSlot`,p=`data-radix-collection-item`,m=Em(f),h=l.default.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=l.default.useRef(null),s=y(t,o),c=a(f,n);return l.default.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,u.jsx)(m,{[p]:``,ref:s,children:r})});h.displayName=f;function g(t){let n=a(e+`CollectionConsumer`,t);return l.default.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:d,ItemSlot:h},g,r]}var Nm=l.createContext(void 0);function Pm(e){let t=l.useContext(Nm);return e||t||`ltr`}var Fm=`rovingFocusGroup.onEntryFocus`,Im={bubbles:!1,cancelable:!0},Lm=`RovingFocusGroup`,[Rm,zm,Bm]=Mm(Lm),[Vm,Hm]=_o(Lm,[Bm]),[Um,Wm]=Vm(Lm),Gm=l.forwardRef((e,t)=>(0,u.jsx)(Rm.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(Rm.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(Km,{...e,ref:t})})}));Gm.displayName=Lm;var Km=l.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,m=l.useRef(null),h=y(t,m),g=Pm(a),[_,v]=xo({prop:o,defaultProp:s??null,onChange:c,caller:Lm}),[b,x]=l.useState(!1),S=ys(d),C=zm(n),w=l.useRef(!1),[T,E]=l.useState(0);return l.useEffect(()=>{let e=m.current;if(e)return e.addEventListener(Fm,S),()=>e.removeEventListener(Fm,S)},[S]),(0,u.jsx)(Um,{scope:n,orientation:r,dir:g,loop:i,currentTabStopId:_,onItemFocus:l.useCallback(e=>v(e),[v]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>E(e=>e+1),[]),onFocusableItemRemove:l.useCallback(()=>E(e=>e-1),[]),children:(0,u.jsx)($.div,{tabIndex:b||T===0?-1:0,"data-orientation":r,...p,ref:h,style:{outline:`none`,...e.style},onMouseDown:Q(e.onMouseDown,()=>{w.current=!0}),onFocus:Q(e.onFocus,e=>{let t=!w.current;if(e.target===e.currentTarget&&t&&!b){let t=new CustomEvent(Fm,Im);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=C().filter(e=>e.focusable);Qm([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current),f)}}w.current=!1}),onBlur:Q(e.onBlur,()=>x(!1))})})}),qm=`RovingFocusGroupItem`,Jm=l.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=vs(),d=a||c,f=Wm(qm,n),p=f.currentTabStopId===d,m=zm(n),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:_}=f;return l.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),(0,u.jsx)(Rm.ItemSlot,{scope:n,id:d,focusable:r,active:i,children:(0,u.jsx)($.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:Q(e.onMouseDown,e=>{r?f.onItemFocus(d):e.preventDefault()}),onFocus:Q(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:Q(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){f.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Zm(e,f.orientation,f.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=m().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=f.loop?$m(n,r+1):n.slice(r+1)}setTimeout(()=>Qm(n))}}),children:typeof o==`function`?o({isCurrentTabStop:p,hasTabStop:_!=null}):o})})});Jm.displayName=qm;var Ym={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Xm(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Zm(e,t,n){let r=Xm(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Ym[r]}function Qm(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function $m(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var eh=Gm,th=Jm;function nh(e){let t=rh(e),n=l.forwardRef((e,n)=>{let{children:r,...i}=e,a=l.Children.toArray(r),o=a.find(ah);if(o){let e=o.props.children,r=a.map(t=>t===o?l.Children.count(e)>1?l.Children.only(null):l.isValidElement(e)?e.props.children:null:t);return(0,u.jsx)(t,{...i,ref:n,children:l.isValidElement(e)?l.cloneElement(e,void 0,r):null})}return(0,u.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function rh(e){let t=l.forwardRef((e,t)=>{let{children:n,...r}=e;if(l.isValidElement(n)){let e=sh(n),i=oh(r,n.props);return n.type!==l.Fragment&&(i.ref=t?v(t,e):e),l.cloneElement(n,i)}return l.Children.count(n)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ih=Symbol(`radix.slottable`);function ah(e){return l.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===ih}function oh(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function sh(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ch=[`Enter`,` `],lh=[`ArrowDown`,`PageUp`,`Home`],uh=[`ArrowUp`,`PageDown`,`End`],dh=[...lh,...uh],fh={ltr:[...ch,`ArrowRight`],rtl:[...ch,`ArrowLeft`]},ph={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},mh=`Menu`,[hh,gh,_h]=Mm(mh),[vh,yh]=_o(mh,[_h,bp,Hm]),bh=bp(),xh=Hm(),[Sh,Ch]=vh(mh),[wh,Th]=vh(mh),Eh=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=bh(t),[c,d]=l.useState(null),f=l.useRef(!1),p=ys(a),m=Pm(i);return l.useEffect(()=>{let e=()=>{f.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>f.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,u.jsx)(Ip,{...s,children:(0,u.jsx)(Sh,{scope:t,open:n,onOpenChange:p,content:c,onContentChange:d,children:(0,u.jsx)(wh,{scope:t,onClose:l.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:m,modal:o,children:r})})})};Eh.displayName=mh;var Dh=`MenuAnchor`,Oh=l.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=bh(n);return(0,u.jsx)(Lp,{...i,...r,ref:t})});Oh.displayName=Dh;var kh=`MenuPortal`,[Ah,jh]=vh(kh,{forceMount:void 0}),Mh=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Ch(kh,t);return(0,u.jsx)(Ah,{scope:t,forceMount:n,children:(0,u.jsx)(Do,{present:n||a.open,children:(0,u.jsx)(Zs,{asChild:!0,container:i,children:r})})})};Mh.displayName=kh;var Nh=`MenuContent`,[Ph,Fh]=vh(Nh),Ih=l.forwardRef((e,t)=>{let n=jh(Nh,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Ch(Nh,e.__scopeMenu),o=Th(Nh,e.__scopeMenu);return(0,u.jsx)(hh.Provider,{scope:e.__scopeMenu,children:(0,u.jsx)(Do,{present:r||a.open,children:(0,u.jsx)(hh.Slot,{scope:e.__scopeMenu,children:o.modal?(0,u.jsx)(Lh,{...i,ref:t}):(0,u.jsx)(Rh,{...i,ref:t})})})})}),Lh=l.forwardRef((e,t)=>{let n=Ch(Nh,e.__scopeMenu),r=l.useRef(null),i=y(t,r);return l.useEffect(()=>{let e=r.current;if(e)return vl(e)},[]),(0,u.jsx)(Bh,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Q(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Rh=l.forwardRef((e,t)=>{let n=Ch(Nh,e.__scopeMenu);return(0,u.jsx)(Bh,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),zh=nh(`MenuContent.ScrollLock`),Bh=l.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,disableOutsideScroll:g,..._}=e,v=Ch(Nh,n),b=Th(Nh,n),x=bh(n),S=xh(n),C=gh(n),[w,T]=l.useState(null),E=l.useRef(null),D=y(t,E,v.onContentChange),O=l.useRef(0),k=l.useRef(``),A=l.useRef(0),j=l.useRef(null),M=l.useRef(`right`),N=l.useRef(0),P=g?ll:l.Fragment,F=g?{as:zh,allowPinchZoom:!0}:void 0,I=e=>{let t=k.current+e,n=C().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=wg(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){k.current=t,window.clearTimeout(O.current),t!==``&&(O.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};l.useEffect(()=>()=>window.clearTimeout(O.current),[]),$s();let L=l.useCallback(e=>M.current===j.current?.side&&Eg(e,j.current?.area),[]);return(0,u.jsx)(Ph,{scope:n,searchRef:k,onItemEnter:l.useCallback(e=>{L(e)&&e.preventDefault()},[L]),onItemLeave:l.useCallback(e=>{L(e)||(E.current?.focus(),T(null))},[L]),onTriggerLeave:l.useCallback(e=>{L(e)&&e.preventDefault()},[L]),pointerGraceTimerRef:A,onPointerGraceIntentChange:l.useCallback(e=>{j.current=e},[]),children:(0,u.jsx)(P,{...F,children:(0,u.jsx)(Rs,{asChild:!0,trapped:i,onMountAutoFocus:Q(a,e=>{e.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,u.jsx)(Ds,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,children:(0,u.jsx)(eh,{asChild:!0,...S,dir:b.dir,orientation:`vertical`,loop:r,currentTabStopId:w,onCurrentTabStopIdChange:T,onEntryFocus:Q(c,e=>{b.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,u.jsx)(Rp,{role:`menu`,"aria-orientation":`vertical`,"data-state":yg(v.open),"data-radix-menu-content":``,dir:b.dir,...x,..._,ref:D,style:{outline:`none`,..._.style},onKeyDown:Q(_.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&I(e.key));let i=E.current;if(e.target!==i||!dh.includes(e.key))return;e.preventDefault();let a=C().filter(e=>!e.disabled).map(e=>e.ref.current);uh.includes(e.key)&&a.reverse(),Sg(a)}),onBlur:Q(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(O.current),k.current=``)}),onPointerMove:Q(e.onPointerMove,Dg(e=>{let t=e.target,n=N.current!==e.clientX;e.currentTarget.contains(t)&&n&&(M.current=e.clientX>N.current?`right`:`left`,N.current=e.clientX)}))})})})})})})});Ih.displayName=Nh;var Vh=`MenuGroup`,Hh=l.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,u.jsx)($.div,{role:`group`,...r,ref:t})});Hh.displayName=Vh;var Uh=`MenuLabel`,Wh=l.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,u.jsx)($.div,{...r,ref:t})});Wh.displayName=Uh;var Gh=`MenuItem`,Kh=`menu.itemSelect`,qh=l.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=l.useRef(null),o=Th(Gh,e.__scopeMenu),s=Fh(Gh,e.__scopeMenu),c=y(t,a),d=l.useRef(!1),f=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Kh,{bubbles:!0,cancelable:!0});e.addEventListener(Kh,e=>r?.(e),{once:!0}),Lo(e,t),t.defaultPrevented?d.current=!1:o.onClose()}};return(0,u.jsx)(Jh,{...i,ref:c,disabled:n,onClick:Q(e.onClick,f),onPointerDown:t=>{e.onPointerDown?.(t),d.current=!0},onPointerUp:Q(e.onPointerUp,e=>{d.current||e.currentTarget?.click()}),onKeyDown:Q(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||ch.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});qh.displayName=Gh;var Jh=l.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Fh(Gh,n),s=xh(n),c=l.useRef(null),d=y(t,c),[f,p]=l.useState(!1),[m,h]=l.useState(``);return l.useEffect(()=>{let e=c.current;e&&h((e.textContent??``).trim())},[a.children]),(0,u.jsx)(hh.ItemSlot,{scope:n,disabled:r,textValue:i??m,children:(0,u.jsx)(th,{asChild:!0,...s,focusable:!r,children:(0,u.jsx)($.div,{role:`menuitem`,"data-highlighted":f?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:d,onPointerMove:Q(e.onPointerMove,Dg(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Q(e.onPointerLeave,Dg(e=>o.onItemLeave(e))),onFocus:Q(e.onFocus,()=>p(!0)),onBlur:Q(e.onBlur,()=>p(!1))})})})}),Yh=`MenuCheckboxItem`,Xh=l.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,u.jsx)(ig,{scope:e.__scopeMenu,checked:n,children:(0,u.jsx)(qh,{role:`menuitemcheckbox`,"aria-checked":bg(n)?`mixed`:n,...i,ref:t,"data-state":xg(n),onSelect:Q(i.onSelect,()=>r?.(bg(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Xh.displayName=Yh;var Zh=`MenuRadioGroup`,[Qh,$h]=vh(Zh,{value:void 0,onValueChange:()=>{}}),eg=l.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=ys(r);return(0,u.jsx)(Qh,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,u.jsx)(Hh,{...i,ref:t})})});eg.displayName=Zh;var tg=`MenuRadioItem`,ng=l.forwardRef((e,t)=>{let{value:n,...r}=e,i=$h(tg,e.__scopeMenu),a=n===i.value;return(0,u.jsx)(ig,{scope:e.__scopeMenu,checked:a,children:(0,u.jsx)(qh,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":xg(a),onSelect:Q(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});ng.displayName=tg;var rg=`MenuItemIndicator`,[ig,ag]=vh(rg,{checked:!1}),og=l.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=ag(rg,n);return(0,u.jsx)(Do,{present:r||bg(a.checked)||a.checked===!0,children:(0,u.jsx)($.span,{...i,ref:t,"data-state":xg(a.checked)})})});og.displayName=rg;var sg=`MenuSeparator`,cg=l.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,u.jsx)($.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});cg.displayName=sg;var lg=`MenuArrow`,ug=l.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=bh(n);return(0,u.jsx)(zp,{...i,...r,ref:t})});ug.displayName=lg;var dg=`MenuSub`,[fg,pg]=vh(dg),mg=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=Ch(dg,t),o=bh(t),[s,c]=l.useState(null),[d,f]=l.useState(null),p=ys(i);return l.useEffect(()=>(a.open===!1&&p(!1),()=>p(!1)),[a.open,p]),(0,u.jsx)(Ip,{...o,children:(0,u.jsx)(Sh,{scope:t,open:r,onOpenChange:p,content:d,onContentChange:f,children:(0,u.jsx)(fg,{scope:t,contentId:vs(),triggerId:vs(),trigger:s,onTriggerChange:c,children:n})})})};mg.displayName=dg;var hg=`MenuSubTrigger`,gg=l.forwardRef((e,t)=>{let n=Ch(hg,e.__scopeMenu),r=Th(hg,e.__scopeMenu),i=pg(hg,e.__scopeMenu),a=Fh(hg,e.__scopeMenu),o=l.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,d={__scopeMenu:e.__scopeMenu},f=l.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return l.useEffect(()=>f,[f]),l.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,u.jsx)(Oh,{asChild:!0,...d,children:(0,u.jsx)(Jh,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":i.contentId,"data-state":yg(n.open),...e,ref:v(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Q(e.onPointerMove,Dg(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:Q(e.onPointerLeave,Dg(e=>{f();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Q(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||fh[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});gg.displayName=hg;var _g=`MenuSubContent`,vg=l.forwardRef((e,t)=>{let n=jh(Nh,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Ch(Nh,e.__scopeMenu),o=Th(Nh,e.__scopeMenu),s=pg(_g,e.__scopeMenu),c=l.useRef(null),d=y(t,c);return(0,u.jsx)(hh.Provider,{scope:e.__scopeMenu,children:(0,u.jsx)(Do,{present:r||a.open,children:(0,u.jsx)(hh.Slot,{scope:e.__scopeMenu,children:(0,u.jsx)(Bh,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:d,align:`start`,side:o.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{o.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:Q(e.onFocusOutside,e=>{e.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Q(e.onEscapeKeyDown,e=>{o.onClose(),e.preventDefault()}),onKeyDown:Q(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=ph[o.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),s.trigger?.focus(),e.preventDefault())})})})})})});vg.displayName=_g;function yg(e){return e?`open`:`closed`}function bg(e){return e===`indeterminate`}function xg(e){return bg(e)?`indeterminate`:e?`checked`:`unchecked`}function Sg(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Cg(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function wg(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Cg(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Tg(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Eg(e,t){return t?Tg({x:e.clientX,y:e.clientY},t):!1}function Dg(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Og=Eh,kg=Oh,Ag=Mh,jg=Ih,Mg=Hh,Ng=Wh,Pg=qh,Fg=Xh,Ig=eg,Lg=ng,Rg=og,zg=cg,Bg=ug,Vg=gg,Hg=vg,Ug=`DropdownMenu`,[Wg,Gg]=_o(Ug,[yh]),Kg=yh(),[qg,Jg]=Wg(Ug),Yg=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Kg(t),d=l.useRef(null),[f,p]=xo({prop:i,defaultProp:a??!1,onChange:o,caller:Ug});return(0,u.jsx)(qg,{scope:t,triggerId:vs(),triggerRef:d,contentId:vs(),open:f,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(e=>!e),[p]),modal:s,children:(0,u.jsx)(Og,{...c,open:f,onOpenChange:p,dir:r,modal:s,children:n})})};Yg.displayName=Ug;var Xg=`DropdownMenuTrigger`,Zg=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Jg(Xg,n),o=Kg(n);return(0,u.jsx)(kg,{asChild:!0,...o,children:(0,u.jsx)($.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:v(t,a.triggerRef),onPointerDown:Q(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:Q(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Zg.displayName=Xg;var Qg=`DropdownMenuPortal`,$g=e=>{let{__scopeDropdownMenu:t,...n}=e,r=Kg(t);return(0,u.jsx)(Ag,{...r,...n})};$g.displayName=Qg;var e_=`DropdownMenuContent`,t_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Jg(e_,n),a=Kg(n),o=l.useRef(!1);return(0,u.jsx)(jg,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:Q(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:Q(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});t_.displayName=e_;var n_=`DropdownMenuGroup`,r_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kg(n);return(0,u.jsx)(Mg,{...i,...r,ref:t})});r_.displayName=n_;var i_=`DropdownMenuLabel`,a_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kg(n);return(0,u.jsx)(Ng,{...i,...r,ref:t})});a_.displayName=i_;var o_=`DropdownMenuItem`,s_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kg(n);return(0,u.jsx)(Pg,{...i,...r,ref:t})});s_.displayName=o_;var c_=`DropdownMenuCheckboxItem`,l_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kg(n);return(0,u.jsx)(Fg,{...i,...r,ref:t})});l_.displayName=c_;var u_=`DropdownMenuRadioGroup`,d_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kg(n);return(0,u.jsx)(Ig,{...i,...r,ref:t})});d_.displayName=u_;var f_=`DropdownMenuRadioItem`,p_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kg(n);return(0,u.jsx)(Lg,{...i,...r,ref:t})});p_.displayName=f_;var m_=`DropdownMenuItemIndicator`,h_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kg(n);return(0,u.jsx)(Rg,{...i,...r,ref:t})});h_.displayName=m_;var g_=`DropdownMenuSeparator`,__=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kg(n);return(0,u.jsx)(zg,{...i,...r,ref:t})});__.displayName=g_;var v_=`DropdownMenuArrow`,y_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kg(n);return(0,u.jsx)(Bg,{...i,...r,ref:t})});y_.displayName=v_;var b_=`DropdownMenuSubTrigger`,x_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kg(n);return(0,u.jsx)(Vg,{...i,...r,ref:t})});x_.displayName=b_;var S_=`DropdownMenuSubContent`,C_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kg(n);return(0,u.jsx)(Hg,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});C_.displayName=S_;var w_=Yg;function T_({...e}){return(0,u.jsx)(w_,{"data-slot":`dropdown-menu`,...e})}function E_({label:e=`Arquivo`,accept:t=`.pdf,.xml,.png,.jpg,.jpeg`,multiple:n=!1,disabled:r,className:i,onFilesChange:a}){let o=(0,l.useId)(),[s,c]=(0,l.useState)(null),[d,f]=(0,l.useState)(!1),p=!!s?.length,m=(0,l.useCallback)(e=>{c(e),a?.(e)},[a]),h=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),f(!1),!r&&e.dataTransfer.files?.length&&m(e.dataTransfer.files)},[r,m]),g=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),r||f(!0)},[r]),_=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),f(!1)},[]),v=(0,l.useCallback)(e=>{e.target.files&&m(e.target.files)},[m]),y=()=>{r||document.getElementById(o)?.click()},b=e=>{if(!e)return``;let t={".pdf":`PDF`,".jpg":`JPG`,".jpeg":`JPEG`,".png":`PNG`,".xml":`XML`},n=e.split(`,`).map(e=>e.trim()).map(e=>t[e.toLowerCase()]??e.replace(`.`,``).toUpperCase());return n.length===1?n[0]:n.length===2?n.join(` ou `):n.slice(0,-1).join(`, `)+` ou `+n[n.length-1]};return(0,u.jsxs)(`div`,{className:q(`flex flex-col gap-2`,i),children:[(0,u.jsx)(`input`,{id:o,type:`file`,accept:t,multiple:n,disabled:r,onChange:v,className:`absolute w-px h-px p-0 -m-px overflow-hidden whitespace-nowrap border-0`,"aria-label":e}),(0,u.jsx)(`div`,{role:`button`,tabIndex:0,onClick:y,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),y())},onDrop:h,onDragOver:g,onDragLeave:_,className:q(`h-40 p-4 relative flex flex-col items-center justify-center gap-4 rounded-sm border-2 border-dashed transition-colors`,!r&&`cursor-pointer`,`bg-default hover:bg-default/80`,d&&`border-primary bg-primary/5`,p&&`border-primary bg-primary/5`,r&&`opacity-50 cursor-not-allowed`),children:p?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`div`,{className:`flex items-center justify-center size-8 rounded-sm bg-primary/10`,children:(0,u.jsx)(Mt,{className:`size-4 text-primary`})}),(0,u.jsx)(`div`,{className:`flex flex-col items-center text-center w-full px-2`,children:(0,u.jsx)(`span`,{className:`body-sm font-medium text-foreground break-all line-clamp-2`,children:s.length===1?s[0].name:`${s.length} arquivos selecionados`})})]}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`div`,{className:`flex items-center justify-center min-w-8 min-h-8 rounded-sm bg-primary/10`,children:(0,u.jsx)(Bt,{className:`min-w-4 min-h-4 text-primary`})}),(0,u.jsx)(`div`,{className:`flex flex-col items-center text-center`,children:(0,u.jsxs)(`span`,{className:`body-sm font-medium text-foreground`,children:[`Arraste e solte o arquivo aqui`,(0,u.jsx)(`br`,{}),`ou clique para selecionar`]})}),t&&(0,u.jsxs)(`span`,{className:`body-xs font-medium text-muted`,children:[`Formatos aceitos: `,b(t)]})]})})]})}var D_=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=w(`Primitive.${t}`),r=l.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,u.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),O_=`Separator`,k_=`horizontal`,A_=[`horizontal`,`vertical`],j_=l.forwardRef((e,t)=>{let{decorative:n,orientation:r=k_,...i}=e,a=M_(r)?r:k_,o=a===`vertical`?a:void 0,s=n?{role:`none`}:{"aria-orientation":o,role:`separator`};return(0,u.jsx)(D_.div,{"data-orientation":a,...s,...i,ref:t})});j_.displayName=O_;function M_(e){return A_.includes(e)}var N_=j_;function P_({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,u.jsx)(N_,{"data-slot":`separator`,decorative:n,orientation:t,className:q(`bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,e),...r})}function F_({icon:e,title:t,description:n,children:r,className:i}){return(0,u.jsxs)(lo,{className:i,children:[(0,u.jsxs)(uo,{children:[(0,u.jsx)(fo,{className:`bg-primary/10`,children:(0,u.jsx)(e,{className:`size-5 text-primary`})}),(0,u.jsxs)(`div`,{className:`flex flex-col gap-xs`,children:[(0,u.jsx)(po,{children:t}),n&&(0,u.jsx)(mo,{children:n})]})]}),(0,u.jsx)(P_,{}),(0,u.jsx)(ho,{children:r})]})}function I_({className:e,type:t,...n}){return(0,u.jsx)(`input`,{type:t,"data-slot":`input`,className:q(`text-sm h-9 w-full min-w-0 rounded-md border border-border bg-default px-2.5 py-1`,`text-foreground antialiased caret-primary`,`transition-[color,border-color,box-shadow] outline-none`,`focus-visible:border-primary focus-visible:shadow-[inset_0_0_0_1px_var(--color-primary)]`,`aria-invalid:border-destructive aria-invalid:shadow-[inset_0_0_0_1px_var(--color-destructive)]`,`disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,`file:inline-flex file:h-7 file:border-0 file:text-sm file:font-medium file:text-foreground`,e),...n})}function L_({className:e,...t}){return(0,u.jsx)(`textarea`,{"data-slot":`textarea`,className:q(`field-sizing-content text-sm min-h-16 w-full min-w-0 rounded-md border border-border bg-default px-2.5 py-1`,`text-foreground antialiased caret-primary`,`transition-[color,border-color,box-shadow] outline-none`,`focus-visible:border-primary focus-visible:shadow-[inset_0_0_0_1px_var(--color-primary)]`,`aria-invalid:border-destructive aria-invalid:shadow-[inset_0_0_0_1px_var(--color-destructive)]`,`disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,`file:inline-flex file:h-7 file:border-0 file:text-sm file:font-medium file:text-foreground`,e),...t})}function R_({className:e,...t}){return(0,u.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:q(`group/input-group relative flex w-full items-center rounded-md border border-border outline-none transition-[color,border-color,box-shadow]`,`h-9 min-w-0 has-[>textarea]:h-auto dark:bg-input/30`,`has-focus-visible:border-primary has-focus-visible:shadow-[inset_0_0_0_1px_var(--color-primary)]`,`has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:shadow-[inset_0_0_0_1px_var(--color-destructive)]`,`has-[[data-slot][aria-invalid=true]:focus-visible]:border-primary has-[[data-slot][aria-invalid=true]:focus-visible]:shadow-[inset_0_0_0_1px_var(--color-primary)]`,`has-[>[data-align=inline-start]]:[&>input]:pl-2`,`has-[>[data-align=inline-end]]:[&>input]:pr-2`,`has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3`,`has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3`,e),...t})}var z_=Object.defineProperty,B_=Object.defineProperties,V_=Object.getOwnPropertyDescriptors,H_=Object.getOwnPropertySymbols,U_=Object.prototype.hasOwnProperty,W_=Object.prototype.propertyIsEnumerable,G_=(e,t,n)=>t in e?z_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K_=(e,t)=>{for(var n in t||={})U_.call(t,n)&&G_(e,n,t[n]);if(H_)for(var n of H_(t))W_.call(t,n)&&G_(e,n,t[n]);return e},q_=(e,t)=>B_(e,V_(t)),J_=(e,t)=>{var n={};for(var r in e)U_.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&H_)for(var r of H_(e))t.indexOf(r)<0&&W_.call(e,r)&&(n[r]=e[r]);return n};function Y_(e){return[setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)]}function X_(e){let t=l.useRef();return l.useEffect(()=>{t.current=e}),t.current}var Z_=18,Q_=40,$_=`${Q_}px`,ev=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`);function tv({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[i,a]=l.useState(!1),[o,s]=l.useState(!1),[c,u]=l.useState(!1),d=l.useMemo(()=>n===`none`?!1:(n===`increase-width`||n===`experimental-no-flickering`)&&i&&o,[i,o,n]),f=l.useCallback(()=>{let r=e.current,i=t.current;if(!r||!i||c||n===`none`)return;let o=r,s=o.getBoundingClientRect().left+o.offsetWidth,l=o.getBoundingClientRect().top+o.offsetHeight/2,d=s-Z_,f=l;document.querySelectorAll(ev).length===0&&document.elementFromPoint(d,f)===r||(a(!0),u(!0))},[e,t,c,n]);return l.useEffect(()=>{let t=e.current;if(!t||n===`none`)return;function r(){s(window.innerWidth-t.getBoundingClientRect().right>=Q_)}r();let i=setInterval(r,1e3);return()=>{clearInterval(i)}},[e,n]),l.useEffect(()=>{let e=r||document.activeElement===t.current;if(n===`none`||!e)return;let i=setTimeout(f,0),a=setTimeout(f,2e3),o=setTimeout(f,5e3),s=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(i),clearTimeout(a),clearTimeout(o),clearTimeout(s)}},[t,r,n,f]),{hasPWMBadge:i,willPushPWMBadge:d,PWM_BADGE_SPACE_WIDTH:$_}}var nv=l.createContext({}),rv=l.forwardRef((e,t)=>{var n=e,{value:r,onChange:i,maxLength:a,textAlign:o=`left`,pattern:s,placeholder:c,inputMode:u=`numeric`,onComplete:d,pushPasswordManagerStrategy:f=`increase-width`,pasteTransformer:p,containerClassName:m,noScriptCSSFallback:h=av,render:g,children:_}=n,v=J_(n,[`value`,`onChange`,`maxLength`,`textAlign`,`pattern`,`placeholder`,`inputMode`,`onComplete`,`pushPasswordManagerStrategy`,`pasteTransformer`,`containerClassName`,`noScriptCSSFallback`,`render`,`children`]),y;let[b,x]=l.useState(typeof v.defaultValue==`string`?v.defaultValue:``),S=r??b,C=X_(S),w=l.useCallback(e=>{i?.(e),x(e)},[i]),T=l.useMemo(()=>s?typeof s==`string`?new RegExp(s):s:null,[s]),E=l.useRef(null),D=l.useRef(null),O=l.useRef({value:S,onChange:w,isIOS:typeof window<`u`&&((y=window==null?void 0:window.CSS)?.supports)?.call(y,`-webkit-touch-callout`,`none`)}),k=l.useRef({prev:[E.current?.selectionStart,E.current?.selectionEnd,E.current?.selectionDirection]});l.useImperativeHandle(t,()=>E.current,[]),l.useEffect(()=>{let e=E.current,t=D.current;if(!e||!t)return;O.current.value!==e.value&&O.current.onChange(e.value),k.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection];function n(){if(document.activeElement!==e){F(null),L(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,i=e.maxLength,a=e.value,o=k.current.prev,s=-1,c=-1,l;if(a.length!==0&&t!==null&&n!==null){let e=t===n,r=t===a.length&&a.length<i;if(e&&!r){let e=t;if(e===0)s=0,c=1,l=`forward`;else if(e===i)s=e-1,c=e,l=`backward`;else if(i>1&&a.length>1){let t=0;if(o[0]!==null&&o[1]!==null){l=e<o[1]?`backward`:`forward`;let n=o[0]===o[1]&&o[0]<i;l===`backward`&&!n&&(t=-1)}s=t+e,c=t+e+1}}s!==-1&&c!==-1&&s!==c&&E.current.setSelectionRange(s,c,l)}let u=s===-1?t:s,d=c===-1?n:c,f=l??r;F(u),L(d),k.current.prev=[u,d,f]}if(document.addEventListener(`selectionchange`,n,{capture:!0}),n(),document.activeElement===e&&N(!0),!document.getElementById(`input-otp-style`)){let e=document.createElement(`style`);if(e.id=`input-otp-style`,document.head.appendChild(e),e.sheet){let t=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;iv(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),iv(e.sheet,`[data-input-otp]:autofill { ${t} }`),iv(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),iv(e.sheet,`@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),iv(e.sheet,`[data-input-otp] + * { pointer-events: all !important; }`)}}let r=()=>{t&&t.style.setProperty(`--root-height`,`${e.clientHeight}px`)};r();let i=new ResizeObserver(r);return i.observe(e),()=>{document.removeEventListener(`selectionchange`,n,{capture:!0}),i.disconnect()}},[]);let[A,j]=l.useState(!1),[M,N]=l.useState(!1),[P,F]=l.useState(null),[I,L]=l.useState(null);l.useEffect(()=>{Y_(()=>{var e;(e=E.current)==null||e.dispatchEvent(new Event(`input`));let t=E.current?.selectionStart,n=E.current?.selectionEnd,r=E.current?.selectionDirection;t!==null&&n!==null&&(F(t),L(n),k.current.prev=[t,n,r])})},[S,M]),l.useEffect(()=>{C!==void 0&&S!==C&&C.length<a&&S.length===a&&d?.(S)},[a,d,C,S]);let R=tv({containerRef:D,inputRef:E,pushPasswordManagerStrategy:f,isFocused:M}),ee=l.useCallback(e=>{let t=e.currentTarget.value.slice(0,a);if(t.length>0&&T&&!T.test(t)){e.preventDefault();return}typeof C==`string`&&t.length<C.length&&document.dispatchEvent(new Event(`selectionchange`)),w(t)},[a,w,C,T]),te=l.useCallback(()=>{var e;if(E.current){let t=Math.min(E.current.value.length,a-1),n=E.current.value.length;(e=E.current)==null||e.setSelectionRange(t,n),F(t),L(n)}N(!0)},[a]),z=l.useCallback(e=>{let t=E.current;if(!p&&(!O.current.isIOS||!e.clipboardData||!t))return;let n=e.clipboardData.getData(`text/plain`),r=p?p(n):n;e.preventDefault();let i=E.current?.selectionStart,o=E.current?.selectionEnd,s=(i===o?S.slice(0,i)+r+S.slice(i):S.slice(0,i)+r+S.slice(o)).slice(0,a);if(s.length>0&&T&&!T.test(s))return;t.value=s,w(s);let c=Math.min(s.length,a-1),l=s.length;t.setSelectionRange(c,l),F(c),L(l)},[a,w,T,S]),B=l.useMemo(()=>({position:`relative`,cursor:v.disabled?`default`:`text`,userSelect:`none`,WebkitUserSelect:`none`,pointerEvents:`none`}),[v.disabled]),ne=l.useMemo(()=>({position:`absolute`,inset:0,width:R.willPushPWMBadge?`calc(100% + ${R.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:R.willPushPWMBadge?`inset(0 ${R.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:`100%`,display:`flex`,textAlign:o,opacity:`1`,color:`transparent`,pointerEvents:`all`,background:`transparent`,caretColor:`transparent`,border:`0 solid transparent`,outline:`0 solid transparent`,boxShadow:`none`,lineHeight:`1`,letterSpacing:`-.5em`,fontSize:`var(--root-height)`,fontFamily:`monospace`,fontVariantNumeric:`tabular-nums`}),[R.PWM_BADGE_SPACE_WIDTH,R.willPushPWMBadge,o]),re=l.useMemo(()=>l.createElement(`input`,q_(K_({autoComplete:v.autoComplete||`one-time-code`},v),{"data-input-otp":!0,"data-input-otp-placeholder-shown":S.length===0||void 0,"data-input-otp-mss":P,"data-input-otp-mse":I,inputMode:u,pattern:T?.source,"aria-placeholder":c,style:ne,maxLength:a,value:S,ref:E,onPaste:e=>{var t;z(e),(t=v.onPaste)==null||t.call(v,e)},onChange:ee,onMouseOver:e=>{var t;j(!0),(t=v.onMouseOver)==null||t.call(v,e)},onMouseLeave:e=>{var t;j(!1),(t=v.onMouseLeave)==null||t.call(v,e)},onFocus:e=>{var t;te(),(t=v.onFocus)==null||t.call(v,e)},onBlur:e=>{var t;N(!1),(t=v.onBlur)==null||t.call(v,e)}})),[ee,te,z,u,ne,a,I,P,v,T?.source,S]),V=l.useMemo(()=>({slots:Array.from({length:a}).map((e,t)=>{let n=M&&P!==null&&I!==null&&(P===I&&t===P||t>=P&&t<I),r=S[t]===void 0?null:S[t];return{char:r,placeholderChar:S[0]===void 0?c?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:M,isHovering:!v.disabled&&A}),[M,A,a,I,P,v.disabled,S]),ie=l.useMemo(()=>g?g(V):l.createElement(nv.Provider,{value:V},_),[_,V,g]);return l.createElement(l.Fragment,null,h!==null&&l.createElement(`noscript`,null,l.createElement(`style`,null,h)),l.createElement(`div`,{ref:D,"data-input-otp-container":!0,style:B,className:m},ie,l.createElement(`div`,{style:{position:`absolute`,inset:0,pointerEvents:`none`}},re)))});rv.displayName=`Input`;function iv(e,t){try{e.insertRule(t)}catch{console.error(`input-otp could not insert CSS rule:`,t)}}var av=`
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ru=`DialogDescriptionWarning`,iu=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${tu(ru).contentName}}.`;return l.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},au=Al,ou=Il,su=Rl,cu=Hl,lu=`[cmdk-group=""]`,uu=`[cmdk-group-items=""]`,du=`[cmdk-group-heading=""]`,fu=`[cmdk-item=""]`,pu=`${fu}:not([aria-disabled="true"])`,mu=`cmdk-item-select`,hu=`data-value`,gu=(e,t,n)=>hs(e,t,n),_u=l.createContext(void 0),vu=()=>l.useContext(_u),yu=l.createContext(void 0),bu=()=>l.useContext(yu),xu=l.createContext(void 0),Su=l.forwardRef((e,t)=>{let n=Iu(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=Iu(()=>new Set),i=Iu(()=>new Map),a=Iu(()=>new Map),o=Iu(()=>new Set),s=Pu(e),{label:c,children:u,value:d,onValueChange:f,filter:p,shouldFilter:m,loop:h,disablePointerSelection:g=!1,vimBindings:_=!0,...v}=e,y=vs(),b=vs(),x=vs(),S=l.useRef(null),C=zu();Fu(()=>{if(d!==void 0){let e=d.trim();n.current.value=e,w.emit()}},[d]),Fu(()=>{C(6,A)},[]);let w=l.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)k(),D(),C(1,O);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(y))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=j()?.id,w.emit()}),r||C(5,A),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),T=l.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,E(t,r)),C(2,()=>{D(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),C(3,()=>{k(),D(),n.current.value||O(),w.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=j();C(4,()=>{k(),t?.getAttribute(`id`)===e&&O(),w.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:y,inputId:x,labelId:b,listInnerRef:S}),[]);function E(e,t){let r=s.current?.filter??gu;return e?r(e,n.current.search,t):0}function D(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=S.current;M().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(uu);t?t.appendChild(e.parentElement===t?e:e.closest(`${uu} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${uu} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${lu}[${hu}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=M().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(hu);w.setState(`value`,e||void 0)}function k(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=E(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function A(){var e;let t=j();t&&(t.parentElement?.firstChild===t&&((e=t.closest(lu)?.querySelector(du))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function j(){return S.current?.querySelector(`${fu}[aria-selected="true"]`)}function M(){return Array.from(S.current?.querySelectorAll(pu)||[])}function N(e){let t=M()[e];t&&w.setState(`value`,t.getAttribute(hu))}function P(e){var t;let n=j(),r=M(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(hu))}function F(e){let t=j()?.closest(lu),n;for(;t&&!n;)t=e>0?Mu(t,lu):Nu(t,lu),n=t?.querySelector(pu);n?w.setState(`value`,n.getAttribute(hu)):P(e)}let I=()=>N(M().length-1),L=e=>{e.preventDefault(),e.metaKey?I():e.altKey?F(1):P(1)},R=e=>{e.preventDefault(),e.metaKey?N(0):e.altKey?F(-1):P(-1)};return l.createElement($.div,{ref:t,tabIndex:-1,...v,"cmdk-root":``,onKeyDown:e=>{var t;(t=v.onKeyDown)==null||t.call(v,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:_&&e.ctrlKey&&L(e);break;case`ArrowDown`:L(e);break;case`p`:case`k`:_&&e.ctrlKey&&R(e);break;case`ArrowUp`:R(e);break;case`Home`:e.preventDefault(),N(0);break;case`End`:e.preventDefault(),I();break;case`Enter`:{e.preventDefault();let t=j();if(t){let e=new Event(mu);t.dispatchEvent(e)}}}}},l.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:Hu},c),Vu(e,e=>l.createElement(yu.Provider,{value:w},l.createElement(_u.Provider,{value:T},e))))}),Cu=l.forwardRef((e,t)=>{let n=vs(),r=l.useRef(null),i=l.useContext(xu),a=vu(),o=Pu(e),s=o.current?.forceMount??i?.forceMount;Fu(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=Ru(n,r,[e.value,e.children,r],e.keywords),u=bu(),d=Lu(e=>e.value&&e.value===c.current),f=Lu(e=>s||a.filter()===!1?!0:e.search?e.filtered.items.get(n)>0:!0);l.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(mu,p),()=>t.removeEventListener(mu,p)},[f,e.onSelect,e.disabled]);function p(){var e,t;m(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function m(){u.setState(`value`,c.current,!0)}if(!f)return null;let{disabled:h,value:g,onSelect:_,forceMount:y,keywords:b,...x}=e;return l.createElement($.div,{ref:v(r,t),...x,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!h,"aria-selected":!!d,"data-disabled":!!h,"data-selected":!!d,onPointerMove:h||a.getDisablePointerSelection()?void 0:m,onClick:h?void 0:p},e.children)}),wu=l.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=vs(),s=l.useRef(null),c=l.useRef(null),u=vs(),d=vu(),f=Lu(e=>i||d.filter()===!1?!0:e.search?e.filtered.groups.has(o):!0);Fu(()=>d.group(o),[]),Ru(o,s,[e.value,e.heading,c]);let p=l.useMemo(()=>({id:o,forceMount:i}),[i]);return l.createElement($.div,{ref:v(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:f?void 0:!0},n&&l.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:u},n),Vu(e,e=>l.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?u:void 0},l.createElement(xu.Provider,{value:p},e))))}),Tu=l.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=l.useRef(null),a=Lu(e=>!e.search);return!n&&!a?null:l.createElement($.div,{ref:v(i,t),...r,"cmdk-separator":``,role:`separator`})}),Eu=l.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=bu(),o=Lu(e=>e.search),s=Lu(e=>e.selectedItemId),c=vu();return l.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),l.createElement($.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),Du=l.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=l.useRef(null),o=l.useRef(null),s=Lu(e=>e.selectedItemId),c=vu();return l.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),l.createElement($.div,{ref:v(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},Vu(e,e=>l.createElement(`div`,{ref:v(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),Ou=l.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return l.createElement(au,{open:n,onOpenChange:r},l.createElement(ou,{container:o},l.createElement(su,{"cmdk-overlay":``,className:i}),l.createElement(cu,{"aria-label":e.label,"cmdk-dialog":``,className:a},l.createElement(Su,{ref:t,...s}))))}),ku=l.forwardRef((e,t)=>Lu(e=>e.filtered.count===0)?l.createElement($.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),Au=l.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return l.createElement($.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Vu(e,e=>l.createElement(`div`,{"aria-hidden":!0},e)))}),ju=Object.assign(Su,{List:Du,Item:Cu,Input:Eu,Group:wu,Separator:Tu,Dialog:Ou,Empty:ku,Loading:Au});function Mu(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Nu(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Pu(e){let t=l.useRef(e);return Fu(()=>{t.current=e}),t}var Fu=typeof window>`u`?l.useEffect:l.useLayoutEffect;function Iu(e){let t=l.useRef();return t.current===void 0&&(t.current=e()),t}function Lu(e){let t=bu(),n=()=>e(t.snapshot());return l.useSyncExternalStore(t.subscribe,n,n)}function Ru(e,t,n,r=[]){let i=l.useRef(),a=vu();return Fu(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(hu,s),i.current=s}),i}var zu=()=>{let[e,t]=l.useState(),n=Iu(()=>new Map);return Fu(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function Bu(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function Vu({asChild:e,children:t},n){return e&&l.isValidElement(t)?l.cloneElement(Bu(t),{ref:t.ref},n(t.props.children)):n(t)}var Hu={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},Uu=au;function Wu({className:e,...t}){return(0,u.jsx)(ju,{"data-slot":`command`,className:q(`bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...t})}function Gu({className:e,...t}){return(0,u.jsxs)(`div`,{"data-slot":`command-input-wrapper`,className:`flex h-9 items-center gap-2 border-b px-3`,children:[(0,u.jsx)(It,{className:`size-4 shrink-0 opacity-50`}),(0,u.jsx)(ju.Input,{"data-slot":`command-input`,className:q(`placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]})}function Ku({className:e,...t}){return(0,u.jsx)(ju.List,{"data-slot":`command-list`,className:q(`max-h-75 scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function qu({...e}){return(0,u.jsx)(ju.Empty,{"data-slot":`command-empty`,className:`py-6 text-center text-sm`,...e})}function Ju({className:e,...t}){return(0,u.jsx)(ju.Group,{"data-slot":`command-group`,className:q(`text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium`,e),...t})}function Yu({className:e,...t}){return(0,u.jsx)(ju.Separator,{"data-slot":`command-separator`,className:q(`bg-border -mx-1 h-px`,e),...t})}function Xu({className:e,...t}){return(0,u.jsx)(ju.Item,{"data-slot":`command-item`,className:q(`data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...t})}var Zu=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=w(`Primitive.${t}`),r=l.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,u.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Qu=`Label`,$u=l.forwardRef((e,t)=>(0,u.jsx)(Zu.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));$u.displayName=Qu;var ed=$u;function td({className:e,...t}){return(0,u.jsx)(ed,{"data-slot":`label`,className:q(`body-md font-medium flex items-center gap-1 leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}var nd=[`top`,`right`,`bottom`,`left`],rd=Math.min,id=Math.max,ad=Math.round,od=Math.floor,sd=e=>({x:e,y:e}),cd={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function ld(e,t,n){return id(e,rd(t,n))}function ud(e,t){return typeof e==`function`?e(t):e}function dd(e){return e.split(`-`)[0]}function fd(e){return e.split(`-`)[1]}function pd(e){return e===`x`?`y`:`x`}function md(e){return e===`y`?`height`:`width`}function hd(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function gd(e){return pd(hd(e))}function _d(e,t,n){n===void 0&&(n=!1);let r=fd(e),i=gd(e),a=md(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ed(o)),[o,Ed(o)]}function vd(e){let t=Ed(e);return[yd(e),t,yd(t)]}function yd(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var bd=[`left`,`right`],xd=[`right`,`left`],Sd=[`top`,`bottom`],Cd=[`bottom`,`top`];function wd(e,t,n){switch(e){case`top`:case`bottom`:return n?t?xd:bd:t?bd:xd;case`left`:case`right`:return t?Sd:Cd;default:return[]}}function Td(e,t,n,r){let i=fd(e),a=wd(dd(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(yd)))),a}function Ed(e){let t=dd(e);return cd[t]+e.slice(t.length)}function Dd(e){return{top:0,right:0,bottom:0,left:0,...e}}function Od(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Dd(e)}function kd(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Ad(e,t,n){let{reference:r,floating:i}=e,a=hd(t),o=gd(t),s=md(o),c=dd(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(fd(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function jd(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=ud(t,e),p=Od(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=kd(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=kd(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Md=50,Nd=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:jd},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ad(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Md&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Ad(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Pd=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=ud(e,t)||{};if(l==null)return{};let d=Od(u),f={x:n,y:r},p=gd(i),m=md(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=rd(d[_],T),D=rd(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=ld(O,A,k),M=!c.arrow&&fd(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),Fd=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=ud(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=dd(r),_=hd(o),v=dd(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Ed(o)]:vd(o)),x=p!==`none`;!d&&x&&b.push(...Td(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=_d(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==hd(t))||T.every(e=>hd(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=hd(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Id(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ld(e){return nd.some(t=>e[t]>=0)}var Rd=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=ud(e,t);switch(i){case`referenceHidden`:{let e=Id(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ld(e)}}}case`escaped`:{let e=Id(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ld(e)}}}default:return{}}}}},zd=new Set([`left`,`top`]);async function Bd(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=dd(n),s=fd(n),c=hd(n)===`y`,l=zd.has(o)?-1:1,u=a&&c?-1:1,d=ud(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Vd=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Bd(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Hd=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ud(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=hd(dd(i)),p=pd(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=ld(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=ld(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Ud=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=ud(e,t),u={x:n,y:r},d=hd(i),f=pd(d),p=u[f],m=u[d],h=ud(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=zd.has(dd(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Wd=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=ud(e,t),u=await o.detectOverflow(t,l),d=dd(i),f=fd(i),p=hd(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=rd(h-u[g],v),x=rd(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=id(u.left,0),t=id(u.right,0),n=id(u.top,0),r=id(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:id(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:id(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Gd(){return typeof window<`u`}function Kd(e){return Yd(e)?(e.nodeName||``).toLowerCase():`#document`}function qd(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jd(e){return((Yd(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Yd(e){return Gd()?e instanceof Node||e instanceof qd(e).Node:!1}function Xd(e){return Gd()?e instanceof Element||e instanceof qd(e).Element:!1}function Zd(e){return Gd()?e instanceof HTMLElement||e instanceof qd(e).HTMLElement:!1}function Qd(e){return!Gd()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof qd(e).ShadowRoot}function $d(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=df(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ef(e){return/^(table|td|th)$/.test(Kd(e))}function tf(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var nf=/transform|translate|scale|rotate|perspective|filter/,rf=/paint|layout|strict|content/,af=e=>!!e&&e!==`none`,of;function sf(e){let t=Xd(e)?df(e):e;return af(t.transform)||af(t.translate)||af(t.scale)||af(t.rotate)||af(t.perspective)||!lf()&&(af(t.backdropFilter)||af(t.filter))||nf.test(t.willChange||``)||rf.test(t.contain||``)}function cf(e){let t=pf(e);for(;Zd(t)&&!uf(t);){if(sf(t))return t;if(tf(t))return null;t=pf(t)}return null}function lf(){return of??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),of}function uf(e){return/^(html|body|#document)$/.test(Kd(e))}function df(e){return qd(e).getComputedStyle(e)}function ff(e){return Xd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pf(e){if(Kd(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Qd(e)&&e.host||Jd(e);return Qd(t)?t.host:t}function mf(e){let t=pf(e);return uf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zd(t)&&$d(t)?t:mf(t)}function hf(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=mf(e),i=r===e.ownerDocument?.body,a=qd(r);if(i){let e=gf(a);return t.concat(a,a.visualViewport||[],$d(r)?r:[],e&&n?hf(e):[])}else return t.concat(r,hf(r,[],n))}function gf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _f(e){let t=df(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Zd(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ad(n)!==a||ad(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function vf(e){return Xd(e)?e:e.contextElement}function yf(e){let t=vf(e);if(!Zd(t))return sd(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=_f(t),o=(a?ad(n.width):n.width)/r,s=(a?ad(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var bf=sd(0);function xf(e){let t=qd(e);return!lf()||!t.visualViewport?bf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Sf(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qd(e)?!1:t}function Cf(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=vf(e),o=sd(1);t&&(r?Xd(r)&&(o=yf(r)):o=yf(e));let s=Sf(a,n,r)?xf(a):sd(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=qd(a),t=r&&Xd(r)?qd(r):r,n=e,i=gf(n);for(;i&&r&&t!==n;){let e=yf(i),t=i.getBoundingClientRect(),r=df(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=qd(i),i=gf(n)}}return kd({width:u,height:d,x:c,y:l})}function wf(e,t){let n=ff(e).scrollLeft;return t?t.left+n:Cf(Jd(e)).left+n}function Tf(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-wf(e,n),y:n.top+t.scrollTop}}function Ef(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Jd(r),s=t?tf(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=sd(1),u=sd(0),d=Zd(r);if((d||!d&&!a)&&((Kd(r)!==`body`||$d(o))&&(c=ff(r)),d)){let e=Cf(r);l=yf(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Tf(o,c):sd(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Df(e){return Array.from(e.getClientRects())}function Of(e){let t=Jd(e),n=ff(e),r=e.ownerDocument.body,i=id(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=id(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+wf(e),s=-n.scrollTop;return df(r).direction===`rtl`&&(o+=id(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var kf=25;function Af(e,t){let n=qd(e),r=Jd(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=lf();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=wf(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=kf&&(a-=o)}else l<=kf&&(a+=l);return{width:a,height:o,x:s,y:c}}function jf(e,t){let n=Cf(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Zd(e)?yf(e):sd(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Mf(e,t,n){let r;if(t===`viewport`)r=Af(e,n);else if(t===`document`)r=Of(Jd(e));else if(Xd(t))r=jf(t,n);else{let n=xf(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return kd(r)}function Nf(e,t){let n=pf(e);return n===t||!Xd(n)||uf(n)?!1:df(n).position===`fixed`||Nf(n,t)}function Pf(e,t){let n=t.get(e);if(n)return n;let r=hf(e,[],!1).filter(e=>Xd(e)&&Kd(e)!==`body`),i=null,a=df(e).position===`fixed`,o=a?pf(e):e;for(;Xd(o)&&!uf(o);){let t=df(o),n=sf(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||$d(o)&&!n&&Nf(e,o))?r=r.filter(e=>e!==o):i=t,o=pf(o)}return t.set(e,r),r}function Ff(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?tf(t)?[]:Pf(t,this._c):[].concat(n),r],o=Mf(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Mf(t,a[e],i);s=id(n.top,s),c=rd(n.right,c),l=rd(n.bottom,l),u=id(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function If(e){let{width:t,height:n}=_f(e);return{width:t,height:n}}function Lf(e,t,n){let r=Zd(t),i=Jd(t),a=n===`fixed`,o=Cf(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=sd(0);function l(){c.x=wf(i)}if(r||!r&&!a)if((Kd(t)!==`body`||$d(i))&&(s=ff(t)),r){let e=Cf(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Tf(i,s):sd(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Rf(e){return df(e).position===`static`}function zf(e,t){if(!Zd(e)||df(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Jd(e)===n&&(n=n.ownerDocument.body),n}function Bf(e,t){let n=qd(e);if(tf(e))return n;if(!Zd(e)){let t=pf(e);for(;t&&!uf(t);){if(Xd(t)&&!Rf(t))return t;t=pf(t)}return n}let r=zf(e,t);for(;r&&ef(r)&&Rf(r);)r=zf(r,t);return r&&uf(r)&&Rf(r)&&!sf(r)?n:r||cf(e)||n}var Vf=async function(e){let t=this.getOffsetParent||Bf,n=this.getDimensions,r=await n(e.floating);return{reference:Lf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Hf(e){return df(e).direction===`rtl`}var Uf={convertOffsetParentRelativeRectToViewportRelativeRect:Ef,getDocumentElement:Jd,getClippingRect:Ff,getOffsetParent:Bf,getElementRects:Vf,getClientRects:Df,getDimensions:If,getScale:yf,isElement:Xd,isRTL:Hf};function Wf(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Gf(e,t){let n=null,r,i=Jd(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=od(d),h=od(i.clientWidth-(u+f)),g=od(i.clientHeight-(d+p)),_=od(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:id(0,rd(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Wf(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Kf(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=vf(e),u=i||a?[...l?hf(l):[],...t?hf(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Gf(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Cf(e):null;c&&g();function g(){let t=Cf(e);h&&!Wf(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var qf=Vd,Jf=Hd,Yf=Fd,Xf=Wd,Zf=Rd,Qf=Pd,$f=Ud,ep=(e,t,n)=>{let r=new Map,i={platform:Uf,...n},a={...i.platform,_c:r};return Nd(e,t,{...i,platform:a})},tp=typeof document<`u`?l.useLayoutEffect:function(){};function np(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!np(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!np(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function rp(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ip(e,t){let n=rp(e);return Math.round(t*n)/n}function ap(e){let t=l.useRef(e);return tp(()=>{t.current=e}),t}function op(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[f,p]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=l.useState(r);np(m,r)||h(r);let[g,_]=l.useState(null),[v,y]=l.useState(null),b=l.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=l.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),S=a||g,C=o||v,w=l.useRef(null),T=l.useRef(null),E=l.useRef(f),D=c!=null,O=ap(c),k=ap(i),A=ap(u),j=l.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:m};k.current&&(e.platform=k.current),ep(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!np(E.current,t)&&(E.current=t,d.flushSync(()=>{p(t)}))})},[m,t,n,k,A]);tp(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[u]);let M=l.useRef(!1);tp(()=>(M.current=!0,()=>{M.current=!1}),[]),tp(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let N=l.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),P=l.useMemo(()=>({reference:S,floating:C}),[S,C]),F=l.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=ip(P.floating,f.x),r=ip(P.floating,f.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...rp(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,P.floating,f.x,f.y]);return l.useMemo(()=>({...f,update:j,refs:N,elements:P,floatingStyles:F}),[f,j,N,P,F])}var sp=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Qf({element:r.current,padding:i}).fn(n):r?Qf({element:r,padding:i}).fn(n):{}}}},cp=(e,t)=>{let n=qf(e);return{name:n.name,fn:n.fn,options:[e,t]}},lp=(e,t)=>{let n=Jf(e);return{name:n.name,fn:n.fn,options:[e,t]}},up=(e,t)=>({fn:$f(e).fn,options:[e,t]}),dp=(e,t)=>{let n=Yf(e);return{name:n.name,fn:n.fn,options:[e,t]}},fp=(e,t)=>{let n=Xf(e);return{name:n.name,fn:n.fn,options:[e,t]}},pp=(e,t)=>{let n=Zf(e);return{name:n.name,fn:n.fn,options:[e,t]}},mp=(e,t)=>{let n=sp(e);return{name:n.name,fn:n.fn,options:[e,t]}},hp=`Arrow`,gp=l.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,u.jsx)($.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,u.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});gp.displayName=hp;var _p=gp,vp=`Popper`,[yp,bp]=_o(vp),[xp,Sp]=yp(vp),Cp=e=>{let{__scopePopper:t,children:n}=e,[r,i]=l.useState(null);return(0,u.jsx)(xp,{scope:t,anchor:r,onAnchorChange:i,children:n})};Cp.displayName=vp;var wp=`PopperAnchor`,Tp=l.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Sp(wp,n),o=l.useRef(null),s=y(t,o),c=l.useRef(null);return l.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,u.jsx)($.div,{...i,ref:s})});Tp.displayName=wp;var Ep=`PopperContent`,[Dp,Op]=yp(Ep),kp=l.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p=`partial`,hideWhenDetached:m=!1,updatePositionStrategy:h=`optimized`,onPlaced:g,..._}=e,v=Sp(Ep,n),[b,x]=l.useState(null),S=y(t,e=>x(e)),[C,w]=l.useState(null),T=To(C),E=T?.width??0,D=T?.height??0,O=r+(a===`center`?``:`-`+a),k=typeof f==`number`?f:{top:0,right:0,bottom:0,left:0,...f},A=Array.isArray(d)?d:[d],j=A.length>0,M={padding:k,boundary:A.filter(Np),altBoundary:j},{refs:N,floatingStyles:P,placement:F,isPositioned:I,middlewareData:L}=op({strategy:`fixed`,placement:O,whileElementsMounted:(...e)=>Kf(...e,{animationFrame:h===`always`}),elements:{reference:v.anchor},middleware:[cp({mainAxis:i+D,alignmentAxis:o}),c&&lp({mainAxis:!0,crossAxis:!1,limiter:p===`partial`?up():void 0,...M}),c&&dp({...M}),fp({...M,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),C&&mp({element:C,padding:s}),Pp({arrowWidth:E,arrowHeight:D}),m&&pp({strategy:`referenceHidden`,...M})]}),[R,ee]=Fp(F),te=ys(g);yo(()=>{I&&te?.()},[I,te]);let z=L.arrow?.x,B=L.arrow?.y,ne=L.arrow?.centerOffset!==0,[re,V]=l.useState();return yo(()=>{b&&V(window.getComputedStyle(b).zIndex)},[b]),(0,u.jsx)(`div`,{ref:N.setFloating,"data-radix-popper-content-wrapper":``,style:{...P,transform:I?P.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:re,"--radix-popper-transform-origin":[L.transformOrigin?.x,L.transformOrigin?.y].join(` `),...L.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,u.jsx)(Dp,{scope:n,placedSide:R,onArrowChange:w,arrowX:z,arrowY:B,shouldHideArrow:ne,children:(0,u.jsx)($.div,{"data-side":R,"data-align":ee,..._,ref:S,style:{..._.style,animation:I?void 0:`none`}})})})});kp.displayName=Ep;var Ap=`PopperArrow`,jp={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Mp=l.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Op(Ap,n),a=jp[i.placedSide];return(0,u.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,u.jsx)(_p,{...r,ref:t,style:{...r.style,display:`block`}})})});Mp.displayName=Ap;function Np(e){return e!==null}var Pp=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Fp(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Fp(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Ip=Cp,Lp=Tp,Rp=kp,zp=Mp;function Bp(e){let t=Vp(e),n=l.forwardRef((e,n)=>{let{children:r,...i}=e,a=l.Children.toArray(r),o=a.find(Up);if(o){let e=o.props.children,r=a.map(t=>t===o?l.Children.count(e)>1?l.Children.only(null):l.isValidElement(e)?e.props.children:null:t);return(0,u.jsx)(t,{...i,ref:n,children:l.isValidElement(e)?l.cloneElement(e,void 0,r):null})}return(0,u.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Vp(e){let t=l.forwardRef((e,t)=>{let{children:n,...r}=e;if(l.isValidElement(n)){let e=Gp(n),i=Wp(r,n.props);return n.type!==l.Fragment&&(i.ref=t?v(t,e):e),l.cloneElement(n,i)}return l.Children.count(n)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Hp=Symbol(`radix.slottable`);function Up(e){return l.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Hp}function Wp(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Gp(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Kp=`Popover`,[qp,Jp]=_o(Kp,[bp]),Yp=bp(),[Xp,Zp]=qp(Kp),Qp=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=Yp(t),c=l.useRef(null),[d,f]=l.useState(!1),[p,m]=xo({prop:r,defaultProp:i??!1,onChange:a,caller:Kp});return(0,u.jsx)(Ip,{...s,children:(0,u.jsx)(Xp,{scope:t,contentId:vs(),triggerRef:c,open:p,onOpenChange:m,onOpenToggle:l.useCallback(()=>m(e=>!e),[m]),hasCustomAnchor:d,onCustomAnchorAdd:l.useCallback(()=>f(!0),[]),onCustomAnchorRemove:l.useCallback(()=>f(!1),[]),modal:o,children:n})})};Qp.displayName=Kp;var $p=`PopoverAnchor`,em=l.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Zp($p,n),a=Yp(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return l.useEffect(()=>(o(),()=>s()),[o,s]),(0,u.jsx)(Lp,{...a,...r,ref:t})});em.displayName=$p;var tm=`PopoverTrigger`,nm=l.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Zp(tm,n),a=Yp(n),o=y(t,i.triggerRef),s=(0,u.jsx)($.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":_m(i.open),...r,ref:o,onClick:Q(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,u.jsx)(Lp,{asChild:!0,...a,children:s})});nm.displayName=tm;var rm=`PopoverPortal`,[im,am]=qp(rm,{forceMount:void 0}),om=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=Zp(rm,t);return(0,u.jsx)(im,{scope:t,forceMount:n,children:(0,u.jsx)(Do,{present:n||a.open,children:(0,u.jsx)(Zs,{asChild:!0,container:i,children:r})})})};om.displayName=rm;var sm=`PopoverContent`,cm=l.forwardRef((e,t)=>{let n=am(sm,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=Zp(sm,e.__scopePopover);return(0,u.jsx)(Do,{present:r||a.open,children:a.modal?(0,u.jsx)(um,{...i,ref:t}):(0,u.jsx)(dm,{...i,ref:t})})});cm.displayName=sm;var lm=Bp(`PopoverContent.RemoveScroll`),um=l.forwardRef((e,t)=>{let n=Zp(sm,e.__scopePopover),r=l.useRef(null),i=y(t,r),a=l.useRef(!1);return l.useEffect(()=>{let e=r.current;if(e)return vl(e)},[]),(0,u.jsx)(ll,{as:lm,allowPinchZoom:!0,children:(0,u.jsx)(fm,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Q(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Q(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:Q(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),dm=l.forwardRef((e,t)=>{let n=Zp(sm,e.__scopePopover),r=l.useRef(!1),i=l.useRef(!1);return(0,u.jsx)(fm,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),fm=l.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:d,...f}=e,p=Zp(sm,n),m=Yp(n);return $s(),(0,u.jsx)(Rs,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,u.jsx)(Ds,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:d,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>p.onOpenChange(!1),children:(0,u.jsx)(Rp,{"data-state":_m(p.open),role:`dialog`,id:p.contentId,...m,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),pm=`PopoverClose`,mm=l.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Zp(pm,n);return(0,u.jsx)($.button,{type:`button`,...r,ref:t,onClick:Q(e.onClick,()=>i.onOpenChange(!1))})});mm.displayName=pm;var hm=`PopoverArrow`,gm=l.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Yp(n);return(0,u.jsx)(zp,{...i,...r,ref:t})});gm.displayName=hm;function _m(e){return e?`open`:`closed`}var vm=Qp,ym=nm,bm=om,xm=cm;function Sm({...e}){return(0,u.jsx)(vm,{"data-slot":`popover`,...e})}function Cm({...e}){return(0,u.jsx)(ym,{"data-slot":`popover-trigger`,...e})}function wm({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,u.jsx)(bm,{children:(0,u.jsx)(xm,{"data-slot":`popover-content`,align:t,sideOffset:n,className:q(`bg-input text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg border p-3 shadow-md outline-hidden`,e),...r})})}function Tm({label:e,required:t,value:n,onChange:r}){let[i,a]=(0,l.useState)(n),o=n===void 0?i:n,s=e=>{r?r(e):a(e)};return(0,u.jsxs)(`div`,{className:`mx-auto w-full sm:w-44 flex flex-col gap-1`,children:[(0,u.jsxs)(td,{htmlFor:`date-picker-simple`,className:`label-md`,children:[e,` `,t&&(0,u.jsx)(`span`,{className:`text-destructive`,children:`*`})]}),(0,u.jsxs)(Sm,{children:[(0,u.jsx)(Cm,{asChild:!0,children:(0,u.jsx)(qt,{variant:`outline`,id:`date-picker-simple`,className:`w-full justify-start px-2.5 font-normal`,children:o?Mr(o,`dd/MM/yyyy`,{locale:Sn}):(0,u.jsx)(`span`,{className:`text-muted`,children:`Selecione a data`})})}),(0,u.jsx)(wm,{className:`w-auto p-0`,align:`start`,children:(0,u.jsx)(so,{mode:`single`,selected:o,defaultMonth:o,captionLayout:`dropdown`,onSelect:e=>{s(e)}})})]})]})}function Em(e){let t=Dm(e),n=l.forwardRef((e,n)=>{let{children:r,...i}=e,a=l.Children.toArray(r),o=a.find(km);if(o){let e=o.props.children,r=a.map(t=>t===o?l.Children.count(e)>1?l.Children.only(null):l.isValidElement(e)?e.props.children:null:t);return(0,u.jsx)(t,{...i,ref:n,children:l.isValidElement(e)?l.cloneElement(e,void 0,r):null})}return(0,u.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Dm(e){let t=l.forwardRef((e,t)=>{let{children:n,...r}=e;if(l.isValidElement(n)){let e=jm(n),i=Am(r,n.props);return n.type!==l.Fragment&&(i.ref=t?v(t,e):e),l.cloneElement(n,i)}return l.Children.count(n)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Om=Symbol(`radix.slottable`);function km(e){return l.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Om}function Am(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function jm(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Mm(e){let t=e+`CollectionProvider`,[n,r]=_o(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=l.default.useRef(null),a=l.default.useRef(new Map).current;return(0,u.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Em(s),d=l.default.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,u.jsx)(c,{ref:y(t,a(s,n).collectionRef),children:r})});d.displayName=s;let f=e+`CollectionItemSlot`,p=`data-radix-collection-item`,m=Em(f),h=l.default.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=l.default.useRef(null),s=y(t,o),c=a(f,n);return l.default.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,u.jsx)(m,{[p]:``,ref:s,children:r})});h.displayName=f;function g(t){let n=a(e+`CollectionConsumer`,t);return l.default.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:d,ItemSlot:h},g,r]}var Nm=l.createContext(void 0);function Pm(e){let t=l.useContext(Nm);return e||t||`ltr`}var Fm=`rovingFocusGroup.onEntryFocus`,Im={bubbles:!1,cancelable:!0},Lm=`RovingFocusGroup`,[Rm,zm,Bm]=Mm(Lm),[Vm,Hm]=_o(Lm,[Bm]),[Um,Wm]=Vm(Lm),Gm=l.forwardRef((e,t)=>(0,u.jsx)(Rm.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(Rm.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(Km,{...e,ref:t})})}));Gm.displayName=Lm;var Km=l.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,m=l.useRef(null),h=y(t,m),g=Pm(a),[_,v]=xo({prop:o,defaultProp:s??null,onChange:c,caller:Lm}),[b,x]=l.useState(!1),S=ys(d),C=zm(n),w=l.useRef(!1),[T,E]=l.useState(0);return l.useEffect(()=>{let e=m.current;if(e)return e.addEventListener(Fm,S),()=>e.removeEventListener(Fm,S)},[S]),(0,u.jsx)(Um,{scope:n,orientation:r,dir:g,loop:i,currentTabStopId:_,onItemFocus:l.useCallback(e=>v(e),[v]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>E(e=>e+1),[]),onFocusableItemRemove:l.useCallback(()=>E(e=>e-1),[]),children:(0,u.jsx)($.div,{tabIndex:b||T===0?-1:0,"data-orientation":r,...p,ref:h,style:{outline:`none`,...e.style},onMouseDown:Q(e.onMouseDown,()=>{w.current=!0}),onFocus:Q(e.onFocus,e=>{let t=!w.current;if(e.target===e.currentTarget&&t&&!b){let t=new CustomEvent(Fm,Im);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=C().filter(e=>e.focusable);Qm([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current),f)}}w.current=!1}),onBlur:Q(e.onBlur,()=>x(!1))})})}),qm=`RovingFocusGroupItem`,Jm=l.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=vs(),d=a||c,f=Wm(qm,n),p=f.currentTabStopId===d,m=zm(n),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:_}=f;return l.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),(0,u.jsx)(Rm.ItemSlot,{scope:n,id:d,focusable:r,active:i,children:(0,u.jsx)($.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:Q(e.onMouseDown,e=>{r?f.onItemFocus(d):e.preventDefault()}),onFocus:Q(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:Q(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){f.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Zm(e,f.orientation,f.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=m().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=f.loop?$m(n,r+1):n.slice(r+1)}setTimeout(()=>Qm(n))}}),children:typeof o==`function`?o({isCurrentTabStop:p,hasTabStop:_!=null}):o})})});Jm.displayName=qm;var Ym={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Xm(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Zm(e,t,n){let r=Xm(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Ym[r]}function Qm(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function $m(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var eh=Gm,th=Jm;function nh(e){let t=rh(e),n=l.forwardRef((e,n)=>{let{children:r,...i}=e,a=l.Children.toArray(r),o=a.find(ah);if(o){let e=o.props.children,r=a.map(t=>t===o?l.Children.count(e)>1?l.Children.only(null):l.isValidElement(e)?e.props.children:null:t);return(0,u.jsx)(t,{...i,ref:n,children:l.isValidElement(e)?l.cloneElement(e,void 0,r):null})}return(0,u.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function rh(e){let t=l.forwardRef((e,t)=>{let{children:n,...r}=e;if(l.isValidElement(n)){let e=sh(n),i=oh(r,n.props);return n.type!==l.Fragment&&(i.ref=t?v(t,e):e),l.cloneElement(n,i)}return l.Children.count(n)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ih=Symbol(`radix.slottable`);function ah(e){return l.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===ih}function oh(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function sh(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ch=[`Enter`,` `],lh=[`ArrowDown`,`PageUp`,`Home`],uh=[`ArrowUp`,`PageDown`,`End`],dh=[...lh,...uh],fh={ltr:[...ch,`ArrowRight`],rtl:[...ch,`ArrowLeft`]},ph={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},mh=`Menu`,[hh,gh,_h]=Mm(mh),[vh,yh]=_o(mh,[_h,bp,Hm]),bh=bp(),xh=Hm(),[Sh,Ch]=vh(mh),[wh,Th]=vh(mh),Eh=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=bh(t),[c,d]=l.useState(null),f=l.useRef(!1),p=ys(a),m=Pm(i);return l.useEffect(()=>{let e=()=>{f.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>f.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,u.jsx)(Ip,{...s,children:(0,u.jsx)(Sh,{scope:t,open:n,onOpenChange:p,content:c,onContentChange:d,children:(0,u.jsx)(wh,{scope:t,onClose:l.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:m,modal:o,children:r})})})};Eh.displayName=mh;var Dh=`MenuAnchor`,Oh=l.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=bh(n);return(0,u.jsx)(Lp,{...i,...r,ref:t})});Oh.displayName=Dh;var kh=`MenuPortal`,[Ah,jh]=vh(kh,{forceMount:void 0}),Mh=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Ch(kh,t);return(0,u.jsx)(Ah,{scope:t,forceMount:n,children:(0,u.jsx)(Do,{present:n||a.open,children:(0,u.jsx)(Zs,{asChild:!0,container:i,children:r})})})};Mh.displayName=kh;var Nh=`MenuContent`,[Ph,Fh]=vh(Nh),Ih=l.forwardRef((e,t)=>{let n=jh(Nh,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Ch(Nh,e.__scopeMenu),o=Th(Nh,e.__scopeMenu);return(0,u.jsx)(hh.Provider,{scope:e.__scopeMenu,children:(0,u.jsx)(Do,{present:r||a.open,children:(0,u.jsx)(hh.Slot,{scope:e.__scopeMenu,children:o.modal?(0,u.jsx)(Lh,{...i,ref:t}):(0,u.jsx)(Rh,{...i,ref:t})})})})}),Lh=l.forwardRef((e,t)=>{let n=Ch(Nh,e.__scopeMenu),r=l.useRef(null),i=y(t,r);return l.useEffect(()=>{let e=r.current;if(e)return vl(e)},[]),(0,u.jsx)(Bh,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Q(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Rh=l.forwardRef((e,t)=>{let n=Ch(Nh,e.__scopeMenu);return(0,u.jsx)(Bh,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),zh=nh(`MenuContent.ScrollLock`),Bh=l.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,disableOutsideScroll:g,..._}=e,v=Ch(Nh,n),b=Th(Nh,n),x=bh(n),S=xh(n),C=gh(n),[w,T]=l.useState(null),E=l.useRef(null),D=y(t,E,v.onContentChange),O=l.useRef(0),k=l.useRef(``),A=l.useRef(0),j=l.useRef(null),M=l.useRef(`right`),N=l.useRef(0),P=g?ll:l.Fragment,F=g?{as:zh,allowPinchZoom:!0}:void 0,I=e=>{let t=k.current+e,n=C().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=wg(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){k.current=t,window.clearTimeout(O.current),t!==``&&(O.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};l.useEffect(()=>()=>window.clearTimeout(O.current),[]),$s();let L=l.useCallback(e=>M.current===j.current?.side&&Eg(e,j.current?.area),[]);return(0,u.jsx)(Ph,{scope:n,searchRef:k,onItemEnter:l.useCallback(e=>{L(e)&&e.preventDefault()},[L]),onItemLeave:l.useCallback(e=>{L(e)||(E.current?.focus(),T(null))},[L]),onTriggerLeave:l.useCallback(e=>{L(e)&&e.preventDefault()},[L]),pointerGraceTimerRef:A,onPointerGraceIntentChange:l.useCallback(e=>{j.current=e},[]),children:(0,u.jsx)(P,{...F,children:(0,u.jsx)(Rs,{asChild:!0,trapped:i,onMountAutoFocus:Q(a,e=>{e.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,u.jsx)(Ds,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,children:(0,u.jsx)(eh,{asChild:!0,...S,dir:b.dir,orientation:`vertical`,loop:r,currentTabStopId:w,onCurrentTabStopIdChange:T,onEntryFocus:Q(c,e=>{b.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,u.jsx)(Rp,{role:`menu`,"aria-orientation":`vertical`,"data-state":yg(v.open),"data-radix-menu-content":``,dir:b.dir,...x,..._,ref:D,style:{outline:`none`,..._.style},onKeyDown:Q(_.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&I(e.key));let i=E.current;if(e.target!==i||!dh.includes(e.key))return;e.preventDefault();let a=C().filter(e=>!e.disabled).map(e=>e.ref.current);uh.includes(e.key)&&a.reverse(),Sg(a)}),onBlur:Q(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(O.current),k.current=``)}),onPointerMove:Q(e.onPointerMove,Dg(e=>{let t=e.target,n=N.current!==e.clientX;e.currentTarget.contains(t)&&n&&(M.current=e.clientX>N.current?`right`:`left`,N.current=e.clientX)}))})})})})})})});Ih.displayName=Nh;var Vh=`MenuGroup`,Hh=l.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,u.jsx)($.div,{role:`group`,...r,ref:t})});Hh.displayName=Vh;var Uh=`MenuLabel`,Wh=l.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,u.jsx)($.div,{...r,ref:t})});Wh.displayName=Uh;var Gh=`MenuItem`,Kh=`menu.itemSelect`,qh=l.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=l.useRef(null),o=Th(Gh,e.__scopeMenu),s=Fh(Gh,e.__scopeMenu),c=y(t,a),d=l.useRef(!1),f=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Kh,{bubbles:!0,cancelable:!0});e.addEventListener(Kh,e=>r?.(e),{once:!0}),Lo(e,t),t.defaultPrevented?d.current=!1:o.onClose()}};return(0,u.jsx)(Jh,{...i,ref:c,disabled:n,onClick:Q(e.onClick,f),onPointerDown:t=>{e.onPointerDown?.(t),d.current=!0},onPointerUp:Q(e.onPointerUp,e=>{d.current||e.currentTarget?.click()}),onKeyDown:Q(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||ch.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});qh.displayName=Gh;var Jh=l.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Fh(Gh,n),s=xh(n),c=l.useRef(null),d=y(t,c),[f,p]=l.useState(!1),[m,h]=l.useState(``);return l.useEffect(()=>{let e=c.current;e&&h((e.textContent??``).trim())},[a.children]),(0,u.jsx)(hh.ItemSlot,{scope:n,disabled:r,textValue:i??m,children:(0,u.jsx)(th,{asChild:!0,...s,focusable:!r,children:(0,u.jsx)($.div,{role:`menuitem`,"data-highlighted":f?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:d,onPointerMove:Q(e.onPointerMove,Dg(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Q(e.onPointerLeave,Dg(e=>o.onItemLeave(e))),onFocus:Q(e.onFocus,()=>p(!0)),onBlur:Q(e.onBlur,()=>p(!1))})})})}),Yh=`MenuCheckboxItem`,Xh=l.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,u.jsx)(ig,{scope:e.__scopeMenu,checked:n,children:(0,u.jsx)(qh,{role:`menuitemcheckbox`,"aria-checked":bg(n)?`mixed`:n,...i,ref:t,"data-state":xg(n),onSelect:Q(i.onSelect,()=>r?.(bg(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Xh.displayName=Yh;var Zh=`MenuRadioGroup`,[Qh,$h]=vh(Zh,{value:void 0,onValueChange:()=>{}}),eg=l.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=ys(r);return(0,u.jsx)(Qh,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,u.jsx)(Hh,{...i,ref:t})})});eg.displayName=Zh;var tg=`MenuRadioItem`,ng=l.forwardRef((e,t)=>{let{value:n,...r}=e,i=$h(tg,e.__scopeMenu),a=n===i.value;return(0,u.jsx)(ig,{scope:e.__scopeMenu,checked:a,children:(0,u.jsx)(qh,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":xg(a),onSelect:Q(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});ng.displayName=tg;var rg=`MenuItemIndicator`,[ig,ag]=vh(rg,{checked:!1}),og=l.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=ag(rg,n);return(0,u.jsx)(Do,{present:r||bg(a.checked)||a.checked===!0,children:(0,u.jsx)($.span,{...i,ref:t,"data-state":xg(a.checked)})})});og.displayName=rg;var sg=`MenuSeparator`,cg=l.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,u.jsx)($.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});cg.displayName=sg;var lg=`MenuArrow`,ug=l.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=bh(n);return(0,u.jsx)(zp,{...i,...r,ref:t})});ug.displayName=lg;var dg=`MenuSub`,[fg,pg]=vh(dg),mg=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=Ch(dg,t),o=bh(t),[s,c]=l.useState(null),[d,f]=l.useState(null),p=ys(i);return l.useEffect(()=>(a.open===!1&&p(!1),()=>p(!1)),[a.open,p]),(0,u.jsx)(Ip,{...o,children:(0,u.jsx)(Sh,{scope:t,open:r,onOpenChange:p,content:d,onContentChange:f,children:(0,u.jsx)(fg,{scope:t,contentId:vs(),triggerId:vs(),trigger:s,onTriggerChange:c,children:n})})})};mg.displayName=dg;var hg=`MenuSubTrigger`,gg=l.forwardRef((e,t)=>{let n=Ch(hg,e.__scopeMenu),r=Th(hg,e.__scopeMenu),i=pg(hg,e.__scopeMenu),a=Fh(hg,e.__scopeMenu),o=l.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,d={__scopeMenu:e.__scopeMenu},f=l.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return l.useEffect(()=>f,[f]),l.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,u.jsx)(Oh,{asChild:!0,...d,children:(0,u.jsx)(Jh,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":i.contentId,"data-state":yg(n.open),...e,ref:v(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Q(e.onPointerMove,Dg(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:Q(e.onPointerLeave,Dg(e=>{f();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Q(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||fh[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});gg.displayName=hg;var _g=`MenuSubContent`,vg=l.forwardRef((e,t)=>{let n=jh(Nh,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Ch(Nh,e.__scopeMenu),o=Th(Nh,e.__scopeMenu),s=pg(_g,e.__scopeMenu),c=l.useRef(null),d=y(t,c);return(0,u.jsx)(hh.Provider,{scope:e.__scopeMenu,children:(0,u.jsx)(Do,{present:r||a.open,children:(0,u.jsx)(hh.Slot,{scope:e.__scopeMenu,children:(0,u.jsx)(Bh,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:d,align:`start`,side:o.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{o.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:Q(e.onFocusOutside,e=>{e.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Q(e.onEscapeKeyDown,e=>{o.onClose(),e.preventDefault()}),onKeyDown:Q(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=ph[o.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),s.trigger?.focus(),e.preventDefault())})})})})})});vg.displayName=_g;function yg(e){return e?`open`:`closed`}function bg(e){return e===`indeterminate`}function xg(e){return bg(e)?`indeterminate`:e?`checked`:`unchecked`}function Sg(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Cg(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function wg(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Cg(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Tg(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Eg(e,t){return t?Tg({x:e.clientX,y:e.clientY},t):!1}function Dg(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Og=Eh,kg=Oh,Ag=Mh,jg=Ih,Mg=Hh,Ng=Wh,Pg=qh,Fg=Xh,Ig=eg,Lg=ng,Rg=og,zg=cg,Bg=ug,Vg=gg,Hg=vg,Ug=`DropdownMenu`,[Wg,Gg]=_o(Ug,[yh]),Kg=yh(),[qg,Jg]=Wg(Ug),Yg=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Kg(t),d=l.useRef(null),[f,p]=xo({prop:i,defaultProp:a??!1,onChange:o,caller:Ug});return(0,u.jsx)(qg,{scope:t,triggerId:vs(),triggerRef:d,contentId:vs(),open:f,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(e=>!e),[p]),modal:s,children:(0,u.jsx)(Og,{...c,open:f,onOpenChange:p,dir:r,modal:s,children:n})})};Yg.displayName=Ug;var Xg=`DropdownMenuTrigger`,Zg=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Jg(Xg,n),o=Kg(n);return(0,u.jsx)(kg,{asChild:!0,...o,children:(0,u.jsx)($.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:v(t,a.triggerRef),onPointerDown:Q(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:Q(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Zg.displayName=Xg;var Qg=`DropdownMenuPortal`,$g=e=>{let{__scopeDropdownMenu:t,...n}=e,r=Kg(t);return(0,u.jsx)(Ag,{...r,...n})};$g.displayName=Qg;var e_=`DropdownMenuContent`,t_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Jg(e_,n),a=Kg(n),o=l.useRef(!1);return(0,u.jsx)(jg,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:Q(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:Q(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});t_.displayName=e_;var n_=`DropdownMenuGroup`,r_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kg(n);return(0,u.jsx)(Mg,{...i,...r,ref:t})});r_.displayName=n_;var i_=`DropdownMenuLabel`,a_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kg(n);return(0,u.jsx)(Ng,{...i,...r,ref:t})});a_.displayName=i_;var o_=`DropdownMenuItem`,s_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kg(n);return(0,u.jsx)(Pg,{...i,...r,ref:t})});s_.displayName=o_;var c_=`DropdownMenuCheckboxItem`,l_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kg(n);return(0,u.jsx)(Fg,{...i,...r,ref:t})});l_.displayName=c_;var u_=`DropdownMenuRadioGroup`,d_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kg(n);return(0,u.jsx)(Ig,{...i,...r,ref:t})});d_.displayName=u_;var f_=`DropdownMenuRadioItem`,p_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kg(n);return(0,u.jsx)(Lg,{...i,...r,ref:t})});p_.displayName=f_;var m_=`DropdownMenuItemIndicator`,h_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kg(n);return(0,u.jsx)(Rg,{...i,...r,ref:t})});h_.displayName=m_;var g_=`DropdownMenuSeparator`,__=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kg(n);return(0,u.jsx)(zg,{...i,...r,ref:t})});__.displayName=g_;var v_=`DropdownMenuArrow`,y_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kg(n);return(0,u.jsx)(Bg,{...i,...r,ref:t})});y_.displayName=v_;var b_=`DropdownMenuSubTrigger`,x_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kg(n);return(0,u.jsx)(Vg,{...i,...r,ref:t})});x_.displayName=b_;var S_=`DropdownMenuSubContent`,C_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kg(n);return(0,u.jsx)(Hg,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});C_.displayName=S_;var w_=Yg;function T_({...e}){return(0,u.jsx)(w_,{"data-slot":`dropdown-menu`,...e})}function E_({label:e=`Arquivo`,accept:t=`.pdf,.xml,.png,.jpg,.jpeg`,multiple:n=!1,disabled:r,className:i,onFilesChange:a}){let o=(0,l.useId)(),[s,c]=(0,l.useState)(null),[d,f]=(0,l.useState)(!1),p=!!s?.length,m=(0,l.useCallback)(e=>{c(e),a?.(e)},[a]),h=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),f(!1),!r&&e.dataTransfer.files?.length&&m(e.dataTransfer.files)},[r,m]),g=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),r||f(!0)},[r]),_=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),f(!1)},[]),v=(0,l.useCallback)(e=>{e.target.files&&m(e.target.files)},[m]),y=()=>{r||document.getElementById(o)?.click()},b=e=>{if(!e)return``;let t={".pdf":`PDF`,".jpg":`JPG`,".jpeg":`JPEG`,".png":`PNG`,".xml":`XML`},n=e.split(`,`).map(e=>e.trim()).map(e=>t[e.toLowerCase()]??e.replace(`.`,``).toUpperCase());return n.length===1?n[0]:n.length===2?n.join(` ou `):n.slice(0,-1).join(`, `)+` ou `+n[n.length-1]};return(0,u.jsxs)(`div`,{className:q(`flex flex-col gap-2`,i),children:[(0,u.jsx)(`input`,{id:o,type:`file`,accept:t,multiple:n,disabled:r,onChange:v,className:`absolute w-px h-px p-0 -m-px overflow-hidden whitespace-nowrap border-0`,"aria-label":e}),(0,u.jsx)(`div`,{role:`button`,tabIndex:0,onClick:y,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),y())},onDrop:h,onDragOver:g,onDragLeave:_,className:q(`h-40 p-4 relative flex flex-col items-center justify-center gap-4 rounded-sm border-2 border-dashed transition-colors`,!r&&`cursor-pointer`,`bg-default hover:bg-default/80`,d&&`border-primary bg-primary/5`,p&&`border-primary bg-primary/5`,r&&`opacity-50 cursor-not-allowed`),children:p?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`div`,{className:`flex items-center justify-center size-8 rounded-sm bg-primary/10`,children:(0,u.jsx)(Mt,{className:`size-4 text-primary`})}),(0,u.jsx)(`div`,{className:`flex flex-col items-center text-center w-full px-2`,children:(0,u.jsx)(`span`,{className:`body-sm font-medium text-foreground break-all line-clamp-2`,children:s.length===1?s[0].name:`${s.length} arquivos selecionados`})})]}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`div`,{className:`flex items-center justify-center min-w-8 min-h-8 rounded-sm bg-primary/10`,children:(0,u.jsx)(Bt,{className:`min-w-4 min-h-4 text-primary`})}),(0,u.jsx)(`div`,{className:`flex flex-col items-center text-center`,children:(0,u.jsxs)(`span`,{className:`body-sm font-medium text-foreground`,children:[`Arraste e solte o arquivo aqui`,(0,u.jsx)(`br`,{}),`ou clique para selecionar`]})}),t&&(0,u.jsxs)(`span`,{className:`body-xs font-medium text-muted`,children:[`Formatos aceitos: `,b(t)]})]})})]})}var D_=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=w(`Primitive.${t}`),r=l.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,u.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),O_=`Separator`,k_=`horizontal`,A_=[`horizontal`,`vertical`],j_=l.forwardRef((e,t)=>{let{decorative:n,orientation:r=k_,...i}=e,a=M_(r)?r:k_,o=a===`vertical`?a:void 0,s=n?{role:`none`}:{"aria-orientation":o,role:`separator`};return(0,u.jsx)(D_.div,{"data-orientation":a,...s,...i,ref:t})});j_.displayName=O_;function M_(e){return A_.includes(e)}var N_=j_;function P_({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,u.jsx)(N_,{"data-slot":`separator`,decorative:n,orientation:t,className:q(`bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,e),...r})}function F_({icon:e,title:t,description:n,children:r,className:i}){return(0,u.jsxs)(lo,{className:i,children:[(0,u.jsxs)(uo,{children:[(0,u.jsx)(fo,{className:`bg-primary/10`,children:(0,u.jsx)(e,{className:`size-5 text-primary`})}),(0,u.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,u.jsx)(po,{children:t}),n&&(0,u.jsx)(mo,{children:n})]})]}),(0,u.jsx)(P_,{}),(0,u.jsx)(ho,{children:r})]})}function I_({className:e,type:t,...n}){return(0,u.jsx)(`input`,{type:t,"data-slot":`input`,className:q(`text-sm h-9 w-full min-w-0 rounded-md border border-border bg-default px-2.5 py-1`,`text-foreground antialiased caret-primary`,`transition-[color,border-color,box-shadow] outline-none`,`focus-visible:border-primary focus-visible:shadow-[inset_0_0_0_1px_var(--color-primary)]`,`aria-invalid:border-destructive aria-invalid:shadow-[inset_0_0_0_1px_var(--color-destructive)]`,`disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,`file:inline-flex file:h-7 file:border-0 file:text-sm file:font-medium file:text-foreground`,e),...n})}function L_({className:e,...t}){return(0,u.jsx)(`textarea`,{"data-slot":`textarea`,className:q(`field-sizing-content text-sm min-h-16 w-full min-w-0 rounded-md border border-border bg-default px-2.5 py-1`,`text-foreground antialiased caret-primary`,`transition-[color,border-color,box-shadow] outline-none`,`focus-visible:border-primary focus-visible:shadow-[inset_0_0_0_1px_var(--color-primary)]`,`aria-invalid:border-destructive aria-invalid:shadow-[inset_0_0_0_1px_var(--color-destructive)]`,`disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,`file:inline-flex file:h-7 file:border-0 file:text-sm file:font-medium file:text-foreground`,e),...t})}function R_({className:e,...t}){return(0,u.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:q(`group/input-group relative flex w-full items-center rounded-md border border-border outline-none transition-[color,border-color,box-shadow]`,`h-9 min-w-0 has-[>textarea]:h-auto dark:bg-input/30`,`has-focus-visible:border-primary has-focus-visible:shadow-[inset_0_0_0_1px_var(--color-primary)]`,`has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:shadow-[inset_0_0_0_1px_var(--color-destructive)]`,`has-[[data-slot][aria-invalid=true]:focus-visible]:border-primary has-[[data-slot][aria-invalid=true]:focus-visible]:shadow-[inset_0_0_0_1px_var(--color-primary)]`,`has-[>[data-align=inline-start]]:[&>input]:pl-2`,`has-[>[data-align=inline-end]]:[&>input]:pr-2`,`has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3`,`has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3`,e),...t})}var z_=Object.defineProperty,B_=Object.defineProperties,V_=Object.getOwnPropertyDescriptors,H_=Object.getOwnPropertySymbols,U_=Object.prototype.hasOwnProperty,W_=Object.prototype.propertyIsEnumerable,G_=(e,t,n)=>t in e?z_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K_=(e,t)=>{for(var n in t||={})U_.call(t,n)&&G_(e,n,t[n]);if(H_)for(var n of H_(t))W_.call(t,n)&&G_(e,n,t[n]);return e},q_=(e,t)=>B_(e,V_(t)),J_=(e,t)=>{var n={};for(var r in e)U_.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&H_)for(var r of H_(e))t.indexOf(r)<0&&W_.call(e,r)&&(n[r]=e[r]);return n};function Y_(e){return[setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)]}function X_(e){let t=l.useRef();return l.useEffect(()=>{t.current=e}),t.current}var Z_=18,Q_=40,$_=`${Q_}px`,ev=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`);function tv({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[i,a]=l.useState(!1),[o,s]=l.useState(!1),[c,u]=l.useState(!1),d=l.useMemo(()=>n===`none`?!1:(n===`increase-width`||n===`experimental-no-flickering`)&&i&&o,[i,o,n]),f=l.useCallback(()=>{let r=e.current,i=t.current;if(!r||!i||c||n===`none`)return;let o=r,s=o.getBoundingClientRect().left+o.offsetWidth,l=o.getBoundingClientRect().top+o.offsetHeight/2,d=s-Z_,f=l;document.querySelectorAll(ev).length===0&&document.elementFromPoint(d,f)===r||(a(!0),u(!0))},[e,t,c,n]);return l.useEffect(()=>{let t=e.current;if(!t||n===`none`)return;function r(){s(window.innerWidth-t.getBoundingClientRect().right>=Q_)}r();let i=setInterval(r,1e3);return()=>{clearInterval(i)}},[e,n]),l.useEffect(()=>{let e=r||document.activeElement===t.current;if(n===`none`||!e)return;let i=setTimeout(f,0),a=setTimeout(f,2e3),o=setTimeout(f,5e3),s=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(i),clearTimeout(a),clearTimeout(o),clearTimeout(s)}},[t,r,n,f]),{hasPWMBadge:i,willPushPWMBadge:d,PWM_BADGE_SPACE_WIDTH:$_}}var nv=l.createContext({}),rv=l.forwardRef((e,t)=>{var n=e,{value:r,onChange:i,maxLength:a,textAlign:o=`left`,pattern:s,placeholder:c,inputMode:u=`numeric`,onComplete:d,pushPasswordManagerStrategy:f=`increase-width`,pasteTransformer:p,containerClassName:m,noScriptCSSFallback:h=av,render:g,children:_}=n,v=J_(n,[`value`,`onChange`,`maxLength`,`textAlign`,`pattern`,`placeholder`,`inputMode`,`onComplete`,`pushPasswordManagerStrategy`,`pasteTransformer`,`containerClassName`,`noScriptCSSFallback`,`render`,`children`]),y;let[b,x]=l.useState(typeof v.defaultValue==`string`?v.defaultValue:``),S=r??b,C=X_(S),w=l.useCallback(e=>{i?.(e),x(e)},[i]),T=l.useMemo(()=>s?typeof s==`string`?new RegExp(s):s:null,[s]),E=l.useRef(null),D=l.useRef(null),O=l.useRef({value:S,onChange:w,isIOS:typeof window<`u`&&((y=window==null?void 0:window.CSS)?.supports)?.call(y,`-webkit-touch-callout`,`none`)}),k=l.useRef({prev:[E.current?.selectionStart,E.current?.selectionEnd,E.current?.selectionDirection]});l.useImperativeHandle(t,()=>E.current,[]),l.useEffect(()=>{let e=E.current,t=D.current;if(!e||!t)return;O.current.value!==e.value&&O.current.onChange(e.value),k.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection];function n(){if(document.activeElement!==e){F(null),L(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,i=e.maxLength,a=e.value,o=k.current.prev,s=-1,c=-1,l;if(a.length!==0&&t!==null&&n!==null){let e=t===n,r=t===a.length&&a.length<i;if(e&&!r){let e=t;if(e===0)s=0,c=1,l=`forward`;else if(e===i)s=e-1,c=e,l=`backward`;else if(i>1&&a.length>1){let t=0;if(o[0]!==null&&o[1]!==null){l=e<o[1]?`backward`:`forward`;let n=o[0]===o[1]&&o[0]<i;l===`backward`&&!n&&(t=-1)}s=t+e,c=t+e+1}}s!==-1&&c!==-1&&s!==c&&E.current.setSelectionRange(s,c,l)}let u=s===-1?t:s,d=c===-1?n:c,f=l??r;F(u),L(d),k.current.prev=[u,d,f]}if(document.addEventListener(`selectionchange`,n,{capture:!0}),n(),document.activeElement===e&&N(!0),!document.getElementById(`input-otp-style`)){let e=document.createElement(`style`);if(e.id=`input-otp-style`,document.head.appendChild(e),e.sheet){let t=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;iv(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),iv(e.sheet,`[data-input-otp]:autofill { ${t} }`),iv(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),iv(e.sheet,`@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),iv(e.sheet,`[data-input-otp] + * { pointer-events: all !important; }`)}}let r=()=>{t&&t.style.setProperty(`--root-height`,`${e.clientHeight}px`)};r();let i=new ResizeObserver(r);return i.observe(e),()=>{document.removeEventListener(`selectionchange`,n,{capture:!0}),i.disconnect()}},[]);let[A,j]=l.useState(!1),[M,N]=l.useState(!1),[P,F]=l.useState(null),[I,L]=l.useState(null);l.useEffect(()=>{Y_(()=>{var e;(e=E.current)==null||e.dispatchEvent(new Event(`input`));let t=E.current?.selectionStart,n=E.current?.selectionEnd,r=E.current?.selectionDirection;t!==null&&n!==null&&(F(t),L(n),k.current.prev=[t,n,r])})},[S,M]),l.useEffect(()=>{C!==void 0&&S!==C&&C.length<a&&S.length===a&&d?.(S)},[a,d,C,S]);let R=tv({containerRef:D,inputRef:E,pushPasswordManagerStrategy:f,isFocused:M}),ee=l.useCallback(e=>{let t=e.currentTarget.value.slice(0,a);if(t.length>0&&T&&!T.test(t)){e.preventDefault();return}typeof C==`string`&&t.length<C.length&&document.dispatchEvent(new Event(`selectionchange`)),w(t)},[a,w,C,T]),te=l.useCallback(()=>{var e;if(E.current){let t=Math.min(E.current.value.length,a-1),n=E.current.value.length;(e=E.current)==null||e.setSelectionRange(t,n),F(t),L(n)}N(!0)},[a]),z=l.useCallback(e=>{let t=E.current;if(!p&&(!O.current.isIOS||!e.clipboardData||!t))return;let n=e.clipboardData.getData(`text/plain`),r=p?p(n):n;e.preventDefault();let i=E.current?.selectionStart,o=E.current?.selectionEnd,s=(i===o?S.slice(0,i)+r+S.slice(i):S.slice(0,i)+r+S.slice(o)).slice(0,a);if(s.length>0&&T&&!T.test(s))return;t.value=s,w(s);let c=Math.min(s.length,a-1),l=s.length;t.setSelectionRange(c,l),F(c),L(l)},[a,w,T,S]),B=l.useMemo(()=>({position:`relative`,cursor:v.disabled?`default`:`text`,userSelect:`none`,WebkitUserSelect:`none`,pointerEvents:`none`}),[v.disabled]),ne=l.useMemo(()=>({position:`absolute`,inset:0,width:R.willPushPWMBadge?`calc(100% + ${R.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:R.willPushPWMBadge?`inset(0 ${R.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:`100%`,display:`flex`,textAlign:o,opacity:`1`,color:`transparent`,pointerEvents:`all`,background:`transparent`,caretColor:`transparent`,border:`0 solid transparent`,outline:`0 solid transparent`,boxShadow:`none`,lineHeight:`1`,letterSpacing:`-.5em`,fontSize:`var(--root-height)`,fontFamily:`monospace`,fontVariantNumeric:`tabular-nums`}),[R.PWM_BADGE_SPACE_WIDTH,R.willPushPWMBadge,o]),re=l.useMemo(()=>l.createElement(`input`,q_(K_({autoComplete:v.autoComplete||`one-time-code`},v),{"data-input-otp":!0,"data-input-otp-placeholder-shown":S.length===0||void 0,"data-input-otp-mss":P,"data-input-otp-mse":I,inputMode:u,pattern:T?.source,"aria-placeholder":c,style:ne,maxLength:a,value:S,ref:E,onPaste:e=>{var t;z(e),(t=v.onPaste)==null||t.call(v,e)},onChange:ee,onMouseOver:e=>{var t;j(!0),(t=v.onMouseOver)==null||t.call(v,e)},onMouseLeave:e=>{var t;j(!1),(t=v.onMouseLeave)==null||t.call(v,e)},onFocus:e=>{var t;te(),(t=v.onFocus)==null||t.call(v,e)},onBlur:e=>{var t;N(!1),(t=v.onBlur)==null||t.call(v,e)}})),[ee,te,z,u,ne,a,I,P,v,T?.source,S]),V=l.useMemo(()=>({slots:Array.from({length:a}).map((e,t)=>{let n=M&&P!==null&&I!==null&&(P===I&&t===P||t>=P&&t<I),r=S[t]===void 0?null:S[t];return{char:r,placeholderChar:S[0]===void 0?c?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:M,isHovering:!v.disabled&&A}),[M,A,a,I,P,v.disabled,S]),ie=l.useMemo(()=>g?g(V):l.createElement(nv.Provider,{value:V},_),[_,V,g]);return l.createElement(l.Fragment,null,h!==null&&l.createElement(`noscript`,null,l.createElement(`style`,null,h)),l.createElement(`div`,{ref:D,"data-input-otp-container":!0,style:B,className:m},ie,l.createElement(`div`,{style:{position:`absolute`,inset:0,pointerEvents:`none`}},re)))});rv.displayName=`Input`;function iv(e,t){try{e.insertRule(t)}catch{console.error(`input-otp could not insert CSS rule:`,t)}}var av=`
|
|
46
46
|
[data-input-otp] {
|
|
47
47
|
--nojs-bg: white !important;
|
|
48
48
|
--nojs-fg: black !important;
|