miniflare
Version:
Fun, full-featured, fully-local simulator for Cloudflare Workers
13 lines • 299 kB
JavaScript
import{M as e,N as t,R as n,c as r,d as i,k as a,m as o,n as s,o as c,s as l,t as u,z as d}from"./useRouterState-DkU0JPAO.js";var f=`Error preloading route! ☝️`,p=r(),m=d(l(),1),h=m.use,g=typeof window<`u`?m.useLayoutEffect:m.useEffect;function _(e){let t=m.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function v(e,t,n={},r={}){m.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function y(e){let t=m.useRef(null);return m.useImperativeHandle(e,()=>t.current,[]),t}var b=n((e=>{var t=l();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.4`})),x=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=b()})),S=d(x(),1);function C(n,r){let l=s(),d=y(r),{activeProps:p,inactiveProps:h,activeOptions:g,to:_,preload:b,preloadDelay:x,hashScrollIntoView:C,replace:P,startTransition:F,resetScroll:L,viewTransition:R,children:z,target:B,disabled:V,style:H,className:U,onClick:ee,onFocus:te,onMouseEnter:ne,onMouseLeave:W,onTouchStart:re,ignoreBlocker:ie,params:ae,search:oe,hash:se,state:ce,mask:le,reloadDocument:ue,unsafeRelative:de,from:fe,_fromLocation:pe,...me}=n,he=c(),ge=u({select:e=>e.location.search,structuralSharing:!0}),_e=n.from,ve=m.useMemo(()=>({...n,from:_e}),[l,ge,_e,n._fromLocation,n.hash,n.to,n.search,n.params,n.state,n.mask,n.unsafeRelative]),ye=m.useMemo(()=>l.buildLocation({...ve}),[l,ve]),be=ye.maskedLocation?ye.maskedLocation.publicHref:ye.publicHref,xe=ye.maskedLocation?ye.maskedLocation.external:ye.external,Se=m.useMemo(()=>M(be,xe,l.history,V),[V,xe,be,l.history]),Ce=m.useMemo(()=>{if(Se?.external)return t(Se.href)?void 0:Se.href;if(!N(_)&&!(typeof _!=`string`||_.indexOf(`:`)===-1))try{return new URL(_),t(_)?void 0:_}catch{}},[_,Se]),we=u({select:e=>{if(Ce)return!1;if(g?.exact){if(!i(e.location.pathname,ye.pathname,l.basepath))return!1}else{let t=o(e.location.pathname,l.basepath),n=o(ye.pathname,l.basepath);if(!(t.startsWith(n)&&(t.length===n.length||t[n.length]===`/`)))return!1}return(g?.includeSearch??!0)&&!a(e.location.search,ye.search,{partial:!g?.exact,ignoreUndefined:!g?.explicitUndefined})?!1:!g?.includeHash||he&&e.location.hash===ye.hash}}),Te=we?e(p,{})??T:w,Ee=we?w:e(h,{})??w,De=[U,Te.className,Ee.className].filter(Boolean).join(` `),Oe=(H||Te.style||Ee.style)&&{...H,...Te.style,...Ee.style},[ke,Ae]=m.useState(!1),je=m.useRef(!1),Me=n.reloadDocument||Ce?!1:b??l.options.defaultPreload,Ne=x??l.options.defaultPreloadDelay??0,Pe=m.useCallback(()=>{l.preloadRoute({...ve}).catch(e=>{console.warn(e),console.warn(f)})},[l,ve]);v(d,m.useCallback(e=>{e?.isIntersecting&&Pe()},[Pe]),A,{disabled:!!V||Me!==`viewport`}),m.useEffect(()=>{je.current||!V&&Me===`render`&&(Pe(),je.current=!0)},[V,Pe,Me]);let Fe=e=>{let t=e.currentTarget.getAttribute(`target`),n=B===void 0?t:B;if(!V&&!I(e)&&!e.defaultPrevented&&(!n||n===`_self`)&&e.button===0){e.preventDefault(),(0,S.flushSync)(()=>{Ae(!0)});let t=l.subscribe(`onResolved`,()=>{t(),Ae(!1)});l.navigate({...ve,replace:P,resetScroll:L,hashScrollIntoView:C,startTransition:F,viewTransition:R,ignoreBlocker:ie})}};if(Ce)return{...me,ref:d,href:Ce,...z&&{children:z},...B&&{target:B},...V&&{disabled:V},...H&&{style:H},...U&&{className:U},...ee&&{onClick:ee},...te&&{onFocus:te},...ne&&{onMouseEnter:ne},...W&&{onMouseLeave:W},...re&&{onTouchStart:re}};let Ie=e=>{V||Me&&Pe()},Le=Ie,Re=e=>{if(!(V||!Me))if(!Ne)Pe();else{let t=e.target;if(k.has(t))return;let n=setTimeout(()=>{k.delete(t),Pe()},Ne);k.set(t,n)}},ze=e=>{if(V||!Me||!Ne)return;let t=e.target,n=k.get(t);n&&(clearTimeout(n),k.delete(t))};return{...me,...Te,...Ee,href:Se?.href,ref:d,onClick:j([ee,Fe]),onFocus:j([te,Ie]),onMouseEnter:j([ne,Re]),onMouseLeave:j([W,ze]),onTouchStart:j([re,Le]),disabled:!!V,target:B,...Oe&&{style:Oe},...De&&{className:De},...V&&E,...we&&D,...he&&ke&&O}}var w={},T={className:`active`},E={role:`link`,"aria-disabled":!0},D={"data-status":`active`,"aria-current":`page`},O={"data-transitioning":`transitioning`},k=new WeakMap,A={rootMargin:`100px`},j=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function M(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function N(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}function P(e){return m.forwardRef(function(t,n){return(0,p.jsx)(F,{...t,_asChild:e,ref:n})})}var F=m.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=C(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return m.createElement(`a`,t,o)}return m.createElement(n,a,o)});function I(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function L(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=L(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function R(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=L(e))&&(r&&(r+=` `),r+=t);return r}var z=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},B=(e,t)=>({classGroupId:e,validator:t}),V=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),H=`-`,U=[],ee=`arbitrary..`,te=e=>{let t=re(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return W(e);let n=e.split(H);return ne(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?z(i,t):t:i||U}return n[e]||U}}},ne=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=ne(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(H):e.slice(t).join(H),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},W=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?ee+r:void 0})(),re=e=>{let{theme:t,classGroups:n}=e;return ie(n,t)},ie=(e,t)=>{let n=V();for(let r in e){let i=e[r];ae(i,n,r,t)}return n},ae=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];oe(i,t,n,r)}},oe=(e,t,n,r)=>{if(typeof e==`string`){se(e,t,n);return}if(typeof e==`function`){ce(e,t,n,r);return}le(e,t,n,r)},se=(e,t,n)=>{let r=e===``?t:ue(t,e);r.classGroupId=n},ce=(e,t,n,r)=>{if(de(e)){ae(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(B(n,e))},le=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];ae(o,ue(t,a),n,r)}},ue=(e,t)=>{let n=e,r=t.split(H),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=V(),n.nextPart.set(t,i)),n=i}return n},de=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,fe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},pe=`!`,me=`:`,he=[],ge=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),_e=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===me){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(pe)?(c=s.slice(0,-1),l=!0):s.startsWith(pe)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return ge(t,l,c,u)};if(t){let e=t+me,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):ge(he,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},ve=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},ye=e=>({cache:fe(e.cacheSize),parseClassName:_e(e),sortModifiers:ve(e),...te(e)}),be=/\s+/,xe=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(be),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+pe:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},Se=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Ce(n))&&(i&&(i+=` `),i+=r);return i},Ce=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Ce(e[r]))&&(n&&(n+=` `),n+=t);return n},we=(e,...t)=>{let n,r,i,a,o=o=>(n=ye(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=xe(e,n);return i(e,a),a};return a=o,(...e)=>a(Se(...e))},Te=[],Ee=e=>{let t=t=>t[e]||Te;return t.isThemeGetter=!0,t},De=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Oe=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ke=/^\d+\/\d+$/,Ae=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,je=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Me=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ne=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Pe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Fe=e=>ke.test(e),Ie=e=>!!e&&!Number.isNaN(Number(e)),Le=e=>!!e&&Number.isInteger(Number(e)),Re=e=>e.endsWith(`%`)&&Ie(e.slice(0,-1)),ze=e=>Ae.test(e),Be=()=>!0,Ve=e=>je.test(e)&&!Me.test(e),He=()=>!1,Ue=e=>Ne.test(e),We=e=>Pe.test(e),Ge=e=>!G(e)&&!K(e),Ke=e=>it(e,ct,He),G=e=>De.test(e),qe=e=>it(e,lt,Ve),Je=e=>it(e,ut,Ie),Ye=e=>it(e,ot,He),Xe=e=>it(e,st,We),Ze=e=>it(e,ft,Ue),K=e=>Oe.test(e),Qe=e=>at(e,lt),$e=e=>at(e,dt),et=e=>at(e,ot),tt=e=>at(e,ct),nt=e=>at(e,st),rt=e=>at(e,ft,!0),it=(e,t,n)=>{let r=De.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},at=(e,t,n=!1)=>{let r=Oe.exec(e);return r?r[1]?t(r[1]):n:!1},ot=e=>e===`position`||e===`percentage`,st=e=>e===`image`||e===`url`,ct=e=>e===`length`||e===`size`||e===`bg-size`,lt=e=>e===`length`,ut=e=>e===`number`,dt=e=>e===`family-name`,ft=e=>e===`shadow`,pt=we(()=>{let e=Ee(`color`),t=Ee(`font`),n=Ee(`text`),r=Ee(`font-weight`),i=Ee(`tracking`),a=Ee(`leading`),o=Ee(`breakpoint`),s=Ee(`container`),c=Ee(`spacing`),l=Ee(`radius`),u=Ee(`shadow`),d=Ee(`inset-shadow`),f=Ee(`text-shadow`),p=Ee(`drop-shadow`),m=Ee(`blur`),h=Ee(`perspective`),g=Ee(`aspect`),_=Ee(`ease`),v=Ee(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),K,G],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[K,G,c],T=()=>[Fe,`full`,`auto`,...w()],E=()=>[Le,`none`,`subgrid`,K,G],D=()=>[`auto`,{span:[`full`,Le,K,G]},Le,K,G],O=()=>[Le,`auto`,K,G],k=()=>[`auto`,`min`,`max`,`fr`,K,G],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[Fe,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[e,K,G],F=()=>[...b(),et,Ye,{position:[K,G]}],I=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],L=()=>[`auto`,`cover`,`contain`,tt,Ke,{size:[K,G]}],R=()=>[Re,Qe,qe],z=()=>[``,`none`,`full`,l,K,G],B=()=>[``,Ie,Qe,qe],V=()=>[`solid`,`dashed`,`dotted`,`double`],H=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],U=()=>[Ie,Re,et,Ye],ee=()=>[``,`none`,m,K,G],te=()=>[`none`,Ie,K,G],ne=()=>[`none`,Ie,K,G],W=()=>[Ie,K,G],re=()=>[Fe,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[ze],breakpoint:[ze],color:[Be],container:[ze],"drop-shadow":[ze],ease:[`in`,`out`,`in-out`],font:[Ge],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[ze],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[ze],shadow:[ze],spacing:[`px`,Ie],text:[ze],"text-shadow":[ze],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Fe,G,K,g]}],container:[`container`],columns:[{columns:[Ie,G,K,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Le,`auto`,K,G]}],basis:[{basis:[Fe,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Ie,Fe,`auto`,`initial`,`none`,G]}],grow:[{grow:[``,Ie,K,G]}],shrink:[{shrink:[``,Ie,K,G]}],order:[{order:[Le,`first`,`last`,`none`,K,G]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,Qe,qe]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,K,Je]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Re,G]}],"font-family":[{font:[$e,G,t]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,K,G]}],"line-clamp":[{"line-clamp":[Ie,`none`,K,Je]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,K,G]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,K,G]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...V(),`wavy`]}],"text-decoration-thickness":[{decoration:[Ie,`from-font`,`auto`,K,qe]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[Ie,`auto`,K,G]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,K,G]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,K,G]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:I()}],"bg-size":[{bg:L()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Le,K,G],radial:[``,K,G],conic:[Le,K,G]},nt,Xe]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:R()}],"gradient-via-pos":[{via:R()}],"gradient-to-pos":[{to:R()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":B()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...V(),`hidden`,`none`]}],"divide-style":[{divide:[...V(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...V(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Ie,K,G]}],"outline-w":[{outline:[``,Ie,Qe,qe]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`none`,u,rt,Ze]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,rt,Ze]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:B()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[Ie,qe]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,rt,Ze]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[Ie,K,G]}],"mix-blend":[{"mix-blend":[...H(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":H()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Ie]}],"mask-image-linear-from-pos":[{"mask-linear-from":U()}],"mask-image-linear-to-pos":[{"mask-linear-to":U()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":U()}],"mask-image-t-to-pos":[{"mask-t-to":U()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":U()}],"mask-image-r-to-pos":[{"mask-r-to":U()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":U()}],"mask-image-b-to-pos":[{"mask-b-to":U()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":U()}],"mask-image-l-to-pos":[{"mask-l-to":U()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":U()}],"mask-image-x-to-pos":[{"mask-x-to":U()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":U()}],"mask-image-y-to-pos":[{"mask-y-to":U()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[K,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":U()}],"mask-image-radial-to-pos":[{"mask-radial-to":U()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Ie]}],"mask-image-conic-from-pos":[{"mask-conic-from":U()}],"mask-image-conic-to-pos":[{"mask-conic-to":U()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:I()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,K,G]}],filter:[{filter:[``,`none`,K,G]}],blur:[{blur:ee()}],brightness:[{brightness:[Ie,K,G]}],contrast:[{contrast:[Ie,K,G]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,rt,Ze]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,Ie,K,G]}],"hue-rotate":[{"hue-rotate":[Ie,K,G]}],invert:[{invert:[``,Ie,K,G]}],saturate:[{saturate:[Ie,K,G]}],sepia:[{sepia:[``,Ie,K,G]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,K,G]}],"backdrop-blur":[{"backdrop-blur":ee()}],"backdrop-brightness":[{"backdrop-brightness":[Ie,K,G]}],"backdrop-contrast":[{"backdrop-contrast":[Ie,K,G]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Ie,K,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ie,K,G]}],"backdrop-invert":[{"backdrop-invert":[``,Ie,K,G]}],"backdrop-opacity":[{"backdrop-opacity":[Ie,K,G]}],"backdrop-saturate":[{"backdrop-saturate":[Ie,K,G]}],"backdrop-sepia":[{"backdrop-sepia":[``,Ie,K,G]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,K,G]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Ie,`initial`,K,G]}],ease:[{ease:[`linear`,`initial`,_,K,G]}],delay:[{delay:[Ie,K,G]}],animate:[{animate:[`none`,v,K,G]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,K,G]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:te()}],"rotate-x":[{"rotate-x":te()}],"rotate-y":[{"rotate-y":te()}],"rotate-z":[{"rotate-z":te()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":[`scale-3d`],skew:[{skew:W()}],"skew-x":[{"skew-x":W()}],"skew-y":[{"skew-y":W()}],transform:[{transform:[K,G,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":[`translate-none`],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,K,G]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,K,G]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[Ie,Qe,qe,Je]}],stroke:[{stroke:[`none`,...P()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function mt(...e){return pt(R(e))}var ht=new Map([[`bold`,m.createElement(m.Fragment,null,m.createElement(`path`,{d:`M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z`}))],[`duotone`,m.createElement(m.Fragment,null,m.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),m.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`fill`,m.createElement(m.Fragment,null,m.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1-5.66-13.66L180.65,72a79.48,79.48,0,0,0-54.72-22.09h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27,96,96,0,0,1,192,60.7l18.36-18.36A8,8,0,0,1,224,48ZM186.41,183.29A80,80,0,0,1,75.35,184l18.31-18.31A8,8,0,0,0,88,152H40a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66L64,195.3a95.42,95.42,0,0,0,66,26.76h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`light`,m.createElement(m.Fragment,null,m.createElement(`path`,{d:`M222,48V96a6,6,0,0,1-6,6H168a6,6,0,0,1,0-12h33.52L183.47,72a81.51,81.51,0,0,0-57.53-24h-.46A81.5,81.5,0,0,0,68.19,71.28a6,6,0,1,1-8.38-8.58,93.38,93.38,0,0,1,65.67-26.76H126a93.45,93.45,0,0,1,66,27.53l18,18V48a6,6,0,0,1,12,0ZM187.81,184.72a81.5,81.5,0,0,1-57.29,23.34h-.46a81.51,81.51,0,0,1-57.53-24L54.48,166H88a6,6,0,0,0,0-12H40a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V174.48l18,18.05a93.45,93.45,0,0,0,66,27.53h.52a93.38,93.38,0,0,0,65.67-26.76,6,6,0,1,0-8.38-8.58Z`}))],[`regular`,m.createElement(m.Fragment,null,m.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`thin`,m.createElement(m.Fragment,null,m.createElement(`path`,{d:`M220,48V96a4,4,0,0,1-4,4H168a4,4,0,0,1,0-8h38.34L184.89,70.54A84,84,0,0,0,66.8,69.85a4,4,0,1,1-5.6-5.72,92,92,0,0,1,129.34.76L212,86.34V48a4,4,0,0,1,8,0ZM189.2,186.15a83.44,83.44,0,0,1-58.68,23.91h-.47a83.52,83.52,0,0,1-58.94-24.6L49.66,164H88a4,4,0,0,0,0-8H40a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V169.66l21.46,21.45A91.43,91.43,0,0,0,130,218.06h.51a91.45,91.45,0,0,0,64.28-26.19,4,4,0,1,0-5.6-5.72Z`}))]]),gt=(0,m.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1}),_t=m.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...h}=m.useContext(gt);return m.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...h,...l},!!n&&m.createElement(`title`,null,n),s,c.get(a??f))});_t.displayName=`IconBase`;var vt=m.forwardRef((e,t)=>m.createElement(_t,{ref:t,...e,weights:ht}));vt.displayName=`ArrowsClockwiseIcon`;var yt=vt,bt={size:{sm:{value:16,description:`Small loader for inline use`},base:{value:24,description:`Default loader size`},lg:{value:32,description:`Large loader for prominent loading states`}}},xt={size:`base`};function St({size:e=xt.size}={}){return typeof e==`number`?e:bt.size[e].value}var Ct=({className:e,size:t=xt.size,"aria-label":n=`Loading`})=>{let r=St({size:t});return(0,p.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,stroke:`currentColor`,className:e,style:{height:r,width:r},role:`status`,"aria-label":n,children:[(0,p.jsxs)(`circle`,{cx:`12`,cy:`12`,r:`9.5`,fill:`none`,strokeWidth:`2`,strokeLinecap:`round`,children:[(0,p.jsx)(`animateTransform`,{attributeName:`transform`,type:`rotate`,from:`0 12 12`,to:`360 12 12`,dur:`2s`,repeatCount:`indefinite`}),(0,p.jsx)(`animate`,{attributeName:`stroke-dasharray`,values:`0 150;42 150;42 150`,keyTimes:`0;0.5;1`,dur:`1.5s`,repeatCount:`indefinite`}),(0,p.jsx)(`animate`,{attributeName:`stroke-dashoffset`,values:`0;-16;-59`,keyTimes:`0;0.5;1`,dur:`1.5s`,repeatCount:`indefinite`})]}),(0,p.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9.5`,fill:`none`,opacity:.1,strokeWidth:`2`,strokeLinecap:`round`})]})},wt=(0,m.createContext)(null);function Tt(){return(0,m.useContext)(wt)}function Et(){return typeof window<`u`}function Dt(e){return At(e)?(e.nodeName||``).toLowerCase():`#document`}function Ot(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kt(e){return((At(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function At(e){return Et()?e instanceof Node||e instanceof Ot(e).Node:!1}function jt(e){return Et()?e instanceof Element||e instanceof Ot(e).Element:!1}function Mt(e){return Et()?e instanceof HTMLElement||e instanceof Ot(e).HTMLElement:!1}function Nt(e){return!Et()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Ot(e).ShadowRoot}var Pt=new Set([`inline`,`contents`]);function Ft(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Jt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Pt.has(i)}var It=new Set([`table`,`td`,`th`]);function Lt(e){return It.has(Dt(e))}var Rt=[`:popover-open`,`:modal`];function zt(e){return Rt.some(t=>{try{return e.matches(t)}catch{return!1}})}var Bt=[`transform`,`translate`,`scale`,`rotate`,`perspective`],Vt=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],Ht=[`paint`,`layout`,`strict`,`content`];function Ut(e){let t=Gt(),n=jt(e)?Jt(e):e;return Bt.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||Vt.some(e=>(n.willChange||``).includes(e))||Ht.some(e=>(n.contain||``).includes(e))}function Wt(e){let t=Xt(e);for(;Mt(t)&&!qt(t);){if(Ut(t))return t;if(zt(t))return null;t=Xt(t)}return null}function Gt(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var Kt=new Set([`html`,`body`,`#document`]);function qt(e){return Kt.has(Dt(e))}function Jt(e){return Ot(e).getComputedStyle(e)}function Yt(e){return jt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xt(e){if(Dt(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Nt(e)&&e.host||kt(e);return Nt(t)?t.host:t}function Zt(e){let t=Xt(e);return qt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Mt(t)&&Ft(t)?t:Zt(t)}function Qt(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Zt(e),i=r===e.ownerDocument?.body,a=Ot(r);if(i){let e=$t(a);return t.concat(a,a.visualViewport||[],Ft(r)?r:[],e&&n?Qt(e):[])}return t.concat(r,Qt(r,[],n))}function $t(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var en=[`top`,`right`,`bottom`,`left`],tn=Math.min,nn=Math.max,rn=Math.round,an=Math.floor,on=e=>({x:e,y:e}),sn={left:`right`,right:`left`,bottom:`top`,top:`bottom`},cn={start:`end`,end:`start`};function ln(e,t,n){return nn(e,tn(t,n))}function un(e,t){return typeof e==`function`?e(t):e}function dn(e){return e.split(`-`)[0]}function fn(e){return e.split(`-`)[1]}function pn(e){return e===`x`?`y`:`x`}function mn(e){return e===`y`?`height`:`width`}var hn=new Set([`top`,`bottom`]);function gn(e){return hn.has(dn(e))?`y`:`x`}function _n(e){return pn(gn(e))}function vn(e,t,n){n===void 0&&(n=!1);let r=fn(e),i=_n(e),a=mn(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Dn(o)),[o,Dn(o)]}function yn(e){let t=Dn(e);return[bn(e),t,bn(t)]}function bn(e){return e.replace(/start|end/g,e=>cn[e])}var xn=[`left`,`right`],Sn=[`right`,`left`],Cn=[`top`,`bottom`],wn=[`bottom`,`top`];function Tn(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Sn:xn:t?xn:Sn;case`left`:case`right`:return t?Cn:wn;default:return[]}}function En(e,t,n,r){let i=fn(e),a=Tn(dn(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(bn)))),a}function Dn(e){return e.replace(/left|right|bottom|top/g,e=>sn[e])}function On(e){return{top:0,right:0,bottom:0,left:0,...e}}function kn(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:On(e)}function An(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 jn(e,t,n){let{reference:r,floating:i}=e,a=gn(t),o=_n(t),s=mn(o),c=dn(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(fn(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}var Mn=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=jn(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:o,elements:{reference:e,floating:t}});u=g??u,d=_??d,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=jn(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}};async function Nn(e,t){var n;t===void 0&&(t={});let{x:r,y:i,platform:a,rects:o,elements:s,strategy:c}=e,{boundary:l=`clippingAncestors`,rootBoundary:u=`viewport`,elementContext:d=`floating`,altBoundary:f=!1,padding:p=0}=un(t,e),m=kn(p),h=s[f?d===`floating`?`reference`:`floating`:d],g=An(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(h)))==null||n?h:h.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),_=d===`floating`?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,v=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),y=await(a.isElement==null?void 0:a.isElement(v))&&await(a.getScale==null?void 0:a.getScale(v))||{x:1,y:1},b=An(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:_,offsetParent:v,strategy:c}):_);return{top:(g.top-b.top+m.top)/y.y,bottom:(b.bottom-g.bottom+m.bottom)/y.y,left:(g.left-b.left+m.left)/y.x,right:(b.right-g.right+m.right)/y.x}}var Pn=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}=un(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=dn(r),_=gn(o),v=dn(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Dn(o)]:yn(o)),x=p!==`none`;!d&&x&&b.push(...En(o,m,p,y));let S=[o,...b],C=await Nn(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=vn(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`&&_!==gn(t))||T.every(e=>gn(e.placement)!==_||e.overflows[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=gn(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 Fn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function In(e){return en.some(t=>e[t]>=0)}var Ln=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n}=t,{strategy:r=`referenceHidden`,...i}=un(e,t);switch(r){case`referenceHidden`:{let e=Fn(await Nn(t,{...i,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:In(e)}}}case`escaped`:{let e=Fn(await Nn(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:In(e)}}}default:return{}}}}},Rn=new Set([`left`,`top`]);async function zn(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=dn(n),s=fn(n),c=gn(n)===`y`,l=Rn.has(o)?-1:1,u=a&&c?-1:1,d=un(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 Bn=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 zn(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}}}}},Vn=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=un(e,t),l={x:n,y:r},u=await Nn(t,c),d=gn(dn(i)),f=pn(d),p=l[f],m=l[d];if(a){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=p+u[e],r=p-u[t];p=ln(n,p,r)}if(o){let e=d===`y`?`top`:`left`,t=d===`y`?`bottom`:`right`,n=m+u[e],r=m-u[t];m=ln(n,m,r)}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:o}}}}}},Hn=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}=un(e,t),u={x:n,y:r},d=gn(i),f=pn(d),p=u[f],m=u[d],h=un(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=Rn.has(dn(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}}}},Un=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}=un(e,t),u=await Nn(t,l),d=dn(i),f=fn(i),p=gn(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=tn(h-u[g],v),x=tn(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=nn(u.left,0),t=nn(u.right,0),n=nn(u.top,0),r=nn(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:nn(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:nn(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 Wn(e){let t=Jt(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Mt(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=rn(n)!==a||rn(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Gn(e){return jt(e)?e:e.contextElement}function Kn(e){let t=Gn(e);if(!Mt(t))return on(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Wn(t),o=(a?rn(n.width):n.width)/r,s=(a?rn(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var qn=on(0);function Jn(e){let t=Ot(e);return!Gt()||!t.visualViewport?qn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Yn(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ot(e)?!1:t}function Xn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Gn(e),o=on(1);t&&(r?jt(r)&&(o=Kn(r)):o=Kn(e));let s=Yn(a,n,r)?Jn(a):on(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=Ot(a),t=r&&jt(r)?Ot(r):r,n=e,i=$t(n);for(;i&&r&&t!==n;){let e=Kn(i),t=i.getBoundingClientRect(),r=Jt(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=Ot(i),i=$t(n)}}return An({width:u,height:d,x:c,y:l})}function Zn(e,t){let n=Yt(e).scrollLeft;return t?t.left+n:Xn(kt(e)).left+n}function Qn(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Zn(e,n),y:n.top+t.scrollTop}}function $n(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=kt(r),s=t?zt(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=on(1),u=on(0),d=Mt(r);if((d||!d&&!a)&&((Dt(r)!==`body`||Ft(o))&&(c=Yt(r)),Mt(r))){let e=Xn(r);l=Kn(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Qn(o,c):on(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 er(e){return Array.from(e.getClientRects())}function tr(e){let t=kt(e),n=Yt(e),r=e.ownerDocument.body,i=nn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=nn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Zn(e),s=-n.scrollTop;return Jt(r).direction===`rtl`&&(o+=nn(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var nr=25;function rr(e,t){let n=Ot(e),r=kt(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Gt();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Zn(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<=nr&&(a-=o)}else l<=nr&&(a+=l);return{width:a,height:o,x:s,y:c}}var ir=new Set([`absolute`,`fixed`]);function ar(e,t){let n=Xn(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Mt(e)?Kn(e):on(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function or(e,t,n){let r;if(t===`viewport`)r=rr(e,n);else if(t===`document`)r=tr(kt(e));else if(jt(t))r=ar(t,n);else{let n=Jn(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return An(r)}function sr(e,t){let n=Xt(e);return n===t||!jt(n)||qt(n)?!1:Jt(n).position===`fixed`||sr(n,t)}function cr(e,t){let n=t.get(e);if(n)return n;let r=Qt(e,[],!1).filter(e=>jt(e)&&Dt(e)!==`body`),i=null,a=Jt(e).position===`fixed`,o=a?Xt(e):e;for(;jt(o)&&!qt(o);){let t=Jt(o),n=Ut(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&ir.has(i.position)||Ft(o)&&!n&&sr(e,o))?r=r.filter(e=>e!==o):i=t,o=Xt(o)}return t.set(e,r),r}function lr(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?zt(t)?[]:cr(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=or(t,n,i);return e.top=nn(r.top,e.top),e.right=tn(r.right,e.right),e.bottom=tn(r.bottom,e.bottom),e.left=nn(r.left,e.left),e},or(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function ur(e){let{width:t,height:n}=Wn(e);return{width:t,height:n}}function dr(e,t,n){let r=Mt(t),i=kt(t),a=n===`fixed`,o=Xn(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=on(0);function l(){c.x=Zn(i)}if(r||!r&&!a)if((Dt(t)!==`body`||Ft(i))&&(s=Yt(t)),r){let e=Xn(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?Qn(i,s):on(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 fr(e){return Jt(e).position===`static`}function pr(e,t){if(!Mt(e)||Jt(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return kt(e)===n&&(n=n.ownerDocument.body),n}function mr(e,t){let n=Ot(e);if(zt(e))return n;if(!Mt(e)){let t=Xt(e);for(;t&&!qt(t);){if(jt(t)&&!fr(t))return t;t=Xt(t)}return n}let r=pr(e,t);for(;r&&Lt(r)&&fr(r);)r=pr(r,t);return r&&qt(r)&&fr(r)&&!Ut(r)?n:r||Wt(e)||n}var hr=async function(e){let t=this.getOffsetParent||mr,n=this.getDimensions,r=await n(e.floating);return{reference:dr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gr(e){return Jt(e).direction===`rtl`}var _r={convertOffsetParentRelativeRectToViewportRelativeRect:$n,getDocumentElement:kt,getClippingRect:lr,getOffsetParent:mr,getElementRects:hr,getClientRects:er,getDimensions:ur,getScale:Kn,isElement:jt,isRTL:gr};function vr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function yr(e,t){let n=null,r,i=kt(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=an(d),h=an(i.clientWidth-(u+f)),g=an(i.clientHeight-(d+p)),_=an(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:nn(0,tn(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&&!vr(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 br(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=Gn(e),u=i||a?[...l?Qt(l):[],...Qt(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?yr(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?Xn(e):null;c&&g();function g(){let t=Xn(e);h&&!vr(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 xr=Bn,Sr=Vn,Cr=Pn,wr=Un,Tr=Ln,Er=Hn,Dr=(e,t,n)=>{let r=new Map,i={platform:_r,...n},a={...i.platform,_c:r};return Mn(e,t,{...i,platform:a})},Or=typeof document<`u`?m.useLayoutEffect:function(){};function kr(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(!kr(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)&&!kr(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Ar(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jr(e,t){let n=Ar(e);return Math.round(t*n)/n}function Mr(e){let t=m.useRef(e);return Or(()=>{t.current=e}),t}function Nr(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:l}=e,[u,d]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=m.useState(r);kr(f,r)||p(r);let[h,g]=m.useState(null),[_,v]=m.useState(null),y=m.useCallback(e=>{e!==w.current&&(w.current=e,g(e))},[]),b=m.useCallback(e=>{e!==T.current&&(T.current=e,v(e))},[]),x=a||h,C=o||_,w=m.useRef(null),T=m.useRef(null),E=m.useRef(u),D=c!=null,O=Mr(c),k=Mr(i),A=Mr(l),j=m.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:f};k.current&&(e.platform=k.current),Dr(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!kr(E.current,t)&&(E.current=t,S.flushSync(()=>{d(t)}))})},[f,t,n,k,A]);Or(()=>{l===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let M=m.useRef(!1);Or(()=>(M.current=!0,()=>{M.current=!1}),[]),Or(()=>{if(x&&(w.current=x),C&&(T.current=C),x&&C){if(O.current)return O.current(x,C,j);j()}},[x,C,j,O,D]);let N=m.useMemo(()=>({reference:w,floating:T,setReference:y,setFloating:b}),[y,b]),P=m.useMemo(()=>({reference:x,floating:C}),[x,C]),F=m.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=jr(P.floating,u.x),r=jr(P.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Ar(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,P.floating,u.x,u.y]);return m.useMemo(()=>({...u,update:j,refs:N,elements:P,floatingStyles:F}),[u,j,N,P,F])}var Pr=(e,t)=>({...xr(e),options:[e,t]}),Fr=(e,t)=>({...Sr(e),options:[e,t]}),Ir=(e,t)=>({...Er(e),options:[e,t]}),Lr=(e,t)=>({...Cr(e),options:[e,t]}),Rr=(e,t)=>({...wr(e),options:[e,t]}),zr=(e,t)=>({...Tr(e),options:[e,t]}),Br=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`].join(`,`),Vr=typeof Element>`u`,Hr=Vr?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ur=!Vr&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)==null?void 0:t.call(e)}:function(e){return e?.ownerDocument},Wr=function(e,t){var n;t===void 0&&(t=!0);var r=e==null||(n=e.getAttribute)==null?void 0:n.call(e,`inert`);return r===``||r===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):Wr(e.parentNode))},Gr=function(e){var t,n=e==null||(t=e.getAttribute)==null?void 0:t.call(e,`contenteditable`);return n===``||n===`true`},Kr=function(e,t,n){if(Wr(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Br));return t&&Hr.call(e,Br)&&r.unshift(e),r=r.filter(n),r},qr=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!Wr(a,!1))if(a.tagName===`SLOT`){var o=a.assignedElements(),s=qr(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{Hr.call(a,Br)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!Wr(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=qr(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return r},Jr=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},Yr=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Gr(e))&&!Jr(e)?0:e.tabIndex},Xr=function(e,t){var n=Yr(e);return n<0&&t&&!Jr(e)?0:n},Zr=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Qr=function(e){return e.tagName===`INPUT`},$r=function(e){return Qr(e)&&e.type===`hidden`},ei=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},ti=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},ni=function(e){if(!e.name)return!0;var t=e.form||Ur(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&typeof window.CSS<`u`&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=ti(r,e.form);return!i||i===e},ri=function(e){return Qr(e)&&e.type===`radio`},ii=function(e){return ri(e)&&!ni(e)},ai=function(e){var t=e&&Ur(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=Ur(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},oi=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},si=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(e).visibility===`hidden`)return!0;var i=Hr.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(Hr.call(i,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var a=e;e;){var o=e.parentElement,s=Ur(e);if(o&&!o.shadowRoot&&r(o)===!0)return oi(e);e=e.assignedSlot?e.assignedSlot:!o&&s!==e.ownerDocument?s.host:o}e=a}if(ai(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return oi(e);return!1},ci=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return Hr.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},li=function(e,t){return!(t.disabled||$r(t)||si(t,e)||ei(t)||ci(t))},ui=function(e,t){return!(ii(t)||Yr(t)<0||!li(e,t))},di=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},fi=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=Xr(a,i),s=i?fi(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(Zr).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},pi=function(e,t){t||={};var n;return n=t.getShadowRoot?qr([e],t.includeContainer,{filter:ui.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:di}):Kr(e,t.includeContainer,ui.bind(null,t)),fi(n)},mi=function(e,t){t||={};var n;return n=t.getShadowRoot?qr([e],t.includeContainer,{filter:li.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):Kr(e,t.includeContainer,li.bind(null,t)),n},hi=function(e,t){if(t||={},!e)throw Error(`No node provided`);return Hr.call(e,Br)!==!1&&ui(t,e)},gi=Symbol(`NOT_FOUND`);function _i(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function vi(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!=`object`)throw TypeError(t)}function yi(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var bi=e=>Array.isArray(e)?e:[e];function xi(e){let t=Array.isArray(e[0])?e[0]:e;return yi(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function Si(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function Ci(e){let t;return{get(n){return t&&e(t.key,n)?t.value:gi},put(e,n){t={key:e,value:n}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function wi(e,t){let n=[];function r(e){let r=n.findIndex(n=>t(e,n.key));if(r>-1){let e=n[r];return r>0&&(n.splice(r,1),n.unshift(e)),e.value}return gi}function i(t,i){r(t)===gi&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())}function a(){return n}function o(){n=[]}return{get:r,put:i,getEntries:a,clear:o}}var Ti=(e,t)=>e===t;function Ei(e){return function(t,n){if(t===null||n===null||t.length!==n.length)return!1;let{length:r}=t;for(let i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}}function Di(e,t){let{equalityCheck:n=Ti,maxSize:r=1,resultEqualityCheck:i}=typeof t==`object`?t:{equalityCheck:t},a=Ei(n),o=0,s=r<=1?Ci(a):wi(r,a);function c(){let t=s.get(arguments);if(t===gi){if(t=e.apply(null,arguments),o++,i){let e=s.getEntries().find(e=>i(e.value,t));e&&(t=e.value,o!==0&&o--)}s.put(arguments,t)}return t}return c.clearCache=()=>{s.clear(),c.resetResultsCount()},c.resultsCount=()=>o,c.resetResultsCount=()=>{o=0},c}var Oi=class{constructor(e){this.value=e}deref(){return this.value}},ki=typeof WeakRef<`u`?WeakRef:Oi,Ai=0,ji=1;function Mi(){return{s:Ai,v:void 0,o:null,p:null}}function Ni(e,t={}){let n=Mi(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=Mi(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=Mi(),e.set(n,t)):t=r}}let s=t,c;if(t.s===ji)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=i?.deref?.()??i;e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new ki(c):c}return s.s=ji,s.v=c,c}return o.clearCache=()=>{n=Mi(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Pi(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),_i(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=Ni,argsMemoizeOptions:u=[],devModeChecks:d={}}={...n,...a},f=bi(c),p=bi(u),m=xi(e),h=s(function(){return t++,o.apply(null,arguments)},...f),g=l(function(){r++;let e=Si(m,arguments);return i=h.apply(null,e),i},...p);return Object.assign(g,{resultFunc:o,memoizedResultFunc:h,dependencies:m,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var Fi=Pi(Ni),Ii=Object.assign((e,t=Fi)=>{vi(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e);return t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}))},{withTypes:()=>Ii}),Li={exports:{}},Ri={},zi;function Bi(){if(zi)return Ri;zi=1;var e=m.default;function t(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var n=typeof Object.is==`function`?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function s(e,t){var n=t(),s=r({inst:{value:n,getSnapshot:t}}),l=s[0].inst,u=s[1];return a(function(){l.value=n,l.getSnapshot=t,c(l)&&u({inst:l})},[e,n,t]),i(function(){return c(l)&&u({inst:l}),e(function(){c(l)&&u({inst:l})})},[e]),o(n),n}function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch{return!0}}function l(e,t){return t()}var u=typeof window>`u`||typeof window.document>`u`||typeof window.document.createElement>`u`?l:s;return Ri.useSyncExternalStore=e.useSyncExternalStore===void 0?u:e.useSyncExternalStore,Ri}var Vi;function Hi(){return Vi||(Vi=1,Li.exports=Bi()),Li.exports}var Ui=Hi(),Wi={exports:{}},Gi={},Ki;function qi(){if(Ki)return Gi;Ki=1;var e=m.default,t=Hi();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,c=e.useDebugValue;return Gi.useSyncExternalStoreWithSelector=function(e,t,n,l,u){var d=a(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s(function(){function e(e){if(!i){if(i=!0,a=e,e=l(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return o=t}return o=e}if(t=o,r(a,e))return t;var n=l(e);return u!==void 0&&u(t,n)?(a=e,t):(a=e,o=n)}var i=!1,a,o,s=n===void 0?null:n;return[function(){return e(t())},s===null?void 0:function(){return e(s())}]},[t,n,l,u]);var p=i(e,d[0],d[1]);return o(function(){f.hasValue=!0,f.value=p},[p]),c(p),p},Gi}var Ji;function Yi(){return Ji||(Ji=1,Wi.exports=qi()),Wi.exports}var Xi=Yi(),Zi={};function Qi(e,t){let n=m.useRef(Zi);return n.current===Zi&&(n.current=e(t)),n}var $i=[],ea;function ta(){return ea}function na(e){$i.push(e)}function ra(e){let t=(t,n)=>{let r=Qi(aa).current,i;try{ea=r;for(let e of $i)e.before(r);i=e(t,n);for(let e of $i)e.after(r);r.didInitialize=!0}finally{ea=void 0}return i};return t.displayName=e.displayName||e.name,t}function ia(e){return m.forwardRef(ra(e))}function aa(){return{didInitialize:!1}}function oa(e){let t=m.useRef(!0);t.current&&(t.current=!1,e())}var q=typeof document<`u`?m.useLayoutEffect:()=>{};function sa(e,...t){let n=new URL(`https://base-ui.com/production-error`);return n.searchParams.set(`code`,e.toString()),t.forEach(e=>n.searchParams.append(`args[]`,e)),`Base UI error #${e}; visit ${n} for the full message.`}var ca=m.createContext(void 0);function la(e){let t=m.useContext(ca);if(t===void 0&&!e)throw Error(sa(72));return t}var ua=[];function da(e){m.useEffect(e,ua)}var fa=0,pa=class e{static create(){return new e}currentId=fa;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=fa,t()},e)}isStarted(){return this.currentId!==fa}clear=()=>{this.currentId!==fa&&(clearTimeout(this.currentId),this.currentId=fa)};disposeEffect=()=>this.clear};function ma(){let e=Qi(pa.create).current;return da(e.disposeEffect),e}function ha(e){let t=Qi(ga,e).current;return t.next=e,q(t.effect),t}function ga(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var _a=m[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],va=_a&&_a!==m.useLayoutEffect?_a:e=>e();function J(e){let t=Qi(ya).current;return t.next=e,va(t.effect),t.trampoline}function ya(){let e={next:void 0,callback:ba,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function ba(){}function xa(e){return e?.ownerDocument||document}var Sa=typeof navigator<`u`,Ca=Ma(),wa=Pa(),Ta=Na(),Ea=typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter:none`),Da=Ca.platform===`MacIntel`&&Ca.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(Ca.platform);Sa&&/firefox/i.test(Ta);var Oa=Sa&&/apple/i.test(navigator.vendor),ka=Sa&&/android/i.test(wa)||/android/i.test(Ta),Aa=Sa&&wa.toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints,ja=Ta.includes(`jsdom/`);function Ma(){if(!Sa)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function Na(){if(!Sa)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function Pa(){if(!Sa)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}var Fa=`data-base-ui-focusable`,Ia=`active`,La=`selected`,Ra=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,za=`ArrowLeft`,Ba=`ArrowRight`,Va=`ArrowUp`,Ha=`ArrowDown`;function Ua(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Wa(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Nt(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Ga(e,t){if(!jt(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(Wa(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function Ka(e){return`composedPath`in e?e.composedPath()[0]:e.target}function qa(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Ja(e){return e.matches(`html,body`)}function Ya(e){return Mt(e)&&e.matches(Ra)}function Xa(e){return e?e.getAttribute(`role`)===`combobox`&&Ya(e):!1}function Za(e){if(!e||ja)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Qa(e){return e?e.hasAttribute(Fa)?e:e.querySelector(`[${Fa}]`)||e:null}function $a(e,t,n=!0){return e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...$a(e,t.id,n)])}function eo(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function to(e){e.preventDefault(),e.stopPropagation()}function no(e){return`nativeEvent`in e}function ro(e){return e.pointerType===``&&e.isTrusted?!0:ka&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function io(e){return ja?!1:!ka&&e.width===0&&e.height===0||ka&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function ao(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function oo(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function so(e,t,n){return Math.floor(e/t)!==n}function co(e,t){return t<0||t>=e.current.length}function lo(e,t){return fo(e,{disabledIndices:t})}function uo(e,t){return fo(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function fo(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.current.length-1&&_o(e,a,r));return a}function po(e,{event:t,orientation:n,loopFocus:r,rtl:i,cols:a,disabledIndices:o,minIndex:s,maxIndex:c,prevIndex:l,stopEvent:u=!1}){let d=l,f=[],p={},m=!1;{let t=null,n=-1;e.current.forEach((e,r)=>{if(e==null)return;let i=e.closest(`[role="row"]`);i&&(m=!0),(i!==t||n===-1)&&(t=i,n+=1,f[n]=[]),f[n].push(r),p[r]=n})}let h=m&&f.length>0&&f.some(e=>e.length!==a);function g(t){if(!h||l===-1)return;let n=p[l];if(n==null)return;let i=f[n].indexOf(l),a=t===`up`?n-1:n+1;r&&(a<0?a=f.length-1:a>=f.length&&(a=0));let s=new Set;for(;a>=0&&a<f.length&&!s.has(a);){s.add(a);let n=f[a];if(n.length===0){a=t===`up`?a-1:a+1;continue}let c=Math.min(i,n.length-1);for(let t=c;t>=0;--t){let r=n[t];if(!_o(e,r,o))return r}a=t===`up`?a-1:a+1,r&&(a<0?a=f.length-1:a>=f.length&&(a=0))}}if(t.key===Va){let n=g(`up`);if(n!==void 0)u&&to(t),d=n;else{if(u&&to(t),l===-1)d=c;else if(d=fo(e,{startingIndex:d,amount:a,decrement:!0,disabledIndices:o}),r&&(l-a<s||d<0)){let e=l%a,t=c%a,n=c-(t-e);d=t===e?c:t>e?n:n-a}co(e,d)&&(d=l)}}if(t.key===Ha){let n=g(`down`);n===void 0?(u&&to(t),l===-1?d=s:(d=fo(e,{startingIndex:l,amount:a,disabledIndices:o}),r&&l+a>c&&(d=fo(e,{startingIndex:l%a-a,amount:a,disabledIndices:o}))),co(e,d)&&(d=l)):(u&&to(t),d=n)}if(n===`both`){let n=an(l/a);t.key===(i?za:Ba)&&(u&&to(t),l%a===a-1?r&&(d=fo(e,{startingIndex:l-l%a-1,disabledIndices:o})):(d=fo(e,{startingIndex:l,disabledIndices:o}),r&&so(d,a,n)&&(d=fo(e,{startingIndex:l-l%a-1,disabledIndices:o}))),so(d,a,n)&&(d=l)),t.key===(i?Ba:za)&&(u&&to(t),l%a===0?r&&(d=fo(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o})):(d=fo(e,{startingIndex:l,decrement:!0,disabledIndices:o}),r&&so(d,a,n)&&(d=fo(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o}))),so(d,a,n)&&(d=l));let s=an(c/a)===n;co(e,d)&&(d=r&&s?t.key===(i?Ba:za)?c:fo(e,{startingIndex:l-l%a-1,disabledIndices:o}):l)}return d}function mo(e,t,n){let r=[],i=0;return e.forEach(({width:e,height:a},o)=>{let s=!1;for(n&&(i=0);!s;){let n=[];for(let r=0;r<e;r+=1)for(let e=0;e<a;e+=1)n.push(i+r+e*t);i%t+e<=t&&n.every(e=>r[e]==null)?(n.forEach(e=>{r[e]=o}),s=!0):i+=1}}),[...r]}function ho(e,t,n,r,i){if(e===-1)return-1;let a=n.indexOf(e),o=t[e];switch(i){case`tl`:return a;case`tr`:return o?a+o.width-1:a;case`bl`:return o?a+(o.height-1)*r:a;case`br`:return n.lastIndexOf(e);default:return-1}}function go(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function _o(e,t,n){if(typeof n==`function`)return n(t);if(n)return n.includes(t);let r=e.current[t];return r?r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`:!1}var vo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`});function yo(e,t){let n=pi(e,vo()),r=n.length;if(r===0)return;let i=Ua(xa(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function bo(e){return yo(xa(e).body,1)||e}function xo(e){return yo(xa(e).body,-1)||e}function So(e,t){if(!e)return null;let n=pi(xa(e).body,vo()),r=n.length;if(r===0)return null;let i=n.indexOf(e);return i===-1?null:n[(i+t+r)%r]}function Co(e){return So(e,1)}function wo(e){return So(e,-1)}function To(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Wa(n,r)}function Eo(e){pi(e,vo()).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Do(e){e.querySelectorAll(`[data-tabindex]`).forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var Oo={...m},ko=0;function Ao(e,t=`mui`){let[n,r]=m.useState(e),i=e||n;return m.useEffect(()=>{n??(ko+=1,r(`${t}-${ko}`))},[n,t]),i}var jo=Oo.useId;function Mo(e,t){if(jo!==void 0){let n=jo();return e??(t?`${t}-${n}`:n)}return Ao(e,t)}function No(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var Po=class{nodesRef={current:[]};events=No();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},Fo=m.createContext(null),Io=m.createContext(null),Lo=()=>m.useContext(Fo)?.id||null,Ro=e=>{let t=m.useContext(Io);return e??t};function zo(e){let t=Mo(),n=Ro(e),r=Lo();return q(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Bo(e){let{children:t,id:n}=e,r=Lo();return(0,p.jsx)(Fo.Provider,{value:m.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Vo(e){let{children:t,externalTree:n}=e,r=Qi(()=>n??new Po).current;return(0,p.jsx)(Io.Provider,{value:r,children:t})}function Ho(){}var Uo=Object.freeze([]),Wo=Object.freeze({}),Go=500,Ko=500,qo={style:{transition:`none`}},Jo=`data-base-ui-click-trigger`,Yo={fallbackAxisSide:`none`},Xo={fallbackAxisSide:`end`},Zo={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Qo=`none`,$o=`trigger-press`,es=`trigger-hover`,ts=`trigger-focus`,ns=`outside-press`,rs=`item-press`,is=`close-press`,as=`focus-out`,os=`escape-key`,ss=`list-navigation`,cs=`cancel-open`,ls=`sibling-open`,us=`disabled`,ds=`imperative-action`,fs=`window-resize`;function Y(e,t,n,r){let i=!1,a=!1,o=r??Wo;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function ps(e){return`data-base-ui-${e}`}ps(`safe-polygon`),`${Ra}`;function ms(e,t,n){if(n&&!ao(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}var hs=m.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new pa,currentIdRef:{current:null},currentContextRef:{current:null}});function gs(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=m.useRef(n),a=m.useRef(n),o=m.useRef(null),s=m.useRef(null),c=ma();return(0,p.jsx)(hs.Provider,{value:m.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function _s(e,t={open:!1}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`floatingId`),{open:i}=t,{currentIdRef:a,delayRef:o,timeoutMs:s,initialDelayRef:c,currentContextRef:l,hasProvider:u,timeout:d}=m.useContext(hs),[f,p]=m.useState(!1);return q(()=>{function e(){p(!1),l.current?.setIsInstantPhase(!1),a.current=null,l.current=null,o.current=c.current}if(a.current&&!i&&a.current===r){if(p(!1),s){let t=r;return d.start(s,()=>{n.select(`open`)||a.current&&a.current!==t||e()}),()=>{d.clear()}}e()}},[i,r,a,o,s,c,l,d,n]),q(()=>{if(!i)return;let e=l.current,t=a.current;d.clear(),l.current={onOpenChange:n.setOpen,setIsInstantPhase:p},a.current=r,o.current={open:0,close:ms(c.current,`close`)},t!==null&&t!==r?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,Y(Qo))):(p(!1),e?.setIsInstantPhase(!1))},[i,r,n,a,o,s,c,l,d]),q(()=>()=>{l.current=null},[l]),m.useMemo(()=>({hasProvider:u,delayRef:o,isInstantPhase:f}),[u,o,f])}function vs(e,t,n,r){let i=Qi(bs).current;return xs(i,e,t,n,r)&&Cs(i,[e,t,n,r]),i.callback}function ys(e){let t=Qi(bs).current;return Ss(t,e)&&Cs(t,e),t.callback}function bs(){return{callback:null,cleanup:null,refs:[]}}function xs(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Ss(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function Cs(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break}}}}}}var ws={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Ts={...ws,position:`fixed`,top:0,left:0},Es={...ws,position:`absolute`},Ds=null;globalThis.requestAnimationFrame;var Os=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},ks=class e{static create(){return new e}static request(e){return Os.request(e)}static cancel(e){return Os.cancel(e)}currentId=Ds;request(e){this.cancel(),this.currentId=Os.request(()=>{this.currentId=Ds,e()})}cancel=()=>{this.currentId!==Ds&&(Os.cancel(this.currentId),this.currentId=Ds)};disposeEffect=()=>this.cancel};function As(){let e=Qi(ks.create).current;return da(e.disposeEffect),e}var js=m.forwardRef(function(e,t){let[n,r]=m.useState();return q(()=>{Oa&&r(`button`)},[]),(0,p.jsx)(`span`,{...e,ref:t,style:Ts,"aria-hidden":!n||void 0,tabIndex:0,role:n,"data-base-ui-focus-guard":``})}),Ms=0;function Ns(e,t={}){let{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(Ms);let a=()=>e?.focus({preventScroll:n});i?a():Ms=requestAnimationFrame(a)}var Ps={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Fs(e){return e===`inert`?Ps.inert:e===`aria-hidden`?Ps[`aria-hidden`]:Ps.none}var Is=new WeakSet,Ls={},Rs=0,zs=e=>e&&(e.host||zs(e.parentNode)),Bs=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=zs(t);return e.contains(n)?n:null}).filter(e=>e!=null);function Vs(e,t,n,r){let i=`data-base-ui-inert`,a=r?`inert`:n?`aria-hidden`:null,o=Bs(t,e),s=new Set,c=new Set(o),l=[];Ls[i]||(Ls[i]=new WeakMap);let u=Ls[i];o.forEach(d),f(t),s.clear();function d(e){!e||s.has(e)||(s.add(e),e.parentNode&&d(e.parentNode))}function f(e){!e||c.has(e)||[].forEach.call(e.children,e=>{if(Dt(e)!==`script`)if(s.has(e))f(e);else{let t=a?e.getAttribute(a):null,n=t!==null&&t!==`false`,r=Fs(a),o=(r.get(e)||0)+1,s=(u.get(e)||0)+1;r.set(e,o),u.set(e,s),l.push(e),o===1&&n&&Is.add(e),s===1&&e.setAttribute(i,``),!n&&a&&e.setAttribute(a,a===`inert`?``:`true`)}})}return Rs+=1,()=>{l.forEach(e=>{let t=Fs(a),n=(t.get(e)||0)-1,r=(u.get(e)||0)-1;t.set(e,n),u.set(e,r),n||(!Is.has(e)&&a&&e.removeAttribute(a),Is.delete(e)),r||e.removeAttribute(i)}),--Rs,Rs||(Ps.inert=new WeakMap,Ps[`aria-hidden`]=new WeakMap,Ps.none=new WeakMap,Is=new WeakSet,Ls={})}}function Hs(e,t=!1,n=!1){let r=xa(e[0]).body;return Vs(e.concat(Array.from(r.querySelectorAll(`[aria-live]`))),r,t,n)}var Us=19;function Ws(e){return Us>=e}function Gs(e){if(!m.isValidElement(e))return null;let t=e,n=t.props;return(Ws(19)?n?.ref:t.ref)??null}function Ks(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function qs(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function Js(e,t){return typeof e==`function`?e(t):e}function Ys(e,t){return typeof e==`function`?e(t):e}var Xs={};function Zs(e,t,n,r,i){let a={...rc(e,Xs)};return t&&(a=$s(a,t)),n&&(a=$s(a,n)),r&&(a=$s(a,r)),i&&(a=$s(a,i)),a}function Qs(e){if(e.length===0)return Xs;if(e.length===1)return rc(e[0],Xs);let t={...rc(e[0],Xs)};for(let n=1;n<e.length;n+=1)t=$s(t,e[n]);return t}function $s(e,t){return nc(t)?t(e):ec(e,t)}function ec(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=Ks(e.style,r);break;case`className`:e[n]=oc(e.className,r);break;default:tc(n,r)?e[n]=ic(e[n],r):e[n]=r}}return e}function tc(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||typeof t>`u`)}function nc(e){return typeof e==`function`}function rc(e,t){return nc(e)?e(t):e??Xs}function ic(e,t){return t?e?n=>{if(sc(n)){let r=n;ac(r);let i=t(r);return r.baseUIHandlerPrevented||e?.(r),i}let r=t(n);return e?.(n),r}:t:e}function ac(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function oc(e,t){return t?e?t+` `+e:t:e}function sc(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function X(e,t,n={}){let r=t.render,i=cc(t,n);return n.enabled===!1?null:uc(e,r,i,n.state??Wo)}function cc(e,t={}){let{className:n,style:r,render:i}=e,{state:a=Wo,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?Js(n,a):void 0,d=l?Ys(r,a):void 0,f=l?qs(a,c):Wo,p=l?Ks(f,Array.isArray(s)?Qs(s):s)??Wo:Wo;return typeof document<`u`&&(l?Array.isArray(o)?p.ref=ys([p.ref,Gs(i),...o]):p.ref=vs(p.ref,Gs(i),o):vs(null,null)),l?(u!==void 0&&(p.className=oc(p.className,u)),d!==void 0&&(p.style=Ks(p.style,d)),p):Wo}var lc=Symbol.for(`react.lazy`);function uc(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=Zs(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===lc&&(i=m.Children.toArray(t)[0]),m.cloneElement(i,e)}if(e&&typeof e==`string`)return dc(e,n);throw Error(sa(8))}function dc(e,t){return e===`button`?(0,m.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,m.createElement)(`img`,{alt:``,...t,key:t.key}):m.createElement(e,t)}var fc=m.createContext(null),pc=()=>m.useContext(fc),mc=ps(`portal`);function hc(e={}){let{ref:t,container:n,componentProps:r=Wo,elementProps:i}=e,a=Mo(),o=pc()?.portalNode,[s,c]=m.useState(null),[l,u]=m.useState(null),d=J(e=>{e!==null&&u(e)}),f=m.useRef(null);q(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}if(a==null)return;let e=(n&&(At(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o,a]);let p=X(`div`,r,{ref:[t,d],props:[{id:a,[mc]:``},i]});return{portalNode:l,portalSubtree:s&&p?S.createPortal(p,s):null}}var gc=m.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,renderGuards:o,...s}=e,{portalNode:c,portalSubtree:l}=hc({container:r,ref:t,componentProps:e,elementProps:s}),u=m.useRef(null),d=m.useRef(null),f=m.useRef(null),h=m.useRef(null),[g,_]=m.useState(null),v=g?.modal,y=g?.open,b=typeof o==`boolean`?o:!!g&&!g.modal&&g.open&&!!c;m.useEffect(()=>{if(!c||v)return;function e(e){c&&e.relatedTarget&&To(e)&&(e.type===`focusin`?Do:Eo)(c)}return c.addEventListener(`focusin`,e,!0),c.addEventListener(`focusout`,e,!0),()=>{c.removeEventListener(`focusin`,e,!0),c.removeEventListener(`focusout`,e,!0)}},[c,v]),m.useEffect(()=>{!c||y||Do(c)},[y,c]);let x=m.useMemo(()=>({beforeOutsideRef:u,afterOutsideRef:d,beforeInsideRef:f,afterInsideRef:h,portalNode:c,setFocusManagerState:_}),[c]);return(0,p.jsxs)(m.Fragment,{children:[l,(0,p.jsxs)(fc.Provider,{value:x,children:[b&&c&&(0,p.jsx)(js,{"data-type":`outside`,ref:u,onFocus:e=>{To(e,c)?f.current?.focus():xo(g?g.domReference:null)?.focus()}}),b&&c&&(0,p.jsx)(`span`,{"aria-owns":c.id,style:Zo}),c&&S.createPortal(n,c),b&&c&&(0,p.jsx)(js,{"data-type":`outside`,ref:d,onFocus:e=>{To(e,c)?h.current?.focus():(bo(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,Y(as,e.nativeEvent)))}})]})]})});function _c(e){return e==null?e:`current`in e?e.current:e}function vc(e,t){let n=Ot(e.target);return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var yc=20,bc=[];function xc(){bc=bc.filter(e=>e.deref()?.isConnected)}function Sc(e){xc(),e&&Dt(e)!==`body`&&(bc.push(new WeakRef(e)),bc.length>yc&&(bc=bc.slice(-20)))}function Cc(){return xc(),bc[bc.length-1]?.deref()}function wc(e){if(!e)return null;let t=vo();return hi(e,t)?e:pi(e,t)[0]||e}function Tc(e){return!e||!e.isConnected?!1:typeof e.checkVisibility==`function`?e.checkVisibility():Jt(e).display!==`none`}function Ec(e,t){if(!t.current.includes(`floating`)&&!e.getAttribute(`role`)?.includes(`dialog`))return;let n=vo(),r=mi(e,n).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return hi(e,n)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),i=e.getAttribute(`tabindex`);t.current.includes(`floating`)||r.length===0?i!==`0`&&e.setAttribute(`tabindex`,`0`):(i!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function Dc(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:h}=e,g=`rootStore`in t?t.rootStore:t,_=g.useState(`open`),v=g.useState(`domReferenceElement`),y=g.useState(`floatingElement`),{events:b,dataRef:x}=g.context,S=J(()=>x.current.floatingContext?.nodeId),C=i===!1,w=Xa(v)&&C,T=m.useRef([`content`]),E=ha(i),D=ha(a),O=ha(l),k=Ro(h),A=pc(),j=m.useRef(null),M=m.useRef(null),N=m.useRef(!1),P=m.useRef(!1),F=m.useRef(!1),I=m.useRef(-1),L=m.useRef(``),R=m.useRef(``),z=m.useRef(null),B=m.useRef(null),V=vs(z,f,A?.beforeInsideRef),H=vs(B,A?.afterInsideRef),U=ma(),ee=ma(),te=As(),ne=A!=null,W=Qa(y),re=J((e=W)=>e?pi(e,vo()):[]),ie=J(e=>{let t=re(e);return T.current.map(()=>t).filter(Boolean).flat()});m.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&Wa(W,Ua(xa(W)))&&re().length===0&&!w&&to(e)}let t=xa(W);return t.addEventListener(`keydown`,e),()=>{t.removeEventListener(`keydown`,e)}},[r,v,W,s,T,w,re,ie]),m.useEffect(()=>{if(r||!_)return;let e=xa(W);function t(){F.current=!1}function n(e){let t=Ka(e),n=Wa(y,t)||Wa(v,t)||Wa(A?.portalNode,t);F.current=!n,R.current=e.pointerType||`keyboard`,t?.closest(`[${Jo}]`)&&(P.current=!0)}function i(){R.current=`keyboard`}return e.addEventListener(`pointerdown`,n,!0),e.addEventListener(`pointerup`,t,!0),e.addEventListener(`pointercancel`,t,!0),e.addEventListener(`keydown`,i,!0),()=>{e.removeEventListener(`pointerdown`,n,!0),e.removeEventListener(`pointerup`,t,!0),e.removeEventListener(`pointercancel`,t,!0),e.removeEventListener(`keydown`,i,!0)}},[r,y,v,W,_,A]),m.useEffect(()=>{if(r||!c)return;let e=xa(W);function t(){P.current=!0,ee.start(0,()=>{P.current=!1})}function n(e){let t=Ka(e),n=re().indexOf(t);n!==-1&&(I.current=n)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=Ka(t);queueMicrotask(()=>{let a=S(),c=g.context.triggerElements,l=n?.hasAttribute(ps(`focus-guard`))&&[z.current,B.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,_c(d),_c(u)].includes(n),f=!(Wa(v,n)||Wa(y,n)||Wa(n,y)||Wa(A?.portalNode,n)||n!=null&&c.hasElement(n)||c.hasMatchingElement(e=>Wa(e,n))||l||k&&($a(k.nodesRef.current,a).find(e=>Wa(e.context?.elements.floating,n)||Wa(e.context?.elements.domReference,n))||eo(k.nodesRef.current,a).find(e=>[e.context?.elements.floating,Qa(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===v&&W&&Ec(W,T),o&&r!==v&&!Tc(i)&&Ua(e)===e.body){if(Mt(W)&&(W.focus(),o===`popup`)){te.request(()=>{W.focus()});return}let e=I.current,t=re(),n=t[e]||t[t.length-1]||W;Mt(n)&&n.focus()}if(x.current.insideReactTree){x.current.insideReactTree=!1;return}(w||!s)&&n&&f&&!P.current&&(w||n!==Cc())&&(N.current=!0,g.setOpen(!1,Y(as,t)))})}function a(){F.current||(x.current.insideReactTree=!0,U.start(0,()=>{x.current.insideReactTree=!1}))}let l=Mt(v)?v:null,f=[];if(!(!y&&!l))return l&&(l.addEventListener(`focusout`,i),l.addEventListener(`pointerdown`,t),f.push(()=>{l.removeEventListener(`focusout`,i),l.removeEventListener(`pointerdown`,t)})),y&&(y.addEventListener(`focusin`,n),y.addEventListener(`focusout`,i),A&&(y.addEventListener(`focusout`,a,!0),f.push(()=>{y.removeEventListener(`focusout`,a,!0)})),f.push(()=>{y.removeEventListener(`focusin`,n),y.removeEventListener(`focusout`,i)})),()=>{f.forEach(e=>{e()})}},[r,v,y,W,s,k,A,g,c,o,re,w,S,T,x,U,ee,te,u,d]),m.useEffect(()=>{if(r||!y||!_)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${ps(`portal`)}]`)||[]),t=(k?eo(k.nodesRef.current,S()):[]).find(e=>Xa(e.context?.elements.domReference||null))?.context?.elements.domReference;return Hs([y,t,...e,j.current,M.current,z.current,B.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,_c(d),_c(u),w?v:null].filter(e=>e!=null),s||w)},[_,r,v,y,s,T,A,w,k,S,u,d]),q(()=>{if(!_||r||!Mt(W))return;let e=Ua(xa(W));queueMicrotask(()=>{let t=ie(W),n=E.current,r=typeof n==`function`?n(O.current||``):n;if(r===void 0||r===!1)return;let i;i=r===!0||r===null?t[0]||W:_c(r),i=i||t[0]||W,!Wa(W,e)&&Ns(i,{preventScroll:i===W})})},[r,_,W,C,ie,E,O]),q(()=>{if(r||!W)return;let e=xa(W);Sc(Ua(e));function t(e){if(e.open||(L.current=vc(e.nativeEvent,R.current)),e.reason===es&&e.nativeEvent.type===`mouseleave`&&(N.current=!0),e.reason===ns)if(e.nested)N.current=!1;else if(ro(e.nativeEvent)||io(e.nativeEvent))N.current=!1;else{let e=!1;document.createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?N.current=!1:N.current=!0}}b.on(`openchange`,t);let n=e.createElement(`span`);n.setAttribute(`tabindex`,`-1`),n.setAttribute(`aria-hidden`,`true`),Object.assign(n.style,Ts),ne&&v&&v.insertAdjacentElement(`afterend`,n);function i(){let e=D.current,t=typeof e==`function`?e(L.current):e;if(t===void 0||t===!1)return null;if(t===null&&(t=!0),typeof t==`boolean`){let e=v||Cc();return e&&e.isConnected?e:n}let r=v||Cc()||n;return _c(t)||r}return()=>{b.off(`openchange`,t);let r=Ua(e),a=Wa(y,r)||k&&$a(k.nodesRef.current,S(),!1).some(e=>Wa(e.context?.elements.floating,r)),o=i();queueMicrotask(()=>{let t=wc(o),i=typeof D.current!=`boolean`;D.current&&!N.current&&Mt(t)&&(!(!i&&t!==r&&r!==e.body)||a)&&t.focus({preventScroll:!0}),n.remove(),N.current=!1})}},[r,y,W,D,x,b,k,ne,v,S]),q(()=>{if(!Ea||_||!y)return;let e=Ua(xa(y));!Mt(e)||!Ya(e)||Wa(y,e)&&e.blur()},[_,y]),q(()=>{if(!(r||!A))return A.setFocusManagerState({modal:s,closeOnFocusOut:c,open:_,onOpenChange:g.setOpen,domReference:v}),()=>{A.setFocusManagerState(null)}},[r,A,s,_,g,c,v]),q(()=>{if(!(r||!W))return Ec(W,T),()=>{queueMicrotask(xc)}},[r,W,T]);let ae=!r&&(!s||!w)&&(ne||s);return(0,p.jsxs)(m.Fragment,{children:[ae&&(0,p.jsx)(js,{"data-type":`inside`,ref:V,onFocus:e=>{if(s){let e=ie();Ns(e[e.length-1])}else A?.portalNode&&(N.current=!1,To(e,A.portalNode)?bo(v)?.focus():_c(d??A.beforeOutsideRef)?.focus())}}),n,ae&&(0,p.jsx)(js,{"data-type":`inside`,ref:H,onFocus:e=>{s?Ns(ie()[0]):A?.portalNode&&(c&&(N.current=!0),To(e,A.portalNode)?xo(v)?.focus():_c(u??A.afterOutsideRef)?.focus())}})]})}function Oc(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:a=`click`,toggle:o=!0,ignoreMouse:s=!1,stickIfOpen:c=!0,touchOpenDelay:l=0,reason:u=$o}=t,d=m.useRef(void 0),f=As(),p=ma(),h=m.useMemo(()=>({onPointerDown(e){d.current=e.pointerType},onMouseDown(e){let t=d.current,i=e.nativeEvent,m=n.select(`open`);if(e.button!==0||a===`click`||ao(t,!0)&&s)return;let h=r.current.openEvent,g=h?.type,_=n.select(`domReferenceElement`)!==e.currentTarget,v=m&&_||!(m&&o&&(!(h&&c)||g===`click`||g===`mousedown`));if(Ya(i.target)){let e=Y(u,i,i.target);v&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,e)}):n.setOpen(v,e);return}let y=e.currentTarget;f.request(()=>{let e=Y(u,i,y);v&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,e)}):n.setOpen(v,e)})},onClick(e){if(a===`mousedown-only`)return;let t=d.current;if(a===`mousedown`&&t){d.current=void 0;return}if(ao(t,!0)&&s)return;let i=n.select(`open`),f=r.current.openEvent,m=n.select(`domReferenceElement`)!==e.currentTarget,h=i&&m||!(i&&o&&(!(f&&c)||oo(f))),g=Y(u,e.nativeEvent,e.currentTarget);h&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,g)}):n.setOpen(h,g)},onKeyDown(){d.current=void 0}}),[r,a,s,n,c,o,f,p,l,u]);return m.useMemo(()=>i?{reference:h}:Wo,[i,h])}function kc(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=a.width,u=a.height,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,l=0,u=0,!i||c?(l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f):i&&!c&&(u=t.axis===`x`?a.height:u,l=t.axis===`y`?a.width:l),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function Ac(e){return e!=null&&e.clientX!=null}function jc(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),o=n.context.dataRef,{enabled:s=!0,axis:c=`both`}=t,l=m.useRef(!1),u=m.useRef(null),[d,f]=m.useState(),[p,h]=m.useState([]),g=J((e,t,r)=>{l.current||o.current.openEvent&&!Ac(o.current.openEvent)||n.set(`positionReference`,kc(r??a,{x:e,y:t,axis:c,dataRef:o,pointerType:d}))}),_=J(e=>{r?u.current||h([]):g(e.clientX,e.clientY,e.currentTarget)}),v=ao(d)?i:r,y=m.useCallback(()=>{if(!v||!s)return;let e=Ot(i);function t(n){let r=Ka(n);Wa(i,r)?(e.removeEventListener(`mousemove`,t),u.current=null):g(n.clientX,n.clientY)}if(!o.current.openEvent||Ac(o.current.openEvent)){e.addEventListener(`mousemove`,t);let n=()=>{e.removeEventListener(`mousemove`,t),u.current=null};return u.current=n,n}n.set(`positionReference`,a)},[v,s,i,o,a,n,g]);m.useEffect(()=>y(),[y,p]),m.useEffect(()=>{s&&!i&&(l.current=!1)},[s,i]),m.useEffect(()=>{!s&&r&&(l.current=!0)},[s,r]);let b=m.useMemo(()=>{function e(e){f(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:_,onMouseEnter:_}},[_]);return m.useMemo(()=>s?{reference:b,trigger:b}:{},[s,b])}var Mc={intentional:`onClick`,sloppy:`onPointerDown`};function Nc(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Pc(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`referenceElement`),o=n.useState(`domReferenceElement`),{onOpenChange:s,dataRef:c}=n.context,{enabled:l=!0,escapeKey:u=!0,outsidePress:d=!0,outsidePressEvent:f=`sloppy`,referencePress:p=!1,referencePressEvent:h=`sloppy`,ancestorScroll:g=!1,bubbles:_,externalTree:v}=t,y=Ro(v),b=J(typeof d==`function`?d:()=>!1),x=typeof d==`function`?b:d,S=m.useRef(!1),{escapeKey:C,outsidePress:w}=Nc(_),T=m.useRef(null),E=ma(),D=ma(),O=J(()=>{D.clear(),c.current.insideReactTree=!1}),k=m.useRef(!1),A=m.useRef(``),j=J(e=>{A.current=e.pointerType}),M=J(()=>{let e=A.current,t=e===`pen`||!e?`mouse`:e,n=typeof f==`function`?f():f;return typeof n==`string`?n:n[t]}),N=J(e=>{if(!r||!l||!u||e.key!==`Escape`||k.current)return;let t=c.current.floatingContext?.nodeId,i=y?$a(y.nodesRef.current,t):[];if(!C&&i.length>0){let e=!0;if(i.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}let a=Y(os,no(e)?e.nativeEvent:e);n.setOpen(!1,a),!C&&!a.isPropagationAllowed&&e.stopPropagation()}),P=J(e=>{let t=M();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}),F=J(()=>{c.current.insideReactTree=!0,D.start(0,O)}),I=J((e,t=!1)=>{if(P(e)){O();return}if(c.current.insideReactTree){O();return}if(M()===`intentional`&&t||typeof x==`function`&&!x(e))return;let r=Ka(e),i=`[${ps(`inert`)}]`,a=xa(n.select(`floatingElement`)).querySelectorAll(i),o=n.context.triggerElements;if(r&&(o.hasElement(r)||o.hasMatchingElement(e=>Wa(e,r))))return;let s=jt(r)?r:null;for(;s&&!qt(s);){let e=Xt(s);if(qt(e)||!jt(e))break;s=e}if(a.length&&jt(r)&&!Ja(r)&&!Wa(r,n.select(`floatingElement`))&&Array.from(a).every(e=>!Wa(s,e)))return;if(Mt(r)&&!(`touches`in e)){let t=qt(r),n=Jt(r),i=/auto|scroll/,a=t||i.test(n.overflowX),o=t||i.test(n.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=r.offsetWidth-r.clientWidth:e.offsetX>r.clientWidth),d=s&&e.offsetY>r.clientHeight;if(u||d)return}let l=c.current.floatingContext?.nodeId,u=y&&$a(y.nodesRef.current,l).some(t=>qa(e,t.context?.elements.floating));if(qa(e,n.select(`floatingElement`))||qa(e,n.select(`domReferenceElement`))||u)return;let d=y?$a(y.nodesRef.current,l):[];if(d.length>0){let e=!0;if(d.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}n.setOpen(!1,Y(ns,e)),O()}),L=J(e=>{M()!==`sloppy`||e.pointerType===`touch`||!n.select(`open`)||!l||qa(e,n.select(`floatingElement`))||qa(e,n.select(`domReferenceElement`))||I(e)}),R=J(e=>{if(M()!==`sloppy`||!n.select(`open`)||!l||qa(e,n.select(`floatingElement`))||qa(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];t&&(T.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},E.start(1e3,()=>{T.current&&(T.current.dismissOnTouchEnd=!1,T.current.dismissOnMouseDown=!1)}))}),z=J(e=>{let t=Ka(e);function n(){R(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}),B=J(e=>{let t=S.current;if(S.current=!1,E.clear(),e.type===`mousedown`&&T.current&&!T.current.dismissOnMouseDown)return;let n=Ka(e);function r(){e.type===`pointerdown`?L(e):I(e,t),n?.removeEventListener(e.type,r)}n?.addEventListener(e.type,r)}),V=J(e=>{if(M()!==`sloppy`||!T.current||qa(e,n.select(`floatingElement`))||qa(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];if(!t)return;let r=Math.abs(t.clientX-T.current.startX),i=Math.abs(t.clientY-T.current.startY),a=Math.sqrt(r*r+i*i);a>5&&(T.current.dismissOnTouchEnd=!0),a>10&&(I(e),E.clear(),T.current=null)}),H=J(e=>{let t=Ka(e);function n(){V(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}),U=J(e=>{M()!==`sloppy`||!T.current||qa(e,n.select(`floatingElement`))||qa(e,n.select(`domReferenceElement`))||(T.current.dismissOnTouchEnd&&I(e),E.clear(),T.current=null)}),ee=J(e=>{let t=Ka(e);function n(){U(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)});m.useEffect(()=>{if(!r||!l)return;c.current.__escapeKeyBubbles=C,c.current.__outsidePressBubbles=w;let e=new pa;function t(e){n.setOpen(!1,Y(Qo,e))}function s(){e.clear(),k.current=!0}function d(){e.start(Gt()?5:0,()=>{k.current=!1})}let f=xa(i);f.addEventListener(`pointerdown`,j,!0),u&&(f.addEventListener(`keydown`,N),f.addEventListener(`compositionstart`,s),f.addEventListener(`compositionend`,d)),x&&(f.addEventListener(`click`,B,!0),f.addEventListener(`pointerdown`,B,!0),f.addEventListener(`touchstart`,z,!0),f.addEventListener(`touchmove`,H,!0),f.addEventListener(`touchend`,ee,!0),f.addEventListener(`mousedown`,B,!0));let p=[];return g&&(jt(o)&&(p=Qt(o)),jt(i)&&(p=p.concat(Qt(i))),!jt(a)&&a&&a.contextElement&&(p=p.concat(Qt(a.contextElement)))),p=p.filter(e=>e!==f.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t,{passive:!0})}),()=>{f.removeEventListener(`pointerdown`,j,!0),u&&(f.removeEventListener(`keydown`,N),f.removeEventListener(`compositionstart`,s),f.removeEventListener(`compositionend`,d)),x&&(f.removeEventListener(`click`,B,!0),f.removeEventListener(`pointerdown`,B,!0),f.removeEventListener(`touchstart`,z,!0),f.removeEventListener(`touchmove`,H,!0),f.removeEventListener(`touchend`,ee,!0),f.removeEventListener(`mousedown`,B,!0)),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),e.clear(),S.current=!1}},[c,i,a,o,u,x,r,s,g,l,C,w,N,I,B,L,z,H,ee,j,n]),m.useEffect(O,[x,O]);let te=m.useMemo(()=>({onKeyDown:N,...p&&{[Mc[h]]:e=>{n.setOpen(!1,Y($o,e.nativeEvent))},...h!==`intentional`&&{onClick(e){n.setOpen(!1,Y($o,e.nativeEvent))}}}}),[N,n,p,h]),ne=J(e=>{let t=Ka(e.nativeEvent);!Wa(n.select(`floatingElement`),t)||e.button!==0||(S.current=!0)}),W=J(e=>{!r||!l||e.button!==0||(S.current=!0)}),re=m.useMemo(()=>({onKeyDown:N,onPointerDown:ne,onMouseDown:ne,onMouseUp:ne,onClickCapture:F,onMouseDownCapture(e){F(),W(e)},onPointerDownCapture(e){F(),W(e)},onMouseUpCapture:F,onTouchEndCapture:F,onTouchMoveCapture:F}),[N,ne,F,W]);return m.useMemo(()=>l?{reference:te,floating:re,trigger:te}:{},[l,te,re])}var Fc=Pi({memoize:Di,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),Z=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(sa(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},Ic=(...e)=>{let t=new WeakMap,n=1,r=e[e.length-1],i=e.length-1||1,a=r.length-i;if(a>3)throw Error(sa(2));return(i,o,s,c)=>{let l=i.__cacheKey__;l||(l={id:n},i.__cacheKey__=l,n+=1);let u=t.get(l);if(!u){let n=e,i=[void 0,void 0,void 0];switch(a){case 0:break;case 1:n=[...e.slice(0,-1),()=>i[0],r];break;case 2:n=[...e.slice(0,-1),()=>i[0],()=>i[1],r];break;case 3:n=[...e.slice(0,-1),()=>i[0],()=>i[1],()=>i[2],r];break;default:throw Error(sa(2))}u=Fc(...n),u.selectorArgs=i,t.set(l,u)}switch(u.selectorArgs[0]=o,u.selectorArgs[1]=s,u.selectorArgs[2]=c,a){case 0:return u(i);case 1:return u(i,o);case 2:return u(i,o,s);case 3:return u(i,o,s,c);default:throw Error(`unreachable`)}}},Lc=Ws(19)?zc:Bc;function Q(e,t,n,r,i){return Lc(e,t,n,r,i)}function Rc(e,t,n,r,i){let a=m.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return Ui.useSyncExternalStore(e.subscribe,a,a)}na({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),Ui.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function zc(e,t,n,r,i){let a=ta();if(!a)return Rc(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.didChange=!0)):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},a.syncHooks.push(s)),s.value}function Bc(e,t,n,r,i){return Xi.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Vc=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Q(this,e,t,n,r)}},Hc=class extends Vc{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){m.useDebugValue(e),q(()=>{this.state[e]!==t&&this.set(e,t)},[e,t])}useSyncedValueWithCleanup(e,t){let n=this;q(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;q(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){m.useDebugValue(e);let n=t!==void 0;q(()=>{n&&!Object.is(this.state[e],t)&&super.setState({...this.state,[e]:t})},[e,t,n])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return m.useDebugValue(e),Q(this,this.selectors[e],t,n,r)}useContextCallback(e,t){m.useDebugValue(e);let n=J(t??Ho);this.context[e]=n}useStateSetter(e){let t=m.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},Uc={open:Z(e=>e.open),domReferenceElement:Z(e=>e.domReferenceElement),referenceElement:Z(e=>e.positionReference??e.referenceElement),floatingElement:Z(e=>e.floatingElement),floatingId:Z(e=>e.floatingId)},Wc=class extends Hc{constructor(e){let{nested:t,noEmit:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:No(),nested:t,noEmit:n,triggerElements:i},Uc)}setOpen=(e,t)=>{if((!e||!this.state.open||oo(t.event))&&(this.context.dataRef.current.openEvent=e?t.event:void 0),!this.context.noEmit){let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)}this.context.onOpenChange?.(e,t)}};function Gc(e,t=!1,n=!1){let[r,i]=m.useState(e&&t?`idle`:void 0),[a,o]=m.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),q(()=>{if(!e&&a&&r!==`ending`&&n){let e=ks.request(()=>{i(`ending`)});return()=>{ks.cancel(e)}}},[e,a,r,n]),q(()=>{if(!e||t)return;let n=ks.request(()=>{i(void 0)});return()=>{ks.cancel(n)}},[t,e]),q(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=ks.request(()=>{i(`idle`)});return()=>{ks.cancel(n)}},[t,e,a,i,r]),m.useMemo(()=>({mounted:a,setMounted:o,transitionStatus:r}),[a,r])}var Kc=(function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e})({}),qc={[Kc.startingStyle]:``},Jc={[Kc.endingStyle]:``},Yc={transitionStatus(e){return e===`starting`?qc:e===`ending`?Jc:null}};function Xc(e,t=!1,n=!0){let r=As();return J((i,a=null)=>{r.cancel();function o(){S.flushSync(i)}let s=_c(e);if(s==null)return;let c=s;if(typeof c.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{let e=function(){let e=Kc.startingStyle;if(!c.hasAttribute(e)){r.request(i);return}let t=new MutationObserver(()=>{c.hasAttribute(e)||(t.disconnect(),i())});t.observe(c,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})},i=function(){Promise.all(c.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||o()}).catch(()=>{let e=c.getAnimations();if(n){if(a?.aborted)return;o()}else e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&i()})};if(t){e();return}r.request(i)}})}function Zc(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=J(i),o=Xc(r,n,!1);m.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}function Qc(e,t){let n=m.useRef(null),r=m.useRef(null);return m.useCallback(i=>{if(e!==void 0){if(n.current!==null){let e=n.current,i=r.current,a=t.context.triggerElements.getById(e);i&&a===i&&t.context.triggerElements.delete(e),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function $c(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=Qc(e,n),o=J(t=>{if(a(t),!t||!n.select(`open`))return;let i=n.select(`activeTriggerId`);if(i===e){n.update({activeTriggerElement:t,...r});return}i??n.update({activeTriggerId:e,activeTriggerElement:t,...r})});return q(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:o,isMountedByThisTrigger:i}}function el(e){let t=e.useState(`open`);q(()=>{if(t&&!e.select(`activeTriggerId`)&&e.context.triggerElements.size===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[n,r]=t.value;e.update({activeTriggerId:n,activeTriggerElement:r})}}},[t,e])}function tl(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=Gc(e);t.useSyncedValues({mounted:r,transitionStatus:a});let o=J(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return Zc({enabled:!t.useState(`preventUnmountingOnClose`),open:e,ref:t.context.popupRef,onComplete(){e||o()}}),{forceUnmount:o,transitionStatus:a}}var nl=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function rl(){return new Wc({open:!1,floatingElement:null,referenceElement:null,triggerElements:new nl,floatingId:``,nested:!1,noEmit:!1,onOpenChange:void 0})}function il(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:`idle`,floatingRootContext:rl(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Wo,inactiveTriggerProps:Wo,popupProps:Wo}}var al=Z(e=>e.triggerIdProp??e.activeTriggerId),ol={open:Z(e=>e.openProp??e.open),mounted:Z(e=>e.mounted),transitionStatus:Z(e=>e.transitionStatus),floatingRootContext:Z(e=>e.floatingRootContext),preventUnmountingOnClose:Z(e=>e.preventUnmountingOnClose),payload:Z(e=>e.payload),activeTriggerId:al,activeTriggerElement:Z(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:Z((e,t)=>t!==void 0&&al(e)===t),isOpenedByTrigger:Z((e,t)=>t!==void 0&&al(e)===t&&e.open),isMountedByTrigger:Z((e,t)=>t!==void 0&&al(e)===t&&e.mounted),triggerProps:Z((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:Z(e=>e.popupProps),popupElement:Z(e=>e.popupElement),positionerElement:Z(e=>e.positionerElement)};function sl(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Mo(),a=Lo()!=null,o=Qi(()=>new Wc({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new nl,floatingId:i,nested:a,noEmit:!1})).current;return q(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=jt(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o.context.noEmit=!1,o}function cl(e={}){let{nodeId:t,externalTree:n}=e,r=sl(e),i=e.rootContext||r,a={reference:i.useState(`referenceElement`),floating:i.useState(`floatingElement`),domReference:i.useState(`domReferenceElement`)},[o,s]=m.useState(null),c=m.useRef(null),l=Ro(n);q(()=>{a.domReference&&(c.current=a.domReference)},[a.domReference]);let u=Nr({...e,elements:{...a,...o&&{reference:o}}}),d=m.useCallback(e=>{let t=jt(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),u.refs.setReference(t)},[u.refs]),[f,p]=m.useState(null),[h,g]=m.useState(null);i.useSyncedValue(`referenceElement`,f),i.useSyncedValue(`domReferenceElement`,jt(f)?f:null),i.useSyncedValue(`floatingElement`,h);let _=m.useCallback(e=>{(jt(e)||e===null)&&(c.current=e,p(e)),(jt(u.refs.reference.current)||u.refs.reference.current===null||e!==null&&!jt(e))&&u.refs.setReference(e)},[u.refs,p]),v=m.useCallback(e=>{g(e),u.refs.setFloating(e)},[u.refs]),y=m.useMemo(()=>({...u.refs,setReference:_,setFloating:v,setPositionReference:d,domReference:c}),[u.refs,_,v,d]),b=m.useMemo(()=>({...u.elements,domReference:a.domReference}),[u.elements,a.domReference]),x=i.useState(`open`),S=i.useState(`floatingId`),C=m.useMemo(()=>({...u,dataRef:i.context.dataRef,open:x,onOpenChange:i.setOpen,events:i.context.events,floatingId:S,refs:y,elements:b,nodeId:t,rootStore:i}),[u,y,b,t,i,x,S]);return q(()=>{i.context.dataRef.current.floatingContext=C;let e=l?.nodesRef.current.find(e=>e.id===t);e&&(e.context=C)}),m.useMemo(()=>({...u,context:C,refs:y,elements:b,rootStore:i}),[u,y,b,C,i])}function ll(e){let{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,a=Mo(),o=Lo()!=null,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(r?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=Qi(()=>new Wc({open:s,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:i,floatingId:a,nested:o,noEmit:n})).current;return q(()=>{let e={open:s,floatingId:a,referenceElement:c,floatingElement:l};jt(c)&&(e.domReferenceElement=c),d.state.positionReference===d.state.referenceElement&&(e.positionReference=c),d.update(e)},[s,a,c,l,d]),d.context.onOpenChange=i,d.context.nested=o,d.context.noEmit=n,d}var ul=Aa&&Oa;function dl(e,t={}){let n=`rootStore`in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:a=!0,delay:o}=t,s=m.useRef(!1),c=m.useRef(null),l=ma(),u=m.useRef(!0);m.useEffect(()=>{let e=n.select(`domReferenceElement`);if(!a)return;let t=Ot(e);function r(){let e=n.select(`domReferenceElement`);!n.select(`open`)&&Mt(e)&&e===Ua(xa(e))&&(s.current=!0)}function i(){u.current=!0}function o(){u.current=!1}return t.addEventListener(`blur`,r),ul&&(t.addEventListener(`keydown`,i,!0),t.addEventListener(`pointerdown`,o,!0)),()=>{t.removeEventListener(`blur`,r),ul&&(t.removeEventListener(`keydown`,i,!0),t.removeEventListener(`pointerdown`,o,!0))}},[n,a]),m.useEffect(()=>{if(!a)return;function e(e){if(e.reason===$o||e.reason===os){let e=n.select(`domReferenceElement`);jt(e)&&(c.current=e,s.current=!0)}}return r.on(`openchange`,e),()=>{r.off(`openchange`,e)}},[r,a,n]);let d=m.useMemo(()=>({onMouseLeave(){s.current=!1,c.current=null},onFocus(e){let t=e.currentTarget;if(s.current){if(c.current===t)return;s.current=!1,c.current=null}let r=Ka(e.nativeEvent);if(jt(r)){if(ul&&!e.relatedTarget){if(!u.current&&!Ya(r))return}else if(!Za(r))return}let i=Ga(e.relatedTarget,n.context.triggerElements),{nativeEvent:a,currentTarget:d}=e,f=typeof o==`function`?o():o;if(n.select(`open`)&&i||f===0||f===void 0){n.setOpen(!0,Y(ts,a,d));return}l.start(f,()=>{s.current||n.setOpen(!0,Y(ts,a,d))})},onBlur(e){s.current=!1,c.current=null;let t=e.relatedTarget,r=e.nativeEvent,a=jt(t)&&t.hasAttribute(ps(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let e=n.select(`domReferenceElement`),o=Ua(e?e.ownerDocument:document);!t&&o===e||Wa(i.current.floatingContext?.refs.floating.current,o)||Wa(e,o)||a||Ga(t??o,n.context.triggerElements)||n.setOpen(!1,Y(ts,r))})}}),[i,n,l,o]);return m.useMemo(()=>a?{reference:d,trigger:d}:{},[a,d])}var fl=ps(`safe-polygon`),pl=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${Ra}`;function ml(e){return e?!!e.closest(pl):!1}var hl=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.unbindMouseMove=()=>{},this.restTimeoutPending=!1,this.openChangeTimeout=new pa,this.restTimeout=new pa,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose};function gl(e){let t=Qi(hl.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||=t,da(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}var _l=new Set([`click`,`mousedown`]);function vl(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),{dataRef:o}=n.context,{enabled:s=!0,closeDelay:c=0}=t,l=gl(n),u=Ro(),d=Lo(),f=J(()=>l.interactedInside?!0:o.current.openEvent?_l.has(o.current.openEvent.type):!1),p=J(()=>{let e=o.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`}),h=J(e=>Ga(e,n.context.triggerElements)),g=m.useCallback((e,t=!0)=>{let r=yl(c,l.pointerType);r&&!l.handler?l.openChangeTimeout.start(r,()=>n.setOpen(!1,Y(es,e))):t&&(l.openChangeTimeout.clear(),n.setOpen(!1,Y(es,e)))},[c,n,l]),_=J(()=>{l.unbindMouseMove(),l.handler=void 0}),v=J(()=>{if(l.performedPointerEventsMutation){let e=xa(i).body;e.style.pointerEvents=``,e.removeAttribute(fl),l.performedPointerEventsMutation=!1}}),y=J(e=>{if(!ml(Ka(e))){l.interactedInside=!1;return}l.interactedInside=!0});q(()=>{r||(l.pointerType=void 0,l.restTimeoutPending=!1,l.interactedInside=!1,_(),v())},[r,l,_,v]),m.useEffect(()=>()=>{_()},[_]),m.useEffect(()=>v,[v]),q(()=>{if(s&&r&&l.handleCloseOptions?.blockPointerEvents&&p()&&jt(a)&&i){l.performedPointerEventsMutation=!0;let e=xa(i).body;e.setAttribute(fl,``);let t=a,n=i,r=u?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;return r&&(r.style.pointerEvents=``),e.style.pointerEvents=`none`,t.style.pointerEvents=`auto`,n.style.pointerEvents=`auto`,()=>{e.style.pointerEvents=``,t.style.pointerEvents=``,n.style.pointerEvents=``}}},[s,r,a,i,l,p,u,d]),m.useEffect(()=>{if(!s)return;function e(e){f()||!o.current.floatingContext||!n.select(`open`)||h(e.relatedTarget)||(v(),_(),f()||g(e))}function t(e){l.openChangeTimeout.clear(),v(),l.handler?.(e),_()}function r(e){f()||g(e,!1)}let a=i;return a&&(a.addEventListener(`mouseleave`,e),a.addEventListener(`mouseenter`,t),a.addEventListener(`mouseleave`,r),a.addEventListener(`pointerdown`,y,!0)),()=>{a&&(a.removeEventListener(`mouseleave`,e),a.removeEventListener(`mouseenter`,t),a.removeEventListener(`mouseleave`,r),a.removeEventListener(`pointerdown`,y,!0))}},[s,i,n,o,f,h,g,v,_,y,l])}function yl(e,t){return t&&!ao(t)?0:typeof e==`function`?e():e}function bl(e){return typeof e==`function`?e():e}var xl={current:null};function Sl(e,t={}){let n=`rootStore`in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:a=!0,delay:o=0,handleClose:s=null,mouseOnly:c=!1,restMs:l=0,move:u=!0,triggerElementRef:d=xl,externalTree:f,isActiveTrigger:p=!0}=t,h=Ro(f),g=gl(n),_=ha(s),v=ha(o),y=ha(l),b=ha(a);p&&(g.handleCloseOptions=_.current?.__options);let x=J(()=>g.interactedInside?!0:r.current.openEvent?[`click`,`mousedown`].includes(r.current.openEvent.type):!1),C=J(e=>Ga(e,n.context.triggerElements)),w=m.useCallback((e,t=!0)=>{let r=ms(v.current,`close`,g.pointerType);r&&!g.handler?g.openChangeTimeout.start(r,()=>n.setOpen(!1,Y(es,e))):t&&(g.openChangeTimeout.clear(),n.setOpen(!1,Y(es,e)))},[v,n,g]),T=J(()=>{g.unbindMouseMove(),g.handler=void 0}),E=J(()=>{if(g.performedPointerEventsMutation){let e=xa(n.select(`domReferenceElement`)).body;e.style.pointerEvents=``,e.removeAttribute(fl),g.performedPointerEventsMutation=!1}});m.useEffect(()=>{if(!a)return;function e(e){e.open||(g.openChangeTimeout.clear(),g.restTimeout.clear(),g.blockMouseMove=!0,g.restTimeoutPending=!1)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[a,i,g]);let D=J(e=>{if(x()||!r.current.floatingContext||C(e.relatedTarget))return;let t=d.current;_.current?.({...r.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){E(),T(),!x()&&t===n.select(`domReferenceElement`)&&w(e)}})(e)});return m.useEffect(()=>{if(!a)return;let e=d.current??(p?n.select(`domReferenceElement`):null);if(!jt(e))return;function t(e){if(g.openChangeTimeout.clear(),g.blockMouseMove=!1,c&&!ao(g.pointerType)||bl(y.current)>0&&!ms(v.current,`open`))return;let t=ms(v.current,`open`,g.pointerType),r=n.select(`domReferenceElement`),i=n.context.triggerElements,a=(i.hasElement(e.target)||i.hasMatchingElement(t=>Wa(t,e.target)))&&(!r||!Wa(r,e.target)),o=e.currentTarget??null,s=n.select(`open`),l=!s||a;a&&s?n.setOpen(!0,Y(es,e,o)):t?g.openChangeTimeout.start(t,()=>{l&&n.setOpen(!0,Y(es,e,o))}):l&&n.setOpen(!0,Y(es,e,o))}function i(e){if(x()){E();return}g.unbindMouseMove();let t=xa(n.select(`domReferenceElement`));if(g.restTimeout.clear(),g.restTimeoutPending=!1,!C(e.relatedTarget)){if(_.current&&r.current.floatingContext){n.select(`open`)||g.openChangeTimeout.clear();let i=d.current;g.handler=_.current({...r.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){E(),T(),b.current&&!x()&&i===n.select(`domReferenceElement`)&&w(e,!0)}});let a=g.handler;a(e),t.addEventListener(`mousemove`,a),g.unbindMouseMove=()=>{t.removeEventListener(`mousemove`,a)};return}(g.pointerType!==`touch`||!Wa(n.select(`floatingElement`),e.relatedTarget))&&w(e)}}function o(e){D(e)}return n.select(`open`)&&e.addEventListener(`mouseleave`,o),u&&e.addEventListener(`mousemove`,t,{once:!0}),e.addEventListener(`mouseenter`,t),e.addEventListener(`mouseleave`,i),()=>{e.removeEventListener(`mouseleave`,o),u&&e.removeEventListener(`mousemove`,t),e.removeEventListener(`mouseenter`,t),e.removeEventListener(`mouseleave`,i)}},[T,E,r,v,w,n,a,_,D,g,p,x,C,c,u,y,d,h,b]),m.useMemo(()=>{if(!a)return;function e(e){g.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,r=e.currentTarget,i=n.select(`domReferenceElement`),a=n.context.triggerElements,o=n.select(`open`),s=(a.hasElement(e.target)||a.hasMatchingElement(t=>Wa(t,e.target)))&&(!i||!Wa(i,e.target));if(c&&!ao(g.pointerType)||o&&!s||bl(y.current)===0||!s&&g.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;g.restTimeout.clear();function l(){if(g.restTimeoutPending=!1,x())return;let e=n.select(`open`);!g.blockMouseMove&&(!e||s)&&n.setOpen(!0,Y(es,t,r))}g.pointerType===`touch`?S.flushSync(()=>{l()}):s&&o?l():(g.restTimeoutPending=!0,g.restTimeout.start(bl(y.current),l))}}},[a,g,x,c,n,y])}function Cl(e=[]){let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=e.map(e=>e?.trigger),a=m.useCallback(t=>wl(t,e,`reference`),t),o=m.useCallback(t=>wl(t,e,`floating`),n),s=m.useCallback(t=>wl(t,e,`item`),r),c=m.useCallback(t=>wl(t,e,`trigger`),i);return m.useMemo(()=>({getReferenceProps:a,getFloatingProps:o,getItemProps:s,getTriggerProps:c}),[a,o,s,c])}function wl(e,t,n){let r=new Map,i=n===`item`,a={};n===`floating`&&(a.tabIndex=-1,a[Fa]=``);for(let t in e)i&&e&&(t===Ia||t===La)||(a[t]=e[t]);for(let o=0;o<t.length;o+=1){let s,c=t[o]?.[n];s=typeof c==`function`?e?c(e):null:c,s&&Tl(a,s,i,r)}return Tl(a,e,i,r),a}function Tl(e,t,n,r){for(let i in t){let a=t[i];n&&(i===Ia||i===La)||(i.startsWith(`on`)?(r.has(i)||r.set(i,[]),typeof a==`function`&&(r.get(i)?.push(a),e[i]=(...e)=>r.get(i)?.map(t=>t(...e)).find(e=>e!==void 0))):e[i]=a)}}var El=`Escape`;function Dl(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Ol(e,t){return Dl(t,e===Va||e===Ha,e===za||e===Ba)}function kl(e,t,n){return Dl(t,e===Ha,n?e===za:e===Ba)||e===`Enter`||e===` `||e===``}function Al(e,t,n){return Dl(t,n?e===za:e===Ba,e===Ha)}function jl(e,t,n,r){return t===`both`||t===`horizontal`&&r&&r>1?e===El:Dl(t,n?e===Ba:e===za,e===Va)}function Ml(e,t){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),o=n.context.dataRef,{listRef:s,activeIndex:c,onNavigate:l=()=>{},enabled:u=!0,selectedIndex:d=null,allowEscape:f=!1,loopFocus:p=!1,nested:h=!1,rtl:g=!1,virtual:_=!1,focusItemOnOpen:v=`auto`,focusItemOnHover:y=!0,openOnArrowKeyDown:b=!0,disabledIndices:x=void 0,orientation:S=`vertical`,parentOrientation:C,cols:w=1,id:T,resetOnPointerLeave:E=!0,externalTree:D}=t,O=ha(Qa(i)),k=Lo(),A=Ro(D);q(()=>{o.current.orientation=S},[o,S]);let j=Xa(a),M=m.useRef(v),N=m.useRef(d??-1),P=m.useRef(null),F=m.useRef(!0),I=J(e=>{l(N.current===-1?null:N.current,e)}),L=m.useRef(I),R=m.useRef(!!i),z=m.useRef(r),B=m.useRef(!1),V=m.useRef(!1),H=ha(x),U=ha(r),ee=ha(d),te=ha(E),ne=J(()=>{function e(e){_?A?.events.emit(`virtualfocus`,e):Ns(e,{sync:B.current,preventScroll:!0})}let t=s.current[N.current],n=V.current;t&&e(t),(B.current?e=>e():requestAnimationFrame)(()=>{let r=s.current[N.current]||t;r&&(t||e(r),re&&(n||!F.current)&&r.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});q(()=>{u&&(r&&i?(N.current=d??-1,M.current&&d!=null&&(V.current=!0,I())):R.current&&(N.current=-1,L.current()))},[u,r,i,d,I]),q(()=>{if(u){if(!r){B.current=!1;return}if(i)if(c==null){if(B.current=!1,ee.current!=null)return;if(R.current&&(N.current=-1,ne()),(!z.current||!R.current)&&M.current&&(P.current!=null||M.current===!0&&P.current==null)){let e=0,t=()=>{s.current[0]==null?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e+=1):(N.current=P.current==null||kl(P.current,S,g)||h?lo(s):uo(s),P.current=null,I())};t()}}else co(s,c)||(N.current=c,ne(),V.current=!1)}},[u,r,i,c,ee,h,s,S,g,I,ne,H]),q(()=>{if(!u||i||!A||_||!R.current)return;let e=A.nodesRef.current,t=e.find(e=>e.id===k)?.context?.elements.floating,n=Ua(xa(i)),r=e.some(e=>e.context&&Wa(e.context.elements.floating,n));t&&!r&&F.current&&t.focus({preventScroll:!0})},[u,i,A,k,_]),q(()=>{L.current=I,z.current=r,R.current=!!i}),q(()=>{r||(P.current=null,M.current=v)},[r,v]);let W=c!=null,re=m.useMemo(()=>{function e(e){if(!U.current)return;let t=s.current.indexOf(e.currentTarget);t!==-1&&N.current!==t&&(N.current=t,I(e))}return{onFocus(t){B.current=!0,e(t)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(t){B.current=!0,V.current=!1,y&&e(t)},onPointerLeave(e){if(!U.current||!F.current||e.pointerType===`touch`)return;B.current=!0;let t=e.relatedTarget;!y||s.current.includes(t)||te.current&&(Ns(null,{sync:!0}),N.current=-1,I(e),_||O.current?.focus({preventScroll:!0}))}}},[U,O,y,s,I,te,_]),ie=m.useCallback(()=>C??A?.nodesRef.current.find(e=>e.id===k)?.context?.dataRef?.current.orientation,[k,A,C]),ae=J(e=>{if(F.current=!1,B.current=!0,e.which===229||!U.current&&e.currentTarget===O.current)return;if(h&&jl(e.key,S,g,w)){Ol(e.key,ie())||to(e),n.setOpen(!1,Y(ss,e.nativeEvent)),Mt(a)&&(_?A?.events.emit(`virtualfocus`,a):a.focus());return}let t=N.current,i=lo(s,x),o=uo(s,x);if(j||(e.key===`Home`&&(to(e),N.current=i,I(e)),e.key===`End`&&(to(e),N.current=o,I(e))),w>1){let t=Array.from({length:s.current.length},()=>({width:1,height:1})),n=mo(t,w,!1),r=n.findIndex(e=>e!=null&&!_o(s,e,x)),a=n.reduce((e,t,n)=>t!=null&&!_o(s,t,x)?n:e,-1),c=n[po({current:n.map(e=>e==null?null:s.current[e])},{event:e,orientation:S,loopFocus:p,rtl:g,cols:w,disabledIndices:go([...(typeof x==`function`?null:x)||s.current.map((e,t)=>_o(s,t,x)?t:void 0),void 0],n),minIndex:r,maxIndex:a,prevIndex:ho(N.current>o?i:N.current,t,n,w,e.key===Ha?`bl`:e.key===(g?za:Ba)?`tr`:`tl`),stopEvent:!0})];if(c!=null&&(N.current=c,I(e)),S===`both`)return}if(Ol(e.key,S)){if(to(e),r&&!_&&Ua(e.currentTarget.ownerDocument)===e.currentTarget){N.current=kl(e.key,S,g)?i:o,I(e);return}kl(e.key,S,g)?p?t>=o?f&&t!==s.current.length?N.current=-1:(B.current=!1,N.current=i):N.current=fo(s,{startingIndex:t,disabledIndices:x}):N.current=Math.min(o,fo(s,{startingIndex:t,disabledIndices:x})):p?t<=i?f&&t!==-1?N.current=s.current.length:(B.current=!1,N.current=o):N.current=fo(s,{startingIndex:t,decrement:!0,disabledIndices:x}):N.current=Math.max(i,fo(s,{startingIndex:t,decrement:!0,disabledIndices:x})),co(s,N.current)&&(N.current=-1),I(e)}}),oe=m.useMemo(()=>_&&r&&W&&{"aria-activedescendant":`${T}-${c}`},[_,r,W,T,c]),se=m.useMemo(()=>({"aria-orientation":S===`both`?void 0:S,...j?{}:oe,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&r&&!_){let t=Ka(e.nativeEvent);if(t&&!Wa(O.current,t))return;to(e),n.setOpen(!1,Y(as,e.nativeEvent)),Mt(a)&&a.focus();return}ae(e)},onPointerMove(){F.current=!0}}),[oe,ae,O,S,j,n,r,_,a]),ce=m.useMemo(()=>{function e(e){v===`auto`&&ro(e.nativeEvent)&&(M.current=!_)}function t(e){M.current=v,v===`auto`&&io(e.nativeEvent)&&(M.current=!0)}return{onKeyDown(e){let t=n.select(`open`);F.current=!1;let r=e.key.startsWith(`Arrow`),i=Al(e.key,ie(),g),a=Ol(e.key,S),o=(h?i:a)||e.key===`Enter`||e.key.trim()===``;if(_&&t)return ae(e);if(!(!t&&!b&&r)){if(o){let t=Ol(e.key,ie());P.current=h&&t?null:e.key}if(h){i&&(to(e),t?(N.current=lo(s,H.current),I(e)):n.setOpen(!0,Y(ss,e.nativeEvent,e.currentTarget)));return}a&&(ee.current!=null&&(N.current=ee.current),to(e),!t&&b?n.setOpen(!0,Y(ss,e.nativeEvent,e.currentTarget)):ae(e),t&&I(e))}},onFocus(e){n.select(`open`)&&!_&&(N.current=-1,I(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[ae,H,v,s,h,I,n,b,S,ie,g,ee,_]),le=m.useMemo(()=>({...oe,...ce}),[oe,ce]);return m.useMemo(()=>u?{reference:le,floating:se,item:re,trigger:ce}:{},[u,le,se,ce,re])}var Nl=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function Pl(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingId`),a=n.useState(`domReferenceElement`),o=n.useState(`floatingElement`),{role:s=`dialog`}=t,c=Mo(),l=a?.id||c,u=m.useMemo(()=>Qa(o)?.id||i,[o,i]),d=Nl.get(s)??s,f=Lo()!=null,p=m.useMemo(()=>d===`tooltip`||s===`label`?Wo:{"aria-haspopup":d===`alertdialog`?`dialog`:d,"aria-expanded":`false`,...d===`listbox`&&{role:`combobox`},...d===`menu`&&f&&{role:`menuitem`},...s===`select`&&{"aria-autocomplete":`none`},...s===`combobox`&&{"aria-autocomplete":`list`}},[d,f,s]),h=m.useMemo(()=>d===`tooltip`||s===`label`?{[`aria-${s===`label`?`labelledby`:`describedby`}`]:r?u:void 0}:{...p,"aria-expanded":r?`true`:`false`,"aria-controls":r?u:void 0,...d===`menu`&&{id:l}},[d,u,r,l,s,p]),g=m.useMemo(()=>{let e={id:u,...d&&{role:d}};return d===`tooltip`||s===`label`?e:{...e,...d===`menu`&&{"aria-labelledby":l}}},[d,u,l,s]),_=m.useCallback(({active:e,selected:t})=>{let n={role:`option`,...e&&{id:`${u}-fui-option`}};switch(s){case`select`:case`combobox`:return{...n,"aria-selected":t}}return{}},[u,s]);return m.useMemo(()=>({reference:h,floating:g,item:_,trigger:p}),[h,g,p,_])}function Fl(e,t){let n=`rootStore`in e?e.rootStore:e,r=n.context.dataRef,i=n.useState(`open`),{listRef:a,activeIndex:o,onMatch:s,onTypingChange:c,enabled:l=!0,resetMs:u=750,selectedIndex:d=null}=t,f=ma(),p=m.useRef(``),h=m.useRef(d??o??-1),g=m.useRef(null);q(()=>{!i&&d!==null||(f.clear(),g.current=null,p.current!==``&&(p.current=``))},[i,d,f]),q(()=>{i&&p.current===``&&(h.current=d??o??-1)},[i,d,o]);let _=J(e=>{e?r.current.typing||(r.current.typing=e,c?.(e)):r.current.typing&&(r.current.typing=e,c?.(e))}),v=J(e=>{function t(e,t,n){let r=t.find(e=>e?.toLocaleLowerCase().indexOf(n.toLocaleLowerCase())===0);return r?e.indexOf(r):-1}let n=a.current;if(p.current.length>0&&p.current[0]!==` `&&(t(n,n,p.current)===-1?_(!1):e.key===` `&&to(e)),n==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;i&&e.key!==` `&&(to(e),_(!0));let r=p.current===``;r&&(h.current=d??o??-1),n.every(e=>!e||e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase())&&p.current===e.key&&(p.current=``,h.current=g.current),p.current+=e.key,f.start(u,()=>{p.current=``,h.current=g.current,_(!1)});let c=r?d??o??-1:h.current,l=t(n,[...n.slice((c||0)+1),...n.slice(0,(c||0)+1)],p.current);l===-1?e.key!==` `&&(p.current=``,_(!1)):(s?.(l),g.current=l)}),y=J(e=>{let t=e.relatedTarget,r=n.select(`domReferenceElement`),i=n.select(`floatingElement`),a=Wa(r,t),o=Wa(i,t);a||o||(f.clear(),p.current=``,h.current=g.current,_(!1))}),b=m.useMemo(()=>({onKeyDown:v,onBlur:y}),[v,y]),x=m.useMemo(()=>({onKeyDown:v,onKeyUp(e){e.key===` `&&_(!1)},onBlur:y}),[v,y,_]);return m.useMemo(()=>l?{reference:b,floating:x}:{},[l,b,x])}function Il(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]||[0,0],[c,l]=t[o]||[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function Ll(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Rl(e={}){let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i=new pa,a=!1,o=null,s=null,c=typeof performance<`u`?performance.now():0;function l(e,t){let n=performance.now(),r=n-c;if(o===null||s===null||r===0)return o=e,s=t,c=n,null;let i=e-o,a=t-s,l=Math.sqrt(i*i+a*a)/r;return o=e,s=t,c=n,l}let u=({x:e,y:n,placement:o,elements:s,onClose:c,nodeId:u,tree:d})=>function(f){function p(){i.clear(),c()}if(i.clear(),!s.domReference||!s.floating||o==null||e==null||n==null)return;let{clientX:m,clientY:h}=f,g=[m,h],_=Ka(f),v=f.type===`mouseleave`,y=Wa(s.floating,_),b=Wa(s.domReference,_),x=s.domReference.getBoundingClientRect(),S=s.floating.getBoundingClientRect(),C=o.split(`-`)[0],w=e>S.right-S.width/2,T=n>S.bottom-S.height/2,E=Ll(g,x),D=S.width>x.width,O=S.height>x.height,k=(D?x:S).left,A=(D?x:S).right,j=(O?x:S).top,M=(O?x:S).bottom;if(y&&(a=!0,!v))return;if(b&&(a=!1),b&&!v){a=!0;return}if(v&&jt(f.relatedTarget)&&Wa(s.floating,f.relatedTarget)||d&&$a(d.nodesRef.current,u).some(({context:e})=>e?.open))return;if(C===`top`&&n>=x.bottom-1||C===`bottom`&&n<=x.top+1||C===`left`&&e>=x.right-1||C===`right`&&e<=x.left+1)return p();let N=[];switch(C){case`top`:N=[[k,x.top+1],[k,S.bottom-1],[A,S.bottom-1],[A,x.top+1]];break;case`bottom`:N=[[k,S.top+1],[k,x.bottom-1],[A,x.bottom-1],[A,S.top+1]];break;case`left`:N=[[S.right-1,M],[S.right-1,j],[x.left+1,j],[x.left+1,M]];break;case`right`:N=[[x.right-1,M],[x.right-1,j],[S.left+1,j],[S.left+1,M]];break}function P([e,n]){switch(C){case`top`:return[[D?e+t/2:w?e+t*4:e-t*4,n+t+1],[D?e-t/2:w?e+t*4:e-t*4,n+t+1],[S.left,w||D?S.bottom-t:S.top],[S.right,w?D?S.bottom-t:S.top:S.bottom-t]];case`bottom`:return[[D?e+t/2:w?e+t*4:e-t*4,n-t],[D?e-t/2:w?e+t*4:e-t*4,n-t],[S.left,w||D?S.top+t:S.bottom],[S.right,w?D?S.top+t:S.bottom:S.top+t]];case`left`:{let r=[e+t+1,O?n+t/2:T?n+t*4:n-t*4],i=[e+t+1,O?n-t/2:T?n+t*4:n-t*4];return[[T||O?S.right-t:S.left,S.top],[T?O?S.right-t:S.left:S.right-t,S.bottom],r,i]}case`right`:return[[e-t,O?n+t/2:T?n+t*4:n-t*4],[e-t,O?n-t/2:T?n+t*4:n-t*4],[T||O?S.left+t:S.right,S.top],[T?O?S.left+t:S.right:S.left+t,S.bottom]];default:return[]}}if(!Il([m,h],N)){if(a&&!E)return p();if(!v&&r){let e=l(f.clientX,f.clientY);if(e!==null&&e<.1)return p()}Il([m,h],P([e,n]))?!a&&r&&i.start(40,p):p()}};return u.__options={blockPointerEvents:n},u}var zl={...ol,disabled:Z(e=>e.disabled),instantType:Z(e=>e.instantType),isInstantPhase:Z(e=>e.isInstantPhase),trackCursorAxis:Z(e=>e.trackCursorAxis),disableHoverablePopup:Z(e=>e.disableHoverablePopup),lastOpenChangeReason:Z(e=>e.openChangeReason),closeDelay:Z(e=>e.closeDelay),hasViewport:Z(e=>e.hasViewport)},Bl=class e extends Hc{constructor(e){super({...Vl(),...e},{popupRef:m.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new nl},zl)}setOpen=(e,t)=>{let n=t.reason,r=n===es,i=e&&n===ts,a=!e&&(n===$o||n===os);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let o=()=>{let r={open:e,openChangeReason:n};i?r.instantType=`focus`:a?r.instantType=`dismiss`:n===es&&(r.instantType=void 0);let o=t.trigger?.id??null;(o||e)&&(r.activeTriggerId=o,r.activeTriggerElement=t.trigger??null),this.update(r)};r?S.flushSync(o):o()};static useStore(t,n){let r=Qi(()=>new e(n)).current,i=t??r,a=ll({popupStore:i,onOpenChange:i.setOpen});return i.state.floatingRootContext=a,i}};function Vl(){return{...il(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeDelay:0,hasViewport:!1}}var Hl=ra(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,h=Bl.useStore(l?.store,{open:n,openProp:r,activeTriggerId:d,triggerIdProp:u});oa(()=>{r===void 0&&h.state.open===!1&&n===!0&&h.update({open:!0,activeTriggerId:d})}),h.useControlledProp(`openProp`,r),h.useControlledProp(`triggerIdProp`,u),h.useContextCallback(`onOpenChange`,s),h.useContextCallback(`onOpenChangeComplete`,c);let g=h.useState(`open`),_=!t&&g,v=h.useState(`activeTriggerId`),y=h.useState(`payload`);h.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i}),q(()=>{g&&t&&h.setOpen(!1,Y(us))},[g,t,h]),h.useSyncedValue(`disabled`,t),el(h);let{forceUnmount:b,transitionStatus:x}=tl(_,h),S=h.useState(`isInstantPhase`),C=h.useState(`instantType`),w=h.useState(`lastOpenChangeReason`),T=m.useRef(null);q(()=>{x===`ending`&&w===Qo||x!==`ending`&&S?(C!==`delay`&&(T.current=C),h.set(`instantType`,`delay`)):T.current!==null&&(h.set(`instantType`,T.current),T.current=null)},[x,S,w,C,h]),q(()=>{_&&v==null&&h.set(`payload`,void 0)},[h,v,_]);let E=m.useCallback(()=>{h.setOpen(!1,Ul(h,ds))},[h]);m.useImperativeHandle(o,()=>({unmount:b,close:E}),[b,E]);let D=h.useState(`floatingRootContext`),{getReferenceProps:O,getFloatingProps:k,getTriggerProps:A}=Cl([Pc(D,{enabled:!t,referencePress:!0}),jc(D,{enabled:!t&&a!==`none`,axis:a===`none`?void 0:a})]),j=m.useMemo(()=>O(),[O]),M=m.useMemo(()=>A(),[A]),N=m.useMemo(()=>k(),[k]);return h.useSyncedValues({activeTriggerProps:j,inactiveTriggerProps:M,popupProps:N}),(0,p.jsx)(ca.Provider,{value:h,children:typeof f==`function`?f({payload:y}):f})});function Ul(e,t){let n=Y(t);return n.preventUnmountOnClose=()=>{e.set(`preventUnmountingOnClose`,!0)},n}var Wl=(function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=Kc.startingStyle]=`startingStyle`,e[e.endingStyle=Kc.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e})({}),Gl=(function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e})({}),Kl={[Gl.popupOpen]:``},ql={[Gl.popupOpen]:``,[Gl.pressed]:``},Jl={[Wl.open]:``},Yl={[Wl.closed]:``},Xl={[Wl.anchorHidden]:``},Zl={open(e){return e?Kl:null}},Ql={open(e){return e?ql:null}},$l={open(e){return e?Jl:Yl},anchorHidden(e){return e?Xl:null}};function eu(e){return Mo(e,`base-ui`)}var tu=m.createContext(void 0);function nu(){return m.useContext(tu)}var ru=(function(e){return e[e.popupOpen=Gl.popupOpen]=`popupOpen`,e.triggerDisabled=`data-trigger-disabled`,e})({}),iu=600,au=ia(function(e,t){let{className:n,render:r,handle:i,payload:a,disabled:o,delay:s,closeDelay:c,id:l,...u}=e,d=la(!0),f=i?.store??d;if(!f)throw Error(sa(82));let p=eu(l),h=f.useState(`isTriggerActive`,p),g=f.useState(`isOpenedByTrigger`,p),_=f.useState(`floatingRootContext`),v=m.useRef(null),y=s??iu,b=c??0,{registerTrigger:x,isMountedByThisTrigger:S}=$c(p,v,f,{payload:a,closeDelay:b}),C=nu(),{delayRef:w,isInstantPhase:T,hasProvider:E}=_s(_,{open:g});f.useSyncedValue(`isInstantPhase`,T);let D=f.useState(`disabled`),O=o??D,k=f.useState(`trackCursorAxis`),A=f.useState(`disableHoverablePopup`),j=Sl(_,{enabled:!O,mouseOnly:!0,move:!1,handleClose:!A&&k!==`both`?Rl():null,restMs(){let e=C?.delay,t=typeof w.current==`object`?w.current.open:void 0,n=y;return E&&(n=t===0?0:s??e??y),n},delay(){let e=typeof w.current==`object`?w.current.close:void 0,t=b;return c==null&&E&&(t=e),{close:t}},triggerElementRef:v,isActiveTrigger:h}),M=dl(_,{enabled:!O}).reference,N={open:g},P=f.useState(`triggerProps`,S);return X(`button`,e,{state:N,ref:[t,x,v],props:[j,M,P,{id:p,[ru.triggerDisabled]:O?``:void 0},u],stateAttributesMapping:Zl})}),ou=m.createContext(void 0);function su(){let e=m.useContext(ou);if(e===void 0)throw Error(sa(70));return e}var cu=m.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,...o}=e,{portalNode:s,portalSubtree:c}=hc({container:r,ref:t,componentProps:e,elementProps:o});return!c&&!s?null:(0,p.jsxs)(m.Fragment,{children:[c,s&&S.createPortal(n,s)]})}),lu=m.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return la().useState(`mounted`)||n?(0,p.jsx)(ou.Provider,{value:n,children:(0,p.jsx)(cu,{ref:t,...r})}):null}),uu=m.createContext(void 0);function du(){let e=m.useContext(uu);if(e===void 0)throw Error(sa(71));return e}var fu=m.createContext(void 0);function pu(){return m.useContext(fu)?.direction??`ltr`}var mu=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,offsetParent:d=`real`}=un(e,t)||{};if(l==null)return{};let f=kn(u),p={x:n,y:r},m=_n(i),h=mn(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=ln(k,j,A),N=!c.arrow&&fn(i)!=null&&j!==M&&a.reference[h]/2-(j<k?D:O)-g[h]/2<0,P=N?j<k?j-k:j-A:0;return{[m]:p[m]+P,data:{[m]:M,centerOffset:j-M-P,...N&&{alignmentOffset:P}},reset:N}}}),hu=(e,t)=>({...mu(e),options:[e,t]}),gu={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await zr().fn(e)).data?.referenceHidden||a}}}},_u={sideX:`left`,sideY:`top`},vu={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=Ot(i),l=c.getComputedStyle(i);if(!(l.transitionDuration!==`0s`&&l.transitionDuration!==``))return{x:t,y:n,data:_u};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=xa(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=dn(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:_u.sideX,g=f===`top`?`bottom`:_u.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}};function yu(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function bu(e,t,n){let{rects:r,placement:i}=e;return{side:yu(t,dn(i),n),align:fn(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function xu(e){let{anchor:t,positionMethod:n=`absolute`,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,collisionBoundary:s,collisionPadding:c=5,sticky:l=!1,arrowPadding:u=5,disableAnchorTracking:d=!1,keepMounted:f=!1,floatingRootContext:p,mounted:h,collisionAvoidance:g,shiftCrossAxis:_=!1,nodeId:v,adaptiveOrigin:y,lazyFlip:b=!1,externalTree:x}=e,[S,C]=m.useState(null);!h&&S!==null&&C(null);let w=g.side||`flip`,T=g.align||`flip`,E=g.fallbackAxisSide||`end`,D=typeof t==`function`?t:void 0,O=J(D),k=D?O:t,A=ha(t),j=pu()===`rtl`,M=S||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":j?`left`:`right`,"inline-start":j?`right`:`left`}[r],N=a===`center`?M:`${M}-${a}`,P=c,F=+(r===`bottom`),I=+(r===`top`),L=+(r===`right`),R=+(r===`left`);typeof P==`number`?P={top:P+F,right:P+R,bottom:P+I,left:P+L}:P&&={top:(P.top||0)+F,right:(P.right||0)+R,bottom:(P.bottom||0)+I,left:(P.left||0)+L};let z={boundary:s===`clipping-ancestors`?`clippingAncestors`:s,padding:P},B=m.useRef(null),V=ha(i),H=ha(o),U=[Pr(e=>{let t=bu(e,r,j),n=typeof V.current==`function`?V.current(t):V.current,i=typeof H.current==`function`?H.current(t):H.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[typeof i==`function`?0:i,typeof o==`function`?0:o,j,r])],ee=T===`none`&&w!==`shift`,te=!ee&&(l||_||w===`shift`),ne=w===`none`?null:Lr({...z,padding:{top:P.top+1,right:P.right+1,bottom:P.bottom+1,left:P.left+1},mainAxis:!_&&w===`flip`,crossAxis:T===`flip`&&`alignment`,fallbackAxisSideDirection:E}),W=ee?null:Fr(e=>{let t=xa(e.elements.floating).documentElement;return{...z,rootBoundary:_?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:T!==`none`,crossAxis:te,limiter:l||_?void 0:Ir(e=>{if(!B.current)return{};let{width:t,height:n}=B.current.getBoundingClientRect(),r=gn(dn(e.placement)),i=r===`y`?t:n,a=r===`y`?P.left+P.right:P.top+P.bottom;return{offset:i/2+a/2}})}},[z,l,_,P,T]);w===`shift`||T===`shift`||a===`center`?U.push(W,ne):U.push(ne,W),U.push(Rr({...z,apply({elements:{floating:e},rects:{reference:t},availableWidth:n,availableHeight:r}){let i=e.style;i.setProperty(`--available-width`,`${n}px`),i.setProperty(`--available-height`,`${r}px`),i.setProperty(`--anchor-width`,`${t.width}px`),i.setProperty(`--anchor-height`,`${t.height}px`)}}),hu(()=>({element:B.current||document.createElement(`div`),padding:u,offsetParent:`floating`}),[u]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:a,rects:o,y:s}=e,c=dn(a),l=gn(c),u=B.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof i==`function`?i(bu(e,r,j)):i,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,te&&l===`y`&&b?S:x),{}}},gu,y),q(()=>{!h&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[h,p]);let re=m.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<`u`,layoutShift:!d&&typeof IntersectionObserver<`u`}),[d]),{refs:ie,elements:ae,x:oe,y:se,middlewareData:ce,update:le,placement:ue,context:de,isPositioned:fe,floatingStyles:pe}=cl({rootContext:p,placement:N,middleware:U,strategy:n,whileElementsMounted:f?void 0:(...e)=>br(...e,re),nodeId:v,externalTree:x}),{sideX:me,sideY:he}=ce.adaptiveOrigin||_u,ge=fe?n:`fixed`,_e=m.useMemo(()=>{let e=y?{position:ge,[me]:oe,[he]:se}:{position:ge,...pe};return fe||(e.opacity=0),e},[y,ge,me,oe,he,se,pe,fe]),ve=m.useRef(null);q(()=>{if(!h)return;let e=A.current,t=typeof e==`function`?e():e,n=(Su(t)?t.current:t)||null;n!==ve.current&&(ie.setPositionReference(n),ve.current=n)},[h,ie,k,A]),m.useEffect(()=>{if(!h)return;let e=A.current;typeof e!=`function`&&Su(e)&&e.current!==ve.current&&(ie.setPositionReference(e.current),ve.current=e.current)},[h,ie,k,A]),m.useEffect(()=>{if(f&&h&&ae.domReference&&ae.floating)return br(ae.domReference,ae.floating,le,re)},[f,h,ae,le,re]);let ye=dn(ue),be=yu(r,ye,j),xe=fn(ue)||`center`,Se=!!ce.hide?.referenceHidden;q(()=>{b&&h&&fe&&C(ye)},[b,h,fe,ye]);let Ce=m.useMemo(()=>({position:`absolute`,top:ce.arrow?.y,left:ce.arrow?.x}),[ce.arrow]),we=ce.arrow?.centerOffset!==0;return m.useMemo(()=>({positionerStyles:_e,arrowStyles:Ce,arrowRef:B,arrowUncentered:we,side:be,align:xe,physicalSide:ye,anchorHidden:Se,refs:ie,context:de,isPositioned:fe,update:le}),[_e,Ce,B,we,be,xe,ye,Se,ie,de,fe,le])}function Su(e){return e!=null&&`current`in e}function Cu(e){return e===`starting`?qo:Wo}var wu=m.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:h=!1,disableAnchorTracking:g=!1,collisionAvoidance:_=Xo,...v}=e,y=la(),b=su(),x=y.useState(`open`),S=y.useState(`mounted`),C=y.useState(`trackCursorAxis`),w=y.useState(`disableHoverablePopup`),T=y.useState(`floatingRootContext`),E=y.useState(`instantType`),D=y.useState(`transitionStatus`),O=xu({anchor:i,positionMethod:a,floatingRootContext:T,mounted:S,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:h,arrowPadding:f,disableAnchorTracking:g,keepMounted:b,collisionAvoidance:_,adaptiveOrigin:y.useState(`hasViewport`)?vu:void 0}),k=m.useMemo(()=>{let e={};return(!x||C===`both`||w)&&(e.pointerEvents=`none`),{role:`presentation`,hidden:!S,style:{...O.positionerStyles,...e}}},[x,C,w,S,O.positionerStyles]),A=m.useMemo(()=>({open:x,side:O.side,align:O.align,anchorHidden:O.anchorHidden,instant:C===`none`?E:`tracking-cursor`}),[x,O.side,O.align,O.anchorHidden,C,E]),j=m.useMemo(()=>({...A,arrowRef:O.arrowRef,arrowStyles:O.arrowStyles,arrowUncentered:O.arrowUncentered}),[A,O.arrowRef,O.arrowStyles,O.arrowUncentered]),M=X(`div`,e,{state:A,props:[k,Cu(D),v],ref:[t,y.useStateSetter(`positionerElement`)],stateAttributesMapping:$l});return(0,p.jsx)(uu.Provider,{value:j,children:M})}),Tu={...$l,...Yc},Eu=m.forwardRef(function(e,t){let{className:n,render:r,...i}=e,a=la(),{side:o,align:s}=du(),c=a.useState(`open`),l=a.useState(`instantType`),u=a.useState(`transitionStatus`),d=a.useState(`popupProps`),f=a.useState(`floatingRootContext`);Zc({open:c,ref:a.context.popupRef,onComplete(){c&&a.context.onOpenChangeComplete?.(!0)}});let p=a.useState(`disabled`),m=a.useState(`closeDelay`);return vl(f,{enabled:!p,closeDelay:m}),X(`div`,e,{state:{open:c,side:o,align:s,instant:l,transitionStatus:u},ref:[t,a.context.popupRef,a.useStateSetter(`popupElement`)],props:[d,Cu(u),i],stateAttributesMapping:Tu})}),Du=m.forwardRef(function(e,t){let{className:n,render:r,...i}=e,a=la().useState(`instantType`),{open:o,arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=du();return X(`div`,e,{state:{open:o,side:c,align:l,uncentered:u,instant:a},ref:[t,s],props:[{style:d,"aria-hidden":!0},i],stateAttributesMapping:$l})}),Ou=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=m.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),a=m.useMemo(()=>({open:t,close:n}),[t,n]);return(0,p.jsx)(tu.Provider,{value:i,children:(0,p.jsx)(gs,{delay:a,timeoutMs:r,children:e.children})})};function ku(e){return Ws(19)?e:e?`true`:void 0}function Au(e){let[t,n]=m.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}function ju(e){let t=Jt(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Mt(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r;return(rn(n)!==a||rn(r)!==o)&&(n=a,r=o),{width:n,height:r}}var Mu=typeof ResizeObserver<`u`,Nu=()=>!0;function Pu(e){let{popupElement:t,positionerElement:n,content:r,mounted:i,enabled:a=Nu,onMeasureLayout:o,onMeasureLayoutComplete:s,side:c,direction:l}=e,u=Xc(t,!0,!1),d=As(),f=m.useRef(null),p=m.useRef(null),h=m.useRef(!0),g=m.useRef(Ho),_=J(o),v=J(s),y=m.useMemo(()=>{let e=c===`top`,t=c===`left`;return l===`rtl`?(e||=c===`inline-end`,t||=c===`inline-end`):(e||=c===`inline-start`,t||=c===`inline-start`),e?{position:`absolute`,[c===`top`?`bottom`:`top`]:`0`,[t?`right`:`left`]:`0`}:Wo},[c,l]);q(()=>{if(!i||!a()||!Mu){g.current=Ho,h.current=!0,f.current=null,p.current=null;return}if(!t||!n)return;g.current=Iu(t,y);let e=new ResizeObserver(e=>{let t=e[0];t&&(p.current={width:Math.ceil(t.borderBoxSize[0].inlineSize),height:Math.ceil(t.borderBoxSize[0].blockSize)})});e.observe(t),Lu(t,`auto`);let r=Fu(t,`position`,`static`),o=Fu(t,`transform`,`none`),s=Fu(t,`scale`,`1`),c=Iu(n,{"--available-width":`max-content`,"--available-height":`max-content`});function l(){r(),o(),c()}function m(){l(),s()}if(_?.(),h.current||f.current===null){Ru(n,`max-content`);let r=ju(t);return f.current=r,Ru(n,r),m(),v?.(null,r),h.current=!1,()=>{e.disconnect(),g.current(),g.current=Ho}}Lu(t,`auto`),Ru(n,`max-content`);let b=f.current??p.current,x=ju(t);if(f.current=x,!b)return Ru(n,x),m(),v?.(null,x),()=>{e.disconnect(),d.cancel(),g.current(),g.current=Ho};Lu(t,b),m(),v?.(b,x),Ru(n,x);let S=new AbortController;return d.request(()=>{Lu(t,x),u(()=>{t.style.setProperty(`--popup-width`,`auto`),t.style.setProperty(`--popup-height`,`auto`)},S.signal)}),()=>{e.disconnect(),S.abort(),d.cancel(),g.current(),g.current=Ho}},[r,t,n,u,d,a,i,_,v,y])}function Fu(e,t,n){let r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r)}}function Iu(e,t){let n=[];for(let[r,i]of Object.entries(t))n.push(Fu(e,r,i));return n.length?()=>{n.forEach(e=>e())}:Ho}function Lu(e,t){let n=t===`auto`?`auto`:`${t.width}px`,r=t===`auto`?`auto`:`${t.height}px`;e.style.setProperty(`--popup-width`,n),e.style.setProperty(`--popup-height`,r)}function Ru(e,t){let n=t===`max-content`?`max-content`:`${t.width}px`,r=t===`max-content`?`max-content`:`${t.height}px`;e.style.setProperty(`--positioner-width`,n),e.style.setProperty(`--positioner-height`,r)}function zu(e){let{store:t,side:n,cssVars:r,children:i}=e,a=pu(),o=t.useState(`activeTriggerElement`),s=t.useState(`activeTriggerId`),c=t.useState(`open`),l=t.useState(`payload`),u=t.useState(`mounted`),d=t.useState(`popupElement`),f=t.useState(`positionerElement`),h=Au(c?o:null),g=Uu(s,l),_=m.useRef(null),[v,y]=m.useState(null),[b,x]=m.useState(null),S=m.useRef(null),C=m.useRef(null),w=Xc(S,!0,!1),T=As(),[E,D]=m.useState(null),[O,k]=m.useState(!1);q(()=>(t.set(`hasViewport`,!0),()=>{t.set(`hasViewport`,!1)}),[t]);let A=J(()=>{S.current?.style.setProperty(`animation`,`none`),S.current?.style.setProperty(`transition`,`none`),C.current?.style.setProperty(`display`,`none`)}),j=J(e=>{S.current?.style.removeProperty(`animation`),S.current?.style.removeProperty(`transition`),C.current?.style.removeProperty(`display`),e&&D(e)}),M=m.useRef(null);q(()=>{if(o&&h&&o!==h&&M.current!==o&&_.current){y(_.current),k(!0);let e=Hu(h,o);x(e),T.request(()=>{T.request(()=>{k(!1),w(()=>{y(null),D(null),_.current=null})})}),M.current=o}},[o,h,v,w,T]),q(()=>{let e=S.current;if(!e)return;let t=document.createElement(`div`);for(let n of Array.from(e.childNodes))t.appendChild(n.cloneNode(!0));_.current=t});let N=v!=null,P;P=N?(0,p.jsxs)(m.Fragment,{children:[(0,p.jsx)(`div`,{"data-previous":!0,inert:ku(!0),ref:C,style:{[r.popupWidth]:`${E?.width}px`,[r.popupHeight]:`${E?.height}px`,position:`absolute`},"data-ending-style":O?void 0:``},`previous`),(0,p.jsx)(`div`,{"data-current":!0,ref:S,"data-starting-style":O?``:void 0,children:i},g)]}):(0,p.jsx)(`div`,{"data-current":!0,ref:S,children:i},g),q(()=>{let e=C.current;!e||!v||e.replaceChildren(...Array.from(v.childNodes))},[v]),Pu({popupElement:d,positionerElement:f,mounted:u,content:l,onMeasureLayout:A,onMeasureLayoutComplete:j,side:n,direction:a});let F={activationDirection:Bu(b),transitioning:N};return{children:P,state:F}}function Bu(e){if(e)return`${Vu(e.horizontal,5,`right`,`left`)} ${Vu(e.vertical,5,`down`,`up`)}`}function Vu(e,t,n,r){return e>t?n:e<-t?r:``}function Hu(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i={x:n.left+n.width/2,y:n.top+n.height/2},a={x:r.left+r.width/2,y:r.top+r.height/2};return{horizontal:a.x-i.x,vertical:a.y-i.y}}function Uu(e,t){let[n,r]=m.useState(0),i=m.useRef(e),a=m.useRef(t),o=m.useRef(!1);return q(()=>{let n=i.current,s=a.current,c=e!==n,l=t!==s;c?(r(e=>e+1),o.current=!l):o.current&&l&&(r(e=>e+1),o.current=!1),i.current=e,a.current=t},[e,t]),`${e??`current`}-${n}`}var Wu=m.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0});function Gu(e=!1){let t=m.useContext(Wu);if(!t&&!e)throw Error(sa(86));return t}var Ku=m.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,...a}=e,[o,s]=m.useState(void 0),c=X(`fieldset`,e,{ref:t,state:{disabled:i},props:[{"aria-labelledby":o},a]}),l=m.useMemo(()=>({legendId:o,setLegendId:s,disabled:i}),[o,s,i]);return(0,p.jsx)(Wu.Provider,{value:l,children:c})}),qu=m.forwardRef(function(e,t){let{render:n,className:r,id:i,...a}=e,{disabled:o,setLegendId:s}=Gu(),c=eu(i);return q(()=>(s(c),()=>{s(void 0)}),[s,c]),X(`div`,e,{state:{disabled:o??!1},ref:t,props:[{id:c},a]})}),Ju=(function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e})({}),Yu={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Xu={valid(e){return e===null?null:e?{[Ju.valid]:``}:{[Ju.invalid]:``}}},Zu=m.createContext({invalid:void 0,name:void 0,validityData:{state:Yu,errors:[],error:``,value:``,initialValue:null},setValidityData:Ho,disabled:void 0,touched:!1,setTouched:Ho,dirty:!1,setDirty:Ho,filled:!1,setFilled:Ho,focused:!1,setFocused:Ho,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Wo)=>e,getInputValidationProps:(e=Wo)=>e,inputRef:{current:null},commit:async()=>{}}});function Qu(e=!0){let t=m.useContext(Zu);if(t.setValidityData===Ho&&!e)throw Error(sa(28));return t}var $u=m.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Ho,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function ed(){return m.useContext($u)}var td=m.createContext({controlId:void 0,registerControlId:Ho,labelId:void 0,setLabelId:Ho,messageIds:[],setMessageIds:Ho,getDescriptionProps:e=>e});function nd(){return m.useContext(td)}var rd=function(e){let t=eu(),[n,r]=m.useState(e.initialControlId===void 0?t:e.initialControlId),[i,a]=m.useState(void 0),[o,s]=m.useState([]),c=Qi(()=>new Map),{messageIds:l}=nd(),u=J((e,t)=>{let n=c.current;if(t===void 0){n.delete(e);return}n.set(e,t),r(e=>{if(n.size===0)return;let t;for(let r of n.values()){if(e!==void 0&&r===e)return e;t===void 0&&(t=r)}return t})}),d=m.useCallback(e=>Zs({"aria-describedby":l.concat(o).join(` `)||void 0},e),[l,o]),f=m.useMemo(()=>({controlId:n,registerControlId:u,labelId:i,setLabelId:a,messageIds:o,setMessageIds:s,getDescriptionProps:d}),[n,u,i,a,o,s,d]);return(0,p.jsx)(td.Provider,{value:f,children:e.children})};function id(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}var ad=Object.keys(Yu);function od(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(let n of ad)n!==`valid`&&(n===`valueMissing`&&(t=e[n]),e[n]&&(t=!1));return t}function sd(e){let{formRef:t,clearErrors:n}=ed(),{setValidityData:r,validate:i,validityData:a,validationDebounceTime:o,invalid:s,markedDirtyRef:c,state:l,name:u,shouldValidateOnChange:d}=e,{controlId:f,getDescriptionProps:p}=nd(),h=ma(),g=m.useRef(null),_=J(async(e,n=!1)=>{let o=g.current;if(!o)return;if(n){if(l.valid!==!1)return;let n=o.validity;if(!n.valueMissing){let n={value:e,state:{...Yu,valid:!0},error:``,errors:[],initialValue:a.initialValue};if(o.setCustomValidity(``),f){let e=t.current.fields.get(f);e&&t.current.fields.set(f,{...e,...id(n,!1)})}r(n);return}let i=ad.reduce((e,t)=>(e[t]=n[t],e),{});if(!i.valid&&!od(i))return}function u(e){let t=ad.reduce((t,n)=>(t[n]=e.validity[n],t),{}),n=!1;for(let e of ad)if(e!==`valid`){if(e===`valueMissing`&&t[e])n=!0;else if(t[e])return t}return n&&!c.current&&(t.valid=!0,t.valueMissing=!1),t}h.clear();let p=null,m=[],_=u(o),v,y=d();if(o.validationMessage&&!y)v=o.validationMessage,m=[o.validationMessage];else{let n=Array.from(t.current.fields.values()).reduce((e,t)=>(t.name&&(e[t.name]=t.getValue()),e),{}),r=i(e,n);p=typeof r==`object`&&r&&`then`in r?await r:r,p===null?y&&(o.setCustomValidity(``),_.customError=!1,o.validationMessage?(v=o.validationMessage,m=[o.validationMessage]):o.validity.valid&&!_.valid&&(_.valid=!0)):(_.valid=!1,_.customError=!0,Array.isArray(p)?(m=p,o.setCustomValidity(p.join(`
`))):p&&(m=[p],o.setCustomValidity(p)))}let b={value:e,state:_,error:v??(Array.isArray(p)?p[0]:p??``),errors:m,initialValue:a.initialValue};if(f){let e=t.current.fields.get(f);e&&t.current.fields.set(f,{...e,...id(b,s)})}r(b)}),v=m.useCallback((e={})=>Zs(p,l.valid===!1?{"aria-invalid":!0}:Wo,e),[p,l.valid]),y=m.useCallback((e={})=>Zs({onChange(e){if(e.nativeEvent.defaultPrevented)return;if(n(u),!d()){_(e.currentTarget.value,!0);return}if(s)return;let t=e.currentTarget;if(t.value===``){_(t.value);return}h.clear(),o?h.start(o,()=>{_(t.value)}):_(t.value)}},v(e)),[v,n,u,h,_,s,o,d]);return m.useMemo(()=>({getValidationProps:v,getInputValidationProps:y,inputRef:g,commit:_}),[v,y,_])}var cd=m.forwardRef(function(e,t){let{errors:n,validationMode:r,submitAttemptedRef:i}=ed(),{render:a,className:o,validate:s,validationDebounceTime:c=0,validationMode:l=r,name:u,disabled:d=!1,invalid:f,dirty:h,touched:g,actionsRef:_,...v}=e,{disabled:y}=Gu(),b=J(s||(()=>null)),x=y||d,[S,C]=m.useState(!1),[w,T]=m.useState(!1),[E,D]=m.useState(!1),[O,k]=m.useState(!1),A=h??w,j=g??S,M=m.useRef(!1),N=J(e=>{h===void 0&&(e&&(M.current=!0),T(e))}),P=J(e=>{g===void 0&&C(e)}),F=J(()=>l===`onChange`||l===`onSubmit`&&i.current),I=!!(f||u&&{}.hasOwnProperty.call(n,u)&&n[u]!==void 0),[L,R]=m.useState({state:Yu,error:``,errors:[],value:null,initialValue:null}),z=!I&&L.state.valid,B=m.useMemo(()=>({disabled:x,touched:j,dirty:A,valid:z,filled:E,focused:O}),[x,j,A,z,E,O]),V=sd({setValidityData:R,validate:b,validityData:L,validationDebounceTime:c,invalid:I,markedDirtyRef:M,state:B,name:u,shouldValidateOnChange:F}),H=m.useCallback(()=>{M.current=!0,V.commit(L.value)},[V,L]);m.useImperativeHandle(_,()=>({validate:H}),[H]);let U=m.useMemo(()=>({invalid:I,name:u,validityData:L,setValidityData:R,disabled:x,touched:j,setTouched:P,dirty:A,setDirty:N,filled:E,setFilled:D,focused:O,setFocused:k,validate:b,validationMode:l,validationDebounceTime:c,shouldValidateOnChange:F,state:B,markedDirtyRef:M,validation:V}),[I,u,L,x,j,P,A,N,E,D,O,k,b,l,c,F,B,V]),ee=X(`div`,e,{ref:t,state:B,props:v,stateAttributesMapping:Xu});return(0,p.jsx)(Zu.Provider,{value:U,children:ee})}),ld=m.forwardRef(function(e,t){return(0,p.jsx)(rd,{children:(0,p.jsx)(cd,{...e,ref:t})})}),ud=m.forwardRef(function(e,t){let{render:n,className:r,id:i,nativeLabel:a=!0,...o}=e,s=Qu(!1),{controlId:c,setLabelId:l,labelId:u}=nd(),d=eu(i),f=m.useRef(null),p=J(e=>{if(Ka(e.nativeEvent)?.closest(`button,input,select,textarea`)||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),a||!c))return;let t=xa(e.currentTarget).getElementById(c);Mt(t)&&t.focus({focusVisible:!0})});return q(()=>(d&&l(d),()=>{l(void 0)}),[d,l]),X(`label`,e,{ref:[t,f],state:s.state,props:[{id:u},a?{htmlFor:c??void 0,onMouseDown:p}:{onClick:p,onPointerDown(e){e.preventDefault()}},o],stateAttributesMapping:Xu})}),dd={...Xu,...Yc},fd=m.forwardRef(function(e,t){let{render:n,id:r,className:i,match:a,...o}=e,s=eu(r),{validityData:c,state:l,name:u}=Qu(!1),{setMessageIds:d}=nd(),{errors:f}=ed(),h=u?f[u]:null,g=!1;g=h||a===!0?!0:a?!!c.state[a]:c.state.valid===!1;let{mounted:_,transitionStatus:v,setMounted:y}=Gc(g);q(()=>{if(!(!g||!s))return d(e=>e.concat(s)),()=>{d(e=>e.filter(e=>e!==s))}},[g,s,d]);let b=m.useRef(null),[x,S]=m.useState(null),[C,w]=m.useState(null),T=h||(c.errors.length>1?(0,p.jsx)(`ul`,{children:c.errors.map(e=>(0,p.jsx)(`li`,{children:e},e))}):c.error),E=c.error;h==null?c.errors.length>1&&(E=JSON.stringify(c.errors)):E=Array.isArray(h)?JSON.stringify(h):h,g&&E!==C&&(w(E),S(T)),Zc({open:g,ref:b,onComplete(){g||y(!1)}});let D={...l,transitionStatus:v},O=X(`div`,e,{ref:[t,b],state:D,props:[{id:s,children:g?T:x},o],stateAttributesMapping:dd,enabled:_});return _?O:null}),pd=m.forwardRef(function(e,t){let{render:n,id:r,className:i,...a}=e,o=eu(r),s=Qu(!1),{setMessageIds:c}=nd();return q(()=>{if(o)return c(e=>e.concat(o)),()=>{c(e=>e.filter(e=>e!==o))}},[o,c]),X(`p`,e,{ref:t,state:s.state,props:[{id:o},a],stateAttributesMapping:Xu})});function md({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=m.useRef(e!==void 0),[a,o]=m.useState(t);return[i?e:a,m.useCallback(e=>{i||o(e)},[])]}function hd(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=nd(),o=eu(t),s=n?i:void 0,c=Qi(()=>Symbol(`labelable-control`)),l=m.useRef(!1),u=m.useRef(t!=null),d=J(()=>{!l.current||a===Ho||(l.current=!1,a(c.current,void 0))});return q(()=>{if(a===Ho)return;let e;if(n){let n=r?.current;e=jt(n)&&n.closest(`label`)!=null?t??null:s??o}else if(t!=null)u.current=!0,e=t;else if(u.current)e=o;else{d();return}if(e===void 0){d();return}l.current=!0,a(c.current,e)},[t,r,s,a,n,o,c,d]),m.useEffect(()=>d,[d]),i??o}function gd(e){let{enabled:t=!0,value:n,id:r,name:i,controlRef:a,commit:o}=e,{formRef:s}=ed(),{invalid:c,markedDirtyRef:l,validityData:u,setValidityData:d}=Qu(),f=J(e.getValue);q(()=>{if(!t)return;let e=n;e===void 0&&(e=f()),u.initialValue===null&&e!==null&&d(t=>({...t,initialValue:e}))},[t,d,n,u.initialValue,f]),q(()=>{!t||!r||s.current.fields.set(r,{getValue:f,name:i,controlRef:a,validityData:id(u,c),validate(e=!0){let t=n;t===void 0&&(t=f()),l.current=!0,e?S.flushSync(()=>o(t)):o(t)}})},[o,a,t,s,f,r,c,l,i,u,n]),q(()=>{let e=s.current.fields;return()=>{r&&e.delete(r)}},[s,r])}var _d=m.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,...d}=e,{state:f,name:p,disabled:h,setTouched:g,setDirty:_,validityData:v,setFocused:y,setFilled:b,validationMode:x,validation:S}=Qu(),C=h||s,w=p??a,T={...f,disabled:C},{labelId:E}=nd(),D=hd({id:i});q(()=>{let e=o!=null;S.inputRef.current?.value||e&&o!==``?b(!0):e&&o===``&&b(!1)},[S.inputRef,b,o]);let O=m.useRef(null);q(()=>{u&&O.current===Ua(xa(O.current))&&y(!0)},[u,y]);let[k]=md({controlled:o,default:l,name:`FieldControl`,state:`value`}),A=o!==void 0,j=A?k:void 0;return gd({id:D,name:w,commit:S.commit,value:j,getValue:()=>S.inputRef.current?.value,controlRef:S.inputRef}),X(`input`,e,{ref:[t,O],state:T,props:[{id:D,disabled:C,name:w,ref:S.inputRef,"aria-labelledby":E,autoFocus:u,...A?{value:j}:{defaultValue:l},onChange(e){let t=e.currentTarget.value;c?.(t,Y(Qo,e.nativeEvent)),_(t!==v.initialValue),b(t!==``)},onFocus(){y(!0)},onBlur(e){g(!0),y(!1),x===`onBlur`&&S.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(g(!0),S.commit(e.currentTarget.value))}},S.getInputValidationProps(),d],stateAttributesMapping:Xu})}),vd=m.createContext({disabled:!1});function yd(){return m.useContext(vd)}var bd=m.createContext(void 0);function xd(e=!0){let t=m.useContext(bd);if(t===void 0&&!e)throw Error(sa(3));return t}var Sd=(function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.indeterminate=`data-indeterminate`,e.disabled=`data-disabled`,e.readonly=`data-readonly`,e.required=`data-required`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e})({});function Cd(e){return m.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[Sd.checked]:``}:{[Sd.unchecked]:``}},...Xu}),[e.indeterminate])}var wd=m.createContext(void 0);function Td(e=!1){let t=m.useContext(wd);if(t===void 0&&!e)throw Error(sa(16));return t}function Ed(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:m.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function Dd(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,a=m.useRef(null),o=Td(!0)!==void 0,s=J(()=>{let e=a.current;return!!(e?.tagName===`A`&&e?.href)}),{props:c}=Ed({focusableWhenDisabled:n,disabled:t,composite:o,tabIndex:r,isNativeButton:i}),l=m.useCallback(()=>{let e=a.current;Od(e)&&o&&t&&c.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,c.disabled,o]);return q(l,[l]),{getButtonProps:m.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:l,...u}=e;return Zs({type:i?`button`:void 0,onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(ac(e),o?.(e)),e.baseUIHandlerPrevented)return;let r=e.target===e.currentTarget&&!i&&!s()&&!t,a=e.key===`Enter`,c=e.key===` `;r&&((c||a)&&e.preventDefault(),a&&n?.(e))},onKeyUp(e){t||(ac(e),a?.(e)),!e.baseUIHandlerPrevented&&e.target===e.currentTarget&&!i&&!t&&e.key===` `&&n?.(e)},onPointerDown(e){if(t){e.preventDefault();return}l?.(e)}},i?void 0:{role:`button`},c,u)},[t,c,i,s]),buttonRef:J(e=>{a.current=e,l()})}}function Od(e){return Mt(e)&&e.tagName===`BUTTON`}var kd=m.createContext(void 0);function Ad(){let e=m.useContext(kd);if(e===void 0)throw Error(sa(14));return e}function jd(e,t){let n=m.useRef(e),r=J(t);q(()=>{n.current!==e&&r(n.current)},[e,r]),q(()=>{n.current=e},[e])}var Md=`data-parent`,Nd=m.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i=!1,disabled:a=!1,id:o,indeterminate:s=!1,inputRef:c,name:l,onCheckedChange:u,parent:d=!1,readOnly:f=!1,render:h,required:g=!1,uncheckedValue:_,value:v,nativeButton:y=!1,...b}=e,{clearErrors:x}=ed(),{disabled:S,name:C,setDirty:w,setFilled:T,setFocused:E,setTouched:D,state:O,validationMode:k,validityData:A,shouldValidateOnChange:j,validation:M}=Qu(),N=yd(),{labelId:P,controlId:F,registerControlId:I,getDescriptionProps:L}=nd(),R=xd(),z=R?.parent,B=z&&R.allValues,V=S||N.disabled||R?.disabled||a,H=C??l,U=v??H,ee=eu(),te=eu(),ne=F;B?ne=d?te:`${z.id}-${U}`:o&&(ne=o);let W={};B&&(d?W=R.parent.getParentProps():U&&(W=R.parent.getChildProps(U)));let re=J(u),{checked:ie=n,indeterminate:ae=s,onCheckedChange:oe,...se}=W,ce=R?.value,le=R?.setValue,ue=R?.defaultValue,de=m.useRef(null),fe=Qi(()=>Symbol(`checkbox-control`)),pe=m.useRef(!1),{getButtonProps:me,buttonRef:he}=Dd({disabled:V,native:y}),ge=R?.validation??M,[_e,ve]=md({controlled:U&&ce&&!d?ce.includes(U):ie,default:U&&ue&&!d?ue.includes(U):i,name:`Checkbox`,state:`checked`});q(()=>{I!==Ho&&(pe.current=!0,I(fe.current,ne))},[ne,R,I,d,fe]),m.useEffect(()=>{let e=fe.current;return()=>{!pe.current||I===Ho||(pe.current=!1,I(e,void 0))}},[I,fe]),gd({enabled:!R,id:ee,commit:ge.commit,value:_e,controlRef:de,name:H,getValue:()=>_e});let ye=m.useRef(null),be=vs(c,ye,ge.inputRef);q(()=>{ye.current&&(ye.current.indeterminate=ae,_e&&T(!0))},[_e,ae,T]),jd(_e,()=>{R&&!d||(x(H),T(_e),w(_e!==A.initialValue),j()?ge.commit(_e):ge.commit(_e,!0))});let xe=Zs({checked:_e,disabled:V,name:d?void 0:H,id:y?void 0:ne??void 0,required:g,ref:be,style:H?Es:Ts,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.checked,n=Y(Qo,e.nativeEvent);if(oe?.(t,n),re(t,n),!n.isCanceled&&(ve(t),U&&ce&&le&&!d)){let e=t?[...ce,U]:ce.filter(e=>e!==U);le(e,n)}},onFocus(){de.current?.focus()}},v===void 0?Wo:{value:(R?_e&&v:v)||``},L,R?ge.getValidationProps:ge.getInputValidationProps),Se=B?!!ie:_e,Ce=B&&ae||s;m.useEffect(()=>{if(!z||!U)return;let e=z.disabledStatesRef.current;return e.set(U,V),()=>{e.delete(U)}},[z,V,U]);let we=m.useMemo(()=>({...O,checked:Se,disabled:V,readOnly:f,required:g,indeterminate:Ce}),[O,Se,V,f,g,Ce]),Te=Cd(we),Ee=X(`span`,e,{state:we,ref:[he,de,t,R?.registerControlRef],props:[{id:y?ne??void 0:ee,role:`checkbox`,"aria-checked":ae?`mixed`:_e,"aria-readonly":f||void 0,"aria-required":g||void 0,"aria-labelledby":P,[Md]:d?``:void 0,onFocus(){E(!0)},onBlur(){let e=ye.current;e&&(D(!0),E(!1),k===`onBlur`&&ge.commit(R?ce:e.checked))},onClick(e){f||V||(e.preventDefault(),ye.current?.dispatchEvent(new PointerEvent(`click`,{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))}},L,ge.getValidationProps,b,se,me],stateAttributesMapping:Te});return(0,p.jsxs)(kd.Provider,{value:we,children:[Ee,!_e&&!R&&H&&!d&&_!==void 0&&(0,p.jsx)(`input`,{type:`hidden`,name:H,value:_}),(0,p.jsx)(`input`,{...xe})]})}),Pd=[];function Fd(e){let{allValues:t=Pd,value:n=Pd,onValueChange:r}=e,i=m.useRef(n),a=m.useRef(new Map),[o,s]=m.useState(`mixed`),c=eu(),l=n.length===t.length,u=n.length!==t.length&&n.length>0,d=J(r),f=m.useCallback(()=>({id:c,indeterminate:u,checked:l,"aria-controls":t.map(e=>`${c}-${e}`).join(` `),onCheckedChange(e,r){let c=i.current,l=t.filter(e=>a.current.get(e)&&c.includes(e)),u=t.filter(e=>!a.current.get(e)||a.current.get(e)&&c.includes(e));if(c.length===u.length||c.length===0){n.length===u.length?d(l,r):d(u,r);return}o===`mixed`?(d(u,r),s(`on`)):o===`on`?(d(l,r),s(`off`)):o===`off`&&(d(c,r),s(`mixed`))}}),[t,l,c,u,d,o,n.length]),p=m.useCallback(e=>({checked:n.includes(e),onCheckedChange(t,r){let a=n.slice();t?a.push(e):a.splice(a.indexOf(e),1),i.current=a,d(a,r),s(`mixed`)}}),[d,n]);return m.useMemo(()=>({id:c,indeterminate:u,getParentProps:f,getChildProps:p,disabledStatesRef:a}),[c,u,f,p])}function Id(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}var Ld=m.forwardRef(function(e,t){let{allValues:n,className:r,defaultValue:i,disabled:a=!1,id:o,onValueChange:s,render:c,value:l,...u}=e,{disabled:d,name:f,state:h,validation:g,setFilled:_,setDirty:v,shouldValidateOnChange:y,validityData:b}=Qu(),{labelId:x,getDescriptionProps:S}=nd(),{clearErrors:C}=ed(),w=d||a,[T,E]=md({controlled:l,default:i,name:`CheckboxGroup`,state:`value`}),D=J((e,t)=>{s?.(e,t),!t.isCanceled&&E(e)}),O=Fd({allValues:n,value:l,onValueChange:s}),k=eu(o),A=m.useRef(null),j=m.useCallback(e=>{A.current==null&&e!=null&&!e.hasAttribute(Md)&&(A.current=e)},[]);gd({enabled:!!f,id:k,commit:g.commit,value:T,controlRef:A,name:f,getValue:()=>T});let M=T??Uo;jd(M,()=>{f&&C(f);let e=Array.isArray(b.initialValue)?b.initialValue:Uo;_(M.length>0),v(!Id(M,e)),y()?g.commit(M):g.commit(M,!0)});let N={...h,disabled:w},P=m.useMemo(()=>({allValues:n,value:T,defaultValue:i,setValue:D,parent:O,disabled:w,validation:g,registerControlRef:j}),[n,T,i,D,O,w,g,j]),F=X(`div`,e,{state:N,ref:t,props:[{role:`group`,"aria-labelledby":x},S,u],stateAttributesMapping:Xu});return(0,p.jsx)(bd.Provider,{value:P,children:F})}),Rd=m.forwardRef(function(e,t){let{render:n,className:r,keepMounted:i=!1,...a}=e,o=Ad(),s=o.checked||o.indeterminate,{mounted:c,transitionStatus:l,setMounted:u}=Gc(s),d=m.useRef(null),f={...o,transitionStatus:l};Zc({open:s,ref:d,onComplete(){s||u(!1)}});let p=Cd(o),h=m.useMemo(()=>({...p,...Yc,...Xu}),[p]),g=i||c,_=X(`span`,e,{ref:[t,d],state:f,stateAttributesMapping:h,props:a});return g?_:null}),zd=m.createContext(void 0);function Bd(){let e=m.useContext(zd);if(!e)throw Error(sa(73));return e}var Vd=0;function Hd(e){return Vd+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${Vd}`}function Ud(e,t){if(typeof e==`string`)return{description:e};if(typeof e==`function`){let n=e(t);return typeof n==`string`?{description:n}:n}return e}var Wd=Ic(e=>e.toasts,e=>{let t=new Map,n=0,r=0;return e.forEach((e,i)=>{let a=e.transitionStatus===`ending`;t.set(e.id,{value:e,domIndex:i,visibleIndex:a?-1:n,offsetY:r}),r+=e.height||0,a||(n+=1)}),t}),Gd={toasts:Z(e=>e.toasts),isEmpty:Z(e=>e.toasts.length===0),toast:Z(Wd,(e,t)=>e.get(t)?.value),toastIndex:Z(Wd,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:Z(Wd,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:Z(Wd,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:Z(e=>e.hovering),focused:Z(e=>e.focused),expanded:Z(e=>e.hovering||e.focused),expandedOrOutOfFocus:Z(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:Z(e=>e.prevFocusElement)},Kd=class extends Hc{timers=new Map;areTimersPaused=!1;constructor(e){super(e,{},Gd)}setFocused(e){this.set(`focused`,e)}setHovering(e){this.set(`hovering`,e)}setIsWindowFocused(e){this.set(`isWindowFocused`,e)}setPrevFocusElement(e){this.set(`prevFocusElement`,e)}setViewport=e=>{this.set(`viewport`,e)};disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e){let t=Gd.toastIndex(this.state,e);if(t===-1)return;this.state.toasts[t]?.onRemove?.();let n=[...this.state.toasts];n.splice(t,1),this.setToasts(n)}addToast=e=>{let{toasts:t,timeout:n,limit:r}=this.state,i=e.id||Hd(`toast`),a={...e,id:i,transitionStatus:`starting`},o=[a,...t],s=o.filter(e=>e.transitionStatus!==`ending`);if(s.length>r){let e=s.length-r,t=s.slice(-e),n=new Set(t.map(e=>e.id));this.setToasts(o.map(e=>{let t=n.has(e.id);return e.limited===t?e:{...e,limited:t}}))}else this.setToasts(o.map(e=>e.limited?{...e,limited:!1}:e));let c=a.timeout??n;return a.type!==`loading`&&c>0&&this.scheduleTimer(i,c,()=>this.closeToast(i)),Gd.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),i};updateToast=(e,t)=>{this.updateToastInternal(e,t)};updateToastInternal=(e,t)=>{let{timeout:n,toasts:r}=this.state,i=Gd.toast(this.state,e)??null;if(!i||i.transitionStatus===`ending`)return;let a={...i,...t};this.setToasts(r.map(n=>n.id===e?{...n,...t}:n));let o=a.timeout??n,s=i?.timeout??n,c=Object.hasOwn(t,`timeout`),l=a.transitionStatus!==`ending`&&a.type!==`loading`&&o>0,u=this.timers.has(e),d=s!==o,f=i?.type===`loading`;if(!l&&u){this.timers.get(e)?.timeout?.clear(),this.timers.delete(e);return}if(l&&(!u||d||c||f)){let t=this.timers.get(e);t&&(t.timeout?.clear(),this.timers.delete(e)),this.scheduleTimer(e,o,()=>this.closeToast(e)),Gd.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}};closeToast=e=>{Gd.toast(this.state,e)?.onClose?.();let{limit:t,toasts:n}=this.state,r=0,i=n.map(n=>{if(n.id===e)return{...n,transitionStatus:`ending`,height:0};if(n.transitionStatus===`ending`)return n;let i=r>=t;return r+=1,n.limited===i?n:{...n,limited:i}}),a=this.timers.get(e);a&&a.timeout&&(a.timeout.clear(),this.timers.delete(e)),this.handleFocusManagement(e),this.setToasts(i)};promiseToast=(e,t)=>{let n=Ud(t.loading),r=this.addToast({...n,type:`loading`}),i=e.then(e=>{let n=Ud(t.success,e);return this.updateToast(r,{...n,type:`success`,timeout:n.timeout}),e}).catch(e=>{let n=Ud(t.error,e);return this.updateToast(r,{...n,type:`error`,timeout:n.timeout}),Promise.reject(e)});return{}.hasOwnProperty.call(t,`setPromise`)&&t.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{if(e.timeout){e.timeout.clear();let t=Date.now()-e.start,n=e.delay-t;e.remaining=n>0?n:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,t)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=pa.create(),e.timeout.start(e.remaining,()=>{this.timers.delete(t),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if(e.pointerType!==`touch`)return;let t=Ka(e);Wa(this.state.viewport,t)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,t,n){let r=Date.now(),i=!Gd.expandedOrOutOfFocus(this.state),a=i?pa.create():void 0;a?.start(t,()=>{this.timers.delete(e),n()}),this.timers.set(e,{timeout:a,start:i?r:0,delay:t,remaining:t,callback:n})}setToasts(e){let t={toasts:e};e.length===0&&(t.hovering=!1,t.focused=!1),this.update(t)}handleFocusManagement(e){let t=Ua(xa(this.state.viewport));if(!this.state.viewport||!Wa(this.state.viewport,t)||!Za(t))return;let n=Gd.toasts(this.state),r=Gd.toastIndex(this.state,e),i=null,a=r+1;for(;a<n.length;){if(n[a].transitionStatus!==`ending`){i=n[a];break}a+=1}if(!i)for(a=r-1;a>=0;){if(n[a].transitionStatus!==`ending`){i=n[a];break}--a}i?i.ref?.current?.focus():this.restoreFocusToPrevElement()}},qd=function(e){let{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,a=Qi(()=>new Kd({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return da(a.disposeEffect),m.useEffect(function(){return i?i[` subscribe`](({action:e,options:t})=>{let n=t.id;e===`promise`&&t.promise?a.promiseToast(t.promise,t):e===`update`&&n?a.updateToast(n,t):e===`close`&&n?a.closeToast(n):a.addToast(t)}):void 0},[a,n,i]),a.useSyncedValues({timeout:n,limit:r}),(0,p.jsx)(zd.Provider,{value:a,children:t})},Jd=(function(e){return e.frontmostHeight=`--toast-frontmost-height`,e})({}),Yd=m.forwardRef(function(e,t){let{render:n,className:r,children:i,...a}=e,o=Bd(),s=ma(),c=m.useRef(!1),l=m.useRef(!1),u=o.useState(`isEmpty`),d=o.useState(`toasts`),f=o.useState(`focused`),h=o.useState(`expanded`),g=o.useState(`prevFocusElement`),_=d[0]?.height??0,v=m.useMemo(()=>d.some(e=>e.transitionStatus===`ending`),[d]);m.useEffect(()=>{let e=o.state.viewport;if(!e)return;function t(t){u||t.key===`F6`&&t.target!==e&&(t.preventDefault(),o.setPrevFocusElement(Ua(xa(e))),e?.focus({preventScroll:!0}),o.pauseTimers(),o.setFocused(!0))}let n=Ot(e);return n.addEventListener(`keydown`,t),()=>{n.removeEventListener(`keydown`,t)}},[o,u]),m.useEffect(()=>{let e=o.state.viewport;if(!e||u)return;let t=Ot(e);function n(e){e.target===t&&(o.setIsWindowFocused(!1),o.pauseTimers())}function r(n){if(n.relatedTarget||n.target===t)return;let r=Ka(n),i=Ua(xa(e));(!Wa(e,r)||!Za(i))&&o.resumeTimers(),s.start(0,()=>o.setIsWindowFocused(!0))}return t.addEventListener(`blur`,n,!0),t.addEventListener(`focus`,r,!0),()=>{t.removeEventListener(`blur`,n,!0),t.removeEventListener(`focus`,r,!0)}},[o,s,u]),m.useEffect(()=>{let e=o.state.viewport;if(!e||u)return;let t=xa(e);return t.addEventListener(`pointerdown`,o.handleDocumentPointerDown,!0),()=>{t.removeEventListener(`pointerdown`,o.handleDocumentPointerDown,!0)}},[u,o]);function y(e){let t=o.state.viewport;t&&(c.current=!0,e.relatedTarget===t?d[0]?.ref?.current?.focus():o.restoreFocusToPrevElement())}function b(e){e.key===`Tab`&&e.shiftKey&&e.target===o.state.viewport&&(e.preventDefault(),o.restoreFocusToPrevElement(),o.resumeTimers())}m.useEffect(()=>{!o.state.isWindowFocused||v||!l.current||(o.resumeTimers(),o.setHovering(!1),l.current=!1)},[v,o]);function x(){o.pauseTimers(),o.setHovering(!0),l.current=!1}function S(){v?l.current=!0:(o.resumeTimers(),o.setHovering(!1))}function C(){if(c.current){c.current=!1;return}f||Za(xa(o.state.viewport).activeElement)&&(o.setFocused(!0),o.pauseTimers())}function w(e){!f||Wa(o.state.viewport,e.relatedTarget)||(o.setFocused(!1),o.resumeTimers())}let T={tabIndex:-1,role:`region`,"aria-live":`polite`,"aria-atomic":!1,"aria-relevant":`additions text`,"aria-label":`Notifications`,onMouseEnter:x,onMouseMove:x,onMouseLeave:S,onFocus:C,onBlur:w,onKeyDown:b,onClick:C},E={expanded:h},D=X(`div`,e,{ref:[t,o.setViewport],state:E,props:[T,{style:{[Jd.frontmostHeight]:_?`${_}px`:void 0}},a,{children:(0,p.jsxs)(m.Fragment,{children:[!u&&g&&(0,p.jsx)(js,{onFocus:y}),i,!u&&g&&(0,p.jsx)(js,{onFocus:y})]})}]}),O=m.useMemo(()=>d.filter(e=>e.priority===`high`),[d]);return(0,p.jsxs)(m.Fragment,{children:[!u&&g&&(0,p.jsx)(js,{onFocus:y}),D,!f&&O.length>0&&(0,p.jsx)(`div`,{style:Ts,children:O.map(e=>(0,p.jsxs)(`div`,{role:`alert`,"aria-atomic":!0,children:[(0,p.jsx)(`div`,{children:e.title}),(0,p.jsx)(`div`,{children:e.description})]},e.id))})]})}),Xd=m.createContext(void 0);function Zd(){let e=m.useContext(Xd);if(!e)throw Error(sa(66));return e}var Qd=(function(e){return e.index=`--toast-index`,e.offsetY=`--toast-offset-y`,e.height=`--toast-height`,e.swipeMovementX=`--toast-swipe-movement-x`,e.swipeMovementY=`--toast-swipe-movement-y`,e})({}),$d={...Yc,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},ef=40,tf=10,nf=.5,rf=1;function af(e,t,n){switch(e){case`up`:return-n;case`down`:return n;case`left`:return-t;case`right`:return t;default:return 0}}function of(e){let t=window.getComputedStyle(e).transform,n=0,r=0,i=1;if(t&&t!==`none`){let e=t.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(n=t[4],r=t[5],i=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(n=t[12],r=t[13],i=t[0])}}return{x:n,y:r,scale:i}}var sf=m.forwardRef(function(e,t){let{toast:n,render:r,className:i,swipeDirection:a=[`down`,`right`],...o}=e,s=n.positionerProps?.anchor!==void 0,c=[];s||(c=Array.isArray(a)?a:[a]);let l=c.length>0,u=Bd(),[d,f]=m.useState(void 0),[h,g]=m.useState(!1),[_,v]=m.useState(!1),[y,b]=m.useState(!1),[x,C]=m.useState({x:0,y:0}),[w,T]=m.useState({x:0,y:0,scale:1}),[E,D]=m.useState(),[O,k]=m.useState(),[A,j]=m.useState(null),M=m.useRef(null),N=m.useRef({x:0,y:0}),P=m.useRef({x:0,y:0,scale:1}),F=m.useRef(void 0),I=m.useRef(0),L=m.useRef(!1),R=m.useRef({x:0,y:0}),z=m.useRef(!1),B=u.useState(`toastIndex`,n.id),V=u.useState(`toastVisibleIndex`,n.id),H=u.useState(`toastOffsetY`,n.id),U=u.useState(`focused`),ee=u.useState(`expanded`);Zc({open:n.transitionStatus!==`ending`,ref:M,onComplete(){n.transitionStatus===`ending`&&u.removeToast(n.id)}});let te=J((e=!1)=>{let t=M.current;if(!t)return;let r=t.style.height;t.style.height=`auto`;let i=t.offsetHeight;t.style.height=r;function a(){u.updateToastInternal(n.id,{ref:M,height:i,...n.transitionStatus===`starting`?{transitionStatus:void 0}:{}})}e?S.flushSync(a):a()});q(te,[te]);function ne(e,t){let n=e,r=t;return!c.includes(`left`)&&!c.includes(`right`)?n=e>0?e**nf:-(Math.abs(e)**nf):(!c.includes(`right`)&&e>0&&(n=e**nf),!c.includes(`left`)&&e<0&&(n=-(Math.abs(e)**nf))),!c.includes(`up`)&&!c.includes(`down`)?r=t>0?t**nf:-(Math.abs(t)**nf):(!c.includes(`down`)&&t>0&&(r=t**nf),!c.includes(`up`)&&t<0&&(r=-(Math.abs(t)**nf))),{x:n,y:r}}function W(e){if(e.button!==0)return;e.pointerType===`touch`&&u.pauseTimers();let t=Ka(e.nativeEvent);if(!(t&&t.closest(`button,a,input,textarea,[role="button"],[data-swipe-ignore]`))){if(L.current=!1,F.current=void 0,I.current=0,N.current={x:e.clientX,y:e.clientY},R.current=N.current,M.current){let e=of(M.current);P.current=e,T(e),C({x:e.x,y:e.y})}u.setHovering(!0),g(!0),v(!1),j(null),z.current=!0,M.current?.setPointerCapture(e.pointerId)}}function re(e){if(!h)return;e.preventDefault(),z.current&&=(N.current={x:e.clientX,y:e.clientY},!1);let{clientY:t,clientX:n,movementX:r,movementY:i}=e;(i<0&&t>R.current.y||i>0&&t<R.current.y)&&(R.current={x:R.current.x,y:t}),(r<0&&n>R.current.x||r>0&&n<R.current.x)&&(R.current={x:n,y:R.current.y});let a=n-N.current.x,o=t-N.current.y,s=t-R.current.y,l=n-R.current.x;if(!_&&Math.sqrt(a*a+o*o)>=rf&&(v(!0),A===null)){let e=c.includes(`left`)||c.includes(`right`),t=c.includes(`up`)||c.includes(`down`);e&&t&&j(Math.abs(a)>Math.abs(o)?`horizontal`:`vertical`)}let u;if(!F.current)A===`vertical`?o>0?u=`down`:o<0&&(u=`up`):A===`horizontal`?a>0?u=`right`:a<0&&(u=`left`):u=Math.abs(a)>=Math.abs(o)?a>0?`right`:`left`:o>0?`down`:`up`,u&&c.includes(u)&&(F.current=u,I.current=af(u,a,o),f(u));else{let e=F.current,t=af(e,l,s);t>ef?(L.current=!1,f(e)):!(c.includes(`left`)&&c.includes(`right`))&&!(c.includes(`up`)&&c.includes(`down`))&&I.current-t>=tf&&(L.current=!0)}let d=ne(a,o),p=P.current.x,m=P.current.y;A===`horizontal`?(c.includes(`left`)||c.includes(`right`))&&(p+=d.x):(A===`vertical`||(c.includes(`left`)||c.includes(`right`))&&(p+=d.x),(c.includes(`up`)||c.includes(`down`))&&(m+=d.y)),C({x:p,y:m})}function ie(e){if(!h)return;if(g(!1),v(!1),j(null),M.current?.releasePointerCapture(e.pointerId),L.current){C({x:w.x,y:w.y}),f(void 0);return}let t=!1,r=x.x-w.x,i=x.y-w.y,a;for(let e of c){switch(e){case`right`:r>ef&&(t=!0,a=`right`);break;case`left`:r<-40&&(t=!0,a=`left`);break;case`down`:i>ef&&(t=!0,a=`down`);break;case`up`:i<-40&&(t=!0,a=`up`);break}if(t)break}t?(f(a),b(!0),u.closeToast(n.id)):(C({x:w.x,y:w.y}),f(void 0))}function ae(e){if(e.key===`Escape`){if(!M.current||!Wa(M.current,Ua(xa(M.current))))return;u.closeToast(n.id)}}m.useEffect(()=>{if(!l)return;let e=M.current;if(!e)return;function t(t){Wa(e,t.target)&&t.preventDefault()}return e.addEventListener(`touchmove`,t,{passive:!1}),()=>{e.removeEventListener(`touchmove`,t)}},[l]);function oe(){if(!h&&x.x===w.x&&x.y===w.y&&!y)return{[Qd.swipeMovementX]:`0px`,[Qd.swipeMovementY]:`0px`};let e=x.x-w.x,t=x.y-w.y;return{transition:h?`none`:void 0,transform:h?`translateX(${x.x}px) translateY(${x.y}px) scale(${w.scale})`:void 0,[Qd.swipeMovementX]:`${e}px`,[Qd.swipeMovementY]:`${t}px`}}let se=n.priority===`high`,ce={role:se?`alertdialog`:`dialog`,tabIndex:0,"aria-modal":!1,"aria-labelledby":E,"aria-describedby":O,"aria-hidden":se&&!U?!0:void 0,onPointerDown:l?W:void 0,onPointerMove:l?re:void 0,onPointerUp:l?ie:void 0,onKeyDown:ae,inert:ku(n.limited),style:{...oe(),[Qd.index]:n.transitionStatus===`ending`?B:V,[Qd.offsetY]:`${H}px`,[Qd.height]:n.height?`${n.height}px`:void 0}},le=m.useMemo(()=>({rootRef:M,toast:n,titleId:E,setTitleId:D,descriptionId:O,setDescriptionId:k,swiping:h,swipeDirection:d,recalculateHeight:te,index:B,visibleIndex:V,expanded:ee}),[n,E,O,h,d,te,B,V,ee]),ue={transitionStatus:n.transitionStatus,expanded:ee,limited:n.limited||!1,type:n.type,swiping:le.swiping,swipeDirection:le.swipeDirection},de=X(`div`,e,{ref:[t,le.rootRef],state:ue,stateAttributesMapping:$d,props:[ce,o]});return(0,p.jsx)(Xd.Provider,{value:le,children:de})}),cf=m.forwardRef(function(e,t){let{render:n,className:r,...i}=e,{visibleIndex:a,expanded:o,recalculateHeight:s}=Zd(),c=m.useRef(null);return q(()=>{let e=c.current;if(!e||(s(),typeof ResizeObserver!=`function`||typeof MutationObserver!=`function`))return;let t=new ResizeObserver(()=>s(!0)),n=new MutationObserver(()=>s(!0));return t.observe(e),n.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{t.disconnect(),n.disconnect()}},[s]),X(`div`,e,{ref:[t,c],state:{expanded:o,behind:a>0},props:i})}),lf=m.forwardRef(function(e,t){let{render:n,className:r,id:i,children:a,...o}=e,{toast:s,setDescriptionId:c}=Zd(),l=a??s.description,u=!!l,d=Mo(i);q(()=>{if(u)return c(d),()=>{c(void 0)}},[u,d,c]);let f=X(`p`,e,{ref:t,state:{type:s.type},props:{...o,id:d,children:l}});return u?f:null}),uf=m.forwardRef(function(e,t){let{render:n,className:r,id:i,children:a,...o}=e,{toast:s,setTitleId:c}=Zd(),l=a??s.title,u=!!l,d=Mo(i);q(()=>{if(u)return c(d),()=>{c(void 0)}},[u,d,c]);let f=X(`h2`,e,{ref:t,state:{type:s.type},props:{...o,id:d,children:l}});return u?f:null}),df=m.forwardRef(function(e,t){let{render:n,className:r,disabled:i,nativeButton:a=!0,...o}=e,s=Bd(),{toast:c}=Zd(),l=s.useState(`expanded`),[u,d]=m.useState(!1),{getButtonProps:f,buttonRef:p}=Dd({disabled:i,native:a}),h={type:c.type};return X(`button`,e,{ref:[t,p],state:h,props:[{"aria-hidden":!l&&!u,onClick(){s.closeToast(c.id)},onFocus(){d(!0)},onBlur(){d(!1)}},o,f]})}),ff=cu,pf=m.createContext(void 0),mf=m.forwardRef(function(e,t){let{toast:n,...r}=e,i=Bd(),a=n.positionerProps??Wo,{render:o,className:s,anchor:c=a.anchor,positionMethod:l=a.positionMethod??`absolute`,side:u=a.side??`top`,align:d=a.align??`center`,sideOffset:f=a.sideOffset??0,alignOffset:h=a.alignOffset??0,collisionBoundary:g=a.collisionBoundary??`clipping-ancestors`,collisionPadding:_=a.collisionPadding??5,arrowPadding:v=a.arrowPadding??5,sticky:y=a.sticky??!1,disableAnchorTracking:b=a.disableAnchorTracking??!1,collisionAvoidance:x=a.collisionAvoidance??Xo,...S}=r,[C,w]=m.useState(null),T=i.useState(`toastIndex`,n.id),E=i.useState(`toastVisibleIndex`,n.id),D=jt(c)?c:null,O=xu({anchor:D,positionMethod:l,floatingRootContext:sl({open:!0,onOpenChange:Ho,elements:{floating:C,reference:D}}),mounted:!0,side:u,sideOffset:f,align:d,alignOffset:h,collisionBoundary:g,collisionPadding:_,sticky:y,arrowPadding:v,disableAnchorTracking:b,keepMounted:!0,collisionAvoidance:x}),k=m.useMemo(()=>{let e={};return{role:`presentation`,style:{...O.positionerStyles,...e,[Qd.index]:n.transitionStatus===`ending`?T:E}}},[O.positionerStyles,n.transitionStatus,T,E]),A=m.useMemo(()=>({side:O.side,align:O.align,anchorHidden:O.anchorHidden}),[O.side,O.align,O.anchorHidden]),j=m.useMemo(()=>({...A,arrowRef:O.arrowRef,arrowStyles:O.arrowStyles,arrowUncentered:O.arrowUncentered}),[A,O.arrowRef,O.arrowStyles,O.arrowUncentered]),M=X(`div`,e,{state:A,props:[k,Cu(n.transitionStatus),S],ref:[t,w],stateAttributesMapping:$l});return(0,p.jsx)(pf.Provider,{value:j,children:M})});function hf(){let e=m.useContext(zd);if(!e)throw Error(sa(73));let t=e.useState(`toasts`);return m.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function gf(){let e=new Set;function t(t){e.forEach(e=>e(t))}return{" subscribe":function(t){return e.add(t),()=>{e.delete(t)}},add(e){let n=e.id||Hd(`toast`);return t({action:`add`,options:{...e,id:n,transitionStatus:`starting`}}),n},close(e){t({action:`close`,options:{id:e}})},update(e,n){t({action:`update`,options:{...n,id:e}})},promise(e,n){let r=e;return t({action:`promise`,options:{...n,promise:e,setPromise(e){r=e}}}),r}}}var _f=m.forwardRef(function(e,t){return(0,p.jsx)(_d,{ref:t,...e})}),vf=(e,t)=>Object.is(e,t);function yf(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function bf(e,t,n){return!e||e.length===0?!1:e.some(e=>e!==void 0&&yf(t,e,n))}function xf(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e!==void 0&&yf(e,t,n))}function Sf(e,t,n){return e.filter(e=>!yf(t,e,n))}function Cf(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function wf(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function Tf(e){if(!Array.isArray(e))return e!=null&&!(`null`in e);if(wf(e)){for(let t of e)for(let e of t.items)if(e&&e.value==null&&e.label!=null)return!0;return!1}for(let t of e)if(t&&t.value==null&&t.label!=null)return!0;return!1}function Ef(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return Cf(e)}function Df(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?Cf(e.value):Cf(e)}function Of(e,t,n){function r(){return Ef(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=wf(t)?t.flatMap(e=>e.items):t;if(typeof e!=`object`||!e){let t=n.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=n.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function kf(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,p.jsx)(m.Fragment,{children:Of(r,t,n)},i)),e),[])}Z(e=>e.id),Z(e=>e.query),Z(e=>e.items),Z(e=>e.selectedValue),Z(e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0}),Z(e=>{let{selectedValue:t,selectionMode:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0}),Z((e,t)=>t?Tf(e.items):!1),Z(e=>e.open),Z(e=>e.mounted),Z(e=>e.forceMounted),Z(e=>e.inline),Z(e=>e.activeIndex),Z(e=>e.selectedIndex),Z((e,t)=>e.activeIndex===t),Z((e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>yf(t,e,n)):yf(t,r,n)}),Z(e=>e.transitionStatus),Z(e=>e.popupProps),Z(e=>e.inputProps),Z(e=>e.triggerProps),Z(e=>e.getItemProps),Z(e=>e.positionerElement),Z(e=>e.listElement),Z(e=>e.triggerElement),Z(e=>e.inputElement),Z(e=>e.popupSide),Z(e=>e.openMethod),Z(e=>e.inputInsidePopup),Z(e=>e.selectionMode),Z(e=>e.listRef),Z(e=>e.labelsRef),Z(e=>e.popupRef),Z(e=>e.emptyRef),Z(e=>e.inputRef),Z(e=>e.keyboardActiveRef),Z(e=>e.chipsContainerRef),Z(e=>e.clearRef),Z(e=>e.valuesRef),Z(e=>e.allValuesRef),Z(e=>e.name),Z(e=>e.disabled),Z(e=>e.readOnly),Z(e=>e.required),Z(e=>e.grid),Z(e=>e.isGrouped),Z(e=>e.virtualized),Z(e=>e.onOpenChangeComplete),Z(e=>e.openOnInputClick),Z(e=>e.itemToStringLabel),Z(e=>e.isItemEqualToValue),Z(e=>e.modal),Z(e=>e.autoHighlight),Z(e=>e.submitOnItemClick);function Af(e){let t=m.useRef(``),n=m.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:m.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function jf(e){let[t,n]=m.useState(null),r=J((t,r)=>{e||n(r||(Da?`touch`:``))}),i=m.useCallback(()=>{n(null)},[]),{onClick:a,onPointerDown:o}=Af(r);return m.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:a,onPointerDown:o}}),[t,i,a,o])}({...Ql,...Xu});function Mf(e){let t=e.getBoundingClientRect(),n=window.getComputedStyle(e,`::before`),r=window.getComputedStyle(e,`::after`);if(!(n.content!==`none`||r.content!==`none`))return t;let i=parseFloat(n.width)||0,a=parseFloat(n.height)||0,o=parseFloat(r.width)||0,s=parseFloat(r.height)||0,c=Math.max(t.width,i,o),l=Math.max(t.height,a,s),u=c-t.width,d=l-t.height;return{left:t.left-u/2,right:t.right+u/2,top:t.top-d/2,bottom:t.bottom+d/2}}var Nf=m.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Pf(){return m.useContext(Nf)}function Ff(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=J(i),o=m.useRef(0),s=Qi(Lf).current,c=Qi(If).current,[l,u]=m.useState(0),d=m.useRef(l),f=J((e,t)=>{c.set(e,t??null),d.current+=1,u(d.current)}),h=J(e=>{c.delete(e),d.current+=1,u(d.current)}),g=m.useMemo(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(Rf).forEach((t,n)=>{let r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,l]);q(()=>{if(typeof MutationObserver!=`function`||g.size===0)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),t.size===0&&(d.current+=1,u(d.current))});return g.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[g]),q(()=>{d.current===l&&(n.current.length!==g.size&&(n.current.length=g.size),r&&r.current.length!==g.size&&(r.current.length=g.size),o.current=g.size),a(g)},[a,g,n,r,l]),q(()=>()=>{n.current=[]},[n]),q(()=>()=>{r&&(r.current=[])},[r]);let _=J(e=>(s.add(e),()=>{s.delete(e)}));q(()=>{s.forEach(e=>e(g))},[s,g]);let v=m.useMemo(()=>({register:f,unregister:h,subscribeMapChange:_,elementsRef:n,labelsRef:r,nextIndexRef:o}),[f,h,_,n,r,o]);return(0,p.jsx)(Nf.Provider,{value:v,children:t})}function If(){return new Map}function Lf(){return new Set}function Rf(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}({...$l,...Yc});var zf={},Bf={},Vf=``;function Hf(e){if(typeof document>`u`)return!1;let t=xa(e);return Ot(t).innerWidth-t.documentElement.clientWidth>0}function Uf(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=xa(e),n=t.documentElement,r=t.body,i=Ft(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Wf(e){let t=xa(e),n=t.documentElement,r=t.body,i=Ft(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function Gf(e){let t=xa(e),n=t.documentElement,r=t.body,i=Ot(n),a=0,o=0,s=!1,c=ks.create();if(Ea&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,zf={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Vf=n.style.scrollBehavior,Bf={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=Ft(n)?n:r;if(s=Uf(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,zf),Object.assign(r.style,Bf),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Vf)}function d(){u(),c.request(l)}return l(),i.addEventListener(`resize`,d),()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&i.removeEventListener(`resize`,d)}}var Kf=new class{lockCount=0;restore=null;timeoutLock=pa.create();timeoutUnlock=pa.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=xa(e).documentElement,n=Ot(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=Ho;return}let r=Da||!Hf(e);this.restore=r?Wf(e):Gf(e)}};function qf(e=!0,t=null){q(()=>{if(e)return Kf.acquire(t)},[e,t])}var Jf=m.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n?.getBoundingClientRect();i=`polygon(
0% 0%,
100% 0%,
100% 100%,
0% 100%,
0% 0%,
${e.left}px ${e.top}px,
${e.left}px ${e.bottom}px,
${e.right}px ${e.bottom}px,
${e.right}px ${e.top}px,
${e.left}px ${e.top}px
)`}return(0,p.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});({...$l,...Yc});var Yf=(function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e})({});function Xf(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,elementsRef:l,labelsRef:u,nextIndexRef:d}=Pf(),f=m.useRef(-1),[p,h]=m.useState(a??(i===Yf.GuessFromOrder?()=>{if(f.current===-1){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),g=m.useRef(null),_=m.useCallback(e=>{if(g.current=e,p!==-1&&e!==null&&(l.current[p]=e,u)){let n=t!==void 0;u.current[p]=n?t:r?.current?.textContent??e.textContent}},[p,l,u,t,r]);return q(()=>{if(a!=null)return;let e=g.current;if(e)return o(e,n),()=>{s(e)}},[a,o,s,n]),q(()=>{if(a==null)return c(e=>{let t=g.current?e.get(g.current)?.index:null;t!=null&&h(t)})},[a,c,h]),m.useMemo(()=>({ref:_,index:p}),[p,_])}({...Yc,...Zl});var Zf=m.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,...a}=e;return X(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},a]})}),Qf=m.createContext(void 0);function $f(e){let t=m.useContext(Qf);if(e===!1&&t===void 0)throw Error(sa(27));return t}var ep={...$l,...Yc},tp=m.forwardRef(function(e,t){let{render:n,className:r,forceRender:i=!1,...a}=e,{store:o}=$f(),s=o.useState(`open`),c=o.useState(`nested`),l=o.useState(`mounted`);return X(`div`,e,{state:{open:s,transitionStatus:o.useState(`transitionStatus`)},ref:[o.context.backdropRef,t],stateAttributesMapping:ep,props:[{role:`presentation`,hidden:!l,style:{userSelect:`none`,WebkitUserSelect:`none`}},a],enabled:i||!c})}),np=m.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,...o}=e,{store:s}=$f(),c=s.useState(`open`);function l(e){c&&s.setOpen(!1,Y(is,e.nativeEvent))}let{getButtonProps:u,buttonRef:d}=Dd({disabled:i,native:a});return X(`button`,e,{state:{disabled:i},ref:[t,d],props:[{onClick:l},o,u]})}),rp=m.forwardRef(function(e,t){let{render:n,className:r,id:i,...a}=e,{store:o}=$f(),s=eu(i);return o.useSyncedValueWithCleanup(`descriptionElementId`,s),X(`p`,e,{ref:t,props:[{id:s},a]})}),ip=(function(e){return e.nestedDialogs=`--nested-dialogs`,e})({}),ap=(function(e){return e[e.open=Wl.open]=`open`,e[e.closed=Wl.closed]=`closed`,e[e.startingStyle=Wl.startingStyle]=`startingStyle`,e[e.endingStyle=Wl.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e})({}),op=m.createContext(void 0);function sp(){let e=m.useContext(op);if(e===void 0)throw Error(sa(26));return e}var cp=`ArrowUp`,lp=`ArrowDown`,up=`ArrowLeft`,dp=`ArrowRight`,fp=`Home`,pp=`End`,mp=new Set([up,dp]),hp=new Set([cp,lp]);[...new Set([...mp,...hp])];var gp=new Set([cp,lp,up,dp,fp,pp]),_p={...$l,...Yc,nestedDialogOpen(e){return e?{[ap.nestedDialogOpen]:``}:null}},vp=m.forwardRef(function(e,t){let{className:n,finalFocus:r,initialFocus:i,render:a,...o}=e,{store:s}=$f(),c=s.useState(`descriptionElementId`),l=s.useState(`disablePointerDismissal`),u=s.useState(`floatingRootContext`),d=s.useState(`popupProps`),f=s.useState(`modal`),m=s.useState(`mounted`),h=s.useState(`nested`),g=s.useState(`nestedOpenDialogCount`),_=s.useState(`open`),v=s.useState(`openMethod`),y=s.useState(`titleElementId`),b=s.useState(`transitionStatus`),x=s.useState(`role`);sp(),Zc({open:_,ref:s.context.popupRef,onComplete(){_&&s.context.onOpenChangeComplete?.(!0)}});function S(e){return e!==`touch`||s.context.popupRef.current}let C=i===void 0?S:i,w=X(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:g>0},props:[d,{"aria-labelledby":y??void 0,"aria-describedby":c??void 0,role:x,tabIndex:-1,hidden:!m,onKeyDown(e){gp.has(e.key)&&e.stopPropagation()},style:{[ip.nestedDialogs]:g}},o],ref:[t,s.context.popupRef,s.useStateSetter(`popupElement`)],stateAttributesMapping:_p});return(0,p.jsx)(Dc,{context:u,openInteractionType:v,disabled:!m,closeOnFocusOut:!l,initialFocus:C,returnFocus:r,modal:f!==!1,restoreFocus:`popup`,children:w})}),yp=m.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=$f(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,p.jsx)(op.Provider,{value:n,children:(0,p.jsxs)(gc,{ref:t,...r,children:[a&&o===!0&&(0,p.jsx)(Jf,{ref:i.context.internalBackdropRef,inert:ku(!s)}),e.children]})}):null});function bp(e){let{store:t,parentContext:n,actionsRef:r}=e,i=t.useState(`open`),a=t.useState(`disablePointerDismissal`),o=t.useState(`modal`),s=t.useState(`popupElement`),{openMethod:c,triggerProps:l,reset:u}=jf(i);el(t);let{forceUnmount:d}=tl(i,t,()=>{u()}),f=J(e=>{let n=Y(e);return n.preventUnmountOnClose=()=>{t.set(`preventUnmountingOnClose`,!0)},n}),p=m.useCallback(()=>{t.setOpen(!1,f(ds))},[t,f]);m.useImperativeHandle(r,()=>({unmount:d,close:p}),[d,p]);let h=ll({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[g,_]=m.useState(0),v=g===0,y=Pl(h),b=Pc(h,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(e){if(!t.context.outsidePressEnabledRef.current||`button`in e&&e.button!==0||`touches`in e&&e.touches.length!==1)return!1;let n=Ka(e);if(v&&!a){let e=n;return o&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===e||t.context.backdropRef.current===e||Wa(e,s)&&!e?.hasAttribute(`data-base-ui-portal`):!0}return!1},escapeKey:v});qf(i&&o===!0,s);let{getReferenceProps:x,getFloatingProps:S,getTriggerProps:C}=Cl([y,b]);t.useContextCallback(`onNestedDialogOpen`,e=>{_(e+1)}),t.useContextCallback(`onNestedDialogClose`,()=>{_(0)}),m.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(g),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[i,n,g]);let w=m.useMemo(()=>x(l),[x,l]),T=m.useMemo(()=>C(l),[C,l]),E=m.useMemo(()=>S(),[S]);t.useSyncedValues({openMethod:c,activeTriggerProps:w,inactiveTriggerProps:T,popupProps:E,floatingRootContext:h,nestedOpenDialogCount:g})}var xp={...ol,modal:Z(e=>e.modal),nested:Z(e=>e.nested),nestedOpenDialogCount:Z(e=>e.nestedOpenDialogCount),disablePointerDismissal:Z(e=>e.disablePointerDismissal),openMethod:Z(e=>e.openMethod),descriptionElementId:Z(e=>e.descriptionElementId),titleElementId:Z(e=>e.titleElementId),viewportElement:Z(e=>e.viewportElement),role:Z(e=>e.role)},Sp=class extends Hc{constructor(e){super(Cp(e),{popupRef:m.createRef(),backdropRef:m.createRef(),internalBackdropRef:m.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new nl,onOpenChange:void 0,onOpenChangeComplete:void 0},xp)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;let n={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit(`openchange`,n);let r={open:e},i=t.trigger?.id??null;(i||e)&&(r.activeTriggerId=i,r.activeTriggerElement=t.trigger??null),this.update(r)}};function Cp(e={}){return{...il(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:`dialog`,...e}}function wp(e){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,disablePointerDismissal:o=!1,modal:s=!0,actionsRef:c,handle:l,triggerId:u,defaultTriggerId:d=null}=e,f=$f(!0),h=!!f,g=Qi(()=>l?.store??new Sp({open:r,openProp:n,activeTriggerId:d,triggerIdProp:u,modal:s,disablePointerDismissal:o,nested:h})).current;oa(()=>{n===void 0&&g.state.open===!1&&r===!0&&g.update({open:!0,activeTriggerId:d})}),g.useControlledProp(`openProp`,n),g.useControlledProp(`triggerIdProp`,u),g.useSyncedValues({disablePointerDismissal:o,nested:h,modal:s}),g.useContextCallback(`onOpenChange`,i),g.useContextCallback(`onOpenChangeComplete`,a);let _=g.useState(`payload`);bp({store:g,actionsRef:c,parentContext:f?.store.context});let v=m.useMemo(()=>({store:g}),[g]);return(0,p.jsx)(Qf.Provider,{value:v,children:typeof t==`function`?t({payload:_}):t})}(function(e){return e[e.open=Wl.open]=`open`,e[e.closed=Wl.closed]=`closed`,e[e.startingStyle=Wl.startingStyle]=`startingStyle`,e[e.endingStyle=Wl.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e})({}),{...$l,...Yc};var Tp=m.forwardRef(function(e,t){let{render:n,className:r,id:i,...a}=e,{store:o}=$f(),s=eu(i);return o.useSyncedValueWithCleanup(`titleElementId`,s),X(`h2`,e,{ref:t,props:[{id:s},a]})}),Ep=m.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,id:o,payload:s,handle:c,...l}=e,u=$f(!0),d=c?.store??u?.store;if(!d)throw Error(sa(79));let f=eu(o),p=d.useState(`floatingRootContext`),h=d.useState(`isOpenedByTrigger`,f),g=m.useRef(null),{registerTrigger:_,isMountedByThisTrigger:v}=$c(f,g,d,{payload:s}),{getButtonProps:y,buttonRef:b}=Dd({disabled:i,native:a}),x=Cl([Oc(p,{enabled:p!=null})]),S={disabled:i,open:h},C=d.useState(`triggerProps`,v);return X(`button`,e,{state:S,ref:[b,t,_,g],props:[x.getReferenceProps(),C,{[Jo]:``,id:f},l,y],stateAttributesMapping:Zl})});function Dp(e){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,actionsRef:o,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=$f(),d=!!u,f=Qi(()=>s?.store??new Sp({open:r,openProp:n,activeTriggerId:l,triggerIdProp:c,modal:!0,disablePointerDismissal:!0,nested:d,role:`alertdialog`})).current;f.useControlledProp(`openProp`,n),f.useControlledProp(`triggerIdProp`,c),f.useSyncedValue(`nested`,d),f.useContextCallback(`onOpenChange`,i),f.useContextCallback(`onOpenChangeComplete`,a);let h=f.useState(`payload`);bp({store:f,actionsRef:o,parentContext:u?.store.context});let g=m.useMemo(()=>({store:f}),[f]);return(0,p.jsx)(Qf.Provider,{value:g,children:typeof t==`function`?t({payload:h}):t})}function Op(e){return X(e.defaultTagName??`div`,e,e)}var kp=m.createContext(void 0);function Ap(e){let t=m.useContext(kp);if(t===void 0&&!e)throw Error(sa(33));return t}var jp=m.createContext(void 0);function Mp(e){let t=m.useContext(jp);if(t===void 0&&!e)throw Error(sa(36));return t}var Np=m.createContext(void 0);function Pp(e=!0){let t=m.useContext(Np);if(t===void 0&&!e)throw Error(sa(25));return t}({...$l,...Yc});var Fp=m.createContext(void 0);function Ip(){let e=m.useContext(Fp);if(e===void 0)throw Error(sa(30));return e}function Lp(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,itemRef:o,itemMetadata:s}=e,{events:c}=a.useState(`floatingTreeRoot`),l=Pp(!0),u=l!==void 0;return m.useMemo(()=>({id:r,role:`menuitem`,tabIndex:n?0:-1,onMouseMove(e){i&&c.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&c.emit(`close`,{domEvent:e,reason:rs})},onMouseUp(e){if(l){let t=l.initialCursorPointRef.current;if(l.initialCursorPointRef.current=null,u&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1)return}o.current&&a.context.allowMouseUpTriggerRef.current&&(!u||e.button===2)&&(!s||s.type===`regular-item`)&&o.current.click()}}),[t,n,r,c,i,a,o,l,u,s])}var Rp={type:`regular-item`};function zp(e){let{closeOnClick:t,disabled:n=!1,highlighted:r,id:i,store:a,nativeButton:o,itemMetadata:s,nodeId:c}=e,l=m.useRef(null),{getButtonProps:u,buttonRef:d}=Dd({disabled:n,focusableWhenDisabled:!0,native:o}),f=Lp({closeOnClick:t,highlighted:r,id:i,nodeId:c,store:a,itemRef:l,itemMetadata:s}),p=m.useCallback(e=>Zs(f,{onMouseEnter(){s.type===`submenu-trigger`&&s.setActive()},onKeyUp(e){e.key===` `&&a.context.typingRef.current&&e.preventBaseUIHandler()}},e,u),[f,u,a,s]),h=vs(l,d);return m.useMemo(()=>({getItemProps:p,itemRef:h}),[p,h])}var Bp=(function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.disabled=`data-disabled`,e.highlighted=`data-highlighted`,e})({}),Vp={checked(e){return e?{[Bp.checked]:``}:{[Bp.unchecked]:``}},...Yc},Hp=m.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!1,checked:l,defaultChecked:u,onCheckedChange:d,...f}=e,h=Xf({label:a}),g=Ap(!0),_=eu(i),{store:v}=Mp(),y=v.useState(`isActive`,h.index),b=v.useState(`itemProps`),[x,S]=md({controlled:l,default:u??!1,name:`MenuCheckboxItem`,state:`checked`}),{getItemProps:C,itemRef:w}=zp({closeOnClick:c,disabled:s,highlighted:y,id:_,store:v,nativeButton:o,nodeId:g?.nodeId,itemMetadata:Rp}),T=m.useMemo(()=>({disabled:s,highlighted:y,checked:x}),[s,y,x]),E=X(`div`,e,{state:T,stateAttributesMapping:Vp,props:[b,{role:`menuitemcheckbox`,"aria-checked":x,onClick:J(e=>{let t={...Y(rs,e.nativeEvent),preventUnmountOnClose:()=>{}};d?.(!x,t),!t.isCanceled&&S(e=>!e)})},f,C],ref:[w,t,h.ref]});return(0,p.jsx)(Fp.Provider,{value:T,children:E})}),Up=m.forwardRef(function(e,t){let{render:n,className:r,keepMounted:i=!1,...a}=e,o=Ip(),s=m.useRef(null),{transitionStatus:c,setMounted:l}=Gc(o.checked);return Zc({open:o.checked,ref:s,onComplete(){o.checked||l(!1)}}),X(`span`,e,{state:{checked:o.checked,disabled:o.disabled,highlighted:o.highlighted,transitionStatus:c},ref:[t,s],stateAttributesMapping:Vp,props:{"aria-hidden":!0,...a},enabled:i||o.checked})}),Wp=m.createContext(void 0);function Gp(){let e=m.useContext(Wp);if(e===void 0)throw Error(sa(31));return e}var Kp=m.forwardRef(function(e,t){let{render:n,className:r,...i}=e,[a,o]=m.useState(void 0),s=m.useMemo(()=>({setLabelId:o}),[o]),c=X(`div`,e,{ref:t,props:{role:`group`,"aria-labelledby":a,...i}});return(0,p.jsx)(Wp.Provider,{value:s,children:c})}),qp=m.forwardRef(function(e,t){let{className:n,render:r,id:i,...a}=e,o=eu(i),{setLabelId:s}=Gp();return q(()=>(s(o),()=>{s(void 0)}),[s,o]),X(`div`,e,{ref:t,props:{id:o,role:`presentation`,...a}})}),Jp=m.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,...l}=e,u=Xf({label:a}),d=Ap(!0),f=eu(i),{store:p}=Mp(),m=p.useState(`isActive`,u.index),h=p.useState(`itemProps`),{getItemProps:g,itemRef:_}=zp({closeOnClick:c,disabled:s,highlighted:m,id:f,store:p,nativeButton:o,nodeId:d?.nodeId,itemMetadata:Rp});return X(`div`,e,{state:{disabled:s,highlighted:m},props:[h,l,g],ref:[_,t,u.ref]})}),Yp=m.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,closeOnClick:o=!1,...s}=e,c=m.useRef(null),l=Xf({label:a}),u=Ap(!0)?.nodeId,d=eu(i),{store:f}=Mp(),p=f.useState(`isActive`,l.index),h=f.useState(`itemProps`),g=Lp({closeOnClick:o,highlighted:p,id:d,nodeId:u,store:f,itemRef:c});return X(`a`,e,{state:m.useMemo(()=>({highlighted:p}),[p]),props:[h,s,g],ref:[c,t,l.ref]})}),Xp=m.createContext(void 0);function Zp(e){let t=m.useContext(Xp);if(t===void 0&&!e)throw Error(sa(69));return t}var Qp={...$l,...Yc},$p=m.forwardRef(function(e,t){let{render:n,className:r,finalFocus:i,...a}=e,{store:o}=Mp(),{side:s,align:c}=Ap(),l=Zp(!0)!=null,u=o.useState(`open`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),h=o.useState(`mounted`),g=o.useState(`instantType`),_=o.useState(`activeTriggerElement`),v=o.useState(`parent`),y=o.useState(`lastOpenChangeReason`),b=o.useState(`rootId`),x=o.useState(`floatingRootContext`),S=o.useState(`floatingTreeRoot`),C=o.useState(`closeDelay`),w=o.useState(`activeTriggerElement`),T=v.type===`context-menu`;Zc({open:u,ref:o.context.popupRef,onComplete(){u&&o.context.onOpenChangeComplete?.(!0)}}),m.useEffect(()=>{function e(e){o.setOpen(!1,Y(e.reason,e.domEvent))}return S.events.on(`close`,e),()=>{S.events.off(`close`,e)}},[S.events,o]);let E=o.useState(`hoverEnabled`),D=o.useState(`disabled`);vl(x,{enabled:E&&!D&&!T&&v.type!==`menubar`,closeDelay:C});let O=X(`div`,e,{state:{transitionStatus:d,side:s,align:c,open:u,nested:v.type===`menu`,instant:g},ref:[t,o.context.popupRef],stateAttributesMapping:Qp,props:[f,{onKeyDown(e){l&&gp.has(e.key)&&e.stopPropagation()}},Cu(d),a,{"data-rootownerid":b}]}),k=v.type===void 0||T;return(_||v.type===`menubar`&&y!==ns)&&(k=!0),(0,p.jsx)(Dc,{context:x,modal:T,disabled:!h,returnFocus:i===void 0?k:i,initialFocus:v.type!==`menu`,restoreFocus:!0,externalTree:v.type===`menubar`?void 0:S,previousFocusableElement:w,nextFocusableElement:v.type===void 0?o.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:v.type===void 0?o.context.beforeContentFocusGuardRef:void 0,children:O})}),em=m.createContext(void 0);function tm(){let e=m.useContext(em);if(e===void 0)throw Error(sa(32));return e}var nm=m.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=Mp();return i.useState(`mounted`)||n?(0,p.jsx)(em.Provider,{value:n,children:(0,p.jsx)(gc,{ref:t,...r})}):null}),rm=m.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:s,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:h=!1,disableAnchorTracking:g=!1,collisionAvoidance:_=Yo,...v}=e,{store:y}=Mp(),b=tm(),x=Pp(!0),S=y.useState(`parent`),C=y.useState(`floatingRootContext`),w=y.useState(`floatingTreeRoot`),T=y.useState(`mounted`),E=y.useState(`open`),D=y.useState(`modal`),O=y.useState(`activeTriggerElement`),k=y.useState(`transitionStatus`),A=y.useState(`lastOpenChangeReason`),j=y.useState(`floatingNodeId`),M=y.useState(`floatingParentNodeId`),N=n,P=c,F=l,I=s,L=_;S.type===`context-menu`&&(N=n??S.context?.anchor,I??=`start`,!o&&I!==`center`&&(F=e.alignOffset??2,P=e.sideOffset??-5));let R=o,z=I;S.type===`menu`?(R??=`inline-end`,z??=`start`,L=e.collisionAvoidance??Xo):S.type===`menubar`&&(R??=`bottom`,z??=`start`);let B=S.type===`context-menu`,V=xu({anchor:N,floatingRootContext:C,positionMethod:x?`fixed`:r,mounted:T,side:R,sideOffset:P,align:z,alignOffset:F,arrowPadding:B?0:f,collisionBoundary:u,collisionPadding:d,sticky:h,nodeId:j,keepMounted:b,disableAnchorTracking:g,collisionAvoidance:L,shiftCrossAxis:B&&!(`side`in L&&L.side===`flip`),externalTree:w}),H=m.useMemo(()=>{let e={};return E||(e.pointerEvents=`none`),{role:`presentation`,hidden:!T,style:{...V.positionerStyles,...e}}},[E,T,V.positionerStyles]);m.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===j&&y.set(`hoverEnabled`,!1),e.nodeId!==j&&e.parentNodeId===y.select(`floatingParentNodeId`)&&y.setOpen(!1,Y(ls)))}return w.events.on(`menuopenchange`,e),()=>{w.events.off(`menuopenchange`,e)}},[y,w.events,j]),m.useEffect(()=>{if(y.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==y.select(`floatingParentNodeId`))return;let t=e.reason??ls;y.setOpen(!1,Y(t))}return w.events.on(`menuopenchange`,e),()=>{w.events.off(`menuopenchange`,e)}},[w.events,y]),m.useEffect(()=>{function e(e){!E||e.nodeId!==y.select(`floatingParentNodeId`)||e.target&&O&&O!==e.target&&y.setOpen(!1,Y(ls))}return w.events.on(`itemhover`,e),()=>{w.events.off(`itemhover`,e)}},[w.events,E,O,y]),m.useEffect(()=>{let e={open:E,nodeId:j,parentNodeId:M,reason:y.select(`lastOpenChangeReason`)};w.events.emit(`menuopenchange`,e)},[w.events,E,y,j,M]);let U={open:E,side:V.side,align:V.align,anchorHidden:V.anchorHidden,nested:S.type===`menu`},ee=m.useMemo(()=>({side:V.side,align:V.align,arrowRef:V.arrowRef,arrowUncentered:V.arrowUncentered,arrowStyles:V.arrowStyles,nodeId:V.context.nodeId}),[V.side,V.align,V.arrowRef,V.arrowUncentered,V.arrowStyles,V.context.nodeId]),te=X(`div`,e,{state:U,stateAttributesMapping:$l,ref:[t,y.useStateSetter(`positionerElement`)],props:[H,Cu(k),v]}),ne=T&&S.type!==`menu`&&(S.type!==`menubar`&&D&&A!==es||S.type===`menubar`&&S.context.modal),W=null;return S.type===`menubar`?W=S.context.contentElement:S.type===void 0&&(W=O),(0,p.jsxs)(kp.Provider,{value:ee,children:[ne&&(0,p.jsx)(Jf,{ref:S.type===`context-menu`||S.type===`nested-context-menu`?S.context.internalBackdropRef:null,inert:ku(!E),cutout:W}),(0,p.jsx)(Bo,{id:j,children:(0,p.jsx)(Ff,{elementsRef:y.context.itemDomElements,labelsRef:y.context.itemLabels,children:te})})]})}),im=m.createContext(void 0);function am(){let e=m.useContext(im);if(e===void 0)throw Error(sa(34));return e}var om=m.memo(m.forwardRef(function(e,t){let{render:n,className:r,value:i,defaultValue:a,onValueChange:o,disabled:s=!1,...c}=e,[l,u]=md({controlled:i,default:a,name:`MenuRadioGroup`}),d=J(o),f=J((e,t)=>{d?.(e,t),!t.isCanceled&&u(e)}),h=X(`div`,e,{state:{disabled:s},ref:t,props:{role:`group`,"aria-disabled":s||void 0,...c}}),g=m.useMemo(()=>({value:l,setValue:f,disabled:s}),[l,f,s]);return(0,p.jsx)(im.Provider,{value:g,children:h})})),sm=m.createContext(void 0);function cm(){let e=m.useContext(sm);if(e===void 0)throw Error(sa(35));return e}var lm=m.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!1,value:l,...u}=e,d=Xf({label:a}),f=Ap(!0),h=eu(i),{store:g}=Mp(),_=g.useState(`isActive`,d.index),v=g.useState(`itemProps`),{value:y,setValue:b,disabled:x}=am(),S=x||s,C=y===l,{getItemProps:w,itemRef:T}=zp({closeOnClick:c,disabled:S,highlighted:_,id:h,store:g,nativeButton:o,nodeId:f?.nodeId,itemMetadata:Rp}),E=m.useMemo(()=>({disabled:S,highlighted:_,checked:C}),[S,_,C]),D=X(`div`,e,{state:E,stateAttributesMapping:Vp,props:[v,{role:`menuitemradio`,"aria-checked":C,onClick:J(e=>{let t={...Y(rs,e.nativeEvent),preventUnmountOnClose:()=>{}};b(l,t)})},u,w],ref:[T,t,d.ref]});return(0,p.jsx)(sm.Provider,{value:E,children:D})}),um=m.forwardRef(function(e,t){let{render:n,className:r,keepMounted:i=!1,...a}=e,o=cm(),s=m.useRef(null),{transitionStatus:c,setMounted:l}=Gc(o.checked);return Zc({open:o.checked,ref:s,onComplete(){o.checked||l(!1)}}),X(`span`,e,{state:{checked:o.checked,disabled:o.disabled,highlighted:o.highlighted,transitionStatus:c},stateAttributesMapping:Vp,ref:[t,s],props:{"aria-hidden":!0,...a},enabled:i||o.checked})}),dm=m.createContext(null);function fm(e){let t=m.useContext(dm);if(t===null&&!e)throw Error(sa(5));return t}var pm={...ol,disabled:Z(e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled),modal:Z(e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0)),allowMouseEnter:Z(e=>e.allowMouseEnter),stickIfOpen:Z(e=>e.stickIfOpen),parent:Z(e=>e.parent),rootId:Z(e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId),activeIndex:Z(e=>e.activeIndex),isActive:Z((e,t)=>e.activeIndex===t),hoverEnabled:Z(e=>e.hoverEnabled),instantType:Z(e=>e.instantType),lastOpenChangeReason:Z(e=>e.openChangeReason),floatingTreeRoot:Z(e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot),floatingNodeId:Z(e=>e.floatingNodeId),floatingParentNodeId:Z(e=>e.floatingParentNodeId),itemProps:Z(e=>e.itemProps),closeDelay:Z(e=>e.closeDelay),keyboardEventRelay:Z(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)})},mm=class e extends Hc{constructor(e){super({...hm(),...e},{positionerRef:m.createRef(),popupRef:m.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:m.createRef(),beforeContentFocusGuardRef:m.createRef(),onOpenChangeComplete:void 0,triggerElements:new nl},pm),this.unsubscribeParentListener=this.observe(`parent`,e=>{if(this.unsubscribeParentListener?.(),e.type===`menu`){this.unsubscribeParentListener=e.store.subscribe(()=>{this.notifyAll()}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}static useStore(t,n){let r=Qi(()=>new e(n)).current;return t??r}unsubscribeParentListener=null};function hm(){return{...il(),disabled:!1,modal:!0,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Po,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Wo,keyboardEventRelay:void 0,closeDelay:0}}var gm=m.createContext(void 0);function _m(){return m.useContext(gm)}var vm=ra(function(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:i,defaultOpen:a=!1,disabled:o=!1,modal:s,loopFocus:c=!0,orientation:l=`vertical`,actionsRef:u,closeParentOnEsc:d=!1,handle:f,triggerId:h,defaultTriggerId:g=null,highlightItemOnHover:_=!0}=e,v=Pp(!0),y=Mp(!0),b=fm(!0),x=_m(),S=m.useMemo(()=>x&&y?{type:`menu`,store:y.store}:b?{type:`menubar`,context:b}:v&&!y?{type:`context-menu`,context:v}:{type:void 0},[v,y,b,x]),C=mm.useStore(f?.store,{open:a,openProp:n,activeTriggerId:g,triggerIdProp:h,parent:S});oa(()=>{n===void 0&&C.state.open===!1&&a===!0&&C.update({open:!0,activeTriggerId:g})}),C.useControlledProp(`openProp`,n),C.useControlledProp(`triggerIdProp`,h),C.useContextCallback(`onOpenChangeComplete`,i);let w=C.useState(`floatingTreeRoot`),T=zo(w),E=Lo();q(()=>{v&&!y?C.update({parent:{type:`context-menu`,context:v},floatingNodeId:T,floatingParentNodeId:E}):y&&C.update({floatingNodeId:T,floatingParentNodeId:E})},[v,y,T,E,C]);let D=C.useState(`open`),O=C.useState(`activeTriggerElement`),k=C.useState(`positionerElement`),A=C.useState(`hoverEnabled`),j=C.useState(`modal`),M=C.useState(`disabled`),N=C.useState(`lastOpenChangeReason`),P=C.useState(`parent`),F=C.useState(`activeIndex`),I=C.useState(`payload`),L=C.useState(`floatingParentNodeId`),R=m.useRef(null),z=L!=null,B;C.useSyncedValues({disabled:o,modal:P.type===void 0?s:void 0,rootId:Mo()});let{openMethod:V,triggerProps:H,reset:U}=jf(D);el(C);let{forceUnmount:ee}=tl(D,C,()=>{C.update({allowMouseEnter:!1,stickIfOpen:!0}),U()}),te=m.useRef(P.type!==`context-menu`),ne=ma();m.useEffect(()=>{if(D||(R.current=null),P.type===`context-menu`){if(!D){ne.clear(),te.current=!1;return}ne.start(500,()=>{te.current=!0})}},[ne,D,P.type]),qf(D&&j&&N!==es&&V!==`touch`,k),q(()=>{!D&&!A&&C.set(`hoverEnabled`,!0)},[D,A,C]);let W=m.useRef(!0),re=ma(),ie=J((e,t)=>{let n=t.reason;if(D===e&&t.trigger===O&&N===n||(t.preventUnmountOnClose=()=>{C.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&(t.trigger=O??void 0),r?.(e,t),t.isCanceled))return;let i={open:e,nativeEvent:t.event,reason:t.reason,nested:z};B?.emit(`openchange`,i);let a=t.event;if(e===!1&&a?.type===`click`&&a.pointerType===`touch`&&!W.current)return;if(!e&&F!==null){let e=C.context.itemDomElements.current[F];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}e&&n===ts?(W.current=!1,re.start(300,()=>{W.current=!0})):(W.current=!0,re.clear());let o=(n===$o||n===rs)&&a.detail===0&&a?.isTrusted,s=!e&&(n===os||n==null),c={open:e,openChangeReason:n};R.current=t.event??null;let l=t.trigger?.id??null;(l||e)&&(c.activeTriggerId=l,c.activeTriggerElement=t.trigger??null),C.update(c),P.type===`menubar`&&(n===ts||n===as||n===es||n===ss||n===ls)?C.set(`instantType`,`group`):o||s?C.set(`instantType`,o?`click`:`dismiss`):C.set(`instantType`,void 0)}),ae=m.useCallback(e=>{let t=Y(e);return t.preventUnmountOnClose=()=>{C.set(`preventUnmountingOnClose`,!0)},t},[C]),oe=m.useCallback(()=>{C.setOpen(!1,ae(ds))},[C,ae]);m.useImperativeHandle(u,()=>({unmount:ee,close:oe}),[ee,oe]);let se;P.type===`context-menu`&&(se=P.context),m.useImperativeHandle(se?.positionerRef,()=>k,[k]),m.useImperativeHandle(se?.actionsRef,()=>({setOpen:ie}),[ie]);let ce=ll({popupStore:C,onOpenChange:ie});B=ce.context.events,m.useEffect(()=>{let e=({open:e,eventDetails:t})=>ie(e,t);return B.on(`setOpen`,e),()=>{B?.off(`setOpen`,e)}},[B,ie]);let le=Pc(ce,{enabled:!M,bubbles:{escapeKey:d&&P.type===`menu`},outsidePress(){return P.type!==`context-menu`||R.current?.type===`contextmenu`||te.current},externalTree:z?w:void 0}),ue=Pl(ce,{role:`menu`}),de=pu(),fe=m.useCallback(e=>{C.select(`activeIndex`)!==e&&C.set(`activeIndex`,e)},[C]),pe=Ml(ce,{enabled:!M,listRef:C.context.itemDomElements,activeIndex:F,nested:P.type!==void 0,loopFocus:c,orientation:l,parentOrientation:P.type===`menubar`?P.context.orientation:void 0,rtl:de===`rtl`,disabledIndices:Uo,onNavigate:fe,openOnArrowKeyDown:P.type!==`context-menu`,externalTree:z?w:void 0,focusItemOnHover:_}),me=m.useCallback(e=>{C.context.typingRef.current=e},[C]),{getReferenceProps:he,getFloatingProps:ge,getItemProps:_e,getTriggerProps:ve}=Cl([le,ue,pe,Fl(ce,{listRef:C.context.itemLabels,activeIndex:F,resetMs:Go,onMatch:e=>{D&&e!==F&&C.set(`activeIndex`,e)},onTypingChange:me})]),ye=m.useMemo(()=>{let e=Zs(he(),{onMouseMove(){C.set(`allowMouseEnter`,!0)}},H);return delete e.role,e},[he,C,H]),be=m.useMemo(()=>{let e=ve();if(!e)return e;let t=Zs(e,H);return delete t.role,delete t[`aria-controls`],t},[ve,H]),xe=m.useMemo(()=>ge({onMouseMove(){C.set(`allowMouseEnter`,!0),P.type===`menu`&&C.set(`hoverEnabled`,!1)},onClick(){C.select(`hoverEnabled`)&&C.set(`hoverEnabled`,!1)},onKeyDown(e){let t=C.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}}),[ge,P.type,C]),Se=m.useMemo(()=>_e(),[_e]);C.useSyncedValues({floatingRootContext:ce,activeTriggerProps:ye,inactiveTriggerProps:be,popupProps:xe,itemProps:Se});let Ce=m.useMemo(()=>({store:C,parent:S}),[C,S]),we=(0,p.jsx)(jp.Provider,{value:Ce,children:typeof t==`function`?t({payload:I}):t});return P.type===void 0||P.type===`context-menu`?(0,p.jsx)(Vo,{externalTree:w,children:we}):we});function ym(e){let t=Mp().store,n=m.useMemo(()=>({parentMenu:t}),[t]);return(0,p.jsx)(gm.Provider,{value:n,children:(0,p.jsx)(vm,{...e})})}function bm(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=Td(),{ref:i,index:a}=Xf(e),o=n===a,s=m.useRef(null),c=vs(i,s);return{compositeProps:m.useMemo(()=>({tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}}),[o,r,a,t]),compositeRef:c,index:a}}function xm(e){let{render:t,className:n,state:r=Wo,props:i=Uo,refs:a=Uo,metadata:o,stateAttributesMapping:s,tag:c=`div`,...l}=e,{compositeProps:u,compositeRef:d}=bm({metadata:o});return X(c,e,{state:r,ref:[...a,d],props:[u,...i,l],stateAttributesMapping:s})}function Sm(e){if(Mt(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`)??void 0;if(!qt(e))return Sm(Xt(e))}function Cm(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=m.useRef(!1);return m.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,xa(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:Wo,[t,n,r])}var wm=2,Tm=ia(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,id:o,openOnHover:s,delay:c=100,closeDelay:l=0,handle:u,payload:d,...f}=e,h=Mp(!0),g=u?.store??h?.store;if(!g)throw Error(sa(85));let _=eu(o),v=g.useState(`isTriggerActive`,_),y=g.useState(`floatingRootContext`),b=g.useState(`isOpenedByTrigger`,_),x=m.useRef(null),C=Dm(),w=Td(!0),T=Ro(),E=m.useMemo(()=>T??new Po,[T]),{registerTrigger:D,isMountedByThisTrigger:O}=$c(_,x,g,{payload:d,closeDelay:l,parent:C,floatingTreeRoot:E,floatingNodeId:zo(E),floatingParentNodeId:Lo(),keyboardEventRelay:w?.relayKeyboardEvent}),k=C.type===`menubar`,A=g.useState(`disabled`),j=i||A||k&&C.context.disabled,{getButtonProps:M,buttonRef:N}=Dd({disabled:j,native:a});m.useEffect(()=>{!b&&C.type===void 0&&(g.context.allowMouseUpTriggerRef.current=!1)},[g,b,C.type]);let P=m.useRef(null),F=ma(),I=J(e=>{if(!P.current)return;F.clear(),g.context.allowMouseUpTriggerRef.current=!1;let t=e.target;if(Wa(P.current,t)||Wa(g.select(`positionerElement`),t)||t===P.current||t!=null&&Sm(t)===g.select(`rootId`))return;let n=Mf(P.current);e.clientX>=n.left-wm&&e.clientX<=n.right+wm&&e.clientY>=n.top-wm&&e.clientY<=n.bottom+wm||E.events.emit(`close`,{domEvent:e,reason:cs})});m.useEffect(()=>{b&&g.select(`lastOpenChangeReason`)===es&&xa(P.current).addEventListener(`mouseup`,I,{once:!0})},[b,I,g]);let L=k&&C.context.hasSubmenuOpen,R=Sl(y,{enabled:(s??L)&&!j&&C.type!==`context-menu`&&(!k||L&&!O),handleClose:Rl({blockPointerEvents:!k}),mouseOnly:!0,move:!1,restMs:C.type===void 0?c:void 0,delay:{close:l},triggerElementRef:x,externalTree:E,isActiveTrigger:v}),z=Em(b,g.select(`lastOpenChangeReason`)),B=Oc(y,{enabled:!j&&C.type!==`context-menu`,event:b&&k?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:C.type===void 0&&z}),V=dl(y,{enabled:!j&&L}),H=Cm({open:b,enabled:k,mouseDownAction:`open`}),U=Cl([B,V]),ee={disabled:j,open:b},te=g.useState(`triggerProps`,O),ne=[P,t,N,D,x],W=[U.getReferenceProps(),R??Wo,te,{"aria-haspopup":`menu`,id:_,onMouseDown:e=>{g.select(`open`)||(F.start(200,()=>{g.context.allowMouseUpTriggerRef.current=!0}),xa(e.currentTarget).addEventListener(`mouseup`,I,{once:!0}))}},k?{role:`menuitem`}:{},H,f,M],re=m.useRef(null),ie=J(e=>{S.flushSync(()=>{g.setOpen(!1,Y(as,e.nativeEvent,e.currentTarget))}),wo(re.current)?.focus()}),ae=J(e=>{let t=g.select(`positionerElement`);if(t&&To(e,t))g.context.beforeContentFocusGuardRef.current?.focus();else{S.flushSync(()=>{g.setOpen(!1,Y(as,e.nativeEvent,e.currentTarget))});let n=Co(g.context.triggerFocusTargetRef.current||x.current);for(;n!==null&&Wa(t,n);){let e=n;if(n=bo(n),n===e)break}n?.focus()}}),oe=X(`button`,e,{enabled:!k,stateAttributesMapping:Ql,state:ee,ref:ne,props:W});return k?(0,p.jsx)(xm,{tag:`button`,render:n,className:r,state:ee,refs:ne,props:W,stateAttributesMapping:Ql}):b?(0,p.jsxs)(m.Fragment,{children:[(0,p.jsx)(js,{ref:re,onFocus:ie},`${_}-pre-focus-guard`),(0,p.jsx)(m.Fragment,{children:oe},_),(0,p.jsx)(js,{ref:g.context.triggerFocusTargetRef,onFocus:ae},`${_}-post-focus-guard`)]}):(0,p.jsx)(m.Fragment,{children:oe},_)});function Em(e,t){let n=ma(),[r,i]=m.useState(!1);return q(()=>{e&&t===`trigger-hover`?(i(!0),n.start(Ko,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function Dm(){let e=Pp(!0),t=Mp(!0),n=fm(!0);return m.useMemo(()=>n?{type:`menubar`,context:n}:e&&!t?{type:`context-menu`,context:e}:{type:void 0},[e,t,n])}var Om=m.forwardRef(function(e,t){let{render:n,className:r,label:i,id:a,nativeButton:o=!1,openOnHover:s=!0,delay:c=100,closeDelay:l=0,disabled:u=!1,...d}=e,f=Xf(),p=Ap(),{store:h}=Mp(),g=eu(a),_=h.useState(`open`),v=h.useState(`floatingRootContext`),y=h.useState(`floatingTreeRoot`),b=Qc(g,h),x=m.useCallback(e=>{let t=b(e);return e!==null&&h.select(`open`)&&h.select(`activeTriggerId`)==null&&h.update({activeTriggerId:g,activeTriggerElement:e,closeDelay:l}),t},[b,l,h,g]),S=m.useRef(null),C=m.useCallback(e=>{S.current=e,h.set(`activeTriggerElement`,e)},[h]),w=_m();if(!w?.parentMenu)throw Error(sa(37));h.useSyncedValue(`closeDelay`,l);let T=w.parentMenu,E=T.useState(`itemProps`),D=T.useState(`isActive`,f.index),O=m.useMemo(()=>({type:`submenu-trigger`,setActive(){T.set(`activeIndex`,f.index)}}),[T,f.index]),k=h.useState(`disabled`),A=u||k,{getItemProps:j,itemRef:M}=zp({closeOnClick:!1,disabled:A,highlighted:D,id:g,store:h,nativeButton:o,itemMetadata:O,nodeId:p?.nodeId}),N=h.useState(`hoverEnabled`),P=T.useState(`allowMouseEnter`),F=Sl(v,{enabled:N&&s&&!A,handleClose:Rl({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:c,delay:P?{open:c,close:l}:0,triggerElementRef:S,externalTree:y}),I=Cl([Oc(v,{enabled:!A,event:`mousedown`,toggle:!s,ignoreMouse:s,stickIfOpen:!1})]),L=h.useState(`triggerProps`,!0);return delete L.id,X(`div`,e,{state:{disabled:A,highlighted:D,open:_},stateAttributesMapping:Zl,props:[I.getReferenceProps(),F,L,E,{tabIndex:_||D?0:-1,onBlur(){D&&T.set(`activeIndex`,null)}},d,j],ref:[t,f.ref,M,x,C]})}),km=m.createContext(null),Am=m.createContext(null);function jm(){let e=m.useContext(km);if(e===null)throw Error(sa(60));return e}function Mm(){let e=m.useContext(Am);if(e===null)throw Error(sa(61));return e}var $={id:Z(e=>e.id),modal:Z(e=>e.modal),multiple:Z(e=>e.multiple),items:Z(e=>e.items),itemToStringLabel:Z(e=>e.itemToStringLabel),itemToStringValue:Z(e=>e.itemToStringValue),isItemEqualToValue:Z(e=>e.isItemEqualToValue),value:Z(e=>e.value),hasSelectedValue:Z(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Df(t,r)!==``}),hasNullItemLabel:Z((e,t)=>t?Tf(e.items):!1),open:Z(e=>e.open),mounted:Z(e=>e.mounted),forceMount:Z(e=>e.forceMount),transitionStatus:Z(e=>e.transitionStatus),openMethod:Z(e=>e.openMethod),activeIndex:Z(e=>e.activeIndex),selectedIndex:Z(e=>e.selectedIndex),isActive:Z((e,t)=>e.activeIndex===t),isSelected:Z((e,t,n)=>{let r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(e=>yf(n,e,r)):e.selectedIndex===t&&e.selectedIndex!==null||yf(n,i,r)}),isSelectedByFocus:Z((e,t)=>e.selectedIndex===t),popupProps:Z(e=>e.popupProps),triggerProps:Z(e=>e.triggerProps),triggerElement:Z(e=>e.triggerElement),positionerElement:Z(e=>e.positionerElement),listElement:Z(e=>e.listElement),scrollUpArrowVisible:Z(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:Z(e=>e.scrollDownArrowVisible),hasScrollArrows:Z(e=>e.hasScrollArrows)};function Nm(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,autoComplete:l,disabled:u=!1,readOnly:d=!1,required:f=!1,modal:h=!0,actionsRef:g,inputRef:_,onOpenChangeComplete:v,items:y,multiple:b=!1,itemToStringLabel:x,itemToStringValue:S,isItemEqualToValue:C=vf,highlightItemOnHover:w=!0,children:T}=e,{clearErrors:E}=ed(),{setDirty:D,setTouched:O,setFocused:k,shouldValidateOnChange:A,validityData:j,setFilled:M,name:N,disabled:P,validation:F,validationMode:I}=Qu(),L=hd({id:t}),R=P||u,z=N??c,[B,V]=md({controlled:n,default:b?r??Uo:r,name:`Select`,state:`value`}),[H,U]=md({controlled:a,default:o,name:`Select`,state:`open`}),ee=m.useRef([]),te=m.useRef([]),ne=m.useRef(null),W=m.useRef(null),re=m.useRef(0),ie=m.useRef(null),ae=m.useRef([]),oe=m.useRef(!1),se=m.useRef(!1),ce=m.useRef(null),le=m.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),ue=m.useRef(!1),{mounted:de,setMounted:fe,transitionStatus:pe}=Gc(H),{openMethod:me,triggerProps:he,reset:ge}=jf(H),_e=Qi(()=>new Vc({id:L,modal:h,multiple:b,itemToStringLabel:x,itemToStringValue:S,isItemEqualToValue:C,value:B,open:H,mounted:de,transitionStatus:pe,items:y,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,ve=Q(_e,$.activeIndex),ye=Q(_e,$.selectedIndex),be=Q(_e,$.triggerElement),xe=Q(_e,$.positionerElement),Se=m.useMemo(()=>b&&Array.isArray(B)&&B.length===0?``:Df(B,S),[b,B,S]),Ce=m.useMemo(()=>b&&Array.isArray(B)?B.map(e=>Df(e,S)):Df(B,S),[b,B,S]),we=ha(_e.state.triggerElement);gd({id:L,commit:F.commit,value:B,controlRef:we,name:z,getValue:()=>Ce});let Te=m.useRef(B);q(()=>{B!==Te.current&&_e.set(`forceMount`,!0)},[_e,B]),q(()=>{M(b?Array.isArray(B)&&B.length>0:B!=null)},[b,B,M]),q(function(){if(H)return;let e=ae.current;if(b){let t=Array.isArray(B)?B:[];if(t.length===0){_e.set(`selectedIndex`,null);return}let n=t[t.length-1],r=xf(e,n,C);_e.set(`selectedIndex`,r===-1?null:r);return}let t=xf(e,B,C);_e.set(`selectedIndex`,t===-1?null:t)},[b,H,B,ae,C,_e]),jd(B,()=>{E(z),D(B!==j.initialValue),A()?F.commit(B):F.commit(B,!0)});let Ee=J((e,t)=>{if(s?.(e,t),!t.isCanceled&&(U(e),!e&&(t.reason===as||t.reason===ns)&&(O(!0),k(!1),I===`onBlur`&&F.commit(B)),!e&&_e.state.activeIndex!==null)){let e=ee.current[_e.state.activeIndex];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}}),De=J(()=>{fe(!1),_e.set(`activeIndex`,null),ge(),v?.(!1)});Zc({enabled:!g,open:H,ref:ne,onComplete(){H||De()}}),m.useImperativeHandle(g,()=>({unmount:De}),[De]);let Oe=J((e,t)=>{i?.(e,t),!t.isCanceled&&V(e)}),ke=J(()=>{let e=_e.state.listElement||ne.current;if(!e)return;let t=e.scrollTop,n=e.scrollTop+e.clientHeight,r=t>1,i=n<e.scrollHeight-1;_e.state.scrollUpArrowVisible!==r&&_e.set(`scrollUpArrowVisible`,r),_e.state.scrollDownArrowVisible!==i&&_e.set(`scrollDownArrowVisible`,i)}),Ae=sl({open:H,onOpenChange:Ee,elements:{reference:be,floating:xe}}),{getReferenceProps:je,getFloatingProps:Me,getItemProps:Ne}=Cl([Oc(Ae,{enabled:!d&&!R,event:`mousedown`}),Pc(Ae,{bubbles:!1}),Ml(Ae,{enabled:!d&&!R,listRef:ee,activeIndex:ve,selectedIndex:ye,disabledIndices:Uo,onNavigate(e){e===null&&!H||_e.set(`activeIndex`,e)},focusItemOnHover:!1}),Fl(Ae,{enabled:!d&&!R&&(H||!b),listRef:te,activeIndex:ve,selectedIndex:ye,onMatch(e){H?_e.set(`activeIndex`,e):Oe(ae.current[e],Y(`none`))},onTypingChange(e){oe.current=e}})]),Pe=m.useMemo(()=>Zs(je(),he,L?{id:L}:Wo),[je,he,L]);oa(()=>{_e.update({popupProps:Me(),triggerProps:Pe})}),q(()=>{_e.update({id:L,modal:h,multiple:b,value:B,open:H,mounted:de,transitionStatus:pe,popupProps:Me(),triggerProps:Pe,items:y,itemToStringLabel:x,itemToStringValue:S,isItemEqualToValue:C,openMethod:me})},[_e,L,h,b,B,H,de,pe,Me,Pe,y,x,S,C,me]);let Fe=m.useMemo(()=>({store:_e,name:z,required:f,disabled:R,readOnly:d,multiple:b,itemToStringLabel:x,itemToStringValue:S,highlightItemOnHover:w,setValue:Oe,setOpen:Ee,listRef:ee,popupRef:ne,scrollHandlerRef:W,handleScrollArrowVisibility:ke,scrollArrowsMountedCountRef:re,getItemProps:Ne,events:Ae.context.events,valueRef:ie,valuesRef:ae,labelsRef:te,typingRef:oe,selectionRef:le,selectedItemTextRef:ce,validation:F,onOpenChangeComplete:v,keyboardActiveRef:se,alignItemWithTriggerActiveRef:ue,initialValueRef:Te}),[_e,z,f,R,d,b,x,S,w,Oe,Ee,Ne,Ae.context.events,F,v,ke]),Ie=vs(_,F.inputRef),Le=b&&Array.isArray(B)&&B.length>0,Re=m.useMemo(()=>!b||!Array.isArray(B)||!z?null:B.map(e=>{let t=Df(e,S);return(0,p.jsx)(`input`,{type:`hidden`,name:z,value:t},t)}),[b,B,z,S]);return(0,p.jsx)(km.Provider,{value:Fe,children:(0,p.jsxs)(Am.Provider,{value:Ae,children:[T,(0,p.jsx)(`input`,{...F.getInputValidationProps({onFocus(){_e.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.value,n=Y(Qo,e.nativeEvent);function r(){if(b)return;let e=ae.current.find(e=>Df(e,S).toLowerCase()===t.toLowerCase());e!=null&&(D(e!==j.initialValue),Oe(e,n),A()&&F.commit(e))}_e.set(`forceMount`,!0),queueMicrotask(r)}}),name:b?void 0:z,autoComplete:l,value:Se,disabled:R,required:f&&!Le,readOnly:d,ref:Ie,style:z?Es:Ts,tabIndex:-1,"aria-hidden":!0}),Re]})})}var Pm=2,Fm=400,Im=200,Lm={...Ql,...Xu,value:()=>null},Rm=m.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,...s}=e,{setTouched:c,setFocused:l,validationMode:u,state:d,disabled:f}=Qu(),{labelId:p}=nd(),{store:h,setOpen:g,selectionRef:_,validation:v,readOnly:y,required:b,alignItemWithTriggerActiveRef:x,disabled:S,keyboardActiveRef:C}=jm(),w=f||S||a,T=Q(h,$.open),E=Q(h,$.value),D=Q(h,$.triggerProps),O=Q(h,$.positionerElement),k=Q(h,$.listElement),A=Q(h,$.id),j=Q(h,$.hasSelectedValue),M=!j&&T,N=Q(h,$.hasNullItemLabel,M),P=i??A;hd({id:P});let F=ha(O),I=m.useRef(null),{getButtonProps:L,buttonRef:R}=Dd({disabled:w,native:o}),z=vs(t,I,R,J(e=>{h.set(`triggerElement`,e)})),B=ma(),V=ma(),H=ma(),U=ma();m.useEffect(()=>{if(T)return j||N?U.start(Im,()=>{_.current.allowUnselectedMouseUp=!0,H.start(Im,()=>{_.current.allowSelectedMouseUp=!0})}):H.start(Fm,()=>{_.current.allowUnselectedMouseUp=!0,_.current.allowSelectedMouseUp=!0}),()=>{H.clear(),U.clear()};_.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},V.clear()},[T,j,N,_,V,H,U]);let ee=m.useMemo(()=>k?.id??Qa(O)?.id,[k,O]),te=Zs(D,{id:P,role:`combobox`,"aria-expanded":T?`true`:`false`,"aria-haspopup":`listbox`,"aria-controls":T?ee:void 0,"aria-labelledby":p,"aria-readonly":y||void 0,"aria-required":b||void 0,tabIndex:w?-1:0,ref:z,onFocus(e){l(!0),T&&x.current&&g(!1,Y(Qo,e.nativeEvent)),B.start(0,()=>{h.set(`forceMount`,!0)})},onBlur(e){Wa(O,e.relatedTarget)||(c(!0),l(!1),u===`onBlur`&&v.commit(E))},onPointerMove(){C.current=!1},onKeyDown(){C.current=!0},onMouseDown(e){if(T)return;let t=xa(e.currentTarget);function n(e){if(!I.current)return;let t=e.target;if(Wa(I.current,t)||Wa(F.current,t)||t===I.current)return;let n=Mf(I.current);e.clientX>=n.left-Pm&&e.clientX<=n.right+Pm&&e.clientY>=n.top-Pm&&e.clientY<=n.bottom+Pm||g(!1,Y(cs,e))}V.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},v.getValidationProps,s,L);te.role=`combobox`;let ne={...d,open:T,disabled:w,value:E,readOnly:y,placeholder:!j};return X(`button`,e,{ref:[t,I],state:ne,stateAttributesMapping:Lm,props:te})}),zm={value:()=>null},Bm=m.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,...o}=e,{store:s,valueRef:c}=jm(),l=Q(s,$.value),u=Q(s,$.items),d=Q(s,$.itemToStringLabel),f=Q(s,$.hasSelectedValue),p=!f&&a!=null&&i==null,m=Q(s,$.hasNullItemLabel,p),h={value:l,placeholder:!f},g=null;return g=typeof i==`function`?i(l):i??(!f&&a!=null&&!m?a:Array.isArray(l)?kf(l,u,d):Of(l,u,d)),X(`span`,e,{state:h,ref:[t,c],props:[{children:g},o],stateAttributesMapping:zm})}),Vm=m.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:a}=jm();return X(`span`,e,{state:{open:Q(a,$.open)},ref:t,props:[{"aria-hidden":!0,children:`▼`},i],stateAttributesMapping:Zl})}),Hm=m.createContext(void 0),Um=m.forwardRef(function(e,t){let{store:n}=jm(),r=Q(n,$.mounted),i=Q(n,$.forceMount);return r||i?(0,p.jsx)(Hm.Provider,{value:!0,children:(0,p.jsx)(gc,{ref:t,...e})}):null}),Wm={...$l,...Yc},Gm=m.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:a}=jm(),o=Q(a,$.open),s=Q(a,$.mounted);return X(`div`,e,{state:{open:o,transitionStatus:Q(a,$.transitionStatus)},ref:t,props:[{role:`presentation`,hidden:!s,style:{userSelect:`none`,WebkitUserSelect:`none`}},i],stateAttributesMapping:Wm})}),Km=m.createContext(void 0);function qm(){let e=m.useContext(Km);if(!e)throw Error(sa(59));return e}function Jm(e,t){e&&Object.assign(e.style,t)}var Ym={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},Xm={position:`fixed`},Zm=m.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f=5,sticky:h=!1,disableAnchorTracking:g,alignItemWithTrigger:_=!0,collisionAvoidance:v=Yo,...y}=e,{store:b,listRef:x,labelsRef:S,alignItemWithTriggerActiveRef:C,selectedItemTextRef:w,valuesRef:T,initialValueRef:E,popupRef:D,setValue:O}=jm(),k=Mm(),A=Q(b,$.open),j=Q(b,$.mounted),M=Q(b,$.modal),N=Q(b,$.value),P=Q(b,$.openMethod),F=Q(b,$.positionerElement),I=Q(b,$.triggerElement),L=Q(b,$.isItemEqualToValue),R=Q(b,$.transitionStatus),z=m.useRef(null),B=m.useRef(null),[V,H]=m.useState(_),U=j&&V&&P!==`touch`;!j&&V!==_&&H(_),q(()=>{j||($.scrollUpArrowVisible(b.state)&&b.set(`scrollUpArrowVisible`,!1),$.scrollDownArrowVisible(b.state)&&b.set(`scrollDownArrowVisible`,!1))},[b,j]),m.useImperativeHandle(C,()=>U),qf((U||M)&&A&&P!==`touch`,I);let ee=xu({anchor:n,floatingRootContext:k,positionMethod:r,mounted:j,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:h,disableAnchorTracking:g??U,collisionAvoidance:v,keepMounted:!0}),te=U?`none`:ee.side,ne=U?Xm:ee.positionerStyles,W=m.useMemo(()=>{let e={};return A||(e.pointerEvents=`none`),{role:`presentation`,hidden:!j,style:{...ne,...e}}},[A,j,ne]),re={open:A,side:te,align:ee.align,anchorHidden:ee.anchorHidden},ie=X(`div`,e,{ref:[t,J(e=>{b.set(`positionerElement`,e)})],state:re,stateAttributesMapping:$l,props:[W,Cu(R),y]}),ae=m.useRef(0),oe=J(e=>{if(e.size===0&&ae.current===0||T.current.length===0)return;let t=ae.current;if(ae.current=e.size,e.size===t)return;let n=Y(Qo);if(t!==0&&!b.state.multiple&&N!==null&&xf(T.current,N,L)===-1){let e=E.current,t=e!=null&&xf(T.current,e,L)!==-1?e:null;O(t,n),t===null&&(b.set(`selectedIndex`,null),w.current=null)}if(t!==0&&b.state.multiple&&Array.isArray(N)){let e=e=>xf(T.current,e,L)!==-1,t=N.filter(t=>e(t));(t.length!==N.length||t.some(e=>!bf(N,e,L)))&&(O(t,n),t.length===0&&(b.set(`selectedIndex`,null),w.current=null))}if(A&&U){b.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};Jm(F,e),Jm(D.current,e)}}),se=m.useMemo(()=>({...ee,side:te,alignItemWithTriggerActive:U,setControlledAlignItemWithTrigger:H,scrollUpArrowRef:z,scrollDownArrowRef:B}),[ee,te,U,H]);return(0,p.jsx)(Ff,{elementsRef:x,labelsRef:S,onMapChange:oe,children:(0,p.jsxs)(Km.Provider,{value:se,children:[j&&M&&(0,p.jsx)(Jf,{inert:ku(!A),cutout:I}),ie]})})});function Qm(e){let t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}var $m=`base-ui-disable-scrollbar`,eh={className:$m,getElement(e){return(0,p.jsx)(`style`,{nonce:e,href:$m,precedence:`base-ui:low`,children:`.${$m}{scrollbar-width:none}.${$m}::-webkit-scrollbar{display:none}`})}};function th(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var nh=m.createContext(void 0),rh={disableStyleElements:!1};function ih(){return m.useContext(nh)??rh}var ah=1,oh={...$l,...Yc},sh=m.forwardRef(function(e,t){let{render:n,className:r,finalFocus:i,...a}=e,{store:o,popupRef:s,onOpenChangeComplete:c,setOpen:l,valueRef:u,selectedItemTextRef:d,keyboardActiveRef:f,multiple:h,handleScrollArrowVisibility:g,scrollHandlerRef:_,highlightItemOnHover:v}=jm(),{side:y,align:b,alignItemWithTriggerActive:x,setControlledAlignItemWithTrigger:C,scrollDownArrowRef:w,scrollUpArrowRef:T}=qm(),E=Zp(!0)!=null,D=Mm(),{nonce:O,disableStyleElements:k}=ih(),A=ma(),j=Q(o,$.id),M=Q(o,$.open),N=Q(o,$.mounted),P=Q(o,$.popupProps),F=Q(o,$.transitionStatus),I=Q(o,$.triggerElement),L=Q(o,$.positionerElement),R=Q(o,$.listElement),z=m.useRef(0),B=m.useRef(!1),V=m.useRef(0),H=m.useRef(!1),U=m.useRef({}),ee=As(),te=J(e=>{if(!L||!s.current||!H.current)return;if(B.current||!x){g();return}let t=L.style.top===`0px`,n=L.style.bottom===`0px`,r=L.getBoundingClientRect().height,i=xa(L),a=getComputedStyle(L),o=parseFloat(a.marginTop),c=parseFloat(a.marginBottom),l=ch(getComputedStyle(s.current)),u=Math.min(i.documentElement.clientHeight-o-c,l),d=e.scrollTop,f=lh(e),p=0,m=null,h=!1,_=!1,v=e=>{L.style.height=`${e}px`},y=(t,n)=>{let i=th(t,0,u-r);i>0&&v(r+i),e.scrollTop=n,u-(r+i)<=ah&&(B.current=!0),g()};if(t){let e=f-d,t=r+e,n=Math.min(t,u);if(p=n,e<=ah){y(e,f);return}u-n>ah?_=!0:h=!0}else if(n){let e=d,t=r+e,n=Math.min(t,u),i=t-u;if(p=n,e<=ah){y(e,0);return}u-n>ah?m=0:(h=!0,d<f&&(m=d-(e-i)))}if(p=Math.ceil(p),p!==0&&v(p),_||m!=null){let t=lh(e),n=_?t:th(m,0,t);Math.abs(e.scrollTop-n)>ah&&(e.scrollTop=n)}(h||p>=u-ah)&&(B.current=!0),g()});m.useImperativeHandle(_,()=>te,[te]),Zc({open:M,ref:s,onComplete(){M&&c?.(!0)}});let ne={open:M,transitionStatus:F,side:y,align:b};q(()=>{!L||!s.current||Object.keys(U.current).length||(U.current={top:L.style.top||`0`,left:L.style.left||`0`,right:L.style.right,height:L.style.height,bottom:L.style.bottom,minHeight:L.style.minHeight,maxHeight:L.style.maxHeight,marginTop:L.style.marginTop,marginBottom:L.style.marginBottom})},[s,L]),q(()=>{M||x||(H.current=!1,B.current=!1,z.current=0,V.current=0,Jm(L,U.current))},[M,x,L,s]),q(()=>{let e=s.current;if(!(!M||!I||!L||!e||o.state.transitionStatus===`ending`)){if(!x){H.current=!0,ee.request(g),e.style.removeProperty(`--transform-origin`);return}queueMicrotask(()=>{let t=dh(e);e.style.removeProperty(`--transform-origin`);try{let t=getComputedStyle(L),n=getComputedStyle(e),r=xa(I),i=Ot(L),a=I.getBoundingClientRect(),o=L.getBoundingClientRect(),s=a.left,c=a.height,l=R||e,f=l.scrollHeight,p=parseFloat(n.borderBottomWidth),m=parseFloat(t.marginTop)||10,h=parseFloat(t.marginBottom)||10,_=parseFloat(t.minHeight)||100,v=ch(n),y=r.documentElement.clientHeight-m-h,b=r.documentElement.clientWidth,x=y-a.bottom+c,w=d.current,T=u.current,E,D=0,O=0;if(w&&T){let e=T.getBoundingClientRect();E=w.getBoundingClientRect();let t=e.left-s,n=E.left-o.left,r=e.top-a.top+e.height/2,i=E.top-o.top+E.height/2;D=t-n,O=i-r}let k=x+O+h+p,A=Math.min(y,k),j=y-m-h,M=k-A,N=Math.max(5,s+D),P=b-5,F=Math.max(0,N+o.width-P);L.style.left=`${N-F}px`,L.style.height=`${A}px`,L.style.maxHeight=`auto`,L.style.marginTop=`${m}px`,L.style.marginBottom=`${h}px`,e.style.height=`100%`;let V=l.scrollHeight-l.clientHeight,ee=M>=V;ee&&(A=Math.min(y,o.height)-(M-V));let te=a.top<20||a.bottom>y-20||A<Math.min(f,_),ne=(i.visualViewport?.scale??1)!==1&&Ea;if(te||ne){H.current=!0,Jm(L,U.current),S.flushSync(()=>C(!1));return}if(ee){let e=Math.max(0,y-k);L.style.top=o.height>=j?`0`:`${e}px`,L.style.height=`${A}px`,l.scrollTop=l.scrollHeight-l.clientHeight,z.current=Math.max(_,A)}else L.style.bottom=`0`,z.current=Math.max(_,A),l.scrollTop=M;if(E){let t=o.top,n=o.height,r=E.top+E.height/2,i=th(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(z.current===y||A>=v)&&(B.current=!0),g(),setTimeout(()=>{H.current=!0})}finally{t()}})}},[o,M,L,I,u,d,s,g,x,C,ee,w,T,R]),m.useEffect(()=>{if(!x||!L||!M)return;let e=Ot(L);function t(e){l(!1,Y(fs,e))}return e.addEventListener(`resize`,t),()=>{e.removeEventListener(`resize`,t)}},[l,x,L,M]);let W={...R?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":h||void 0,id:`${j}-list`},onKeyDown(e){f.current=!0,E&&gp.has(e.key)&&e.stopPropagation()},onMouseMove(){f.current=!1},onPointerLeave(e){if(!v||Qm(e)||e.pointerType===`touch`)return;let t=e.currentTarget;A.start(0,()=>{o.set(`activeIndex`,null),t.focus({preventScroll:!0})})},onScroll(e){R||te(e.currentTarget)},...x&&{style:R?{height:`100%`}:Ym}},re=X(`div`,e,{ref:[t,s],state:ne,stateAttributesMapping:oh,props:[P,W,Cu(F),{className:!R&&x?eh.className:void 0},a]});return(0,p.jsxs)(m.Fragment,{children:[!k&&eh.getElement(O),(0,p.jsx)(Dc,{context:D,modal:!1,disabled:!N,returnFocus:i,restoreFocus:!0,children:re})]})});function ch(e){let t=e.maxHeight||``;return t.endsWith(`px`)&&parseFloat(t)||1/0}function lh(e){return Math.max(0,e.scrollHeight-e.clientHeight)}var uh=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function dh(e){let{style:t}=e,n={};for(let[e,r]of uh)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of uh){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var fh=m.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:a,scrollHandlerRef:o}=jm(),{alignItemWithTriggerActive:s}=qm(),c=Q(a,$.hasScrollArrows),l=Q(a,$.openMethod),u=Q(a,$.multiple),d={id:`${Q(a,$.id)}-list`,role:`listbox`,"aria-multiselectable":u||void 0,onScroll(e){o.current?.(e.currentTarget)},...s&&{style:Ym},className:c&&l!==`touch`?eh.className:void 0};return X(`div`,e,{ref:[t,J(e=>{a.set(`listElement`,e)})],props:[d,i]})}),ph=m.createContext(void 0);function mh(){let e=m.useContext(ph);if(!e)throw Error(sa(57));return e}var hh=m.memo(m.forwardRef(function(e,t){let{render:n,className:r,value:i=null,label:a,disabled:o=!1,nativeButton:s=!1,...c}=e,l=m.useRef(null),u=Xf({label:a,textRef:l,indexGuessBehavior:Yf.GuessFromOrder}),{store:d,getItemProps:f,setOpen:h,setValue:g,selectionRef:_,typingRef:v,valuesRef:y,keyboardActiveRef:b,multiple:x,highlightItemOnHover:S}=jm(),C=ma(),w=Q(d,$.isActive,u.index),T=Q(d,$.isSelected,u.index,i),E=Q(d,$.isSelectedByFocus,u.index),D=Q(d,$.isItemEqualToValue),O=u.index,k=O!==-1,A=m.useRef(null),j=ha(O);q(()=>{if(!k)return;let e=y.current;return e[O]=i,()=>{delete e[O]}},[k,O,i,y]),q(()=>{if(!k)return;let e=d.state.value,t=e;x&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),t!==void 0&&yf(i,t,D)&&d.set(`selectedIndex`,O)},[k,O,x,D,d,i]);let M={disabled:o,selected:T,highlighted:w},N=f({active:w,selected:T});N.onFocus=void 0,N.id=void 0;let P=m.useRef(null),F=m.useRef(`mouse`),I=m.useRef(!1),{getButtonProps:L,buttonRef:R}=Dd({disabled:o,focusableWhenDisabled:!0,native:s});function z(e){let t=d.state.value;if(x){let n=Array.isArray(t)?t:[],r=T?Sf(n,i,D):[...n,i];g(r,Y(rs,e))}else g(i,Y(rs,e)),h(!1,Y(rs,e))}let B={role:`option`,"aria-selected":T,tabIndex:w?0:-1,onFocus(){d.set(`activeIndex`,O)},onMouseEnter(){!b.current&&d.state.selectedIndex===null&&S&&d.set(`activeIndex`,O)},onMouseMove(){S&&d.set(`activeIndex`,O)},onMouseLeave(e){!S||b.current||Qm(e)||C.start(0,()=>{d.state.activeIndex===O&&d.set(`activeIndex`,null)})},onTouchStart(){_.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(e){P.current=e.key,d.set(`activeIndex`,O)},onClick(e){I.current=!1,!(e.type===`keydown`&&P.current===null)&&(o||P.current===` `&&v.current||F.current!==`touch`&&!w||(P.current=null,z(e.nativeEvent)))},onPointerEnter(e){F.current=e.pointerType},onPointerDown(e){F.current=e.pointerType,I.current=!0},onMouseUp(e){if(o)return;if(I.current){I.current=!1;return}let t=!_.current.allowSelectedMouseUp&&T,n=!_.current.allowUnselectedMouseUp&&!T;t||n||F.current!==`touch`&&!w||z(e.nativeEvent)}},V=X(`div`,e,{ref:[R,t,u.ref,A],state:M,props:[N,B,c,L]}),H=m.useMemo(()=>({selected:T,indexRef:j,textRef:l,selectedByFocus:E,hasRegistered:k}),[T,j,l,E,k]);return(0,p.jsx)(ph.Provider,{value:H,children:V})})),gh=m.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=mh();return n||r?(0,p.jsx)(_h,{...e,ref:t}):null}),_h=m.memo(m.forwardRef((e,t)=>{let{render:n,className:r,keepMounted:i,...a}=e,{selected:o}=mh(),s=m.useRef(null),{transitionStatus:c,setMounted:l}=Gc(o),u=X(`span`,e,{ref:[t,s],state:{selected:o,transitionStatus:c},props:[{"aria-hidden":!0,children:`✔️`},a],stateAttributesMapping:Yc});return Zc({open:o,ref:s,onComplete(){o||l(!1)}}),u})),vh=m.memo(m.forwardRef(function(e,t){let{indexRef:n,textRef:r,selectedByFocus:i,hasRegistered:a}=mh(),{selectedItemTextRef:o}=jm(),{className:s,render:c,...l}=e;return X(`div`,e,{ref:[m.useCallback(e=>{if(!e||!a)return;let t=o.current===null||!o.current.isConnected;(i||t&&n.current===0)&&(o.current=e)},[o,n,i,a]),t,r],props:l})})),yh={...$l,...Yc},bh=m.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:a}=jm(),{side:o,align:s,arrowRef:c,arrowStyles:l,arrowUncentered:u,alignItemWithTriggerActive:d}=qm(),f=X(`div`,e,{state:{open:Q(a,$.open,!0),side:o,align:s,uncentered:u},ref:[c,t],props:[{style:l,"aria-hidden":!0},i],stateAttributesMapping:yh});return d?null:f}),xh=m.forwardRef(function(e,t){let{render:n,className:r,direction:i,keepMounted:a=!1,...o}=e,{store:s,popupRef:c,listRef:l,handleScrollArrowVisibility:u,scrollArrowsMountedCountRef:d}=jm(),{side:f,scrollDownArrowRef:p,scrollUpArrowRef:m}=qm(),h=Q(s,i===`up`?$.scrollUpArrowVisible:$.scrollDownArrowVisible),g=Q(s,$.openMethod),_=h&&g!==`touch`,v=ma(),y=i===`up`?m:p,{transitionStatus:b,setMounted:x}=Gc(_);q(()=>(d.current+=1,s.state.hasScrollArrows||s.set(`hasScrollArrows`,!0),()=>{d.current=Math.max(0,d.current-1),d.current===0&&s.state.hasScrollArrows&&s.set(`hasScrollArrows`,!1)}),[s,d]),Zc({open:_,ref:y,onComplete(){_||x(!1)}});let S=X(`div`,e,{ref:[t,y],state:{direction:i,visible:_,side:f,transitionStatus:b},props:[{"aria-hidden":!0,children:i===`up`?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||v.isStarted())return;s.set(`activeIndex`,null);function t(){let e=s.state.listElement??c.current;if(!e)return;s.set(`activeIndex`,null),u();let n=e.scrollTop===0,r=Math.round(e.scrollTop+e.clientHeight)>=e.scrollHeight;if(l.current.length===0&&(i===`up`?s.set(`scrollUpArrowVisible`,!n):s.set(`scrollDownArrowVisible`,!r)),i===`up`&&n||i===`down`&&r){v.clear();return}if((s.state.listElement||c.current)&&l.current&&l.current.length>0){let t=l.current,n=y.current?.offsetHeight||0;if(i===`up`){let r=0,i=e.scrollTop+n;for(let e=0;e<t.length;e+=1){let n=t[e];if(n&&n.offsetTop>=i){r=e;break}}let a=Math.max(0,r-1);if(a<r){let r=t[a];r&&(e.scrollTop=Math.max(0,r.offsetTop-n))}else e.scrollTop=0}else{let r=t.length-1,i=e.scrollTop+e.clientHeight-n;for(let e=0;e<t.length;e+=1){let n=t[e];if(n&&n.offsetTop+n.offsetHeight>i){r=Math.max(0,e-1);break}}let a=Math.min(t.length-1,r+1);if(a>r){let r=t[a];r&&(e.scrollTop=r.offsetTop+r.offsetHeight-e.clientHeight+n)}else e.scrollTop=e.scrollHeight-e.clientHeight}}v.start(40,t)}v.start(40,t)},onMouseLeave(){v.clear()}},o]});return _||a?S:null}),Sh=m.forwardRef(function(e,t){return(0,p.jsx)(xh,{...e,ref:t,direction:`down`})}),Ch=m.forwardRef(function(e,t){return(0,p.jsx)(xh,{...e,ref:t,direction:`up`})}),wh=m.createContext(void 0);function Th(){let e=m.useContext(wh);if(e===void 0)throw Error(sa(56));return e}var Eh=m.forwardRef(function(e,t){let{className:n,render:r,...i}=e,[a,o]=m.useState(),s=m.useMemo(()=>({labelId:a,setLabelId:o}),[a,o]),c=X(`div`,e,{ref:t,props:[{role:`group`,"aria-labelledby":a},i]});return(0,p.jsx)(wh.Provider,{value:s,children:c})}),Dh=m.forwardRef(function(e,t){let{className:n,render:r,id:i,...a}=e,{setLabelId:o}=Th(),s=eu(i);return q(()=>{o(s)},[s,o]),X(`div`,e,{ref:t,props:[{id:s},a]})}),Oh=Object.freeze(Object.defineProperty({__proto__:null,Arrow:bh,Backdrop:Gm,Group:Eh,GroupLabel:Dh,Icon:Vm,Item:hh,ItemIndicator:gh,ItemText:vh,List:fh,Popup:sh,Portal:Um,Positioner:Zm,Root:Nm,ScrollDownArrow:Sh,ScrollUpArrow:Ch,Separator:Zf,Trigger:Rm,Value:Bm},Symbol.toStringTag,{value:`Module`})),kh=m.createContext(void 0),Ah=(function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.disabled=`data-disabled`,e.readonly=`data-readonly`,e.required=`data-required`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e})({}),jh={...Xu,checked(e){return e?{[Ah.checked]:``}:{[Ah.unchecked]:``}}},Mh=m.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i,id:a,inputRef:o,name:s,nativeButton:c=!1,onCheckedChange:l,readOnly:u=!1,required:d=!1,disabled:f=!1,render:h,uncheckedValue:g,value:_,...v}=e,{clearErrors:y}=ed(),{state:b,setTouched:x,setDirty:S,validityData:C,setFilled:w,setFocused:T,shouldValidateOnChange:E,validationMode:D,disabled:O,name:k,validation:A}=Qu(),{labelId:j}=nd(),M=O||f,N=k??s,P=J(l),F=m.useRef(null),I=vs(F,o,A.inputRef),L=m.useRef(null),R=eu(),z=hd({id:a,implicit:!1,controlRef:L}),B=c?void 0:z,[V,H]=md({controlled:n,default:!!i,name:`Switch`,state:`checked`});gd({id:R,commit:A.commit,value:V,controlRef:L,name:N,getValue:()=>V}),q(()=>{F.current&&w(F.current.checked)},[F,w]),jd(V,()=>{y(N),S(V!==C.initialValue),w(V),E()?A.commit(V):A.commit(V,!0)});let{getButtonProps:U,buttonRef:ee}=Dd({disabled:M,native:c}),te={id:c?z:R,role:`switch`,"aria-checked":V,"aria-readonly":u||void 0,"aria-required":d||void 0,"aria-labelledby":j,onFocus(){M||T(!0)},onBlur(){let e=F.current;!e||M||(x(!0),T(!1),D===`onBlur`&&A.commit(e.checked))},onClick(e){u||M||(e.preventDefault(),F.current?.dispatchEvent(new PointerEvent(`click`,{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))}},ne=m.useMemo(()=>Zs({checked:V,disabled:M,id:B,name:N,required:d,style:N?Es:Ts,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,ref:I,onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.checked,n=Y(Qo,e.nativeEvent);P?.(t,n),!n.isCanceled&&H(t)},onFocus(){L.current?.focus()}},A.getInputValidationProps,_===void 0?Wo:{value:_}),[V,M,I,B,N,P,d,H,A,_]),W=m.useMemo(()=>({...b,checked:V,disabled:M,readOnly:u,required:d}),[b,V,M,u,d]),re=X(`span`,e,{state:W,ref:[t,L,ee],props:[te,A.getValidationProps,v,U],stateAttributesMapping:jh});return(0,p.jsxs)(kh.Provider,{value:W,children:[re,!V&&N&&g!==void 0&&(0,p.jsx)(`input`,{type:`hidden`,name:N,value:g}),(0,p.jsx)(`input`,{...ne})]})}),Nh=(function(e){return e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e})({}),Ph={tabActivationDirection:e=>({[Nh.activationDirection]:e})};({...Ph}),{...Ph,...Yc};var Fh=m.createContext(void 0);function Ih(e){let t=m.useContext(Fh);if(t===void 0&&!e)throw Error(sa(47));return t}function Lh(){return{...il(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}var Rh={...ol,disabled:Z(e=>e.disabled),instantType:Z(e=>e.instantType),openMethod:Z(e=>e.openMethod),openChangeReason:Z(e=>e.openChangeReason),modal:Z(e=>e.modal),stickIfOpen:Z(e=>e.stickIfOpen),titleElementId:Z(e=>e.titleElementId),descriptionElementId:Z(e=>e.descriptionElementId),openOnHover:Z(e=>e.openOnHover),closeDelay:Z(e=>e.closeDelay),hasViewport:Z(e=>e.hasViewport)},zh=class e extends Hc{constructor(e){let t={...Lh(),...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:m.createRef(),backdropRef:m.createRef(),internalBackdropRef:m.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:m.createRef(),beforeContentFocusGuardRef:m.createRef(),stickIfOpenTimeout:new pa,triggerElements:new nl},Rh)}setOpen=(e,t)=>{let n=t.reason===es,r=t.reason===$o&&t.event.detail===0,i=!e&&(t.reason===os||t.reason==null);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let a={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested,triggerElement:t.trigger};this.state.floatingRootContext.context.events?.emit(`openchange`,a);let o=()=>{let n={open:e,openChangeReason:t.reason},r=t.trigger?.id??null;(r||e)&&(n.activeTriggerId=r,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set(`stickIfOpen`,!0),this.context.stickIfOpenTimeout.start(Ko,()=>{this.set(`stickIfOpen`,!1)}),S.flushSync(o)):o(),r||i?this.set(`instantType`,r?`click`:`dismiss`):t.reason===as?this.set(`instantType`,`focus`):this.set(`instantType`,void 0)};static useStore(t,n){let r=Qi(()=>new e(n)).current,i=t??r;return da(r.disposeEffect),i}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()};function Bh({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=zh.useStore(s?.store,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});oa(()=>{n===void 0&&u.state.open===!1&&r===!0&&u.update({open:!0,activeTriggerId:l})}),u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`positionerElement`),h=u.useState(`payload`),g=u.useState(`openChangeReason`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a);let{openMethod:_,triggerProps:v,reset:y}=jf(d);el(u);let{forceUnmount:b}=tl(d,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null}),y()});qf(d&&o===!0&&g!==es&&_!==`touch`,f),m.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]);let x=m.useCallback(e=>{let t=Y(e);return t.preventUnmountOnClose=()=>{u.set(`preventUnmountingOnClose`,!0)},t},[u]),S=m.useCallback(()=>{u.setOpen(!1,x(ds))},[u,x]);m.useImperativeHandle(e.actionsRef,()=>({unmount:b,close:S}),[b,S]);let C=ll({popupStore:u,onOpenChange:u.setOpen}),{getReferenceProps:w,getFloatingProps:T,getTriggerProps:E}=Cl([Pc(C,{outsidePressEvent:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),Pl(C)]),D=m.useMemo(()=>w(v),[w,v]),O=m.useMemo(()=>E(v),[E,v]),k=m.useMemo(()=>T(),[T]);u.useSyncedValues({modal:o,openMethod:_,activeTriggerProps:D,inactiveTriggerProps:O,popupProps:k,floatingRootContext:C,nested:Lo()!=null});let A=m.useMemo(()=>({store:u}),[u]);return(0,p.jsx)(Fh.Provider,{value:A,children:typeof t==`function`?t({payload:h}):t})}function Vh(e){return Ih(!0)?(0,p.jsx)(Bh,{props:e}):(0,p.jsx)(Vo,{children:(0,p.jsx)(Bh,{props:e})})}var Hh=300,Uh=m.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,handle:o,payload:s,openOnHover:c=!1,delay:l=Hh,closeDelay:u=0,id:d,...f}=e,h=Ih(!0),g=o?.store??h?.store;if(!g)throw Error(sa(74));let _=eu(d),v=g.useState(`isTriggerActive`,_),y=g.useState(`floatingRootContext`),b=g.useState(`isOpenedByTrigger`,_),x=m.useRef(null),{registerTrigger:C,isMountedByThisTrigger:w}=$c(_,x,g,{payload:s,disabled:i,openOnHover:c,closeDelay:u}),T=g.useState(`openChangeReason`),E=g.useState(`stickIfOpen`),D=g.useState(`openMethod`),O=Sl(y,{enabled:y!=null&&c&&(D!==`touch`||T!==$o),mouseOnly:!0,move:!1,handleClose:Rl(),restMs:l,delay:{close:u},triggerElementRef:x,isActiveTrigger:v}),k=Cl([Oc(y,{enabled:y!=null,stickIfOpen:E})]),A=g.useState(`triggerProps`,w),j={disabled:i,open:b},{getButtonProps:M,buttonRef:N}=Dd({disabled:i,native:a}),P=m.useMemo(()=>({open(e){return e&&T===$o?Ql.open(e):Zl.open(e)}}),[T]),F=X(`button`,e,{state:j,ref:[N,t,C,x],props:[k.getReferenceProps(),O,A,{[Jo]:``,id:_},f,M],stateAttributesMapping:P}),I=m.useRef(null),L=J(e=>{S.flushSync(()=>{g.setOpen(!1,Y(as,e.nativeEvent,e.currentTarget))}),wo(I.current)?.focus()}),R=J(e=>{let t=g.select(`positionerElement`);if(t&&To(e,t))g.context.beforeContentFocusGuardRef.current?.focus();else{S.flushSync(()=>{g.setOpen(!1,Y(as,e.nativeEvent,e.currentTarget))});let n=Co(g.context.triggerFocusTargetRef.current||x.current);for(;n!==null&&Wa(t,n);){let e=n;if(n=bo(n),n===e)break}n?.focus()}});return v?(0,p.jsxs)(m.Fragment,{children:[(0,p.jsx)(js,{ref:I,onFocus:L}),(0,p.jsx)(m.Fragment,{children:F},_),(0,p.jsx)(js,{ref:g.context.triggerFocusTargetRef,onFocus:R})]}):(0,p.jsx)(m.Fragment,{children:F},_)}),Wh=m.createContext(void 0);function Gh(){let e=m.useContext(Wh);if(e===void 0)throw Error(sa(45));return e}var Kh=m.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=Ih();return i.useState(`mounted`)||n?(0,p.jsx)(Wh.Provider,{value:n,children:(0,p.jsx)(gc,{ref:t,...r})}):null}),qh=m.createContext(void 0);function Jh(){let e=m.useContext(qh);if(!e)throw Error(sa(46));return e}var Yh=m.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:h=!1,disableAnchorTracking:g=!1,collisionAvoidance:_=Xo,...v}=e,{store:y}=Ih(),b=Gh(),x=zo(),S=y.useState(`floatingRootContext`),C=y.useState(`mounted`),w=y.useState(`open`),T=y.useState(`openChangeReason`),E=y.useState(`activeTriggerElement`),D=y.useState(`modal`),O=y.useState(`positionerElement`),k=y.useState(`instantType`),A=y.useState(`transitionStatus`),j=y.useState(`hasViewport`),M=m.useRef(null),N=Xc(O,!1,!1),P=xu({anchor:i,floatingRootContext:S,positionMethod:a,mounted:C,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:h,disableAnchorTracking:g,keepMounted:b,nodeId:x,collisionAvoidance:_,adaptiveOrigin:j?vu:void 0}),F=m.useMemo(()=>{let e={};return w||(e.pointerEvents=`none`),{role:`presentation`,hidden:!C,style:{...P.positionerStyles,...e}}},[w,C,P.positionerStyles]),I=m.useMemo(()=>({props:F,...P}),[F,P]),L=S.useState(`domReferenceElement`);q(()=>{let e=L,t=M.current;if(e&&(M.current=e),t&&e&&e!==t){y.set(`instantType`,void 0);let e=new AbortController;return N(()=>{y.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[L,N,y]);let R={open:w,side:I.side,align:I.align,anchorHidden:I.anchorHidden,instant:k},z=m.useCallback(e=>{y.set(`positionerElement`,e)},[y]),B=X(`div`,e,{state:R,props:[I.props,Cu(A),v],ref:[t,z],stateAttributesMapping:$l});return(0,p.jsxs)(qh.Provider,{value:I,children:[C&&D===!0&&T!==es&&(0,p.jsx)(Jf,{ref:y.context.internalBackdropRef,inert:ku(!w),cutout:E}),(0,p.jsx)(Bo,{id:x,children:B})]})}),Xh={...$l,...Yc},Zh=m.forwardRef(function(e,t){let{className:n,render:r,initialFocus:i,finalFocus:a,...o}=e,{store:s}=Ih(),c=Jh(),l=Zp(!0)!=null,u=s.useState(`open`),d=s.useState(`openMethod`),f=s.useState(`instantType`),h=s.useState(`transitionStatus`),g=s.useState(`popupProps`),_=s.useState(`titleElementId`),v=s.useState(`descriptionElementId`),y=s.useState(`modal`),b=s.useState(`mounted`),x=s.useState(`openChangeReason`),S=s.useState(`activeTriggerElement`),C=s.useState(`floatingRootContext`);Zc({open:u,ref:s.context.popupRef,onComplete(){u&&s.context.onOpenChangeComplete?.(!0)}});let w=s.useState(`disabled`),T=s.useState(`openOnHover`),E=s.useState(`closeDelay`);vl(C,{enabled:T&&!w,closeDelay:E});function D(e){return e!==`touch`||s.context.popupRef.current}let O=i===void 0?D:i,k={open:u,side:c.side,align:c.align,instant:f,transitionStatus:h},A=m.useCallback(e=>{s.set(`popupElement`,e)},[s]),j=X(`div`,e,{state:k,ref:[t,s.context.popupRef,A],props:[g,{"aria-labelledby":_,"aria-describedby":v,onKeyDown(e){l&&gp.has(e.key)&&e.stopPropagation()}},Cu(h),o],stateAttributesMapping:Xh});return(0,p.jsx)(Dc,{context:C,openInteractionType:d,modal:y===`trap-focus`,disabled:!b||x===es,initialFocus:O,returnFocus:a,restoreFocus:`popup`,previousFocusableElement:Mt(S)?S:void 0,nextFocusableElement:s.context.triggerFocusTargetRef,beforeContentFocusGuardRef:s.context.beforeContentFocusGuardRef,children:j})}),Qh=m.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:a}=Ih(),o=a.useState(`open`),{arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=Jh();return X(`div`,e,{state:{open:o,side:c,align:l,uncentered:u},ref:[t,s],props:[{style:d,"aria-hidden":!0},i],stateAttributesMapping:$l})}),$h={...$l,...Yc},eg=m.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:a}=Ih(),o=a.useState(`open`),s=a.useState(`mounted`),c=a.useState(`transitionStatus`),l=a.useState(`openChangeReason`);return X(`div`,e,{state:{open:o,transitionStatus:c},ref:[a.context.backdropRef,t],props:[{role:`presentation`,hidden:!s,style:{pointerEvents:l===es?`none`:void 0,userSelect:`none`,WebkitUserSelect:`none`}},i],stateAttributesMapping:$h})}),tg=m.forwardRef(function(e,t){let{render:n,className:r,...i}=e,{store:a}=Ih(),o=eu(i.id);return q(()=>(a.set(`titleElementId`,o),()=>{a.set(`titleElementId`,void 0)}),[a,o]),X(`h2`,e,{ref:t,props:[{id:o},i]})}),ng=m.forwardRef(function(e,t){let{render:n,className:r,...i}=e,{store:a}=Ih(),o=eu(i.id);return q(()=>(a.set(`descriptionElementId`,o),()=>{a.set(`descriptionElementId`,void 0)}),[a,o]),X(`p`,e,{ref:t,props:[{id:o},i]})}),rg=m.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,...o}=e,{buttonRef:s,getButtonProps:c}=Dd({disabled:i,focusableWhenDisabled:!1,native:a}),{store:l}=Ih();return X(`button`,e,{ref:[t,s],props:[{onClick(e){l.setOpen(!1,Y(is,e.nativeEvent,e.currentTarget))}},o,c]})}),ig=(function(e){return e.popupWidth=`--popup-width`,e.popupHeight=`--popup-height`,e})({}),ag={activationDirection:e=>e?{"data-activation-direction":e}:null},og=m.forwardRef(function(e,t){let{render:n,className:r,children:i,...a}=e,{store:o}=Ih(),{side:s}=Jh(),c=o.useState(`instantType`),{children:l,state:u}=zu({store:o,side:s,cssVars:ig,children:i});return X(`div`,e,{state:{activationDirection:u.activationDirection,transitioning:u.transitioning,instant:c},ref:t,props:[a,{children:l}],stateAttributesMapping:ag})}),sg=class{constructor(){this.store=new zh}open(e){let t=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!t)throw Error(sa(80,e));this.store.setOpen(!0,Y(ds,void 0,t))}close(){this.store.setOpen(!1,Y(ds,void 0,void 0))}get isOpen(){return this.store.state.open}};function cg(){return new sg}var lg=Object.freeze(Object.defineProperty({__proto__:null,Arrow:Qh,Backdrop:eg,Close:rg,Description:ng,Handle:sg,Popup:Zh,Portal:Kh,Positioner:Yh,Root:Vh,Title:tg,Trigger:Uh,Viewport:og,createHandle:cg},Symbol.toStringTag,{value:`Module`}));({...Yc,...Xu});function ug(e){let{open:t,defaultOpen:n,onOpenChange:r,disabled:i}=e,a=t!==void 0,[o,s]=md({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:c,setMounted:l,transitionStatus:u}=Gc(o,!0,!0),[d,f]=m.useState(o),[{height:p,width:h},g]=m.useState({height:void 0,width:void 0}),_=eu(),[v,y]=m.useState(),b=v??_,[x,S]=m.useState(!1),[C,w]=m.useState(!1),T=m.useRef(null),E=m.useRef(null),D=m.useRef(null),O=m.useRef(null),k=Xc(O,!1),A=J(e=>{let t=!o,n=Y($o,e.nativeEvent);if(r(t,n),n.isCanceled)return;let i=O.current;E.current===`css-animation`&&i!=null&&i.style.removeProperty(`animation-name`),!x&&!C&&(E.current!=null&&E.current!==`css-animation`&&!c&&t&&l(!0),E.current===`css-animation`&&(!d&&t&&f(!0),!c&&t&&l(!0))),s(t),E.current===`none`&&c&&!t&&l(!1)});return q(()=>{a&&E.current===`none`&&!C&&!o&&l(!1)},[a,C,o,t,l]),m.useMemo(()=>({abortControllerRef:T,animationTypeRef:E,disabled:i,handleTrigger:A,height:p,mounted:c,open:o,panelId:b,panelRef:O,runOnceAnimationsFinish:k,setDimensions:g,setHiddenUntilFound:S,setKeepMounted:w,setMounted:l,setOpen:s,setPanelIdState:y,setVisible:f,transitionDimensionRef:D,transitionStatus:u,visible:d,width:h}),[T,E,i,A,p,c,o,b,O,k,g,S,w,l,s,f,D,u,d,h])}var dg=m.createContext(void 0);function fg(){let e=m.useContext(dg);if(e===void 0)throw Error(sa(15));return e}var pg=(function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=Kc.startingStyle]=`startingStyle`,e[e.endingStyle=Kc.endingStyle]=`endingStyle`,e})({}),mg=(function(e){return e.panelOpen=`data-panel-open`,e})({}),hg={[pg.open]:``},gg={[pg.closed]:``},_g={open(e){return e?{[mg.panelOpen]:``}:null}},vg={open(e){return e?hg:gg}},yg={...vg,...Yc},bg=m.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:o,open:s,...c}=e,l=J(o),u=ug({open:s,defaultOpen:i,onOpenChange:l,disabled:a}),d=m.useMemo(()=>({open:u.open,disabled:u.disabled,transitionStatus:u.transitionStatus}),[u.open,u.disabled,u.transitionStatus]),f=m.useMemo(()=>({...u,onOpenChange:l,state:d}),[u,l,d]),h=X(`div`,e,{state:d,ref:t,props:c,stateAttributesMapping:yg});return(0,p.jsx)(dg.Provider,{value:f,children:h})}),xg={..._g,...Yc},Sg=m.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=fg(),{className:s,disabled:c=o,id:l,render:u,nativeButton:d=!0,...f}=e,{getButtonProps:p,buttonRef:h}=Dd({disabled:c,focusableWhenDisabled:!0,native:d}),g=m.useMemo(()=>({"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i}),[n,r,i]);return X(`button`,e,{state:a,ref:[t,h],props:[g,f,p],stateAttributesMapping:xg})}),Cg=(function(e){return e.disabled=`data-disabled`,e.orientation=`data-orientation`,e})({});function wg(e){let{abortControllerRef:t,animationTypeRef:n,externalRef:r,height:i,hiddenUntilFound:a,keepMounted:o,id:s,mounted:c,onOpenChange:l,open:u,panelRef:d,runOnceAnimationsFinish:f,setDimensions:p,setMounted:h,setOpen:g,setVisible:_,transitionDimensionRef:v,visible:y,width:b}=e,x=m.useRef(!1),S=m.useRef(null),C=m.useRef(u),w=m.useRef(u),T=As(),E=m.useMemo(()=>n.current===`css-animation`?!y:!u&&!c,[u,c,y,n]),D=vs(r,d,J(e=>{if(!e)return;if(n.current==null||v.current==null){let t=getComputedStyle(e),r=t.animationName!==`none`&&t.animationName!==``,i=t.transitionDuration!==`0s`&&t.transitionDuration!==``;r&&i||(t.animationName===`none`&&t.transitionDuration!==`0s`?n.current=`css-transition`:t.animationName!==`none`&&t.transitionDuration===`0s`?n.current=`css-animation`:n.current=`none`),e.getAttribute(Cg.orientation)===`horizontal`||t.transitionProperty.indexOf(`width`)>-1?v.current=`width`:v.current=`height`}if(n.current!==`css-transition`)return;(i===void 0||b===void 0)&&(p({height:e.scrollHeight,width:e.scrollWidth}),w.current&&e.style.setProperty(`transition-duration`,`0s`));let t=-1,r=-1;return t=ks.request(()=>{w.current=!1,r=ks.request(()=>{setTimeout(()=>{e.style.removeProperty(`transition-duration`)})})}),()=>{ks.cancel(t),ks.cancel(r)}}));return q(()=>{if(n.current!==`css-transition`)return;let e=d.current;if(!e)return;let r=-1;if(t.current!=null&&(t.current.abort(),t.current=null),u){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)}),!w.current&&!o&&e.setAttribute(pg.startingStyle,``),p({height:e.scrollHeight,width:e.scrollWidth}),r=ks.request(()=>{Object.entries(t).forEach(([t,n])=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)})})}else{if(e.scrollHeight===0&&e.scrollWidth===0)return;p({height:e.scrollHeight,width:e.scrollWidth});let n=new AbortController;t.current=n;let r=n.signal,i=null,a=pg.endingStyle;return i=new MutationObserver(o=>{o.some(e=>e.type===`attributes`&&e.attributeName===a)&&(i?.disconnect(),i=null,f(()=>{p({height:0,width:0}),e.style.removeProperty(`content-visibility`),h(!1),t.current===n&&(t.current=null)},r))}),i.observe(e,{attributes:!0,attributeFilter:[a]}),()=>{i?.disconnect(),T.cancel(),t.current===n&&(n.abort(),t.current=null)}}return()=>{ks.cancel(r)}},[t,n,T,a,o,c,u,d,f,p,h]),q(()=>{if(n.current!==`css-animation`)return;let e=d.current;e&&(S.current=e.style.animationName||S.current,e.style.setProperty(`animation-name`,`none`),p({height:e.scrollHeight,width:e.scrollWidth}),!C.current&&!x.current&&e.style.removeProperty(`animation-name`),u?(t.current!=null&&(t.current.abort(),t.current=null),h(!0),_(!0)):(t.current=new AbortController,f(()=>{h(!1),_(!1),t.current=null},t.current.signal)))},[t,n,u,d,f,p,h,_,y]),da(()=>{let e=ks.request(()=>{C.current=!1});return()=>ks.cancel(e)}),q(()=>{if(!a)return;let e=d.current;if(!e)return;let t=-1,n=-1;return u&&x.current&&(e.style.transitionDuration=`0s`,p({height:e.scrollHeight,width:e.scrollWidth}),t=ks.request(()=>{x.current=!1,n=ks.request(()=>{setTimeout(()=>{e.style.removeProperty(`transition-duration`)})})})),()=>{ks.cancel(t),ks.cancel(n)}},[a,u,d,p]),q(()=>{let e=d.current;e&&a&&E&&(e.setAttribute(`hidden`,`until-found`),n.current===`css-transition`&&e.setAttribute(pg.startingStyle,``))},[a,E,n,d]),m.useEffect(function(){let e=d.current;if(!e)return;function t(e){x.current=!0,g(!0),l(!0,Y(Qo,e))}return e.addEventListener(`beforematch`,t),()=>{e.removeEventListener(`beforematch`,t)}},[l,d,g]),m.useMemo(()=>({props:{hidden:E,id:s,ref:D}}),[E,s,D])}var Tg=(function(e){return e.collapsiblePanelHeight=`--collapsible-panel-height`,e.collapsiblePanelWidth=`--collapsible-panel-width`,e})({}),Eg=m.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:o,...s}=e,{abortControllerRef:c,animationTypeRef:l,height:u,mounted:d,onOpenChange:f,open:p,panelId:h,panelRef:g,runOnceAnimationsFinish:_,setDimensions:v,setHiddenUntilFound:y,setKeepMounted:b,setMounted:x,setPanelIdState:S,setOpen:C,setVisible:w,state:T,transitionDimensionRef:E,visible:D,width:O,transitionStatus:k}=fg(),A=r??!1,j=i??!1;q(()=>{if(o)return S(o),()=>{S(void 0)}},[o,S]),q(()=>{y(A)},[y,A]),q(()=>{b(j)},[b,j]);let{props:M}=wg({abortControllerRef:c,animationTypeRef:l,externalRef:t,height:u,hiddenUntilFound:A,id:h,keepMounted:j,mounted:d,onOpenChange:f,open:p,panelRef:g,runOnceAnimationsFinish:_,setDimensions:v,setMounted:x,setOpen:C,setVisible:w,transitionDimensionRef:E,visible:D,width:O});Zc({open:p&&k===`idle`,ref:g,onComplete(){p&&v({height:void 0,width:void 0})}});let N=X(`div`,e,{state:m.useMemo(()=>({...T,transitionStatus:k}),[T,k]),ref:[t,g],props:[M,{style:{[Tg.collapsiblePanelHeight]:u===void 0?`auto`:`${u}px`,[Tg.collapsiblePanelWidth]:O===void 0?`auto`:`${O}px`}},s],stateAttributesMapping:yg});return j||A||!j&&d?N:null});({...vg}),{...Yc};var Dg={imageLoadingStatus:()=>null};({...Dg,...Yc}),{...Dg,...Yc},{...$l,...Yc},{...$l,...Yc},{...$l,...Yc},rl(),rl(),{...$l,...Yc},{...$l,...Yc};var Og={inputValue:()=>null,value:()=>null,...Xu},kg=[`零`,`〇`,`一`,`二`,`三`,`四`,`五`,`六`,`七`,`八`,`九`],Ag=[`٠`,`١`,`٢`,`٣`,`٤`,`٥`,`٦`,`٧`,`٨`,`٩`],jg=[`۰`,`۱`,`۲`,`۳`,`۴`,`۵`,`۶`,`۷`,`۸`,`۹`],Mg=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],Ng=[`%`,`٪`,`%`,`﹪`],Pg=[`‰`,`؉`],Fg=[`−`,`-`,`‒`,`–`,`—`,`﹣`],Ig=[`+`,`﹢`];RegExp(`[${Ag.join(``)}]`,`g`),RegExp(`[${jg.join(``)}]`,`g`),RegExp(`[${Mg.join(``)}]`,`g`),RegExp(`[${kg.join(``)}]`,`g`),RegExp(`[${Ng.join(``)}]`),RegExp(`[${Pg.join(``)}]`),RegExp(`[${Mg.join(``)}]`),[...Ig],[...Fg];var Lg=e=>e.replace(/[-\\\]^]/g,e=>`\\${e}`),Rg=e=>`[${e.map(Lg).join(``)}]`,zg=Rg([`-`].concat(Fg)),Bg=Rg([`+`].concat(Ig));new RegExp(zg,`gu`),new RegExp(Bg,`gu`),new RegExp(zg),new RegExp(Bg),{...Xu,...Og},{...ol},Z(e=>e.instantType),Z(e=>e.hasViewport),{...$l,...Yc},{...$l,...Yc},{...Xu};var Vg=Ou;function Hg({content:e,children:t,align:n,asChild:r,side:i,className:a,container:o,closeDelay:s,delay:c,...l}){let u=Tt(),d=o??u??void 0;return(0,p.jsxs)(Hl,{...l,children:[(0,p.jsx)(au,{closeDelay:s,delay:c,className:mt(!r&&`inline-flex items-center bg-transparent border-none shadow-none p-0 m-0 h-auto min-h-0 leading-[0]`,a),render:r?t:void 0,children:r?void 0:t}),(0,p.jsx)(lu,{container:d,children:(0,p.jsx)(wu,{align:n,side:i,sideOffset:10,children:(0,p.jsxs)(Eu,{className:mt(`flex origin-[var(--transform-origin)] flex-col rounded-md bg-kumo-base px-2.5 py-1.5 text-sm text-kumo-default`,`shadow-lg shadow-kumo-tip-shadow outline outline-kumo-fill`,`transition-[transform,opacity] duration-150`,`data-[starting-style]:scale-90 data-[starting-style]:opacity-0`,`data-[ending-style]:scale-90 data-[ending-style]:opacity-0`,`data-[instant]:duration-0`,`kumo-tooltip-popup`),children:[(0,p.jsx)(Du,{className:mt(`flex`,`data-[side=bottom]:top-[-8px]`,`data-[side=left]:right-[-13px] data-[side=left]:rotate-90`,`data-[side=right]:left-[-13px] data-[side=right]:-rotate-90`,`data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180`),children:(0,p.jsx)(Ug,{})}),e]})})})]})}function Ug(e){return(0,p.jsxs)(`svg`,{width:`20`,height:`10`,viewBox:`0 0 20 10`,fill:`none`,...e,children:[(0,p.jsx)(`path`,{d:`M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z`,className:`fill-kumo-base`}),(0,p.jsx)(`path`,{d:`M8.99542 1.85876C9.75604 1.17425 10.9106 1.17422 11.6713 1.85878L16.5281 6.22989C17.0789 6.72568 17.7938 7.00001 18.5349 7.00001L15.89 7L11.0023 2.60207C10.622 2.2598 10.0447 2.2598 9.66436 2.60207L4.77734 7L2.13171 7.00001C2.87284 7.00001 3.58774 6.72568 4.13861 6.22989L8.99542 1.85876Z`,className:`fill-kumo-tip-shadow`}),(0,p.jsx)(`path`,{d:`M10.3333 3.34539L5.47654 7.71648C4.55842 8.54279 3.36693 9 2.13172 9H0V8H2.13172C3.11989 8 4.07308 7.63423 4.80758 6.97318L9.66437 2.60207C10.0447 2.25979 10.622 2.2598 11.0023 2.60207L15.8591 6.97318C16.5936 7.63423 17.5468 8 18.5349 8H20V9H18.5349C17.2998 9 16.1083 8.54278 15.1901 7.71648L10.3333 3.34539Z`,className:`fill-kumo-tip-stroke`})]})}var Wg=(0,m.forwardRef)(function({to:e,href:t,...n},r){return(0,p.jsx)(`a`,{ref:r,href:t??e??void 0,...n})}),Gg=(0,m.createContext)(Wg);function Kg(){return(0,m.useContext)(Gg)}var qg={shape:{base:{classes:``,description:`Default rectangular button shape`},square:{classes:`items-center justify-center p-0`,description:`Square button for icon-only actions`},circle:{classes:`items-center justify-center p-0 rounded-full`,description:`Circular button for icon-only actions`}},size:{xs:{classes:`h-5 gap-1 rounded-sm px-1.5 text-xs`,description:`Extra small button for compact UIs`},sm:{classes:`h-6.5 gap-1 rounded-md px-2 text-xs`,description:`Small button for secondary actions`},base:{classes:`h-9 gap-1.5 rounded-lg px-3 text-base`,description:`Default button size`},lg:{classes:`h-10 gap-2 rounded-lg px-4 text-base`,description:`Large button for primary CTAs`}},compactSize:{xs:{classes:`size-3.5`},sm:{classes:`size-6.5`},base:{classes:`size-9`},lg:{classes:`size-10`}},variant:{primary:{classes:`bg-kumo-brand !text-white hover:bg-kumo-brand-hover focus:bg-kumo-brand-hover disabled:bg-kumo-brand/50`,description:`High-emphasis button for primary actions`},secondary:{classes:`bg-kumo-base !text-kumo-default ring not-disabled:hover:border-secondary! not-disabled:hover:bg-kumo-tint disabled:bg-kumo-base/50 disabled:!text-kumo-default/70 ring-kumo-hairline data-[state=open]:bg-kumo-base`,description:`Default button style for most actions`},ghost:{classes:`text-kumo-default hover:bg-kumo-tint shadow-none bg-inherit`,description:`Minimal button with no background`},destructive:{classes:`bg-kumo-danger !text-white hover:bg-kumo-danger/70`,description:`Danger button for destructive actions like delete`},"secondary-destructive":{classes:`bg-kumo-base !text-kumo-danger ring not-disabled:hover:border-secondary! not-disabled:hover:bg-kumo-base disabled:bg-kumo-base/50 disabled:!text-kumo-danger/70 ring-kumo-line data-[state=open]:bg-kumo-base`,description:`Secondary button with destructive text for less prominent dangerous actions`},outline:{classes:`bg-transparent text-kumo-default ring ring-kumo-hairline`,description:`Bordered button with transparent background`}}},Jg={shape:`base`,size:`base`,variant:`secondary`};function Yg({variant:e=Jg.variant,size:t=Jg.size,shape:n=Jg.shape}={}){let r=n===`square`||n===`circle`;return mt(`group flex w-max shrink-0 items-center font-medium select-none`,`border-0 shadow-xs`,`cursor-pointer`,`disabled:cursor-not-allowed disabled:text-kumo-subtle`,qg.variant[e].classes,qg.size[t].classes,qg.shape[n].classes,r&&qg.compactSize[t].classes)}var Xg=e=>e?m.isValidElement(e)?e:(0,p.jsx)(e,{}):null,Zg=m.forwardRef(({children:e,className:t,disabled:n,loading:r,shape:i=`base`,size:a=`base`,variant:o=`secondary`,icon:s,title:c,...l},u)=>{let{type:d,...f}=l,m=(0,p.jsxs)(`button`,{ref:u,className:mt(Yg({variant:o,size:a,shape:i}),`focus:opacity-100 focus-visible:ring-1 focus-visible:ring-kumo-hairline *:in-focus:opacity-100`,n&&`cursor-not-allowed opacity-50`,t),disabled:r||n,type:d??`button`,...f,children:[r&&(0,p.jsx)(Ct,{size:a===`lg`?16:14}),!r&&Xg(s),e]});return c?(0,p.jsx)(Hg,{content:c,asChild:!0,children:m}):m});Zg.displayName=`Button`;var Qg=({"aria-label":e=`Refresh`,loading:t,...n})=>(0,p.jsx)(Zg,{shape:`square`,"aria-label":e,...n,children:(0,p.jsx)(yt,{className:mt({"animate-refresh":t,"size-4.5":n.size===`base`||!n.size,"size-4":n.size===`sm`,"size-5":n.size===`lg`})})}),$g=m.forwardRef(({children:e,className:t,external:n,href:r,shape:i=`base`,size:a=`base`,variant:o=`ghost`,icon:s,...c},l)=>{let u=Kg(),d=n?{target:`_blank`,rel:`noopener noreferrer`}:{};return(0,p.jsxs)(u,{ref:l,className:mt(Yg({variant:o,size:a,shape:i}),`flex items-center no-underline!`,t),href:r,to:typeof r==`string`?r:void 0,...d,...c,children:[Xg(s),e]})});$g.displayName=`LinkButton`;export{Zs as $,hf as A,Eh as At,Tm as B,_t as Bt,yp as C,sf as Ct,Kh as D,Rd as Dt,au as E,Bm as Et,wu as F,pd as Ft,Zm as G,h as Gt,Ou as H,F as Ht,Qh as I,bg as It,uf as J,lf as K,g as Kt,_f as L,Tt as Lt,Mh as M,Om as Mt,qu as N,Dh as Nt,lu as O,fh as Ot,Nm as P,Op as Pt,Rm as Q,ld as R,Ct as Rt,Hp as S,Yd as St,wp as T,Kp as Tt,ng as U,P as Ut,rp as V,mt as Vt,vm as W,x as Wt,hh as X,om as Y,mf as Z,Hl as _,qd as _t,Kg as a,Eg as at,ff as b,Yp as bt,tp as c,sh as ct,Ku as d,vh as dt,Nd as et,Zh as f,Vh as ft,fd as g,Jp as gt,vp as h,Vm as ht,Yg as i,Oh as it,Up as j,Ld as jt,Yh as k,Dp as kt,ym as l,df as lt,rg as m,qp as mt,Qg as n,$p as nt,Vg as o,tg as ot,gf as p,Ep as pt,nm as q,_ as qt,Zg as r,cf as rt,Hg as s,rm as st,$g as t,gh as tt,Eu as u,um as ut,Uh as v,lm as vt,Sg as w,Tp as wt,lg as x,Um as xt,Zf as y,np as yt,ud as z,vt as zt};