@apollosproject/canvas-embeds 2.1.730 → 2.1.731

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/widget/index.js +1 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@apollosproject/canvas-embeds",
3
3
  "description": "Apollos React embed widgets",
4
- "version": "2.1.730",
4
+ "version": "2.1.731",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.umd.js",
7
7
  "module": "./dist/index.es.js",
package/widget/index.js CHANGED
@@ -280,7 +280,7 @@ Url: ${Fg(t)}`),!0)}function yN0(t,a){return t.type||!a||!a.length?!1:FN0(t).som
280
280
  `+('Please change the parent <Route path="'+S+'"> to <Route ')+('path="'+(S==="/"?"*":S+"/*")+'">.'))}let f=D5(),v;v=f;let Z=v.pathname||"/",H=Z;if(d!=="/"){let S=d.replace(/^\//,"").split("/");H="/"+Z.replace(/^\//,"").split("/").slice(S.length).join("/")}let V=x5(t,{pathname:H});return $2.NODE_ENV!=="production"&&($2.NODE_ENV!=="production"&&Gt(h||V!=null,'No routes matched location "'+v.pathname+v.search+v.hash+'" '),$2.NODE_ENV!=="production"&&Gt(V==null||V[V.length-1].route.element!==void 0||V[V.length-1].route.Component!==void 0||V[V.length-1].route.lazy!==void 0,'Matched leaf route at location "'+v.pathname+v.search+v.hash+'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.')),G$0(V&&V.map(S=>Object.assign({},S,{params:Object.assign({},c,S.params),pathname:ol([d,l.encodeLocation?l.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?d:ol([d,l.encodeLocation?l.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),o,n,r)}function U$0(){let t=_50(),a=$g(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},i=null;return $2.NODE_ENV!=="production"&&(console.error("Error handled by React Router default ErrorBoundary:",t),i=e.createElement(e.Fragment,null,e.createElement("p",null,"💿 Hey developer 👋"),e.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",e.createElement("code",{style:o},"ErrorBoundary")," or"," ",e.createElement("code",{style:o},"errorElement")," prop on your route."))),e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},a),n?e.createElement("pre",{style:l},n):null,i)}const B$0=e.createElement(U$0,null);class q$0 extends e.Component{constructor(a){super(a),this.state={location:a.location,revalidation:a.revalidation,error:a.error}}static getDerivedStateFromError(a){return{error:a}}static getDerivedStateFromProps(a,n){return n.location!==a.location||n.revalidation!=="idle"&&a.revalidation==="idle"?{error:a.error,location:a.location,revalidation:a.revalidation}:{error:a.error!==void 0?a.error:n.error,location:n.location,revalidation:a.revalidation||n.revalidation}}componentDidCatch(a,n){console.error("React Router caught the following error during render",a,n)}render(){return this.state.error!==void 0?e.createElement(il.Provider,{value:this.props.routeContext},e.createElement(OL.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function W$0(t){let{routeContext:a,match:n,children:r}=t,l=e.useContext(Ms);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),e.createElement(il.Provider,{value:a},r)}function G$0(t,a,n,r){var l;if(a===void 0&&(a=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var o;if(!n)return null;if(n.errors)t=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&a.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let i=t,c=(l=n)==null?void 0:l.errors;if(c!=null){let h=i.findIndex(f=>f.route.id&&(c==null?void 0:c[f.route.id])!==void 0);h>=0||($2.NODE_ENV!=="production"?ke(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(c).join(",")):ke(!1)),i=i.slice(0,Math.min(i.length,h+1))}let u=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let h=0;h<i.length;h++){let f=i[h];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(d=h),f.route.id){let{loaderData:v,errors:Z}=n,H=f.route.loader&&v[f.route.id]===void 0&&(!Z||Z[f.route.id]===void 0);if(f.route.lazy||H){u=!0,d>=0?i=i.slice(0,d+1):i=[i[0]];break}}}return i.reduceRight((h,f,v)=>{let Z,H=!1,V=null,b=null;n&&(Z=c&&f.route.id?c[f.route.id]:void 0,V=f.route.errorElement||B$0,u&&(d<0&&v===0?(w50("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),H=!0,b=null):d===v&&(H=!0,b=f.route.hydrateFallbackElement||null)));let S=a.concat(i.slice(0,v+1)),F=()=>{let w;return Z?w=V:H?w=b:f.route.Component?w=e.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=h,e.createElement(W$0,{match:f,routeContext:{outlet:h,matches:S,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||v===0)?e.createElement(q$0,{location:n.location,revalidation:n.revalidation,component:V,error:Z,children:F(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):F()},null)}var F50=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(F50||{}),fd=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(fd||{});function xL(t){return t+" must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router."}function Y$0(t){let a=e.useContext(Ms);return a||($2.NODE_ENV!=="production"?ke(!1,xL(t)):ke(!1)),a}function Q$0(t){let a=e.useContext(Og);return a||($2.NODE_ENV!=="production"?ke(!1,xL(t)):ke(!1)),a}function K$0(t){let a=e.useContext(il);return a||($2.NODE_ENV!=="production"?ke(!1,xL(t)):ke(!1)),a}function jL(t){let a=K$0(t),n=a.matches[a.matches.length-1];return n.route.id||($2.NODE_ENV!=="production"?ke(!1,t+' can only be used on routes that contain a unique "id"'):ke(!1)),n.route.id}function X$0(){return jL(fd.UseRouteId)}function _50(){var t;let a=e.useContext(OL),n=Q$0(fd.UseRouteError),r=jL(fd.UseRouteError);return a!==void 0?a:(t=n.errors)==null?void 0:t[r]}function J$0(){let{router:t}=Y$0(F50.UseNavigateStable),a=jL(fd.UseNavigateStable),n=e.useRef(!1);return S50(()=>{n.current=!0}),e.useCallback(function(l,o){o===void 0&&(o={}),$2.NODE_ENV!=="production"&&Gt(n.current,L50),n.current&&(typeof l=="number"?t.navigate(l):t.navigate(l,Ig({fromRouteId:a},o)))},[t,a])}const k50={};function w50(t,a,n){!a&&!k50[t]&&(k50[t]=!0,$2.NODE_ENV!=="production"&&Gt(!1,n))}const C50={};function eT0(t,a){C50[a]||(C50[a]=!0,console.warn(a))}const Es=(t,a,n)=>eT0(t,"⚠️ React Router Future Flag Warning: "+a+". "+("You can use the `"+t+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function tT0(t,a){t!=null&&t.v7_startTransition||Es("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),!(t!=null&&t.v7_relativeSplatPath)&&(!a||!a.v7_relativeSplatPath)&&Es("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),a&&(a.v7_fetcherPersist||Es("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),a.v7_normalizeFormMethod||Es("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),a.v7_partialHydration||Es("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),a.v7_skipActionErrorRevalidation||Es("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}function aT0(t){let{basename:a="/",children:n=null,location:r,navigationType:l=Ct.Pop,navigator:o,static:i=!1,future:c}=t;hd()&&($2.NODE_ENV!=="production"?ke(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):ke(!1));let u=a.replace(/^\/*/,"/"),d=e.useMemo(()=>({basename:u,navigator:o,static:i,future:Ig({v7_relativeSplatPath:!1},c)}),[u,c,o,i]);typeof r=="string"&&(r=jo(r));let{pathname:h="/",search:f="",hash:v="",state:Z=null,key:H="default"}=r,V=e.useMemo(()=>{let b=nr(h,u);return b==null?null:{location:{pathname:b,search:f,hash:v,state:Z,key:H},navigationType:l}},[u,h,f,v,Z,H,l]);return $2.NODE_ENV!=="production"&&Gt(V!=null,'<Router basename="'+u+'"> is not able to match the URL '+('"'+h+f+v+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),V==null?null:e.createElement(lr.Provider,{value:d},e.createElement(xg.Provider,{children:n,value:V}))}new Promise(()=>{});function nT0(t){let a={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&($2.NODE_ENV!=="production"&&t.element&&$2.NODE_ENV!=="production"&&Gt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(a,{element:e.createElement(t.Component),Component:void 0})),t.HydrateFallback&&($2.NODE_ENV!=="production"&&t.hydrateFallbackElement&&$2.NODE_ENV!=="production"&&Gt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(a,{hydrateFallbackElement:e.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&($2.NODE_ENV!=="production"&&t.errorElement&&$2.NODE_ENV!=="production"&&Gt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(a,{errorElement:e.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),a}var An={};function zo(){return zo=Object.assign?Object.assign.bind():function(t){for(var a=1;a<arguments.length;a++){var n=arguments[a];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},zo.apply(this,arguments)}function RL(t,a){if(t==null)return{};var n={},r=Object.keys(t),l,o;for(o=0;o<r.length;o++)l=r[o],!(a.indexOf(l)>=0)&&(n[l]=t[l]);return n}const Rg="get",Dg="application/x-www-form-urlencoded";function zg(t){return t!=null&&typeof t.tagName=="string"}function rT0(t){return zg(t)&&t.tagName.toLowerCase()==="button"}function lT0(t){return zg(t)&&t.tagName.toLowerCase()==="form"}function oT0(t){return zg(t)&&t.tagName.toLowerCase()==="input"}function iT0(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function cT0(t,a){return t.button===0&&(!a||a==="_self")&&!iT0(t)}function DL(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((a,n)=>{let r=t[n];return a.concat(Array.isArray(r)?r.map(l=>[n,l]):[[n,r]])},[]))}function sT0(t,a){let n=DL(t);return a&&a.forEach((r,l)=>{n.has(l)||a.getAll(l).forEach(o=>{n.append(l,o)})}),n}let Ug=null;function uT0(){if(Ug===null)try{new FormData(document.createElement("form"),0),Ug=!1}catch{Ug=!0}return Ug}const mT0=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function zL(t){return t!=null&&!mT0.has(t)?(An.NODE_ENV!=="production"&&Gt(!1,'"'+t+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+Dg+'"')),null):t}function dT0(t,a){let n,r,l,o,i;if(lT0(t)){let c=t.getAttribute("action");r=c?nr(c,a):null,n=t.getAttribute("method")||Rg,l=zL(t.getAttribute("enctype"))||Dg,o=new FormData(t)}else if(rT0(t)||oT0(t)&&(t.type==="submit"||t.type==="image")){let c=t.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=t.getAttribute("formaction")||c.getAttribute("action");if(r=u?nr(u,a):null,n=t.getAttribute("formmethod")||c.getAttribute("method")||Rg,l=zL(t.getAttribute("formenctype"))||zL(c.getAttribute("enctype"))||Dg,o=new FormData(c,t),!uT0()){let{name:d,type:h,value:f}=t;if(h==="image"){let v=d?d+".":"";o.append(v+"x","0"),o.append(v+"y","0")}else d&&o.append(d,f)}}else{if(zg(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Rg,r=null,l=Dg,i=t}return o&&l==="text/plain"&&(i=o,o=void 0),{action:r,method:n.toLowerCase(),encType:l,formData:o,body:i}}const hT0=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],pT0=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],fT0=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition"],vT0="6";try{window.__reactRouterVersion=vT0}catch{}function gT0(t,a){return Z$0({basename:void 0,future:zo({},void 0,{v7_prependBasename:!0}),history:zP0({window:void 0}),hydrationData:AT0(),routes:t,mapRouteProperties:nT0,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function AT0(){var t;let a=(t=window)==null?void 0:t.__staticRouterHydrationData;return a&&a.errors&&(a=zo({},a,{errors:ZT0(a.errors)})),a}function ZT0(t){if(!t)return null;let a=Object.entries(t),n={};for(let[r,l]of a)if(l&&l.__type==="RouteErrorResponse")n[r]=new Pg(l.status,l.statusText,l.data,l.internal===!0);else if(l&&l.__type==="Error"){if(l.__subType){let o=window[l.__subType];if(typeof o=="function")try{let i=new o(l.message);i.stack="",n[r]=i}catch{}}if(n[r]==null){let o=new Error(l.message);o.stack="",n[r]=o}}else n[r]=l;return n}const UL=e.createContext({isTransitioning:!1});An.NODE_ENV!=="production"&&(UL.displayName="ViewTransition");const N50=e.createContext(new Map);An.NODE_ENV!=="production"&&(N50.displayName="Fetchers");const P50=Wm["startTransition"],$50=uw0["flushSync"];function HT0(t){P50?P50(t):t()}function vd(t){$50?$50(t):t()}class MT0{constructor(){this.status="pending",this.promise=new Promise((a,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",a(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function ET0(t){let{fallbackElement:a,router:n,future:r}=t,[l,o]=e.useState(n.state),[i,c]=e.useState(),[u,d]=e.useState({isTransitioning:!1}),[h,f]=e.useState(),[v,Z]=e.useState(),[H,V]=e.useState(),b=e.useRef(new Map),{v7_startTransition:S}=r||{},F=e.useCallback(z=>{S?HT0(z):z()},[S]),w=e.useCallback((z,G)=>{let{deletedFetchers:R,flushSync:J,viewTransitionOpts:Y}=G;R.forEach(l0=>b.current.delete(l0)),z.fetchers.forEach((l0,X)=>{l0.data!==void 0&&b.current.set(X,l0.data)});let n0=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!Y||n0){J?vd(()=>o(z)):F(()=>o(z));return}if(J){vd(()=>{v&&(h&&h.resolve(),v.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation})});let l0=n.window.document.startViewTransition(()=>{vd(()=>o(z))});l0.finished.finally(()=>{vd(()=>{f(void 0),Z(void 0),c(void 0),d({isTransitioning:!1})})}),vd(()=>Z(l0));return}v?(h&&h.resolve(),v.skipTransition(),V({state:z,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation})):(c(z),d({isTransitioning:!0,flushSync:!1,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation}))},[n.window,v,h,b,F]);e.useLayoutEffect(()=>n.subscribe(w),[n,w]),e.useEffect(()=>{u.isTransitioning&&!u.flushSync&&f(new MT0)},[u]),e.useEffect(()=>{if(h&&i&&n.window){let z=i,G=h.promise,R=n.window.document.startViewTransition(async()=>{F(()=>o(z)),await G});R.finished.finally(()=>{f(void 0),Z(void 0),c(void 0),d({isTransitioning:!1})}),Z(R)}},[F,i,h,n.window]),e.useEffect(()=>{h&&i&&l.location.key===i.location.key&&h.resolve()},[h,v,l.location,i]),e.useEffect(()=>{!u.isTransitioning&&H&&(c(H.state),d({isTransitioning:!0,flushSync:!1,currentLocation:H.currentLocation,nextLocation:H.nextLocation}),V(void 0))},[u.isTransitioning,H]),e.useEffect(()=>{An.NODE_ENV!=="production"&&Gt(a==null||!n.future.v7_partialHydration,"`<RouterProvider fallbackElement>` is deprecated when using `v7_partialHydration`, use a `HydrateFallback` component instead")},[]);let $=e.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:z=>n.navigate(z),push:(z,G,R)=>n.navigate(z,{state:G,preventScrollReset:R==null?void 0:R.preventScrollReset}),replace:(z,G,R)=>n.navigate(z,{replace:!0,state:G,preventScrollReset:R==null?void 0:R.preventScrollReset})}),[n]),C=n.basename||"/",P=e.useMemo(()=>({router:n,navigator:$,static:!1,basename:C}),[n,$,C]),O=e.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return e.useEffect(()=>tT0(r,n.future),[r,n.future]),e.createElement(e.Fragment,null,e.createElement(Ms.Provider,{value:P},e.createElement(Og.Provider,{value:l},e.createElement(N50.Provider,{value:b.current},e.createElement(UL.Provider,{value:u},e.createElement(aT0,{basename:C,location:l.location,navigationType:l.historyAction,navigator:$,future:O},l.initialized||n.future.v7_partialHydration?e.createElement(VT0,{routes:n.routes,future:n.future,state:l}):a))))),null)}const VT0=e.memo(yT0);function yT0(t){let{routes:a,future:n,state:r}=t;return z$0(a,void 0,r,n)}const bT0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",LT0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,T50=e.forwardRef(function(a,n){let{onClick:r,relative:l,reloadDocument:o,replace:i,state:c,target:u,to:d,preventScrollReset:h,viewTransition:f}=a,v=RL(a,hT0),{basename:Z}=e.useContext(lr),H,V=!1;if(typeof d=="string"&&LT0.test(d)&&(H=d,bT0))try{let w=new URL(window.location.href),$=d.startsWith("//")?new URL(w.protocol+d):new URL(d),C=nr($.pathname,Z);$.origin===w.origin&&C!=null?d=C+$.search+$.hash:V=!0}catch{An.NODE_ENV!=="production"&&Gt(!1,'<Link to="'+d+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let b=j$0(d,{relative:l}),S=kT0(d,{replace:i,state:c,target:u,preventScrollReset:h,relative:l,viewTransition:f});function F(w){r&&r(w),w.defaultPrevented||S(w)}return e.createElement("a",zo({},v,{href:H||b,onClick:V||o?r:F,ref:n,target:u}))});An.NODE_ENV!=="production"&&(T50.displayName="Link");const ST0=e.forwardRef(function(a,n){let{"aria-current":r="page",caseSensitive:l=!1,className:o="",end:i=!1,style:c,to:u,viewTransition:d,children:h}=a,f=RL(a,pT0),v=pd(u,{relative:f.relative}),Z=D5(),H=e.useContext(Og),{navigator:V,basename:b}=e.useContext(lr),S=H!=null&&IT0(v)&&d===!0,F=V.encodeLocation?V.encodeLocation(v).pathname:v.pathname,w=Z.pathname,$=H&&H.navigation&&H.navigation.location?H.navigation.location.pathname:null;l||(w=w.toLowerCase(),$=$?$.toLowerCase():null,F=F.toLowerCase()),$&&b&&($=nr($,b)||$);const C=F!=="/"&&F.endsWith("/")?F.length-1:F.length;let P=w===F||!i&&w.startsWith(F)&&w.charAt(C)==="/",O=$!=null&&($===F||!i&&$.startsWith(F)&&$.charAt(F.length)==="/"),z={isActive:P,isPending:O,isTransitioning:S},G=P?r:void 0,R;typeof o=="function"?R=o(z):R=[o,P?"active":null,O?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let J=typeof c=="function"?c(z):c;return e.createElement(T50,zo({},f,{"aria-current":G,className:R,ref:n,style:J,to:u,viewTransition:d}),typeof h=="function"?h(z):h)});An.NODE_ENV!=="production"&&(ST0.displayName="NavLink");const FT0=e.forwardRef((t,a)=>{let{fetcherKey:n,navigate:r,reloadDocument:l,replace:o,state:i,method:c=Rg,action:u,onSubmit:d,relative:h,preventScrollReset:f,viewTransition:v}=t,Z=RL(t,fT0),H=$T0(),V=TT0(u,{relative:h}),b=c.toLowerCase()==="get"?"get":"post",S=F=>{if(d&&d(F),F.defaultPrevented)return;F.preventDefault();let w=F.nativeEvent.submitter,$=(w==null?void 0:w.getAttribute("formmethod"))||c;H(w||F.currentTarget,{fetcherKey:n,method:$,navigate:r,replace:o,state:i,relative:h,preventScrollReset:f,viewTransition:v})};return e.createElement("form",zo({ref:a,method:b,action:V,onSubmit:l?d:S},Z))});An.NODE_ENV!=="production"&&(FT0.displayName="Form");var Bg;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Bg||(Bg={}));var I50;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(I50||(I50={}));function _T0(t){return t+" must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router."}function O50(t){let a=e.useContext(Ms);return a||(An.NODE_ENV!=="production"?ke(!1,_T0(t)):ke(!1)),a}function kT0(t,a){let{target:n,replace:r,state:l,preventScrollReset:o,relative:i,viewTransition:c}=a===void 0?{}:a,u=jg(),d=D5(),h=pd(t,{relative:i});return e.useCallback(f=>{if(cT0(f,n)){f.preventDefault();let v=r!==void 0?r:xo(d)===xo(h);u(t,{replace:v,state:l,preventScrollReset:o,relative:i,viewTransition:c})}},[d,u,h,r,l,n,t,o,i,c])}function wT0(t){An.NODE_ENV!=="production"&&Gt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let a=e.useRef(DL(t)),n=e.useRef(!1),r=D5(),l=e.useMemo(()=>sT0(r.search,n.current?null:a.current),[r.search]),o=jg(),i=e.useCallback((c,u)=>{const d=DL(typeof c=="function"?c(l):c);n.current=!0,o("?"+d,u)},[o,l]);return[l,i]}function CT0(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let NT0=0,PT0=()=>"__"+String(++NT0)+"__";function $T0(){let{router:t}=O50(Bg.UseSubmit),{basename:a}=e.useContext(lr),n=X$0();return e.useCallback(function(r,l){l===void 0&&(l={}),CT0();let{action:o,method:i,encType:c,formData:u,body:d}=dT0(r,a);if(l.navigate===!1){let h=l.fetcherKey||PT0();t.fetch(h,n,l.action||o,{preventScrollReset:l.preventScrollReset,formData:u,body:d,formMethod:l.method||i,formEncType:l.encType||c,flushSync:l.flushSync})}else t.navigate(l.action||o,{preventScrollReset:l.preventScrollReset,formData:u,body:d,formMethod:l.method||i,formEncType:l.encType||c,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[t,a,n])}function TT0(t,a){let{relative:n}=a===void 0?{}:a,{basename:r}=e.useContext(lr),l=e.useContext(il);l||(An.NODE_ENV!=="production"?ke(!1,"useFormAction must be used inside a RouteContext"):ke(!1));let[o]=l.matches.slice(-1),i=zo({},pd(t||".",{relative:n})),c=D5();if(t==null){i.search=c.search;let u=new URLSearchParams(i.search),d=u.getAll("index");if(d.some(f=>f==="")){u.delete("index"),d.filter(v=>v).forEach(v=>u.append("index",v));let f=u.toString();i.search=f?"?"+f:""}}return(!t||t===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:ol([r,i.pathname])),xo(i)}function IT0(t,a){a===void 0&&(a={});let n=e.useContext(UL);n==null&&(An.NODE_ENV!=="production"?ke(!1,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"):ke(!1));let{basename:r}=O50(Bg.useViewTransitionState),l=pd(t,{relative:a.relative});if(!n.isTransitioning)return!1;let o=nr(n.currentLocation.pathname,r)||n.currentLocation.pathname,i=nr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ng(l.pathname,i)!=null||Ng(l.pathname,o)!=null}function x50(t){var a,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var l=t.length;for(a=0;a<l;a++)t[a]&&(n=x50(t[a]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function _e(){for(var t,a,n=0,r="",l=arguments.length;n<l;n++)(t=arguments[n])&&(a=x50(t))&&(r&&(r+=" "),r+=a);return r}var j50={exports:{}},R50={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},D50={exports:{}},OT0=function(a){return!a||typeof a=="string"?!1:a instanceof Array||Array.isArray(a)||a.length>=0&&(a.splice instanceof Function||Object.getOwnPropertyDescriptor(a,a.length-1)&&a.constructor.name!=="String")},xT0=OT0,jT0=Array.prototype.concat,RT0=Array.prototype.slice,z50=D50.exports=function(a){for(var n=[],r=0,l=a.length;r<l;r++){var o=a[r];xT0(o)?n=jT0.call(n,RT0.call(o)):n.push(o)}return n};z50.wrap=function(t){return function(){return t(z50(arguments))}};var DT0=D50.exports,gd=R50,Ad=DT0,U50=Object.hasOwnProperty,B50=Object.create(null);for(var BL in gd)U50.call(gd,BL)&&(B50[gd[BL]]=BL);var B4=j50.exports={to:{},get:{}};B4.get=function(t){var a=t.substring(0,3).toLowerCase(),n,r;switch(a){case"hsl":n=B4.get.hsl(t),r="hsl";break;case"hwb":n=B4.get.hwb(t),r="hwb";break;default:n=B4.get.rgb(t),r="rgb";break}return n?{model:r,value:n}:null},B4.get.rgb=function(t){if(!t)return null;var a=/^#([a-f0-9]{3,4})$/i,n=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,r=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,l=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,i=[0,0,0,1],c,u,d;if(c=t.match(n)){for(d=c[2],c=c[1],u=0;u<3;u++){var h=u*2;i[u]=parseInt(c.slice(h,h+2),16)}d&&(i[3]=parseInt(d,16)/255)}else if(c=t.match(a)){for(c=c[1],d=c[3],u=0;u<3;u++)i[u]=parseInt(c[u]+c[u],16);d&&(i[3]=parseInt(d+d,16)/255)}else if(c=t.match(r)){for(u=0;u<3;u++)i[u]=parseInt(c[u+1],0);c[4]&&(c[5]?i[3]=parseFloat(c[4])*.01:i[3]=parseFloat(c[4]))}else if(c=t.match(l)){for(u=0;u<3;u++)i[u]=Math.round(parseFloat(c[u+1])*2.55);c[4]&&(c[5]?i[3]=parseFloat(c[4])*.01:i[3]=parseFloat(c[4]))}else return(c=t.match(o))?c[1]==="transparent"?[0,0,0,0]:U50.call(gd,c[1])?(i=gd[c[1]],i[3]=1,i):null:null;for(u=0;u<3;u++)i[u]=Uo(i[u],0,255);return i[3]=Uo(i[3],0,1),i},B4.get.hsl=function(t){if(!t)return null;var a=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=t.match(a);if(n){var r=parseFloat(n[4]),l=(parseFloat(n[1])%360+360)%360,o=Uo(parseFloat(n[2]),0,100),i=Uo(parseFloat(n[3]),0,100),c=Uo(isNaN(r)?1:r,0,1);return[l,o,i,c]}return null},B4.get.hwb=function(t){if(!t)return null;var a=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=t.match(a);if(n){var r=parseFloat(n[4]),l=(parseFloat(n[1])%360+360)%360,o=Uo(parseFloat(n[2]),0,100),i=Uo(parseFloat(n[3]),0,100),c=Uo(isNaN(r)?1:r,0,1);return[l,o,i,c]}return null},B4.to.hex=function(){var t=Ad(arguments);return"#"+qg(t[0])+qg(t[1])+qg(t[2])+(t[3]<1?qg(Math.round(t[3]*255)):"")},B4.to.rgb=function(){var t=Ad(arguments);return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},B4.to.rgb.percent=function(){var t=Ad(arguments),a=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+a+"%, "+n+"%, "+r+"%)":"rgba("+a+"%, "+n+"%, "+r+"%, "+t[3]+")"},B4.to.hsl=function(){var t=Ad(arguments);return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},B4.to.hwb=function(){var t=Ad(arguments),a="";return t.length>=4&&t[3]!==1&&(a=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+a+")"},B4.to.keyword=function(t){return B50[t.slice(0,3)]};function Uo(t,a,n){return Math.min(Math.max(a,t),n)}function qg(t){var a=Math.round(t).toString(16).toUpperCase();return a.length<2?"0"+a:a}var zT0=j50.exports;const Zd=R50,q50={};for(const t of Object.keys(Zd))q50[Zd[t]]=t;const ve={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var W50=ve;for(const t of Object.keys(ve)){if(!("channels"in ve[t]))throw new Error("missing channels property: "+t);if(!("labels"in ve[t]))throw new Error("missing channel labels property: "+t);if(ve[t].labels.length!==ve[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:a,labels:n}=ve[t];delete ve[t].channels,delete ve[t].labels,Object.defineProperty(ve[t],"channels",{value:a}),Object.defineProperty(ve[t],"labels",{value:n})}ve.rgb.hsl=function(t){const a=t[0]/255,n=t[1]/255,r=t[2]/255,l=Math.min(a,n,r),o=Math.max(a,n,r),i=o-l;let c,u;o===l?c=0:a===o?c=(n-r)/i:n===o?c=2+(r-a)/i:r===o&&(c=4+(a-n)/i),c=Math.min(c*60,360),c<0&&(c+=360);const d=(l+o)/2;return o===l?u=0:d<=.5?u=i/(o+l):u=i/(2-o-l),[c,u*100,d*100]},ve.rgb.hsv=function(t){let a,n,r,l,o;const i=t[0]/255,c=t[1]/255,u=t[2]/255,d=Math.max(i,c,u),h=d-Math.min(i,c,u),f=function(v){return(d-v)/6/h+1/2};return h===0?(l=0,o=0):(o=h/d,a=f(i),n=f(c),r=f(u),i===d?l=r-n:c===d?l=1/3+a-r:u===d&&(l=2/3+n-a),l<0?l+=1:l>1&&(l-=1)),[l*360,o*100,d*100]},ve.rgb.hwb=function(t){const a=t[0],n=t[1];let r=t[2];const l=ve.rgb.hsl(t)[0],o=1/255*Math.min(a,Math.min(n,r));return r=1-1/255*Math.max(a,Math.max(n,r)),[l,o*100,r*100]},ve.rgb.cmyk=function(t){const a=t[0]/255,n=t[1]/255,r=t[2]/255,l=Math.min(1-a,1-n,1-r),o=(1-a-l)/(1-l)||0,i=(1-n-l)/(1-l)||0,c=(1-r-l)/(1-l)||0;return[o*100,i*100,c*100,l*100]};function UT0(t,a){return(t[0]-a[0])**2+(t[1]-a[1])**2+(t[2]-a[2])**2}ve.rgb.keyword=function(t){const a=q50[t];if(a)return a;let n=1/0,r;for(const l of Object.keys(Zd)){const o=Zd[l],i=UT0(t,o);i<n&&(n=i,r=l)}return r},ve.keyword.rgb=function(t){return Zd[t]},ve.rgb.xyz=function(t){let a=t[0]/255,n=t[1]/255,r=t[2]/255;a=a>.04045?((a+.055)/1.055)**2.4:a/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const l=a*.4124+n*.3576+r*.1805,o=a*.2126+n*.7152+r*.0722,i=a*.0193+n*.1192+r*.9505;return[l*100,o*100,i*100]},ve.rgb.lab=function(t){const a=ve.rgb.xyz(t);let n=a[0],r=a[1],l=a[2];n/=95.047,r/=100,l/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,l=l>.008856?l**(1/3):7.787*l+16/116;const o=116*r-16,i=500*(n-r),c=200*(r-l);return[o,i,c]},ve.hsl.rgb=function(t){const a=t[0]/360,n=t[1]/100,r=t[2]/100;let l,o,i;if(n===0)return i=r*255,[i,i,i];r<.5?l=r*(1+n):l=r+n-r*n;const c=2*r-l,u=[0,0,0];for(let d=0;d<3;d++)o=a+1/3*-(d-1),o<0&&o++,o>1&&o--,6*o<1?i=c+(l-c)*6*o:2*o<1?i=l:3*o<2?i=c+(l-c)*(2/3-o)*6:i=c,u[d]=i*255;return u},ve.hsl.hsv=function(t){const a=t[0];let n=t[1]/100,r=t[2]/100,l=n;const o=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,l*=o<=1?o:2-o;const i=(r+n)/2,c=r===0?2*l/(o+l):2*n/(r+n);return[a,c*100,i*100]},ve.hsv.rgb=function(t){const a=t[0]/60,n=t[1]/100;let r=t[2]/100;const l=Math.floor(a)%6,o=a-Math.floor(a),i=255*r*(1-n),c=255*r*(1-n*o),u=255*r*(1-n*(1-o));switch(r*=255,l){case 0:return[r,u,i];case 1:return[c,r,i];case 2:return[i,r,u];case 3:return[i,c,r];case 4:return[u,i,r];case 5:return[r,i,c]}},ve.hsv.hsl=function(t){const a=t[0],n=t[1]/100,r=t[2]/100,l=Math.max(r,.01);let o,i;i=(2-n)*r;const c=(2-n)*l;return o=n*l,o/=c<=1?c:2-c,o=o||0,i/=2,[a,o*100,i*100]},ve.hwb.rgb=function(t){const a=t[0]/360;let n=t[1]/100,r=t[2]/100;const l=n+r;let o;l>1&&(n/=l,r/=l);const i=Math.floor(6*a),c=1-r;o=6*a-i,i&1&&(o=1-o);const u=n+o*(c-n);let d,h,f;switch(i){default:case 6:case 0:d=c,h=u,f=n;break;case 1:d=u,h=c,f=n;break;case 2:d=n,h=c,f=u;break;case 3:d=n,h=u,f=c;break;case 4:d=u,h=n,f=c;break;case 5:d=c,h=n,f=u;break}return[d*255,h*255,f*255]},ve.cmyk.rgb=function(t){const a=t[0]/100,n=t[1]/100,r=t[2]/100,l=t[3]/100,o=1-Math.min(1,a*(1-l)+l),i=1-Math.min(1,n*(1-l)+l),c=1-Math.min(1,r*(1-l)+l);return[o*255,i*255,c*255]},ve.xyz.rgb=function(t){const a=t[0]/100,n=t[1]/100,r=t[2]/100;let l,o,i;return l=a*3.2406+n*-1.5372+r*-.4986,o=a*-.9689+n*1.8758+r*.0415,i=a*.0557+n*-.204+r*1.057,l=l>.0031308?1.055*l**(1/2.4)-.055:l*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,l=Math.min(Math.max(0,l),1),o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),[l*255,o*255,i*255]},ve.xyz.lab=function(t){let a=t[0],n=t[1],r=t[2];a/=95.047,n/=100,r/=108.883,a=a>.008856?a**(1/3):7.787*a+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const l=116*n-16,o=500*(a-n),i=200*(n-r);return[l,o,i]},ve.lab.xyz=function(t){const a=t[0],n=t[1],r=t[2];let l,o,i;o=(a+16)/116,l=n/500+o,i=o-r/200;const c=o**3,u=l**3,d=i**3;return o=c>.008856?c:(o-16/116)/7.787,l=u>.008856?u:(l-16/116)/7.787,i=d>.008856?d:(i-16/116)/7.787,l*=95.047,o*=100,i*=108.883,[l,o,i]},ve.lab.lch=function(t){const a=t[0],n=t[1],r=t[2];let l;l=Math.atan2(r,n)*360/2/Math.PI,l<0&&(l+=360);const i=Math.sqrt(n*n+r*r);return[a,i,l]},ve.lch.lab=function(t){const a=t[0],n=t[1],l=t[2]/360*2*Math.PI,o=n*Math.cos(l),i=n*Math.sin(l);return[a,o,i]},ve.rgb.ansi16=function(t,a=null){const[n,r,l]=t;let o=a===null?ve.rgb.hsv(t)[2]:a;if(o=Math.round(o/50),o===0)return 30;let i=30+(Math.round(l/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===2&&(i+=60),i},ve.hsv.ansi16=function(t){return ve.rgb.ansi16(ve.hsv.rgb(t),t[2])},ve.rgb.ansi256=function(t){const a=t[0],n=t[1],r=t[2];return a===n&&n===r?a<8?16:a>248?231:Math.round((a-8)/247*24)+232:16+36*Math.round(a/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},ve.ansi16.rgb=function(t){let a=t%10;if(a===0||a===7)return t>50&&(a+=3.5),a=a/10.5*255,[a,a,a];const n=(~~(t>50)+1)*.5,r=(a&1)*n*255,l=(a>>1&1)*n*255,o=(a>>2&1)*n*255;return[r,l,o]},ve.ansi256.rgb=function(t){if(t>=232){const o=(t-232)*10+8;return[o,o,o]}t-=16;let a;const n=Math.floor(t/36)/5*255,r=Math.floor((a=t%36)/6)/5*255,l=a%6/5*255;return[n,r,l]},ve.rgb.hex=function(t){const n=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n},ve.hex.rgb=function(t){const a=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!a)return[0,0,0];let n=a[0];a[0].length===3&&(n=n.split("").map(c=>c+c).join(""));const r=parseInt(n,16),l=r>>16&255,o=r>>8&255,i=r&255;return[l,o,i]},ve.rgb.hcg=function(t){const a=t[0]/255,n=t[1]/255,r=t[2]/255,l=Math.max(Math.max(a,n),r),o=Math.min(Math.min(a,n),r),i=l-o;let c,u;return i<1?c=o/(1-i):c=0,i<=0?u=0:l===a?u=(n-r)/i%6:l===n?u=2+(r-a)/i:u=4+(a-n)/i,u/=6,u%=1,[u*360,i*100,c*100]},ve.hsl.hcg=function(t){const a=t[1]/100,n=t[2]/100,r=n<.5?2*a*n:2*a*(1-n);let l=0;return r<1&&(l=(n-.5*r)/(1-r)),[t[0],r*100,l*100]},ve.hsv.hcg=function(t){const a=t[1]/100,n=t[2]/100,r=a*n;let l=0;return r<1&&(l=(n-r)/(1-r)),[t[0],r*100,l*100]},ve.hcg.rgb=function(t){const a=t[0]/360,n=t[1]/100,r=t[2]/100;if(n===0)return[r*255,r*255,r*255];const l=[0,0,0],o=a%1*6,i=o%1,c=1-i;let u=0;switch(Math.floor(o)){case 0:l[0]=1,l[1]=i,l[2]=0;break;case 1:l[0]=c,l[1]=1,l[2]=0;break;case 2:l[0]=0,l[1]=1,l[2]=i;break;case 3:l[0]=0,l[1]=c,l[2]=1;break;case 4:l[0]=i,l[1]=0,l[2]=1;break;default:l[0]=1,l[1]=0,l[2]=c}return u=(1-n)*r,[(n*l[0]+u)*255,(n*l[1]+u)*255,(n*l[2]+u)*255]},ve.hcg.hsv=function(t){const a=t[1]/100,n=t[2]/100,r=a+n*(1-a);let l=0;return r>0&&(l=a/r),[t[0],l*100,r*100]},ve.hcg.hsl=function(t){const a=t[1]/100,r=t[2]/100*(1-a)+.5*a;let l=0;return r>0&&r<.5?l=a/(2*r):r>=.5&&r<1&&(l=a/(2*(1-r))),[t[0],l*100,r*100]},ve.hcg.hwb=function(t){const a=t[1]/100,n=t[2]/100,r=a+n*(1-a);return[t[0],(r-a)*100,(1-r)*100]},ve.hwb.hcg=function(t){const a=t[1]/100,r=1-t[2]/100,l=r-a;let o=0;return l<1&&(o=(r-l)/(1-l)),[t[0],l*100,o*100]},ve.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},ve.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},ve.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},ve.gray.hsl=function(t){return[0,0,t[0]]},ve.gray.hsv=ve.gray.hsl,ve.gray.hwb=function(t){return[0,100,t[0]]},ve.gray.cmyk=function(t){return[0,0,0,t[0]]},ve.gray.lab=function(t){return[t[0],0,0]},ve.gray.hex=function(t){const a=Math.round(t[0]/100*255)&255,r=((a<<16)+(a<<8)+a).toString(16).toUpperCase();return"000000".substring(r.length)+r},ve.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};const Wg=W50;function BT0(){const t={},a=Object.keys(Wg);for(let n=a.length,r=0;r<n;r++)t[a[r]]={distance:-1,parent:null};return t}function qT0(t){const a=BT0(),n=[t];for(a[t].distance=0;n.length;){const r=n.pop(),l=Object.keys(Wg[r]);for(let o=l.length,i=0;i<o;i++){const c=l[i],u=a[c];u.distance===-1&&(u.distance=a[r].distance+1,u.parent=r,n.unshift(c))}}return a}function WT0(t,a){return function(n){return a(t(n))}}function GT0(t,a){const n=[a[t].parent,t];let r=Wg[a[t].parent][t],l=a[t].parent;for(;a[l].parent;)n.unshift(a[l].parent),r=WT0(Wg[a[l].parent][l],r),l=a[l].parent;return r.conversion=n,r}var YT0=function(t){const a=qT0(t),n={},r=Object.keys(a);for(let l=r.length,o=0;o<l;o++){const i=r[o];a[i].parent!==null&&(n[i]=GT0(i,a))}return n};const qL=W50,QT0=YT0,Vs={},KT0=Object.keys(qL);function XT0(t){const a=function(...n){const r=n[0];return r==null?r:(r.length>1&&(n=r),t(n))};return"conversion"in t&&(a.conversion=t.conversion),a}function JT0(t){const a=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const l=t(n);if(typeof l=="object")for(let o=l.length,i=0;i<o;i++)l[i]=Math.round(l[i]);return l};return"conversion"in t&&(a.conversion=t.conversion),a}KT0.forEach(t=>{Vs[t]={},Object.defineProperty(Vs[t],"channels",{value:qL[t].channels}),Object.defineProperty(Vs[t],"labels",{value:qL[t].labels});const a=QT0(t);Object.keys(a).forEach(r=>{const l=a[r];Vs[t][r]=JT0(l),Vs[t][r].raw=XT0(l)})});var eI0=Vs;const ys=zT0,q4=eI0,G50=["keyword","gray","hex"],WL={};for(const t of Object.keys(q4))WL[[...q4[t].labels].sort().join("")]=t;const Gg={};function va(t,a){if(!(this instanceof va))return new va(t,a);if(a&&a in G50&&(a=null),a&&!(a in q4))throw new Error("Unknown model: "+a);let n,r;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof va)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if(typeof t=="string"){const l=ys.get(t);if(l===null)throw new Error("Unable to parse color from string: "+t);this.model=l.model,r=q4[this.model].channels,this.color=l.value.slice(0,r),this.valpha=typeof l.value[r]=="number"?l.value[r]:1}else if(t.length>0){this.model=a||"rgb",r=q4[this.model].channels;const l=Array.prototype.slice.call(t,0,r);this.color=GL(l,r),this.valpha=typeof t[r]=="number"?t[r]:1}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;const l=Object.keys(t);"alpha"in t&&(l.splice(l.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);const o=l.sort().join("");if(!(o in WL))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=WL[o];const{labels:i}=q4[this.model],c=[];for(n=0;n<i.length;n++)c.push(t[i[n]]);this.color=GL(c)}if(Gg[this.model])for(r=q4[this.model].channels,n=0;n<r;n++){const l=Gg[this.model][n];l&&(this.color[n]=l(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}va.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let a=this.model in ys.to?this:this.rgb();a=a.round(typeof t=="number"?t:1);const n=a.valpha===1?a.color:[...a.color,this.valpha];return ys.to[a.model](n)},percentString(t){const a=this.rgb().round(typeof t=="number"?t:1),n=a.valpha===1?a.color:[...a.color,this.valpha];return ys.to.rgb.percent(n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const t={},{channels:a}=q4[this.model],{labels:n}=q4[this.model];for(let r=0;r<a;r++)t[n[r]]=this.color[r];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){const t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){const t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new va([...this.color.map(aI0(t)),this.valpha],this.model)},alpha(t){return t!==void 0?new va([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:it("rgb",0,Yt(255)),green:it("rgb",1,Yt(255)),blue:it("rgb",2,Yt(255)),hue:it(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:it("hsl",1,Yt(100)),lightness:it("hsl",2,Yt(100)),saturationv:it("hsv",1,Yt(100)),value:it("hsv",2,Yt(100)),chroma:it("hcg",1,Yt(100)),gray:it("hcg",2,Yt(100)),white:it("hwb",1,Yt(100)),wblack:it("hwb",2,Yt(100)),cyan:it("cmyk",0,Yt(100)),magenta:it("cmyk",1,Yt(100)),yellow:it("cmyk",2,Yt(100)),black:it("cmyk",3,Yt(100)),x:it("xyz",0,Yt(95.047)),y:it("xyz",1,Yt(100)),z:it("xyz",2,Yt(108.833)),l:it("lab",0,Yt(100)),a:it("lab",1),b:it("lab",2),keyword(t){return t!==void 0?new va(t):q4[this.model].keyword(this.color)},hex(t){return t!==void 0?new va(t):ys.to.hex(this.rgb().round().color)},hexa(t){if(t!==void 0)return new va(t);const a=this.rgb().round().color;let n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),ys.to.hex(a)+n},rgbNumber(){const t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){const t=this.rgb().color,a=[];for(const[n,r]of t.entries()){const l=r/255;a[n]=l<=.04045?l/12.92:((l+.055)/1.055)**2.4}return .2126*a[0]+.7152*a[1]+.0722*a[2]},contrast(t){const a=this.luminosity(),n=t.luminosity();return a>n?(a+.05)/(n+.05):(n+.05)/(a+.05)},level(t){const a=this.contrast(t);return a>=7?"AAA":a>=4.5?"AA":""},isDark(){const t=this.rgb().color;return(t[0]*2126+t[1]*7152+t[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const t=this.rgb();for(let a=0;a<3;a++)t.color[a]=255-t.color[a];return t},lighten(t){const a=this.hsl();return a.color[2]+=a.color[2]*t,a},darken(t){const a=this.hsl();return a.color[2]-=a.color[2]*t,a},saturate(t){const a=this.hsl();return a.color[1]+=a.color[1]*t,a},desaturate(t){const a=this.hsl();return a.color[1]-=a.color[1]*t,a},whiten(t){const a=this.hwb();return a.color[1]+=a.color[1]*t,a},blacken(t){const a=this.hwb();return a.color[2]+=a.color[2]*t,a},grayscale(){const t=this.rgb().color,a=t[0]*.3+t[1]*.59+t[2]*.11;return va.rgb(a,a,a)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){const a=this.hsl();let n=a.color[0];return n=(n+t)%360,n=n<0?360+n:n,a.color[0]=n,a},mix(t,a){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);const n=t.rgb(),r=this.rgb(),l=a===void 0?.5:a,o=2*l-1,i=n.alpha()-r.alpha(),c=((o*i===-1?o:(o+i)/(1+o*i))+1)/2,u=1-c;return va.rgb(c*n.red()+u*r.red(),c*n.green()+u*r.green(),c*n.blue()+u*r.blue(),n.alpha()*l+r.alpha()*(1-l))}};for(const t of Object.keys(q4)){if(G50.includes(t))continue;const{channels:a}=q4[t];va.prototype[t]=function(...n){return this.model===t?new va(this):n.length>0?new va(n,t):new va([...nI0(q4[this.model][t].raw(this.color)),this.valpha],t)},va[t]=function(...n){let r=n[0];return typeof r=="number"&&(r=GL(n,a)),new va(r,t)}}function tI0(t,a){return Number(t.toFixed(a))}function aI0(t){return function(a){return tI0(a,t)}}function it(t,a,n){t=Array.isArray(t)?t:[t];for(const r of t)(Gg[r]||(Gg[r]=[]))[a]=n;return t=t[0],function(r){let l;return r!==void 0?(n&&(r=n(r)),l=this[t](),l.color[a]=r,l):(l=this[t]().color[a],n&&(l=n(l)),l)}}function Yt(t){return function(a){return Math.max(0,Math.min(t,a))}}function nI0(t){return Array.isArray(t)?t:[t]}function GL(t,a){for(let n=0;n<a;n++)typeof t[n]!="number"&&(t[n]=0);return t}var rI0=va;const YL=y2(rI0),Y50=typeof document<"u"?G0.useLayoutEffect:()=>{};function lI0(t){const a=e.useRef(null);return Y50(()=>{a.current=t},[t]),e.useCallback((...n)=>{const r=a.current;return r==null?void 0:r(...n)},[])}const Hd=t=>{var a;return(a=t==null?void 0:t.ownerDocument)!==null&&a!==void 0?a:document},z5=t=>t&&"window"in t&&t.window===t?t:Hd(t).defaultView||window;function oI0(t){var a;return typeof window>"u"||window.navigator==null?!1:((a=window.navigator.userAgentData)===null||a===void 0?void 0:a.brands.some(n=>t.test(n.brand)))||t.test(window.navigator.userAgent)}function iI0(t){var a;return typeof window<"u"&&window.navigator!=null?t.test(((a=window.navigator.userAgentData)===null||a===void 0?void 0:a.platform)||window.navigator.platform):!1}function Q50(t){let a=null;return()=>(a==null&&(a=t()),a)}const cI0=Q50(function(){return iI0(/^Mac/i)}),sI0=Q50(function(){return oI0(/Android/i)});function uI0(t){return t.mozInputSource===0&&t.isTrusted?!0:sI0()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}class mI0{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(a,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=a}}function K50(t){let a=e.useRef({isFocused:!1,observer:null});Y50(()=>{const r=a.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=lI0(r=>{t==null||t(r)});return e.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){a.current.isFocused=!0;let l=r.target,o=i=>{a.current.isFocused=!1,l.disabled&&n(new mI0("blur",i)),a.current.observer&&(a.current.observer.disconnect(),a.current.observer=null)};l.addEventListener("focusout",o,{once:!0}),a.current.observer=new MutationObserver(()=>{if(a.current.isFocused&&l.disabled){var i;(i=a.current.observer)===null||i===void 0||i.disconnect();let c=l===document.activeElement?null:document.activeElement;l.dispatchEvent(new FocusEvent("blur",{relatedTarget:c})),l.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:c}))}}),a.current.observer.observe(l,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function dI0(t){let{isDisabled:a,onFocus:n,onBlur:r,onFocusChange:l}=t;const o=e.useCallback(u=>{if(u.target===u.currentTarget)return r&&r(u),l&&l(!1),!0},[r,l]),i=K50(o),c=e.useCallback(u=>{const d=Hd(u.target);u.target===u.currentTarget&&d.activeElement===u.target&&(n&&n(u),l&&l(!0),i(u))},[l,n,i]);return{focusProps:{onFocus:!a&&(n||l||r)?c:void 0,onBlur:!a&&(r||l)?o:void 0}}}let Md=null,QL=new Set,Ed=new Map,U5=!1,KL=!1;const hI0={Tab:!0,Escape:!0};function XL(t,a){for(let n of QL)n(t,a)}function pI0(t){return!(t.metaKey||!cI0()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Yg(t){U5=!0,pI0(t)&&(Md="keyboard",XL("keyboard",t))}function Zn(t){Md="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(U5=!0,XL("pointer",t))}function X50(t){uI0(t)&&(U5=!0,Md="virtual")}function J50(t){t.target===window||t.target===document||(!U5&&!KL&&(Md="virtual",XL("virtual",t)),U5=!1,KL=!1)}function e70(){U5=!1,KL=!0}function JL(t){if(typeof window>"u"||Ed.get(z5(t)))return;const a=z5(t),n=Hd(t);let r=a.HTMLElement.prototype.focus;a.HTMLElement.prototype.focus=function(){U5=!0,r.apply(this,arguments)},n.addEventListener("keydown",Yg,!0),n.addEventListener("keyup",Yg,!0),n.addEventListener("click",X50,!0),a.addEventListener("focus",J50,!0),a.addEventListener("blur",e70,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Zn,!0),n.addEventListener("pointermove",Zn,!0),n.addEventListener("pointerup",Zn,!0)):(n.addEventListener("mousedown",Zn,!0),n.addEventListener("mousemove",Zn,!0),n.addEventListener("mouseup",Zn,!0)),a.addEventListener("beforeunload",()=>{t70(t)},{once:!0}),Ed.set(a,{focus:r})}const t70=(t,a)=>{const n=z5(t),r=Hd(t);a&&r.removeEventListener("DOMContentLoaded",a),Ed.has(n)&&(n.HTMLElement.prototype.focus=Ed.get(n).focus,r.removeEventListener("keydown",Yg,!0),r.removeEventListener("keyup",Yg,!0),r.removeEventListener("click",X50,!0),n.removeEventListener("focus",J50,!0),n.removeEventListener("blur",e70,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Zn,!0),r.removeEventListener("pointermove",Zn,!0),r.removeEventListener("pointerup",Zn,!0)):(r.removeEventListener("mousedown",Zn,!0),r.removeEventListener("mousemove",Zn,!0),r.removeEventListener("mouseup",Zn,!0)),Ed.delete(n))};function fI0(t){const a=Hd(t);let n;return a.readyState!=="loading"?JL(t):(n=()=>{JL(t)},a.addEventListener("DOMContentLoaded",n)),()=>t70(t,n)}typeof document<"u"&&fI0();function a70(){return Md!=="pointer"}const vI0=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function gI0(t,a,n){var r;const l=typeof window<"u"?z5(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,o=typeof window<"u"?z5(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,i=typeof window<"u"?z5(n==null?void 0:n.target).HTMLElement:HTMLElement,c=typeof window<"u"?z5(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return t=t||(n==null?void 0:n.target)instanceof l&&!vI0.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof o||(n==null?void 0:n.target)instanceof i&&(n==null?void 0:n.target.isContentEditable),!(t&&a==="keyboard"&&n instanceof c&&!hI0[n.key])}function AI0(t,a,n){JL(),e.useEffect(()=>{let r=(l,o)=>{gI0(!!(n!=null&&n.isTextInput),l,o)&&t(a70())};return QL.add(r),()=>{QL.delete(r)}},a)}function ZI0(t){let{isDisabled:a,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:l}=t,o=e.useRef({isFocusWithin:!1}),i=e.useCallback(d=>{o.current.isFocusWithin&&!d.currentTarget.contains(d.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(d),l&&l(!1))},[n,l,o]),c=K50(i),u=e.useCallback(d=>{!o.current.isFocusWithin&&document.activeElement===d.target&&(r&&r(d),l&&l(!0),o.current.isFocusWithin=!0,c(d))},[r,l,c]);return a?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:i}}}let Qg=!1,eS=0;function tS(){Qg=!0,setTimeout(()=>{Qg=!1},50)}function n70(t){t.pointerType==="touch"&&tS()}function HI0(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",n70):document.addEventListener("touchend",tS),eS++,()=>{eS--,!(eS>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",n70):document.removeEventListener("touchend",tS))}}function Vd(t){let{onHoverStart:a,onHoverChange:n,onHoverEnd:r,isDisabled:l}=t,[o,i]=e.useState(!1),c=e.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;e.useEffect(HI0,[]);let{hoverProps:u,triggerHoverEnd:d}=e.useMemo(()=>{let h=(Z,H)=>{if(c.pointerType=H,l||H==="touch"||c.isHovered||!Z.currentTarget.contains(Z.target))return;c.isHovered=!0;let V=Z.currentTarget;c.target=V,a&&a({type:"hoverstart",target:V,pointerType:H}),n&&n(!0),i(!0)},f=(Z,H)=>{if(c.pointerType="",c.target=null,H==="touch"||!c.isHovered)return;c.isHovered=!1;let V=Z.currentTarget;r&&r({type:"hoverend",target:V,pointerType:H}),n&&n(!1),i(!1)},v={};return typeof PointerEvent<"u"?(v.onPointerEnter=Z=>{Qg&&Z.pointerType==="mouse"||h(Z,Z.pointerType)},v.onPointerLeave=Z=>{!l&&Z.currentTarget.contains(Z.target)&&f(Z,Z.pointerType)}):(v.onTouchStart=()=>{c.ignoreEmulatedMouseEvents=!0},v.onMouseEnter=Z=>{!c.ignoreEmulatedMouseEvents&&!Qg&&h(Z,"mouse"),c.ignoreEmulatedMouseEvents=!1},v.onMouseLeave=Z=>{!l&&Z.currentTarget.contains(Z.target)&&f(Z,"mouse")}),{hoverProps:v,triggerHoverEnd:f}},[a,n,r,l,c]);return e.useEffect(()=>{l&&d({currentTarget:c.target},c.pointerType)},[l]),{hoverProps:u,isHovered:o}}function yd(t={}){let{autoFocus:a=!1,isTextInput:n,within:r}=t,l=e.useRef({isFocused:!1,isFocusVisible:a||a70()}),[o,i]=e.useState(!1),[c,u]=e.useState(()=>l.current.isFocused&&l.current.isFocusVisible),d=e.useCallback(()=>u(l.current.isFocused&&l.current.isFocusVisible),[]),h=e.useCallback(Z=>{l.current.isFocused=Z,i(Z),d()},[d]);AI0(Z=>{l.current.isFocusVisible=Z,d()},[],{isTextInput:n});let{focusProps:f}=dI0({isDisabled:r,onFocusChange:h}),{focusWithinProps:v}=ZI0({isDisabled:!r,onFocusWithinChange:h});return{isFocused:o,isFocusVisible:c,focusProps:r?v:f}}var MI0=Object.defineProperty,EI0=(t,a,n)=>a in t?MI0(t,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[a]=n,aS=(t,a,n)=>(EI0(t,typeof a!="symbol"?a+"":a,n),n);let VI0=class{constructor(){aS(this,"current",this.detect()),aS(this,"handoffState","pending"),aS(this,"currentId",0)}set(a){this.current!==a&&(this.handoffState="pending",this.currentId=0,this.current=a)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},B5=new VI0;function q5(t){return B5.isServer?null:t instanceof Node?t.ownerDocument:t!=null&&t.hasOwnProperty("current")&&t.current instanceof Node?t.current.ownerDocument:document}function Kg(t){typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t).catch(a=>setTimeout(()=>{throw a}))}function cl(){let t=[],a={addEventListener(n,r,l,o){return n.addEventListener(r,l,o),a.add(()=>n.removeEventListener(r,l,o))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return a.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return a.requestAnimationFrame(()=>a.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return a.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Kg(()=>{r.current&&n[0]()}),a.add(()=>{r.current=!1})},style(n,r,l){let o=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:l}),this.add(()=>{Object.assign(n.style,{[r]:o})})},group(n){let r=cl();return n(r),this.add(()=>r.dispose())},add(n){return t.includes(n)||t.push(n),()=>{let r=t.indexOf(n);if(r>=0)for(let l of t.splice(r,1))l()}},dispose(){for(let n of t.splice(0))n()}};return a}function bs(){let[t]=e.useState(cl);return e.useEffect(()=>()=>t.dispose(),[t]),t}let l8=(t,a)=>{B5.isServer?e.useEffect(t,a):e.useLayoutEffect(t,a)};function W5(t){let a=e.useRef(t);return l8(()=>{a.current=t},[t]),a}let Xe=function(t){let a=W5(t);return G0.useCallback((...n)=>a.current(...n),[a])};function yI0(t){let a=t.width/2,n=t.height/2;return{top:t.clientY-n,right:t.clientX+a,bottom:t.clientY+n,left:t.clientX-a}}function bI0(t,a){return!(!t||!a||t.right<a.left||t.left>a.right||t.bottom<a.top||t.top>a.bottom)}function Xg({disabled:t=!1}={}){let a=e.useRef(null),[n,r]=e.useState(!1),l=bs(),o=Xe(()=>{a.current=null,r(!1),l.dispose()}),i=Xe(c=>{if(l.dispose(),a.current===null){a.current=c.currentTarget,r(!0);{let u=q5(c.currentTarget);l.addEventListener(u,"pointerup",o,!1),l.addEventListener(u,"pointermove",d=>{if(a.current){let h=yI0(d);r(bI0(h,a.current.getBoundingClientRect()))}},!1),l.addEventListener(u,"pointercancel",o,!1)}}});return{pressed:n,pressProps:t?{}:{onPointerDown:i,onPointerUp:o,onClick:o}}}let r70=e.createContext(void 0);function G5(){return e.useContext(r70)}function l70({value:t,children:a}){return G0.createElement(r70.Provider,{value:t},a)}function nS(...t){return Array.from(new Set(t.flatMap(a=>typeof a=="string"?a.split(" "):[]))).filter(Boolean).join(" ")}function sl(t,a,...n){if(t in a){let l=a[t];return typeof l=="function"?l(...n):l}let r=new Error(`Tried to handle "${t}" but there is no handler defined. Only defined handlers are: ${Object.keys(a).map(l=>`"${l}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,sl),r}var Ls=(t=>(t[t.None=0]="None",t[t.RenderStrategy=1]="RenderStrategy",t[t.Static=2]="Static",t))(Ls||{}),Bo=(t=>(t[t.Unmount=0]="Unmount",t[t.Hidden=1]="Hidden",t))(Bo||{});function k8({ourProps:t,theirProps:a,slot:n,defaultTag:r,features:l,visible:o=!0,name:i,mergeRefs:c}){c=c??LI0;let u=o70(a,t);if(o)return Jg(u,n,r,i,c);let d=l??0;if(d&2){let{static:h=!1,...f}=u;if(h)return Jg(f,n,r,i,c)}if(d&1){let{unmount:h=!0,...f}=u;return sl(h?0:1,{0(){return null},1(){return Jg({...f,hidden:!0,style:{display:"none"}},n,r,i,c)}})}return Jg(u,n,r,i,c)}function Jg(t,a={},n,r,l){let{as:o=n,children:i,refName:c="ref",...u}=rS(t,["unmount","static"]),d=t.ref!==void 0?{[c]:t.ref}:{},h=typeof i=="function"?i(a):i;"className"in u&&u.className&&typeof u.className=="function"&&(u.className=u.className(a)),u["aria-labelledby"]&&u["aria-labelledby"]===u.id&&(u["aria-labelledby"]=void 0);let f={};if(a){let v=!1,Z=[];for(let[H,V]of Object.entries(a))typeof V=="boolean"&&(v=!0),V===!0&&Z.push(H.replace(/([A-Z])/g,b=>`-${b.toLowerCase()}`));if(v){f["data-headlessui-state"]=Z.join(" ");for(let H of Z)f[`data-${H}`]=""}}if(o===e.Fragment&&(Object.keys(Y5(u)).length>0||Object.keys(Y5(f)).length>0))if(!e.isValidElement(h)||Array.isArray(h)&&h.length>1){if(Object.keys(Y5(u)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Y5(u)).concat(Object.keys(Y5(f))).map(v=>` - ${v}`).join(`
281
281
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(v=>` - ${v}`).join(`
282
282
  `)].join(`
283
- `))}else{let v=h.props,Z=v==null?void 0:v.className,H=typeof Z=="function"?(...S)=>nS(Z(...S),u.className):nS(Z,u.className),V=H?{className:H}:{},b=o70(h.props,Y5(rS(u,["ref"])));for(let S in f)S in b&&delete f[S];return e.cloneElement(h,Object.assign({},b,f,d,{ref:l(h.ref,d.ref)},V))}return e.createElement(o,Object.assign({},rS(u,["ref"]),o!==e.Fragment&&d,o!==e.Fragment&&f),h)}function LI0(...t){return t.every(a=>a==null)?void 0:a=>{for(let n of t)n!=null&&(typeof n=="function"?n(a):n.current=a)}}function o70(...t){if(t.length===0)return{};if(t.length===1)return t[0];let a={},n={};for(let r of t)for(let l in r)l.startsWith("on")&&typeof r[l]=="function"?(n[l]!=null||(n[l]=[]),n[l].push(r[l])):a[l]=r[l];if(a.disabled||a["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[l=>{var o;return(o=l==null?void 0:l.preventDefault)==null?void 0:o.call(l)}]);for(let r in n)Object.assign(a,{[r](l,...o){let i=n[r];for(let c of i){if((l instanceof Event||(l==null?void 0:l.nativeEvent)instanceof Event)&&l.defaultPrevented)return;c(l,...o)}}});return a}function Ss(...t){if(t.length===0)return{};if(t.length===1)return t[0];let a={},n={};for(let r of t)for(let l in r)l.startsWith("on")&&typeof r[l]=="function"?(n[l]!=null||(n[l]=[]),n[l].push(r[l])):a[l]=r[l];for(let r in n)Object.assign(a,{[r](...l){let o=n[r];for(let i of o)i==null||i(...l)}});return a}function f8(t){var a;return Object.assign(e.forwardRef(t),{displayName:(a=t.displayName)!=null?a:t.name})}function Y5(t){let a=Object.assign({},t);for(let n in a)a[n]===void 0&&delete a[n];return a}function rS(t,a=[]){let n=Object.assign({},t);for(let r of a)r in n&&delete n[r];return n}let SI0="button";function FI0(t,a){var n;let r=G5(),{disabled:l=r||!1,autoFocus:o=!1,...i}=t,{isFocusVisible:c,focusProps:u}=yd({autoFocus:o}),{isHovered:d,hoverProps:h}=Vd({isDisabled:l}),{pressed:f,pressProps:v}=Xg({disabled:l}),Z=Ss({ref:a,type:(n=i.type)!=null?n:"button",disabled:l||void 0,autoFocus:o},u,h,v),H=e.useMemo(()=>({disabled:l,hover:d,focus:c,active:f,autofocus:o}),[l,d,c,f,o]);return k8({ourProps:Z,theirProps:i,slot:H,defaultTag:SI0,name:"Button"})}let i70=f8(FI0),_I0="span";var bd=(t=>(t[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t))(bd||{});function kI0(t,a){var n;let{features:r=1,...l}=t,o={ref:a,"aria-hidden":(r&2)===2?!0:(n=l["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return k8({ourProps:o,theirProps:l,slot:{},defaultTag:_I0,name:"Hidden"})}let eA=f8(kI0),wI0=e.createContext(null);function CI0(t){let[a,n]=e.useState(null);return G0.createElement(wI0.Provider,{value:{target:a}},t.children,G0.createElement(eA,{features:bd.Hidden,ref:n}))}let c70=e.createContext(void 0);function lS(){return e.useContext(c70)}function NI0({id:t,children:a}){return G0.createElement(c70.Provider,{value:t},a)}function PI0(t){let a=t.parentElement,n=null;for(;a&&!(a instanceof HTMLFieldSetElement);)a instanceof HTMLLegendElement&&(n=a),a=a.parentElement;let r=(a==null?void 0:a.getAttribute("disabled"))==="";return r&&$I0(n)?!1:r}function $I0(t){if(!t)return!1;let a=t.previousElementSibling;for(;a!==null;){if(a instanceof HTMLLegendElement)return!1;a=a.previousElementSibling}return!0}let s70=Symbol();function TI0(t,a=!0){return Object.assign(t,{[s70]:a})}function o6(...t){let a=e.useRef(t);e.useEffect(()=>{a.current=t},[t]);let n=Xe(r=>{for(let l of a.current)l!=null&&(typeof l=="function"?l(r):l.current=r)});return t.every(r=>r==null||(r==null?void 0:r[s70]))?void 0:n}let tA=e.createContext(null);tA.displayName="DescriptionContext";function u70(){let t=e.useContext(tA);if(t===null){let a=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(a,u70),a}return t}function m70(){var t,a;return(a=(t=e.useContext(tA))==null?void 0:t.value)!=null?a:void 0}function oS(){let[t,a]=e.useState([]);return[t.length>0?t.join(" "):void 0,e.useMemo(()=>function(n){let r=Xe(o=>(a(i=>[...i,o]),()=>a(i=>{let c=i.slice(),u=c.indexOf(o);return u!==-1&&c.splice(u,1),c}))),l=e.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return G0.createElement(tA.Provider,{value:l},n.children)},[a])]}let II0="p";function OI0(t,a){let n=e.useId(),r=G5(),{id:l=`headlessui-description-${n}`,...o}=t,i=u70(),c=o6(a);l8(()=>i.register(l),[l,i.register]);let u=r||!1,d=e.useMemo(()=>({...i.slot,disabled:u}),[i.slot,u]),h={ref:c,...i.props,id:l};return k8({ourProps:h,theirProps:o,slot:d,defaultTag:II0,name:i.name||"Description"})}let xI0=f8(OI0),jI0=Object.assign(xI0,{});var ga=(t=>(t.Space=" ",t.Enter="Enter",t.Escape="Escape",t.Backspace="Backspace",t.Delete="Delete",t.ArrowLeft="ArrowLeft",t.ArrowUp="ArrowUp",t.ArrowRight="ArrowRight",t.ArrowDown="ArrowDown",t.Home="Home",t.End="End",t.PageUp="PageUp",t.PageDown="PageDown",t.Tab="Tab",t))(ga||{});let aA=e.createContext(null);aA.displayName="LabelContext";function iS(){let t=e.useContext(aA);if(t===null){let a=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(a,iS),a}return t}function cS(t){var a,n,r;let l=(n=(a=e.useContext(aA))==null?void 0:a.value)!=null?n:void 0;return((r=void 0)!=null?r:0)>0?[l,...t].filter(Boolean).join(" "):l}function nA({inherit:t=!1}={}){let a=cS(),[n,r]=e.useState([]),l=t?[a,...n].filter(Boolean):n;return[l.length>0?l.join(" "):void 0,e.useMemo(()=>function(o){let i=Xe(u=>(r(d=>[...d,u]),()=>r(d=>{let h=d.slice(),f=h.indexOf(u);return f!==-1&&h.splice(f,1),h}))),c=e.useMemo(()=>({register:i,slot:o.slot,name:o.name,props:o.props,value:o.value}),[i,o.slot,o.name,o.props,o.value]);return G0.createElement(aA.Provider,{value:c},o.children)},[r])]}let RI0="label";function DI0(t,a){var n;let r=e.useId(),l=iS(),o=lS(),i=G5(),{id:c=`headlessui-label-${r}`,htmlFor:u=o??((n=l.props)==null?void 0:n.htmlFor),passive:d=!1,...h}=t,f=o6(a);l8(()=>l.register(c),[c,l.register]);let v=Xe(b=>{let S=b.currentTarget;if(S instanceof HTMLLabelElement&&b.preventDefault(),l.props&&"onClick"in l.props&&typeof l.props.onClick=="function"&&l.props.onClick(b),S instanceof HTMLLabelElement){let F=document.getElementById(S.htmlFor);if(F){let w=F.getAttribute("disabled");if(w==="true"||w==="")return;let $=F.getAttribute("aria-disabled");if($==="true"||$==="")return;(F instanceof HTMLInputElement&&(F.type==="radio"||F.type==="checkbox")||F.role==="radio"||F.role==="checkbox"||F.role==="switch")&&F.click(),F.focus({preventScroll:!0})}}}),Z=i||!1,H=e.useMemo(()=>({...l.slot,disabled:Z}),[l.slot,Z]),V={ref:f,...l.props,id:c,htmlFor:u,onClick:v};return d&&("onClick"in V&&(delete V.htmlFor,delete V.onClick),"onClick"in h&&delete h.onClick),k8({ourProps:V,theirProps:h,slot:H,defaultTag:u?RI0:"div",name:l.name||"Label"})}let zI0=f8(DI0),d70=Object.assign(zI0,{}),UI0=e.createContext(()=>{});function BI0({value:t,children:a}){return G0.createElement(UI0.Provider,{value:t},a)}function qI0(t){if(t===null)return{width:0,height:0};let{width:a,height:n}=t.getBoundingClientRect();return{width:a,height:n}}function WI0(t,a=!1){let n=t===null?null:"current"in t?t.current:t,[r,l]=e.useReducer(()=>({}),{}),o=e.useMemo(()=>qI0(n),[n,r]);return l8(()=>{if(!n)return;let i=new ResizeObserver(l);return i.observe(n),()=>{i.disconnect()}},[n]),a?{width:`${o.width}px`,height:`${o.height}px`}:o}let GI0=class extends Map{constructor(a){super(),this.factory=a}get(a){let n=super.get(a);return n===void 0&&(n=this.factory(a),this.set(a,n)),n}};function h70(t,a){let n=t(),r=new Set;return{getSnapshot(){return n},subscribe(l){return r.add(l),()=>r.delete(l)},dispatch(l,...o){let i=a[l].call(n,...o);i&&(n=i,r.forEach(c=>c()))}}}function p70(t){return e.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getSnapshot)}let YI0=new GI0(()=>h70(()=>[],{ADD(t){return this.includes(t)?this:[...this,t]},REMOVE(t){let a=this.indexOf(t);if(a===-1)return this;let n=this.slice();return n.splice(a,1),n}}));function Fs(t,a){let n=YI0.get(a),r=e.useId(),l=p70(n);if(l8(()=>{if(t)return n.dispatch("ADD",r),()=>n.dispatch("REMOVE",r)},[n,t]),!t)return!1;let o=l.indexOf(r),i=l.length;return o===-1&&(o=i,i+=1),o===i-1}let sS=new Map,Ld=new Map;function f70(t){var a;let n=(a=Ld.get(t))!=null?a:0;return Ld.set(t,n+1),n!==0?()=>v70(t):(sS.set(t,{"aria-hidden":t.getAttribute("aria-hidden"),inert:t.inert}),t.setAttribute("aria-hidden","true"),t.inert=!0,()=>v70(t))}function v70(t){var a;let n=(a=Ld.get(t))!=null?a:1;if(n===1?Ld.delete(t):Ld.set(t,n-1),n!==1)return;let r=sS.get(t);r&&(r["aria-hidden"]===null?t.removeAttribute("aria-hidden"):t.setAttribute("aria-hidden",r["aria-hidden"]),t.inert=r.inert,sS.delete(t))}function g70(t,{allowed:a,disallowed:n}={}){let r=Fs(t,"inert-others");l8(()=>{var l,o;if(!r)return;let i=cl();for(let u of(l=n==null?void 0:n())!=null?l:[])u&&i.add(f70(u));let c=(o=a==null?void 0:a())!=null?o:[];for(let u of c){if(!u)continue;let d=q5(u);if(!d)continue;let h=u.parentElement;for(;h&&h!==d.body;){for(let f of h.children)c.some(v=>f.contains(v))||i.add(f70(f));h=h.parentElement}}return i.dispose},[r,a,n])}function uS(t,a,n){let r=W5(l=>{let o=l.getBoundingClientRect();o.x===0&&o.y===0&&o.width===0&&o.height===0&&n()});e.useEffect(()=>{if(!t)return;let l=a===null?null:a instanceof HTMLElement?a:a.current;if(!l)return;let o=cl();if(typeof ResizeObserver<"u"){let i=new ResizeObserver(()=>r.current(l));i.observe(l),o.add(()=>i.disconnect())}if(typeof IntersectionObserver<"u"){let i=new IntersectionObserver(()=>r.current(l));i.observe(l),o.add(()=>i.disconnect())}return()=>o.dispose()},[a,r,t])}let rA=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(t=>`${t}:not([tabindex='-1'])`).join(","),QI0=["[data-autofocus]"].map(t=>`${t}:not([tabindex='-1'])`).join(",");var or=(t=>(t[t.First=1]="First",t[t.Previous=2]="Previous",t[t.Next=4]="Next",t[t.Last=8]="Last",t[t.WrapAround=16]="WrapAround",t[t.NoScroll=32]="NoScroll",t[t.AutoFocus=64]="AutoFocus",t))(or||{}),mS=(t=>(t[t.Error=0]="Error",t[t.Overflow=1]="Overflow",t[t.Success=2]="Success",t[t.Underflow=3]="Underflow",t))(mS||{}),KI0=(t=>(t[t.Previous=-1]="Previous",t[t.Next=1]="Next",t))(KI0||{});function A70(t=document.body){return t==null?[]:Array.from(t.querySelectorAll(rA)).sort((a,n)=>Math.sign((a.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function XI0(t=document.body){return t==null?[]:Array.from(t.querySelectorAll(QI0)).sort((a,n)=>Math.sign((a.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var dS=(t=>(t[t.Strict=0]="Strict",t[t.Loose=1]="Loose",t))(dS||{});function hS(t,a=0){var n;return t===((n=q5(t))==null?void 0:n.body)?!1:sl(a,{0(){return t.matches(rA)},1(){let r=t;for(;r!==null;){if(r.matches(rA))return!0;r=r.parentElement}return!1}})}function Z70(t){let a=q5(t);cl().nextFrame(()=>{a&&!hS(a.activeElement,0)&&ul(t)})}var JI0=(t=>(t[t.Keyboard=0]="Keyboard",t[t.Mouse=1]="Mouse",t))(JI0||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",t=>{t.metaKey||t.altKey||t.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",t=>{t.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:t.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function ul(t){t==null||t.focus({preventScroll:!0})}let eO0=["textarea","input"].join(",");function tO0(t){var a,n;return(n=(a=t==null?void 0:t.matches)==null?void 0:a.call(t,eO0))!=null?n:!1}function H70(t,a=n=>n){return t.slice().sort((n,r)=>{let l=a(n),o=a(r);if(l===null||o===null)return 0;let i=l.compareDocumentPosition(o);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function aO0(t,a){return _s(A70(),a,{relativeTo:t})}function _s(t,a,{sorted:n=!0,relativeTo:r=null,skipElements:l=[]}={}){let o=Array.isArray(t)?t.length>0?t[0].ownerDocument:document:t.ownerDocument,i=Array.isArray(t)?n?H70(t):t:a&64?XI0(t):A70(t);l.length>0&&i.length>1&&(i=i.filter(Z=>!l.some(H=>H!=null&&"current"in H?(H==null?void 0:H.current)===Z:H===Z))),r=r??o.activeElement;let c=(()=>{if(a&5)return 1;if(a&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(a&1)return 0;if(a&2)return Math.max(0,i.indexOf(r))-1;if(a&4)return Math.max(0,i.indexOf(r))+1;if(a&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=a&32?{preventScroll:!0}:{},h=0,f=i.length,v;do{if(h>=f||h+f<=0)return 0;let Z=u+h;if(a&16)Z=(Z+f)%f;else{if(Z<0)return 3;if(Z>=f)return 1}v=i[Z],v==null||v.focus(d),h+=c}while(v!==o.activeElement);return a&6&&tO0(v)&&v.select(),2}function M70(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function nO0(){return/Android/gi.test(window.navigator.userAgent)}function rO0(){return M70()||nO0()}function Sd(t,a,n,r){let l=W5(n);e.useEffect(()=>{if(!t)return;function o(i){l.current(i)}return document.addEventListener(a,o,r),()=>document.removeEventListener(a,o,r)},[t,a,r])}function E70(t,a,n,r){let l=W5(n);e.useEffect(()=>{if(!t)return;function o(i){l.current(i)}return window.addEventListener(a,o,r),()=>window.removeEventListener(a,o,r)},[t,a,r])}const V70=30;function y70(t,a,n){let r=Fs(t,"outside-click"),l=W5(n),o=e.useCallback(function(u,d){if(u.defaultPrevented)return;let h=d(u);if(h===null||!h.getRootNode().contains(h)||!h.isConnected)return;let f=function v(Z){return typeof Z=="function"?v(Z()):Array.isArray(Z)||Z instanceof Set?Z:[Z]}(a);for(let v of f){if(v===null)continue;let Z=v instanceof HTMLElement?v:v.current;if(Z!=null&&Z.contains(h)||u.composed&&u.composedPath().includes(Z))return}return!hS(h,dS.Loose)&&h.tabIndex!==-1&&u.preventDefault(),l.current(u,h)},[l]),i=e.useRef(null);Sd(r,"pointerdown",u=>{var d,h;i.current=((h=(d=u.composedPath)==null?void 0:d.call(u))==null?void 0:h[0])||u.target},!0),Sd(r,"mousedown",u=>{var d,h;i.current=((h=(d=u.composedPath)==null?void 0:d.call(u))==null?void 0:h[0])||u.target},!0),Sd(r,"click",u=>{rO0()||i.current&&(o(u,()=>i.current),i.current=null)},!0);let c=e.useRef({x:0,y:0});Sd(r,"touchstart",u=>{c.current.x=u.touches[0].clientX,c.current.y=u.touches[0].clientY},!0),Sd(r,"touchend",u=>{let d={x:u.changedTouches[0].clientX,y:u.changedTouches[0].clientY};if(!(Math.abs(d.x-c.current.x)>=V70||Math.abs(d.y-c.current.y)>=V70))return o(u,()=>u.target instanceof HTMLElement?u.target:null)},!0),E70(r,"blur",u=>o(u,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function ks(...t){return e.useMemo(()=>q5(...t),[...t])}function b70(t,a,n,r){let l=W5(n);e.useEffect(()=>{t=t??window;function o(i){l.current(i)}return t.addEventListener(a,o,r),()=>t.removeEventListener(a,o,r)},[t,a,r])}function L70(t){var a;if(t.type)return t.type;let n=(a=t.as)!=null?a:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function lO0(t,a){let[n,r]=e.useState(()=>L70(t));return l8(()=>{r(L70(t))},[t.type,t.as]),l8(()=>{n||a.current&&a.current instanceof HTMLButtonElement&&!a.current.hasAttribute("type")&&r("button")},[n,a]),n}function oO0(){let t;return{before({doc:a}){var n;let r=a.documentElement,l=(n=a.defaultView)!=null?n:window;t=Math.max(0,l.innerWidth-r.clientWidth)},after({doc:a,d:n}){let r=a.documentElement,l=Math.max(0,r.clientWidth-r.offsetWidth),o=Math.max(0,t-l);n.style(r,"paddingRight",`${o}px`)}}}function iO0(){return M70()?{before({doc:t,d:a,meta:n}){function r(l){return n.containers.flatMap(o=>o()).some(o=>o.contains(l))}a.microTask(()=>{var l;if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let c=cl();c.style(t.documentElement,"scrollBehavior","auto"),a.add(()=>a.microTask(()=>c.dispose()))}let o=(l=window.scrollY)!=null?l:window.pageYOffset,i=null;a.addEventListener(t,"click",c=>{if(c.target instanceof HTMLElement)try{let u=c.target.closest("a");if(!u)return;let{hash:d}=new URL(u.href),h=t.querySelector(d);h&&!r(h)&&(i=h)}catch{}},!0),a.addEventListener(t,"touchstart",c=>{if(c.target instanceof HTMLElement)if(r(c.target)){let u=c.target;for(;u.parentElement&&r(u.parentElement);)u=u.parentElement;a.style(u,"overscrollBehavior","contain")}else a.style(c.target,"touchAction","none")}),a.addEventListener(t,"touchmove",c=>{if(c.target instanceof HTMLElement){if(c.target.tagName==="INPUT")return;if(r(c.target)){let u=c.target;for(;u.parentElement&&u.dataset.headlessuiPortal!==""&&!(u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth);)u=u.parentElement;u.dataset.headlessuiPortal===""&&c.preventDefault()}else c.preventDefault()}},{passive:!1}),a.add(()=>{var c;let u=(c=window.scrollY)!=null?c:window.pageYOffset;o!==u&&window.scrollTo(0,o),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{}}function cO0(){return{before({doc:t,d:a}){a.style(t.documentElement,"overflow","hidden")}}}function sO0(t){let a={};for(let n of t)Object.assign(a,n(a));return a}let Q5=h70(()=>new Map,{PUSH(t,a){var n;let r=(n=this.get(t))!=null?n:{doc:t,count:0,d:cl(),meta:new Set};return r.count++,r.meta.add(a),this.set(t,r),this},POP(t,a){let n=this.get(t);return n&&(n.count--,n.meta.delete(a)),this},SCROLL_PREVENT({doc:t,d:a,meta:n}){let r={doc:t,d:a,meta:sO0(n)},l=[iO0(),oO0(),cO0()];l.forEach(({before:o})=>o==null?void 0:o(r)),l.forEach(({after:o})=>o==null?void 0:o(r))},SCROLL_ALLOW({d:t}){t.dispose()},TEARDOWN({doc:t}){this.delete(t)}});Q5.subscribe(()=>{let t=Q5.getSnapshot(),a=new Map;for(let[n]of t)a.set(n,n.documentElement.style.overflow);for(let n of t.values()){let r=a.get(n.doc)==="hidden",l=n.count!==0;(l&&!r||!l&&r)&&Q5.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Q5.dispatch("TEARDOWN",n)}});function uO0(t,a,n=()=>({containers:[]})){let r=p70(Q5),l=a?r.get(a):void 0,o=l?l.count>0:!1;return l8(()=>{if(!(!a||!t))return Q5.dispatch("PUSH",a,n),()=>Q5.dispatch("POP",a,n)},[t,a]),o}function S70(t,a,n=()=>[document.body]){let r=Fs(t,"scroll-lock");uO0(r,a,l=>{var o;return{containers:[...(o=l.containers)!=null?o:[],n]}})}function F70(t){return[t.screenX,t.screenY]}function mO0(){let t=e.useRef([-1,-1]);return{wasMoved(a){let n=F70(a);return t.current[0]===n[0]&&t.current[1]===n[1]?!1:(t.current=n,!0)},update(a){t.current=F70(a)}}}function dO0(t){let a={called:!1};return(...n)=>{if(!a.called)return a.called=!0,t(...n)}}function hO0(t=0){let[a,n]=e.useState(t),r=e.useCallback(u=>n(u),[a]),l=e.useCallback(u=>n(d=>d|u),[a]),o=e.useCallback(u=>(a&u)===u,[a]),i=e.useCallback(u=>n(d=>d&~u),[n]),c=e.useCallback(u=>n(d=>d^u),[n]);return{flags:a,setFlag:r,addFlag:l,hasFlag:o,removeFlag:i,toggleFlag:c}}var pO0=(t=>(t[t.None=0]="None",t[t.Closed=1]="Closed",t[t.Enter=2]="Enter",t[t.Leave=4]="Leave",t))(pO0||{});function _70(t){let a={};for(let n in t)t[n]===!0&&(a[`data-${n}`]="");return a}function k70(t,a,n,r){let[l,o]=e.useState(n),{hasFlag:i,addFlag:c,removeFlag:u}=hO0(t&&l?3:0),d=e.useRef(!1),h=e.useRef(!1),f=bs();return l8(function v(){var Z;if(!t)return;n&&o(!0);let H=a.current;return H?((Z=r==null?void 0:r.start)==null||Z.call(r,n),fO0(H,{inFlight:d,prepare(){h.current?h.current=!1:h.current=d.current,d.current=!0,!h.current&&(n?(c(3),u(4)):(c(4),u(2)))},run(){h.current?n?(u(3),c(4)):(u(4),c(3)):n?u(1):c(1)},done(){var V;h.current&&typeof H.getAnimations=="function"&&H.getAnimations().length>0||(d.current=!1,u(7),n||o(!1),(V=r==null?void 0:r.end)==null||V.call(r,n))}})):n?(c(3),f.nextFrame(()=>v())):void 0},[t,n,a,f]),t?[l,{closed:i(1),enter:i(2),leave:i(4),transition:i(2)||i(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function fO0(t,{prepare:a,run:n,done:r,inFlight:l}){let o=cl();return gO0(t,{prepare:a,inFlight:l}),o.nextFrame(()=>{o.add(vO0(t,r)),n()}),o.dispose}function vO0(t,a){let n=dO0(a),r=cl();if(!t)return r.dispose;let{transitionDuration:l,transitionDelay:o}=getComputedStyle(t),[i,c]=[l,o].map(d=>{let[h=0]=d.split(",").filter(Boolean).map(f=>f.includes("ms")?parseFloat(f):parseFloat(f)*1e3).sort((f,v)=>v-f);return h}),u=i+c;if(u!==0){let d=r.group(h=>{let f=h.setTimeout(()=>{n(),h.dispose()},u);h.addEventListener(t,"transitionrun",v=>{v.target===v.currentTarget&&(f(),h.addEventListener(t,"transitioncancel",Z=>{Z.target===Z.currentTarget&&(n(),d())}))})});r.addEventListener(t,"transitionend",h=>{h.target===h.currentTarget&&(n(),r.dispose())})}else n();return r.dispose}function gO0(t,{inFlight:a,prepare:n}){if(a!=null&&a.current){n();return}let r=t.style.transition;t.style.transition="none",n(),t.offsetHeight,t.style.transition=r}function AO0(t,{container:a,accept:n,walk:r}){let l=e.useRef(n),o=e.useRef(r);e.useEffect(()=>{l.current=n,o.current=r},[n,r]),l8(()=>{if(!a||!t)return;let i=q5(a);if(!i)return;let c=l.current,u=o.current,d=Object.assign(f=>c(f),{acceptNode:c}),h=i.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,d,!1);for(;h.nextNode();)u(h.currentNode)},[a,t,l,o])}function pS(t,a){let n=e.useRef([]),r=Xe(t);e.useEffect(()=>{let l=[...n.current];for(let[o,i]of a.entries())if(n.current[o]!==i){let c=r(a,l);return n.current=a,c}},[r,...a])}function ws(t){return w70(t)?(t.nodeName||"").toLowerCase():"#document"}function W4(t){var a;return(t==null||(a=t.ownerDocument)==null?void 0:a.defaultView)||window}function y3(t){var a;return(a=(w70(t)?t.ownerDocument:t.document)||window.document)==null?void 0:a.documentElement}function w70(t){return t instanceof Node||t instanceof W4(t).Node}function i6(t){return t instanceof Element||t instanceof W4(t).Element}function ml(t){return t instanceof HTMLElement||t instanceof W4(t).HTMLElement}function C70(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof W4(t).ShadowRoot}function Fd(t){const{overflow:a,overflowX:n,overflowY:r,display:l}=ir(t);return/auto|scroll|overlay|hidden|clip/.test(a+r+n)&&!["inline","contents"].includes(l)}function ZO0(t){return["table","td","th"].includes(ws(t))}function lA(t){return[":popover-open",":modal"].some(a=>{try{return t.matches(a)}catch{return!1}})}function fS(t){const a=vS(),n=i6(t)?ir(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!a&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!a&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function HO0(t){let a=qo(t);for(;ml(a)&&!Cs(a);){if(fS(a))return a;if(lA(a))return null;a=qo(a)}return null}function vS(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Cs(t){return["html","body","#document"].includes(ws(t))}function ir(t){return W4(t).getComputedStyle(t)}function oA(t){return i6(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function qo(t){if(ws(t)==="html")return t;const a=t.assignedSlot||t.parentNode||C70(t)&&t.host||y3(t);return C70(a)?a.host:a}function N70(t){const a=qo(t);return Cs(a)?t.ownerDocument?t.ownerDocument.body:t.body:ml(a)&&Fd(a)?a:N70(a)}function _d(t,a,n){var r;a===void 0&&(a=[]),n===void 0&&(n=!0);const l=N70(t),o=l===((r=t.ownerDocument)==null?void 0:r.body),i=W4(l);return o?a.concat(i,i.visualViewport||[],Fd(l)?l:[],i.frameElement&&n?_d(i.frameElement):[]):a.concat(l,_d(l,[],n))}function MO0(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(a=>{let{brand:n,version:r}=a;return n+"/"+r}).join(" "):navigator.userAgent}const Wo=Math.min,G4=Math.max,iA=Math.round,cA=Math.floor,Go=t=>({x:t,y:t}),EO0={left:"right",right:"left",bottom:"top",top:"bottom"},VO0={start:"end",end:"start"};function P70(t,a,n){return G4(t,Wo(a,n))}function Ns(t,a){return typeof t=="function"?t(a):t}function Yo(t){return t.split("-")[0]}function kd(t){return t.split("-")[1]}function $70(t){return t==="x"?"y":"x"}function T70(t){return t==="y"?"height":"width"}function K5(t){return["top","bottom"].includes(Yo(t))?"y":"x"}function I70(t){return $70(K5(t))}function yO0(t,a,n){n===void 0&&(n=!1);const r=kd(t),l=I70(t),o=T70(l);let i=l==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return a.reference[o]>a.floating[o]&&(i=sA(i)),[i,sA(i)]}function bO0(t){const a=sA(t);return[gS(t),a,gS(a)]}function gS(t){return t.replace(/start|end/g,a=>VO0[a])}function LO0(t,a,n){const r=["left","right"],l=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(t){case"top":case"bottom":return n?a?l:r:a?r:l;case"left":case"right":return a?o:i;default:return[]}}function SO0(t,a,n,r){const l=kd(t);let o=LO0(Yo(t),n==="start",r);return l&&(o=o.map(i=>i+"-"+l),a&&(o=o.concat(o.map(gS)))),o}function sA(t){return t.replace(/left|right|bottom|top/g,a=>EO0[a])}function FO0(t){return{top:0,right:0,bottom:0,left:0,...t}}function _O0(t){return typeof t!="number"?FO0(t):{top:t,right:t,bottom:t,left:t}}function uA(t){const{x:a,y:n,width:r,height:l}=t;return{width:r,height:l,top:n,left:a,right:a+r,bottom:n+l,x:a,y:n}}function O70(t,a,n){let{reference:r,floating:l}=t;const o=K5(a),i=I70(a),c=T70(i),u=Yo(a),d=o==="y",h=r.x+r.width/2-l.width/2,f=r.y+r.height/2-l.height/2,v=r[c]/2-l[c]/2;let Z;switch(u){case"top":Z={x:h,y:r.y-l.height};break;case"bottom":Z={x:h,y:r.y+r.height};break;case"right":Z={x:r.x+r.width,y:f};break;case"left":Z={x:r.x-l.width,y:f};break;default:Z={x:r.x,y:r.y}}switch(kd(a)){case"start":Z[i]-=v*(n&&d?-1:1);break;case"end":Z[i]+=v*(n&&d?-1:1);break}return Z}const kO0=async(t,a,n)=>{const{placement:r="bottom",strategy:l="absolute",middleware:o=[],platform:i}=n,c=o.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(a));let d=await i.getElementRects({reference:t,floating:a,strategy:l}),{x:h,y:f}=O70(d,r,u),v=r,Z={},H=0;for(let V=0;V<c.length;V++){const{name:b,fn:S}=c[V],{x:F,y:w,data:$,reset:C}=await S({x:h,y:f,initialPlacement:r,placement:v,strategy:l,middlewareData:Z,rects:d,platform:i,elements:{reference:t,floating:a}});h=F??h,f=w??f,Z={...Z,[b]:{...Z[b],...$}},C&&H<=50&&(H++,typeof C=="object"&&(C.placement&&(v=C.placement),C.rects&&(d=C.rects===!0?await i.getElementRects({reference:t,floating:a,strategy:l}):C.rects),{x:h,y:f}=O70(d,v,u)),V=-1)}return{x:h,y:f,placement:v,strategy:l,middlewareData:Z}};async function mA(t,a){var n;a===void 0&&(a={});const{x:r,y:l,platform:o,rects:i,elements:c,strategy:u}=t,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:f="floating",altBoundary:v=!1,padding:Z=0}=Ns(a,t),H=_O0(Z),b=c[v?f==="floating"?"reference":"floating":f],S=uA(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:d,rootBoundary:h,strategy:u})),F=f==="floating"?{x:r,y:l,width:i.floating.width,height:i.floating.height}:i.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),$=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},C=uA(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:F,offsetParent:w,strategy:u}):F);return{top:(S.top-C.top+H.top)/$.y,bottom:(C.bottom-S.bottom+H.bottom)/$.y,left:(S.left-C.left+H.left)/$.x,right:(C.right-S.right+H.right)/$.x}}const wO0=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(a){var n,r;const{placement:l,middlewareData:o,rects:i,initialPlacement:c,platform:u,elements:d}=a,{mainAxis:h=!0,crossAxis:f=!0,fallbackPlacements:v,fallbackStrategy:Z="bestFit",fallbackAxisSideDirection:H="none",flipAlignment:V=!0,...b}=Ns(t,a);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const S=Yo(l),F=K5(c),w=Yo(c)===c,$=await(u.isRTL==null?void 0:u.isRTL(d.floating)),C=v||(w||!V?[sA(c)]:bO0(c)),P=H!=="none";!v&&P&&C.push(...SO0(c,V,H,$));const O=[c,...C],z=await mA(a,b),G=[];let R=((r=o.flip)==null?void 0:r.overflows)||[];if(h&&G.push(z[S]),f){const l0=yO0(l,i,$);G.push(z[l0[0]],z[l0[1]])}if(R=[...R,{placement:l,overflows:G}],!G.every(l0=>l0<=0)){var J,Y;const l0=(((J=o.flip)==null?void 0:J.index)||0)+1,X=O[l0];if(X)return{data:{index:l0,overflows:R},reset:{placement:X}};let P0=(Y=R.filter(A0=>A0.overflows[0]<=0).sort((A0,d0)=>A0.overflows[1]-d0.overflows[1])[0])==null?void 0:Y.placement;if(!P0)switch(Z){case"bestFit":{var n0;const A0=(n0=R.filter(d0=>{if(P){const L0=K5(d0.placement);return L0===F||L0==="y"}return!0}).map(d0=>[d0.placement,d0.overflows.filter(L0=>L0>0).reduce((L0,j)=>L0+j,0)]).sort((d0,L0)=>d0[1]-L0[1])[0])==null?void 0:n0[0];A0&&(P0=A0);break}case"initialPlacement":P0=c;break}if(l!==P0)return{reset:{placement:P0}}}return{}}}};async function CO0(t,a){const{placement:n,platform:r,elements:l}=t,o=await(r.isRTL==null?void 0:r.isRTL(l.floating)),i=Yo(n),c=kd(n),u=K5(n)==="y",d=["left","top"].includes(i)?-1:1,h=o&&u?-1:1,f=Ns(a,t);let{mainAxis:v,crossAxis:Z,alignmentAxis:H}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return c&&typeof H=="number"&&(Z=c==="end"?H*-1:H),u?{x:Z*h,y:v*d}:{x:v*d,y:Z*h}}const NO0=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(a){var n,r;const{x:l,y:o,placement:i,middlewareData:c}=a,u=await CO0(a,t);return i===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:l+u.x,y:o+u.y,data:{...u,placement:i}}}}},PO0=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(a){const{x:n,y:r,placement:l}=a,{mainAxis:o=!0,crossAxis:i=!1,limiter:c={fn:b=>{let{x:S,y:F}=b;return{x:S,y:F}}},...u}=Ns(t,a),d={x:n,y:r},h=await mA(a,u),f=K5(Yo(l)),v=$70(f);let Z=d[v],H=d[f];if(o){const b=v==="y"?"top":"left",S=v==="y"?"bottom":"right",F=Z+h[b],w=Z-h[S];Z=P70(F,Z,w)}if(i){const b=f==="y"?"top":"left",S=f==="y"?"bottom":"right",F=H+h[b],w=H-h[S];H=P70(F,H,w)}const V=c.fn({...a,[v]:Z,[f]:H});return{...V,data:{x:V.x-n,y:V.y-r}}}}},$O0=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(a){const{placement:n,rects:r,platform:l,elements:o}=a,{apply:i=()=>{},...c}=Ns(t,a),u=await mA(a,c),d=Yo(n),h=kd(n),f=K5(n)==="y",{width:v,height:Z}=r.floating;let H,V;d==="top"||d==="bottom"?(H=d,V=h===(await(l.isRTL==null?void 0:l.isRTL(o.floating))?"start":"end")?"left":"right"):(V=d,H=h==="end"?"top":"bottom");const b=Z-u.top-u.bottom,S=v-u.left-u.right,F=Wo(Z-u[H],b),w=Wo(v-u[V],S),$=!a.middlewareData.shift;let C=F,P=w;if(f?P=h||$?Wo(w,S):S:C=h||$?Wo(F,b):b,$&&!h){const z=G4(u.left,0),G=G4(u.right,0),R=G4(u.top,0),J=G4(u.bottom,0);f?P=v-2*(z!==0||G!==0?z+G:G4(u.left,u.right)):C=Z-2*(R!==0||J!==0?R+J:G4(u.top,u.bottom))}await i({...a,availableWidth:P,availableHeight:C});const O=await l.getDimensions(o.floating);return v!==O.width||Z!==O.height?{reset:{rects:!0}}:{}}}};function x70(t){const a=ir(t);let n=parseFloat(a.width)||0,r=parseFloat(a.height)||0;const l=ml(t),o=l?t.offsetWidth:n,i=l?t.offsetHeight:r,c=iA(n)!==o||iA(r)!==i;return c&&(n=o,r=i),{width:n,height:r,$:c}}function AS(t){return i6(t)?t:t.contextElement}function Ps(t){const a=AS(t);if(!ml(a))return Go(1);const n=a.getBoundingClientRect(),{width:r,height:l,$:o}=x70(a);let i=(o?iA(n.width):n.width)/r,c=(o?iA(n.height):n.height)/l;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const TO0=Go(0);function j70(t){const a=W4(t);return!vS()||!a.visualViewport?TO0:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function IO0(t,a,n){return a===void 0&&(a=!1),!n||a&&n!==W4(t)?!1:a}function X5(t,a,n,r){a===void 0&&(a=!1),n===void 0&&(n=!1);const l=t.getBoundingClientRect(),o=AS(t);let i=Go(1);a&&(r?i6(r)&&(i=Ps(r)):i=Ps(t));const c=IO0(o,n,r)?j70(o):Go(0);let u=(l.left+c.x)/i.x,d=(l.top+c.y)/i.y,h=l.width/i.x,f=l.height/i.y;if(o){const v=W4(o),Z=r&&i6(r)?W4(r):r;let H=v,V=H.frameElement;for(;V&&r&&Z!==H;){const b=Ps(V),S=V.getBoundingClientRect(),F=ir(V),w=S.left+(V.clientLeft+parseFloat(F.paddingLeft))*b.x,$=S.top+(V.clientTop+parseFloat(F.paddingTop))*b.y;u*=b.x,d*=b.y,h*=b.x,f*=b.y,u+=w,d+=$,H=W4(V),V=H.frameElement}}return uA({width:h,height:f,x:u,y:d})}function OO0(t){let{elements:a,rect:n,offsetParent:r,strategy:l}=t;const o=l==="fixed",i=y3(r),c=a?lA(a.floating):!1;if(r===i||c&&o)return n;let u={scrollLeft:0,scrollTop:0},d=Go(1);const h=Go(0),f=ml(r);if((f||!f&&!o)&&((ws(r)!=="body"||Fd(i))&&(u=oA(r)),ml(r))){const v=X5(r);d=Ps(r),h.x=v.x+r.clientLeft,h.y=v.y+r.clientTop}return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+h.x,y:n.y*d.y-u.scrollTop*d.y+h.y}}function xO0(t){return Array.from(t.getClientRects())}function R70(t){return X5(y3(t)).left+oA(t).scrollLeft}function jO0(t){const a=y3(t),n=oA(t),r=t.ownerDocument.body,l=G4(a.scrollWidth,a.clientWidth,r.scrollWidth,r.clientWidth),o=G4(a.scrollHeight,a.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+R70(t);const c=-n.scrollTop;return ir(r).direction==="rtl"&&(i+=G4(a.clientWidth,r.clientWidth)-l),{width:l,height:o,x:i,y:c}}function RO0(t,a){const n=W4(t),r=y3(t),l=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,c=0,u=0;if(l){o=l.width,i=l.height;const d=vS();(!d||d&&a==="fixed")&&(c=l.offsetLeft,u=l.offsetTop)}return{width:o,height:i,x:c,y:u}}function DO0(t,a){const n=X5(t,!0,a==="fixed"),r=n.top+t.clientTop,l=n.left+t.clientLeft,o=ml(t)?Ps(t):Go(1),i=t.clientWidth*o.x,c=t.clientHeight*o.y,u=l*o.x,d=r*o.y;return{width:i,height:c,x:u,y:d}}function D70(t,a,n){let r;if(a==="viewport")r=RO0(t,n);else if(a==="document")r=jO0(y3(t));else if(i6(a))r=DO0(a,n);else{const l=j70(t);r={...a,x:a.x-l.x,y:a.y-l.y}}return uA(r)}function z70(t,a){const n=qo(t);return n===a||!i6(n)||Cs(n)?!1:ir(n).position==="fixed"||z70(n,a)}function zO0(t,a){const n=a.get(t);if(n)return n;let r=_d(t,[],!1).filter(c=>i6(c)&&ws(c)!=="body"),l=null;const o=ir(t).position==="fixed";let i=o?qo(t):t;for(;i6(i)&&!Cs(i);){const c=ir(i),u=fS(i);!u&&c.position==="fixed"&&(l=null),(o?!u&&!l:!u&&c.position==="static"&&!!l&&["absolute","fixed"].includes(l.position)||Fd(i)&&!u&&z70(t,i))?r=r.filter(h=>h!==i):l=c,i=qo(i)}return a.set(t,r),r}function UO0(t){let{element:a,boundary:n,rootBoundary:r,strategy:l}=t;const i=[...n==="clippingAncestors"?lA(a)?[]:zO0(a,this._c):[].concat(n),r],c=i[0],u=i.reduce((d,h)=>{const f=D70(a,h,l);return d.top=G4(f.top,d.top),d.right=Wo(f.right,d.right),d.bottom=Wo(f.bottom,d.bottom),d.left=G4(f.left,d.left),d},D70(a,c,l));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function BO0(t){const{width:a,height:n}=x70(t);return{width:a,height:n}}function qO0(t,a,n){const r=ml(a),l=y3(a),o=n==="fixed",i=X5(t,!0,o,a);let c={scrollLeft:0,scrollTop:0};const u=Go(0);if(r||!r&&!o)if((ws(a)!=="body"||Fd(l))&&(c=oA(a)),r){const f=X5(a,!0,o,a);u.x=f.x+a.clientLeft,u.y=f.y+a.clientTop}else l&&(u.x=R70(l));const d=i.left+c.scrollLeft-u.x,h=i.top+c.scrollTop-u.y;return{x:d,y:h,width:i.width,height:i.height}}function ZS(t){return ir(t).position==="static"}function U70(t,a){return!ml(t)||ir(t).position==="fixed"?null:a?a(t):t.offsetParent}function B70(t,a){const n=W4(t);if(lA(t))return n;if(!ml(t)){let l=qo(t);for(;l&&!Cs(l);){if(i6(l)&&!ZS(l))return l;l=qo(l)}return n}let r=U70(t,a);for(;r&&ZO0(r)&&ZS(r);)r=U70(r,a);return r&&Cs(r)&&ZS(r)&&!fS(r)?n:r||HO0(t)||n}const WO0=async function(t){const a=this.getOffsetParent||B70,n=this.getDimensions,r=await n(t.floating);return{reference:qO0(t.reference,await a(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function GO0(t){return ir(t).direction==="rtl"}const YO0={convertOffsetParentRelativeRectToViewportRelativeRect:OO0,getDocumentElement:y3,getClippingRect:UO0,getOffsetParent:B70,getElementRects:WO0,getClientRects:xO0,getDimensions:BO0,getScale:Ps,isElement:i6,isRTL:GO0};function QO0(t,a){let n=null,r;const l=y3(t);function o(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),o();const{left:d,top:h,width:f,height:v}=t.getBoundingClientRect();if(c||a(),!f||!v)return;const Z=cA(h),H=cA(l.clientWidth-(d+f)),V=cA(l.clientHeight-(h+v)),b=cA(d),F={rootMargin:-Z+"px "+-H+"px "+-V+"px "+-b+"px",threshold:G4(0,Wo(1,u))||1};let w=!0;function $(C){const P=C[0].intersectionRatio;if(P!==u){if(!w)return i();P?i(!1,P):r=setTimeout(()=>{i(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver($,{...F,root:l.ownerDocument})}catch{n=new IntersectionObserver($,F)}n.observe(t)}return i(!0),o}function KO0(t,a,n,r){r===void 0&&(r={});const{ancestorScroll:l=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,d=AS(t),h=l||o?[...d?_d(d):[],..._d(a)]:[];h.forEach(S=>{l&&S.addEventListener("scroll",n,{passive:!0}),o&&S.addEventListener("resize",n)});const f=d&&c?QO0(d,n):null;let v=-1,Z=null;i&&(Z=new ResizeObserver(S=>{let[F]=S;F&&F.target===d&&Z&&(Z.unobserve(a),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var w;(w=Z)==null||w.observe(a)})),n()}),d&&!u&&Z.observe(d),Z.observe(a));let H,V=u?X5(t):null;u&&b();function b(){const S=X5(t);V&&(S.x!==V.x||S.y!==V.y||S.width!==V.width||S.height!==V.height)&&n(),V=S,H=requestAnimationFrame(b)}return n(),()=>{var S;h.forEach(F=>{l&&F.removeEventListener("scroll",n),o&&F.removeEventListener("resize",n)}),f==null||f(),(S=Z)==null||S.disconnect(),Z=null,u&&cancelAnimationFrame(H)}}const HS=mA,XO0=NO0,JO0=PO0,ex0=wO0,tx0=$O0,ax0=(t,a,n)=>{const r=new Map,l={platform:YO0,...n},o={...l.platform,_c:r};return kO0(t,a,{...l,platform:o})};var dA=typeof document<"u"?e.useLayoutEffect:e.useEffect;function hA(t,a){if(t===a)return!0;if(typeof t!=typeof a)return!1;if(typeof t=="function"&&t.toString()===a.toString())return!0;let n,r,l;if(t&&a&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==a.length)return!1;for(r=n;r--!==0;)if(!hA(t[r],a[r]))return!1;return!0}if(l=Object.keys(t),n=l.length,n!==Object.keys(a).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(a,l[r]))return!1;for(r=n;r--!==0;){const o=l[r];if(!(o==="_owner"&&t.$$typeof)&&!hA(t[o],a[o]))return!1}return!0}return t!==t&&a!==a}function q70(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function W70(t,a){const n=q70(t);return Math.round(a*n)/n}function G70(t){const a=e.useRef(t);return dA(()=>{a.current=t}),a}function nx0(t){t===void 0&&(t={});const{placement:a="bottom",strategy:n="absolute",middleware:r=[],platform:l,elements:{reference:o,floating:i}={},transform:c=!0,whileElementsMounted:u,open:d}=t,[h,f]=e.useState({x:0,y:0,strategy:n,placement:a,middlewareData:{},isPositioned:!1}),[v,Z]=e.useState(r);hA(v,r)||Z(r);const[H,V]=e.useState(null),[b,S]=e.useState(null),F=e.useCallback(A0=>{A0!==P.current&&(P.current=A0,V(A0))},[]),w=e.useCallback(A0=>{A0!==O.current&&(O.current=A0,S(A0))},[]),$=o||H,C=i||b,P=e.useRef(null),O=e.useRef(null),z=e.useRef(h),G=u!=null,R=G70(u),J=G70(l),Y=e.useCallback(()=>{if(!P.current||!O.current)return;const A0={placement:a,strategy:n,middleware:v};J.current&&(A0.platform=J.current),ax0(P.current,O.current,A0).then(d0=>{const L0={...d0,isPositioned:!0};n0.current&&!hA(z.current,L0)&&(z.current=L0,l6.flushSync(()=>{f(L0)}))})},[v,a,n,J]);dA(()=>{d===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,f(A0=>({...A0,isPositioned:!1})))},[d]);const n0=e.useRef(!1);dA(()=>(n0.current=!0,()=>{n0.current=!1}),[]),dA(()=>{if($&&(P.current=$),C&&(O.current=C),$&&C){if(R.current)return R.current($,C,Y);Y()}},[$,C,Y,R,G]);const l0=e.useMemo(()=>({reference:P,floating:O,setReference:F,setFloating:w}),[F,w]),X=e.useMemo(()=>({reference:$,floating:C}),[$,C]),P0=e.useMemo(()=>{const A0={position:n,left:0,top:0};if(!X.floating)return A0;const d0=W70(X.floating,h.x),L0=W70(X.floating,h.y);return c?{...A0,transform:"translate("+d0+"px, "+L0+"px)",...q70(X.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:d0,top:L0}},[n,c,X.floating,h.x,h.y]);return e.useMemo(()=>({...h,update:Y,refs:l0,elements:X,floatingStyles:P0}),[h,Y,l0,X,P0])}const Y70=(t,a)=>({...XO0(t),options:[t,a]}),rx0=(t,a)=>({...JO0(t),options:[t,a]}),lx0=(t,a)=>({...ex0(t),options:[t,a]}),ox0=(t,a)=>({...tx0(t),options:[t,a]});var pA={};const Q70={...Wm},ix0=Q70.useInsertionEffect||(t=>t());function K70(t){const a=e.useRef(()=>{if(pA.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return ix0(()=>{a.current=t}),e.useCallback(function(){for(var n=arguments.length,r=new Array(n),l=0;l<n;l++)r[l]=arguments[l];return a.current==null?void 0:a.current(...r)},[])}var MS=typeof document<"u"?e.useLayoutEffect:e.useEffect;let X70=!1,cx0=0;const J70=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+cx0++;function sx0(){const[t,a]=e.useState(()=>X70?J70():void 0);return MS(()=>{t==null&&a(J70())},[]),e.useEffect(()=>{X70=!0},[]),t}const ux0=Q70.useId||sx0;let wd;pA.NODE_ENV!=="production"&&(wd=new Set);function mx0(){for(var t,a=arguments.length,n=new Array(a),r=0;r<a;r++)n[r]=arguments[r];const l="Floating UI: "+n.join(" ");if(!((t=wd)!=null&&t.has(l))){var o;(o=wd)==null||o.add(l),console.warn(l)}}function dx0(){for(var t,a=arguments.length,n=new Array(a),r=0;r<a;r++)n[r]=arguments[r];const l="Floating UI: "+n.join(" ");if(!((t=wd)!=null&&t.has(l))){var o;(o=wd)==null||o.add(l),console.error(l)}}function hx0(){const t=new Map;return{emit(a,n){var r;(r=t.get(a))==null||r.forEach(l=>l(n))},on(a,n){t.set(a,[...t.get(a)||[],n])},off(a,n){var r;t.set(a,((r=t.get(a))==null?void 0:r.filter(l=>l!==n))||[])}}}const px0=e.createContext(null),fx0=e.createContext(null),vx0=()=>{var t;return((t=e.useContext(px0))==null?void 0:t.id)||null},gx0=()=>e.useContext(fx0);function Ax0(t){const{open:a=!1,onOpenChange:n,elements:r}=t,l=ux0(),o=e.useRef({}),[i]=e.useState(()=>hx0()),c=vx0()!=null;if(pA.NODE_ENV!=="production"){const Z=r.reference;Z&&!i6(Z)&&dx0("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[u,d]=e.useState(r.reference),h=K70((Z,H,V)=>{o.current.openEvent=Z?H:void 0,i.emit("openchange",{open:Z,event:H,reason:V,nested:c}),n==null||n(Z,H,V)}),f=e.useMemo(()=>({setPositionReference:d}),[]),v=e.useMemo(()=>({reference:u||r.reference||null,floating:r.floating||null,domReference:r.reference}),[u,r.reference,r.floating]);return e.useMemo(()=>({dataRef:o,open:a,onOpenChange:h,elements:v,events:i,floatingId:l,refs:f}),[a,h,v,i,l,f])}function Zx0(t){t===void 0&&(t={});const{nodeId:a}=t,n=Ax0({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,l=r.elements,[o,i]=e.useState(null),[c,u]=e.useState(null),h=(l==null?void 0:l.reference)||o,f=e.useRef(null),v=gx0();MS(()=>{h&&(f.current=h)},[h]);const Z=nx0({...t,elements:{...l,...c&&{reference:c}}}),H=e.useCallback(w=>{const $=i6(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;u($),Z.refs.setReference($)},[Z.refs]),V=e.useCallback(w=>{(i6(w)||w===null)&&(f.current=w,i(w)),(i6(Z.refs.reference.current)||Z.refs.reference.current===null||w!==null&&!i6(w))&&Z.refs.setReference(w)},[Z.refs]),b=e.useMemo(()=>({...Z.refs,setReference:V,setPositionReference:H,domReference:f}),[Z.refs,V,H]),S=e.useMemo(()=>({...Z.elements,domReference:h}),[Z.elements,h]),F=e.useMemo(()=>({...Z,...r,refs:b,elements:S,nodeId:a}),[Z,b,S,a,r]);return MS(()=>{r.dataRef.current.floatingContext=F;const w=v==null?void 0:v.nodesRef.current.find($=>$.id===a);w&&(w.context=F)}),e.useMemo(()=>({...Z,context:F,refs:b,elements:S}),[Z,b,S,F])}const ec0="active",tc0="selected";function ES(t,a,n){const r=new Map,l=n==="item";let o=t;if(l&&t){const{[ec0]:i,[tc0]:c,...u}=t;o=u}return{...n==="floating"&&{tabIndex:-1},...o,...a.map(i=>{const c=i?i[n]:null;return typeof c=="function"?t?c(t):null:c}).concat(t).reduce((i,c)=>(c&&Object.entries(c).forEach(u=>{let[d,h]=u;if(!(l&&[ec0,tc0].includes(d)))if(d.indexOf("on")===0){if(r.has(d)||r.set(d,[]),typeof h=="function"){var f;(f=r.get(d))==null||f.push(h),i[d]=function(){for(var v,Z=arguments.length,H=new Array(Z),V=0;V<Z;V++)H[V]=arguments[V];return(v=r.get(d))==null?void 0:v.map(b=>b(...H)).find(b=>b!==void 0)}}}else i[d]=h}),i),{})}}function Hx0(t){t===void 0&&(t=[]);const a=t.map(c=>c==null?void 0:c.reference),n=t.map(c=>c==null?void 0:c.floating),r=t.map(c=>c==null?void 0:c.item),l=e.useCallback(c=>ES(c,t,"reference"),a),o=e.useCallback(c=>ES(c,t,"floating"),n),i=e.useCallback(c=>ES(c,t,"item"),r);return e.useMemo(()=>({getReferenceProps:l,getFloatingProps:o,getItemProps:i}),[l,o,i])}function ac0(t,a){return{...t,rects:{...t.rects,floating:{...t.rects.floating,height:a}}}}const Mx0=t=>({name:"inner",options:t,async fn(a){const{listRef:n,overflowRef:r,onFallbackChange:l,offset:o=0,index:i=0,minItemsVisible:c=4,referenceOverflowThreshold:u=0,scrollRef:d,...h}=Ns(t,a),{rects:f,elements:{floating:v}}=a,Z=n.current[i];if(pA.NODE_ENV!=="production"&&(a.placement.startsWith("bottom")||mx0('`placement` side must be "bottom" when using the `inner`',"middleware.")),!Z)return{};const H={...a,...await Y70(-Z.offsetTop-v.clientTop-f.reference.height/2-Z.offsetHeight/2-o).fn(a)},V=(d==null?void 0:d.current)||v,b=await HS(ac0(H,V.scrollHeight),h),S=await HS(H,{...h,elementContext:"reference"}),F=Math.max(0,b.top),w=H.y+F,$=Math.max(0,V.scrollHeight-F-Math.max(0,b.bottom));return V.style.maxHeight=$+"px",V.scrollTop=F,l&&(V.offsetHeight<Z.offsetHeight*Math.min(c,n.current.length-1)-1||S.top>=-u||S.bottom>=-u?l6.flushSync(()=>l(!0)):l6.flushSync(()=>l(!1))),r&&(r.current=await HS(ac0({...H,y:w},V.offsetHeight),h)),{y:w}}});function Ex0(t,a){const{open:n,elements:r}=t,{enabled:l=!0,overflowRef:o,scrollRef:i,onChange:c}=a,u=K70(c),d=e.useRef(!1),h=e.useRef(null),f=e.useRef(null);e.useEffect(()=>{if(!l)return;function Z(V){if(V.ctrlKey||!H||o.current==null)return;const b=V.deltaY,S=o.current.top>=-.5,F=o.current.bottom>=-.5,w=H.scrollHeight-H.clientHeight,$=b<0?-1:1,C=b<0?"max":"min";H.scrollHeight<=H.clientHeight||(!S&&b>0||!F&&b<0?(V.preventDefault(),l6.flushSync(()=>{u(P=>P+Math[C](b,w*$))})):/firefox/i.test(MO0())&&(H.scrollTop+=b))}const H=(i==null?void 0:i.current)||r.floating;if(n&&H)return H.addEventListener("wheel",Z),requestAnimationFrame(()=>{h.current=H.scrollTop,o.current!=null&&(f.current={...o.current})}),()=>{h.current=null,f.current=null,H.removeEventListener("wheel",Z)}},[l,n,r.floating,o,i,u]);const v=e.useMemo(()=>({onKeyDown(){d.current=!0},onWheel(){d.current=!1},onPointerMove(){d.current=!1},onScroll(){const Z=(i==null?void 0:i.current)||r.floating;if(!(!o.current||!Z||!d.current)){if(h.current!==null){const H=Z.scrollTop-h.current;(o.current.bottom<-.5&&H<-1||o.current.top<-.5&&H>1)&&l6.flushSync(()=>u(V=>V+H))}requestAnimationFrame(()=>{h.current=Z.scrollTop})}}}),[r.floating,u,o,i]);return e.useMemo(()=>l?{floating:v}:{},[l,v])}let $s=e.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});$s.displayName="FloatingContext";let VS=e.createContext(null);VS.displayName="PlacementContext";function Vx0(t){return e.useMemo(()=>t?typeof t=="string"?{to:t}:t:null,[t])}function yx0(){return e.useContext($s).setReference}function bx0(){return e.useContext($s).getReferenceProps}function Lx0(){let{getFloatingProps:t,slot:a}=e.useContext($s);return e.useCallback((...n)=>Object.assign({},t(...n),{"data-anchor":a.anchor}),[t,a])}function Sx0(t=null){t===!1&&(t=null),typeof t=="string"&&(t={to:t});let a=e.useContext(VS),n=e.useMemo(()=>t,[JSON.stringify(t,typeof HTMLElement<"u"?(l,o)=>o instanceof HTMLElement?o.outerHTML:o:void 0)]);l8(()=>{a==null||a(n??null)},[a,n]);let r=e.useContext($s);return e.useMemo(()=>[r.setFloating,t?r.styles:{}],[r.setFloating,t,r.styles])}let nc0=4;function Fx0({children:t,enabled:a=!0}){let[n,r]=e.useState(null),[l,o]=e.useState(0),i=e.useRef(null),[c,u]=e.useState(null);_x0(c);let d=a&&n!==null&&c!==null,{to:h="bottom",gap:f=0,offset:v=0,padding:Z=0,inner:H}=kx0(n,c),[V,b="center"]=h.split(" ");l8(()=>{d&&o(0)},[d]);let{refs:S,floatingStyles:F,context:w}=Zx0({open:d,placement:V==="selection"?b==="center"?"bottom":`bottom-${b}`:b==="center"?`${V}`:`${V}-${b}`,strategy:"absolute",transform:!1,middleware:[Y70({mainAxis:V==="selection"?0:f,crossAxis:v}),rx0({padding:Z}),V!=="selection"&&lx0({padding:Z}),V==="selection"&&H?Mx0({...H,padding:Z,overflowRef:i,offset:l,minItemsVisible:nc0,referenceOverflowThreshold:Z,onFallbackChange(J){var Y,n0;if(!J)return;let l0=w.elements.floating;if(!l0)return;let X=parseFloat(getComputedStyle(l0).scrollPaddingBottom)||0,P0=Math.min(nc0,l0.childElementCount),A0=0,d0=0;for(let L0 of(n0=(Y=w.elements.floating)==null?void 0:Y.childNodes)!=null?n0:[])if(L0 instanceof HTMLElement){let j=L0.offsetTop,a0=j+L0.clientHeight+X,i0=l0.scrollTop,q=i0+l0.clientHeight;if(j>=i0&&a0<=q)P0--;else{d0=Math.max(0,Math.min(a0,q)-Math.max(j,i0)),A0=L0.clientHeight;break}}P0>=1&&o(L0=>{let j=A0*P0-d0+X;return L0>=j?L0:j})}}):null,ox0({padding:Z,apply({availableWidth:J,availableHeight:Y,elements:n0}){Object.assign(n0.floating.style,{overflow:"auto",maxWidth:`${J}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${Y}px)`})}})].filter(Boolean),whileElementsMounted:KO0}),[$=V,C=b]=w.placement.split("-");V==="selection"&&($="selection");let P=e.useMemo(()=>({anchor:[$,C].filter(Boolean).join(" ")}),[$,C]),O=Ex0(w,{overflowRef:i,onChange:o}),{getReferenceProps:z,getFloatingProps:G}=Hx0([O]),R=Xe(J=>{u(J),S.setFloating(J)});return e.createElement(VS.Provider,{value:r},e.createElement($s.Provider,{value:{setFloating:R,setReference:S.setReference,styles:F,getReferenceProps:z,getFloatingProps:G,slot:P}},t))}function _x0(t){l8(()=>{if(!t)return;let a=new MutationObserver(()=>{let n=window.getComputedStyle(t).maxHeight,r=parseFloat(n);if(isNaN(r))return;let l=parseInt(n);isNaN(l)||r!==l&&(t.style.maxHeight=`${Math.ceil(r)}px`)});return a.observe(t,{attributes:!0,attributeFilter:["style"]}),()=>{a.disconnect()}},[t])}function kx0(t,a){var n,r,l;let o=yS((n=t==null?void 0:t.gap)!=null?n:"var(--anchor-gap, 0)",a),i=yS((r=t==null?void 0:t.offset)!=null?r:"var(--anchor-offset, 0)",a),c=yS((l=t==null?void 0:t.padding)!=null?l:"var(--anchor-padding, 0)",a);return{...t,gap:o,offset:i,padding:c}}function yS(t,a,n=void 0){let r=bs(),l=Xe((u,d)=>{if(u==null)return[n,null];if(typeof u=="number")return[u,null];if(typeof u=="string"){if(!d)return[n,null];let h=lc0(u,d);return[h,f=>{let v=rc0(u);{let Z=v.map(H=>window.getComputedStyle(d).getPropertyValue(H));r.requestAnimationFrame(function H(){r.nextFrame(H);let V=!1;for(let[S,F]of v.entries()){let w=window.getComputedStyle(d).getPropertyValue(F);if(Z[S]!==w){Z[S]=w,V=!0;break}}if(!V)return;let b=lc0(u,d);h!==b&&(f(b),h=b)})}return r.dispose}]}return[n,null]}),o=e.useMemo(()=>l(t,a)[0],[t,a]),[i=o,c]=e.useState();return l8(()=>{let[u,d]=l(t,a);if(c(u),!!d)return d(c)},[t,a]),i}function rc0(t){let a=/var\((.*)\)/.exec(t);if(a){let n=a[1].indexOf(",");if(n===-1)return[a[1]];let r=a[1].slice(0,n).trim(),l=a[1].slice(n+1).trim();return l?[r,...rc0(l)]:[r]}return[]}function lc0(t,a){let n=document.createElement("div");a.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",t,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return a.removeChild(n),r}let fA=e.createContext(null);fA.displayName="OpenClosedContext";var w6=(t=>(t[t.Open=1]="Open",t[t.Closed=2]="Closed",t[t.Closing=4]="Closing",t[t.Opening=8]="Opening",t))(w6||{});function Cd(){return e.useContext(fA)}function oc0({value:t,children:a}){return G0.createElement(fA.Provider,{value:t},a)}function wx0({children:t}){return G0.createElement(fA.Provider,{value:null},t)}function Cx0(t){function a(){document.readyState!=="loading"&&(t(),document.removeEventListener("DOMContentLoaded",a))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",a),a())}let Qo=[];Cx0(()=>{function t(a){if(!(a.target instanceof HTMLElement)||a.target===document.body||Qo[0]===a.target)return;let n=a.target;n=n.closest(rA),Qo.unshift(n??a.target),Qo=Qo.filter(r=>r!=null&&r.isConnected),Qo.splice(10)}window.addEventListener("click",t,{capture:!0}),window.addEventListener("mousedown",t,{capture:!0}),window.addEventListener("focus",t,{capture:!0}),document.body.addEventListener("click",t,{capture:!0}),document.body.addEventListener("mousedown",t,{capture:!0}),document.body.addEventListener("focus",t,{capture:!0})});function Nx0(t){throw new Error("Unexpected object: "+t)}var c6=(t=>(t[t.First=0]="First",t[t.Previous=1]="Previous",t[t.Next=2]="Next",t[t.Last=3]="Last",t[t.Specific=4]="Specific",t[t.Nothing=5]="Nothing",t))(c6||{});function bS(t,a){let n=a.resolveItems();if(n.length<=0)return null;let r=a.resolveActiveIndex(),l=r??-1;switch(t.focus){case 0:{for(let o=0;o<n.length;++o)if(!a.resolveDisabled(n[o],o,n))return o;return r}case 1:{l===-1&&(l=n.length);for(let o=l-1;o>=0;--o)if(!a.resolveDisabled(n[o],o,n))return o;return r}case 2:{for(let o=l+1;o<n.length;++o)if(!a.resolveDisabled(n[o],o,n))return o;return r}case 3:{for(let o=n.length-1;o>=0;--o)if(!a.resolveDisabled(n[o],o,n))return o;return r}case 4:{for(let o=0;o<n.length;++o)if(a.resolveId(n[o],o,n)===t.id)return o;return r}case 5:return null;default:Nx0(t)}}function ic0(t){let a=Xe(t),n=e.useRef(!1);e.useEffect(()=>(n.current=!1,()=>{n.current=!0,Kg(()=>{n.current&&a()})}),[a])}function Px0(){let t=typeof document>"u";return"useSyncExternalStore"in Wm?(a=>a.useSyncExternalStore)(Wm)(()=>()=>{},()=>!1,()=>!t):!1}function Nd(){let t=Px0(),[a,n]=e.useState(B5.isHandoffComplete);return a&&B5.isHandoffComplete===!1&&n(!1),e.useEffect(()=>{a!==!0&&n(!0)},[a]),e.useEffect(()=>B5.handoff(),[]),t?!1:a}let cc0=e.createContext(!1);function $x0(){return e.useContext(cc0)}function sc0(t){return G0.createElement(cc0.Provider,{value:t.force},t.children)}function Tx0(t){let a=$x0(),n=e.useContext(mc0),r=ks(t),[l,o]=e.useState(()=>{var i;if(!a&&n!==null)return(i=n.current)!=null?i:null;if(B5.isServer)return null;let c=r==null?void 0:r.getElementById("headlessui-portal-root");if(c)return c;if(r===null)return null;let u=r.createElement("div");return u.setAttribute("id","headlessui-portal-root"),r.body.appendChild(u)});return e.useEffect(()=>{l!==null&&(r!=null&&r.body.contains(l)||r==null||r.body.appendChild(l))},[l,r]),e.useEffect(()=>{a||n!==null&&o(n.current)},[n,o,a]),l}let uc0=e.Fragment,Ix0=f8(function(t,a){let n=t,r=e.useRef(null),l=o6(TI0(h=>{r.current=h}),a),o=ks(r),i=Tx0(r),[c]=e.useState(()=>{var h;return B5.isServer?null:(h=o==null?void 0:o.createElement("div"))!=null?h:null}),u=e.useContext(LS),d=Nd();return l8(()=>{!i||!c||i.contains(c)||(c.setAttribute("data-headlessui-portal",""),i.appendChild(c))},[i,c]),l8(()=>{if(c&&u)return u.register(c)},[u,c]),ic0(()=>{var h;!i||!c||(c instanceof Node&&i.contains(c)&&i.removeChild(c),i.childNodes.length<=0&&((h=i.parentElement)==null||h.removeChild(i)))}),d?!i||!c?null:l6.createPortal(k8({ourProps:{ref:l},theirProps:n,slot:{},defaultTag:uc0,name:"Portal"}),c):null});function Ox0(t,a){let n=o6(a),{enabled:r=!0,...l}=t;return r?G0.createElement(Ix0,{...l,ref:n}):k8({ourProps:{ref:n},theirProps:l,slot:{},defaultTag:uc0,name:"Portal"})}let xx0=e.Fragment,mc0=e.createContext(null);function jx0(t,a){let{target:n,...r}=t,l={ref:o6(a)};return G0.createElement(mc0.Provider,{value:n},k8({ourProps:l,theirProps:r,defaultTag:xx0,name:"Popover.Group"}))}let LS=e.createContext(null);function Rx0(){let t=e.useContext(LS),a=e.useRef([]),n=Xe(o=>(a.current.push(o),t&&t.register(o),()=>r(o))),r=Xe(o=>{let i=a.current.indexOf(o);i!==-1&&a.current.splice(i,1),t&&t.unregister(o)}),l=e.useMemo(()=>({register:n,unregister:r,portals:a}),[n,r,a]);return[a,e.useMemo(()=>function({children:o}){return G0.createElement(LS.Provider,{value:l},o)},[l])]}let Dx0=f8(Ox0),dc0=f8(jx0),hc0=Object.assign(Dx0,{Group:dc0}),zx0=e.Fragment;function Ux0(t,a){let{...n}=t,r=!1,{isFocusVisible:l,focusProps:o}=yd(),{isHovered:i,hoverProps:c}=Vd({isDisabled:r}),{pressed:u,pressProps:d}=Xg({disabled:r}),h=Ss({ref:a},o,c,d),f=e.useMemo(()=>({hover:i,focus:l,active:u}),[i,l,u]);return k8({ourProps:h,theirProps:n,slot:f,defaultTag:zx0,name:"DataInteractive"})}let Bx0=f8(Ux0);function qx0(t,a=typeof document<"u"?document.defaultView:null,n){let r=Fs(t,"escape");b70(a,"keydown",l=>{r&&(l.defaultPrevented||l.key===ga.Escape&&n(l))})}function Wx0(){var t;let[a]=e.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,r]=e.useState((t=a==null?void 0:a.matches)!=null?t:!1);return l8(()=>{if(!a)return;function l(o){r(o.matches)}return a.addEventListener("change",l),()=>a.removeEventListener("change",l)},[a]),n}function Gx0({defaultContainers:t=[],portals:a,mainTreeNode:n}={}){let r=ks(n),l=Xe(()=>{var o,i;let c=[];for(let u of t)u!==null&&(u instanceof HTMLElement?c.push(u):"current"in u&&u.current instanceof HTMLElement&&c.push(u.current));if(a!=null&&a.current)for(let u of a.current)c.push(u);for(let u of(o=r==null?void 0:r.querySelectorAll("html > *, body > *"))!=null?o:[])u!==document.body&&u!==document.head&&u instanceof HTMLElement&&u.id!=="headlessui-portal-root"&&(n&&(u.contains(n)||u.contains((i=n==null?void 0:n.getRootNode())==null?void 0:i.host))||c.some(d=>u.contains(d))||c.push(u));return c});return{resolveContainers:l,contains:Xe(o=>l().some(i=>i.contains(o)))}}let pc0=e.createContext(null);function fc0({children:t,node:a}){let[n,r]=e.useState(null),l=vc0(a??n);return G0.createElement(pc0.Provider,{value:l},t,l===null&&G0.createElement(eA,{features:bd.Hidden,ref:o=>{var i,c;if(o){for(let u of(c=(i=q5(o))==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?c:[])if(u!==document.body&&u!==document.head&&u instanceof HTMLElement&&u!=null&&u.contains(o)){r(u);break}}}}))}function vc0(t=null){var a;return(a=e.useContext(pc0))!=null?a:t}function SS(){let t=e.useRef(!1);return l8(()=>(t.current=!0,()=>{t.current=!1}),[]),t}var Pd=(t=>(t[t.Forwards=0]="Forwards",t[t.Backwards=1]="Backwards",t))(Pd||{});function Yx0(){let t=e.useRef(0);return E70(!0,"keydown",a=>{a.key==="Tab"&&(t.current=a.shiftKey?1:0)},!0),t}function gc0(t){if(!t)return new Set;if(typeof t=="function")return new Set(t());let a=new Set;for(let n of t.current)n.current instanceof HTMLElement&&a.add(n.current);return a}let Qx0="div";var J5=(t=>(t[t.None=0]="None",t[t.InitialFocus=1]="InitialFocus",t[t.TabLock=2]="TabLock",t[t.FocusLock=4]="FocusLock",t[t.RestoreFocus=8]="RestoreFocus",t[t.AutoFocus=16]="AutoFocus",t))(J5||{});function Kx0(t,a){let n=e.useRef(null),r=o6(n,a),{initialFocus:l,initialFocusFallback:o,containers:i,features:c=15,...u}=t;Nd()||(c=0);let d=ks(n);tj0(c,{ownerDocument:d});let h=aj0(c,{ownerDocument:d,container:n,initialFocus:l,initialFocusFallback:o});nj0(c,{ownerDocument:d,container:n,containers:i,previousActiveElement:h});let f=Yx0(),v=Xe(S=>{let F=n.current;F&&(w=>w())(()=>{sl(f.current,{[Pd.Forwards]:()=>{_s(F,or.First,{skipElements:[S.relatedTarget,o]})},[Pd.Backwards]:()=>{_s(F,or.Last,{skipElements:[S.relatedTarget,o]})}})})}),Z=Fs(!!(c&2),"focus-trap#tab-lock"),H=bs(),V=e.useRef(!1),b={ref:r,onKeyDown(S){S.key=="Tab"&&(V.current=!0,H.requestAnimationFrame(()=>{V.current=!1}))},onBlur(S){if(!(c&4))return;let F=gc0(i);n.current instanceof HTMLElement&&F.add(n.current);let w=S.relatedTarget;w instanceof HTMLElement&&w.dataset.headlessuiFocusGuard!=="true"&&(Ac0(F,w)||(V.current?_s(n.current,sl(f.current,{[Pd.Forwards]:()=>or.Next,[Pd.Backwards]:()=>or.Previous})|or.WrapAround,{relativeTo:S.target}):S.target instanceof HTMLElement&&ul(S.target)))}};return G0.createElement(G0.Fragment,null,Z&&G0.createElement(eA,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:v,features:bd.Focusable}),k8({ourProps:b,theirProps:u,defaultTag:Qx0,name:"FocusTrap"}),Z&&G0.createElement(eA,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:v,features:bd.Focusable}))}let Xx0=f8(Kx0),Jx0=Object.assign(Xx0,{features:J5});function ej0(t=!0){let a=e.useRef(Qo.slice());return pS(([n],[r])=>{r===!0&&n===!1&&Kg(()=>{a.current.splice(0)}),r===!1&&n===!0&&(a.current=Qo.slice())},[t,Qo,a]),Xe(()=>{var n;return(n=a.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function tj0(t,{ownerDocument:a}){let n=!!(t&8),r=ej0(n);pS(()=>{n||(a==null?void 0:a.activeElement)===(a==null?void 0:a.body)&&ul(r())},[n]),ic0(()=>{n&&ul(r())})}function aj0(t,{ownerDocument:a,container:n,initialFocus:r,initialFocusFallback:l}){let o=e.useRef(null),i=Fs(!!(t&1),"focus-trap#initial-focus"),c=SS();return pS(()=>{if(t===0)return;if(!i){l!=null&&l.current&&ul(l.current);return}let u=n.current;u&&Kg(()=>{if(!c.current)return;let d=a==null?void 0:a.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===d){o.current=d;return}}else if(u.contains(d)){o.current=d;return}if(r!=null&&r.current)ul(r.current);else{if(t&16){if(_s(u,or.First|or.AutoFocus)!==mS.Error)return}else if(_s(u,or.First)!==mS.Error)return;if(l!=null&&l.current&&(ul(l.current),(a==null?void 0:a.activeElement)===l.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}o.current=a==null?void 0:a.activeElement})},[l,i,t]),o}function nj0(t,{ownerDocument:a,container:n,containers:r,previousActiveElement:l}){let o=SS(),i=!!(t&4);b70(a==null?void 0:a.defaultView,"focus",c=>{if(!i||!o.current)return;let u=gc0(r);n.current instanceof HTMLElement&&u.add(n.current);let d=l.current;if(!d)return;let h=c.target;h&&h instanceof HTMLElement?Ac0(u,h)?(l.current=h,ul(h)):(c.preventDefault(),c.stopPropagation(),ul(d)):ul(l.current)},!0)}function Ac0(t,a){for(let n of t)if(n.contains(a))return!0;return!1}function Zc0(t){var a;return!!(t.enter||t.enterFrom||t.enterTo||t.leave||t.leaveFrom||t.leaveTo)||((a=t.as)!=null?a:Mc0)!==e.Fragment||G0.Children.count(t.children)===1}let vA=e.createContext(null);vA.displayName="TransitionContext";var rj0=(t=>(t.Visible="visible",t.Hidden="hidden",t))(rj0||{});function lj0(){let t=e.useContext(vA);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}function oj0(){let t=e.useContext(gA);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}let gA=e.createContext(null);gA.displayName="NestingContext";function AA(t){return"children"in t?AA(t.children):t.current.filter(({el:a})=>a.current!==null).filter(({state:a})=>a==="visible").length>0}function Hc0(t,a){let n=W5(t),r=e.useRef([]),l=SS(),o=bs(),i=Xe((Z,H=Bo.Hidden)=>{let V=r.current.findIndex(({el:b})=>b===Z);V!==-1&&(sl(H,{[Bo.Unmount](){r.current.splice(V,1)},[Bo.Hidden](){r.current[V].state="hidden"}}),o.microTask(()=>{var b;!AA(r)&&l.current&&((b=n.current)==null||b.call(n))}))}),c=Xe(Z=>{let H=r.current.find(({el:V})=>V===Z);return H?H.state!=="visible"&&(H.state="visible"):r.current.push({el:Z,state:"visible"}),()=>i(Z,Bo.Unmount)}),u=e.useRef([]),d=e.useRef(Promise.resolve()),h=e.useRef({enter:[],leave:[]}),f=Xe((Z,H,V)=>{u.current.splice(0),a&&(a.chains.current[H]=a.chains.current[H].filter(([b])=>b!==Z)),a==null||a.chains.current[H].push([Z,new Promise(b=>{u.current.push(b)})]),a==null||a.chains.current[H].push([Z,new Promise(b=>{Promise.all(h.current[H].map(([S,F])=>F)).then(()=>b())})]),H==="enter"?d.current=d.current.then(()=>a==null?void 0:a.wait.current).then(()=>V(H)):V(H)}),v=Xe((Z,H,V)=>{Promise.all(h.current[H].splice(0).map(([b,S])=>S)).then(()=>{var b;(b=u.current.shift())==null||b()}).then(()=>V(H))});return e.useMemo(()=>({children:r,register:c,unregister:i,onStart:f,onStop:v,wait:d,chains:h}),[c,i,r,f,v,h,d])}let Mc0=e.Fragment,Ec0=Ls.RenderStrategy;function ij0(t,a){var n,r;let{transition:l=!0,beforeEnter:o,afterEnter:i,beforeLeave:c,afterLeave:u,enter:d,enterFrom:h,enterTo:f,entered:v,leave:Z,leaveFrom:H,leaveTo:V,...b}=t,S=e.useRef(null),F=Zc0(t),w=o6(...F?[S,a]:a===null?[]:[a]),$=(n=b.unmount)==null||n?Bo.Unmount:Bo.Hidden,{show:C,appear:P,initial:O}=lj0(),[z,G]=e.useState(C?"visible":"hidden"),R=oj0(),{register:J,unregister:Y}=R;l8(()=>J(S),[J,S]),l8(()=>{if($===Bo.Hidden&&S.current){if(C&&z!=="visible"){G("visible");return}return sl(z,{hidden:()=>Y(S),visible:()=>J(S)})}},[z,S,J,Y,C,$]);let n0=Nd();l8(()=>{if(F&&n0&&z==="visible"&&S.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[S,z,n0,F]);let l0=O&&!P,X=P&&C&&O,P0=e.useRef(!1),A0=Hc0(()=>{P0.current||(G("hidden"),Y(S))},R),d0=Xe(p0=>{P0.current=!0;let b0=p0?"enter":"leave";A0.onStart(S,b0,Q=>{Q==="enter"?o==null||o():Q==="leave"&&(c==null||c())})}),L0=Xe(p0=>{let b0=p0?"enter":"leave";P0.current=!1,A0.onStop(S,b0,Q=>{Q==="enter"?i==null||i():Q==="leave"&&(u==null||u())}),b0==="leave"&&!AA(A0)&&(G("hidden"),Y(S))});e.useEffect(()=>{F&&l||(d0(C),L0(C))},[C,F,l]);let j=!(!l||!F||!n0||l0),[,a0]=k70(j,S,C,{start:d0,end:L0}),i0=Y5({ref:w,className:((r=nS(b.className,X&&d,X&&h,a0.enter&&d,a0.enter&&a0.closed&&h,a0.enter&&!a0.closed&&f,a0.leave&&Z,a0.leave&&!a0.closed&&H,a0.leave&&a0.closed&&V,!a0.transition&&C&&v))==null?void 0:r.trim())||void 0,..._70(a0)}),q=0;return z==="visible"&&(q|=w6.Open),z==="hidden"&&(q|=w6.Closed),a0.enter&&(q|=w6.Opening),a0.leave&&(q|=w6.Closing),G0.createElement(gA.Provider,{value:A0},G0.createElement(oc0,{value:q},k8({ourProps:i0,theirProps:b,defaultTag:Mc0,features:Ec0,visible:z==="visible",name:"Transition.Child"})))}function cj0(t,a){let{show:n,appear:r=!1,unmount:l=!0,...o}=t,i=e.useRef(null),c=Zc0(t),u=o6(...c?[i,a]:a===null?[]:[a]);Nd();let d=Cd();if(n===void 0&&d!==null&&(n=(d&w6.Open)===w6.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[h,f]=e.useState(n?"visible":"hidden"),v=Hc0(()=>{n||f("hidden")}),[Z,H]=e.useState(!0),V=e.useRef([n]);l8(()=>{Z!==!1&&V.current[V.current.length-1]!==n&&(V.current.push(n),H(!1))},[V,n]);let b=e.useMemo(()=>({show:n,appear:r,initial:Z}),[n,r,Z]);uS(n,i,()=>f("hidden")),l8(()=>{n?f("visible"):!AA(v)&&i.current!==null&&f("hidden")},[n,v]);let S={unmount:l},F=Xe(()=>{var $;Z&&H(!1),($=t.beforeEnter)==null||$.call(t)}),w=Xe(()=>{var $;Z&&H(!1),($=t.beforeLeave)==null||$.call(t)});return G0.createElement(gA.Provider,{value:v},G0.createElement(vA.Provider,{value:b},k8({ourProps:{...S,as:e.Fragment,children:G0.createElement(Vc0,{ref:u,...S,...o,beforeEnter:F,beforeLeave:w})},theirProps:{},defaultTag:e.Fragment,features:Ec0,visible:h==="visible",name:"Transition"})))}function sj0(t,a){let n=e.useContext(vA)!==null,r=Cd()!==null;return G0.createElement(G0.Fragment,null,!n&&r?G0.createElement(FS,{ref:a,...t}):G0.createElement(Vc0,{ref:a,...t}))}let FS=f8(cj0),Vc0=f8(ij0),_S=f8(sj0),ZA=Object.assign(FS,{Child:_S,Root:FS});var uj0=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(uj0||{}),mj0=(t=>(t[t.SetTitleId=0]="SetTitleId",t))(mj0||{});let dj0={0(t,a){return t.titleId===a.id?t:{...t,titleId:a.id}}},kS=e.createContext(null);kS.displayName="DialogContext";function HA(t){let a=e.useContext(kS);if(a===null){let n=new Error(`<${t} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,HA),n}return a}function hj0(t,a){return sl(a.type,dj0,t,a)}let yc0=f8(function(t,a){let n=e.useId(),{id:r=`headlessui-dialog-${n}`,open:l,onClose:o,initialFocus:i,role:c="dialog",autoFocus:u=!0,__demoMode:d=!1,unmount:h=!1,...f}=t,v=e.useRef(!1);c=function(){return c==="dialog"||c==="alertdialog"?c:(v.current||(v.current=!0,console.warn(`Invalid role [${c}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let Z=Cd();l===void 0&&Z!==null&&(l=(Z&w6.Open)===w6.Open);let H=e.useRef(null),V=o6(H,a),b=ks(H),S=l?0:1,[F,w]=e.useReducer(hj0,{titleId:null,descriptionId:null,panelRef:e.createRef()}),$=Xe(()=>o(!1)),C=Xe(j=>w({type:0,id:j})),P=Nd()?S===0:!1,[O,z]=Rx0(),G={get current(){var j;return(j=F.panelRef.current)!=null?j:H.current}},R=vc0(),{resolveContainers:J}=Gx0({mainTreeNode:R,portals:O,defaultContainers:[G]}),Y=Z!==null?(Z&w6.Closing)===w6.Closing:!1;g70(d||Y?!1:P,{allowed:Xe(()=>{var j,a0;return[(a0=(j=H.current)==null?void 0:j.closest("[data-headlessui-portal]"))!=null?a0:null]}),disallowed:Xe(()=>{var j;return[(j=R==null?void 0:R.closest("body > *:not(#headlessui-portal-root)"))!=null?j:null]})}),y70(P,J,j=>{j.preventDefault(),$()}),qx0(P,b==null?void 0:b.defaultView,j=>{j.preventDefault(),j.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),$()}),S70(d||Y?!1:P,b,J),uS(P,H,$);let[n0,l0]=oS(),X=e.useMemo(()=>[{dialogState:S,close:$,setTitleId:C,unmount:h},F],[S,F,$,C,h]),P0=e.useMemo(()=>({open:S===0}),[S]),A0={ref:V,id:r,role:c,tabIndex:-1,"aria-modal":d?void 0:S===0?!0:void 0,"aria-labelledby":F.titleId,"aria-describedby":n0,unmount:h},d0=!Wx0(),L0=J5.None;return P&&!d&&(L0|=J5.RestoreFocus,L0|=J5.TabLock,u&&(L0|=J5.AutoFocus),d0&&(L0|=J5.InitialFocus)),G0.createElement(wx0,null,G0.createElement(sc0,{force:!0},G0.createElement(hc0,null,G0.createElement(kS.Provider,{value:X},G0.createElement(dc0,{target:H},G0.createElement(sc0,{force:!1},G0.createElement(l0,{slot:P0},G0.createElement(z,null,G0.createElement(Jx0,{initialFocus:i,initialFocusFallback:H,containers:J,features:L0},G0.createElement(BI0,{value:$},k8({ourProps:A0,theirProps:f,slot:P0,defaultTag:pj0,features:fj0,visible:S===0,name:"Dialog"})))))))))))}),pj0="div",fj0=Ls.RenderStrategy|Ls.Static;function vj0(t,a){let{transition:n=!1,open:r,...l}=t,o=Cd(),i=t.hasOwnProperty("open")||o!==null,c=t.hasOwnProperty("onClose");if(!i&&!c)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!i)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!c)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!o&&typeof t.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${t.open}`);if(typeof t.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${t.onClose}`);return(r!==void 0||n)&&!l.static?G0.createElement(fc0,null,G0.createElement(ZA,{show:r,transition:n,unmount:l.unmount},G0.createElement(yc0,{ref:a,...l}))):G0.createElement(fc0,null,G0.createElement(yc0,{ref:a,open:r,...l}))}let gj0="div";function Aj0(t,a){let n=e.useId(),{id:r=`headlessui-dialog-panel-${n}`,transition:l=!1,...o}=t,[{dialogState:i,unmount:c},u]=HA("Dialog.Panel"),d=o6(a,u.panelRef),h=e.useMemo(()=>({open:i===0}),[i]),f=Xe(Z=>{Z.stopPropagation()}),v={ref:d,id:r,onClick:f};return G0.createElement(l?_S:e.Fragment,{...l?{unmount:c}:{}},k8({ourProps:v,theirProps:o,slot:h,defaultTag:gj0,name:"Dialog.Panel"}))}let Zj0="div";function Hj0(t,a){let{transition:n=!1,...r}=t,[{dialogState:l,unmount:o}]=HA("Dialog.Backdrop"),i=e.useMemo(()=>({open:l===0}),[l]),c={ref:a,"aria-hidden":!0};return G0.createElement(n?_S:e.Fragment,{...n?{unmount:o}:{}},k8({ourProps:c,theirProps:r,slot:i,defaultTag:Zj0,name:"Dialog.Backdrop"}))}let Mj0="h2";function Ej0(t,a){let n=e.useId(),{id:r=`headlessui-dialog-title-${n}`,...l}=t,[{dialogState:o,setTitleId:i}]=HA("Dialog.Title"),c=o6(a);e.useEffect(()=>(i(r),()=>i(null)),[r,i]);let u=e.useMemo(()=>({open:o===0}),[o]);return k8({ourProps:{ref:c,id:r},theirProps:l,slot:u,defaultTag:Mj0,name:"Dialog.Title"})}let Vj0=f8(vj0),yj0=f8(Aj0);f8(Hj0);let bj0=f8(Ej0),wS=Object.assign(Vj0,{Panel:yj0,Title:bj0,Description:jI0}),Lj0="div";function Sj0(t,a){let n=`headlessui-control-${e.useId()}`,[r,l]=nA(),[o,i]=oS(),c=G5(),{disabled:u=c||!1,...d}=t,h=e.useMemo(()=>({disabled:u}),[u]);return G0.createElement(l70,{value:u},G0.createElement(l,{value:r},G0.createElement(i,{value:o},G0.createElement(NI0,{id:n},k8({ourProps:{ref:a,disabled:u||void 0,"aria-disabled":u||void 0},theirProps:{...d,children:G0.createElement(CI0,null,typeof d.children=="function"?d.children(h):d.children)},slot:h,defaultTag:Lj0,name:"Field"})))))}let Fj0=f8(Sj0);function _j0(t){let a=typeof t=="string"?t:void 0,[n,r]=e.useState(a);return[a??n,e.useCallback(l=>{a||l instanceof HTMLElement&&r(l.tagName.toLowerCase())},[a])]}let bc0="fieldset";function kj0(t,a){var n;let r=G5(),{disabled:l=r||!1,...o}=t,[i,c]=_j0((n=t.as)!=null?n:bc0),u=o6(a,c),[d,h]=nA(),f=e.useMemo(()=>({disabled:l}),[l]);return G0.createElement(l70,{value:l},G0.createElement(h,null,k8({ourProps:i==="fieldset"?{ref:u,"aria-labelledby":d,disabled:l||void 0}:{ref:u,role:"group","aria-labelledby":d,"aria-disabled":l||void 0},theirProps:o,slot:f,defaultTag:bc0,name:"Fieldset"})))}let wj0=f8(kj0),Cj0="input";function Nj0(t,a){let n=e.useId(),r=lS(),l=G5(),{id:o=r||`headlessui-input-${n}`,disabled:i=l||!1,autoFocus:c=!1,invalid:u=!1,...d}=t,h=cS(),f=m70(),{isFocused:v,focusProps:Z}=yd({autoFocus:c}),{isHovered:H,hoverProps:V}=Vd({isDisabled:i}),b=Ss({ref:a,id:o,"aria-labelledby":h,"aria-describedby":f,"aria-invalid":u?"":void 0,disabled:i||void 0,autoFocus:c},Z,V),S=e.useMemo(()=>({disabled:i,invalid:u,hover:H,focus:v,autofocus:c}),[i,u,H,v,c]);return k8({ourProps:b,theirProps:d,slot:S,defaultTag:Cj0,name:"Input"})}let Pj0=f8(Nj0);function $j0(t,a){let n=e.useRef({left:0,top:0});if(l8(()=>{let l=a.current;if(!l)return;let o=l.getBoundingClientRect();o&&(n.current=o)},[t]),a.current==null||!t||a.current===document.activeElement)return!1;let r=a.current.getBoundingClientRect();return r.top!==n.current.top||r.left!==n.current.left}let Lc0=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Sc0(t){var a,n;let r=(a=t.innerText)!=null?a:"",l=t.cloneNode(!0);if(!(l instanceof HTMLElement))return r;let o=!1;for(let c of l.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))c.remove(),o=!0;let i=o?(n=l.innerText)!=null?n:"":r;return Lc0.test(i)&&(i=i.replace(Lc0,"")),i}function Tj0(t){let a=t.getAttribute("aria-label");if(typeof a=="string")return a.trim();let n=t.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(l=>{let o=document.getElementById(l);if(o){let i=o.getAttribute("aria-label");return typeof i=="string"?i.trim():Sc0(o).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return Sc0(t).trim()}function Ij0(t){let a=e.useRef(""),n=e.useRef("");return Xe(()=>{let r=t.current;if(!r)return"";let l=r.innerText;if(a.current===l)return n.current;let o=Tj0(r).trim().toLowerCase();return a.current=l,n.current=o,o})}var Oj0=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(Oj0||{}),xj0=(t=>(t[t.Pointer=0]="Pointer",t[t.Other=1]="Other",t))(xj0||{}),jj0=(t=>(t[t.OpenMenu=0]="OpenMenu",t[t.CloseMenu=1]="CloseMenu",t[t.GoToItem=2]="GoToItem",t[t.Search=3]="Search",t[t.ClearSearch=4]="ClearSearch",t[t.RegisterItem=5]="RegisterItem",t[t.UnregisterItem=6]="UnregisterItem",t))(jj0||{});function CS(t,a=n=>n){let n=t.activeItemIndex!==null?t.items[t.activeItemIndex]:null,r=H70(a(t.items.slice()),o=>o.dataRef.current.domRef.current),l=n?r.indexOf(n):null;return l===-1&&(l=null),{items:r,activeItemIndex:l}}let Rj0={1(t){return t.menuState===1?t:{...t,activeItemIndex:null,menuState:1}},0(t){return t.menuState===0?t:{...t,__demoMode:!1,menuState:0}},2:(t,a)=>{var n,r,l,o,i;if(t.menuState===1)return t;let c={...t,searchQuery:"",activationTrigger:(n=a.trigger)!=null?n:1,__demoMode:!1};if(a.focus===c6.Nothing)return{...c,activeItemIndex:null};if(a.focus===c6.Specific)return{...c,activeItemIndex:t.items.findIndex(h=>h.id===a.id)};if(a.focus===c6.Previous){let h=t.activeItemIndex;if(h!==null){let f=t.items[h].dataRef.current.domRef,v=bS(a,{resolveItems:()=>t.items,resolveActiveIndex:()=>t.activeItemIndex,resolveId:Z=>Z.id,resolveDisabled:Z=>Z.dataRef.current.disabled});if(v!==null){let Z=t.items[v].dataRef.current.domRef;if(((r=f.current)==null?void 0:r.previousElementSibling)===Z.current||((l=Z.current)==null?void 0:l.previousElementSibling)===null)return{...c,activeItemIndex:v}}}}else if(a.focus===c6.Next){let h=t.activeItemIndex;if(h!==null){let f=t.items[h].dataRef.current.domRef,v=bS(a,{resolveItems:()=>t.items,resolveActiveIndex:()=>t.activeItemIndex,resolveId:Z=>Z.id,resolveDisabled:Z=>Z.dataRef.current.disabled});if(v!==null){let Z=t.items[v].dataRef.current.domRef;if(((o=f.current)==null?void 0:o.nextElementSibling)===Z.current||((i=Z.current)==null?void 0:i.nextElementSibling)===null)return{...c,activeItemIndex:v}}}}let u=CS(t),d=bS(a,{resolveItems:()=>u.items,resolveActiveIndex:()=>u.activeItemIndex,resolveId:h=>h.id,resolveDisabled:h=>h.dataRef.current.disabled});return{...c,...u,activeItemIndex:d}},3:(t,a)=>{let n=t.searchQuery!==""?0:1,r=t.searchQuery+a.value.toLowerCase(),l=(t.activeItemIndex!==null?t.items.slice(t.activeItemIndex+n).concat(t.items.slice(0,t.activeItemIndex+n)):t.items).find(i=>{var c;return((c=i.dataRef.current.textValue)==null?void 0:c.startsWith(r))&&!i.dataRef.current.disabled}),o=l?t.items.indexOf(l):-1;return o===-1||o===t.activeItemIndex?{...t,searchQuery:r}:{...t,searchQuery:r,activeItemIndex:o,activationTrigger:1}},4(t){return t.searchQuery===""?t:{...t,searchQuery:"",searchActiveItemIndex:null}},5:(t,a)=>{let n=CS(t,r=>[...r,{id:a.id,dataRef:a.dataRef}]);return{...t,...n}},6:(t,a)=>{let n=CS(t,r=>{let l=r.findIndex(o=>o.id===a.id);return l!==-1&&r.splice(l,1),r});return{...t,...n,activationTrigger:1}}},NS=e.createContext(null);NS.displayName="MenuContext";function MA(t){let a=e.useContext(NS);if(a===null){let n=new Error(`<${t} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,MA),n}return a}function Dj0(t,a){return sl(a.type,Rj0,t,a)}let zj0=e.Fragment;function Uj0(t,a){let{__demoMode:n=!1,...r}=t,l=e.useReducer(Dj0,{__demoMode:n,menuState:n?0:1,buttonRef:e.createRef(),itemsRef:e.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:o,itemsRef:i,buttonRef:c},u]=l,d=o6(a);y70(o===0,[c,i],(Z,H)=>{var V;u({type:1}),hS(H,dS.Loose)||(Z.preventDefault(),(V=c.current)==null||V.focus())});let h=Xe(()=>{u({type:1})}),f=e.useMemo(()=>({open:o===0,close:h}),[o,h]),v={ref:d};return G0.createElement(Fx0,null,G0.createElement(NS.Provider,{value:l},G0.createElement(oc0,{value:sl(o,{0:w6.Open,1:w6.Closed})},k8({ourProps:v,theirProps:r,slot:f,defaultTag:zj0,name:"Menu"}))))}let Bj0="button";function qj0(t,a){var n;let r=e.useId(),{id:l=`headlessui-menu-button-${r}`,disabled:o=!1,autoFocus:i=!1,...c}=t,[u,d]=MA("Menu.Button"),h=bx0(),f=o6(u.buttonRef,a,yx0()),v=Xe(O=>{switch(O.key){case ga.Space:case ga.Enter:case ga.ArrowDown:O.preventDefault(),O.stopPropagation(),l6.flushSync(()=>d({type:0})),d({type:2,focus:c6.First});break;case ga.ArrowUp:O.preventDefault(),O.stopPropagation(),l6.flushSync(()=>d({type:0})),d({type:2,focus:c6.Last});break}}),Z=Xe(O=>{switch(O.key){case ga.Space:O.preventDefault();break}}),H=Xe(O=>{var z;if(PI0(O.currentTarget))return O.preventDefault();o||(u.menuState===0?(l6.flushSync(()=>d({type:1})),(z=u.buttonRef.current)==null||z.focus({preventScroll:!0})):(O.preventDefault(),d({type:0})))}),{isFocusVisible:V,focusProps:b}=yd({autoFocus:i}),{isHovered:S,hoverProps:F}=Vd({isDisabled:o}),{pressed:w,pressProps:$}=Xg({disabled:o}),C=e.useMemo(()=>({open:u.menuState===0,active:w||u.menuState===0,disabled:o,hover:S,focus:V,autofocus:i}),[u,S,V,w,o,i]),P=Ss(h(),{ref:f,id:l,type:lO0(t,u.buttonRef),"aria-haspopup":"menu","aria-controls":(n=u.itemsRef.current)==null?void 0:n.id,"aria-expanded":u.menuState===0,disabled:o||void 0,autoFocus:i,onKeyDown:v,onKeyUp:Z,onClick:H},b,F,$);return k8({ourProps:P,theirProps:c,slot:C,defaultTag:Bj0,name:"Menu.Button"})}let Wj0="div",Gj0=Ls.RenderStrategy|Ls.Static;function Yj0(t,a){var n,r;let l=e.useId(),{id:o=`headlessui-menu-items-${l}`,anchor:i,portal:c=!1,modal:u=!0,transition:d=!1,...h}=t,f=Vx0(i),[v,Z]=MA("Menu.Items"),[H,V]=Sx0(f),b=Lx0(),S=o6(v.itemsRef,a,f?H:null),F=ks(v.itemsRef);f&&(c=!0);let w=Cd(),[$,C]=k70(d,v.itemsRef,w!==null?(w&w6.Open)===w6.Open:v.menuState===0);uS($,v.buttonRef,()=>{Z({type:1})});let P=v.__demoMode?!1:u&&v.menuState===0;S70(P,F);let O=v.__demoMode?!1:u&&v.menuState===0;g70(O,{allowed:Xe(()=>[v.buttonRef.current,v.itemsRef.current])});let z=v.menuState!==0,G=$j0(z,v.buttonRef)?!1:$;e.useEffect(()=>{let X=v.itemsRef.current;X&&v.menuState===0&&X!==(F==null?void 0:F.activeElement)&&X.focus({preventScroll:!0})},[v.menuState,v.itemsRef,F,v.itemsRef.current]),AO0(v.menuState===0,{container:v.itemsRef.current,accept(X){return X.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:X.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(X){X.setAttribute("role","none")}});let R=bs(),J=Xe(X=>{var P0,A0,d0;switch(R.dispose(),X.key){case ga.Space:if(v.searchQuery!=="")return X.preventDefault(),X.stopPropagation(),Z({type:3,value:X.key});case ga.Enter:if(X.preventDefault(),X.stopPropagation(),Z({type:1}),v.activeItemIndex!==null){let{dataRef:L0}=v.items[v.activeItemIndex];(A0=(P0=L0.current)==null?void 0:P0.domRef.current)==null||A0.click()}Z70(v.buttonRef.current);break;case ga.ArrowDown:return X.preventDefault(),X.stopPropagation(),Z({type:2,focus:c6.Next});case ga.ArrowUp:return X.preventDefault(),X.stopPropagation(),Z({type:2,focus:c6.Previous});case ga.Home:case ga.PageUp:return X.preventDefault(),X.stopPropagation(),Z({type:2,focus:c6.First});case ga.End:case ga.PageDown:return X.preventDefault(),X.stopPropagation(),Z({type:2,focus:c6.Last});case ga.Escape:X.preventDefault(),X.stopPropagation(),l6.flushSync(()=>Z({type:1})),(d0=v.buttonRef.current)==null||d0.focus({preventScroll:!0});break;case ga.Tab:X.preventDefault(),X.stopPropagation(),l6.flushSync(()=>Z({type:1})),aO0(v.buttonRef.current,X.shiftKey?or.Previous:or.Next);break;default:X.key.length===1&&(Z({type:3,value:X.key}),R.setTimeout(()=>Z({type:4}),350));break}}),Y=Xe(X=>{switch(X.key){case ga.Space:X.preventDefault();break}}),n0=e.useMemo(()=>({open:v.menuState===0}),[v.menuState]),l0=Ss(f?b():{},{"aria-activedescendant":v.activeItemIndex===null||(n=v.items[v.activeItemIndex])==null?void 0:n.id,"aria-labelledby":(r=v.buttonRef.current)==null?void 0:r.id,id:o,onKeyDown:J,onKeyUp:Y,role:"menu",tabIndex:v.menuState===0?0:void 0,ref:S,style:{...h.style,...V,"--button-width":WI0(v.buttonRef,!0).width},..._70(C)});return G0.createElement(hc0,{enabled:c?t.static||$:!1},k8({ourProps:l0,theirProps:h,slot:n0,defaultTag:Wj0,features:Gj0,visible:G,name:"Menu.Items"}))}let Qj0=e.Fragment;function Kj0(t,a){let n=e.useId(),{id:r=`headlessui-menu-item-${n}`,disabled:l=!1,...o}=t,[i,c]=MA("Menu.Item"),u=i.activeItemIndex!==null?i.items[i.activeItemIndex].id===r:!1,d=e.useRef(null),h=o6(a,d);l8(()=>{if(!i.__demoMode&&i.menuState===0&&u&&i.activationTrigger!==0)return cl().requestAnimationFrame(()=>{var G,R;(R=(G=d.current)==null?void 0:G.scrollIntoView)==null||R.call(G,{block:"nearest"})})},[i.__demoMode,d,u,i.menuState,i.activationTrigger,i.activeItemIndex]);let f=Ij0(d),v=e.useRef({disabled:l,domRef:d,get textValue(){return f()}});l8(()=>{v.current.disabled=l},[v,l]),l8(()=>(c({type:5,id:r,dataRef:v}),()=>c({type:6,id:r})),[v,r]);let Z=Xe(()=>{c({type:1})}),H=Xe(G=>{if(l)return G.preventDefault();c({type:1}),Z70(i.buttonRef.current)}),V=Xe(()=>{if(l)return c({type:2,focus:c6.Nothing});c({type:2,focus:c6.Specific,id:r})}),b=mO0(),S=Xe(G=>{b.update(G),!l&&(u||c({type:2,focus:c6.Specific,id:r,trigger:0}))}),F=Xe(G=>{b.wasMoved(G)&&(l||u||c({type:2,focus:c6.Specific,id:r,trigger:0}))}),w=Xe(G=>{b.wasMoved(G)&&(l||u&&c({type:2,focus:c6.Nothing}))}),[$,C]=nA(),[P,O]=oS(),z=e.useMemo(()=>({active:u,focus:u,disabled:l,close:Z}),[u,l,Z]);return G0.createElement(C,null,G0.createElement(O,null,k8({ourProps:{id:r,ref:h,role:"menuitem",tabIndex:l===!0?void 0:-1,"aria-disabled":l===!0?!0:void 0,"aria-labelledby":$,"aria-describedby":P,disabled:void 0,onClick:H,onFocus:V,onPointerEnter:S,onMouseEnter:S,onPointerMove:F,onMouseMove:F,onPointerLeave:w,onMouseLeave:w},theirProps:o,slot:z,defaultTag:Qj0,name:"Menu.Item"})))}let Xj0="div";function Jj0(t,a){let[n,r]=nA();return G0.createElement(r,null,k8({ourProps:{ref:a,"aria-labelledby":n,role:"group"},theirProps:t,slot:{},defaultTag:Xj0,name:"Menu.Section"}))}let eR0="header";function tR0(t,a){let n=e.useId(),{id:r=`headlessui-menu-heading-${n}`,...l}=t,o=iS();l8(()=>o.register(r),[r,o.register]);let i={id:r,ref:a,role:"presentation",...o.props};return k8({ourProps:i,theirProps:l,slot:{},defaultTag:eR0,name:"Menu.Heading"})}let aR0="div";function nR0(t,a){return k8({ourProps:{ref:a,role:"separator"},theirProps:t,slot:{},defaultTag:aR0,name:"Menu.Separator"})}let rR0=f8(Uj0),Fc0=f8(qj0),_c0=f8(Yj0),kc0=f8(Kj0),lR0=f8(Jj0),oR0=f8(tR0),wc0=f8(nR0),iR0=Object.assign(rR0,{Button:Fc0,Items:_c0,Item:kc0,Section:lR0,Heading:oR0,Separator:wc0}),cR0="select";function sR0(t,a){let n=e.useId(),r=lS(),l=G5(),{id:o=r||`headlessui-select-${n}`,disabled:i=l||!1,invalid:c=!1,autoFocus:u=!1,...d}=t,h=cS(),f=m70(),{isFocusVisible:v,focusProps:Z}=yd({autoFocus:u}),{isHovered:H,hoverProps:V}=Vd({isDisabled:i}),{pressed:b,pressProps:S}=Xg({disabled:i}),F=Ss({ref:a,id:o,"aria-labelledby":h,"aria-describedby":f,"aria-invalid":c?"":void 0,disabled:i||void 0,autoFocus:u},Z,V,S),w=e.useMemo(()=>({disabled:i,invalid:c,hover:H,focus:v,active:b,autofocus:u}),[i,c,H,v,b,u]);return k8({ourProps:F,theirProps:d,slot:w,defaultTag:cR0,name:"Select"})}let uR0=f8(sR0);const b3=e.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),Cc0=G0.createContext(e.forwardRef(function(a,n){return _.jsx("a",{...a,ref:n})})),EA=()=>G0.useContext(Cc0),mR0=({linkComponent:t,children:a})=>_.jsx(Cc0.Provider,{value:t,children:a}),PS=function({to:a,href:n,...r}){const l=!!n||typeof a=="string"&&(a==null?void 0:a.startsWith("http://"))||typeof a=="string"&&(a==null?void 0:a.startsWith("https://")),o=EA();return _.jsx(Bx0,{children:_.jsx(o,{to:a,href:n,isExternal:l,...r})})},Ts={base:["relative isolate inline-flex items-center justify-center gap-x-2 rounded-xl border text-base font-semibold","px-4 py-2","focus:outline-none data-[focus]:outline data-[focus]:outline-2 data-[focus]:outline-offset-2 data-[focus]:outline-blue-500","data-[disabled]:opacity-50","transition after:transition before:transition","whitespace-nowrap","lg:active:hover:scale-95 lg:active:hover:before:opacity-50"],modes:{solid:["border-transparent","dark:bg-[--btn-bg]","bg-[--btn-bg]","before:absolute before:inset-0 before:-z-10 before:rounded-[calc(theme(borderRadius.xl)-1px)]","dark:before:hidden","dark:border-white/5","after:absolute after:inset-0 after:-z-10 after:rounded-[calc(theme(borderRadius.xl)-1px)]","after:shadow-[shadow:inset_0_1px_theme(colors.white/15%)]","dark:after:shadow-none","after:data-[active]:bg-[--btn-hover-overlay] after:data-[hover]:bg-[--btn-hover-overlay]","dark:after:-inset-px dark:after:rounded-xl","before:data-[disabled]:shadow-none after:data-[disabled]:shadow-none"],ghost:["border-transparent","hover:dark:bg-[--btn-bg]","hover:bg-[--btn-bg]","before:absolute before:inset-0 before:-z-10 before:rounded-[calc(theme(borderRadius.xl)-1px)]","dark:before:hidden","hover:dark:border-white/5","after:absolute after:inset-0 after:-z-10 after:rounded-[calc(theme(borderRadius.xl)-1px)]","hover:after:shadow-[shadow:inset_0_1px_theme(colors.white/15%)]","after:data-[active]:bg-[--btn-hover-overlay] after:data-[hover]:bg-[--btn-hover-overlay]","dark:after:-inset-px dark:after:rounded-xl","before:data-[disabled]:shadow-none after:data-[disabled]:shadow-none","before:shadow-none"]},circular:["!rounded-full !aspect-square !p-2","before:!rounded-full after:!rounded-full dark:after:!rounded-full"],pill:["!rounded-full","before:!rounded-full after:!rounded-full dark:after:!rounded-full"],small:["!rounded-md !text-sm !px-1.5 !py-1","before:!rounded-md after:!rounded-md dark:after:!rounded-md"],surfaces:{system:["text-fg-primary dark:text-fg-primary-dark","[--btn-bg:theme(colors.system.regular)] [--btn-hover-overlay:theme(colors.white/20%)]","dark:[--btn-bg:theme(colors.system.regular-dark)] dark:[--btn-hover-overlay:theme(colors.white/10%)]","[--icon-color:theme(colors.fg.secondary)] dark:[--icon-color:theme(colors.fg.secondary-dark)]","backdrop-blur-lg","hover:before:shadow-lg"],material:["text-fg-primary dark:text-fg-primary-dark","[--btn-bg:theme(colors.material.regular)] [--btn-hover-overlay:theme(colors.white/20%)]","dark:[--btn-bg:theme(colors.material.regular-dark)] dark:[--btn-hover-overlay:theme(colors.white/10%)]","[--icon-color:theme(colors.fg.secondary)] dark:[--icon-color:theme(colors.fg.secondary-dark)]","backdrop-blur-lg","hover:before:shadow-lg"],chrome:["text-fg-primary dark:text-fg-primary-dark","[--btn-bg:theme(colors.system.chrome)]","dark:[--btn-bg:theme(colors.system.chrome-dark)] dark:[--btn-hover-overlay:theme(colors.white/5%)]","[--icon-color:theme(colors.fg.primary)] dark:[--icon-color:theme(colors.fg.primary-dark)]","before:shadow hover:before:shadow-lg"],solid:["text-fg-primary-dark [--btn-bg:theme(colors.action)] [--btn-hover-overlay:theme(colors.white/15%)]","dark:text-fg-primary-dark dark:[--btn-bg:theme(colors.action)] dark:[--btn-hover-overlay:theme(colors.white/15%)]","[--icon-color:theme(colors.fg.primary-dark)] dark:[--icon-color:theme(colors.fg.primary-dark)]","before:shadow hover:before:shadow-lg"],tinted:["text-action [--btn-bg:theme(colors.action/20%)] [--btn-hover-overlay:theme(colors.white/15%)]","dark:text-action dark:[--btn-bg:theme(colors.action/20%)] dark:[--btn-hover-overlay:theme(colors.white/10%)]","[--icon-color:theme(colors.action)] dark:[--icon-color:theme(colors.action)]","backdrop-blur-lg"]}},dR0={color:"var(--icon-color)",weight:"bold",size:"1.25rem"},qe=e.forwardRef(function({surface:a="system",mode:n="solid",small:r=!1,circular:l=!1,pill:o=!1,children:i,className:c,iconProps:u={},...d},h){const f=_e(c,Ts.base,Ts.modes[n],Ts.surfaces[a],r&&Ts.small,o&&Ts.pill,l&&Ts.circular),v={...dR0,...u},Z="href"in d&&d.href!=null||"to"in d&&d.to!=null,H=EA();return Z?_.jsx(H,{...d,className:f,ref:h,children:_.jsx(b3.Provider,{value:v,children:_.jsx(VA,{children:i})})}):_.jsx(i70,{...d,className:_e(f,"cursor-pointer"),ref:h,children:_.jsx(b3.Provider,{value:v,children:_.jsx(VA,{children:i})})})});function VA({children:t}){return _.jsxs(_.Fragment,{children:[t,_.jsx("span",{className:"absolute left-1/2 top-1/2 size-[max(100%,2.75rem)] -translate-x-1/2 -translate-y-1/2 [@media(pointer:fine)]:hidden","aria-hidden":"true"})]})}const Is=({src:t=null,square:a=!1,initials:n,alt:r="",className:l,noBorder:o=!1,children:i,...c})=>{const u=d=>{if(!d)return;let h=0;return d.split("").forEach(H=>{h=H.charCodeAt(0)+((h<<5)-h)}),`hsl(${h%360}, 40%, 60%)`};return _.jsxs("span",{"data-slot":"avatar",...c,className:_e(l,"inline-grid shrink-0 align-middle [--avatar-radius:20%] [--ring-opacity:20%] *:col-start-1 *:row-start-1",!o&&"bg-gray-100/50 dark:bg-material-thin-dark backdrop-blur-md border-2 border-system-chrome dark:border-material-opaque",a?"rounded-[--avatar-radius] *:rounded-[--avatar-radius]":"rounded-full *:rounded-full"),children:[t?_.jsx("img",{src:t,alt:r,className:"object-cover object-center aspect-square"}):n?_.jsxs("svg",{className:"select-none fill-current w-full h-full font-medium uppercase",style:{backgroundColor:u(n)?YL(u(n)).alpha(.7).toString():void 0,color:u(n)?YL(u(n)).darken(.6).toString():"#000000",fontSize:"400%"},viewBox:"0 0 100 100","aria-hidden":r?void 0:"true",children:[r?_.jsx("title",{children:r}):null,_.jsx("text",{x:"50%",y:"50%",alignmentBaseline:"middle",dominantBaseline:"middle",textAnchor:"middle",dy:".125em",children:n})]}):null,i]})};e.forwardRef(function({src:a,square:n=!1,initials:r,alt:l,className:o,avatarClassName:i,noBorder:c,children:u,surface:d="system",mode:h="ghost",small:f=!1,circular:v=!0,pill:Z=!1,...H},V){return _.jsx(qe,{...H,surface:d,mode:h,small:f,circular:v,pill:Z,className:_e(o),ref:V,children:_.jsx(Is,{src:a,square:n,initials:r,alt:l,noBorder:c,className:_e(i,"border-none"),children:u})})});const hR0={color:"var(--icon-color)",weight:"fill",size:"16px"},pR0=e.forwardRef(function({className:a,direction:n="cols",...r},l){return _.jsx(b3.Provider,{value:hR0,children:_.jsx("div",{ref:l,className:_e(a,"[--anchor-gap:theme(spacing.2)] [--anchor-padding:theme(spacing.3)] data-[anchor~=end]:[--anchor-offset:4px] data-[anchor~=start]:[--anchor-offset:-4px]","origin-top-left isolate w-max rounded-lg","outline outline-1 outline-transparent focus:outline-none","overflow-y-auto","bg-material-chrome backdrop-blur-xl dark:bg-material-regular-dark","shadow-lg ring-1 ring-system-thick dark:ring-inset dark:ring-system-thick-dark","supports-[grid-template-columns:subgrid]:grid",n==="cols"?"supports-[grid-template-columns:subgrid]:grid-cols-[auto_auto_auto]":"supports-[grid-template-columns:subgrid]:grid-rows-[auto_auto_auto]","transition data-[closed]:data-[leave]:opacity-0 data-[leave]:duration-100 data-[leave]:ease-in"),...r})})}),fR0=e.forwardRef(function({active:a,className:n,href:r,to:l,...o},i){const c=_e(n,"group cursor-pointer inline-flex rounded-md px-3 py-2 focus:outline-none sm:px-3 sm:py-1.5","text-left text-base/6 text-fg-primary sm:text-sm/6 dark:text-fg-primary-dark forced-colors:text-[CanvasText]","data-[focus]:bg-system-thin dark:data-[focus]:bg-system-thin-dark","focus:bg-system-thin dark:focus:bg-system-thin-dark","hover:bg-system-thin dark:hover:bg-system-thin-dark","data-[disabled]:opacity-50","disabled:opacity-50","forced-color-adjust-none forced-colors:focus:bg-[Highlight] forced-colors:focus:text-[HighlightText] forced-colors:[&>[data-slot=icon]]:focus:text-[HighlightText]","forced-colors:data-[focus]:bg-[Highlight] forced-colors:data-[focus]:text-[HighlightText] forced-colors:[&>[data-slot=icon]]:data-[focus]:text-[HighlightText]","col-span-full grid grid-cols-[auto_auto_auto] items-center supports-[grid-template-columns:subgrid]:grid-cols-subgrid","[--icon-color:theme(colors.fg.secondary)] dark:[--icon-color:theme(colors.fg.secondary-dark)]","gap-x-1",a?"bg-system-thin dark:bg-system-thin-dark":null),u=EA();if(r||l){const d=o;return _.jsx(u,{...d,href:r,to:l,className:c,ref:i})}else{const d=o;return _.jsx("button",{...d,type:"button",className:c,ref:i})}}),vR0={color:"var(--icon-color)",weight:"fill",size:"16px"};function Nc0(t){return _.jsx(iR0,{...t})}function Pc0(t){return _.jsx(Fc0,{as:qe,...t})}function $c0({anchor:t="bottom",portal:a=!0,...n}){return _.jsx(_c0,{transition:!0,...n,anchor:a?t:void 0,as:pR0})}function Ko(t){return _.jsx(b3.Provider,{value:vR0,children:_.jsx(kc0,{as:fR0,...t})})}function gR0({className:t,...a}){return _.jsx(wc0,{...a,className:_e(t,"col-span-full mx-3.5 my-1 h-px border-0 bg-zinc-950/5 sm:mx-3 dark:bg-white/10 forced-colors:bg-[CanvasText]")})}function Xo({className:t,...a}){return _.jsx(d70,{...a,"data-slot":"label",className:_e(t,"col-start-2 row-start-1"),...a})}const e7={card:["flex flex-col group","relative","rounded-xl","shadow-lg","dark:border-white/5 dark:border","[&>:first-child]:rounded-t-xl [&>:last-child]:rounded-b-xl","[&>:first-child]:before:rounded-t-xl [&>:first-child]:after:rounded-t-xl","[&>:last-child]:before:rounded-b-xl [&>:last-child]:after:rounded-b-xl"],backgroundColor:["bg-system-chrome dark:bg-system-chrome-dark"],interactive:["transition-all","hover:-translate-y-0.5 active:hover:scale-[98%] hover:shadow-xl","group-hover:-translate-y-0.5 group-hover:shadow-xl group-active:hover:scale-[98%]"],cardNonResponsive:["[&>*]:min-w-full"],responsive:["md:flex-row","md:[&>:first-child]:rounded-none md:[&>:last-child]:rounded-none","md:[&>:first-child]:before:rounded-none md:[&>:first-child]:after:rounded-none","md:[&>:last-child]:before:rounded-none md:[&>:last-child]:after:rounded-none","md:[&>:first-child]:rounded-l-xl md:[&>:last-child]:rounded-r-xl","md:[&>:first-child]:before:rounded-l-xl md:[&>:first-child]:after:rounded-l-xl","md:[&>:last-child]:before:rounded-r-xl md:[&>:last-child]:after:rounded-r-xl"],cardContent:["p-4 relative z-0","content-center","before:z-[-1] before:bg-bottom before:bg-cover before:bg-no-repeat before:[background-image:var(--blurBackground)] before:absolute before","after:z-[-1] after:backdrop-blur-xl after:bg-material-screen dark:after:bg-material-regular-dark after:absolute after","after:transition-colors group-hover:after:bg-material-chrome dark:group-hover:after:bg-material-chrome-dark"],cardImage:["overflow-hidden w-full"]},s6=({as:t,interactive:a=!1,responsive:n=!1,backgroundColor:r="",className:l,...o})=>{const i=t||"div";return _.jsx(i,{...o,className:_e(l,e7.card,r||e7.backgroundColor,a?e7.interactive:null,n?e7.responsive:e7.cardNonResponsive)})},yA=({as:t,className:a,blurBackground:n,...r})=>{const l=t||"div";return _.jsx(l,{...r,style:n?{"--blurBackground":`url(${n})`}:r.style,className:_e(a,e7.cardContent,!n&&"after:hidden")})},bA=({as:t,className:a,...n})=>{const r=t||"img";return _.jsx(r,{...n,className:_e(a,e7.cardImage)})},$S={inherited:["[&_a]:text-action [&_a]:underline [&_a]:decoration-action/50 [&_a:hover]:decoration-action/100"],as:{p:["text-base/relaxed"],h1:["text-4xl/normal font-bold leading-tight"],h2:["text-2xl/normal font-semibold"],h3:["text-xl/snug font-semibold"],h4:["text-lg/tight font-medium"],h5:["text-base/tight font-medium"],small:["text-xs/tight"]}},AR0="p";function re({className:t,as:a,fg:n="primary",...r}){const l=a??AR0;let o;switch(n){case"secondary":o="text-fg-secondary dark:text-fg-secondary-dark";break;case"tertiary":o="text-fg-tertiary dark:text-fg-tertiary-dark";break;case"quaternary":o="text-fg-quaternary dark:text-fg-quaternary-dark";break;case"primary":default:o="text-fg-primary dark:text-fg-primary-dark";break}return _.jsx(l,{...r,"data-slot":"text",className:_e(t,$S.as[a]??$S.as.p,$S.inherited,o)})}const E=e.forwardRef((t,a)=>{const{alt:n,color:r,size:l,weight:o,mirrored:i,children:c,weights:u,...d}=t,{color:h="currentColor",size:f,weight:v="regular",mirrored:Z=!1,...H}=e.useContext(b3);return e.createElement("svg",{ref:a,xmlns:"http://www.w3.org/2000/svg",width:l??f,height:l??f,fill:r??h,viewBox:"0 0 256 256",transform:i||Z?"scale(-1, 1)":void 0,...H,...d},!!n&&e.createElement("title",null,n),c,u.get(o??v))});E.displayName="IconBase";const ZR0=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216.49,56.48,177,96h19a12,12,0,0,1,0,24H148a12,12,0,0,1-12-12V60a12,12,0,0,1,24,0V79l39.51-39.52a12,12,0,0,1,17,17ZM108,136H60a12,12,0,0,0,0,24H79L39.51,199.51a12,12,0,0,0,17,17L96,177v19a12,12,0,0,0,24,0V148A12,12,0,0,0,108,136Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Z",opacity:"0.2"}),e.createElement("path",{d:"M213.66,53.66,163.31,104H192a8,8,0,0,1,0,16H144a8,8,0,0,1-8-8V64a8,8,0,0,1,16,0V92.69l50.34-50.35a8,8,0,0,1,11.32,11.32ZM112,136H64a8,8,0,0,0,0,16H92.69L42.34,202.34a8,8,0,0,0,11.32,11.32L104,163.31V192a8,8,0,0,0,16,0V144A8,8,0,0,0,112,136Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M120,144v48a8,8,0,0,1-13.66,5.66L88,179.31,53.66,213.66a8,8,0,0,1-11.32-11.32L76.69,168,58.34,149.66A8,8,0,0,1,64,136h48A8,8,0,0,1,120,144ZM213.66,42.34a8,8,0,0,0-11.32,0L168,76.69,149.66,58.34A8,8,0,0,0,136,64v48a8,8,0,0,0,8,8h48a8,8,0,0,0,5.66-13.66L179.31,88l34.35-34.34A8,8,0,0,0,213.66,42.34Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M212.24,52.24,158.48,106H192a6,6,0,0,1,0,12H144a6,6,0,0,1-6-6V64a6,6,0,0,1,12,0V97.52l53.76-53.76a6,6,0,0,1,8.48,8.48ZM112,138H64a6,6,0,0,0,0,12H97.52L43.76,203.76a6,6,0,1,0,8.48,8.48L106,158.48V192a6,6,0,0,0,12,0V144A6,6,0,0,0,112,138Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M213.66,53.66,163.31,104H192a8,8,0,0,1,0,16H144a8,8,0,0,1-8-8V64a8,8,0,0,1,16,0V92.69l50.34-50.35a8,8,0,0,1,11.32,11.32ZM112,136H64a8,8,0,0,0,0,16H92.69L42.34,202.34a8,8,0,0,0,11.32,11.32L104,163.31V192a8,8,0,0,0,16,0V144A8,8,0,0,0,112,136Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M210.83,50.83,153.66,108H192a4,4,0,0,1,0,8H144a4,4,0,0,1-4-4V64a4,4,0,0,1,8,0v38.34l57.17-57.17a4,4,0,1,1,5.66,5.66ZM112,140H64a4,4,0,0,0,0,8h38.34L45.17,205.17a4,4,0,0,0,5.66,5.66L108,153.66V192a4,4,0,0,0,8,0V144A4,4,0,0,0,112,140Z"}))]]),TS=e.forwardRef((t,a)=>e.createElement(E,{ref:a,...t,weights:ZR0}));TS.displayName="ArrowsInSimpleIcon";const Tc0=TS,HR0=Object.freeze(Object.defineProperty({__proto__:null,ArrowsInSimple:Tc0,ArrowsInSimpleIcon:TS},Symbol.toStringTag,{value:"Module"})),MR0=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M220,48V96a12,12,0,0,1-24,0V77l-39.51,39.52a12,12,0,0,1-17-17L179,60H160a12,12,0,0,1,0-24h48A12,12,0,0,1,220,48ZM99.51,139.51,60,179V160a12,12,0,0,0-24,0v48a12,12,0,0,0,12,12H96a12,12,0,0,0,0-24H77l39.52-39.51a12,12,0,0,0-17-17Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Z",opacity:"0.2"}),e.createElement("path",{d:"M216,48V96a8,8,0,0,1-16,0V67.31l-50.34,50.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM106.34,138.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l50.35-50.34a8,8,0,0,0-11.32-11.32Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M117.66,138.34a8,8,0,0,1,0,11.32L83.31,184l18.35,18.34A8,8,0,0,1,96,216H48a8,8,0,0,1-8-8V160a8,8,0,0,1,13.66-5.66L72,172.69l34.34-34.35A8,8,0,0,1,117.66,138.34ZM208,40H160a8,8,0,0,0-5.66,13.66L172.69,72l-34.35,34.34a8,8,0,0,0,11.32,11.32L184,83.31l18.34,18.35A8,8,0,0,0,216,96V48A8,8,0,0,0,208,40Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M214,48V96a6,6,0,0,1-12,0V62.48l-53.76,53.76a6,6,0,0,1-8.48-8.48L193.52,54H160a6,6,0,0,1,0-12h48A6,6,0,0,1,214,48ZM107.76,139.76,54,193.52V160a6,6,0,0,0-12,0v48a6,6,0,0,0,6,6H96a6,6,0,0,0,0-12H62.48l53.76-53.76a6,6,0,0,0-8.48-8.48Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,48V96a8,8,0,0,1-16,0V67.31l-50.34,50.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM106.34,138.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l50.35-50.34a8,8,0,0,0-11.32-11.32Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M212,48V96a4,4,0,0,1-8,0V57.66l-57.17,57.17a4,4,0,0,1-5.66-5.66L198.34,52H160a4,4,0,0,1,0-8h48A4,4,0,0,1,212,48ZM109.17,141.17,52,198.34V160a4,4,0,0,0-8,0v48a4,4,0,0,0,4,4H96a4,4,0,0,0,0-8H57.66l57.17-57.17a4,4,0,0,0-5.66-5.66Z"}))]]),IS=e.forwardRef((t,a)=>e.createElement(E,{ref:a,...t,weights:MR0}));IS.displayName="ArrowsOutSimpleIcon";const Ic0=IS,ER0=Object.freeze(Object.defineProperty({__proto__:null,ArrowsOutSimple:Ic0,ArrowsOutSimpleIcon:IS},Symbol.toStringTag,{value:"Module"})),$d={card:["group","z-0","mb-12","px-4 py-6 pb-0","rounded-xl","relative","transition after:transition-all hover:transition-all","after:absolute after:-z-10 after:rounded-xl","dark:after:border-white/5"],contractedCard:["cursor-pointer","after:inset-0","active:hover:scale-95 active:hover:after:shadow-md","after:bg-material-thick dark:after:bg-material-thick-dark","hover:after:shadow-lg hover:after:-inset-4 hover:mb-12"],expandedCard:["is-expanded","cursor-auto","after:bg-material-chrome dark:after:bg-material-regular-dark","hover:after:shadow-xl after:shadow-xl dark:after:shadow-none dark:after:border dark:after:border-white/5","after:-inset-4","pb-8"],content:["max-h-56 min-h-24 overflow-hidden","after:absolute after:bottom-0 after:left-0 after:right-0 after:h-14 after:rounded-b-xl after:bg-gradient-to-b after:from-transparent after:to-material-thick after:dark:to-material-thick-dark","group-[:not(.is-expanded)]:gradient-mask-b-0 group-[:not(.is-expanded):hover]:gradient-mask-b-[rgba(0,0,0,1.0)_50%,rgba(0,0,0,0)_100%]","group-[.is-expanded]:after:to-transparent"],button:["transition absolute bottom-4 right-4","group-[.is-expanded]:translate-x-4 group-[.is-expanded]:translate-y-4","group-hover:translate-x-4 group-hover:translate-y-4"]},VR0=({children:t,expandedOnMount:a=!1,className:n})=>{const[r,l]=e.useState(a),[o,i]=e.useState(224),c=e.useRef(null);return e.useEffect(()=>{if(!c.current)return;const u=new ResizeObserver(()=>{c.current&&c.current.scrollHeight!==o&&i(c.current.scrollHeight)});return u.observe(c.current),function(){u.disconnect()}},[t,o]),_.jsxs("div",{className:_e($d.card,r?$d.expandedCard:$d.contractedCard,n),onClick:r?void 0:()=>l(!r),children:[_.jsx("div",{className:_e($d.content),style:r?{maxHeight:o}:void 0,ref:c,children:t}),_.jsx("div",{className:_e($d.button),children:_.jsx(qe,{onClick:()=>l(!r),surface:"chrome",circular:!0,children:r?_.jsx(Tc0,{size:16}):_.jsx(Ic0,{size:16})})})]})};function yR0({className:t,...a}){return _.jsx(wj0,{...a,className:_e(t,"[&>*+[data-slot=control]]:mt-6 [&>[data-slot=text]]:mt-1")})}function OS({className:t,...a}){return _.jsx(Fj0,{...a,className:_e(t,"[&>[data-slot=label]+[data-slot=control]]:mt-3","[&>[data-slot=label]+[data-slot=description]]:mt-1","[&>[data-slot=description]+[data-slot=control]]:mt-3","[&>[data-slot=control]+[data-slot=description]]:mt-3","[&>[data-slot=control]+[data-slot=error]]:mt-3","[&>[data-slot=label]]:font-medium")})}function xS({className:t,...a}){return _.jsx(d70,{"data-slot":"label",...a,className:_e(t,"select-none text-base/6 text-fg-primary data-[disabled]:opacity-50 sm:text-sm/6 dark:text-fg-primary-dark")})}const bR0=["date","datetime-local","month","time","week"],dl=e.forwardRef(function({className:a,...n},r){return _.jsx("span",{"data-slot":"control",className:_e(["relative block w-full","before:absolute before:inset-px before:rounded-[calc(theme(borderRadius.lg)-1px)] before:bg-white before:shadow","dark:before:hidden","after:pointer-events-none after:absolute after:inset-0 after:rounded-lg after:ring-inset after:ring-transparent sm:after:focus-within:ring-2 sm:after:focus-within:ring-action","has-[[data-disabled]]:opacity-50 before:has-[[data-disabled]]:bg-system-regular dark:before:has-[[data-disabled]]:bg-system-regular-dark before:has-[[data-disabled]]:shadow-none","before:has-[[data-invalid]]:shadow-red-500/10"]),children:_.jsx(Pj0,{ref:r,...n,className:_e([a,n.type&&bR0.includes(n.type)&&["[&::-webkit-datetime-edit-fields-wrapper]:p-0","[&::-webkit-date-and-time-value]:min-h-[1.5em]","[&::-webkit-datetime-edit]:inline-flex","[&::-webkit-datetime-edit]:p-0","[&::-webkit-datetime-edit-year-field]:p-0","[&::-webkit-datetime-edit-month-field]:p-0","[&::-webkit-datetime-edit-day-field]:p-0","[&::-webkit-datetime-edit-hour-field]:p-0","[&::-webkit-datetime-edit-minute-field]:p-0","[&::-webkit-datetime-edit-second-field]:p-0","[&::-webkit-datetime-edit-millisecond-field]:p-0","[&::-webkit-datetime-edit-meridiem-field]:p-0"],"relative block w-full appearance-none rounded-lg px-[calc(theme(spacing[3.5])-1px)] py-[calc(theme(spacing[2.5])-1px)] sm:px-[calc(theme(spacing[3])-1px)] sm:py-[calc(theme(spacing[1.5])-1px)]","text-base/6 text-fg-primary placeholder:fg-secondary dark:placeholder:fg-secondary-dark sm:text-sm/6 dark:text-fg-primary-dark","border border-system-thin data-[hover]:border-system-thick dark:border-system-regular-dark dark:data-[hover]:border-system-thin-dark","bg-transparent dark:bg-white/5","focus:outline-none","data-[invalid]:border-red-500 data-[invalid]:data-[hover]:border-red-500 data-[invalid]:dark:border-red-500 data-[invalid]:data-[hover]:dark:border-red-500","data-[disabled]:border-system-thick dark:data-[hover]:data-[disabled]:border-system-thick-dark data-[disabled]:dark:border-system-regular-dark data-[disabled]:dark:bg-system-regular-dark","dark:[color-scheme:dark]",n.type&&n.type==="file"&&["file:bg-gray-50 file:border-0 file:me-4 file:py-3 file:px-4 dark:file:bg-neutral-700 dark:file:text-neutral-400","!p-0"]])})})});var LR0=Object.defineProperty,SR0=Object.defineProperties,FR0=Object.getOwnPropertyDescriptors,LA=Object.getOwnPropertySymbols,Oc0=Object.prototype.hasOwnProperty,xc0=Object.prototype.propertyIsEnumerable,jc0=(t,a,n)=>a in t?LR0(t,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[a]=n,_R0=(t,a)=>{for(var n in a||(a={}))Oc0.call(a,n)&&jc0(t,n,a[n]);if(LA)for(var n of LA(a))xc0.call(a,n)&&jc0(t,n,a[n]);return t},kR0=(t,a)=>SR0(t,FR0(a)),wR0=(t,a)=>{var n={};for(var r in t)Oc0.call(t,r)&&a.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&LA)for(var r of LA(t))a.indexOf(r)<0&&xc0.call(t,r)&&(n[r]=t[r]);return n},CR0="^\\d+$";function NR0(t){let a=setTimeout(t,0),n=setTimeout(t,10),r=setTimeout(t,50);return[a,n,r]}function PR0(t){let a=e.useRef();return e.useEffect(()=>{a.current=t}),a.current}var $R0=18,Rc0=40,TR0=`${Rc0}px`,IR0=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function OR0({containerRef:t,inputRef:a,pushPasswordManagerStrategy:n,isFocused:r}){let l=e.useRef({done:!1,refocused:!1}),[o,i]=e.useState(!1),[c,u]=e.useState(!1),[d,h]=e.useState(!1),f=e.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&o&&c,[o,c,n]),v=e.useCallback(()=>{let Z=t.current,H=a.current;if(!Z||!H||d||n==="none")return;let V=Z,b=V.getBoundingClientRect().left+V.offsetWidth,S=V.getBoundingClientRect().top+V.offsetHeight/2,F=b-$R0,w=S;if(!(document.querySelectorAll(IR0).length===0&&document.elementFromPoint(F,w)===Z)&&(i(!0),h(!0),!l.current.refocused&&document.activeElement===H)){let $=[H.selectionStart,H.selectionEnd];H.blur(),H.focus(),H.setSelectionRange($[0],$[1]),l.current.refocused=!0}},[t,a,d,n]);return e.useEffect(()=>{let Z=t.current;if(!Z||n==="none")return;function H(){let b=window.innerWidth-Z.getBoundingClientRect().right;u(b>=Rc0)}H();let V=setInterval(H,1e3);return()=>{clearInterval(V)}},[t,n]),e.useEffect(()=>{let Z=r||document.activeElement===a.current;if(n==="none"||!Z)return;let H=setTimeout(v,0),V=setTimeout(v,2e3),b=setTimeout(v,5e3),S=setTimeout(()=>{h(!0)},6e3);return()=>{clearTimeout(H),clearTimeout(V),clearTimeout(b),clearTimeout(S)}},[a,r,n,v]),{hasPWMBadge:o,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:TR0}}var Dc0=e.createContext({}),zc0=e.forwardRef((t,a)=>{var n=t,{value:r,onChange:l,maxLength:o,textAlign:i="left",pattern:c=CR0,inputMode:u="numeric",onComplete:d,pushPasswordManagerStrategy:h="increase-width",containerClassName:f,noScriptCSSFallback:v=xR0,render:Z,children:H}=n,V=wR0(n,["value","onChange","maxLength","textAlign","pattern","inputMode","onComplete","pushPasswordManagerStrategy","containerClassName","noScriptCSSFallback","render","children"]),b,S,F,w,$;let[C,P]=e.useState(typeof V.defaultValue=="string"?V.defaultValue:""),O=r??C,z=PR0(O),G=e.useCallback(M0=>{l==null||l(M0),P(M0)},[l]),R=e.useMemo(()=>c?typeof c=="string"?new RegExp(c):c:null,[c]),J=e.useRef(null),Y=e.useRef(null),n0=e.useRef({value:O,onChange:G,isIOS:typeof window<"u"&&((S=(b=window==null?void 0:window.CSS)==null?void 0:b.supports)==null?void 0:S.call(b,"-webkit-touch-callout","none"))}),l0=e.useRef({prev:[(F=J.current)==null?void 0:F.selectionStart,(w=J.current)==null?void 0:w.selectionEnd,($=J.current)==null?void 0:$.selectionDirection]});e.useImperativeHandle(a,()=>J.current,[]),e.useEffect(()=>{let M0=J.current,c0=Y.current;if(!M0||!c0)return;n0.current.value!==M0.value&&n0.current.onChange(M0.value),l0.current.prev=[M0.selectionStart,M0.selectionEnd,M0.selectionDirection];function Q0(){if(document.activeElement!==M0){j(null),i0(null);return}let Y0=M0.selectionStart,h1=M0.selectionEnd,S1=M0.selectionDirection,A1=M0.maxLength,v1=M0.value,e1=l0.current.prev,K0=-1,j0=-1,i1;if(v1.length!==0&&Y0!==null&&h1!==null){let Z1=Y0===h1,x1=Y0===v1.length&&v1.length<A1;if(Z1&&!x1){let me=Y0;if(me===0)K0=0,j0=1,i1="forward";else if(me===A1)K0=me-1,j0=me,i1="backward";else if(A1>1&&v1.length>1){let F0=0;if(e1[0]!==null&&e1[1]!==null){i1=me<e1[1]?"backward":"forward";let c1=e1[0]===e1[1]&&e1[0]<A1;i1==="backward"&&!c1&&(F0=-1)}K0=F0+me,j0=F0+me+1}}K0!==-1&&j0!==-1&&K0!==j0&&J.current.setSelectionRange(K0,j0,i1)}let _0=K0!==-1?K0:Y0,$0=j0!==-1?j0:h1,X0=i1??S1;j(_0),i0($0),l0.current.prev=[_0,$0,X0]}if(document.addEventListener("selectionchange",Q0,{capture:!0}),Q0(),document.activeElement===M0&&d0(!0),!document.getElementById("input-otp-style")){let Y0=document.createElement("style");if(Y0.id="input-otp-style",document.head.appendChild(Y0),Y0.sheet){let h1="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Td(Y0.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Td(Y0.sheet,`[data-input-otp]:autofill { ${h1} }`),Td(Y0.sheet,`[data-input-otp]:-webkit-autofill { ${h1} }`),Td(Y0.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Td(Y0.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let f0=()=>{c0&&c0.style.setProperty("--root-height",`${M0.clientHeight}px`)};f0();let a1=new ResizeObserver(f0);return a1.observe(M0),()=>{document.removeEventListener("selectionchange",Q0,{capture:!0}),a1.disconnect()}},[]);let[X,P0]=e.useState(!1),[A0,d0]=e.useState(!1),[L0,j]=e.useState(null),[a0,i0]=e.useState(null);e.useEffect(()=>{NR0(()=>{var M0,c0,Q0,f0;(M0=J.current)==null||M0.dispatchEvent(new Event("input"));let a1=(c0=J.current)==null?void 0:c0.selectionStart,Y0=(Q0=J.current)==null?void 0:Q0.selectionEnd,h1=(f0=J.current)==null?void 0:f0.selectionDirection;a1!==null&&Y0!==null&&(j(a1),i0(Y0),l0.current.prev=[a1,Y0,h1])})},[O,A0]),e.useEffect(()=>{z!==void 0&&O!==z&&z.length<o&&O.length===o&&(d==null||d(O))},[o,d,z,O]);let q=OR0({containerRef:Y,inputRef:J,pushPasswordManagerStrategy:h,isFocused:A0}),p0=e.useCallback(M0=>{let c0=M0.currentTarget.value.slice(0,o);if(c0.length>0&&R&&!R.test(c0)){M0.preventDefault();return}typeof z=="string"&&c0.length<z.length&&document.dispatchEvent(new Event("selectionchange")),G(c0)},[o,G,z,R]),b0=e.useCallback(()=>{var M0;if(J.current){let c0=Math.min(J.current.value.length,o-1),Q0=J.current.value.length;(M0=J.current)==null||M0.setSelectionRange(c0,Q0),j(c0),i0(Q0)}d0(!0)},[o]),Q=e.useCallback(M0=>{var c0,Q0;let f0=J.current;if(!n0.current.isIOS||!M0.clipboardData||!f0)return;let a1=M0.clipboardData.getData("text/plain");M0.preventDefault();let Y0=(c0=J.current)==null?void 0:c0.selectionStart,h1=(Q0=J.current)==null?void 0:Q0.selectionEnd,S1=(Y0!==h1?O.slice(0,Y0)+a1+O.slice(h1):O.slice(0,Y0)+a1+O.slice(Y0)).slice(0,o);if(S1.length>0&&R&&!R.test(S1))return;f0.value=S1,G(S1);let A1=Math.min(S1.length,o-1),v1=S1.length;f0.setSelectionRange(A1,v1),j(A1),i0(v1)},[o,G,R,O]),s0=e.useMemo(()=>({position:"relative",cursor:V.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[V.disabled]),e0=e.useMemo(()=>({position:"absolute",inset:0,width:q.willPushPWMBadge?`calc(100% + ${q.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:q.willPushPWMBadge?`inset(0 ${q.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:i,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[q.PWM_BADGE_SPACE_WIDTH,q.willPushPWMBadge,i]),m0=e.useMemo(()=>e.createElement("input",kR0(_R0({autoComplete:V.autoComplete||"one-time-code"},V),{"data-input-otp":!0,"data-input-otp-mss":L0,"data-input-otp-mse":a0,inputMode:u,pattern:R==null?void 0:R.source,style:e0,maxLength:o,value:O,ref:J,onPaste:M0=>{var c0;Q(M0),(c0=V.onPaste)==null||c0.call(V,M0)},onChange:p0,onMouseOver:M0=>{var c0;P0(!0),(c0=V.onMouseOver)==null||c0.call(V,M0)},onMouseLeave:M0=>{var c0;P0(!1),(c0=V.onMouseLeave)==null||c0.call(V,M0)},onFocus:M0=>{var c0;b0(),(c0=V.onFocus)==null||c0.call(V,M0)},onBlur:M0=>{var c0;d0(!1),(c0=V.onBlur)==null||c0.call(V,M0)}})),[p0,b0,Q,u,e0,o,a0,L0,V,R==null?void 0:R.source,O]),h0=e.useMemo(()=>({slots:Array.from({length:o}).map((M0,c0)=>{let Q0=A0&&L0!==null&&a0!==null&&(L0===a0&&c0===L0||c0>=L0&&c0<a0),f0=O[c0]!==void 0?O[c0]:null;return{char:f0,isActive:Q0,hasFakeCaret:Q0&&f0===null}}),isFocused:A0,isHovering:!V.disabled&&X}),[A0,X,o,a0,L0,V.disabled,O]),Z0=e.useMemo(()=>Z?Z(h0):e.createElement(Dc0.Provider,{value:h0},H),[H,h0,Z]);return e.createElement(e.Fragment,null,v!==null&&e.createElement("noscript",null,e.createElement("style",null,v)),e.createElement("div",{ref:Y,"data-input-otp-container":!0,style:s0,className:f},Z0,e.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},m0)))});zc0.displayName="Input";function Td(t,a){try{t.insertRule(a)}catch{console.error("input-otp could not insert CSS rule:",a)}}var xR0=`
283
+ `))}else{let v=h.props,Z=v==null?void 0:v.className,H=typeof Z=="function"?(...S)=>nS(Z(...S),u.className):nS(Z,u.className),V=H?{className:H}:{},b=o70(h.props,Y5(rS(u,["ref"])));for(let S in f)S in b&&delete f[S];return e.cloneElement(h,Object.assign({},b,f,d,{ref:l(h.ref,d.ref)},V))}return e.createElement(o,Object.assign({},rS(u,["ref"]),o!==e.Fragment&&d,o!==e.Fragment&&f),h)}function LI0(...t){return t.every(a=>a==null)?void 0:a=>{for(let n of t)n!=null&&(typeof n=="function"?n(a):n.current=a)}}function o70(...t){if(t.length===0)return{};if(t.length===1)return t[0];let a={},n={};for(let r of t)for(let l in r)l.startsWith("on")&&typeof r[l]=="function"?(n[l]!=null||(n[l]=[]),n[l].push(r[l])):a[l]=r[l];if(a.disabled||a["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[l=>{var o;return(o=l==null?void 0:l.preventDefault)==null?void 0:o.call(l)}]);for(let r in n)Object.assign(a,{[r](l,...o){let i=n[r];for(let c of i){if((l instanceof Event||(l==null?void 0:l.nativeEvent)instanceof Event)&&l.defaultPrevented)return;c(l,...o)}}});return a}function Ss(...t){if(t.length===0)return{};if(t.length===1)return t[0];let a={},n={};for(let r of t)for(let l in r)l.startsWith("on")&&typeof r[l]=="function"?(n[l]!=null||(n[l]=[]),n[l].push(r[l])):a[l]=r[l];for(let r in n)Object.assign(a,{[r](...l){let o=n[r];for(let i of o)i==null||i(...l)}});return a}function f8(t){var a;return Object.assign(e.forwardRef(t),{displayName:(a=t.displayName)!=null?a:t.name})}function Y5(t){let a=Object.assign({},t);for(let n in a)a[n]===void 0&&delete a[n];return a}function rS(t,a=[]){let n=Object.assign({},t);for(let r of a)r in n&&delete n[r];return n}let SI0="button";function FI0(t,a){var n;let r=G5(),{disabled:l=r||!1,autoFocus:o=!1,...i}=t,{isFocusVisible:c,focusProps:u}=yd({autoFocus:o}),{isHovered:d,hoverProps:h}=Vd({isDisabled:l}),{pressed:f,pressProps:v}=Xg({disabled:l}),Z=Ss({ref:a,type:(n=i.type)!=null?n:"button",disabled:l||void 0,autoFocus:o},u,h,v),H=e.useMemo(()=>({disabled:l,hover:d,focus:c,active:f,autofocus:o}),[l,d,c,f,o]);return k8({ourProps:Z,theirProps:i,slot:H,defaultTag:SI0,name:"Button"})}let i70=f8(FI0),_I0="span";var bd=(t=>(t[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t))(bd||{});function kI0(t,a){var n;let{features:r=1,...l}=t,o={ref:a,"aria-hidden":(r&2)===2?!0:(n=l["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return k8({ourProps:o,theirProps:l,slot:{},defaultTag:_I0,name:"Hidden"})}let eA=f8(kI0),wI0=e.createContext(null);function CI0(t){let[a,n]=e.useState(null);return G0.createElement(wI0.Provider,{value:{target:a}},t.children,G0.createElement(eA,{features:bd.Hidden,ref:n}))}let c70=e.createContext(void 0);function lS(){return e.useContext(c70)}function NI0({id:t,children:a}){return G0.createElement(c70.Provider,{value:t},a)}function PI0(t){let a=t.parentElement,n=null;for(;a&&!(a instanceof HTMLFieldSetElement);)a instanceof HTMLLegendElement&&(n=a),a=a.parentElement;let r=(a==null?void 0:a.getAttribute("disabled"))==="";return r&&$I0(n)?!1:r}function $I0(t){if(!t)return!1;let a=t.previousElementSibling;for(;a!==null;){if(a instanceof HTMLLegendElement)return!1;a=a.previousElementSibling}return!0}let s70=Symbol();function TI0(t,a=!0){return Object.assign(t,{[s70]:a})}function o6(...t){let a=e.useRef(t);e.useEffect(()=>{a.current=t},[t]);let n=Xe(r=>{for(let l of a.current)l!=null&&(typeof l=="function"?l(r):l.current=r)});return t.every(r=>r==null||(r==null?void 0:r[s70]))?void 0:n}let tA=e.createContext(null);tA.displayName="DescriptionContext";function u70(){let t=e.useContext(tA);if(t===null){let a=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(a,u70),a}return t}function m70(){var t,a;return(a=(t=e.useContext(tA))==null?void 0:t.value)!=null?a:void 0}function oS(){let[t,a]=e.useState([]);return[t.length>0?t.join(" "):void 0,e.useMemo(()=>function(n){let r=Xe(o=>(a(i=>[...i,o]),()=>a(i=>{let c=i.slice(),u=c.indexOf(o);return u!==-1&&c.splice(u,1),c}))),l=e.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return G0.createElement(tA.Provider,{value:l},n.children)},[a])]}let II0="p";function OI0(t,a){let n=e.useId(),r=G5(),{id:l=`headlessui-description-${n}`,...o}=t,i=u70(),c=o6(a);l8(()=>i.register(l),[l,i.register]);let u=r||!1,d=e.useMemo(()=>({...i.slot,disabled:u}),[i.slot,u]),h={ref:c,...i.props,id:l};return k8({ourProps:h,theirProps:o,slot:d,defaultTag:II0,name:i.name||"Description"})}let xI0=f8(OI0),jI0=Object.assign(xI0,{});var ga=(t=>(t.Space=" ",t.Enter="Enter",t.Escape="Escape",t.Backspace="Backspace",t.Delete="Delete",t.ArrowLeft="ArrowLeft",t.ArrowUp="ArrowUp",t.ArrowRight="ArrowRight",t.ArrowDown="ArrowDown",t.Home="Home",t.End="End",t.PageUp="PageUp",t.PageDown="PageDown",t.Tab="Tab",t))(ga||{});let aA=e.createContext(null);aA.displayName="LabelContext";function iS(){let t=e.useContext(aA);if(t===null){let a=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(a,iS),a}return t}function cS(t){var a,n,r;let l=(n=(a=e.useContext(aA))==null?void 0:a.value)!=null?n:void 0;return((r=void 0)!=null?r:0)>0?[l,...t].filter(Boolean).join(" "):l}function nA({inherit:t=!1}={}){let a=cS(),[n,r]=e.useState([]),l=t?[a,...n].filter(Boolean):n;return[l.length>0?l.join(" "):void 0,e.useMemo(()=>function(o){let i=Xe(u=>(r(d=>[...d,u]),()=>r(d=>{let h=d.slice(),f=h.indexOf(u);return f!==-1&&h.splice(f,1),h}))),c=e.useMemo(()=>({register:i,slot:o.slot,name:o.name,props:o.props,value:o.value}),[i,o.slot,o.name,o.props,o.value]);return G0.createElement(aA.Provider,{value:c},o.children)},[r])]}let RI0="label";function DI0(t,a){var n;let r=e.useId(),l=iS(),o=lS(),i=G5(),{id:c=`headlessui-label-${r}`,htmlFor:u=o??((n=l.props)==null?void 0:n.htmlFor),passive:d=!1,...h}=t,f=o6(a);l8(()=>l.register(c),[c,l.register]);let v=Xe(b=>{let S=b.currentTarget;if(S instanceof HTMLLabelElement&&b.preventDefault(),l.props&&"onClick"in l.props&&typeof l.props.onClick=="function"&&l.props.onClick(b),S instanceof HTMLLabelElement){let F=document.getElementById(S.htmlFor);if(F){let w=F.getAttribute("disabled");if(w==="true"||w==="")return;let $=F.getAttribute("aria-disabled");if($==="true"||$==="")return;(F instanceof HTMLInputElement&&(F.type==="radio"||F.type==="checkbox")||F.role==="radio"||F.role==="checkbox"||F.role==="switch")&&F.click(),F.focus({preventScroll:!0})}}}),Z=i||!1,H=e.useMemo(()=>({...l.slot,disabled:Z}),[l.slot,Z]),V={ref:f,...l.props,id:c,htmlFor:u,onClick:v};return d&&("onClick"in V&&(delete V.htmlFor,delete V.onClick),"onClick"in h&&delete h.onClick),k8({ourProps:V,theirProps:h,slot:H,defaultTag:u?RI0:"div",name:l.name||"Label"})}let zI0=f8(DI0),d70=Object.assign(zI0,{}),UI0=e.createContext(()=>{});function BI0({value:t,children:a}){return G0.createElement(UI0.Provider,{value:t},a)}function qI0(t){if(t===null)return{width:0,height:0};let{width:a,height:n}=t.getBoundingClientRect();return{width:a,height:n}}function WI0(t,a=!1){let n=t===null?null:"current"in t?t.current:t,[r,l]=e.useReducer(()=>({}),{}),o=e.useMemo(()=>qI0(n),[n,r]);return l8(()=>{if(!n)return;let i=new ResizeObserver(l);return i.observe(n),()=>{i.disconnect()}},[n]),a?{width:`${o.width}px`,height:`${o.height}px`}:o}let GI0=class extends Map{constructor(a){super(),this.factory=a}get(a){let n=super.get(a);return n===void 0&&(n=this.factory(a),this.set(a,n)),n}};function h70(t,a){let n=t(),r=new Set;return{getSnapshot(){return n},subscribe(l){return r.add(l),()=>r.delete(l)},dispatch(l,...o){let i=a[l].call(n,...o);i&&(n=i,r.forEach(c=>c()))}}}function p70(t){return e.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getSnapshot)}let YI0=new GI0(()=>h70(()=>[],{ADD(t){return this.includes(t)?this:[...this,t]},REMOVE(t){let a=this.indexOf(t);if(a===-1)return this;let n=this.slice();return n.splice(a,1),n}}));function Fs(t,a){let n=YI0.get(a),r=e.useId(),l=p70(n);if(l8(()=>{if(t)return n.dispatch("ADD",r),()=>n.dispatch("REMOVE",r)},[n,t]),!t)return!1;let o=l.indexOf(r),i=l.length;return o===-1&&(o=i,i+=1),o===i-1}let sS=new Map,Ld=new Map;function f70(t){var a;let n=(a=Ld.get(t))!=null?a:0;return Ld.set(t,n+1),n!==0?()=>v70(t):(sS.set(t,{"aria-hidden":t.getAttribute("aria-hidden"),inert:t.inert}),t.setAttribute("aria-hidden","true"),t.inert=!0,()=>v70(t))}function v70(t){var a;let n=(a=Ld.get(t))!=null?a:1;if(n===1?Ld.delete(t):Ld.set(t,n-1),n!==1)return;let r=sS.get(t);r&&(r["aria-hidden"]===null?t.removeAttribute("aria-hidden"):t.setAttribute("aria-hidden",r["aria-hidden"]),t.inert=r.inert,sS.delete(t))}function g70(t,{allowed:a,disallowed:n}={}){let r=Fs(t,"inert-others");l8(()=>{var l,o;if(!r)return;let i=cl();for(let u of(l=n==null?void 0:n())!=null?l:[])u&&i.add(f70(u));let c=(o=a==null?void 0:a())!=null?o:[];for(let u of c){if(!u)continue;let d=q5(u);if(!d)continue;let h=u.parentElement;for(;h&&h!==d.body;){for(let f of h.children)c.some(v=>f.contains(v))||i.add(f70(f));h=h.parentElement}}return i.dispose},[r,a,n])}function uS(t,a,n){let r=W5(l=>{let o=l.getBoundingClientRect();o.x===0&&o.y===0&&o.width===0&&o.height===0&&n()});e.useEffect(()=>{if(!t)return;let l=a===null?null:a instanceof HTMLElement?a:a.current;if(!l)return;let o=cl();if(typeof ResizeObserver<"u"){let i=new ResizeObserver(()=>r.current(l));i.observe(l),o.add(()=>i.disconnect())}if(typeof IntersectionObserver<"u"){let i=new IntersectionObserver(()=>r.current(l));i.observe(l),o.add(()=>i.disconnect())}return()=>o.dispose()},[a,r,t])}let rA=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(t=>`${t}:not([tabindex='-1'])`).join(","),QI0=["[data-autofocus]"].map(t=>`${t}:not([tabindex='-1'])`).join(",");var or=(t=>(t[t.First=1]="First",t[t.Previous=2]="Previous",t[t.Next=4]="Next",t[t.Last=8]="Last",t[t.WrapAround=16]="WrapAround",t[t.NoScroll=32]="NoScroll",t[t.AutoFocus=64]="AutoFocus",t))(or||{}),mS=(t=>(t[t.Error=0]="Error",t[t.Overflow=1]="Overflow",t[t.Success=2]="Success",t[t.Underflow=3]="Underflow",t))(mS||{}),KI0=(t=>(t[t.Previous=-1]="Previous",t[t.Next=1]="Next",t))(KI0||{});function A70(t=document.body){return t==null?[]:Array.from(t.querySelectorAll(rA)).sort((a,n)=>Math.sign((a.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function XI0(t=document.body){return t==null?[]:Array.from(t.querySelectorAll(QI0)).sort((a,n)=>Math.sign((a.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var dS=(t=>(t[t.Strict=0]="Strict",t[t.Loose=1]="Loose",t))(dS||{});function hS(t,a=0){var n;return t===((n=q5(t))==null?void 0:n.body)?!1:sl(a,{0(){return t.matches(rA)},1(){let r=t;for(;r!==null;){if(r.matches(rA))return!0;r=r.parentElement}return!1}})}function Z70(t){let a=q5(t);cl().nextFrame(()=>{a&&!hS(a.activeElement,0)&&ul(t)})}var JI0=(t=>(t[t.Keyboard=0]="Keyboard",t[t.Mouse=1]="Mouse",t))(JI0||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",t=>{t.metaKey||t.altKey||t.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",t=>{t.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:t.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function ul(t){t==null||t.focus({preventScroll:!0})}let eO0=["textarea","input"].join(",");function tO0(t){var a,n;return(n=(a=t==null?void 0:t.matches)==null?void 0:a.call(t,eO0))!=null?n:!1}function H70(t,a=n=>n){return t.slice().sort((n,r)=>{let l=a(n),o=a(r);if(l===null||o===null)return 0;let i=l.compareDocumentPosition(o);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function aO0(t,a){return _s(A70(),a,{relativeTo:t})}function _s(t,a,{sorted:n=!0,relativeTo:r=null,skipElements:l=[]}={}){let o=Array.isArray(t)?t.length>0?t[0].ownerDocument:document:t.ownerDocument,i=Array.isArray(t)?n?H70(t):t:a&64?XI0(t):A70(t);l.length>0&&i.length>1&&(i=i.filter(Z=>!l.some(H=>H!=null&&"current"in H?(H==null?void 0:H.current)===Z:H===Z))),r=r??o.activeElement;let c=(()=>{if(a&5)return 1;if(a&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(a&1)return 0;if(a&2)return Math.max(0,i.indexOf(r))-1;if(a&4)return Math.max(0,i.indexOf(r))+1;if(a&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=a&32?{preventScroll:!0}:{},h=0,f=i.length,v;do{if(h>=f||h+f<=0)return 0;let Z=u+h;if(a&16)Z=(Z+f)%f;else{if(Z<0)return 3;if(Z>=f)return 1}v=i[Z],v==null||v.focus(d),h+=c}while(v!==o.activeElement);return a&6&&tO0(v)&&v.select(),2}function M70(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function nO0(){return/Android/gi.test(window.navigator.userAgent)}function rO0(){return M70()||nO0()}function Sd(t,a,n,r){let l=W5(n);e.useEffect(()=>{if(!t)return;function o(i){l.current(i)}return document.addEventListener(a,o,r),()=>document.removeEventListener(a,o,r)},[t,a,r])}function E70(t,a,n,r){let l=W5(n);e.useEffect(()=>{if(!t)return;function o(i){l.current(i)}return window.addEventListener(a,o,r),()=>window.removeEventListener(a,o,r)},[t,a,r])}const V70=30;function y70(t,a,n){let r=Fs(t,"outside-click"),l=W5(n),o=e.useCallback(function(u,d){if(u.defaultPrevented)return;let h=d(u);if(h===null||!h.getRootNode().contains(h)||!h.isConnected)return;let f=function v(Z){return typeof Z=="function"?v(Z()):Array.isArray(Z)||Z instanceof Set?Z:[Z]}(a);for(let v of f){if(v===null)continue;let Z=v instanceof HTMLElement?v:v.current;if(Z!=null&&Z.contains(h)||u.composed&&u.composedPath().includes(Z))return}return!hS(h,dS.Loose)&&h.tabIndex!==-1&&u.preventDefault(),l.current(u,h)},[l]),i=e.useRef(null);Sd(r,"pointerdown",u=>{var d,h;i.current=((h=(d=u.composedPath)==null?void 0:d.call(u))==null?void 0:h[0])||u.target},!0),Sd(r,"mousedown",u=>{var d,h;i.current=((h=(d=u.composedPath)==null?void 0:d.call(u))==null?void 0:h[0])||u.target},!0),Sd(r,"click",u=>{rO0()||i.current&&(o(u,()=>i.current),i.current=null)},!0);let c=e.useRef({x:0,y:0});Sd(r,"touchstart",u=>{c.current.x=u.touches[0].clientX,c.current.y=u.touches[0].clientY},!0),Sd(r,"touchend",u=>{let d={x:u.changedTouches[0].clientX,y:u.changedTouches[0].clientY};if(!(Math.abs(d.x-c.current.x)>=V70||Math.abs(d.y-c.current.y)>=V70))return o(u,()=>u.target instanceof HTMLElement?u.target:null)},!0),E70(r,"blur",u=>o(u,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function ks(...t){return e.useMemo(()=>q5(...t),[...t])}function b70(t,a,n,r){let l=W5(n);e.useEffect(()=>{t=t??window;function o(i){l.current(i)}return t.addEventListener(a,o,r),()=>t.removeEventListener(a,o,r)},[t,a,r])}function L70(t){var a;if(t.type)return t.type;let n=(a=t.as)!=null?a:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function lO0(t,a){let[n,r]=e.useState(()=>L70(t));return l8(()=>{r(L70(t))},[t.type,t.as]),l8(()=>{n||a.current&&a.current instanceof HTMLButtonElement&&!a.current.hasAttribute("type")&&r("button")},[n,a]),n}function oO0(){let t;return{before({doc:a}){var n;let r=a.documentElement,l=(n=a.defaultView)!=null?n:window;t=Math.max(0,l.innerWidth-r.clientWidth)},after({doc:a,d:n}){let r=a.documentElement,l=Math.max(0,r.clientWidth-r.offsetWidth),o=Math.max(0,t-l);n.style(r,"paddingRight",`${o}px`)}}}function iO0(){return M70()?{before({doc:t,d:a,meta:n}){function r(l){return n.containers.flatMap(o=>o()).some(o=>o.contains(l))}a.microTask(()=>{var l;if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let c=cl();c.style(t.documentElement,"scrollBehavior","auto"),a.add(()=>a.microTask(()=>c.dispose()))}let o=(l=window.scrollY)!=null?l:window.pageYOffset,i=null;a.addEventListener(t,"click",c=>{if(c.target instanceof HTMLElement)try{let u=c.target.closest("a");if(!u)return;let{hash:d}=new URL(u.href),h=t.querySelector(d);h&&!r(h)&&(i=h)}catch{}},!0),a.addEventListener(t,"touchstart",c=>{if(c.target instanceof HTMLElement)if(r(c.target)){let u=c.target;for(;u.parentElement&&r(u.parentElement);)u=u.parentElement;a.style(u,"overscrollBehavior","contain")}else a.style(c.target,"touchAction","none")}),a.addEventListener(t,"touchmove",c=>{if(c.target instanceof HTMLElement){if(c.target.tagName==="INPUT")return;if(r(c.target)){let u=c.target;for(;u.parentElement&&u.dataset.headlessuiPortal!==""&&!(u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth);)u=u.parentElement;u.dataset.headlessuiPortal===""&&c.preventDefault()}else c.preventDefault()}},{passive:!1}),a.add(()=>{var c;let u=(c=window.scrollY)!=null?c:window.pageYOffset;o!==u&&window.scrollTo(0,o),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{}}function cO0(){return{before({doc:t,d:a}){a.style(t.documentElement,"overflow","hidden")}}}function sO0(t){let a={};for(let n of t)Object.assign(a,n(a));return a}let Q5=h70(()=>new Map,{PUSH(t,a){var n;let r=(n=this.get(t))!=null?n:{doc:t,count:0,d:cl(),meta:new Set};return r.count++,r.meta.add(a),this.set(t,r),this},POP(t,a){let n=this.get(t);return n&&(n.count--,n.meta.delete(a)),this},SCROLL_PREVENT({doc:t,d:a,meta:n}){let r={doc:t,d:a,meta:sO0(n)},l=[iO0(),oO0(),cO0()];l.forEach(({before:o})=>o==null?void 0:o(r)),l.forEach(({after:o})=>o==null?void 0:o(r))},SCROLL_ALLOW({d:t}){t.dispose()},TEARDOWN({doc:t}){this.delete(t)}});Q5.subscribe(()=>{let t=Q5.getSnapshot(),a=new Map;for(let[n]of t)a.set(n,n.documentElement.style.overflow);for(let n of t.values()){let r=a.get(n.doc)==="hidden",l=n.count!==0;(l&&!r||!l&&r)&&Q5.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Q5.dispatch("TEARDOWN",n)}});function uO0(t,a,n=()=>({containers:[]})){let r=p70(Q5),l=a?r.get(a):void 0,o=l?l.count>0:!1;return l8(()=>{if(!(!a||!t))return Q5.dispatch("PUSH",a,n),()=>Q5.dispatch("POP",a,n)},[t,a]),o}function S70(t,a,n=()=>[document.body]){let r=Fs(t,"scroll-lock");uO0(r,a,l=>{var o;return{containers:[...(o=l.containers)!=null?o:[],n]}})}function F70(t){return[t.screenX,t.screenY]}function mO0(){let t=e.useRef([-1,-1]);return{wasMoved(a){let n=F70(a);return t.current[0]===n[0]&&t.current[1]===n[1]?!1:(t.current=n,!0)},update(a){t.current=F70(a)}}}function dO0(t){let a={called:!1};return(...n)=>{if(!a.called)return a.called=!0,t(...n)}}function hO0(t=0){let[a,n]=e.useState(t),r=e.useCallback(u=>n(u),[a]),l=e.useCallback(u=>n(d=>d|u),[a]),o=e.useCallback(u=>(a&u)===u,[a]),i=e.useCallback(u=>n(d=>d&~u),[n]),c=e.useCallback(u=>n(d=>d^u),[n]);return{flags:a,setFlag:r,addFlag:l,hasFlag:o,removeFlag:i,toggleFlag:c}}var pO0=(t=>(t[t.None=0]="None",t[t.Closed=1]="Closed",t[t.Enter=2]="Enter",t[t.Leave=4]="Leave",t))(pO0||{});function _70(t){let a={};for(let n in t)t[n]===!0&&(a[`data-${n}`]="");return a}function k70(t,a,n,r){let[l,o]=e.useState(n),{hasFlag:i,addFlag:c,removeFlag:u}=hO0(t&&l?3:0),d=e.useRef(!1),h=e.useRef(!1),f=bs();return l8(function v(){var Z;if(!t)return;n&&o(!0);let H=a.current;return H?((Z=r==null?void 0:r.start)==null||Z.call(r,n),fO0(H,{inFlight:d,prepare(){h.current?h.current=!1:h.current=d.current,d.current=!0,!h.current&&(n?(c(3),u(4)):(c(4),u(2)))},run(){h.current?n?(u(3),c(4)):(u(4),c(3)):n?u(1):c(1)},done(){var V;h.current&&typeof H.getAnimations=="function"&&H.getAnimations().length>0||(d.current=!1,u(7),n||o(!1),(V=r==null?void 0:r.end)==null||V.call(r,n))}})):n?(c(3),f.nextFrame(()=>v())):void 0},[t,n,a,f]),t?[l,{closed:i(1),enter:i(2),leave:i(4),transition:i(2)||i(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function fO0(t,{prepare:a,run:n,done:r,inFlight:l}){let o=cl();return gO0(t,{prepare:a,inFlight:l}),o.nextFrame(()=>{o.add(vO0(t,r)),n()}),o.dispose}function vO0(t,a){let n=dO0(a),r=cl();if(!t)return r.dispose;let{transitionDuration:l,transitionDelay:o}=getComputedStyle(t),[i,c]=[l,o].map(d=>{let[h=0]=d.split(",").filter(Boolean).map(f=>f.includes("ms")?parseFloat(f):parseFloat(f)*1e3).sort((f,v)=>v-f);return h}),u=i+c;if(u!==0){let d=r.group(h=>{let f=h.setTimeout(()=>{n(),h.dispose()},u);h.addEventListener(t,"transitionrun",v=>{v.target===v.currentTarget&&(f(),h.addEventListener(t,"transitioncancel",Z=>{Z.target===Z.currentTarget&&(n(),d())}))})});r.addEventListener(t,"transitionend",h=>{h.target===h.currentTarget&&(n(),r.dispose())})}else n();return r.dispose}function gO0(t,{inFlight:a,prepare:n}){if(a!=null&&a.current){n();return}let r=t.style.transition;t.style.transition="none",n(),t.offsetHeight,t.style.transition=r}function AO0(t,{container:a,accept:n,walk:r}){let l=e.useRef(n),o=e.useRef(r);e.useEffect(()=>{l.current=n,o.current=r},[n,r]),l8(()=>{if(!a||!t)return;let i=q5(a);if(!i)return;let c=l.current,u=o.current,d=Object.assign(f=>c(f),{acceptNode:c}),h=i.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,d,!1);for(;h.nextNode();)u(h.currentNode)},[a,t,l,o])}function pS(t,a){let n=e.useRef([]),r=Xe(t);e.useEffect(()=>{let l=[...n.current];for(let[o,i]of a.entries())if(n.current[o]!==i){let c=r(a,l);return n.current=a,c}},[r,...a])}function ws(t){return w70(t)?(t.nodeName||"").toLowerCase():"#document"}function W4(t){var a;return(t==null||(a=t.ownerDocument)==null?void 0:a.defaultView)||window}function y3(t){var a;return(a=(w70(t)?t.ownerDocument:t.document)||window.document)==null?void 0:a.documentElement}function w70(t){return t instanceof Node||t instanceof W4(t).Node}function i6(t){return t instanceof Element||t instanceof W4(t).Element}function ml(t){return t instanceof HTMLElement||t instanceof W4(t).HTMLElement}function C70(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof W4(t).ShadowRoot}function Fd(t){const{overflow:a,overflowX:n,overflowY:r,display:l}=ir(t);return/auto|scroll|overlay|hidden|clip/.test(a+r+n)&&!["inline","contents"].includes(l)}function ZO0(t){return["table","td","th"].includes(ws(t))}function lA(t){return[":popover-open",":modal"].some(a=>{try{return t.matches(a)}catch{return!1}})}function fS(t){const a=vS(),n=i6(t)?ir(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!a&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!a&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function HO0(t){let a=qo(t);for(;ml(a)&&!Cs(a);){if(fS(a))return a;if(lA(a))return null;a=qo(a)}return null}function vS(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Cs(t){return["html","body","#document"].includes(ws(t))}function ir(t){return W4(t).getComputedStyle(t)}function oA(t){return i6(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function qo(t){if(ws(t)==="html")return t;const a=t.assignedSlot||t.parentNode||C70(t)&&t.host||y3(t);return C70(a)?a.host:a}function N70(t){const a=qo(t);return Cs(a)?t.ownerDocument?t.ownerDocument.body:t.body:ml(a)&&Fd(a)?a:N70(a)}function _d(t,a,n){var r;a===void 0&&(a=[]),n===void 0&&(n=!0);const l=N70(t),o=l===((r=t.ownerDocument)==null?void 0:r.body),i=W4(l);return o?a.concat(i,i.visualViewport||[],Fd(l)?l:[],i.frameElement&&n?_d(i.frameElement):[]):a.concat(l,_d(l,[],n))}function MO0(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(a=>{let{brand:n,version:r}=a;return n+"/"+r}).join(" "):navigator.userAgent}const Wo=Math.min,G4=Math.max,iA=Math.round,cA=Math.floor,Go=t=>({x:t,y:t}),EO0={left:"right",right:"left",bottom:"top",top:"bottom"},VO0={start:"end",end:"start"};function P70(t,a,n){return G4(t,Wo(a,n))}function Ns(t,a){return typeof t=="function"?t(a):t}function Yo(t){return t.split("-")[0]}function kd(t){return t.split("-")[1]}function $70(t){return t==="x"?"y":"x"}function T70(t){return t==="y"?"height":"width"}function K5(t){return["top","bottom"].includes(Yo(t))?"y":"x"}function I70(t){return $70(K5(t))}function yO0(t,a,n){n===void 0&&(n=!1);const r=kd(t),l=I70(t),o=T70(l);let i=l==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return a.reference[o]>a.floating[o]&&(i=sA(i)),[i,sA(i)]}function bO0(t){const a=sA(t);return[gS(t),a,gS(a)]}function gS(t){return t.replace(/start|end/g,a=>VO0[a])}function LO0(t,a,n){const r=["left","right"],l=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(t){case"top":case"bottom":return n?a?l:r:a?r:l;case"left":case"right":return a?o:i;default:return[]}}function SO0(t,a,n,r){const l=kd(t);let o=LO0(Yo(t),n==="start",r);return l&&(o=o.map(i=>i+"-"+l),a&&(o=o.concat(o.map(gS)))),o}function sA(t){return t.replace(/left|right|bottom|top/g,a=>EO0[a])}function FO0(t){return{top:0,right:0,bottom:0,left:0,...t}}function _O0(t){return typeof t!="number"?FO0(t):{top:t,right:t,bottom:t,left:t}}function uA(t){const{x:a,y:n,width:r,height:l}=t;return{width:r,height:l,top:n,left:a,right:a+r,bottom:n+l,x:a,y:n}}function O70(t,a,n){let{reference:r,floating:l}=t;const o=K5(a),i=I70(a),c=T70(i),u=Yo(a),d=o==="y",h=r.x+r.width/2-l.width/2,f=r.y+r.height/2-l.height/2,v=r[c]/2-l[c]/2;let Z;switch(u){case"top":Z={x:h,y:r.y-l.height};break;case"bottom":Z={x:h,y:r.y+r.height};break;case"right":Z={x:r.x+r.width,y:f};break;case"left":Z={x:r.x-l.width,y:f};break;default:Z={x:r.x,y:r.y}}switch(kd(a)){case"start":Z[i]-=v*(n&&d?-1:1);break;case"end":Z[i]+=v*(n&&d?-1:1);break}return Z}const kO0=async(t,a,n)=>{const{placement:r="bottom",strategy:l="absolute",middleware:o=[],platform:i}=n,c=o.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(a));let d=await i.getElementRects({reference:t,floating:a,strategy:l}),{x:h,y:f}=O70(d,r,u),v=r,Z={},H=0;for(let V=0;V<c.length;V++){const{name:b,fn:S}=c[V],{x:F,y:w,data:$,reset:C}=await S({x:h,y:f,initialPlacement:r,placement:v,strategy:l,middlewareData:Z,rects:d,platform:i,elements:{reference:t,floating:a}});h=F??h,f=w??f,Z={...Z,[b]:{...Z[b],...$}},C&&H<=50&&(H++,typeof C=="object"&&(C.placement&&(v=C.placement),C.rects&&(d=C.rects===!0?await i.getElementRects({reference:t,floating:a,strategy:l}):C.rects),{x:h,y:f}=O70(d,v,u)),V=-1)}return{x:h,y:f,placement:v,strategy:l,middlewareData:Z}};async function mA(t,a){var n;a===void 0&&(a={});const{x:r,y:l,platform:o,rects:i,elements:c,strategy:u}=t,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:f="floating",altBoundary:v=!1,padding:Z=0}=Ns(a,t),H=_O0(Z),b=c[v?f==="floating"?"reference":"floating":f],S=uA(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:d,rootBoundary:h,strategy:u})),F=f==="floating"?{x:r,y:l,width:i.floating.width,height:i.floating.height}:i.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),$=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},C=uA(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:F,offsetParent:w,strategy:u}):F);return{top:(S.top-C.top+H.top)/$.y,bottom:(C.bottom-S.bottom+H.bottom)/$.y,left:(S.left-C.left+H.left)/$.x,right:(C.right-S.right+H.right)/$.x}}const wO0=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(a){var n,r;const{placement:l,middlewareData:o,rects:i,initialPlacement:c,platform:u,elements:d}=a,{mainAxis:h=!0,crossAxis:f=!0,fallbackPlacements:v,fallbackStrategy:Z="bestFit",fallbackAxisSideDirection:H="none",flipAlignment:V=!0,...b}=Ns(t,a);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const S=Yo(l),F=K5(c),w=Yo(c)===c,$=await(u.isRTL==null?void 0:u.isRTL(d.floating)),C=v||(w||!V?[sA(c)]:bO0(c)),P=H!=="none";!v&&P&&C.push(...SO0(c,V,H,$));const O=[c,...C],z=await mA(a,b),G=[];let R=((r=o.flip)==null?void 0:r.overflows)||[];if(h&&G.push(z[S]),f){const l0=yO0(l,i,$);G.push(z[l0[0]],z[l0[1]])}if(R=[...R,{placement:l,overflows:G}],!G.every(l0=>l0<=0)){var J,Y;const l0=(((J=o.flip)==null?void 0:J.index)||0)+1,X=O[l0];if(X)return{data:{index:l0,overflows:R},reset:{placement:X}};let P0=(Y=R.filter(A0=>A0.overflows[0]<=0).sort((A0,d0)=>A0.overflows[1]-d0.overflows[1])[0])==null?void 0:Y.placement;if(!P0)switch(Z){case"bestFit":{var n0;const A0=(n0=R.filter(d0=>{if(P){const L0=K5(d0.placement);return L0===F||L0==="y"}return!0}).map(d0=>[d0.placement,d0.overflows.filter(L0=>L0>0).reduce((L0,j)=>L0+j,0)]).sort((d0,L0)=>d0[1]-L0[1])[0])==null?void 0:n0[0];A0&&(P0=A0);break}case"initialPlacement":P0=c;break}if(l!==P0)return{reset:{placement:P0}}}return{}}}};async function CO0(t,a){const{placement:n,platform:r,elements:l}=t,o=await(r.isRTL==null?void 0:r.isRTL(l.floating)),i=Yo(n),c=kd(n),u=K5(n)==="y",d=["left","top"].includes(i)?-1:1,h=o&&u?-1:1,f=Ns(a,t);let{mainAxis:v,crossAxis:Z,alignmentAxis:H}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return c&&typeof H=="number"&&(Z=c==="end"?H*-1:H),u?{x:Z*h,y:v*d}:{x:v*d,y:Z*h}}const NO0=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(a){var n,r;const{x:l,y:o,placement:i,middlewareData:c}=a,u=await CO0(a,t);return i===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:l+u.x,y:o+u.y,data:{...u,placement:i}}}}},PO0=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(a){const{x:n,y:r,placement:l}=a,{mainAxis:o=!0,crossAxis:i=!1,limiter:c={fn:b=>{let{x:S,y:F}=b;return{x:S,y:F}}},...u}=Ns(t,a),d={x:n,y:r},h=await mA(a,u),f=K5(Yo(l)),v=$70(f);let Z=d[v],H=d[f];if(o){const b=v==="y"?"top":"left",S=v==="y"?"bottom":"right",F=Z+h[b],w=Z-h[S];Z=P70(F,Z,w)}if(i){const b=f==="y"?"top":"left",S=f==="y"?"bottom":"right",F=H+h[b],w=H-h[S];H=P70(F,H,w)}const V=c.fn({...a,[v]:Z,[f]:H});return{...V,data:{x:V.x-n,y:V.y-r}}}}},$O0=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(a){const{placement:n,rects:r,platform:l,elements:o}=a,{apply:i=()=>{},...c}=Ns(t,a),u=await mA(a,c),d=Yo(n),h=kd(n),f=K5(n)==="y",{width:v,height:Z}=r.floating;let H,V;d==="top"||d==="bottom"?(H=d,V=h===(await(l.isRTL==null?void 0:l.isRTL(o.floating))?"start":"end")?"left":"right"):(V=d,H=h==="end"?"top":"bottom");const b=Z-u.top-u.bottom,S=v-u.left-u.right,F=Wo(Z-u[H],b),w=Wo(v-u[V],S),$=!a.middlewareData.shift;let C=F,P=w;if(f?P=h||$?Wo(w,S):S:C=h||$?Wo(F,b):b,$&&!h){const z=G4(u.left,0),G=G4(u.right,0),R=G4(u.top,0),J=G4(u.bottom,0);f?P=v-2*(z!==0||G!==0?z+G:G4(u.left,u.right)):C=Z-2*(R!==0||J!==0?R+J:G4(u.top,u.bottom))}await i({...a,availableWidth:P,availableHeight:C});const O=await l.getDimensions(o.floating);return v!==O.width||Z!==O.height?{reset:{rects:!0}}:{}}}};function x70(t){const a=ir(t);let n=parseFloat(a.width)||0,r=parseFloat(a.height)||0;const l=ml(t),o=l?t.offsetWidth:n,i=l?t.offsetHeight:r,c=iA(n)!==o||iA(r)!==i;return c&&(n=o,r=i),{width:n,height:r,$:c}}function AS(t){return i6(t)?t:t.contextElement}function Ps(t){const a=AS(t);if(!ml(a))return Go(1);const n=a.getBoundingClientRect(),{width:r,height:l,$:o}=x70(a);let i=(o?iA(n.width):n.width)/r,c=(o?iA(n.height):n.height)/l;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const TO0=Go(0);function j70(t){const a=W4(t);return!vS()||!a.visualViewport?TO0:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function IO0(t,a,n){return a===void 0&&(a=!1),!n||a&&n!==W4(t)?!1:a}function X5(t,a,n,r){a===void 0&&(a=!1),n===void 0&&(n=!1);const l=t.getBoundingClientRect(),o=AS(t);let i=Go(1);a&&(r?i6(r)&&(i=Ps(r)):i=Ps(t));const c=IO0(o,n,r)?j70(o):Go(0);let u=(l.left+c.x)/i.x,d=(l.top+c.y)/i.y,h=l.width/i.x,f=l.height/i.y;if(o){const v=W4(o),Z=r&&i6(r)?W4(r):r;let H=v,V=H.frameElement;for(;V&&r&&Z!==H;){const b=Ps(V),S=V.getBoundingClientRect(),F=ir(V),w=S.left+(V.clientLeft+parseFloat(F.paddingLeft))*b.x,$=S.top+(V.clientTop+parseFloat(F.paddingTop))*b.y;u*=b.x,d*=b.y,h*=b.x,f*=b.y,u+=w,d+=$,H=W4(V),V=H.frameElement}}return uA({width:h,height:f,x:u,y:d})}function OO0(t){let{elements:a,rect:n,offsetParent:r,strategy:l}=t;const o=l==="fixed",i=y3(r),c=a?lA(a.floating):!1;if(r===i||c&&o)return n;let u={scrollLeft:0,scrollTop:0},d=Go(1);const h=Go(0),f=ml(r);if((f||!f&&!o)&&((ws(r)!=="body"||Fd(i))&&(u=oA(r)),ml(r))){const v=X5(r);d=Ps(r),h.x=v.x+r.clientLeft,h.y=v.y+r.clientTop}return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+h.x,y:n.y*d.y-u.scrollTop*d.y+h.y}}function xO0(t){return Array.from(t.getClientRects())}function R70(t){return X5(y3(t)).left+oA(t).scrollLeft}function jO0(t){const a=y3(t),n=oA(t),r=t.ownerDocument.body,l=G4(a.scrollWidth,a.clientWidth,r.scrollWidth,r.clientWidth),o=G4(a.scrollHeight,a.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+R70(t);const c=-n.scrollTop;return ir(r).direction==="rtl"&&(i+=G4(a.clientWidth,r.clientWidth)-l),{width:l,height:o,x:i,y:c}}function RO0(t,a){const n=W4(t),r=y3(t),l=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,c=0,u=0;if(l){o=l.width,i=l.height;const d=vS();(!d||d&&a==="fixed")&&(c=l.offsetLeft,u=l.offsetTop)}return{width:o,height:i,x:c,y:u}}function DO0(t,a){const n=X5(t,!0,a==="fixed"),r=n.top+t.clientTop,l=n.left+t.clientLeft,o=ml(t)?Ps(t):Go(1),i=t.clientWidth*o.x,c=t.clientHeight*o.y,u=l*o.x,d=r*o.y;return{width:i,height:c,x:u,y:d}}function D70(t,a,n){let r;if(a==="viewport")r=RO0(t,n);else if(a==="document")r=jO0(y3(t));else if(i6(a))r=DO0(a,n);else{const l=j70(t);r={...a,x:a.x-l.x,y:a.y-l.y}}return uA(r)}function z70(t,a){const n=qo(t);return n===a||!i6(n)||Cs(n)?!1:ir(n).position==="fixed"||z70(n,a)}function zO0(t,a){const n=a.get(t);if(n)return n;let r=_d(t,[],!1).filter(c=>i6(c)&&ws(c)!=="body"),l=null;const o=ir(t).position==="fixed";let i=o?qo(t):t;for(;i6(i)&&!Cs(i);){const c=ir(i),u=fS(i);!u&&c.position==="fixed"&&(l=null),(o?!u&&!l:!u&&c.position==="static"&&!!l&&["absolute","fixed"].includes(l.position)||Fd(i)&&!u&&z70(t,i))?r=r.filter(h=>h!==i):l=c,i=qo(i)}return a.set(t,r),r}function UO0(t){let{element:a,boundary:n,rootBoundary:r,strategy:l}=t;const i=[...n==="clippingAncestors"?lA(a)?[]:zO0(a,this._c):[].concat(n),r],c=i[0],u=i.reduce((d,h)=>{const f=D70(a,h,l);return d.top=G4(f.top,d.top),d.right=Wo(f.right,d.right),d.bottom=Wo(f.bottom,d.bottom),d.left=G4(f.left,d.left),d},D70(a,c,l));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function BO0(t){const{width:a,height:n}=x70(t);return{width:a,height:n}}function qO0(t,a,n){const r=ml(a),l=y3(a),o=n==="fixed",i=X5(t,!0,o,a);let c={scrollLeft:0,scrollTop:0};const u=Go(0);if(r||!r&&!o)if((ws(a)!=="body"||Fd(l))&&(c=oA(a)),r){const f=X5(a,!0,o,a);u.x=f.x+a.clientLeft,u.y=f.y+a.clientTop}else l&&(u.x=R70(l));const d=i.left+c.scrollLeft-u.x,h=i.top+c.scrollTop-u.y;return{x:d,y:h,width:i.width,height:i.height}}function ZS(t){return ir(t).position==="static"}function U70(t,a){return!ml(t)||ir(t).position==="fixed"?null:a?a(t):t.offsetParent}function B70(t,a){const n=W4(t);if(lA(t))return n;if(!ml(t)){let l=qo(t);for(;l&&!Cs(l);){if(i6(l)&&!ZS(l))return l;l=qo(l)}return n}let r=U70(t,a);for(;r&&ZO0(r)&&ZS(r);)r=U70(r,a);return r&&Cs(r)&&ZS(r)&&!fS(r)?n:r||HO0(t)||n}const WO0=async function(t){const a=this.getOffsetParent||B70,n=this.getDimensions,r=await n(t.floating);return{reference:qO0(t.reference,await a(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function GO0(t){return ir(t).direction==="rtl"}const YO0={convertOffsetParentRelativeRectToViewportRelativeRect:OO0,getDocumentElement:y3,getClippingRect:UO0,getOffsetParent:B70,getElementRects:WO0,getClientRects:xO0,getDimensions:BO0,getScale:Ps,isElement:i6,isRTL:GO0};function QO0(t,a){let n=null,r;const l=y3(t);function o(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),o();const{left:d,top:h,width:f,height:v}=t.getBoundingClientRect();if(c||a(),!f||!v)return;const Z=cA(h),H=cA(l.clientWidth-(d+f)),V=cA(l.clientHeight-(h+v)),b=cA(d),F={rootMargin:-Z+"px "+-H+"px "+-V+"px "+-b+"px",threshold:G4(0,Wo(1,u))||1};let w=!0;function $(C){const P=C[0].intersectionRatio;if(P!==u){if(!w)return i();P?i(!1,P):r=setTimeout(()=>{i(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver($,{...F,root:l.ownerDocument})}catch{n=new IntersectionObserver($,F)}n.observe(t)}return i(!0),o}function KO0(t,a,n,r){r===void 0&&(r={});const{ancestorScroll:l=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,d=AS(t),h=l||o?[...d?_d(d):[],..._d(a)]:[];h.forEach(S=>{l&&S.addEventListener("scroll",n,{passive:!0}),o&&S.addEventListener("resize",n)});const f=d&&c?QO0(d,n):null;let v=-1,Z=null;i&&(Z=new ResizeObserver(S=>{let[F]=S;F&&F.target===d&&Z&&(Z.unobserve(a),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var w;(w=Z)==null||w.observe(a)})),n()}),d&&!u&&Z.observe(d),Z.observe(a));let H,V=u?X5(t):null;u&&b();function b(){const S=X5(t);V&&(S.x!==V.x||S.y!==V.y||S.width!==V.width||S.height!==V.height)&&n(),V=S,H=requestAnimationFrame(b)}return n(),()=>{var S;h.forEach(F=>{l&&F.removeEventListener("scroll",n),o&&F.removeEventListener("resize",n)}),f==null||f(),(S=Z)==null||S.disconnect(),Z=null,u&&cancelAnimationFrame(H)}}const HS=mA,XO0=NO0,JO0=PO0,ex0=wO0,tx0=$O0,ax0=(t,a,n)=>{const r=new Map,l={platform:YO0,...n},o={...l.platform,_c:r};return kO0(t,a,{...l,platform:o})};var dA=typeof document<"u"?e.useLayoutEffect:e.useEffect;function hA(t,a){if(t===a)return!0;if(typeof t!=typeof a)return!1;if(typeof t=="function"&&t.toString()===a.toString())return!0;let n,r,l;if(t&&a&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==a.length)return!1;for(r=n;r--!==0;)if(!hA(t[r],a[r]))return!1;return!0}if(l=Object.keys(t),n=l.length,n!==Object.keys(a).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(a,l[r]))return!1;for(r=n;r--!==0;){const o=l[r];if(!(o==="_owner"&&t.$$typeof)&&!hA(t[o],a[o]))return!1}return!0}return t!==t&&a!==a}function q70(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function W70(t,a){const n=q70(t);return Math.round(a*n)/n}function G70(t){const a=e.useRef(t);return dA(()=>{a.current=t}),a}function nx0(t){t===void 0&&(t={});const{placement:a="bottom",strategy:n="absolute",middleware:r=[],platform:l,elements:{reference:o,floating:i}={},transform:c=!0,whileElementsMounted:u,open:d}=t,[h,f]=e.useState({x:0,y:0,strategy:n,placement:a,middlewareData:{},isPositioned:!1}),[v,Z]=e.useState(r);hA(v,r)||Z(r);const[H,V]=e.useState(null),[b,S]=e.useState(null),F=e.useCallback(A0=>{A0!==P.current&&(P.current=A0,V(A0))},[]),w=e.useCallback(A0=>{A0!==O.current&&(O.current=A0,S(A0))},[]),$=o||H,C=i||b,P=e.useRef(null),O=e.useRef(null),z=e.useRef(h),G=u!=null,R=G70(u),J=G70(l),Y=e.useCallback(()=>{if(!P.current||!O.current)return;const A0={placement:a,strategy:n,middleware:v};J.current&&(A0.platform=J.current),ax0(P.current,O.current,A0).then(d0=>{const L0={...d0,isPositioned:!0};n0.current&&!hA(z.current,L0)&&(z.current=L0,l6.flushSync(()=>{f(L0)}))})},[v,a,n,J]);dA(()=>{d===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,f(A0=>({...A0,isPositioned:!1})))},[d]);const n0=e.useRef(!1);dA(()=>(n0.current=!0,()=>{n0.current=!1}),[]),dA(()=>{if($&&(P.current=$),C&&(O.current=C),$&&C){if(R.current)return R.current($,C,Y);Y()}},[$,C,Y,R,G]);const l0=e.useMemo(()=>({reference:P,floating:O,setReference:F,setFloating:w}),[F,w]),X=e.useMemo(()=>({reference:$,floating:C}),[$,C]),P0=e.useMemo(()=>{const A0={position:n,left:0,top:0};if(!X.floating)return A0;const d0=W70(X.floating,h.x),L0=W70(X.floating,h.y);return c?{...A0,transform:"translate("+d0+"px, "+L0+"px)",...q70(X.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:d0,top:L0}},[n,c,X.floating,h.x,h.y]);return e.useMemo(()=>({...h,update:Y,refs:l0,elements:X,floatingStyles:P0}),[h,Y,l0,X,P0])}const Y70=(t,a)=>({...XO0(t),options:[t,a]}),rx0=(t,a)=>({...JO0(t),options:[t,a]}),lx0=(t,a)=>({...ex0(t),options:[t,a]}),ox0=(t,a)=>({...tx0(t),options:[t,a]});var pA={};const Q70={...Wm},ix0=Q70.useInsertionEffect||(t=>t());function K70(t){const a=e.useRef(()=>{if(pA.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return ix0(()=>{a.current=t}),e.useCallback(function(){for(var n=arguments.length,r=new Array(n),l=0;l<n;l++)r[l]=arguments[l];return a.current==null?void 0:a.current(...r)},[])}var MS=typeof document<"u"?e.useLayoutEffect:e.useEffect;let X70=!1,cx0=0;const J70=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+cx0++;function sx0(){const[t,a]=e.useState(()=>X70?J70():void 0);return MS(()=>{t==null&&a(J70())},[]),e.useEffect(()=>{X70=!0},[]),t}const ux0=Q70.useId||sx0;let wd;pA.NODE_ENV!=="production"&&(wd=new Set);function mx0(){for(var t,a=arguments.length,n=new Array(a),r=0;r<a;r++)n[r]=arguments[r];const l="Floating UI: "+n.join(" ");if(!((t=wd)!=null&&t.has(l))){var o;(o=wd)==null||o.add(l),console.warn(l)}}function dx0(){for(var t,a=arguments.length,n=new Array(a),r=0;r<a;r++)n[r]=arguments[r];const l="Floating UI: "+n.join(" ");if(!((t=wd)!=null&&t.has(l))){var o;(o=wd)==null||o.add(l),console.error(l)}}function hx0(){const t=new Map;return{emit(a,n){var r;(r=t.get(a))==null||r.forEach(l=>l(n))},on(a,n){t.set(a,[...t.get(a)||[],n])},off(a,n){var r;t.set(a,((r=t.get(a))==null?void 0:r.filter(l=>l!==n))||[])}}}const px0=e.createContext(null),fx0=e.createContext(null),vx0=()=>{var t;return((t=e.useContext(px0))==null?void 0:t.id)||null},gx0=()=>e.useContext(fx0);function Ax0(t){const{open:a=!1,onOpenChange:n,elements:r}=t,l=ux0(),o=e.useRef({}),[i]=e.useState(()=>hx0()),c=vx0()!=null;if(pA.NODE_ENV!=="production"){const Z=r.reference;Z&&!i6(Z)&&dx0("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[u,d]=e.useState(r.reference),h=K70((Z,H,V)=>{o.current.openEvent=Z?H:void 0,i.emit("openchange",{open:Z,event:H,reason:V,nested:c}),n==null||n(Z,H,V)}),f=e.useMemo(()=>({setPositionReference:d}),[]),v=e.useMemo(()=>({reference:u||r.reference||null,floating:r.floating||null,domReference:r.reference}),[u,r.reference,r.floating]);return e.useMemo(()=>({dataRef:o,open:a,onOpenChange:h,elements:v,events:i,floatingId:l,refs:f}),[a,h,v,i,l,f])}function Zx0(t){t===void 0&&(t={});const{nodeId:a}=t,n=Ax0({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,l=r.elements,[o,i]=e.useState(null),[c,u]=e.useState(null),h=(l==null?void 0:l.reference)||o,f=e.useRef(null),v=gx0();MS(()=>{h&&(f.current=h)},[h]);const Z=nx0({...t,elements:{...l,...c&&{reference:c}}}),H=e.useCallback(w=>{const $=i6(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;u($),Z.refs.setReference($)},[Z.refs]),V=e.useCallback(w=>{(i6(w)||w===null)&&(f.current=w,i(w)),(i6(Z.refs.reference.current)||Z.refs.reference.current===null||w!==null&&!i6(w))&&Z.refs.setReference(w)},[Z.refs]),b=e.useMemo(()=>({...Z.refs,setReference:V,setPositionReference:H,domReference:f}),[Z.refs,V,H]),S=e.useMemo(()=>({...Z.elements,domReference:h}),[Z.elements,h]),F=e.useMemo(()=>({...Z,...r,refs:b,elements:S,nodeId:a}),[Z,b,S,a,r]);return MS(()=>{r.dataRef.current.floatingContext=F;const w=v==null?void 0:v.nodesRef.current.find($=>$.id===a);w&&(w.context=F)}),e.useMemo(()=>({...Z,context:F,refs:b,elements:S}),[Z,b,S,F])}const ec0="active",tc0="selected";function ES(t,a,n){const r=new Map,l=n==="item";let o=t;if(l&&t){const{[ec0]:i,[tc0]:c,...u}=t;o=u}return{...n==="floating"&&{tabIndex:-1},...o,...a.map(i=>{const c=i?i[n]:null;return typeof c=="function"?t?c(t):null:c}).concat(t).reduce((i,c)=>(c&&Object.entries(c).forEach(u=>{let[d,h]=u;if(!(l&&[ec0,tc0].includes(d)))if(d.indexOf("on")===0){if(r.has(d)||r.set(d,[]),typeof h=="function"){var f;(f=r.get(d))==null||f.push(h),i[d]=function(){for(var v,Z=arguments.length,H=new Array(Z),V=0;V<Z;V++)H[V]=arguments[V];return(v=r.get(d))==null?void 0:v.map(b=>b(...H)).find(b=>b!==void 0)}}}else i[d]=h}),i),{})}}function Hx0(t){t===void 0&&(t=[]);const a=t.map(c=>c==null?void 0:c.reference),n=t.map(c=>c==null?void 0:c.floating),r=t.map(c=>c==null?void 0:c.item),l=e.useCallback(c=>ES(c,t,"reference"),a),o=e.useCallback(c=>ES(c,t,"floating"),n),i=e.useCallback(c=>ES(c,t,"item"),r);return e.useMemo(()=>({getReferenceProps:l,getFloatingProps:o,getItemProps:i}),[l,o,i])}function ac0(t,a){return{...t,rects:{...t.rects,floating:{...t.rects.floating,height:a}}}}const Mx0=t=>({name:"inner",options:t,async fn(a){const{listRef:n,overflowRef:r,onFallbackChange:l,offset:o=0,index:i=0,minItemsVisible:c=4,referenceOverflowThreshold:u=0,scrollRef:d,...h}=Ns(t,a),{rects:f,elements:{floating:v}}=a,Z=n.current[i];if(pA.NODE_ENV!=="production"&&(a.placement.startsWith("bottom")||mx0('`placement` side must be "bottom" when using the `inner`',"middleware.")),!Z)return{};const H={...a,...await Y70(-Z.offsetTop-v.clientTop-f.reference.height/2-Z.offsetHeight/2-o).fn(a)},V=(d==null?void 0:d.current)||v,b=await HS(ac0(H,V.scrollHeight),h),S=await HS(H,{...h,elementContext:"reference"}),F=Math.max(0,b.top),w=H.y+F,$=Math.max(0,V.scrollHeight-F-Math.max(0,b.bottom));return V.style.maxHeight=$+"px",V.scrollTop=F,l&&(V.offsetHeight<Z.offsetHeight*Math.min(c,n.current.length-1)-1||S.top>=-u||S.bottom>=-u?l6.flushSync(()=>l(!0)):l6.flushSync(()=>l(!1))),r&&(r.current=await HS(ac0({...H,y:w},V.offsetHeight),h)),{y:w}}});function Ex0(t,a){const{open:n,elements:r}=t,{enabled:l=!0,overflowRef:o,scrollRef:i,onChange:c}=a,u=K70(c),d=e.useRef(!1),h=e.useRef(null),f=e.useRef(null);e.useEffect(()=>{if(!l)return;function Z(V){if(V.ctrlKey||!H||o.current==null)return;const b=V.deltaY,S=o.current.top>=-.5,F=o.current.bottom>=-.5,w=H.scrollHeight-H.clientHeight,$=b<0?-1:1,C=b<0?"max":"min";H.scrollHeight<=H.clientHeight||(!S&&b>0||!F&&b<0?(V.preventDefault(),l6.flushSync(()=>{u(P=>P+Math[C](b,w*$))})):/firefox/i.test(MO0())&&(H.scrollTop+=b))}const H=(i==null?void 0:i.current)||r.floating;if(n&&H)return H.addEventListener("wheel",Z),requestAnimationFrame(()=>{h.current=H.scrollTop,o.current!=null&&(f.current={...o.current})}),()=>{h.current=null,f.current=null,H.removeEventListener("wheel",Z)}},[l,n,r.floating,o,i,u]);const v=e.useMemo(()=>({onKeyDown(){d.current=!0},onWheel(){d.current=!1},onPointerMove(){d.current=!1},onScroll(){const Z=(i==null?void 0:i.current)||r.floating;if(!(!o.current||!Z||!d.current)){if(h.current!==null){const H=Z.scrollTop-h.current;(o.current.bottom<-.5&&H<-1||o.current.top<-.5&&H>1)&&l6.flushSync(()=>u(V=>V+H))}requestAnimationFrame(()=>{h.current=Z.scrollTop})}}}),[r.floating,u,o,i]);return e.useMemo(()=>l?{floating:v}:{},[l,v])}let $s=e.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});$s.displayName="FloatingContext";let VS=e.createContext(null);VS.displayName="PlacementContext";function Vx0(t){return e.useMemo(()=>t?typeof t=="string"?{to:t}:t:null,[t])}function yx0(){return e.useContext($s).setReference}function bx0(){return e.useContext($s).getReferenceProps}function Lx0(){let{getFloatingProps:t,slot:a}=e.useContext($s);return e.useCallback((...n)=>Object.assign({},t(...n),{"data-anchor":a.anchor}),[t,a])}function Sx0(t=null){t===!1&&(t=null),typeof t=="string"&&(t={to:t});let a=e.useContext(VS),n=e.useMemo(()=>t,[JSON.stringify(t,typeof HTMLElement<"u"?(l,o)=>o instanceof HTMLElement?o.outerHTML:o:void 0)]);l8(()=>{a==null||a(n??null)},[a,n]);let r=e.useContext($s);return e.useMemo(()=>[r.setFloating,t?r.styles:{}],[r.setFloating,t,r.styles])}let nc0=4;function Fx0({children:t,enabled:a=!0}){let[n,r]=e.useState(null),[l,o]=e.useState(0),i=e.useRef(null),[c,u]=e.useState(null);_x0(c);let d=a&&n!==null&&c!==null,{to:h="bottom",gap:f=0,offset:v=0,padding:Z=0,inner:H}=kx0(n,c),[V,b="center"]=h.split(" ");l8(()=>{d&&o(0)},[d]);let{refs:S,floatingStyles:F,context:w}=Zx0({open:d,placement:V==="selection"?b==="center"?"bottom":`bottom-${b}`:b==="center"?`${V}`:`${V}-${b}`,strategy:"absolute",transform:!1,middleware:[Y70({mainAxis:V==="selection"?0:f,crossAxis:v}),rx0({padding:Z}),V!=="selection"&&lx0({padding:Z}),V==="selection"&&H?Mx0({...H,padding:Z,overflowRef:i,offset:l,minItemsVisible:nc0,referenceOverflowThreshold:Z,onFallbackChange(J){var Y,n0;if(!J)return;let l0=w.elements.floating;if(!l0)return;let X=parseFloat(getComputedStyle(l0).scrollPaddingBottom)||0,P0=Math.min(nc0,l0.childElementCount),A0=0,d0=0;for(let L0 of(n0=(Y=w.elements.floating)==null?void 0:Y.childNodes)!=null?n0:[])if(L0 instanceof HTMLElement){let j=L0.offsetTop,a0=j+L0.clientHeight+X,i0=l0.scrollTop,q=i0+l0.clientHeight;if(j>=i0&&a0<=q)P0--;else{d0=Math.max(0,Math.min(a0,q)-Math.max(j,i0)),A0=L0.clientHeight;break}}P0>=1&&o(L0=>{let j=A0*P0-d0+X;return L0>=j?L0:j})}}):null,ox0({padding:Z,apply({availableWidth:J,availableHeight:Y,elements:n0}){Object.assign(n0.floating.style,{overflow:"auto",maxWidth:`${J}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${Y}px)`})}})].filter(Boolean),whileElementsMounted:KO0}),[$=V,C=b]=w.placement.split("-");V==="selection"&&($="selection");let P=e.useMemo(()=>({anchor:[$,C].filter(Boolean).join(" ")}),[$,C]),O=Ex0(w,{overflowRef:i,onChange:o}),{getReferenceProps:z,getFloatingProps:G}=Hx0([O]),R=Xe(J=>{u(J),S.setFloating(J)});return e.createElement(VS.Provider,{value:r},e.createElement($s.Provider,{value:{setFloating:R,setReference:S.setReference,styles:F,getReferenceProps:z,getFloatingProps:G,slot:P}},t))}function _x0(t){l8(()=>{if(!t)return;let a=new MutationObserver(()=>{let n=window.getComputedStyle(t).maxHeight,r=parseFloat(n);if(isNaN(r))return;let l=parseInt(n);isNaN(l)||r!==l&&(t.style.maxHeight=`${Math.ceil(r)}px`)});return a.observe(t,{attributes:!0,attributeFilter:["style"]}),()=>{a.disconnect()}},[t])}function kx0(t,a){var n,r,l;let o=yS((n=t==null?void 0:t.gap)!=null?n:"var(--anchor-gap, 0)",a),i=yS((r=t==null?void 0:t.offset)!=null?r:"var(--anchor-offset, 0)",a),c=yS((l=t==null?void 0:t.padding)!=null?l:"var(--anchor-padding, 0)",a);return{...t,gap:o,offset:i,padding:c}}function yS(t,a,n=void 0){let r=bs(),l=Xe((u,d)=>{if(u==null)return[n,null];if(typeof u=="number")return[u,null];if(typeof u=="string"){if(!d)return[n,null];let h=lc0(u,d);return[h,f=>{let v=rc0(u);{let Z=v.map(H=>window.getComputedStyle(d).getPropertyValue(H));r.requestAnimationFrame(function H(){r.nextFrame(H);let V=!1;for(let[S,F]of v.entries()){let w=window.getComputedStyle(d).getPropertyValue(F);if(Z[S]!==w){Z[S]=w,V=!0;break}}if(!V)return;let b=lc0(u,d);h!==b&&(f(b),h=b)})}return r.dispose}]}return[n,null]}),o=e.useMemo(()=>l(t,a)[0],[t,a]),[i=o,c]=e.useState();return l8(()=>{let[u,d]=l(t,a);if(c(u),!!d)return d(c)},[t,a]),i}function rc0(t){let a=/var\((.*)\)/.exec(t);if(a){let n=a[1].indexOf(",");if(n===-1)return[a[1]];let r=a[1].slice(0,n).trim(),l=a[1].slice(n+1).trim();return l?[r,...rc0(l)]:[r]}return[]}function lc0(t,a){let n=document.createElement("div");a.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",t,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return a.removeChild(n),r}let fA=e.createContext(null);fA.displayName="OpenClosedContext";var w6=(t=>(t[t.Open=1]="Open",t[t.Closed=2]="Closed",t[t.Closing=4]="Closing",t[t.Opening=8]="Opening",t))(w6||{});function Cd(){return e.useContext(fA)}function oc0({value:t,children:a}){return G0.createElement(fA.Provider,{value:t},a)}function wx0({children:t}){return G0.createElement(fA.Provider,{value:null},t)}function Cx0(t){function a(){document.readyState!=="loading"&&(t(),document.removeEventListener("DOMContentLoaded",a))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",a),a())}let Qo=[];Cx0(()=>{function t(a){if(!(a.target instanceof HTMLElement)||a.target===document.body||Qo[0]===a.target)return;let n=a.target;n=n.closest(rA),Qo.unshift(n??a.target),Qo=Qo.filter(r=>r!=null&&r.isConnected),Qo.splice(10)}window.addEventListener("click",t,{capture:!0}),window.addEventListener("mousedown",t,{capture:!0}),window.addEventListener("focus",t,{capture:!0}),document.body.addEventListener("click",t,{capture:!0}),document.body.addEventListener("mousedown",t,{capture:!0}),document.body.addEventListener("focus",t,{capture:!0})});function Nx0(t){throw new Error("Unexpected object: "+t)}var c6=(t=>(t[t.First=0]="First",t[t.Previous=1]="Previous",t[t.Next=2]="Next",t[t.Last=3]="Last",t[t.Specific=4]="Specific",t[t.Nothing=5]="Nothing",t))(c6||{});function bS(t,a){let n=a.resolveItems();if(n.length<=0)return null;let r=a.resolveActiveIndex(),l=r??-1;switch(t.focus){case 0:{for(let o=0;o<n.length;++o)if(!a.resolveDisabled(n[o],o,n))return o;return r}case 1:{l===-1&&(l=n.length);for(let o=l-1;o>=0;--o)if(!a.resolveDisabled(n[o],o,n))return o;return r}case 2:{for(let o=l+1;o<n.length;++o)if(!a.resolveDisabled(n[o],o,n))return o;return r}case 3:{for(let o=n.length-1;o>=0;--o)if(!a.resolveDisabled(n[o],o,n))return o;return r}case 4:{for(let o=0;o<n.length;++o)if(a.resolveId(n[o],o,n)===t.id)return o;return r}case 5:return null;default:Nx0(t)}}function ic0(t){let a=Xe(t),n=e.useRef(!1);e.useEffect(()=>(n.current=!1,()=>{n.current=!0,Kg(()=>{n.current&&a()})}),[a])}function Px0(){let t=typeof document>"u";return"useSyncExternalStore"in Wm?(a=>a.useSyncExternalStore)(Wm)(()=>()=>{},()=>!1,()=>!t):!1}function Nd(){let t=Px0(),[a,n]=e.useState(B5.isHandoffComplete);return a&&B5.isHandoffComplete===!1&&n(!1),e.useEffect(()=>{a!==!0&&n(!0)},[a]),e.useEffect(()=>B5.handoff(),[]),t?!1:a}let cc0=e.createContext(!1);function $x0(){return e.useContext(cc0)}function sc0(t){return G0.createElement(cc0.Provider,{value:t.force},t.children)}function Tx0(t){let a=$x0(),n=e.useContext(mc0),r=ks(t),[l,o]=e.useState(()=>{var i;if(!a&&n!==null)return(i=n.current)!=null?i:null;if(B5.isServer)return null;let c=r==null?void 0:r.getElementById("headlessui-portal-root");if(c)return c;if(r===null)return null;let u=r.createElement("div");return u.setAttribute("id","headlessui-portal-root"),r.body.appendChild(u)});return e.useEffect(()=>{l!==null&&(r!=null&&r.body.contains(l)||r==null||r.body.appendChild(l))},[l,r]),e.useEffect(()=>{a||n!==null&&o(n.current)},[n,o,a]),l}let uc0=e.Fragment,Ix0=f8(function(t,a){let n=t,r=e.useRef(null),l=o6(TI0(h=>{r.current=h}),a),o=ks(r),i=Tx0(r),[c]=e.useState(()=>{var h;return B5.isServer?null:(h=o==null?void 0:o.createElement("div"))!=null?h:null}),u=e.useContext(LS),d=Nd();return l8(()=>{!i||!c||i.contains(c)||(c.setAttribute("data-headlessui-portal",""),i.appendChild(c))},[i,c]),l8(()=>{if(c&&u)return u.register(c)},[u,c]),ic0(()=>{var h;!i||!c||(c instanceof Node&&i.contains(c)&&i.removeChild(c),i.childNodes.length<=0&&((h=i.parentElement)==null||h.removeChild(i)))}),d?!i||!c?null:l6.createPortal(k8({ourProps:{ref:l},theirProps:n,slot:{},defaultTag:uc0,name:"Portal"}),c):null});function Ox0(t,a){let n=o6(a),{enabled:r=!0,...l}=t;return r?G0.createElement(Ix0,{...l,ref:n}):k8({ourProps:{ref:n},theirProps:l,slot:{},defaultTag:uc0,name:"Portal"})}let xx0=e.Fragment,mc0=e.createContext(null);function jx0(t,a){let{target:n,...r}=t,l={ref:o6(a)};return G0.createElement(mc0.Provider,{value:n},k8({ourProps:l,theirProps:r,defaultTag:xx0,name:"Popover.Group"}))}let LS=e.createContext(null);function Rx0(){let t=e.useContext(LS),a=e.useRef([]),n=Xe(o=>(a.current.push(o),t&&t.register(o),()=>r(o))),r=Xe(o=>{let i=a.current.indexOf(o);i!==-1&&a.current.splice(i,1),t&&t.unregister(o)}),l=e.useMemo(()=>({register:n,unregister:r,portals:a}),[n,r,a]);return[a,e.useMemo(()=>function({children:o}){return G0.createElement(LS.Provider,{value:l},o)},[l])]}let Dx0=f8(Ox0),dc0=f8(jx0),hc0=Object.assign(Dx0,{Group:dc0}),zx0=e.Fragment;function Ux0(t,a){let{...n}=t,r=!1,{isFocusVisible:l,focusProps:o}=yd(),{isHovered:i,hoverProps:c}=Vd({isDisabled:r}),{pressed:u,pressProps:d}=Xg({disabled:r}),h=Ss({ref:a},o,c,d),f=e.useMemo(()=>({hover:i,focus:l,active:u}),[i,l,u]);return k8({ourProps:h,theirProps:n,slot:f,defaultTag:zx0,name:"DataInteractive"})}let Bx0=f8(Ux0);function qx0(t,a=typeof document<"u"?document.defaultView:null,n){let r=Fs(t,"escape");b70(a,"keydown",l=>{r&&(l.defaultPrevented||l.key===ga.Escape&&n(l))})}function Wx0(){var t;let[a]=e.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,r]=e.useState((t=a==null?void 0:a.matches)!=null?t:!1);return l8(()=>{if(!a)return;function l(o){r(o.matches)}return a.addEventListener("change",l),()=>a.removeEventListener("change",l)},[a]),n}function Gx0({defaultContainers:t=[],portals:a,mainTreeNode:n}={}){let r=ks(n),l=Xe(()=>{var o,i;let c=[];for(let u of t)u!==null&&(u instanceof HTMLElement?c.push(u):"current"in u&&u.current instanceof HTMLElement&&c.push(u.current));if(a!=null&&a.current)for(let u of a.current)c.push(u);for(let u of(o=r==null?void 0:r.querySelectorAll("html > *, body > *"))!=null?o:[])u!==document.body&&u!==document.head&&u instanceof HTMLElement&&u.id!=="headlessui-portal-root"&&(n&&(u.contains(n)||u.contains((i=n==null?void 0:n.getRootNode())==null?void 0:i.host))||c.some(d=>u.contains(d))||c.push(u));return c});return{resolveContainers:l,contains:Xe(o=>l().some(i=>i.contains(o)))}}let pc0=e.createContext(null);function fc0({children:t,node:a}){let[n,r]=e.useState(null),l=vc0(a??n);return G0.createElement(pc0.Provider,{value:l},t,l===null&&G0.createElement(eA,{features:bd.Hidden,ref:o=>{var i,c;if(o){for(let u of(c=(i=q5(o))==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?c:[])if(u!==document.body&&u!==document.head&&u instanceof HTMLElement&&u!=null&&u.contains(o)){r(u);break}}}}))}function vc0(t=null){var a;return(a=e.useContext(pc0))!=null?a:t}function SS(){let t=e.useRef(!1);return l8(()=>(t.current=!0,()=>{t.current=!1}),[]),t}var Pd=(t=>(t[t.Forwards=0]="Forwards",t[t.Backwards=1]="Backwards",t))(Pd||{});function Yx0(){let t=e.useRef(0);return E70(!0,"keydown",a=>{a.key==="Tab"&&(t.current=a.shiftKey?1:0)},!0),t}function gc0(t){if(!t)return new Set;if(typeof t=="function")return new Set(t());let a=new Set;for(let n of t.current)n.current instanceof HTMLElement&&a.add(n.current);return a}let Qx0="div";var J5=(t=>(t[t.None=0]="None",t[t.InitialFocus=1]="InitialFocus",t[t.TabLock=2]="TabLock",t[t.FocusLock=4]="FocusLock",t[t.RestoreFocus=8]="RestoreFocus",t[t.AutoFocus=16]="AutoFocus",t))(J5||{});function Kx0(t,a){let n=e.useRef(null),r=o6(n,a),{initialFocus:l,initialFocusFallback:o,containers:i,features:c=15,...u}=t;Nd()||(c=0);let d=ks(n);tj0(c,{ownerDocument:d});let h=aj0(c,{ownerDocument:d,container:n,initialFocus:l,initialFocusFallback:o});nj0(c,{ownerDocument:d,container:n,containers:i,previousActiveElement:h});let f=Yx0(),v=Xe(S=>{let F=n.current;F&&(w=>w())(()=>{sl(f.current,{[Pd.Forwards]:()=>{_s(F,or.First,{skipElements:[S.relatedTarget,o]})},[Pd.Backwards]:()=>{_s(F,or.Last,{skipElements:[S.relatedTarget,o]})}})})}),Z=Fs(!!(c&2),"focus-trap#tab-lock"),H=bs(),V=e.useRef(!1),b={ref:r,onKeyDown(S){S.key=="Tab"&&(V.current=!0,H.requestAnimationFrame(()=>{V.current=!1}))},onBlur(S){if(!(c&4))return;let F=gc0(i);n.current instanceof HTMLElement&&F.add(n.current);let w=S.relatedTarget;w instanceof HTMLElement&&w.dataset.headlessuiFocusGuard!=="true"&&(Ac0(F,w)||(V.current?_s(n.current,sl(f.current,{[Pd.Forwards]:()=>or.Next,[Pd.Backwards]:()=>or.Previous})|or.WrapAround,{relativeTo:S.target}):S.target instanceof HTMLElement&&ul(S.target)))}};return G0.createElement(G0.Fragment,null,Z&&G0.createElement(eA,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:v,features:bd.Focusable}),k8({ourProps:b,theirProps:u,defaultTag:Qx0,name:"FocusTrap"}),Z&&G0.createElement(eA,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:v,features:bd.Focusable}))}let Xx0=f8(Kx0),Jx0=Object.assign(Xx0,{features:J5});function ej0(t=!0){let a=e.useRef(Qo.slice());return pS(([n],[r])=>{r===!0&&n===!1&&Kg(()=>{a.current.splice(0)}),r===!1&&n===!0&&(a.current=Qo.slice())},[t,Qo,a]),Xe(()=>{var n;return(n=a.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function tj0(t,{ownerDocument:a}){let n=!!(t&8),r=ej0(n);pS(()=>{n||(a==null?void 0:a.activeElement)===(a==null?void 0:a.body)&&ul(r())},[n]),ic0(()=>{n&&ul(r())})}function aj0(t,{ownerDocument:a,container:n,initialFocus:r,initialFocusFallback:l}){let o=e.useRef(null),i=Fs(!!(t&1),"focus-trap#initial-focus"),c=SS();return pS(()=>{if(t===0)return;if(!i){l!=null&&l.current&&ul(l.current);return}let u=n.current;u&&Kg(()=>{if(!c.current)return;let d=a==null?void 0:a.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===d){o.current=d;return}}else if(u.contains(d)){o.current=d;return}if(r!=null&&r.current)ul(r.current);else{if(t&16){if(_s(u,or.First|or.AutoFocus)!==mS.Error)return}else if(_s(u,or.First)!==mS.Error)return;if(l!=null&&l.current&&(ul(l.current),(a==null?void 0:a.activeElement)===l.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}o.current=a==null?void 0:a.activeElement})},[l,i,t]),o}function nj0(t,{ownerDocument:a,container:n,containers:r,previousActiveElement:l}){let o=SS(),i=!!(t&4);b70(a==null?void 0:a.defaultView,"focus",c=>{if(!i||!o.current)return;let u=gc0(r);n.current instanceof HTMLElement&&u.add(n.current);let d=l.current;if(!d)return;let h=c.target;h&&h instanceof HTMLElement?Ac0(u,h)?(l.current=h,ul(h)):(c.preventDefault(),c.stopPropagation(),ul(d)):ul(l.current)},!0)}function Ac0(t,a){for(let n of t)if(n.contains(a))return!0;return!1}function Zc0(t){var a;return!!(t.enter||t.enterFrom||t.enterTo||t.leave||t.leaveFrom||t.leaveTo)||((a=t.as)!=null?a:Mc0)!==e.Fragment||G0.Children.count(t.children)===1}let vA=e.createContext(null);vA.displayName="TransitionContext";var rj0=(t=>(t.Visible="visible",t.Hidden="hidden",t))(rj0||{});function lj0(){let t=e.useContext(vA);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}function oj0(){let t=e.useContext(gA);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}let gA=e.createContext(null);gA.displayName="NestingContext";function AA(t){return"children"in t?AA(t.children):t.current.filter(({el:a})=>a.current!==null).filter(({state:a})=>a==="visible").length>0}function Hc0(t,a){let n=W5(t),r=e.useRef([]),l=SS(),o=bs(),i=Xe((Z,H=Bo.Hidden)=>{let V=r.current.findIndex(({el:b})=>b===Z);V!==-1&&(sl(H,{[Bo.Unmount](){r.current.splice(V,1)},[Bo.Hidden](){r.current[V].state="hidden"}}),o.microTask(()=>{var b;!AA(r)&&l.current&&((b=n.current)==null||b.call(n))}))}),c=Xe(Z=>{let H=r.current.find(({el:V})=>V===Z);return H?H.state!=="visible"&&(H.state="visible"):r.current.push({el:Z,state:"visible"}),()=>i(Z,Bo.Unmount)}),u=e.useRef([]),d=e.useRef(Promise.resolve()),h=e.useRef({enter:[],leave:[]}),f=Xe((Z,H,V)=>{u.current.splice(0),a&&(a.chains.current[H]=a.chains.current[H].filter(([b])=>b!==Z)),a==null||a.chains.current[H].push([Z,new Promise(b=>{u.current.push(b)})]),a==null||a.chains.current[H].push([Z,new Promise(b=>{Promise.all(h.current[H].map(([S,F])=>F)).then(()=>b())})]),H==="enter"?d.current=d.current.then(()=>a==null?void 0:a.wait.current).then(()=>V(H)):V(H)}),v=Xe((Z,H,V)=>{Promise.all(h.current[H].splice(0).map(([b,S])=>S)).then(()=>{var b;(b=u.current.shift())==null||b()}).then(()=>V(H))});return e.useMemo(()=>({children:r,register:c,unregister:i,onStart:f,onStop:v,wait:d,chains:h}),[c,i,r,f,v,h,d])}let Mc0=e.Fragment,Ec0=Ls.RenderStrategy;function ij0(t,a){var n,r;let{transition:l=!0,beforeEnter:o,afterEnter:i,beforeLeave:c,afterLeave:u,enter:d,enterFrom:h,enterTo:f,entered:v,leave:Z,leaveFrom:H,leaveTo:V,...b}=t,S=e.useRef(null),F=Zc0(t),w=o6(...F?[S,a]:a===null?[]:[a]),$=(n=b.unmount)==null||n?Bo.Unmount:Bo.Hidden,{show:C,appear:P,initial:O}=lj0(),[z,G]=e.useState(C?"visible":"hidden"),R=oj0(),{register:J,unregister:Y}=R;l8(()=>J(S),[J,S]),l8(()=>{if($===Bo.Hidden&&S.current){if(C&&z!=="visible"){G("visible");return}return sl(z,{hidden:()=>Y(S),visible:()=>J(S)})}},[z,S,J,Y,C,$]);let n0=Nd();l8(()=>{if(F&&n0&&z==="visible"&&S.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[S,z,n0,F]);let l0=O&&!P,X=P&&C&&O,P0=e.useRef(!1),A0=Hc0(()=>{P0.current||(G("hidden"),Y(S))},R),d0=Xe(p0=>{P0.current=!0;let b0=p0?"enter":"leave";A0.onStart(S,b0,Q=>{Q==="enter"?o==null||o():Q==="leave"&&(c==null||c())})}),L0=Xe(p0=>{let b0=p0?"enter":"leave";P0.current=!1,A0.onStop(S,b0,Q=>{Q==="enter"?i==null||i():Q==="leave"&&(u==null||u())}),b0==="leave"&&!AA(A0)&&(G("hidden"),Y(S))});e.useEffect(()=>{F&&l||(d0(C),L0(C))},[C,F,l]);let j=!(!l||!F||!n0||l0),[,a0]=k70(j,S,C,{start:d0,end:L0}),i0=Y5({ref:w,className:((r=nS(b.className,X&&d,X&&h,a0.enter&&d,a0.enter&&a0.closed&&h,a0.enter&&!a0.closed&&f,a0.leave&&Z,a0.leave&&!a0.closed&&H,a0.leave&&a0.closed&&V,!a0.transition&&C&&v))==null?void 0:r.trim())||void 0,..._70(a0)}),q=0;return z==="visible"&&(q|=w6.Open),z==="hidden"&&(q|=w6.Closed),a0.enter&&(q|=w6.Opening),a0.leave&&(q|=w6.Closing),G0.createElement(gA.Provider,{value:A0},G0.createElement(oc0,{value:q},k8({ourProps:i0,theirProps:b,defaultTag:Mc0,features:Ec0,visible:z==="visible",name:"Transition.Child"})))}function cj0(t,a){let{show:n,appear:r=!1,unmount:l=!0,...o}=t,i=e.useRef(null),c=Zc0(t),u=o6(...c?[i,a]:a===null?[]:[a]);Nd();let d=Cd();if(n===void 0&&d!==null&&(n=(d&w6.Open)===w6.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[h,f]=e.useState(n?"visible":"hidden"),v=Hc0(()=>{n||f("hidden")}),[Z,H]=e.useState(!0),V=e.useRef([n]);l8(()=>{Z!==!1&&V.current[V.current.length-1]!==n&&(V.current.push(n),H(!1))},[V,n]);let b=e.useMemo(()=>({show:n,appear:r,initial:Z}),[n,r,Z]);uS(n,i,()=>f("hidden")),l8(()=>{n?f("visible"):!AA(v)&&i.current!==null&&f("hidden")},[n,v]);let S={unmount:l},F=Xe(()=>{var $;Z&&H(!1),($=t.beforeEnter)==null||$.call(t)}),w=Xe(()=>{var $;Z&&H(!1),($=t.beforeLeave)==null||$.call(t)});return G0.createElement(gA.Provider,{value:v},G0.createElement(vA.Provider,{value:b},k8({ourProps:{...S,as:e.Fragment,children:G0.createElement(Vc0,{ref:u,...S,...o,beforeEnter:F,beforeLeave:w})},theirProps:{},defaultTag:e.Fragment,features:Ec0,visible:h==="visible",name:"Transition"})))}function sj0(t,a){let n=e.useContext(vA)!==null,r=Cd()!==null;return G0.createElement(G0.Fragment,null,!n&&r?G0.createElement(FS,{ref:a,...t}):G0.createElement(Vc0,{ref:a,...t}))}let FS=f8(cj0),Vc0=f8(ij0),_S=f8(sj0),ZA=Object.assign(FS,{Child:_S,Root:FS});var uj0=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(uj0||{}),mj0=(t=>(t[t.SetTitleId=0]="SetTitleId",t))(mj0||{});let dj0={0(t,a){return t.titleId===a.id?t:{...t,titleId:a.id}}},kS=e.createContext(null);kS.displayName="DialogContext";function HA(t){let a=e.useContext(kS);if(a===null){let n=new Error(`<${t} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,HA),n}return a}function hj0(t,a){return sl(a.type,dj0,t,a)}let yc0=f8(function(t,a){let n=e.useId(),{id:r=`headlessui-dialog-${n}`,open:l,onClose:o,initialFocus:i,role:c="dialog",autoFocus:u=!0,__demoMode:d=!1,unmount:h=!1,...f}=t,v=e.useRef(!1);c=function(){return c==="dialog"||c==="alertdialog"?c:(v.current||(v.current=!0,console.warn(`Invalid role [${c}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let Z=Cd();l===void 0&&Z!==null&&(l=(Z&w6.Open)===w6.Open);let H=e.useRef(null),V=o6(H,a),b=ks(H),S=l?0:1,[F,w]=e.useReducer(hj0,{titleId:null,descriptionId:null,panelRef:e.createRef()}),$=Xe(()=>o(!1)),C=Xe(j=>w({type:0,id:j})),P=Nd()?S===0:!1,[O,z]=Rx0(),G={get current(){var j;return(j=F.panelRef.current)!=null?j:H.current}},R=vc0(),{resolveContainers:J}=Gx0({mainTreeNode:R,portals:O,defaultContainers:[G]}),Y=Z!==null?(Z&w6.Closing)===w6.Closing:!1;g70(d||Y?!1:P,{allowed:Xe(()=>{var j,a0;return[(a0=(j=H.current)==null?void 0:j.closest("[data-headlessui-portal]"))!=null?a0:null]}),disallowed:Xe(()=>{var j;return[(j=R==null?void 0:R.closest("body > *:not(#headlessui-portal-root)"))!=null?j:null]})}),y70(P,J,j=>{j.preventDefault(),$()}),qx0(P,b==null?void 0:b.defaultView,j=>{j.preventDefault(),j.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),$()}),S70(d||Y?!1:P,b,J),uS(P,H,$);let[n0,l0]=oS(),X=e.useMemo(()=>[{dialogState:S,close:$,setTitleId:C,unmount:h},F],[S,F,$,C,h]),P0=e.useMemo(()=>({open:S===0}),[S]),A0={ref:V,id:r,role:c,tabIndex:-1,"aria-modal":d?void 0:S===0?!0:void 0,"aria-labelledby":F.titleId,"aria-describedby":n0,unmount:h},d0=!Wx0(),L0=J5.None;return P&&!d&&(L0|=J5.RestoreFocus,L0|=J5.TabLock,u&&(L0|=J5.AutoFocus),d0&&(L0|=J5.InitialFocus)),G0.createElement(wx0,null,G0.createElement(sc0,{force:!0},G0.createElement(hc0,null,G0.createElement(kS.Provider,{value:X},G0.createElement(dc0,{target:H},G0.createElement(sc0,{force:!1},G0.createElement(l0,{slot:P0},G0.createElement(z,null,G0.createElement(Jx0,{initialFocus:i,initialFocusFallback:H,containers:J,features:L0},G0.createElement(BI0,{value:$},k8({ourProps:A0,theirProps:f,slot:P0,defaultTag:pj0,features:fj0,visible:S===0,name:"Dialog"})))))))))))}),pj0="div",fj0=Ls.RenderStrategy|Ls.Static;function vj0(t,a){let{transition:n=!1,open:r,...l}=t,o=Cd(),i=t.hasOwnProperty("open")||o!==null,c=t.hasOwnProperty("onClose");if(!i&&!c)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!i)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!c)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!o&&typeof t.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${t.open}`);if(typeof t.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${t.onClose}`);return(r!==void 0||n)&&!l.static?G0.createElement(fc0,null,G0.createElement(ZA,{show:r,transition:n,unmount:l.unmount},G0.createElement(yc0,{ref:a,...l}))):G0.createElement(fc0,null,G0.createElement(yc0,{ref:a,open:r,...l}))}let gj0="div";function Aj0(t,a){let n=e.useId(),{id:r=`headlessui-dialog-panel-${n}`,transition:l=!1,...o}=t,[{dialogState:i,unmount:c},u]=HA("Dialog.Panel"),d=o6(a,u.panelRef),h=e.useMemo(()=>({open:i===0}),[i]),f=Xe(Z=>{Z.stopPropagation()}),v={ref:d,id:r,onClick:f};return G0.createElement(l?_S:e.Fragment,{...l?{unmount:c}:{}},k8({ourProps:v,theirProps:o,slot:h,defaultTag:gj0,name:"Dialog.Panel"}))}let Zj0="div";function Hj0(t,a){let{transition:n=!1,...r}=t,[{dialogState:l,unmount:o}]=HA("Dialog.Backdrop"),i=e.useMemo(()=>({open:l===0}),[l]),c={ref:a,"aria-hidden":!0};return G0.createElement(n?_S:e.Fragment,{...n?{unmount:o}:{}},k8({ourProps:c,theirProps:r,slot:i,defaultTag:Zj0,name:"Dialog.Backdrop"}))}let Mj0="h2";function Ej0(t,a){let n=e.useId(),{id:r=`headlessui-dialog-title-${n}`,...l}=t,[{dialogState:o,setTitleId:i}]=HA("Dialog.Title"),c=o6(a);e.useEffect(()=>(i(r),()=>i(null)),[r,i]);let u=e.useMemo(()=>({open:o===0}),[o]);return k8({ourProps:{ref:c,id:r},theirProps:l,slot:u,defaultTag:Mj0,name:"Dialog.Title"})}let Vj0=f8(vj0),yj0=f8(Aj0);f8(Hj0);let bj0=f8(Ej0),wS=Object.assign(Vj0,{Panel:yj0,Title:bj0,Description:jI0}),Lj0="div";function Sj0(t,a){let n=`headlessui-control-${e.useId()}`,[r,l]=nA(),[o,i]=oS(),c=G5(),{disabled:u=c||!1,...d}=t,h=e.useMemo(()=>({disabled:u}),[u]);return G0.createElement(l70,{value:u},G0.createElement(l,{value:r},G0.createElement(i,{value:o},G0.createElement(NI0,{id:n},k8({ourProps:{ref:a,disabled:u||void 0,"aria-disabled":u||void 0},theirProps:{...d,children:G0.createElement(CI0,null,typeof d.children=="function"?d.children(h):d.children)},slot:h,defaultTag:Lj0,name:"Field"})))))}let Fj0=f8(Sj0);function _j0(t){let a=typeof t=="string"?t:void 0,[n,r]=e.useState(a);return[a??n,e.useCallback(l=>{a||l instanceof HTMLElement&&r(l.tagName.toLowerCase())},[a])]}let bc0="fieldset";function kj0(t,a){var n;let r=G5(),{disabled:l=r||!1,...o}=t,[i,c]=_j0((n=t.as)!=null?n:bc0),u=o6(a,c),[d,h]=nA(),f=e.useMemo(()=>({disabled:l}),[l]);return G0.createElement(l70,{value:l},G0.createElement(h,null,k8({ourProps:i==="fieldset"?{ref:u,"aria-labelledby":d,disabled:l||void 0}:{ref:u,role:"group","aria-labelledby":d,"aria-disabled":l||void 0},theirProps:o,slot:f,defaultTag:bc0,name:"Fieldset"})))}let wj0=f8(kj0),Cj0="input";function Nj0(t,a){let n=e.useId(),r=lS(),l=G5(),{id:o=r||`headlessui-input-${n}`,disabled:i=l||!1,autoFocus:c=!1,invalid:u=!1,...d}=t,h=cS(),f=m70(),{isFocused:v,focusProps:Z}=yd({autoFocus:c}),{isHovered:H,hoverProps:V}=Vd({isDisabled:i}),b=Ss({ref:a,id:o,"aria-labelledby":h,"aria-describedby":f,"aria-invalid":u?"":void 0,disabled:i||void 0,autoFocus:c},Z,V),S=e.useMemo(()=>({disabled:i,invalid:u,hover:H,focus:v,autofocus:c}),[i,u,H,v,c]);return k8({ourProps:b,theirProps:d,slot:S,defaultTag:Cj0,name:"Input"})}let Pj0=f8(Nj0);function $j0(t,a){let n=e.useRef({left:0,top:0});if(l8(()=>{let l=a.current;if(!l)return;let o=l.getBoundingClientRect();o&&(n.current=o)},[t]),a.current==null||!t||a.current===document.activeElement)return!1;let r=a.current.getBoundingClientRect();return r.top!==n.current.top||r.left!==n.current.left}let Lc0=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Sc0(t){var a,n;let r=(a=t.innerText)!=null?a:"",l=t.cloneNode(!0);if(!(l instanceof HTMLElement))return r;let o=!1;for(let c of l.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))c.remove(),o=!0;let i=o?(n=l.innerText)!=null?n:"":r;return Lc0.test(i)&&(i=i.replace(Lc0,"")),i}function Tj0(t){let a=t.getAttribute("aria-label");if(typeof a=="string")return a.trim();let n=t.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(l=>{let o=document.getElementById(l);if(o){let i=o.getAttribute("aria-label");return typeof i=="string"?i.trim():Sc0(o).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return Sc0(t).trim()}function Ij0(t){let a=e.useRef(""),n=e.useRef("");return Xe(()=>{let r=t.current;if(!r)return"";let l=r.innerText;if(a.current===l)return n.current;let o=Tj0(r).trim().toLowerCase();return a.current=l,n.current=o,o})}var Oj0=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(Oj0||{}),xj0=(t=>(t[t.Pointer=0]="Pointer",t[t.Other=1]="Other",t))(xj0||{}),jj0=(t=>(t[t.OpenMenu=0]="OpenMenu",t[t.CloseMenu=1]="CloseMenu",t[t.GoToItem=2]="GoToItem",t[t.Search=3]="Search",t[t.ClearSearch=4]="ClearSearch",t[t.RegisterItem=5]="RegisterItem",t[t.UnregisterItem=6]="UnregisterItem",t))(jj0||{});function CS(t,a=n=>n){let n=t.activeItemIndex!==null?t.items[t.activeItemIndex]:null,r=H70(a(t.items.slice()),o=>o.dataRef.current.domRef.current),l=n?r.indexOf(n):null;return l===-1&&(l=null),{items:r,activeItemIndex:l}}let Rj0={1(t){return t.menuState===1?t:{...t,activeItemIndex:null,menuState:1}},0(t){return t.menuState===0?t:{...t,__demoMode:!1,menuState:0}},2:(t,a)=>{var n,r,l,o,i;if(t.menuState===1)return t;let c={...t,searchQuery:"",activationTrigger:(n=a.trigger)!=null?n:1,__demoMode:!1};if(a.focus===c6.Nothing)return{...c,activeItemIndex:null};if(a.focus===c6.Specific)return{...c,activeItemIndex:t.items.findIndex(h=>h.id===a.id)};if(a.focus===c6.Previous){let h=t.activeItemIndex;if(h!==null){let f=t.items[h].dataRef.current.domRef,v=bS(a,{resolveItems:()=>t.items,resolveActiveIndex:()=>t.activeItemIndex,resolveId:Z=>Z.id,resolveDisabled:Z=>Z.dataRef.current.disabled});if(v!==null){let Z=t.items[v].dataRef.current.domRef;if(((r=f.current)==null?void 0:r.previousElementSibling)===Z.current||((l=Z.current)==null?void 0:l.previousElementSibling)===null)return{...c,activeItemIndex:v}}}}else if(a.focus===c6.Next){let h=t.activeItemIndex;if(h!==null){let f=t.items[h].dataRef.current.domRef,v=bS(a,{resolveItems:()=>t.items,resolveActiveIndex:()=>t.activeItemIndex,resolveId:Z=>Z.id,resolveDisabled:Z=>Z.dataRef.current.disabled});if(v!==null){let Z=t.items[v].dataRef.current.domRef;if(((o=f.current)==null?void 0:o.nextElementSibling)===Z.current||((i=Z.current)==null?void 0:i.nextElementSibling)===null)return{...c,activeItemIndex:v}}}}let u=CS(t),d=bS(a,{resolveItems:()=>u.items,resolveActiveIndex:()=>u.activeItemIndex,resolveId:h=>h.id,resolveDisabled:h=>h.dataRef.current.disabled});return{...c,...u,activeItemIndex:d}},3:(t,a)=>{let n=t.searchQuery!==""?0:1,r=t.searchQuery+a.value.toLowerCase(),l=(t.activeItemIndex!==null?t.items.slice(t.activeItemIndex+n).concat(t.items.slice(0,t.activeItemIndex+n)):t.items).find(i=>{var c;return((c=i.dataRef.current.textValue)==null?void 0:c.startsWith(r))&&!i.dataRef.current.disabled}),o=l?t.items.indexOf(l):-1;return o===-1||o===t.activeItemIndex?{...t,searchQuery:r}:{...t,searchQuery:r,activeItemIndex:o,activationTrigger:1}},4(t){return t.searchQuery===""?t:{...t,searchQuery:"",searchActiveItemIndex:null}},5:(t,a)=>{let n=CS(t,r=>[...r,{id:a.id,dataRef:a.dataRef}]);return{...t,...n}},6:(t,a)=>{let n=CS(t,r=>{let l=r.findIndex(o=>o.id===a.id);return l!==-1&&r.splice(l,1),r});return{...t,...n,activationTrigger:1}}},NS=e.createContext(null);NS.displayName="MenuContext";function MA(t){let a=e.useContext(NS);if(a===null){let n=new Error(`<${t} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,MA),n}return a}function Dj0(t,a){return sl(a.type,Rj0,t,a)}let zj0=e.Fragment;function Uj0(t,a){let{__demoMode:n=!1,...r}=t,l=e.useReducer(Dj0,{__demoMode:n,menuState:n?0:1,buttonRef:e.createRef(),itemsRef:e.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:o,itemsRef:i,buttonRef:c},u]=l,d=o6(a);y70(o===0,[c,i],(Z,H)=>{var V;u({type:1}),hS(H,dS.Loose)||(Z.preventDefault(),(V=c.current)==null||V.focus())});let h=Xe(()=>{u({type:1})}),f=e.useMemo(()=>({open:o===0,close:h}),[o,h]),v={ref:d};return G0.createElement(Fx0,null,G0.createElement(NS.Provider,{value:l},G0.createElement(oc0,{value:sl(o,{0:w6.Open,1:w6.Closed})},k8({ourProps:v,theirProps:r,slot:f,defaultTag:zj0,name:"Menu"}))))}let Bj0="button";function qj0(t,a){var n;let r=e.useId(),{id:l=`headlessui-menu-button-${r}`,disabled:o=!1,autoFocus:i=!1,...c}=t,[u,d]=MA("Menu.Button"),h=bx0(),f=o6(u.buttonRef,a,yx0()),v=Xe(O=>{switch(O.key){case ga.Space:case ga.Enter:case ga.ArrowDown:O.preventDefault(),O.stopPropagation(),l6.flushSync(()=>d({type:0})),d({type:2,focus:c6.First});break;case ga.ArrowUp:O.preventDefault(),O.stopPropagation(),l6.flushSync(()=>d({type:0})),d({type:2,focus:c6.Last});break}}),Z=Xe(O=>{switch(O.key){case ga.Space:O.preventDefault();break}}),H=Xe(O=>{var z;if(PI0(O.currentTarget))return O.preventDefault();o||(u.menuState===0?(l6.flushSync(()=>d({type:1})),(z=u.buttonRef.current)==null||z.focus({preventScroll:!0})):(O.preventDefault(),d({type:0})))}),{isFocusVisible:V,focusProps:b}=yd({autoFocus:i}),{isHovered:S,hoverProps:F}=Vd({isDisabled:o}),{pressed:w,pressProps:$}=Xg({disabled:o}),C=e.useMemo(()=>({open:u.menuState===0,active:w||u.menuState===0,disabled:o,hover:S,focus:V,autofocus:i}),[u,S,V,w,o,i]),P=Ss(h(),{ref:f,id:l,type:lO0(t,u.buttonRef),"aria-haspopup":"menu","aria-controls":(n=u.itemsRef.current)==null?void 0:n.id,"aria-expanded":u.menuState===0,disabled:o||void 0,autoFocus:i,onKeyDown:v,onKeyUp:Z,onClick:H},b,F,$);return k8({ourProps:P,theirProps:c,slot:C,defaultTag:Bj0,name:"Menu.Button"})}let Wj0="div",Gj0=Ls.RenderStrategy|Ls.Static;function Yj0(t,a){var n,r;let l=e.useId(),{id:o=`headlessui-menu-items-${l}`,anchor:i,portal:c=!1,modal:u=!0,transition:d=!1,...h}=t,f=Vx0(i),[v,Z]=MA("Menu.Items"),[H,V]=Sx0(f),b=Lx0(),S=o6(v.itemsRef,a,f?H:null),F=ks(v.itemsRef);f&&(c=!0);let w=Cd(),[$,C]=k70(d,v.itemsRef,w!==null?(w&w6.Open)===w6.Open:v.menuState===0);uS($,v.buttonRef,()=>{Z({type:1})});let P=v.__demoMode?!1:u&&v.menuState===0;S70(P,F);let O=v.__demoMode?!1:u&&v.menuState===0;g70(O,{allowed:Xe(()=>[v.buttonRef.current,v.itemsRef.current])});let z=v.menuState!==0,G=$j0(z,v.buttonRef)?!1:$;e.useEffect(()=>{let X=v.itemsRef.current;X&&v.menuState===0&&X!==(F==null?void 0:F.activeElement)&&X.focus({preventScroll:!0})},[v.menuState,v.itemsRef,F,v.itemsRef.current]),AO0(v.menuState===0,{container:v.itemsRef.current,accept(X){return X.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:X.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(X){X.setAttribute("role","none")}});let R=bs(),J=Xe(X=>{var P0,A0,d0;switch(R.dispose(),X.key){case ga.Space:if(v.searchQuery!=="")return X.preventDefault(),X.stopPropagation(),Z({type:3,value:X.key});case ga.Enter:if(X.preventDefault(),X.stopPropagation(),Z({type:1}),v.activeItemIndex!==null){let{dataRef:L0}=v.items[v.activeItemIndex];(A0=(P0=L0.current)==null?void 0:P0.domRef.current)==null||A0.click()}Z70(v.buttonRef.current);break;case ga.ArrowDown:return X.preventDefault(),X.stopPropagation(),Z({type:2,focus:c6.Next});case ga.ArrowUp:return X.preventDefault(),X.stopPropagation(),Z({type:2,focus:c6.Previous});case ga.Home:case ga.PageUp:return X.preventDefault(),X.stopPropagation(),Z({type:2,focus:c6.First});case ga.End:case ga.PageDown:return X.preventDefault(),X.stopPropagation(),Z({type:2,focus:c6.Last});case ga.Escape:X.preventDefault(),X.stopPropagation(),l6.flushSync(()=>Z({type:1})),(d0=v.buttonRef.current)==null||d0.focus({preventScroll:!0});break;case ga.Tab:X.preventDefault(),X.stopPropagation(),l6.flushSync(()=>Z({type:1})),aO0(v.buttonRef.current,X.shiftKey?or.Previous:or.Next);break;default:X.key.length===1&&(Z({type:3,value:X.key}),R.setTimeout(()=>Z({type:4}),350));break}}),Y=Xe(X=>{switch(X.key){case ga.Space:X.preventDefault();break}}),n0=e.useMemo(()=>({open:v.menuState===0}),[v.menuState]),l0=Ss(f?b():{},{"aria-activedescendant":v.activeItemIndex===null||(n=v.items[v.activeItemIndex])==null?void 0:n.id,"aria-labelledby":(r=v.buttonRef.current)==null?void 0:r.id,id:o,onKeyDown:J,onKeyUp:Y,role:"menu",tabIndex:v.menuState===0?0:void 0,ref:S,style:{...h.style,...V,"--button-width":WI0(v.buttonRef,!0).width},..._70(C)});return G0.createElement(hc0,{enabled:c?t.static||$:!1},k8({ourProps:l0,theirProps:h,slot:n0,defaultTag:Wj0,features:Gj0,visible:G,name:"Menu.Items"}))}let Qj0=e.Fragment;function Kj0(t,a){let n=e.useId(),{id:r=`headlessui-menu-item-${n}`,disabled:l=!1,...o}=t,[i,c]=MA("Menu.Item"),u=i.activeItemIndex!==null?i.items[i.activeItemIndex].id===r:!1,d=e.useRef(null),h=o6(a,d);l8(()=>{if(!i.__demoMode&&i.menuState===0&&u&&i.activationTrigger!==0)return cl().requestAnimationFrame(()=>{var G,R;(R=(G=d.current)==null?void 0:G.scrollIntoView)==null||R.call(G,{block:"nearest"})})},[i.__demoMode,d,u,i.menuState,i.activationTrigger,i.activeItemIndex]);let f=Ij0(d),v=e.useRef({disabled:l,domRef:d,get textValue(){return f()}});l8(()=>{v.current.disabled=l},[v,l]),l8(()=>(c({type:5,id:r,dataRef:v}),()=>c({type:6,id:r})),[v,r]);let Z=Xe(()=>{c({type:1})}),H=Xe(G=>{if(l)return G.preventDefault();c({type:1}),Z70(i.buttonRef.current)}),V=Xe(()=>{if(l)return c({type:2,focus:c6.Nothing});c({type:2,focus:c6.Specific,id:r})}),b=mO0(),S=Xe(G=>{b.update(G),!l&&(u||c({type:2,focus:c6.Specific,id:r,trigger:0}))}),F=Xe(G=>{b.wasMoved(G)&&(l||u||c({type:2,focus:c6.Specific,id:r,trigger:0}))}),w=Xe(G=>{b.wasMoved(G)&&(l||u&&c({type:2,focus:c6.Nothing}))}),[$,C]=nA(),[P,O]=oS(),z=e.useMemo(()=>({active:u,focus:u,disabled:l,close:Z}),[u,l,Z]);return G0.createElement(C,null,G0.createElement(O,null,k8({ourProps:{id:r,ref:h,role:"menuitem",tabIndex:l===!0?void 0:-1,"aria-disabled":l===!0?!0:void 0,"aria-labelledby":$,"aria-describedby":P,disabled:void 0,onClick:H,onFocus:V,onPointerEnter:S,onMouseEnter:S,onPointerMove:F,onMouseMove:F,onPointerLeave:w,onMouseLeave:w},theirProps:o,slot:z,defaultTag:Qj0,name:"Menu.Item"})))}let Xj0="div";function Jj0(t,a){let[n,r]=nA();return G0.createElement(r,null,k8({ourProps:{ref:a,"aria-labelledby":n,role:"group"},theirProps:t,slot:{},defaultTag:Xj0,name:"Menu.Section"}))}let eR0="header";function tR0(t,a){let n=e.useId(),{id:r=`headlessui-menu-heading-${n}`,...l}=t,o=iS();l8(()=>o.register(r),[r,o.register]);let i={id:r,ref:a,role:"presentation",...o.props};return k8({ourProps:i,theirProps:l,slot:{},defaultTag:eR0,name:"Menu.Heading"})}let aR0="div";function nR0(t,a){return k8({ourProps:{ref:a,role:"separator"},theirProps:t,slot:{},defaultTag:aR0,name:"Menu.Separator"})}let rR0=f8(Uj0),Fc0=f8(qj0),_c0=f8(Yj0),kc0=f8(Kj0),lR0=f8(Jj0),oR0=f8(tR0),wc0=f8(nR0),iR0=Object.assign(rR0,{Button:Fc0,Items:_c0,Item:kc0,Section:lR0,Heading:oR0,Separator:wc0}),cR0="select";function sR0(t,a){let n=e.useId(),r=lS(),l=G5(),{id:o=r||`headlessui-select-${n}`,disabled:i=l||!1,invalid:c=!1,autoFocus:u=!1,...d}=t,h=cS(),f=m70(),{isFocusVisible:v,focusProps:Z}=yd({autoFocus:u}),{isHovered:H,hoverProps:V}=Vd({isDisabled:i}),{pressed:b,pressProps:S}=Xg({disabled:i}),F=Ss({ref:a,id:o,"aria-labelledby":h,"aria-describedby":f,"aria-invalid":c?"":void 0,disabled:i||void 0,autoFocus:u},Z,V,S),w=e.useMemo(()=>({disabled:i,invalid:c,hover:H,focus:v,active:b,autofocus:u}),[i,c,H,v,b,u]);return k8({ourProps:F,theirProps:d,slot:w,defaultTag:cR0,name:"Select"})}let uR0=f8(sR0);const b3=e.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),Cc0=G0.createContext(e.forwardRef(function(a,n){return _.jsx("a",{...a,ref:n})})),EA=()=>G0.useContext(Cc0),mR0=({linkComponent:t,children:a})=>_.jsx(Cc0.Provider,{value:t,children:a}),PS=function({to:a,href:n,...r}){const l=!!n||typeof a=="string"&&(a==null?void 0:a.startsWith("http://"))||typeof a=="string"&&(a==null?void 0:a.startsWith("https://")),o=EA();return _.jsx(Bx0,{children:_.jsx(o,{to:a,href:n,isExternal:l,...r})})},Ts={base:["relative isolate inline-flex items-center justify-center gap-x-2 rounded-xl border text-base font-semibold","px-4 py-2","focus:outline-none data-[focus]:outline data-[focus]:outline-2 data-[focus]:outline-offset-2 data-[focus]:outline-blue-500","data-[disabled]:opacity-50","transition after:transition before:transition","whitespace-nowrap","lg:active:hover:scale-95 lg:active:hover:before:opacity-50"],modes:{solid:["border-transparent","dark:bg-[--btn-bg]","bg-[--btn-bg]","before:absolute before:inset-0 before:-z-10 before:rounded-[calc(theme(borderRadius.xl)-1px)]","dark:before:hidden","dark:border-white/5","after:absolute after:inset-0 after:-z-10 after:rounded-[calc(theme(borderRadius.xl)-1px)]","after:shadow-[shadow:inset_0_1px_theme(colors.white/15%)]","dark:after:shadow-none","after:data-[active]:bg-[--btn-hover-overlay] after:data-[hover]:bg-[--btn-hover-overlay]","dark:after:-inset-px dark:after:rounded-xl","before:data-[disabled]:shadow-none after:data-[disabled]:shadow-none"],ghost:["border-transparent","hover:dark:bg-[--btn-bg]","hover:bg-[--btn-bg]","before:absolute before:inset-0 before:-z-10 before:rounded-[calc(theme(borderRadius.xl)-1px)]","dark:before:hidden","hover:dark:border-white/5","after:absolute after:inset-0 after:-z-10 after:rounded-[calc(theme(borderRadius.xl)-1px)]","hover:after:shadow-[shadow:inset_0_1px_theme(colors.white/15%)]","after:data-[active]:bg-[--btn-hover-overlay] after:data-[hover]:bg-[--btn-hover-overlay]","dark:after:-inset-px dark:after:rounded-xl","before:data-[disabled]:shadow-none after:data-[disabled]:shadow-none","before:shadow-none"]},circular:["!rounded-full !aspect-square !p-2","before:!rounded-full after:!rounded-full dark:after:!rounded-full"],pill:["!rounded-full","before:!rounded-full after:!rounded-full dark:after:!rounded-full"],small:["!rounded-md !text-sm !px-1.5 !py-1","before:!rounded-md after:!rounded-md dark:after:!rounded-md"],surfaces:{system:["text-fg-primary dark:text-fg-primary-dark","[--btn-bg:theme(colors.system.regular)] [--btn-hover-overlay:theme(colors.white/20%)]","dark:[--btn-bg:theme(colors.system.regular-dark)] dark:[--btn-hover-overlay:theme(colors.white/10%)]","[--icon-color:theme(colors.fg.secondary)] dark:[--icon-color:theme(colors.fg.secondary-dark)]","backdrop-blur-lg","hover:before:shadow-lg"],material:["text-fg-primary dark:text-fg-primary-dark","[--btn-bg:theme(colors.material.regular)] [--btn-hover-overlay:theme(colors.white/20%)]","dark:[--btn-bg:theme(colors.material.regular-dark)] dark:[--btn-hover-overlay:theme(colors.white/10%)]","[--icon-color:theme(colors.fg.secondary)] dark:[--icon-color:theme(colors.fg.secondary-dark)]","backdrop-blur-lg","hover:before:shadow-lg"],chrome:["text-fg-primary dark:text-fg-primary-dark","[--btn-bg:theme(colors.system.chrome)]","dark:[--btn-bg:theme(colors.system.chrome-dark)] dark:[--btn-hover-overlay:theme(colors.white/5%)]","[--icon-color:theme(colors.fg.primary)] dark:[--icon-color:theme(colors.fg.primary-dark)]","before:shadow hover:before:shadow-lg"],solid:["text-fg-primary-dark [--btn-bg:theme(colors.action)] [--btn-hover-overlay:theme(colors.white/15%)]","dark:text-fg-primary-dark dark:[--btn-bg:theme(colors.action)] dark:[--btn-hover-overlay:theme(colors.white/15%)]","[--icon-color:theme(colors.fg.primary-dark)] dark:[--icon-color:theme(colors.fg.primary-dark)]","before:shadow hover:before:shadow-lg"],tinted:["text-action [--btn-bg:theme(colors.action/20%)] [--btn-hover-overlay:theme(colors.white/15%)]","dark:text-action dark:[--btn-bg:theme(colors.action/20%)] dark:[--btn-hover-overlay:theme(colors.white/10%)]","[--icon-color:theme(colors.action)] dark:[--icon-color:theme(colors.action)]","backdrop-blur-lg"]}},dR0={color:"var(--icon-color)",weight:"bold",size:"1.25rem"},qe=e.forwardRef(function({surface:a="system",mode:n="solid",small:r=!1,circular:l=!1,pill:o=!1,children:i,className:c,iconProps:u={},...d},h){const f=_e(c,Ts.base,Ts.modes[n],Ts.surfaces[a],r&&Ts.small,o&&Ts.pill,l&&Ts.circular),v={...dR0,...u},Z="href"in d&&d.href!=null||"to"in d&&d.to!=null,H=EA();return Z?_.jsx(H,{...d,className:f,ref:h,children:_.jsx(b3.Provider,{value:v,children:_.jsx(VA,{children:i})})}):_.jsx(i70,{...d,className:_e(f,"cursor-pointer"),ref:h,children:_.jsx(b3.Provider,{value:v,children:_.jsx(VA,{children:i})})})});function VA({children:t}){return _.jsxs(_.Fragment,{children:[t,_.jsx("span",{className:"absolute left-1/2 top-1/2 size-[max(100%,2.75rem)] -translate-x-1/2 -translate-y-1/2 [@media(pointer:fine)]:hidden","aria-hidden":"true"})]})}const Is=({src:t=null,square:a=!1,initials:n,alt:r="",className:l,noBorder:o=!1,children:i,...c})=>{const u=d=>{if(!d)return;let h=0;return d.split("").forEach(H=>{h=H.charCodeAt(0)+((h<<5)-h)}),`hsl(${h%360}, 40%, 60%)`};return _.jsxs("span",{"data-slot":"avatar",...c,className:_e(l,"inline-grid shrink-0 align-middle [--avatar-radius:20%] [--ring-opacity:20%] *:col-start-1 *:row-start-1",!o&&"bg-gray-100/50 dark:bg-material-thin-dark backdrop-blur-md border-2 border-system-chrome dark:border-material-opaque",a?"rounded-[--avatar-radius] *:rounded-[--avatar-radius]":"rounded-full *:rounded-full"),children:[t?_.jsx("img",{src:t,alt:r,className:"object-cover object-center aspect-square"}):n?_.jsxs("svg",{className:"select-none fill-current w-full h-full font-medium uppercase",style:{backgroundColor:u(n)?YL(u(n)).alpha(.7).toString():void 0,color:u(n)?YL(u(n)).darken(.6).toString():"#000000",fontSize:"400%"},viewBox:"0 0 100 100","aria-hidden":r?void 0:"true",children:[r?_.jsx("title",{children:r}):null,_.jsx("text",{x:"50%",y:"50%",alignmentBaseline:"middle",dominantBaseline:"middle",textAnchor:"middle",dy:".125em",children:n})]}):null,i]})};e.forwardRef(function({src:a,square:n=!1,initials:r,alt:l,className:o,avatarClassName:i,noBorder:c,children:u,surface:d="system",mode:h="ghost",small:f=!1,circular:v=!0,pill:Z=!1,...H},V){return _.jsx(qe,{...H,surface:d,mode:h,small:f,circular:v,pill:Z,className:_e(o),ref:V,children:_.jsx(Is,{src:a,square:n,initials:r,alt:l,noBorder:c,className:_e(i,"border-none"),children:u})})});const hR0={color:"var(--icon-color)",weight:"fill",size:"16px"},pR0=e.forwardRef(function({className:a,direction:n="cols",...r},l){return _.jsx(b3.Provider,{value:hR0,children:_.jsx("div",{ref:l,className:_e(a,"[--anchor-gap:theme(spacing.2)] [--anchor-padding:theme(spacing.3)] data-[anchor~=end]:[--anchor-offset:4px] data-[anchor~=start]:[--anchor-offset:-4px]","origin-top-left isolate w-max rounded-lg","outline outline-1 outline-transparent focus:outline-none","overflow-y-auto","bg-material-chrome backdrop-blur-xl dark:bg-material-regular-dark","shadow-lg ring-1 ring-system-thick dark:ring-inset dark:ring-system-thick-dark","supports-[grid-template-columns:subgrid]:grid",n==="cols"?"supports-[grid-template-columns:subgrid]:grid-cols-[auto_auto_auto]":"supports-[grid-template-columns:subgrid]:grid-rows-[auto_auto_auto]","transition data-[closed]:data-[leave]:opacity-0 data-[leave]:duration-100 data-[leave]:ease-in"),...r})})}),fR0=e.forwardRef(function({active:a,className:n,href:r,to:l,...o},i){const c=_e(n,"group cursor-pointer inline-flex rounded-md px-3 py-2 focus:outline-none sm:px-3 sm:py-1.5","text-left text-base/6 text-fg-primary sm:text-sm/6 dark:text-fg-primary-dark forced-colors:text-[CanvasText]","data-[focus]:bg-system-thin dark:data-[focus]:bg-system-thin-dark","focus:bg-system-thin dark:focus:bg-system-thin-dark","hover:bg-system-thin dark:hover:bg-system-thin-dark","data-[disabled]:opacity-50","disabled:opacity-50","forced-color-adjust-none forced-colors:focus:bg-[Highlight] forced-colors:focus:text-[HighlightText] forced-colors:[&>[data-slot=icon]]:focus:text-[HighlightText]","forced-colors:data-[focus]:bg-[Highlight] forced-colors:data-[focus]:text-[HighlightText] forced-colors:[&>[data-slot=icon]]:data-[focus]:text-[HighlightText]","col-span-full grid grid-cols-[auto_auto_auto] items-center supports-[grid-template-columns:subgrid]:grid-cols-subgrid","[--icon-color:theme(colors.fg.secondary)] dark:[--icon-color:theme(colors.fg.secondary-dark)]","gap-x-1",a?"bg-system-thin dark:bg-system-thin-dark":null),u=EA();if(r||l){const d=o;return _.jsx(u,{...d,href:r,to:l,className:c,ref:i})}else{const d=o;return _.jsx("button",{...d,type:"button",className:c,ref:i})}}),vR0={color:"var(--icon-color)",weight:"fill",size:"16px"};function Nc0(t){return _.jsx(iR0,{...t})}function Pc0(t){return _.jsx(Fc0,{as:qe,...t})}function $c0({anchor:t="bottom",portal:a=!0,...n}){return _.jsx(_c0,{transition:!0,...n,anchor:a?t:void 0,as:pR0})}function Ko(t){return _.jsx(b3.Provider,{value:vR0,children:_.jsx(kc0,{as:fR0,...t})})}function gR0({className:t,...a}){return _.jsx(wc0,{...a,className:_e(t,"col-span-full mx-3.5 my-1 h-px border-0 bg-zinc-950/5 sm:mx-3 dark:bg-white/10 forced-colors:bg-[CanvasText]")})}function Xo({className:t,...a}){return _.jsx(d70,{...a,"data-slot":"label",className:_e(t,"col-start-2 row-start-1"),...a})}const e7={card:["flex flex-col group","relative","rounded-xl","shadow-lg","dark:border-white/5 dark:border","[&>:first-child]:rounded-t-xl [&>:last-child]:rounded-b-xl","[&>:first-child]:before:rounded-t-xl [&>:first-child]:after:rounded-t-xl","[&>:last-child]:before:rounded-b-xl [&>:last-child]:after:rounded-b-xl"],backgroundColor:["bg-system-chrome dark:bg-system-chrome-dark"],interactive:["transition-all","hover:-translate-y-0.5 active:hover:scale-[98%] hover:shadow-xl","group-hover:-translate-y-0.5 group-hover:shadow-xl group-active:hover:scale-[98%]"],cardNonResponsive:["[&>*]:min-w-full"],responsive:["md:flex-row","md:[&>:first-child]:rounded-none md:[&>:last-child]:rounded-none","md:[&>:first-child]:before:rounded-none md:[&>:first-child]:after:rounded-none","md:[&>:last-child]:before:rounded-none md:[&>:last-child]:after:rounded-none","md:[&>:first-child]:rounded-l-xl md:[&>:last-child]:rounded-r-xl","md:[&>:first-child]:before:rounded-l-xl md:[&>:first-child]:after:rounded-l-xl","md:[&>:last-child]:before:rounded-r-xl md:[&>:last-child]:after:rounded-r-xl"],cardContent:["p-4 relative z-0","content-center","before:z-[-1] before:bg-bottom before:bg-cover before:bg-no-repeat before:[background-image:var(--blurBackground)] before:absolute before","after:z-[-1] after:backdrop-blur-xl after:bg-material-screen dark:after:bg-material-regular-dark after:absolute after","after:transition-colors group-hover:after:bg-material-chrome dark:group-hover:after:bg-material-chrome-dark"],cardImage:["overflow-hidden w-full"]},s6=({as:t,interactive:a=!1,responsive:n=!1,backgroundColor:r="",className:l,...o})=>{const i=t||"div";return _.jsx(i,{...o,className:_e(l,e7.card,r||e7.backgroundColor,a?e7.interactive:null,n?e7.responsive:e7.cardNonResponsive)})},yA=({as:t,className:a,blurBackground:n,...r})=>{const l=t||"div";return _.jsx(l,{...r,style:n?{"--blurBackground":`url(${n})`}:r.style,className:_e(a,e7.cardContent,!n&&"after:hidden")})},bA=({as:t,className:a,...n})=>{const r=t||"img";return _.jsx(r,{...n,className:_e(a,e7.cardImage)})},$S={inherited:["[&_a]:text-action [&_a]:underline [&_a]:decoration-action/50 [&_a:hover]:decoration-action/100"],as:{p:["text-base/relaxed"],h1:["text-4xl/normal font-bold leading-tight"],h2:["text-2xl/normal font-semibold"],h3:["text-xl/snug font-semibold"],h4:["text-lg/tight font-medium"],h5:["text-base/tight font-medium"],small:["text-xs/tight"]}},AR0="p";function re({className:t,as:a,fg:n="primary",...r}){const l=a??AR0;let o;switch(n){case"secondary":o="text-fg-secondary dark:text-fg-secondary-dark";break;case"tertiary":o="text-fg-tertiary dark:text-fg-tertiary-dark";break;case"quaternary":o="text-fg-quaternary dark:text-fg-quaternary-dark";break;case"primary":default:o="text-fg-primary dark:text-fg-primary-dark";break}return _.jsx(l,{...r,"data-slot":"text",className:_e(t,$S.as[a]??$S.as.p,$S.inherited,o)})}const E=e.forwardRef((t,a)=>{const{alt:n,color:r,size:l,weight:o,mirrored:i,children:c,weights:u,...d}=t,{color:h="currentColor",size:f,weight:v="regular",mirrored:Z=!1,...H}=e.useContext(b3);return e.createElement("svg",{ref:a,xmlns:"http://www.w3.org/2000/svg",width:l??f,height:l??f,fill:r??h,viewBox:"0 0 256 256",transform:i||Z?"scale(-1, 1)":void 0,...H,...d},!!n&&e.createElement("title",null,n),c,u.get(o??v))});E.displayName="IconBase";const ZR0=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216.49,56.48,177,96h19a12,12,0,0,1,0,24H148a12,12,0,0,1-12-12V60a12,12,0,0,1,24,0V79l39.51-39.52a12,12,0,0,1,17,17ZM108,136H60a12,12,0,0,0,0,24H79L39.51,199.51a12,12,0,0,0,17,17L96,177v19a12,12,0,0,0,24,0V148A12,12,0,0,0,108,136Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Z",opacity:"0.2"}),e.createElement("path",{d:"M213.66,53.66,163.31,104H192a8,8,0,0,1,0,16H144a8,8,0,0,1-8-8V64a8,8,0,0,1,16,0V92.69l50.34-50.35a8,8,0,0,1,11.32,11.32ZM112,136H64a8,8,0,0,0,0,16H92.69L42.34,202.34a8,8,0,0,0,11.32,11.32L104,163.31V192a8,8,0,0,0,16,0V144A8,8,0,0,0,112,136Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M120,144v48a8,8,0,0,1-13.66,5.66L88,179.31,53.66,213.66a8,8,0,0,1-11.32-11.32L76.69,168,58.34,149.66A8,8,0,0,1,64,136h48A8,8,0,0,1,120,144ZM213.66,42.34a8,8,0,0,0-11.32,0L168,76.69,149.66,58.34A8,8,0,0,0,136,64v48a8,8,0,0,0,8,8h48a8,8,0,0,0,5.66-13.66L179.31,88l34.35-34.34A8,8,0,0,0,213.66,42.34Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M212.24,52.24,158.48,106H192a6,6,0,0,1,0,12H144a6,6,0,0,1-6-6V64a6,6,0,0,1,12,0V97.52l53.76-53.76a6,6,0,0,1,8.48,8.48ZM112,138H64a6,6,0,0,0,0,12H97.52L43.76,203.76a6,6,0,1,0,8.48,8.48L106,158.48V192a6,6,0,0,0,12,0V144A6,6,0,0,0,112,138Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M213.66,53.66,163.31,104H192a8,8,0,0,1,0,16H144a8,8,0,0,1-8-8V64a8,8,0,0,1,16,0V92.69l50.34-50.35a8,8,0,0,1,11.32,11.32ZM112,136H64a8,8,0,0,0,0,16H92.69L42.34,202.34a8,8,0,0,0,11.32,11.32L104,163.31V192a8,8,0,0,0,16,0V144A8,8,0,0,0,112,136Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M210.83,50.83,153.66,108H192a4,4,0,0,1,0,8H144a4,4,0,0,1-4-4V64a4,4,0,0,1,8,0v38.34l57.17-57.17a4,4,0,1,1,5.66,5.66ZM112,140H64a4,4,0,0,0,0,8h38.34L45.17,205.17a4,4,0,0,0,5.66,5.66L108,153.66V192a4,4,0,0,0,8,0V144A4,4,0,0,0,112,140Z"}))]]),TS=e.forwardRef((t,a)=>e.createElement(E,{ref:a,...t,weights:ZR0}));TS.displayName="ArrowsInSimpleIcon";const Tc0=TS,HR0=Object.freeze(Object.defineProperty({__proto__:null,ArrowsInSimple:Tc0,ArrowsInSimpleIcon:TS},Symbol.toStringTag,{value:"Module"})),MR0=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M220,48V96a12,12,0,0,1-24,0V77l-39.51,39.52a12,12,0,0,1-17-17L179,60H160a12,12,0,0,1,0-24h48A12,12,0,0,1,220,48ZM99.51,139.51,60,179V160a12,12,0,0,0-24,0v48a12,12,0,0,0,12,12H96a12,12,0,0,0,0-24H77l39.52-39.51a12,12,0,0,0-17-17Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Z",opacity:"0.2"}),e.createElement("path",{d:"M216,48V96a8,8,0,0,1-16,0V67.31l-50.34,50.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM106.34,138.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l50.35-50.34a8,8,0,0,0-11.32-11.32Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M117.66,138.34a8,8,0,0,1,0,11.32L83.31,184l18.35,18.34A8,8,0,0,1,96,216H48a8,8,0,0,1-8-8V160a8,8,0,0,1,13.66-5.66L72,172.69l34.34-34.35A8,8,0,0,1,117.66,138.34ZM208,40H160a8,8,0,0,0-5.66,13.66L172.69,72l-34.35,34.34a8,8,0,0,0,11.32,11.32L184,83.31l18.34,18.35A8,8,0,0,0,216,96V48A8,8,0,0,0,208,40Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M214,48V96a6,6,0,0,1-12,0V62.48l-53.76,53.76a6,6,0,0,1-8.48-8.48L193.52,54H160a6,6,0,0,1,0-12h48A6,6,0,0,1,214,48ZM107.76,139.76,54,193.52V160a6,6,0,0,0-12,0v48a6,6,0,0,0,6,6H96a6,6,0,0,0,0-12H62.48l53.76-53.76a6,6,0,0,0-8.48-8.48Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,48V96a8,8,0,0,1-16,0V67.31l-50.34,50.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM106.34,138.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l50.35-50.34a8,8,0,0,0-11.32-11.32Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M212,48V96a4,4,0,0,1-8,0V57.66l-57.17,57.17a4,4,0,0,1-5.66-5.66L198.34,52H160a4,4,0,0,1,0-8h48A4,4,0,0,1,212,48ZM109.17,141.17,52,198.34V160a4,4,0,0,0-8,0v48a4,4,0,0,0,4,4H96a4,4,0,0,0,0-8H57.66l57.17-57.17a4,4,0,0,0-5.66-5.66Z"}))]]),IS=e.forwardRef((t,a)=>e.createElement(E,{ref:a,...t,weights:MR0}));IS.displayName="ArrowsOutSimpleIcon";const Ic0=IS,ER0=Object.freeze(Object.defineProperty({__proto__:null,ArrowsOutSimple:Ic0,ArrowsOutSimpleIcon:IS},Symbol.toStringTag,{value:"Module"})),$d={card:["group","z-0","mb-12","px-4 py-6 pb-0","rounded-xl","relative","transition after:transition-all hover:transition-all","after:absolute after:-z-10 after:rounded-xl","dark:after:border-white/5"],contractedCard:["cursor-pointer","after:inset-0","active:hover:scale-95 active:hover:after:shadow-md","after:bg-material-thick dark:after:bg-material-thick-dark","hover:after:shadow-lg hover:after:-inset-4 hover:mb-12"],expandedCard:["is-expanded","cursor-auto","after:bg-material-chrome dark:after:bg-material-regular-dark","hover:after:shadow-xl after:shadow-xl dark:after:shadow-none dark:after:border dark:after:border-white/5","after:-inset-4","pb-8"],content:["max-h-56 min-h-24 overflow-hidden","after:absolute after:bottom-0 after:left-0 after:right-0 after:h-14 after:rounded-b-xl after:bg-gradient-to-b after:from-transparent after:to-material-thick after:dark:to-material-thick-dark","group-[:not(.is-expanded)]:gradient-mask-b-0 group-[:not(.is-expanded):hover]:gradient-mask-b-[rgba(0,0,0,1.0)_50%,rgba(0,0,0,0)_100%]","group-[.is-expanded]:after:to-transparent"],button:["transition absolute bottom-4 right-4 flex items-center gap-2","group-[.is-expanded]:translate-x-4 group-[.is-expanded]:translate-y-4","group-hover:translate-x-4 group-hover:translate-y-4"]},VR0=({children:t,expandedOnMount:a=!1,className:n,actions:r})=>{const[l,o]=e.useState(a),[i,c]=e.useState(224),u=e.useRef(null);return e.useEffect(()=>{if(!u.current)return;const d=new ResizeObserver(()=>{u.current&&u.current.scrollHeight!==i&&c(u.current.scrollHeight)});return d.observe(u.current),function(){d.disconnect()}},[t,i]),_.jsxs("div",{className:_e($d.card,l?$d.expandedCard:$d.contractedCard,n),onClick:l?void 0:()=>o(!l),children:[_.jsx("div",{className:_e($d.content),style:l?{maxHeight:i}:void 0,ref:u,children:t}),_.jsxs("div",{className:_e($d.button),children:[r,_.jsx(qe,{onClick:()=>o(!l),surface:"chrome",circular:!0,children:l?_.jsx(Tc0,{size:16}):_.jsx(Ic0,{size:16})})]})]})};function yR0({className:t,...a}){return _.jsx(wj0,{...a,className:_e(t,"[&>*+[data-slot=control]]:mt-6 [&>[data-slot=text]]:mt-1")})}function OS({className:t,...a}){return _.jsx(Fj0,{...a,className:_e(t,"[&>[data-slot=label]+[data-slot=control]]:mt-3","[&>[data-slot=label]+[data-slot=description]]:mt-1","[&>[data-slot=description]+[data-slot=control]]:mt-3","[&>[data-slot=control]+[data-slot=description]]:mt-3","[&>[data-slot=control]+[data-slot=error]]:mt-3","[&>[data-slot=label]]:font-medium")})}function xS({className:t,...a}){return _.jsx(d70,{"data-slot":"label",...a,className:_e(t,"select-none text-base/6 text-fg-primary data-[disabled]:opacity-50 sm:text-sm/6 dark:text-fg-primary-dark")})}const bR0=["date","datetime-local","month","time","week"],dl=e.forwardRef(function({className:a,...n},r){return _.jsx("span",{"data-slot":"control",className:_e(["relative block w-full","before:absolute before:inset-px before:rounded-[calc(theme(borderRadius.lg)-1px)] before:bg-white before:shadow","dark:before:hidden","after:pointer-events-none after:absolute after:inset-0 after:rounded-lg after:ring-inset after:ring-transparent sm:after:focus-within:ring-2 sm:after:focus-within:ring-action","has-[[data-disabled]]:opacity-50 before:has-[[data-disabled]]:bg-system-regular dark:before:has-[[data-disabled]]:bg-system-regular-dark before:has-[[data-disabled]]:shadow-none","before:has-[[data-invalid]]:shadow-red-500/10"]),children:_.jsx(Pj0,{ref:r,...n,className:_e([a,n.type&&bR0.includes(n.type)&&["[&::-webkit-datetime-edit-fields-wrapper]:p-0","[&::-webkit-date-and-time-value]:min-h-[1.5em]","[&::-webkit-datetime-edit]:inline-flex","[&::-webkit-datetime-edit]:p-0","[&::-webkit-datetime-edit-year-field]:p-0","[&::-webkit-datetime-edit-month-field]:p-0","[&::-webkit-datetime-edit-day-field]:p-0","[&::-webkit-datetime-edit-hour-field]:p-0","[&::-webkit-datetime-edit-minute-field]:p-0","[&::-webkit-datetime-edit-second-field]:p-0","[&::-webkit-datetime-edit-millisecond-field]:p-0","[&::-webkit-datetime-edit-meridiem-field]:p-0"],"relative block w-full appearance-none rounded-lg px-[calc(theme(spacing[3.5])-1px)] py-[calc(theme(spacing[2.5])-1px)] sm:px-[calc(theme(spacing[3])-1px)] sm:py-[calc(theme(spacing[1.5])-1px)]","text-base/6 text-fg-primary placeholder:fg-secondary dark:placeholder:fg-secondary-dark sm:text-sm/6 dark:text-fg-primary-dark","border border-system-thin data-[hover]:border-system-thick dark:border-system-regular-dark dark:data-[hover]:border-system-thin-dark","bg-transparent dark:bg-white/5","focus:outline-none","data-[invalid]:border-red-500 data-[invalid]:data-[hover]:border-red-500 data-[invalid]:dark:border-red-500 data-[invalid]:data-[hover]:dark:border-red-500","data-[disabled]:border-system-thick dark:data-[hover]:data-[disabled]:border-system-thick-dark data-[disabled]:dark:border-system-regular-dark data-[disabled]:dark:bg-system-regular-dark","dark:[color-scheme:dark]",n.type&&n.type==="file"&&["file:bg-gray-50 file:border-0 file:me-4 file:py-3 file:px-4 dark:file:bg-neutral-700 dark:file:text-neutral-400","!p-0"]])})})});var LR0=Object.defineProperty,SR0=Object.defineProperties,FR0=Object.getOwnPropertyDescriptors,LA=Object.getOwnPropertySymbols,Oc0=Object.prototype.hasOwnProperty,xc0=Object.prototype.propertyIsEnumerable,jc0=(t,a,n)=>a in t?LR0(t,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[a]=n,_R0=(t,a)=>{for(var n in a||(a={}))Oc0.call(a,n)&&jc0(t,n,a[n]);if(LA)for(var n of LA(a))xc0.call(a,n)&&jc0(t,n,a[n]);return t},kR0=(t,a)=>SR0(t,FR0(a)),wR0=(t,a)=>{var n={};for(var r in t)Oc0.call(t,r)&&a.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&LA)for(var r of LA(t))a.indexOf(r)<0&&xc0.call(t,r)&&(n[r]=t[r]);return n},CR0="^\\d+$";function NR0(t){let a=setTimeout(t,0),n=setTimeout(t,10),r=setTimeout(t,50);return[a,n,r]}function PR0(t){let a=e.useRef();return e.useEffect(()=>{a.current=t}),a.current}var $R0=18,Rc0=40,TR0=`${Rc0}px`,IR0=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function OR0({containerRef:t,inputRef:a,pushPasswordManagerStrategy:n,isFocused:r}){let l=e.useRef({done:!1,refocused:!1}),[o,i]=e.useState(!1),[c,u]=e.useState(!1),[d,h]=e.useState(!1),f=e.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&o&&c,[o,c,n]),v=e.useCallback(()=>{let Z=t.current,H=a.current;if(!Z||!H||d||n==="none")return;let V=Z,b=V.getBoundingClientRect().left+V.offsetWidth,S=V.getBoundingClientRect().top+V.offsetHeight/2,F=b-$R0,w=S;if(!(document.querySelectorAll(IR0).length===0&&document.elementFromPoint(F,w)===Z)&&(i(!0),h(!0),!l.current.refocused&&document.activeElement===H)){let $=[H.selectionStart,H.selectionEnd];H.blur(),H.focus(),H.setSelectionRange($[0],$[1]),l.current.refocused=!0}},[t,a,d,n]);return e.useEffect(()=>{let Z=t.current;if(!Z||n==="none")return;function H(){let b=window.innerWidth-Z.getBoundingClientRect().right;u(b>=Rc0)}H();let V=setInterval(H,1e3);return()=>{clearInterval(V)}},[t,n]),e.useEffect(()=>{let Z=r||document.activeElement===a.current;if(n==="none"||!Z)return;let H=setTimeout(v,0),V=setTimeout(v,2e3),b=setTimeout(v,5e3),S=setTimeout(()=>{h(!0)},6e3);return()=>{clearTimeout(H),clearTimeout(V),clearTimeout(b),clearTimeout(S)}},[a,r,n,v]),{hasPWMBadge:o,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:TR0}}var Dc0=e.createContext({}),zc0=e.forwardRef((t,a)=>{var n=t,{value:r,onChange:l,maxLength:o,textAlign:i="left",pattern:c=CR0,inputMode:u="numeric",onComplete:d,pushPasswordManagerStrategy:h="increase-width",containerClassName:f,noScriptCSSFallback:v=xR0,render:Z,children:H}=n,V=wR0(n,["value","onChange","maxLength","textAlign","pattern","inputMode","onComplete","pushPasswordManagerStrategy","containerClassName","noScriptCSSFallback","render","children"]),b,S,F,w,$;let[C,P]=e.useState(typeof V.defaultValue=="string"?V.defaultValue:""),O=r??C,z=PR0(O),G=e.useCallback(M0=>{l==null||l(M0),P(M0)},[l]),R=e.useMemo(()=>c?typeof c=="string"?new RegExp(c):c:null,[c]),J=e.useRef(null),Y=e.useRef(null),n0=e.useRef({value:O,onChange:G,isIOS:typeof window<"u"&&((S=(b=window==null?void 0:window.CSS)==null?void 0:b.supports)==null?void 0:S.call(b,"-webkit-touch-callout","none"))}),l0=e.useRef({prev:[(F=J.current)==null?void 0:F.selectionStart,(w=J.current)==null?void 0:w.selectionEnd,($=J.current)==null?void 0:$.selectionDirection]});e.useImperativeHandle(a,()=>J.current,[]),e.useEffect(()=>{let M0=J.current,c0=Y.current;if(!M0||!c0)return;n0.current.value!==M0.value&&n0.current.onChange(M0.value),l0.current.prev=[M0.selectionStart,M0.selectionEnd,M0.selectionDirection];function Q0(){if(document.activeElement!==M0){j(null),i0(null);return}let Y0=M0.selectionStart,h1=M0.selectionEnd,S1=M0.selectionDirection,A1=M0.maxLength,v1=M0.value,e1=l0.current.prev,K0=-1,j0=-1,i1;if(v1.length!==0&&Y0!==null&&h1!==null){let Z1=Y0===h1,x1=Y0===v1.length&&v1.length<A1;if(Z1&&!x1){let me=Y0;if(me===0)K0=0,j0=1,i1="forward";else if(me===A1)K0=me-1,j0=me,i1="backward";else if(A1>1&&v1.length>1){let F0=0;if(e1[0]!==null&&e1[1]!==null){i1=me<e1[1]?"backward":"forward";let c1=e1[0]===e1[1]&&e1[0]<A1;i1==="backward"&&!c1&&(F0=-1)}K0=F0+me,j0=F0+me+1}}K0!==-1&&j0!==-1&&K0!==j0&&J.current.setSelectionRange(K0,j0,i1)}let _0=K0!==-1?K0:Y0,$0=j0!==-1?j0:h1,X0=i1??S1;j(_0),i0($0),l0.current.prev=[_0,$0,X0]}if(document.addEventListener("selectionchange",Q0,{capture:!0}),Q0(),document.activeElement===M0&&d0(!0),!document.getElementById("input-otp-style")){let Y0=document.createElement("style");if(Y0.id="input-otp-style",document.head.appendChild(Y0),Y0.sheet){let h1="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Td(Y0.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Td(Y0.sheet,`[data-input-otp]:autofill { ${h1} }`),Td(Y0.sheet,`[data-input-otp]:-webkit-autofill { ${h1} }`),Td(Y0.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Td(Y0.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let f0=()=>{c0&&c0.style.setProperty("--root-height",`${M0.clientHeight}px`)};f0();let a1=new ResizeObserver(f0);return a1.observe(M0),()=>{document.removeEventListener("selectionchange",Q0,{capture:!0}),a1.disconnect()}},[]);let[X,P0]=e.useState(!1),[A0,d0]=e.useState(!1),[L0,j]=e.useState(null),[a0,i0]=e.useState(null);e.useEffect(()=>{NR0(()=>{var M0,c0,Q0,f0;(M0=J.current)==null||M0.dispatchEvent(new Event("input"));let a1=(c0=J.current)==null?void 0:c0.selectionStart,Y0=(Q0=J.current)==null?void 0:Q0.selectionEnd,h1=(f0=J.current)==null?void 0:f0.selectionDirection;a1!==null&&Y0!==null&&(j(a1),i0(Y0),l0.current.prev=[a1,Y0,h1])})},[O,A0]),e.useEffect(()=>{z!==void 0&&O!==z&&z.length<o&&O.length===o&&(d==null||d(O))},[o,d,z,O]);let q=OR0({containerRef:Y,inputRef:J,pushPasswordManagerStrategy:h,isFocused:A0}),p0=e.useCallback(M0=>{let c0=M0.currentTarget.value.slice(0,o);if(c0.length>0&&R&&!R.test(c0)){M0.preventDefault();return}typeof z=="string"&&c0.length<z.length&&document.dispatchEvent(new Event("selectionchange")),G(c0)},[o,G,z,R]),b0=e.useCallback(()=>{var M0;if(J.current){let c0=Math.min(J.current.value.length,o-1),Q0=J.current.value.length;(M0=J.current)==null||M0.setSelectionRange(c0,Q0),j(c0),i0(Q0)}d0(!0)},[o]),Q=e.useCallback(M0=>{var c0,Q0;let f0=J.current;if(!n0.current.isIOS||!M0.clipboardData||!f0)return;let a1=M0.clipboardData.getData("text/plain");M0.preventDefault();let Y0=(c0=J.current)==null?void 0:c0.selectionStart,h1=(Q0=J.current)==null?void 0:Q0.selectionEnd,S1=(Y0!==h1?O.slice(0,Y0)+a1+O.slice(h1):O.slice(0,Y0)+a1+O.slice(Y0)).slice(0,o);if(S1.length>0&&R&&!R.test(S1))return;f0.value=S1,G(S1);let A1=Math.min(S1.length,o-1),v1=S1.length;f0.setSelectionRange(A1,v1),j(A1),i0(v1)},[o,G,R,O]),s0=e.useMemo(()=>({position:"relative",cursor:V.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[V.disabled]),e0=e.useMemo(()=>({position:"absolute",inset:0,width:q.willPushPWMBadge?`calc(100% + ${q.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:q.willPushPWMBadge?`inset(0 ${q.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:i,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[q.PWM_BADGE_SPACE_WIDTH,q.willPushPWMBadge,i]),m0=e.useMemo(()=>e.createElement("input",kR0(_R0({autoComplete:V.autoComplete||"one-time-code"},V),{"data-input-otp":!0,"data-input-otp-mss":L0,"data-input-otp-mse":a0,inputMode:u,pattern:R==null?void 0:R.source,style:e0,maxLength:o,value:O,ref:J,onPaste:M0=>{var c0;Q(M0),(c0=V.onPaste)==null||c0.call(V,M0)},onChange:p0,onMouseOver:M0=>{var c0;P0(!0),(c0=V.onMouseOver)==null||c0.call(V,M0)},onMouseLeave:M0=>{var c0;P0(!1),(c0=V.onMouseLeave)==null||c0.call(V,M0)},onFocus:M0=>{var c0;b0(),(c0=V.onFocus)==null||c0.call(V,M0)},onBlur:M0=>{var c0;d0(!1),(c0=V.onBlur)==null||c0.call(V,M0)}})),[p0,b0,Q,u,e0,o,a0,L0,V,R==null?void 0:R.source,O]),h0=e.useMemo(()=>({slots:Array.from({length:o}).map((M0,c0)=>{let Q0=A0&&L0!==null&&a0!==null&&(L0===a0&&c0===L0||c0>=L0&&c0<a0),f0=O[c0]!==void 0?O[c0]:null;return{char:f0,isActive:Q0,hasFakeCaret:Q0&&f0===null}}),isFocused:A0,isHovering:!V.disabled&&X}),[A0,X,o,a0,L0,V.disabled,O]),Z0=e.useMemo(()=>Z?Z(h0):e.createElement(Dc0.Provider,{value:h0},H),[H,h0,Z]);return e.createElement(e.Fragment,null,v!==null&&e.createElement("noscript",null,e.createElement("style",null,v)),e.createElement("div",{ref:Y,"data-input-otp-container":!0,style:s0,className:f},Z0,e.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},m0)))});zc0.displayName="Input";function Td(t,a){try{t.insertRule(a)}catch{console.error("input-otp could not insert CSS rule:",a)}}var xR0=`
284
284
  [data-input-otp] {
285
285
  --nojs-bg: white !important;
286
286
  --nojs-fg: black !important;