react-lib-tools 0.0.38 → 0.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CommonQuestionsRoute-Bi0vu3D0.cjs → CommonQuestionsRoute-DKgVI5bf.cjs} +2 -2
- package/dist/{CommonQuestionsRoute-Bi0vu3D0.cjs.map → CommonQuestionsRoute-DKgVI5bf.cjs.map} +1 -1
- package/dist/{CommonQuestionsRoute-BtHS1T3T.js → CommonQuestionsRoute-XeGPl1Yz.js} +2 -2
- package/dist/{CommonQuestionsRoute-BtHS1T3T.js.map → CommonQuestionsRoute-XeGPl1Yz.js.map} +1 -1
- package/dist/{GettingStartedRoute-vgWrIv_N.js → GettingStartedRoute-B1_jfqKR.js} +2 -2
- package/dist/{GettingStartedRoute-vgWrIv_N.js.map → GettingStartedRoute-B1_jfqKR.js.map} +1 -1
- package/dist/{GettingStartedRoute-Dh1xOg49.cjs → GettingStartedRoute-Dj9vAFwF.cjs} +2 -2
- package/dist/{GettingStartedRoute-Dh1xOg49.cjs.map → GettingStartedRoute-Dj9vAFwF.cjs.map} +1 -1
- package/dist/{PageNotFound-C293MV0R.js → PageNotFound-BcpV_MGp.js} +2 -2
- package/dist/{PageNotFound-C293MV0R.js.map → PageNotFound-BcpV_MGp.js.map} +1 -1
- package/dist/{PageNotFound-bzcasFul.cjs → PageNotFound-pPQgf0wT.cjs} +2 -2
- package/dist/{PageNotFound-bzcasFul.cjs.map → PageNotFound-pPQgf0wT.cjs.map} +1 -1
- package/dist/{SupportRoute-BxMpPywd.cjs → SupportRoute-BbSurNA_.cjs} +2 -2
- package/dist/{SupportRoute-BxMpPywd.cjs.map → SupportRoute-BbSurNA_.cjs.map} +1 -1
- package/dist/{SupportRoute-st_mJ-Mf.js → SupportRoute-CxxAV1Mo.js} +2 -2
- package/dist/{SupportRoute-st_mJ-Mf.js.map → SupportRoute-CxxAV1Mo.js.map} +1 -1
- package/dist/{VersionsRoute-CVwjE2Vw.js → VersionsRoute-CeLRC38k.js} +2 -2
- package/dist/{VersionsRoute-CVwjE2Vw.js.map → VersionsRoute-CeLRC38k.js.map} +1 -1
- package/dist/{VersionsRoute-0EYAk1l2.cjs → VersionsRoute-DpDr0_Rf.cjs} +2 -2
- package/dist/{VersionsRoute-0EYAk1l2.cjs.map → VersionsRoute-DpDr0_Rf.cjs.map} +1 -1
- package/dist/{index-zTJyJcqQ.js → index-5mMRCwy2.js} +1328 -1289
- package/dist/{index-zTJyJcqQ.js.map → index-5mMRCwy2.js.map} +1 -1
- package/dist/{index-B187mzi5.cjs → index-BWhTJgvX.cjs} +5 -5
- package/dist/{index-B187mzi5.cjs.map → index-BWhTJgvX.cjs.map} +1 -1
- package/dist/react-lib-tools.cjs +1 -1
- package/dist/react-lib-tools.d.ts +2 -1
- package/dist/react-lib-tools.js +1 -1
- package/package.json +2 -1
- package/scripts/compile-search-index.ts +13 -0
- package/scripts/utils/search/crawlPage.ts +22 -10
- package/styles.css +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use client";"use strict";const E=require("react/jsx-runtime"),p=require("react"),Ye=require("react-dom");function xi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const m=xi(p),an=xi(Ye);function Fl({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M15.312 11.424a5.5 5.5 0 0 1-9.201 2.466l-.312-.311h2.433a.75.75 0 0 0 0-1.5H3.989a.75.75 0 0 0-.75.75v4.242a.75.75 0 0 0 1.5 0v-2.43l.31.31a7 7 0 0 0 11.712-3.138.75.75 0 0 0-1.449-.39Zm1.23-3.723a.75.75 0 0 0 .219-.53V2.929a.75.75 0 0 0-1.5 0V5.36l-.31-.31A7 7 0 0 0 3.239 8.188a.75.75 0 1 0 1.448.389A5.5 5.5 0 0 1 13.89 6.11l.311.31h-2.432a.75.75 0 0 0 0 1.5h4.243a.75.75 0 0 0 .53-.219Z",clipRule:"evenodd"}))}const Nl=m.forwardRef(Fl);function Il({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M4.25 5.5a.75.75 0 0 0-.75.75v8.5c0 .414.336.75.75.75h8.5a.75.75 0 0 0 .75-.75v-4a.75.75 0 0 1 1.5 0v4A2.25 2.25 0 0 1 12.75 17h-8.5A2.25 2.25 0 0 1 2 14.75v-8.5A2.25 2.25 0 0 1 4.25 4h5a.75.75 0 0 1 0 1.5h-5Z",clipRule:"evenodd"}),m.createElement("path",{fillRule:"evenodd",d:"M6.194 12.753a.75.75 0 0 0 1.06.053L16.5 4.44v2.81a.75.75 0 0 0 1.5 0v-4.5a.75.75 0 0 0-.75-.75h-4.5a.75.75 0 0 0 0 1.5h2.553l-9.056 8.194a.75.75 0 0 0-.053 1.06Z",clipRule:"evenodd"}))}const Dl=m.forwardRef(Il);function jl({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M2 3.75A.75.75 0 0 1 2.75 3h14.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 3.75Zm0 4.167a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Zm0 4.166a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Zm0 4.167a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd"}))}const _l=m.forwardRef(jl);function Bl({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const Hl=m.forwardRef(Bl);function Vl({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const kr=m.forwardRef(Vl);function Wl({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z",clipRule:"evenodd"}))}const zl=m.forwardRef(Wl);function Ul({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const ql=m.forwardRef(Ul);function Gl({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"}))}const Kl=m.forwardRef(Gl);function Yl({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M9 3.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11ZM2 9a7 7 0 1 1 12.452 4.391l3.328 3.329a.75.75 0 1 1-1.06 1.06l-3.329-3.328A7 7 0 0 1 2 9Z",clipRule:"evenodd"}))}const wi=m.forwardRef(Yl);function Xl({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"}))}const Zl=m.forwardRef(Xl);var mo="popstate";function Jl(e={}){function t(r,o){let{pathname:i,search:s,hash:l}=r.location;return sr("",{pathname:i,search:s,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:Tt(o)}return ea(t,n,null,e)}function Z(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ce(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ql(){return Math.random().toString(36).substring(2,10)}function po(e,t){return{usr:e.state,key:e.key,idx:t}}function sr(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ht(t):t,state:n,key:t&&t.key||r||Ql()}}function Tt({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function ht(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ea(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,l="POP",a=null,c=u();c==null&&(c=0,s.replaceState({...s.state,idx:c},""));function u(){return(s.state||{idx:null}).idx}function f(){l="POP";let b=u(),x=b==null?null:b-c;c=b,a&&a({action:l,location:v.location,delta:x})}function h(b,x){l="PUSH";let y=sr(v.location,b,x);c=u()+1;let w=po(y,c),S=v.createHref(y);try{s.pushState(w,"",S)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;o.location.assign(S)}i&&a&&a({action:l,location:v.location,delta:1})}function d(b,x){l="REPLACE";let y=sr(v.location,b,x);c=u();let w=po(y,c),S=v.createHref(y);s.replaceState(w,"",S),i&&a&&a({action:l,location:v.location,delta:0})}function g(b){return ta(b)}let v={get action(){return l},get location(){return e(o,s)},listen(b){if(a)throw new Error("A history only accepts one active listener");return o.addEventListener(mo,f),a=b,()=>{o.removeEventListener(mo,f),a=null}},createHref(b){return t(o,b)},createURL:g,encodeLocation(b){let x=g(b);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:h,replace:d,go(b){return s.go(b)}};return v}function ta(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Z(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Tt(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function yi(e,t,n="/"){return na(e,t,n,!1)}function na(e,t,n,r){let o=typeof t=="string"?ht(t):t,i=De(o.pathname||"/",n);if(i==null)return null;let s=Ei(e);ra(s);let l=null;for(let a=0;l==null&&a<s.length;++a){let c=Ri(i);l=fa(s[a],c,r)}return l}function Ei(e,t=[],n=[],r="",o=!1){let i=(s,l,a=o,c)=>{let u={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:l,route:s};if(u.relativePath.startsWith("/")){if(!u.relativePath.startsWith(r)&&a)return;Z(u.relativePath.startsWith(r),`Absolute route path "${u.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(r.length)}let f=Fe([r,u.relativePath]),h=n.concat(u);s.children&&s.children.length>0&&(Z(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),Ei(s.children,t,h,f,a)),!(s.path==null&&!s.index)&&t.push({path:f,score:ua(f,s.index),routesMeta:h})};return e.forEach((s,l)=>{if(s.path===""||!s.path?.includes("?"))i(s,l);else for(let a of Ci(s.path))i(s,l,!0,a)}),t}function Ci(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=Ci(r.join("/")),l=[];return l.push(...s.map(a=>a===""?i:[i,a].join("/"))),o&&l.push(...s),l.map(a=>e.startsWith("/")&&a===""?"/":a)}function ra(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:da(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var oa=/^:[\w-]+$/,ia=3,sa=2,la=1,aa=10,ca=-2,ho=e=>e==="*";function ua(e,t){let n=e.split("/"),r=n.length;return n.some(ho)&&(r+=ca),t&&(r+=sa),n.filter(o=>!ho(o)).reduce((o,i)=>o+(oa.test(i)?ia:i===""?la:aa),r)}function da(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function fa(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",s=[];for(let l=0;l<r.length;++l){let a=r[l],c=l===r.length-1,u=i==="/"?t:t.slice(i.length)||"/",f=Ot({path:a.relativePath,caseSensitive:a.caseSensitive,end:c},u),h=a.route;if(!f&&c&&n&&!r[r.length-1].route.index&&(f=Ot({path:a.relativePath,caseSensitive:a.caseSensitive,end:!1},u)),!f)return null;Object.assign(o,f.params),s.push({params:o,pathname:Fe([i,f.pathname]),pathnameBase:ba(Fe([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=Fe([i,f.pathnameBase]))}return s}function Ot(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ma(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],s=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce((c,{paramName:u,isOptional:f},h)=>{if(u==="*"){let g=l[h]||"";s=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const d=l[h];return f&&!d?c[u]=void 0:c[u]=(d||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:s,pattern:e}}function ma(e,t=!1,n=!0){Ce(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,a)=>(r.push({paramName:l,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function Ri(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ce(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function De(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var pa=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ha=e=>pa.test(e);function ga(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?ht(e):e,i;if(n)if(ha(n))i=n;else{if(n.includes("//")){let s=n;n=n.replace(/\/\/+/g,"/"),Ce(!1,`Pathnames cannot have embedded double slashes - normalizing ${s} -> ${n}`)}n.startsWith("/")?i=go(n.substring(1),"/"):i=go(n,t)}else i=t;return{pathname:i,search:xa(r),hash:wa(o)}}function go(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Nn(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function va(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Si(e){let t=va(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function $i(e,t,n,r=!1){let o;typeof e=="string"?o=ht(e):(o={...e},Z(!o.pathname||!o.pathname.includes("?"),Nn("?","pathname","search",o)),Z(!o.pathname||!o.pathname.includes("#"),Nn("#","pathname","hash",o)),Z(!o.search||!o.search.includes("#"),Nn("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,l;if(s==null)l=n;else{let f=t.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),f-=1;o.pathname=h.join("/")}l=f>=0?t[f]:"/"}let a=ga(o,l),c=s&&s!=="/"&&s.endsWith("/"),u=(i||s===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(c||u)&&(a.pathname+="/"),a}var Fe=e=>e.join("/").replace(/\/\/+/g,"/"),ba=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),xa=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,wa=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function ya(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Ea(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var ki=["POST","PUT","PATCH","DELETE"];new Set(ki);var Ca=["GET",...ki];new Set(Ca);var gt=m.createContext(null);gt.displayName="DataRouter";var vn=m.createContext(null);vn.displayName="DataRouterState";m.createContext(!1);var Pi=m.createContext({isTransitioning:!1});Pi.displayName="ViewTransition";var Ra=m.createContext(new Map);Ra.displayName="Fetchers";var Sa=m.createContext(null);Sa.displayName="Await";var Re=m.createContext(null);Re.displayName="Navigation";var Nt=m.createContext(null);Nt.displayName="Location";var _e=m.createContext({outlet:null,matches:[],isDataRoute:!1});_e.displayName="Route";var Pr=m.createContext(null);Pr.displayName="RouteError";function $a(e,{relative:t}={}){Z(vt(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=m.useContext(Re),{hash:o,pathname:i,search:s}=It(e,{relative:t}),l=i;return n!=="/"&&(l=i==="/"?n:Fe([n,i])),r.createHref({pathname:l,search:s,hash:o})}function vt(){return m.useContext(Nt)!=null}function Be(){return Z(vt(),"useLocation() may be used only in the context of a <Router> component."),m.useContext(Nt).location}function ka(e){Z(vt(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=Be();return m.useMemo(()=>Ot(e,Ri(t)),[t,e])}var Ti="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Oi(e){m.useContext(Re).static||m.useLayoutEffect(e)}function Li(){let{isDataRoute:e}=m.useContext(_e);return e?Ba():Pa()}function Pa(){Z(vt(),"useNavigate() may be used only in the context of a <Router> component.");let e=m.useContext(gt),{basename:t,navigator:n}=m.useContext(Re),{matches:r}=m.useContext(_e),{pathname:o}=Be(),i=JSON.stringify(Si(r)),s=m.useRef(!1);return Oi(()=>{s.current=!0}),m.useCallback((a,c={})=>{if(Ce(s.current,Ti),!s.current)return;if(typeof a=="number"){n.go(a);return}let u=$i(a,JSON.parse(i),o,c.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:Fe([t,u.pathname])),(c.replace?n.replace:n.push)(u,c.state,c)},[t,n,i,o,e])}m.createContext(null);function It(e,{relative:t}={}){let{matches:n}=m.useContext(_e),{pathname:r}=Be(),o=JSON.stringify(Si(n));return m.useMemo(()=>$i(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function Ta(e,t){return Mi(e,t)}function Mi(e,t,n,r,o){Z(vt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=m.useContext(Re),{matches:s}=m.useContext(_e),l=s[s.length-1],a=l?l.params:{},c=l?l.pathname:"/",u=l?l.pathnameBase:"/",f=l&&l.route;{let y=f&&f.path||"";Ai(c,!f||y.endsWith("*")||y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${y}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
1
|
+
"use client";"use strict";const E=require("react/jsx-runtime"),p=require("react"),Ye=require("react-dom");function wi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const m=wi(p),an=wi(Ye);function Nl({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M15.312 11.424a5.5 5.5 0 0 1-9.201 2.466l-.312-.311h2.433a.75.75 0 0 0 0-1.5H3.989a.75.75 0 0 0-.75.75v4.242a.75.75 0 0 0 1.5 0v-2.43l.31.31a7 7 0 0 0 11.712-3.138.75.75 0 0 0-1.449-.39Zm1.23-3.723a.75.75 0 0 0 .219-.53V2.929a.75.75 0 0 0-1.5 0V5.36l-.31-.31A7 7 0 0 0 3.239 8.188a.75.75 0 1 0 1.448.389A5.5 5.5 0 0 1 13.89 6.11l.311.31h-2.432a.75.75 0 0 0 0 1.5h4.243a.75.75 0 0 0 .53-.219Z",clipRule:"evenodd"}))}const Il=m.forwardRef(Nl);function Dl({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M4.25 5.5a.75.75 0 0 0-.75.75v8.5c0 .414.336.75.75.75h8.5a.75.75 0 0 0 .75-.75v-4a.75.75 0 0 1 1.5 0v4A2.25 2.25 0 0 1 12.75 17h-8.5A2.25 2.25 0 0 1 2 14.75v-8.5A2.25 2.25 0 0 1 4.25 4h5a.75.75 0 0 1 0 1.5h-5Z",clipRule:"evenodd"}),m.createElement("path",{fillRule:"evenodd",d:"M6.194 12.753a.75.75 0 0 0 1.06.053L16.5 4.44v2.81a.75.75 0 0 0 1.5 0v-4.5a.75.75 0 0 0-.75-.75h-4.5a.75.75 0 0 0 0 1.5h2.553l-9.056 8.194a.75.75 0 0 0-.053 1.06Z",clipRule:"evenodd"}))}const jl=m.forwardRef(Dl);function _l({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M2 3.75A.75.75 0 0 1 2.75 3h14.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 3.75Zm0 4.167a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Zm0 4.166a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Zm0 4.167a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd"}))}const Bl=m.forwardRef(_l);function Hl({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const Vl=m.forwardRef(Hl);function Wl({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const $r=m.forwardRef(Wl);function zl({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z",clipRule:"evenodd"}))}const Ul=m.forwardRef(zl);function ql({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const Gl=m.forwardRef(ql);function Kl({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"}))}const Yl=m.forwardRef(Kl);function Xl({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M9 3.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11ZM2 9a7 7 0 1 1 12.452 4.391l3.328 3.329a.75.75 0 1 1-1.06 1.06l-3.329-3.328A7 7 0 0 1 2 9Z",clipRule:"evenodd"}))}const yi=m.forwardRef(Xl);function Zl({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"}))}const Jl=m.forwardRef(Zl);var mo="popstate";function Ql(e={}){function t(r,o){let{pathname:i,search:s,hash:l}=r.location;return sr("",{pathname:i,search:s,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:Tt(o)}return ta(t,n,null,e)}function Z(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ce(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ea(){return Math.random().toString(36).substring(2,10)}function po(e,t){return{usr:e.state,key:e.key,idx:t}}function sr(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ht(t):t,state:n,key:t&&t.key||r||ea()}}function Tt({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function ht(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ta(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,l="POP",a=null,c=u();c==null&&(c=0,s.replaceState({...s.state,idx:c},""));function u(){return(s.state||{idx:null}).idx}function f(){l="POP";let b=u(),x=b==null?null:b-c;c=b,a&&a({action:l,location:v.location,delta:x})}function h(b,x){l="PUSH";let y=sr(v.location,b,x);c=u()+1;let w=po(y,c),S=v.createHref(y);try{s.pushState(w,"",S)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;o.location.assign(S)}i&&a&&a({action:l,location:v.location,delta:1})}function d(b,x){l="REPLACE";let y=sr(v.location,b,x);c=u();let w=po(y,c),S=v.createHref(y);s.replaceState(w,"",S),i&&a&&a({action:l,location:v.location,delta:0})}function g(b){return na(b)}let v={get action(){return l},get location(){return e(o,s)},listen(b){if(a)throw new Error("A history only accepts one active listener");return o.addEventListener(mo,f),a=b,()=>{o.removeEventListener(mo,f),a=null}},createHref(b){return t(o,b)},createURL:g,encodeLocation(b){let x=g(b);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:h,replace:d,go(b){return s.go(b)}};return v}function na(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Z(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Tt(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function Ei(e,t,n="/"){return ra(e,t,n,!1)}function ra(e,t,n,r){let o=typeof t=="string"?ht(t):t,i=De(o.pathname||"/",n);if(i==null)return null;let s=Ci(e);oa(s);let l=null;for(let a=0;l==null&&a<s.length;++a){let c=Si(i);l=ma(s[a],c,r)}return l}function Ci(e,t=[],n=[],r="",o=!1){let i=(s,l,a=o,c)=>{let u={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:l,route:s};if(u.relativePath.startsWith("/")){if(!u.relativePath.startsWith(r)&&a)return;Z(u.relativePath.startsWith(r),`Absolute route path "${u.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(r.length)}let f=Fe([r,u.relativePath]),h=n.concat(u);s.children&&s.children.length>0&&(Z(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),Ci(s.children,t,h,f,a)),!(s.path==null&&!s.index)&&t.push({path:f,score:da(f,s.index),routesMeta:h})};return e.forEach((s,l)=>{if(s.path===""||!s.path?.includes("?"))i(s,l);else for(let a of Ri(s.path))i(s,l,!0,a)}),t}function Ri(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=Ri(r.join("/")),l=[];return l.push(...s.map(a=>a===""?i:[i,a].join("/"))),o&&l.push(...s),l.map(a=>e.startsWith("/")&&a===""?"/":a)}function oa(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:fa(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var ia=/^:[\w-]+$/,sa=3,la=2,aa=1,ca=10,ua=-2,ho=e=>e==="*";function da(e,t){let n=e.split("/"),r=n.length;return n.some(ho)&&(r+=ua),t&&(r+=la),n.filter(o=>!ho(o)).reduce((o,i)=>o+(ia.test(i)?sa:i===""?aa:ca),r)}function fa(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function ma(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",s=[];for(let l=0;l<r.length;++l){let a=r[l],c=l===r.length-1,u=i==="/"?t:t.slice(i.length)||"/",f=Ot({path:a.relativePath,caseSensitive:a.caseSensitive,end:c},u),h=a.route;if(!f&&c&&n&&!r[r.length-1].route.index&&(f=Ot({path:a.relativePath,caseSensitive:a.caseSensitive,end:!1},u)),!f)return null;Object.assign(o,f.params),s.push({params:o,pathname:Fe([i,f.pathname]),pathnameBase:xa(Fe([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=Fe([i,f.pathnameBase]))}return s}function Ot(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=pa(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],s=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce((c,{paramName:u,isOptional:f},h)=>{if(u==="*"){let g=l[h]||"";s=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const d=l[h];return f&&!d?c[u]=void 0:c[u]=(d||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:s,pattern:e}}function pa(e,t=!1,n=!0){Ce(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,a)=>(r.push({paramName:l,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function Si(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ce(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function De(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var ha=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ga=e=>ha.test(e);function va(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?ht(e):e,i;if(n)if(ga(n))i=n;else{if(n.includes("//")){let s=n;n=n.replace(/\/\/+/g,"/"),Ce(!1,`Pathnames cannot have embedded double slashes - normalizing ${s} -> ${n}`)}n.startsWith("/")?i=go(n.substring(1),"/"):i=go(n,t)}else i=t;return{pathname:i,search:wa(r),hash:ya(o)}}function go(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Nn(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ba(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function ki(e){let t=ba(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function $i(e,t,n,r=!1){let o;typeof e=="string"?o=ht(e):(o={...e},Z(!o.pathname||!o.pathname.includes("?"),Nn("?","pathname","search",o)),Z(!o.pathname||!o.pathname.includes("#"),Nn("#","pathname","hash",o)),Z(!o.search||!o.search.includes("#"),Nn("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,l;if(s==null)l=n;else{let f=t.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),f-=1;o.pathname=h.join("/")}l=f>=0?t[f]:"/"}let a=va(o,l),c=s&&s!=="/"&&s.endsWith("/"),u=(i||s===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(c||u)&&(a.pathname+="/"),a}var Fe=e=>e.join("/").replace(/\/\/+/g,"/"),xa=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),wa=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ya=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Ea(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Ca(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Pi=["POST","PUT","PATCH","DELETE"];new Set(Pi);var Ra=["GET",...Pi];new Set(Ra);var gt=m.createContext(null);gt.displayName="DataRouter";var vn=m.createContext(null);vn.displayName="DataRouterState";m.createContext(!1);var Ti=m.createContext({isTransitioning:!1});Ti.displayName="ViewTransition";var Sa=m.createContext(new Map);Sa.displayName="Fetchers";var ka=m.createContext(null);ka.displayName="Await";var Re=m.createContext(null);Re.displayName="Navigation";var Nt=m.createContext(null);Nt.displayName="Location";var _e=m.createContext({outlet:null,matches:[],isDataRoute:!1});_e.displayName="Route";var Pr=m.createContext(null);Pr.displayName="RouteError";function $a(e,{relative:t}={}){Z(vt(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=m.useContext(Re),{hash:o,pathname:i,search:s}=It(e,{relative:t}),l=i;return n!=="/"&&(l=i==="/"?n:Fe([n,i])),r.createHref({pathname:l,search:s,hash:o})}function vt(){return m.useContext(Nt)!=null}function Be(){return Z(vt(),"useLocation() may be used only in the context of a <Router> component."),m.useContext(Nt).location}function Pa(e){Z(vt(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=Be();return m.useMemo(()=>Ot(e,Si(t)),[t,e])}var Oi="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Li(e){m.useContext(Re).static||m.useLayoutEffect(e)}function Mi(){let{isDataRoute:e}=m.useContext(_e);return e?Ha():Ta()}function Ta(){Z(vt(),"useNavigate() may be used only in the context of a <Router> component.");let e=m.useContext(gt),{basename:t,navigator:n}=m.useContext(Re),{matches:r}=m.useContext(_e),{pathname:o}=Be(),i=JSON.stringify(ki(r)),s=m.useRef(!1);return Li(()=>{s.current=!0}),m.useCallback((a,c={})=>{if(Ce(s.current,Oi),!s.current)return;if(typeof a=="number"){n.go(a);return}let u=$i(a,JSON.parse(i),o,c.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:Fe([t,u.pathname])),(c.replace?n.replace:n.push)(u,c.state,c)},[t,n,i,o,e])}m.createContext(null);function It(e,{relative:t}={}){let{matches:n}=m.useContext(_e),{pathname:r}=Be(),o=JSON.stringify(ki(n));return m.useMemo(()=>$i(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function Oa(e,t){return Ai(e,t)}function Ai(e,t,n,r,o){Z(vt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=m.useContext(Re),{matches:s}=m.useContext(_e),l=s[s.length-1],a=l?l.params:{},c=l?l.pathname:"/",u=l?l.pathnameBase:"/",f=l&&l.route;{let y=f&&f.path||"";Fi(c,!f||y.endsWith("*")||y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${y}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
2
2
|
|
|
3
|
-
Please change the parent <Route path="${y}"> to <Route path="${y==="/"?"*":`${y}/*`}">.`)}let h=Be(),d;if(t){let y=typeof t=="string"?ht(t):t;Z(u==="/"||y.pathname?.startsWith(u),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${y.pathname}" was given in the \`location\` prop.`),d=y}else d=h;let g=d.pathname||"/",v=g;if(u!=="/"){let y=u.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(y.length).join("/")}let b=yi(e,{pathname:v});Ce(f||b!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Ce(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.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.`);let x=Fa(b&&b.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:Fe([u,i.encodeLocation?i.encodeLocation(y.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?u:Fe([u,i.encodeLocation?i.encodeLocation(y.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathnameBase])})),s,n,r,o);return t&&x?m.createElement(Nt.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...d},navigationType:"POP"}},x):x}function Oa(){let e=_a(),t=ya(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=m.createElement(m.Fragment,null,m.createElement("p",null,"💿 Hey developer 👋"),m.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",m.createElement("code",{style:i},"ErrorBoundary")," or"," ",m.createElement("code",{style:i},"errorElement")," prop on your route.")),m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),n?m.createElement("pre",{style:o},n):null,s)}var La=m.createElement(Oa,null),Ma=class extends m.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?m.createElement(_e.Provider,{value:this.props.routeContext},m.createElement(Pr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Aa({routeContext:e,match:t,children:n}){let r=m.useContext(gt);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),m.createElement(_e.Provider,{value:e},n)}function Fa(e,t=[],n=null,r=null,o=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,s=n?.errors;if(s!=null){let u=i.findIndex(f=>f.route.id&&s?.[f.route.id]!==void 0);Z(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),i=i.slice(0,Math.min(i.length,u+1))}let l=!1,a=-1;if(n)for(let u=0;u<i.length;u++){let f=i[u];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(a=u),f.route.id){let{loaderData:h,errors:d}=n,g=f.route.loader&&!h.hasOwnProperty(f.route.id)&&(!d||d[f.route.id]===void 0);if(f.route.lazy||g){l=!0,a>=0?i=i.slice(0,a+1):i=[i[0]];break}}}let c=n&&r?(u,f)=>{r(u,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Ea(n.matches),errorInfo:f})}:void 0;return i.reduceRight((u,f,h)=>{let d,g=!1,v=null,b=null;n&&(d=s&&f.route.id?s[f.route.id]:void 0,v=f.route.errorElement||La,l&&(a<0&&h===0?(Ai("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,b=null):a===h&&(g=!0,b=f.route.hydrateFallbackElement||null)));let x=t.concat(i.slice(0,h+1)),y=()=>{let w;return d?w=v:g?w=b:f.route.Component?w=m.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=u,m.createElement(Aa,{match:f,routeContext:{outlet:u,matches:x,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?m.createElement(Ma,{location:n.location,revalidation:n.revalidation,component:v,error:d,children:y(),routeContext:{outlet:null,matches:x,isDataRoute:!0},onError:c}):y()},null)}function Tr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Na(e){let t=m.useContext(gt);return Z(t,Tr(e)),t}function Ia(e){let t=m.useContext(vn);return Z(t,Tr(e)),t}function Da(e){let t=m.useContext(_e);return Z(t,Tr(e)),t}function Or(e){let t=Da(e),n=t.matches[t.matches.length-1];return Z(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function ja(){return Or("useRouteId")}function _a(){let e=m.useContext(Pr),t=Ia("useRouteError"),n=Or("useRouteError");return e!==void 0?e:t.errors?.[n]}function Ba(){let{router:e}=Na("useNavigate"),t=Or("useNavigate"),n=m.useRef(!1);return Oi(()=>{n.current=!0}),m.useCallback(async(o,i={})=>{Ce(n.current,Ti),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var vo={};function Ai(e,t,n){!t&&!vo[e]&&(vo[e]=!0,Ce(!1,n))}m.memo(Ha);function Ha({routes:e,future:t,state:n,unstable_onError:r}){return Mi(e,void 0,n,r,t)}function Fi(e){Z(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Va({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:i=!1,unstable_useTransitions:s}){Z(!vt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),a=m.useMemo(()=>({basename:l,navigator:o,static:i,unstable_useTransitions:s,future:{}}),[l,o,i,s]);typeof n=="string"&&(n=ht(n));let{pathname:c="/",search:u="",hash:f="",state:h=null,key:d="default"}=n,g=m.useMemo(()=>{let v=De(c,l);return v==null?null:{location:{pathname:v,search:u,hash:f,state:h,key:d},navigationType:r}},[l,c,u,f,h,d,r]);return Ce(g!=null,`<Router basename="${l}"> is not able to match the URL "${c}${u}${f}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:m.createElement(Re.Provider,{value:a},m.createElement(Nt.Provider,{children:t,value:g}))}function Wa({children:e,location:t}){return Ta(lr(e),t)}function lr(e,t=[]){let n=[];return m.Children.forEach(e,(r,o)=>{if(!m.isValidElement(r))return;let i=[...t,o];if(r.type===m.Fragment){n.push.apply(n,lr(r.props.children,i));return}Z(r.type===Fi,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Z(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=lr(r.props.children,i)),n.push(s)}),n}var tn="get",nn="application/x-www-form-urlencoded";function bn(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function za(e){return bn(e)&&e.tagName.toLowerCase()==="button"}function Ua(e){return bn(e)&&e.tagName.toLowerCase()==="form"}function qa(e){return bn(e)&&e.tagName.toLowerCase()==="input"}function Ga(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ka(e,t){return e.button===0&&(!t||t==="_self")&&!Ga(e)}var Ut=null;function Ya(){if(Ut===null)try{new FormData(document.createElement("form"),0),Ut=!1}catch{Ut=!0}return Ut}var Xa=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function In(e){return e!=null&&!Xa.has(e)?(Ce(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${nn}"`),null):e}function Za(e,t){let n,r,o,i,s;if(Ua(e)){let l=e.getAttribute("action");r=l?De(l,t):null,n=e.getAttribute("method")||tn,o=In(e.getAttribute("enctype"))||nn,i=new FormData(e)}else if(za(e)||qa(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let a=e.getAttribute("formaction")||l.getAttribute("action");if(r=a?De(a,t):null,n=e.getAttribute("formmethod")||l.getAttribute("method")||tn,o=In(e.getAttribute("formenctype"))||In(l.getAttribute("enctype"))||nn,i=new FormData(l,e),!Ya()){let{name:c,type:u,value:f}=e;if(u==="image"){let h=c?`${c}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else c&&i.append(c,f)}}else{if(bn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=tn,r=null,o=nn,s=e}return i&&o==="text/plain"&&(s=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Lr(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ja(e,t,n){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname=`_root.${n}`:t&&De(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${n}`,r}async function Qa(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ec(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function tc(e,t,n){let r=await Promise.all(e.map(async o=>{let i=t.routes[o.route.id];if(i){let s=await Qa(i,n);return s.links?s.links():[]}return[]}));return ic(r.flat(1).filter(ec).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function bo(e,t,n,r,o,i){let s=(a,c)=>n[c]?a.route.id!==n[c].route.id:!0,l=(a,c)=>n[c].pathname!==a.pathname||n[c].route.path?.endsWith("*")&&n[c].params["*"]!==a.params["*"];return i==="assets"?t.filter((a,c)=>s(a,c)||l(a,c)):i==="data"?t.filter((a,c)=>{let u=r.routes[a.route.id];if(!u||!u.hasLoader)return!1;if(s(a,c)||l(a,c))return!0;if(a.route.shouldRevalidate){let f=a.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:a.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function nc(e,t,{includeHydrateFallback:n}={}){return rc(e.map(r=>{let o=t.routes[r.route.id];if(!o)return[];let i=[o.module];return o.clientActionModule&&(i=i.concat(o.clientActionModule)),o.clientLoaderModule&&(i=i.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(i=i.concat(o.hydrateFallbackModule)),o.imports&&(i=i.concat(o.imports)),i}).flat(1))}function rc(e){return[...new Set(e)]}function oc(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function ic(e,t){let n=new Set;return new Set(t),e.reduce((r,o)=>{let i=JSON.stringify(oc(o));return n.has(i)||(n.add(i),r.push({key:i,link:o})),r},[])}function Ni(){let e=m.useContext(gt);return Lr(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function sc(){let e=m.useContext(vn);return Lr(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Mr=m.createContext(void 0);Mr.displayName="FrameworkContext";function Ii(){let e=m.useContext(Mr);return Lr(e,"You must render this element inside a <HydratedRouter> element"),e}function lc(e,t){let n=m.useContext(Mr),[r,o]=m.useState(!1),[i,s]=m.useState(!1),{onFocus:l,onBlur:a,onMouseEnter:c,onMouseLeave:u,onTouchStart:f}=t,h=m.useRef(null);m.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let v=x=>{x.forEach(y=>{s(y.isIntersecting)})},b=new IntersectionObserver(v,{threshold:.5});return h.current&&b.observe(h.current),()=>{b.disconnect()}}},[e]),m.useEffect(()=>{if(r){let v=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(v)}}},[r]);let d=()=>{o(!0)},g=()=>{o(!1),s(!1)};return n?e!=="intent"?[i,h,{}]:[i,h,{onFocus:Ct(l,d),onBlur:Ct(a,g),onMouseEnter:Ct(c,d),onMouseLeave:Ct(u,g),onTouchStart:Ct(f,d)}]:[!1,h,{}]}function Ct(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function ac({page:e,...t}){let{router:n}=Ni(),r=m.useMemo(()=>yi(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?m.createElement(uc,{page:e,matches:r,...t}):null}function cc(e){let{manifest:t,routeModules:n}=Ii(),[r,o]=m.useState([]);return m.useEffect(()=>{let i=!1;return tc(e,t,n).then(s=>{i||o(s)}),()=>{i=!0}},[e,t,n]),r}function uc({page:e,matches:t,...n}){let r=Be(),{manifest:o,routeModules:i}=Ii(),{basename:s}=Ni(),{loaderData:l,matches:a}=sc(),c=m.useMemo(()=>bo(e,t,a,o,r,"data"),[e,t,a,o,r]),u=m.useMemo(()=>bo(e,t,a,o,r,"assets"),[e,t,a,o,r]),f=m.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let g=new Set,v=!1;if(t.forEach(x=>{let y=o.routes[x.route.id];!y||!y.hasLoader||(!c.some(w=>w.route.id===x.route.id)&&x.route.id in l&&i[x.route.id]?.shouldRevalidate||y.hasClientLoader?v=!0:g.add(x.route.id))}),g.size===0)return[];let b=Ja(e,s,"data");return v&&g.size>0&&b.searchParams.set("_routes",t.filter(x=>g.has(x.route.id)).map(x=>x.route.id).join(",")),[b.pathname+b.search]},[s,l,r,o,c,t,e,i]),h=m.useMemo(()=>nc(u,o),[u,o]),d=cc(u);return m.createElement(m.Fragment,null,f.map(g=>m.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...n})),h.map(g=>m.createElement("link",{key:g,rel:"modulepreload",href:g,...n})),d.map(({key:g,link:v})=>m.createElement("link",{key:g,nonce:n.nonce,...v})))}function dc(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var Di=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Di&&(window.__reactRouterVersion="7.10.1")}catch{}function fc({basename:e,children:t,unstable_useTransitions:n,window:r}){let o=m.useRef();o.current==null&&(o.current=Jl({window:r,v5Compat:!0}));let i=o.current,[s,l]=m.useState({action:i.action,location:i.location}),a=m.useCallback(c=>{n===!1?l(c):m.startTransition(()=>l(c))},[n]);return m.useLayoutEffect(()=>i.listen(a),[i,a]),m.createElement(Va,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i,unstable_useTransitions:n===!0})}var ji=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_i=m.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:i,replace:s,state:l,target:a,to:c,preventScrollReset:u,viewTransition:f,...h},d){let{basename:g,unstable_useTransitions:v}=m.useContext(Re),b=typeof c=="string"&&ji.test(c),x,y=!1;if(typeof c=="string"&&b&&(x=c,Di))try{let $=new URL(window.location.href),D=c.startsWith("//")?new URL($.protocol+c):new URL(c),W=De(D.pathname,g);D.origin===$.origin&&W!=null?c=W+D.search+D.hash:y=!0}catch{Ce(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let w=$a(c,{relative:o}),[S,R,P]=lc(r,h),T=gc(c,{replace:s,state:l,target:a,preventScrollReset:u,relative:o,viewTransition:f,unstable_useTransitions:v});function k($){t&&t($),$.defaultPrevented||T($)}let F=m.createElement("a",{...h,...P,href:x||w,onClick:y||i?t:k,ref:dc(d,R),target:a,"data-discover":!b&&n==="render"?"true":void 0});return S&&!b?m.createElement(m.Fragment,null,F,m.createElement(ac,{page:w})):F});_i.displayName="Link";var mc=m.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:i,to:s,viewTransition:l,children:a,...c},u){let f=It(s,{relative:c.relative}),h=Be(),d=m.useContext(vn),{navigator:g,basename:v}=m.useContext(Re),b=d!=null&&yc(f)&&l===!0,x=g.encodeLocation?g.encodeLocation(f).pathname:f.pathname,y=h.pathname,w=d&&d.navigation&&d.navigation.location?d.navigation.location.pathname:null;n||(y=y.toLowerCase(),w=w?w.toLowerCase():null,x=x.toLowerCase()),w&&v&&(w=De(w,v)||w);const S=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let R=y===x||!o&&y.startsWith(x)&&y.charAt(S)==="/",P=w!=null&&(w===x||!o&&w.startsWith(x)&&w.charAt(x.length)==="/"),T={isActive:R,isPending:P,isTransitioning:b},k=R?t:void 0,F;typeof r=="function"?F=r(T):F=[r,R?"active":null,P?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let $=typeof i=="function"?i(T):i;return m.createElement(_i,{...c,"aria-current":k,className:F,ref:u,style:$,to:s,viewTransition:l},typeof a=="function"?a(T):a)});mc.displayName="NavLink";var pc=m.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:i,method:s=tn,action:l,onSubmit:a,relative:c,preventScrollReset:u,viewTransition:f,...h},d)=>{let{unstable_useTransitions:g}=m.useContext(Re),v=xc(),b=wc(l,{relative:c}),x=s.toLowerCase()==="get"?"get":"post",y=typeof l=="string"&&ji.test(l),w=S=>{if(a&&a(S),S.defaultPrevented)return;S.preventDefault();let R=S.nativeEvent.submitter,P=R?.getAttribute("formmethod")||s,T=()=>v(R||S.currentTarget,{fetcherKey:t,method:P,navigate:n,replace:o,state:i,relative:c,preventScrollReset:u,viewTransition:f});g&&n!==!1?m.startTransition(()=>T()):T()};return m.createElement("form",{ref:d,method:x,action:b,onSubmit:r?a:w,...h,"data-discover":!y&&e==="render"?"true":void 0})});pc.displayName="Form";function hc(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Bi(e){let t=m.useContext(gt);return Z(t,hc(e)),t}function gc(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:i,viewTransition:s,unstable_useTransitions:l}={}){let a=Li(),c=Be(),u=It(e,{relative:i});return m.useCallback(f=>{if(Ka(f,t)){f.preventDefault();let h=n!==void 0?n:Tt(c)===Tt(u),d=()=>a(e,{replace:h,state:r,preventScrollReset:o,relative:i,viewTransition:s});l?m.startTransition(()=>d()):d()}},[c,a,u,n,r,t,e,o,i,s,l])}var vc=0,bc=()=>`__${String(++vc)}__`;function xc(){let{router:e}=Bi("useSubmit"),{basename:t}=m.useContext(Re),n=ja(),r=e.fetch,o=e.navigate;return m.useCallback(async(i,s={})=>{let{action:l,method:a,encType:c,formData:u,body:f}=Za(i,t);if(s.navigate===!1){let h=s.fetcherKey||bc();await r(h,n,s.action||l,{preventScrollReset:s.preventScrollReset,formData:u,body:f,formMethod:s.method||a,formEncType:s.encType||c,flushSync:s.flushSync})}else await o(s.action||l,{preventScrollReset:s.preventScrollReset,formData:u,body:f,formMethod:s.method||a,formEncType:s.encType||c,replace:s.replace,state:s.state,fromRouteId:n,flushSync:s.flushSync,viewTransition:s.viewTransition})},[r,o,t,n])}function wc(e,{relative:t}={}){let{basename:n}=m.useContext(Re),r=m.useContext(_e);Z(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),i={...It(e||".",{relative:t})},s=Be();if(e==null){i.search=s.search;let l=new URLSearchParams(i.search),a=l.getAll("index");if(a.some(u=>u==="")){l.delete("index"),a.filter(f=>f).forEach(f=>l.append("index",f));let u=l.toString();i.search=u?`?${u}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:Fe([n,i.pathname])),Tt(i)}function yc(e,{relative:t}={}){let n=m.useContext(Pi);Z(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Bi("useViewTransitionState"),o=It(e,{relative:t});if(!n.isTransitioning)return!1;let i=De(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=De(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ot(o.pathname,s)!=null||Ot(o.pathname,i)!=null}const Ec=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor",className:"bi bi-github",viewBox:"0 0 16 16",...e},m.createElement("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8"})),Cc=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 128 128",...e},m.createElement("path",{fill:"currentColor",d:"M2 38.5h124v43.71H64v7.29H36.44v-7.29H2zm6.89 36.43h13.78V53.07h6.89v21.86h6.89V45.79H8.89zm34.44-29.14v36.42h13.78v-7.28h13.78V45.79zm13.78 7.29H64v14.56h-6.89zm20.67-7.29v29.14h13.78V53.07h6.89v21.86h6.89V53.07h6.89v21.86h6.89V45.79z"})),Rc=e=>m.createElement("svg",{width:50,height:50,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},m.createElement("rect",{x:0,y:0,height:20,width:20,fill:"transparent"}),m.createElement("circle",{cx:10,cy:10,r:2,fill:"white"}),m.createElement("g",{stroke:"white",strokeWidth:2,fill:"none"},m.createElement("ellipse",{cx:10,cy:10,rx:11,ry:5,transform:"rotate(45, 10, 10)"}),m.createElement("ellipse",{cx:10,cy:10,rx:11,ry:5,transform:"rotate(-45, 10, 10)"}))),Hi=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 640 640",width:"24px",fill:"currentColor",...e},m.createElement("path",{d:"M433.2 103.1L581.4 253.4C609.1 281.5 609.1 326.5 581.4 354.6L425 512.9C415.7 522.3 400.5 522.4 391.1 513.1C381.7 503.8 381.6 488.6 390.9 479.2L547.3 320.8C556.5 311.5 556.5 296.4 547.3 287.1L399 136.9C389.7 127.5 389.8 112.3 399.2 103C408.6 93.7 423.8 93.8 433.1 103.2zM64.1 293.5L64.1 160C64.1 124.7 92.8 96 128.1 96L261.6 96C278.6 96 294.9 102.7 306.9 114.7L450.9 258.7C475.9 283.7 475.9 324.2 450.9 349.2L317.4 482.7C292.4 507.7 251.9 507.7 226.9 482.7L82.9 338.7C70.9 326.7 64.2 310.4 64.2 293.4zM208.1 208C208.1 190.3 193.8 176 176.1 176C158.4 176 144.1 190.3 144.1 208C144.1 225.7 158.4 240 176.1 240C193.8 240 208.1 225.7 208.1 208z"})),Vi=p.createContext(null);function Wi(e,t="Assertion error"){if(!e)throw Error(t)}function Dt(){const e=p.useContext(Vi);return Wi(e,"App must be rendered within a LibraryContextProvider"),e}function zi(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=zi(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Sc(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=zi(e))&&(r&&(r+=" "),r+=t);return r}const $c=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},kc=(e,t)=>({classGroupId:e,validator:t}),Ui=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),cn="-",xo=[],Pc="arbitrary..",Tc=e=>{const t=Lc(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return Oc(s);const l=s.split(cn),a=l[0]===""&&l.length>1?1:0;return qi(l,a,t)},getConflictingClassGroupIds:(s,l)=>{if(l){const a=r[s],c=n[s];return a?c?$c(c,a):a:c||xo}return n[s]||xo}}},qi=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=qi(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const l=t===0?e.join(cn):e.slice(t).join(cn),a=s.length;for(let c=0;c<a;c++){const u=s[c];if(u.validator(l))return u.classGroupId}},Oc=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Pc+r:void 0})(),Lc=e=>{const{theme:t,classGroups:n}=e;return Mc(n,t)},Mc=(e,t)=>{const n=Ui();for(const r in e){const o=e[r];Ar(o,n,r,t)}return n},Ar=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Ac(s,t,n,r)}},Ac=(e,t,n,r)=>{if(typeof e=="string"){Fc(e,t,n);return}if(typeof e=="function"){Nc(e,t,n,r);return}Ic(e,t,n,r)},Fc=(e,t,n)=>{const r=e===""?t:Gi(t,e);r.classGroupId=n},Nc=(e,t,n,r)=>{if(Dc(e)){Ar(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(kc(n,e))},Ic=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[l,a]=o[s];Ar(a,Gi(t,l),n,r)}},Gi=(e,t)=>{let n=e;const r=t.split(cn),o=r.length;for(let i=0;i<o;i++){const s=r[i];let l=n.nextPart.get(s);l||(l=Ui(),n.nextPart.set(s,l)),n=l}return n},Dc=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,jc=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},ar="!",wo=":",_c=[],yo=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Bc=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,l=0,a=0,c;const u=o.length;for(let v=0;v<u;v++){const b=o[v];if(s===0&&l===0){if(b===wo){i.push(o.slice(a,v)),a=v+1;continue}if(b==="/"){c=v;continue}}b==="["?s++:b==="]"?s--:b==="("?l++:b===")"&&l--}const f=i.length===0?o:o.slice(a);let h=f,d=!1;f.endsWith(ar)?(h=f.slice(0,-1),d=!0):f.startsWith(ar)&&(h=f.slice(1),d=!0);const g=c&&c>a?c-a:void 0;return yo(i,d,h,g)};if(t){const o=t+wo,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):yo(_c,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Hc=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],l=s[0]==="[",a=t.has(s);l||a?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},Vc=e=>({cache:jc(e.cacheSize),parseClassName:Bc(e),sortModifiers:Hc(e),...Tc(e)}),Wc=/\s+/,zc=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],l=e.trim().split(Wc);let a="";for(let c=l.length-1;c>=0;c-=1){const u=l[c],{isExternal:f,modifiers:h,hasImportantModifier:d,baseClassName:g,maybePostfixModifierPosition:v}=n(u);if(f){a=u+(a.length>0?" "+a:a);continue}let b=!!v,x=r(b?g.substring(0,v):g);if(!x){if(!b){a=u+(a.length>0?" "+a:a);continue}if(x=r(g),!x){a=u+(a.length>0?" "+a:a);continue}b=!1}const y=h.length===0?"":h.length===1?h[0]:i(h).join(":"),w=d?y+ar:y,S=w+x;if(s.indexOf(S)>-1)continue;s.push(S);const R=o(x,b);for(let P=0;P<R.length;++P){const T=R[P];s.push(w+T)}a=u+(a.length>0?" "+a:a)}return a},Uc=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Ki(n))&&(o&&(o+=" "),o+=r);return o},Ki=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ki(e[r]))&&(n&&(n+=" "),n+=t);return n},qc=(e,...t)=>{let n,r,o,i;const s=a=>{const c=t.reduce((u,f)=>f(u),e());return n=Vc(c),r=n.cache.get,o=n.cache.set,i=l,l(a)},l=a=>{const c=r(a);if(c)return c;const u=zc(a,n);return o(a,u),u};return i=s,(...a)=>i(Uc(...a))},Gc=[],ne=e=>{const t=n=>n[e]||Gc;return t.isThemeGetter=!0,t},Yi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Xi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Kc=/^\d+\/\d+$/,Yc=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xc=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Zc=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Jc=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Qc=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ct=e=>Kc.test(e),U=e=>!!e&&!Number.isNaN(Number(e)),We=e=>!!e&&Number.isInteger(Number(e)),Dn=e=>e.endsWith("%")&&U(e.slice(0,-1)),Me=e=>Yc.test(e),eu=()=>!0,tu=e=>Xc.test(e)&&!Zc.test(e),Zi=()=>!1,nu=e=>Jc.test(e),ru=e=>Qc.test(e),ou=e=>!N(e)&&!I(e),iu=e=>bt(e,es,Zi),N=e=>Yi.test(e),Ze=e=>bt(e,ts,tu),jn=e=>bt(e,uu,U),Eo=e=>bt(e,Ji,Zi),su=e=>bt(e,Qi,ru),qt=e=>bt(e,ns,nu),I=e=>Xi.test(e),Rt=e=>xt(e,ts),lu=e=>xt(e,du),Co=e=>xt(e,Ji),au=e=>xt(e,es),cu=e=>xt(e,Qi),Gt=e=>xt(e,ns,!0),bt=(e,t,n)=>{const r=Yi.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},xt=(e,t,n=!1)=>{const r=Xi.exec(e);return r?r[1]?t(r[1]):n:!1},Ji=e=>e==="position"||e==="percentage",Qi=e=>e==="image"||e==="url",es=e=>e==="length"||e==="size"||e==="bg-size",ts=e=>e==="length",uu=e=>e==="number",du=e=>e==="family-name",ns=e=>e==="shadow",fu=()=>{const e=ne("color"),t=ne("font"),n=ne("text"),r=ne("font-weight"),o=ne("tracking"),i=ne("leading"),s=ne("breakpoint"),l=ne("container"),a=ne("spacing"),c=ne("radius"),u=ne("shadow"),f=ne("inset-shadow"),h=ne("text-shadow"),d=ne("drop-shadow"),g=ne("blur"),v=ne("perspective"),b=ne("aspect"),x=ne("ease"),y=ne("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...S(),I,N],P=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],k=()=>[I,N,a],F=()=>[ct,"full","auto",...k()],$=()=>[We,"none","subgrid",I,N],D=()=>["auto",{span:["full",We,I,N]},We,I,N],W=()=>[We,"auto",I,N],z=()=>["auto","min","max","fr",I,N],O=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],A=()=>["start","end","center","stretch","center-safe","end-safe"],_=()=>["auto",...k()],L=()=>[ct,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],C=()=>[e,I,N],M=()=>[...S(),Co,Eo,{position:[I,N]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",au,iu,{size:[I,N]}],B=()=>[Dn,Rt,Ze],j=()=>["","none","full",c,I,N],ee=()=>["",U,Rt,Ze],Y=()=>["solid","dashed","dotted","double"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>[U,Dn,Co,Eo],pe=()=>["","none",g,I,N],de=()=>["none",U,I,N],lt=()=>["none",U,I,N],Et=()=>[U,I,N],at=()=>[ct,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Me],breakpoint:[Me],color:[eu],container:[Me],"drop-shadow":[Me],ease:["in","out","in-out"],font:[ou],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Me],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Me],shadow:[Me],spacing:["px",U],text:[Me],"text-shadow":[Me],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ct,N,I,b]}],container:["container"],columns:[{columns:[U,N,I,l]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:R()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{start:F()}],end:[{end:F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[We,"auto",I,N]}],basis:[{basis:[ct,"full","auto",l,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[U,ct,"auto","initial","none",N]}],grow:[{grow:["",U,I,N]}],shrink:[{shrink:["",U,I,N]}],order:[{order:[We,"first","last","none",I,N]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...O(),"normal"]}],"justify-items":[{"justify-items":[...A(),"normal"]}],"justify-self":[{"justify-self":["auto",...A()]}],"align-content":[{content:["normal",...O()]}],"align-items":[{items:[...A(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...A(),{baseline:["","last"]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...A(),"baseline"]}],"place-self":[{"place-self":["auto",...A()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:_()}],mx:[{mx:_()}],my:[{my:_()}],ms:[{ms:_()}],me:[{me:_()}],mt:[{mt:_()}],mr:[{mr:_()}],mb:[{mb:_()}],ml:[{ml:_()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],w:[{w:[l,"screen",...L()]}],"min-w":[{"min-w":[l,"screen","none",...L()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[s]},...L()]}],h:[{h:["screen","lh",...L()]}],"min-h":[{"min-h":["screen","lh","none",...L()]}],"max-h":[{"max-h":["screen","lh",...L()]}],"font-size":[{text:["base",n,Rt,Ze]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,I,jn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Dn,N]}],"font-family":[{font:[lu,N,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,I,N]}],"line-clamp":[{"line-clamp":[U,"none",I,jn]}],leading:[{leading:[i,...k()]}],"list-image":[{"list-image":["none",I,N]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",I,N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[U,"from-font","auto",I,Ze]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[U,"auto",I,N]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",I,N]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",I,N]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:V()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},We,I,N],radial:["",I,N],conic:[We,I,N]},cu,su]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Y(),"hidden","none"]}],"divide-style":[{divide:[...Y(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[U,I,N]}],"outline-w":[{outline:["",U,Rt,Ze]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",u,Gt,qt]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",f,Gt,qt]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[U,Ze]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",h,Gt,qt]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[U,I,N]}],"mix-blend":[{"mix-blend":[...H(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":H()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[U]}],"mask-image-linear-from-pos":[{"mask-linear-from":G()}],"mask-image-linear-to-pos":[{"mask-linear-to":G()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":G()}],"mask-image-t-to-pos":[{"mask-t-to":G()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":G()}],"mask-image-r-to-pos":[{"mask-r-to":G()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":G()}],"mask-image-b-to-pos":[{"mask-b-to":G()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":G()}],"mask-image-l-to-pos":[{"mask-l-to":G()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":G()}],"mask-image-x-to-pos":[{"mask-x-to":G()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":G()}],"mask-image-y-to-pos":[{"mask-y-to":G()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[I,N]}],"mask-image-radial-from-pos":[{"mask-radial-from":G()}],"mask-image-radial-to-pos":[{"mask-radial-to":G()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[U]}],"mask-image-conic-from-pos":[{"mask-conic-from":G()}],"mask-image-conic-to-pos":[{"mask-conic-to":G()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:X()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",I,N]}],filter:[{filter:["","none",I,N]}],blur:[{blur:pe()}],brightness:[{brightness:[U,I,N]}],contrast:[{contrast:[U,I,N]}],"drop-shadow":[{"drop-shadow":["","none",d,Gt,qt]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",U,I,N]}],"hue-rotate":[{"hue-rotate":[U,I,N]}],invert:[{invert:["",U,I,N]}],saturate:[{saturate:[U,I,N]}],sepia:[{sepia:["",U,I,N]}],"backdrop-filter":[{"backdrop-filter":["","none",I,N]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[U,I,N]}],"backdrop-contrast":[{"backdrop-contrast":[U,I,N]}],"backdrop-grayscale":[{"backdrop-grayscale":["",U,I,N]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[U,I,N]}],"backdrop-invert":[{"backdrop-invert":["",U,I,N]}],"backdrop-opacity":[{"backdrop-opacity":[U,I,N]}],"backdrop-saturate":[{"backdrop-saturate":[U,I,N]}],"backdrop-sepia":[{"backdrop-sepia":["",U,I,N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",I,N]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[U,"initial",I,N]}],ease:[{ease:["linear","initial",x,I,N]}],delay:[{delay:[U,I,N]}],animate:[{animate:["none",y,I,N]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,I,N]}],"perspective-origin":[{"perspective-origin":R()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:lt()}],"scale-x":[{"scale-x":lt()}],"scale-y":[{"scale-y":lt()}],"scale-z":[{"scale-z":lt()}],"scale-3d":["scale-3d"],skew:[{skew:Et()}],"skew-x":[{"skew-x":Et()}],"skew-y":[{"skew-y":Et()}],transform:[{transform:[I,N,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:at()}],"translate-x":[{"translate-x":at()}],"translate-y":[{"translate-y":at()}],"translate-z":[{"translate-z":at()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",I,N]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",I,N]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[U,Rt,Ze,jn]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},mu=qc(fu);function re(...e){return mu(Sc(e))}function he({align:e,children:t,className:n,direction:r,gap:o=0,grow:i,justify:s,shrink:l,style:a,wrap:c,...u}){return E.jsx("div",{className:re("flex",{"items-center":e==="center","items-end":e==="end","items-start":e==="start","items-stretch":e==="stretch","flex-col":r==="column","flex-row":r==="row","gap-1":o===1,"gap-2":o===2,"gap-3":o===3,"gap-4":o===4,"gap-5":o===5,"gap-6":o===6,"gap-7":o===7,"gap-8":o===8,"grow-0":i===0,"grow-1":i===1,"justify-around":s==="around","justify-between":s==="between","justify-center":s==="center","justify-end":s==="end","justify-start":s==="start","justify-stretch":s==="stretch","shrink-0":l===0,"shrink-1":l===1,"flex-wrap":c},n),style:a,...u,children:t})}const pu=p.createContext(null),_n={didCatch:!1,error:null};let hu=class extends p.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=_n}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:i,reason:"imperative-api"}),this.setState(_n)}}componentDidCatch(t,n){var r,o;(r=(o=this.props).onError)===null||r===void 0||r.call(o,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:o}=this.props;if(r&&n.error!==null&&gu(t.resetKeys,o)){var i,s;(i=(s=this.props).onReset)===null||i===void 0||i.call(s,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(_n)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:o}=this.props,{didCatch:i,error:s}=this.state;let l=t;if(i){const a={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")l=n(a);else if(r)l=p.createElement(r,a);else if(o!==void 0)l=o;else throw s}return p.createElement(pu.Provider,{value:{didCatch:i,error:s,resetErrorBoundary:this.resetErrorBoundary}},l)}};function gu(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}function Fr({children:e,className:t,html:n=!1,inline:r=!1,intent:o="none",minimal:i,...s}){let l=ql;switch(o){case"none":case"primary":{l=Kl;break}case"success":{l=Hl;break}}return E.jsx("div",{className:`${r?"w-fit":"w-full"} rounded-md p-2 px-3 ${vu(o,!!i)} ${t}`,role:"alert",...s,children:E.jsxs("div",{className:"flex flex-row gap-2",children:[E.jsx(l,{className:"w-6 h-6 shrink-0"}),n?E.jsx("div",{dangerouslySetInnerHTML:{__html:e}}):E.jsx("div",{children:e})]})})}function vu(e,t){switch(e){case"danger":return t?"bg-red-950 text-red-300 [&_svg]:text-red-500":"bg-black/10 bg-border border-2 border-red-500 text-white [&_svg]:text-red-500 [&_a]:text-red-400!";case"none":return t?"bg-white/10 text-slate-300 [&_svg]:text-slate-400":"bg-black/10 bg-border border-2 border-white/40 text-white [&_svg]:text-white/60";case"primary":return t?"bg-sky-950 text-sky-300 [&_svg]:text-sky-400":"bg-black/10 bg-border border-2 border-sky-400 text-white [&_svg]:text-sky-400";case"success":return t?"bg-emerald-950 text-emerald-300 [&_svg]:text-emerald-400":"bg-black/10 bg-border border-2 border-emerald-400 text-white [&_svg]:text-emerald-400";case"warning":return t?"bg-amber-950/65 text-amber-200 [&_svg]:text-amber-300":"bg-black/10 bg-border border-2 border-amber-400 text-white [&_svg]:text-amber-400 [&_a]:text-amber-400!"}}const rs=typeof document<"u"?p.useLayoutEffect:()=>{};var Bn;const bu=(Bn=p.useInsertionEffect)!==null&&Bn!==void 0?Bn:rs;function xu(e){const t=p.useRef(null);return bu(()=>{t.current=e},[e]),p.useCallback((...n)=>{const r=t.current;return r?.(...n)},[])}const Xe=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},Je=e=>e&&"window"in e&&e.window===e?e:Xe(e).defaultView||window;function wu(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function yu(e){return wu(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let Eu=!1;function Nr(){return Eu}function os(e,t){if(!Nr())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:yu(n)?n=n.host:n=n.parentNode}return!1}const cr=(e=document)=>{var t;if(!Nr())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function is(e){return Nr()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function xn(e){var t;if(typeof window>"u"||window.navigator==null)return!1;let n=(t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands;return Array.isArray(n)&&n.some(r=>e.test(r.brand))||e.test(window.navigator.userAgent)}function Ir(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function He(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const Dr=He(function(){return Ir(/^Mac/i)}),Cu=He(function(){return Ir(/^iPhone/i)}),Ru=He(function(){return Ir(/^iPad/i)||Dr()&&navigator.maxTouchPoints>1}),Su=He(function(){return Cu()||Ru()});He(function(){return Dr()||Su()});He(function(){return xn(/AppleWebKit/i)&&!$u()});const $u=He(function(){return xn(/Chrome/i)}),ku=He(function(){return xn(/Android/i)});He(function(){return xn(/Firefox/i)});function ss(){let e=p.useRef(new Map),t=p.useCallback((o,i,s,l)=>{let a=l?.once?(...c)=>{e.current.delete(s),s(...c)}:s;e.current.set(s,{type:i,eventTarget:o,fn:a,options:l}),o.addEventListener(i,a,l)},[]),n=p.useCallback((o,i,s,l)=>{var a;let c=((a=e.current.get(s))===null||a===void 0?void 0:a.fn)||s;o.removeEventListener(i,c,l),e.current.delete(s)},[]),r=p.useCallback(()=>{e.current.forEach((o,i)=>{n(o.eventTarget,o.type,i,o.options)})},[n]);return p.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Pu(e){return e.pointerType===""&&e.isTrusted?!0:ku()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ls(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Tu(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function as(e){let t=p.useRef({isFocused:!1,observer:null});rs(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=xu(r=>{e?.(r)});return p.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=r.target,i=s=>{if(t.current.isFocused=!1,o.disabled){let l=ls(s);n(l)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let l=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:l})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:l}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let Ou=!1,jt=null,ur=new Set,kt=new Map,tt=!1,dr=!1;const Lu={Tab:!0,Escape:!0};function jr(e,t){for(let n of ur)n(e,t)}function Mu(e){return!(e.metaKey||!Dr()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function un(e){tt=!0,Mu(e)&&(jt="keyboard",jr("keyboard",e))}function we(e){jt="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(tt=!0,jr("pointer",e))}function cs(e){Pu(e)&&(tt=!0,jt="virtual")}function us(e){e.target===window||e.target===document||Ou||!e.isTrusted||(!tt&&!dr&&(jt="virtual",jr("virtual",e)),tt=!1,dr=!1)}function ds(){tt=!1,dr=!0}function fr(e){if(typeof window>"u"||typeof document>"u"||kt.get(Je(e)))return;const t=Je(e),n=Xe(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){tt=!0,r.apply(this,arguments)},n.addEventListener("keydown",un,!0),n.addEventListener("keyup",un,!0),n.addEventListener("click",cs,!0),t.addEventListener("focus",us,!0),t.addEventListener("blur",ds,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",we,!0),n.addEventListener("pointermove",we,!0),n.addEventListener("pointerup",we,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",we,!0),n.addEventListener("mousemove",we,!0),n.addEventListener("mouseup",we,!0)),t.addEventListener("beforeunload",()=>{fs(e)},{once:!0}),kt.set(t,{focus:r})}const fs=(e,t)=>{const n=Je(e),r=Xe(e);t&&r.removeEventListener("DOMContentLoaded",t),kt.has(n)&&(n.HTMLElement.prototype.focus=kt.get(n).focus,r.removeEventListener("keydown",un,!0),r.removeEventListener("keyup",un,!0),r.removeEventListener("click",cs,!0),n.removeEventListener("focus",us,!0),n.removeEventListener("blur",ds,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",we,!0),r.removeEventListener("pointermove",we,!0),r.removeEventListener("pointerup",we,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",we,!0),r.removeEventListener("mousemove",we,!0),r.removeEventListener("mouseup",we,!0)),kt.delete(n))};function Au(e){const t=Xe(e);let n;return t.readyState!=="loading"?fr(e):(n=()=>{fr(e)},t.addEventListener("DOMContentLoaded",n)),()=>fs(e,n)}typeof document<"u"&&Au();function ms(){return jt!=="pointer"}const Fu=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Nu(e,t,n){let r=Xe(n?.target);const o=typeof window<"u"?Je(n?.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?Je(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?Je(n?.target).HTMLElement:HTMLElement,l=typeof window<"u"?Je(n?.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof o&&!Fu.has(r.activeElement.type)||r.activeElement instanceof i||r.activeElement instanceof s&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof l&&!Lu[n.key])}function Iu(e,t,n){fr(),p.useEffect(()=>{let r=(o,i)=>{Nu(!!n?.isTextInput,o,i)&&e(ms())};return ur.add(r),()=>{ur.delete(r)}},t)}function Du(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const i=p.useCallback(a=>{if(a.target===a.currentTarget)return r&&r(a),o&&o(!1),!0},[r,o]),s=as(i),l=p.useCallback(a=>{const c=Xe(a.target),u=c?cr(c):cr();a.target===a.currentTarget&&u===is(a.nativeEvent)&&(n&&n(a),o&&o(!0),s(a))},[o,n,s]);return{focusProps:{onFocus:!t&&(n||o||r)?l:void 0,onBlur:!t&&(r||o)?i:void 0}}}function ju(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=p.useRef({isFocusWithin:!1}),{addGlobalListener:s,removeAllGlobalListeners:l}=ss(),a=p.useCallback(f=>{f.currentTarget.contains(f.target)&&i.current.isFocusWithin&&!f.currentTarget.contains(f.relatedTarget)&&(i.current.isFocusWithin=!1,l(),n&&n(f),o&&o(!1))},[n,o,i,l]),c=as(a),u=p.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const h=Xe(f.target),d=cr(h);if(!i.current.isFocusWithin&&d===is(f.nativeEvent)){r&&r(f),o&&o(!0),i.current.isFocusWithin=!0,c(f);let g=f.currentTarget;s(h,"focus",v=>{if(i.current.isFocusWithin&&!os(g,v.target)){let b=new h.defaultView.FocusEvent("blur",{relatedTarget:v.target});Tu(b,g);let x=ls(b);a(x)}},{capture:!0})}},[r,o,c,s,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:a}}}let dn=!1,Kt=0;function mr(){dn=!0,setTimeout(()=>{dn=!1},50)}function Ro(e){e.pointerType==="touch"&&mr()}function _u(){if(!(typeof document>"u"))return Kt===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",Ro):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",mr)),Kt++,()=>{Kt--,!(Kt>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Ro):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",mr))}}function _r(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,s]=p.useState(!1),l=p.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;p.useEffect(_u,[]);let{addGlobalListener:a,removeAllGlobalListeners:c}=ss(),{hoverProps:u,triggerHoverEnd:f}=p.useMemo(()=>{let h=(v,b)=>{if(l.pointerType=b,o||b==="touch"||l.isHovered||!v.currentTarget.contains(v.target))return;l.isHovered=!0;let x=v.currentTarget;l.target=x,a(Xe(v.target),"pointerover",y=>{l.isHovered&&l.target&&!os(l.target,y.target)&&d(y,y.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:x,pointerType:b}),n&&n(!0),s(!0)},d=(v,b)=>{let x=l.target;l.pointerType="",l.target=null,!(b==="touch"||!l.isHovered||!x)&&(l.isHovered=!1,c(),r&&r({type:"hoverend",target:x,pointerType:b}),n&&n(!1),s(!1))},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=v=>{dn&&v.pointerType==="mouse"||h(v,v.pointerType)},g.onPointerLeave=v=>{!o&&v.currentTarget.contains(v.target)&&d(v,v.pointerType)}):process.env.NODE_ENV==="test"&&(g.onTouchStart=()=>{l.ignoreEmulatedMouseEvents=!0},g.onMouseEnter=v=>{!l.ignoreEmulatedMouseEvents&&!dn&&h(v,"mouse"),l.ignoreEmulatedMouseEvents=!1},g.onMouseLeave=v=>{!o&&v.currentTarget.contains(v.target)&&d(v,"mouse")}),{hoverProps:g,triggerHoverEnd:d}},[t,n,r,o,l,a,c]);return p.useEffect(()=>{o&&f({currentTarget:l.target},l.pointerType)},[o]),{hoverProps:u,isHovered:i}}function Br(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=p.useRef({isFocused:!1,isFocusVisible:t||ms()}),[i,s]=p.useState(!1),[l,a]=p.useState(()=>o.current.isFocused&&o.current.isFocusVisible),c=p.useCallback(()=>a(o.current.isFocused&&o.current.isFocusVisible),[]),u=p.useCallback(d=>{o.current.isFocused=d,s(d),c()},[c]);Iu(d=>{o.current.isFocusVisible=d,c()},[],{isTextInput:n});let{focusProps:f}=Du({isDisabled:r,onFocusChange:u}),{focusWithinProps:h}=ju({isDisabled:!r,onFocusWithinChange:u});return{isFocused:i,isFocusVisible:l,focusProps:r?h:f}}var Bu=Object.defineProperty,Hu=(e,t,n)=>t in e?Bu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hn=(e,t,n)=>(Hu(e,typeof t!="symbol"?t+"":t,n),n);let Vu=class{constructor(){Hn(this,"current",this.detect()),Hn(this,"handoffState","pending"),Hn(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}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"}},ke=new Vu;function _t(e){var t;return ke.isServer?null:e==null?document:(t=e?.ownerDocument)!=null?t:document}function fn(e){var t,n;return ke.isServer?null:e==null?document:(n=(t=e?.getRootNode)==null?void 0:t.call(e))!=null?n:document}function ps(e){var t,n;return(n=(t=fn(e))==null?void 0:t.activeElement)!=null?n:null}function Wu(e){return ps(e)===e}function hs(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function ve(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return hs(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=ve();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function ot(){let[e]=p.useState(ve);return p.useEffect(()=>()=>e.dispose(),[e]),e}let te=(e,t)=>{ke.isServer?p.useEffect(e,t):p.useLayoutEffect(e,t)};function it(e){let t=p.useRef(e);return te(()=>{t.current=e},[e]),t}let q=function(e){let t=it(e);return p.useCallback((...n)=>t.current(...n),[t])};function zu(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function Uu(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function Hr({disabled:e=!1}={}){let t=p.useRef(null),[n,r]=p.useState(!1),o=ot(),i=q(()=>{t.current=null,r(!1),o.dispose()}),s=q(l=>{if(o.dispose(),t.current===null){t.current=l.currentTarget,r(!0);{let a=_t(l.currentTarget);o.addEventListener(a,"pointerup",i,!1),o.addEventListener(a,"pointermove",c=>{if(t.current){let u=zu(c);r(Uu(u,t.current.getBoundingClientRect()))}},!1),o.addEventListener(a,"pointercancel",i,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:s,onPointerUp:i,onClick:i}}}function ye(e){return p.useMemo(()=>e,Object.values(e))}let qu=p.createContext(void 0);function wn(){return p.useContext(qu)}function pr(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function ce(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ce),r}var pt=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(pt||{}),Ue=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Ue||{});function ie(){let e=Ku();return p.useCallback(t=>Gu({mergeRefs:e,...t}),[e])}function Gu({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:s,mergeRefs:l}){l=l??Yu;let a=gs(t,e);if(i)return Yt(a,n,r,s,l);let c=o??0;if(c&2){let{static:u=!1,...f}=a;if(u)return Yt(f,n,r,s,l)}if(c&1){let{unmount:u=!0,...f}=a;return ce(u?0:1,{0(){return null},1(){return Yt({...f,hidden:!0,style:{display:"none"}},n,r,s,l)}})}return Yt(a,n,r,s,l)}function Yt(e,t={},n,r,o){let{as:i=n,children:s,refName:l="ref",...a}=Vn(e,["unmount","static"]),c=e.ref!==void 0?{[l]:e.ref}:{},u=typeof s=="function"?s(t):s;"className"in a&&a.className&&typeof a.className=="function"&&(a.className=a.className(t)),a["aria-labelledby"]&&a["aria-labelledby"]===a.id&&(a["aria-labelledby"]=void 0);let f={};if(t){let h=!1,d=[];for(let[g,v]of Object.entries(t))typeof v=="boolean"&&(h=!0),v===!0&&d.push(g.replace(/([A-Z])/g,b=>`-${b.toLowerCase()}`));if(h){f["data-headlessui-state"]=d.join(" ");for(let g of d)f[`data-${g}`]=""}}if(ft(i)&&(Object.keys(ze(a)).length>0||Object.keys(ze(f)).length>0))if(!p.isValidElement(u)||Array.isArray(u)&&u.length>1||Zu(u)){if(Object.keys(ze(a)).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(ze(a)).concat(Object.keys(ze(f))).map(h=>` - ${h}`).join(`
|
|
3
|
+
Please change the parent <Route path="${y}"> to <Route path="${y==="/"?"*":`${y}/*`}">.`)}let h=Be(),d;if(t){let y=typeof t=="string"?ht(t):t;Z(u==="/"||y.pathname?.startsWith(u),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${y.pathname}" was given in the \`location\` prop.`),d=y}else d=h;let g=d.pathname||"/",v=g;if(u!=="/"){let y=u.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(y.length).join("/")}let b=Ei(e,{pathname:v});Ce(f||b!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Ce(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.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.`);let x=Na(b&&b.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:Fe([u,i.encodeLocation?i.encodeLocation(y.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?u:Fe([u,i.encodeLocation?i.encodeLocation(y.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathnameBase])})),s,n,r,o);return t&&x?m.createElement(Nt.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...d},navigationType:"POP"}},x):x}function La(){let e=Ba(),t=Ea(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=m.createElement(m.Fragment,null,m.createElement("p",null,"💿 Hey developer 👋"),m.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",m.createElement("code",{style:i},"ErrorBoundary")," or"," ",m.createElement("code",{style:i},"errorElement")," prop on your route.")),m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),n?m.createElement("pre",{style:o},n):null,s)}var Ma=m.createElement(La,null),Aa=class extends m.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?m.createElement(_e.Provider,{value:this.props.routeContext},m.createElement(Pr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Fa({routeContext:e,match:t,children:n}){let r=m.useContext(gt);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),m.createElement(_e.Provider,{value:e},n)}function Na(e,t=[],n=null,r=null,o=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,s=n?.errors;if(s!=null){let u=i.findIndex(f=>f.route.id&&s?.[f.route.id]!==void 0);Z(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),i=i.slice(0,Math.min(i.length,u+1))}let l=!1,a=-1;if(n)for(let u=0;u<i.length;u++){let f=i[u];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(a=u),f.route.id){let{loaderData:h,errors:d}=n,g=f.route.loader&&!h.hasOwnProperty(f.route.id)&&(!d||d[f.route.id]===void 0);if(f.route.lazy||g){l=!0,a>=0?i=i.slice(0,a+1):i=[i[0]];break}}}let c=n&&r?(u,f)=>{r(u,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Ca(n.matches),errorInfo:f})}:void 0;return i.reduceRight((u,f,h)=>{let d,g=!1,v=null,b=null;n&&(d=s&&f.route.id?s[f.route.id]:void 0,v=f.route.errorElement||Ma,l&&(a<0&&h===0?(Fi("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,b=null):a===h&&(g=!0,b=f.route.hydrateFallbackElement||null)));let x=t.concat(i.slice(0,h+1)),y=()=>{let w;return d?w=v:g?w=b:f.route.Component?w=m.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=u,m.createElement(Fa,{match:f,routeContext:{outlet:u,matches:x,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?m.createElement(Aa,{location:n.location,revalidation:n.revalidation,component:v,error:d,children:y(),routeContext:{outlet:null,matches:x,isDataRoute:!0},onError:c}):y()},null)}function Tr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ia(e){let t=m.useContext(gt);return Z(t,Tr(e)),t}function Da(e){let t=m.useContext(vn);return Z(t,Tr(e)),t}function ja(e){let t=m.useContext(_e);return Z(t,Tr(e)),t}function Or(e){let t=ja(e),n=t.matches[t.matches.length-1];return Z(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function _a(){return Or("useRouteId")}function Ba(){let e=m.useContext(Pr),t=Da("useRouteError"),n=Or("useRouteError");return e!==void 0?e:t.errors?.[n]}function Ha(){let{router:e}=Ia("useNavigate"),t=Or("useNavigate"),n=m.useRef(!1);return Li(()=>{n.current=!0}),m.useCallback(async(o,i={})=>{Ce(n.current,Oi),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var vo={};function Fi(e,t,n){!t&&!vo[e]&&(vo[e]=!0,Ce(!1,n))}m.memo(Va);function Va({routes:e,future:t,state:n,unstable_onError:r}){return Ai(e,void 0,n,r,t)}function Ni(e){Z(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Wa({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:i=!1,unstable_useTransitions:s}){Z(!vt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),a=m.useMemo(()=>({basename:l,navigator:o,static:i,unstable_useTransitions:s,future:{}}),[l,o,i,s]);typeof n=="string"&&(n=ht(n));let{pathname:c="/",search:u="",hash:f="",state:h=null,key:d="default"}=n,g=m.useMemo(()=>{let v=De(c,l);return v==null?null:{location:{pathname:v,search:u,hash:f,state:h,key:d},navigationType:r}},[l,c,u,f,h,d,r]);return Ce(g!=null,`<Router basename="${l}"> is not able to match the URL "${c}${u}${f}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:m.createElement(Re.Provider,{value:a},m.createElement(Nt.Provider,{children:t,value:g}))}function za({children:e,location:t}){return Oa(lr(e),t)}function lr(e,t=[]){let n=[];return m.Children.forEach(e,(r,o)=>{if(!m.isValidElement(r))return;let i=[...t,o];if(r.type===m.Fragment){n.push.apply(n,lr(r.props.children,i));return}Z(r.type===Ni,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Z(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=lr(r.props.children,i)),n.push(s)}),n}var tn="get",nn="application/x-www-form-urlencoded";function bn(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Ua(e){return bn(e)&&e.tagName.toLowerCase()==="button"}function qa(e){return bn(e)&&e.tagName.toLowerCase()==="form"}function Ga(e){return bn(e)&&e.tagName.toLowerCase()==="input"}function Ka(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ya(e,t){return e.button===0&&(!t||t==="_self")&&!Ka(e)}var Ut=null;function Xa(){if(Ut===null)try{new FormData(document.createElement("form"),0),Ut=!1}catch{Ut=!0}return Ut}var Za=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function In(e){return e!=null&&!Za.has(e)?(Ce(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${nn}"`),null):e}function Ja(e,t){let n,r,o,i,s;if(qa(e)){let l=e.getAttribute("action");r=l?De(l,t):null,n=e.getAttribute("method")||tn,o=In(e.getAttribute("enctype"))||nn,i=new FormData(e)}else if(Ua(e)||Ga(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let a=e.getAttribute("formaction")||l.getAttribute("action");if(r=a?De(a,t):null,n=e.getAttribute("formmethod")||l.getAttribute("method")||tn,o=In(e.getAttribute("formenctype"))||In(l.getAttribute("enctype"))||nn,i=new FormData(l,e),!Xa()){let{name:c,type:u,value:f}=e;if(u==="image"){let h=c?`${c}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else c&&i.append(c,f)}}else{if(bn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=tn,r=null,o=nn,s=e}return i&&o==="text/plain"&&(s=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Lr(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Qa(e,t,n){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname=`_root.${n}`:t&&De(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${n}`,r}async function ec(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function tc(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function nc(e,t,n){let r=await Promise.all(e.map(async o=>{let i=t.routes[o.route.id];if(i){let s=await ec(i,n);return s.links?s.links():[]}return[]}));return sc(r.flat(1).filter(tc).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function bo(e,t,n,r,o,i){let s=(a,c)=>n[c]?a.route.id!==n[c].route.id:!0,l=(a,c)=>n[c].pathname!==a.pathname||n[c].route.path?.endsWith("*")&&n[c].params["*"]!==a.params["*"];return i==="assets"?t.filter((a,c)=>s(a,c)||l(a,c)):i==="data"?t.filter((a,c)=>{let u=r.routes[a.route.id];if(!u||!u.hasLoader)return!1;if(s(a,c)||l(a,c))return!0;if(a.route.shouldRevalidate){let f=a.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:a.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function rc(e,t,{includeHydrateFallback:n}={}){return oc(e.map(r=>{let o=t.routes[r.route.id];if(!o)return[];let i=[o.module];return o.clientActionModule&&(i=i.concat(o.clientActionModule)),o.clientLoaderModule&&(i=i.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(i=i.concat(o.hydrateFallbackModule)),o.imports&&(i=i.concat(o.imports)),i}).flat(1))}function oc(e){return[...new Set(e)]}function ic(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function sc(e,t){let n=new Set;return new Set(t),e.reduce((r,o)=>{let i=JSON.stringify(ic(o));return n.has(i)||(n.add(i),r.push({key:i,link:o})),r},[])}function Ii(){let e=m.useContext(gt);return Lr(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function lc(){let e=m.useContext(vn);return Lr(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Mr=m.createContext(void 0);Mr.displayName="FrameworkContext";function Di(){let e=m.useContext(Mr);return Lr(e,"You must render this element inside a <HydratedRouter> element"),e}function ac(e,t){let n=m.useContext(Mr),[r,o]=m.useState(!1),[i,s]=m.useState(!1),{onFocus:l,onBlur:a,onMouseEnter:c,onMouseLeave:u,onTouchStart:f}=t,h=m.useRef(null);m.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let v=x=>{x.forEach(y=>{s(y.isIntersecting)})},b=new IntersectionObserver(v,{threshold:.5});return h.current&&b.observe(h.current),()=>{b.disconnect()}}},[e]),m.useEffect(()=>{if(r){let v=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(v)}}},[r]);let d=()=>{o(!0)},g=()=>{o(!1),s(!1)};return n?e!=="intent"?[i,h,{}]:[i,h,{onFocus:Ct(l,d),onBlur:Ct(a,g),onMouseEnter:Ct(c,d),onMouseLeave:Ct(u,g),onTouchStart:Ct(f,d)}]:[!1,h,{}]}function Ct(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function cc({page:e,...t}){let{router:n}=Ii(),r=m.useMemo(()=>Ei(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?m.createElement(dc,{page:e,matches:r,...t}):null}function uc(e){let{manifest:t,routeModules:n}=Di(),[r,o]=m.useState([]);return m.useEffect(()=>{let i=!1;return nc(e,t,n).then(s=>{i||o(s)}),()=>{i=!0}},[e,t,n]),r}function dc({page:e,matches:t,...n}){let r=Be(),{manifest:o,routeModules:i}=Di(),{basename:s}=Ii(),{loaderData:l,matches:a}=lc(),c=m.useMemo(()=>bo(e,t,a,o,r,"data"),[e,t,a,o,r]),u=m.useMemo(()=>bo(e,t,a,o,r,"assets"),[e,t,a,o,r]),f=m.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let g=new Set,v=!1;if(t.forEach(x=>{let y=o.routes[x.route.id];!y||!y.hasLoader||(!c.some(w=>w.route.id===x.route.id)&&x.route.id in l&&i[x.route.id]?.shouldRevalidate||y.hasClientLoader?v=!0:g.add(x.route.id))}),g.size===0)return[];let b=Qa(e,s,"data");return v&&g.size>0&&b.searchParams.set("_routes",t.filter(x=>g.has(x.route.id)).map(x=>x.route.id).join(",")),[b.pathname+b.search]},[s,l,r,o,c,t,e,i]),h=m.useMemo(()=>rc(u,o),[u,o]),d=uc(u);return m.createElement(m.Fragment,null,f.map(g=>m.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...n})),h.map(g=>m.createElement("link",{key:g,rel:"modulepreload",href:g,...n})),d.map(({key:g,link:v})=>m.createElement("link",{key:g,nonce:n.nonce,...v})))}function fc(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var ji=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{ji&&(window.__reactRouterVersion="7.10.1")}catch{}function mc({basename:e,children:t,unstable_useTransitions:n,window:r}){let o=m.useRef();o.current==null&&(o.current=Ql({window:r,v5Compat:!0}));let i=o.current,[s,l]=m.useState({action:i.action,location:i.location}),a=m.useCallback(c=>{n===!1?l(c):m.startTransition(()=>l(c))},[n]);return m.useLayoutEffect(()=>i.listen(a),[i,a]),m.createElement(Wa,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i,unstable_useTransitions:n===!0})}var _i=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Bi=m.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:i,replace:s,state:l,target:a,to:c,preventScrollReset:u,viewTransition:f,...h},d){let{basename:g,unstable_useTransitions:v}=m.useContext(Re),b=typeof c=="string"&&_i.test(c),x,y=!1;if(typeof c=="string"&&b&&(x=c,ji))try{let k=new URL(window.location.href),D=c.startsWith("//")?new URL(k.protocol+c):new URL(c),W=De(D.pathname,g);D.origin===k.origin&&W!=null?c=W+D.search+D.hash:y=!0}catch{Ce(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let w=$a(c,{relative:o}),[S,R,P]=ac(r,h),T=vc(c,{replace:s,state:l,target:a,preventScrollReset:u,relative:o,viewTransition:f,unstable_useTransitions:v});function $(k){t&&t(k),k.defaultPrevented||T(k)}let F=m.createElement("a",{...h,...P,href:x||w,onClick:y||i?t:$,ref:fc(d,R),target:a,"data-discover":!b&&n==="render"?"true":void 0});return S&&!b?m.createElement(m.Fragment,null,F,m.createElement(cc,{page:w})):F});Bi.displayName="Link";var pc=m.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:i,to:s,viewTransition:l,children:a,...c},u){let f=It(s,{relative:c.relative}),h=Be(),d=m.useContext(vn),{navigator:g,basename:v}=m.useContext(Re),b=d!=null&&Ec(f)&&l===!0,x=g.encodeLocation?g.encodeLocation(f).pathname:f.pathname,y=h.pathname,w=d&&d.navigation&&d.navigation.location?d.navigation.location.pathname:null;n||(y=y.toLowerCase(),w=w?w.toLowerCase():null,x=x.toLowerCase()),w&&v&&(w=De(w,v)||w);const S=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let R=y===x||!o&&y.startsWith(x)&&y.charAt(S)==="/",P=w!=null&&(w===x||!o&&w.startsWith(x)&&w.charAt(x.length)==="/"),T={isActive:R,isPending:P,isTransitioning:b},$=R?t:void 0,F;typeof r=="function"?F=r(T):F=[r,R?"active":null,P?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let k=typeof i=="function"?i(T):i;return m.createElement(Bi,{...c,"aria-current":$,className:F,ref:u,style:k,to:s,viewTransition:l},typeof a=="function"?a(T):a)});pc.displayName="NavLink";var hc=m.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:i,method:s=tn,action:l,onSubmit:a,relative:c,preventScrollReset:u,viewTransition:f,...h},d)=>{let{unstable_useTransitions:g}=m.useContext(Re),v=wc(),b=yc(l,{relative:c}),x=s.toLowerCase()==="get"?"get":"post",y=typeof l=="string"&&_i.test(l),w=S=>{if(a&&a(S),S.defaultPrevented)return;S.preventDefault();let R=S.nativeEvent.submitter,P=R?.getAttribute("formmethod")||s,T=()=>v(R||S.currentTarget,{fetcherKey:t,method:P,navigate:n,replace:o,state:i,relative:c,preventScrollReset:u,viewTransition:f});g&&n!==!1?m.startTransition(()=>T()):T()};return m.createElement("form",{ref:d,method:x,action:b,onSubmit:r?a:w,...h,"data-discover":!y&&e==="render"?"true":void 0})});hc.displayName="Form";function gc(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Hi(e){let t=m.useContext(gt);return Z(t,gc(e)),t}function vc(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:i,viewTransition:s,unstable_useTransitions:l}={}){let a=Mi(),c=Be(),u=It(e,{relative:i});return m.useCallback(f=>{if(Ya(f,t)){f.preventDefault();let h=n!==void 0?n:Tt(c)===Tt(u),d=()=>a(e,{replace:h,state:r,preventScrollReset:o,relative:i,viewTransition:s});l?m.startTransition(()=>d()):d()}},[c,a,u,n,r,t,e,o,i,s,l])}var bc=0,xc=()=>`__${String(++bc)}__`;function wc(){let{router:e}=Hi("useSubmit"),{basename:t}=m.useContext(Re),n=_a(),r=e.fetch,o=e.navigate;return m.useCallback(async(i,s={})=>{let{action:l,method:a,encType:c,formData:u,body:f}=Ja(i,t);if(s.navigate===!1){let h=s.fetcherKey||xc();await r(h,n,s.action||l,{preventScrollReset:s.preventScrollReset,formData:u,body:f,formMethod:s.method||a,formEncType:s.encType||c,flushSync:s.flushSync})}else await o(s.action||l,{preventScrollReset:s.preventScrollReset,formData:u,body:f,formMethod:s.method||a,formEncType:s.encType||c,replace:s.replace,state:s.state,fromRouteId:n,flushSync:s.flushSync,viewTransition:s.viewTransition})},[r,o,t,n])}function yc(e,{relative:t}={}){let{basename:n}=m.useContext(Re),r=m.useContext(_e);Z(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),i={...It(e||".",{relative:t})},s=Be();if(e==null){i.search=s.search;let l=new URLSearchParams(i.search),a=l.getAll("index");if(a.some(u=>u==="")){l.delete("index"),a.filter(f=>f).forEach(f=>l.append("index",f));let u=l.toString();i.search=u?`?${u}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:Fe([n,i.pathname])),Tt(i)}function Ec(e,{relative:t}={}){let n=m.useContext(Ti);Z(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Hi("useViewTransitionState"),o=It(e,{relative:t});if(!n.isTransitioning)return!1;let i=De(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=De(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ot(o.pathname,s)!=null||Ot(o.pathname,i)!=null}const Cc=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor",className:"bi bi-github",viewBox:"0 0 16 16",...e},m.createElement("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8"})),Rc=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 128 128",...e},m.createElement("path",{fill:"currentColor",d:"M2 38.5h124v43.71H64v7.29H36.44v-7.29H2zm6.89 36.43h13.78V53.07h6.89v21.86h6.89V45.79H8.89zm34.44-29.14v36.42h13.78v-7.28h13.78V45.79zm13.78 7.29H64v14.56h-6.89zm20.67-7.29v29.14h13.78V53.07h6.89v21.86h6.89V53.07h6.89v21.86h6.89V45.79z"})),Sc=e=>m.createElement("svg",{width:50,height:50,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},m.createElement("rect",{x:0,y:0,height:20,width:20,fill:"transparent"}),m.createElement("circle",{cx:10,cy:10,r:2,fill:"white"}),m.createElement("g",{stroke:"white",strokeWidth:2,fill:"none"},m.createElement("ellipse",{cx:10,cy:10,rx:11,ry:5,transform:"rotate(45, 10, 10)"}),m.createElement("ellipse",{cx:10,cy:10,rx:11,ry:5,transform:"rotate(-45, 10, 10)"}))),Vi=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 640 640",width:"24px",fill:"currentColor",...e},m.createElement("path",{d:"M433.2 103.1L581.4 253.4C609.1 281.5 609.1 326.5 581.4 354.6L425 512.9C415.7 522.3 400.5 522.4 391.1 513.1C381.7 503.8 381.6 488.6 390.9 479.2L547.3 320.8C556.5 311.5 556.5 296.4 547.3 287.1L399 136.9C389.7 127.5 389.8 112.3 399.2 103C408.6 93.7 423.8 93.8 433.1 103.2zM64.1 293.5L64.1 160C64.1 124.7 92.8 96 128.1 96L261.6 96C278.6 96 294.9 102.7 306.9 114.7L450.9 258.7C475.9 283.7 475.9 324.2 450.9 349.2L317.4 482.7C292.4 507.7 251.9 507.7 226.9 482.7L82.9 338.7C70.9 326.7 64.2 310.4 64.2 293.4zM208.1 208C208.1 190.3 193.8 176 176.1 176C158.4 176 144.1 190.3 144.1 208C144.1 225.7 158.4 240 176.1 240C193.8 240 208.1 225.7 208.1 208z"})),Wi=p.createContext(null);function zi(e,t="Assertion error"){if(!e)throw Error(t)}function Dt(){const e=p.useContext(Wi);return zi(e,"App must be rendered within a LibraryContextProvider"),e}function Ui(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ui(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function kc(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ui(e))&&(r&&(r+=" "),r+=t);return r}const $c=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Pc=(e,t)=>({classGroupId:e,validator:t}),qi=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),cn="-",xo=[],Tc="arbitrary..",Oc=e=>{const t=Mc(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return Lc(s);const l=s.split(cn),a=l[0]===""&&l.length>1?1:0;return Gi(l,a,t)},getConflictingClassGroupIds:(s,l)=>{if(l){const a=r[s],c=n[s];return a?c?$c(c,a):a:c||xo}return n[s]||xo}}},Gi=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=Gi(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const l=t===0?e.join(cn):e.slice(t).join(cn),a=s.length;for(let c=0;c<a;c++){const u=s[c];if(u.validator(l))return u.classGroupId}},Lc=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Tc+r:void 0})(),Mc=e=>{const{theme:t,classGroups:n}=e;return Ac(n,t)},Ac=(e,t)=>{const n=qi();for(const r in e){const o=e[r];Ar(o,n,r,t)}return n},Ar=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Fc(s,t,n,r)}},Fc=(e,t,n,r)=>{if(typeof e=="string"){Nc(e,t,n);return}if(typeof e=="function"){Ic(e,t,n,r);return}Dc(e,t,n,r)},Nc=(e,t,n)=>{const r=e===""?t:Ki(t,e);r.classGroupId=n},Ic=(e,t,n,r)=>{if(jc(e)){Ar(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Pc(n,e))},Dc=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[l,a]=o[s];Ar(a,Ki(t,l),n,r)}},Ki=(e,t)=>{let n=e;const r=t.split(cn),o=r.length;for(let i=0;i<o;i++){const s=r[i];let l=n.nextPart.get(s);l||(l=qi(),n.nextPart.set(s,l)),n=l}return n},jc=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,_c=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},ar="!",wo=":",Bc=[],yo=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Hc=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,l=0,a=0,c;const u=o.length;for(let v=0;v<u;v++){const b=o[v];if(s===0&&l===0){if(b===wo){i.push(o.slice(a,v)),a=v+1;continue}if(b==="/"){c=v;continue}}b==="["?s++:b==="]"?s--:b==="("?l++:b===")"&&l--}const f=i.length===0?o:o.slice(a);let h=f,d=!1;f.endsWith(ar)?(h=f.slice(0,-1),d=!0):f.startsWith(ar)&&(h=f.slice(1),d=!0);const g=c&&c>a?c-a:void 0;return yo(i,d,h,g)};if(t){const o=t+wo,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):yo(Bc,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Vc=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],l=s[0]==="[",a=t.has(s);l||a?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},Wc=e=>({cache:_c(e.cacheSize),parseClassName:Hc(e),sortModifiers:Vc(e),...Oc(e)}),zc=/\s+/,Uc=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],l=e.trim().split(zc);let a="";for(let c=l.length-1;c>=0;c-=1){const u=l[c],{isExternal:f,modifiers:h,hasImportantModifier:d,baseClassName:g,maybePostfixModifierPosition:v}=n(u);if(f){a=u+(a.length>0?" "+a:a);continue}let b=!!v,x=r(b?g.substring(0,v):g);if(!x){if(!b){a=u+(a.length>0?" "+a:a);continue}if(x=r(g),!x){a=u+(a.length>0?" "+a:a);continue}b=!1}const y=h.length===0?"":h.length===1?h[0]:i(h).join(":"),w=d?y+ar:y,S=w+x;if(s.indexOf(S)>-1)continue;s.push(S);const R=o(x,b);for(let P=0;P<R.length;++P){const T=R[P];s.push(w+T)}a=u+(a.length>0?" "+a:a)}return a},qc=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Yi(n))&&(o&&(o+=" "),o+=r);return o},Yi=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Yi(e[r]))&&(n&&(n+=" "),n+=t);return n},Gc=(e,...t)=>{let n,r,o,i;const s=a=>{const c=t.reduce((u,f)=>f(u),e());return n=Wc(c),r=n.cache.get,o=n.cache.set,i=l,l(a)},l=a=>{const c=r(a);if(c)return c;const u=Uc(a,n);return o(a,u),u};return i=s,(...a)=>i(qc(...a))},Kc=[],ne=e=>{const t=n=>n[e]||Kc;return t.isThemeGetter=!0,t},Xi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Zi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Yc=/^\d+\/\d+$/,Xc=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Zc=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Jc=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Qc=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,eu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ct=e=>Yc.test(e),U=e=>!!e&&!Number.isNaN(Number(e)),We=e=>!!e&&Number.isInteger(Number(e)),Dn=e=>e.endsWith("%")&&U(e.slice(0,-1)),Me=e=>Xc.test(e),tu=()=>!0,nu=e=>Zc.test(e)&&!Jc.test(e),Ji=()=>!1,ru=e=>Qc.test(e),ou=e=>eu.test(e),iu=e=>!N(e)&&!I(e),su=e=>bt(e,ts,Ji),N=e=>Xi.test(e),Ze=e=>bt(e,ns,nu),jn=e=>bt(e,du,U),Eo=e=>bt(e,Qi,Ji),lu=e=>bt(e,es,ou),qt=e=>bt(e,rs,ru),I=e=>Zi.test(e),Rt=e=>xt(e,ns),au=e=>xt(e,fu),Co=e=>xt(e,Qi),cu=e=>xt(e,ts),uu=e=>xt(e,es),Gt=e=>xt(e,rs,!0),bt=(e,t,n)=>{const r=Xi.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},xt=(e,t,n=!1)=>{const r=Zi.exec(e);return r?r[1]?t(r[1]):n:!1},Qi=e=>e==="position"||e==="percentage",es=e=>e==="image"||e==="url",ts=e=>e==="length"||e==="size"||e==="bg-size",ns=e=>e==="length",du=e=>e==="number",fu=e=>e==="family-name",rs=e=>e==="shadow",mu=()=>{const e=ne("color"),t=ne("font"),n=ne("text"),r=ne("font-weight"),o=ne("tracking"),i=ne("leading"),s=ne("breakpoint"),l=ne("container"),a=ne("spacing"),c=ne("radius"),u=ne("shadow"),f=ne("inset-shadow"),h=ne("text-shadow"),d=ne("drop-shadow"),g=ne("blur"),v=ne("perspective"),b=ne("aspect"),x=ne("ease"),y=ne("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...S(),I,N],P=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],$=()=>[I,N,a],F=()=>[ct,"full","auto",...$()],k=()=>[We,"none","subgrid",I,N],D=()=>["auto",{span:["full",We,I,N]},We,I,N],W=()=>[We,"auto",I,N],z=()=>["auto","min","max","fr",I,N],O=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],A=()=>["start","end","center","stretch","center-safe","end-safe"],_=()=>["auto",...$()],L=()=>[ct,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...$()],C=()=>[e,I,N],M=()=>[...S(),Co,Eo,{position:[I,N]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",cu,su,{size:[I,N]}],B=()=>[Dn,Rt,Ze],j=()=>["","none","full",c,I,N],ee=()=>["",U,Rt,Ze],Y=()=>["solid","dashed","dotted","double"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>[U,Dn,Co,Eo],pe=()=>["","none",g,I,N],de=()=>["none",U,I,N],lt=()=>["none",U,I,N],Et=()=>[U,I,N],at=()=>[ct,"full",...$()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Me],breakpoint:[Me],color:[tu],container:[Me],"drop-shadow":[Me],ease:["in","out","in-out"],font:[iu],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Me],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Me],shadow:[Me],spacing:["px",U],text:[Me],"text-shadow":[Me],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ct,N,I,b]}],container:["container"],columns:[{columns:[U,N,I,l]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:R()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{start:F()}],end:[{end:F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[We,"auto",I,N]}],basis:[{basis:[ct,"full","auto",l,...$()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[U,ct,"auto","initial","none",N]}],grow:[{grow:["",U,I,N]}],shrink:[{shrink:["",U,I,N]}],order:[{order:[We,"first","last","none",I,N]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:$()}],"gap-x":[{"gap-x":$()}],"gap-y":[{"gap-y":$()}],"justify-content":[{justify:[...O(),"normal"]}],"justify-items":[{"justify-items":[...A(),"normal"]}],"justify-self":[{"justify-self":["auto",...A()]}],"align-content":[{content:["normal",...O()]}],"align-items":[{items:[...A(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...A(),{baseline:["","last"]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...A(),"baseline"]}],"place-self":[{"place-self":["auto",...A()]}],p:[{p:$()}],px:[{px:$()}],py:[{py:$()}],ps:[{ps:$()}],pe:[{pe:$()}],pt:[{pt:$()}],pr:[{pr:$()}],pb:[{pb:$()}],pl:[{pl:$()}],m:[{m:_()}],mx:[{mx:_()}],my:[{my:_()}],ms:[{ms:_()}],me:[{me:_()}],mt:[{mt:_()}],mr:[{mr:_()}],mb:[{mb:_()}],ml:[{ml:_()}],"space-x":[{"space-x":$()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":$()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],w:[{w:[l,"screen",...L()]}],"min-w":[{"min-w":[l,"screen","none",...L()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[s]},...L()]}],h:[{h:["screen","lh",...L()]}],"min-h":[{"min-h":["screen","lh","none",...L()]}],"max-h":[{"max-h":["screen","lh",...L()]}],"font-size":[{text:["base",n,Rt,Ze]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,I,jn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Dn,N]}],"font-family":[{font:[au,N,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,I,N]}],"line-clamp":[{"line-clamp":[U,"none",I,jn]}],leading:[{leading:[i,...$()]}],"list-image":[{"list-image":["none",I,N]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",I,N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[U,"from-font","auto",I,Ze]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[U,"auto",I,N]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",I,N]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",I,N]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:V()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},We,I,N],radial:["",I,N],conic:[We,I,N]},uu,lu]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Y(),"hidden","none"]}],"divide-style":[{divide:[...Y(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[U,I,N]}],"outline-w":[{outline:["",U,Rt,Ze]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",u,Gt,qt]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",f,Gt,qt]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[U,Ze]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",h,Gt,qt]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[U,I,N]}],"mix-blend":[{"mix-blend":[...H(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":H()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[U]}],"mask-image-linear-from-pos":[{"mask-linear-from":G()}],"mask-image-linear-to-pos":[{"mask-linear-to":G()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":G()}],"mask-image-t-to-pos":[{"mask-t-to":G()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":G()}],"mask-image-r-to-pos":[{"mask-r-to":G()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":G()}],"mask-image-b-to-pos":[{"mask-b-to":G()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":G()}],"mask-image-l-to-pos":[{"mask-l-to":G()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":G()}],"mask-image-x-to-pos":[{"mask-x-to":G()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":G()}],"mask-image-y-to-pos":[{"mask-y-to":G()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[I,N]}],"mask-image-radial-from-pos":[{"mask-radial-from":G()}],"mask-image-radial-to-pos":[{"mask-radial-to":G()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[U]}],"mask-image-conic-from-pos":[{"mask-conic-from":G()}],"mask-image-conic-to-pos":[{"mask-conic-to":G()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:X()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",I,N]}],filter:[{filter:["","none",I,N]}],blur:[{blur:pe()}],brightness:[{brightness:[U,I,N]}],contrast:[{contrast:[U,I,N]}],"drop-shadow":[{"drop-shadow":["","none",d,Gt,qt]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",U,I,N]}],"hue-rotate":[{"hue-rotate":[U,I,N]}],invert:[{invert:["",U,I,N]}],saturate:[{saturate:[U,I,N]}],sepia:[{sepia:["",U,I,N]}],"backdrop-filter":[{"backdrop-filter":["","none",I,N]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[U,I,N]}],"backdrop-contrast":[{"backdrop-contrast":[U,I,N]}],"backdrop-grayscale":[{"backdrop-grayscale":["",U,I,N]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[U,I,N]}],"backdrop-invert":[{"backdrop-invert":["",U,I,N]}],"backdrop-opacity":[{"backdrop-opacity":[U,I,N]}],"backdrop-saturate":[{"backdrop-saturate":[U,I,N]}],"backdrop-sepia":[{"backdrop-sepia":["",U,I,N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":$()}],"border-spacing-x":[{"border-spacing-x":$()}],"border-spacing-y":[{"border-spacing-y":$()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",I,N]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[U,"initial",I,N]}],ease:[{ease:["linear","initial",x,I,N]}],delay:[{delay:[U,I,N]}],animate:[{animate:["none",y,I,N]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,I,N]}],"perspective-origin":[{"perspective-origin":R()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:lt()}],"scale-x":[{"scale-x":lt()}],"scale-y":[{"scale-y":lt()}],"scale-z":[{"scale-z":lt()}],"scale-3d":["scale-3d"],skew:[{skew:Et()}],"skew-x":[{"skew-x":Et()}],"skew-y":[{"skew-y":Et()}],transform:[{transform:[I,N,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:at()}],"translate-x":[{"translate-x":at()}],"translate-y":[{"translate-y":at()}],"translate-z":[{"translate-z":at()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",I,N]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",I,N]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[U,Rt,Ze,jn]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},pu=Gc(mu);function re(...e){return pu(kc(e))}function he({align:e,children:t,className:n,direction:r,gap:o=0,grow:i,justify:s,shrink:l,style:a,wrap:c,...u}){return E.jsx("div",{className:re("flex",{"items-center":e==="center","items-end":e==="end","items-start":e==="start","items-stretch":e==="stretch","flex-col":r==="column","flex-row":r==="row","gap-1":o===1,"gap-2":o===2,"gap-3":o===3,"gap-4":o===4,"gap-5":o===5,"gap-6":o===6,"gap-7":o===7,"gap-8":o===8,"grow-0":i===0,"grow-1":i===1,"justify-around":s==="around","justify-between":s==="between","justify-center":s==="center","justify-end":s==="end","justify-start":s==="start","justify-stretch":s==="stretch","shrink-0":l===0,"shrink-1":l===1,"flex-wrap":c},n),style:a,...u,children:t})}const hu=p.createContext(null),_n={didCatch:!1,error:null};let gu=class extends p.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=_n}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:i,reason:"imperative-api"}),this.setState(_n)}}componentDidCatch(t,n){var r,o;(r=(o=this.props).onError)===null||r===void 0||r.call(o,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:o}=this.props;if(r&&n.error!==null&&vu(t.resetKeys,o)){var i,s;(i=(s=this.props).onReset)===null||i===void 0||i.call(s,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(_n)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:o}=this.props,{didCatch:i,error:s}=this.state;let l=t;if(i){const a={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")l=n(a);else if(r)l=p.createElement(r,a);else if(o!==void 0)l=o;else throw s}return p.createElement(hu.Provider,{value:{didCatch:i,error:s,resetErrorBoundary:this.resetErrorBoundary}},l)}};function vu(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}function Fr({children:e,className:t,html:n=!1,inline:r=!1,intent:o="none",minimal:i,...s}){let l=Gl;switch(o){case"none":case"primary":{l=Yl;break}case"success":{l=Vl;break}}return E.jsx("div",{className:`${r?"w-fit":"w-full"} rounded-md p-2 px-3 ${bu(o,!!i)} ${t}`,role:"alert",...s,children:E.jsxs("div",{className:"flex flex-row gap-2",children:[E.jsx(l,{className:"w-6 h-6 shrink-0"}),n?E.jsx("div",{dangerouslySetInnerHTML:{__html:e}}):E.jsx("div",{children:e})]})})}function bu(e,t){switch(e){case"danger":return t?"bg-red-950 text-red-300 [&_svg]:text-red-500":"bg-black/10 bg-border border-2 border-red-500 text-white [&_svg]:text-red-500 [&_a]:text-red-400!";case"none":return t?"bg-white/10 text-slate-300 [&_svg]:text-slate-400":"bg-black/10 bg-border border-2 border-white/40 text-white [&_svg]:text-white/60";case"primary":return t?"bg-sky-950 text-sky-300 [&_svg]:text-sky-400":"bg-black/10 bg-border border-2 border-sky-400 text-white [&_svg]:text-sky-400";case"success":return t?"bg-emerald-950 text-emerald-300 [&_svg]:text-emerald-400":"bg-black/10 bg-border border-2 border-emerald-400 text-white [&_svg]:text-emerald-400";case"warning":return t?"bg-amber-950/65 text-amber-200 [&_svg]:text-amber-300":"bg-black/10 bg-border border-2 border-amber-400 text-white [&_svg]:text-amber-400 [&_a]:text-amber-400!"}}const os=typeof document<"u"?p.useLayoutEffect:()=>{};var Bn;const xu=(Bn=p.useInsertionEffect)!==null&&Bn!==void 0?Bn:os;function wu(e){const t=p.useRef(null);return xu(()=>{t.current=e},[e]),p.useCallback((...n)=>{const r=t.current;return r?.(...n)},[])}const Xe=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},Je=e=>e&&"window"in e&&e.window===e?e:Xe(e).defaultView||window;function yu(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function Eu(e){return yu(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let Cu=!1;function Nr(){return Cu}function is(e,t){if(!Nr())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:Eu(n)?n=n.host:n=n.parentNode}return!1}const cr=(e=document)=>{var t;if(!Nr())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function ss(e){return Nr()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function xn(e){var t;if(typeof window>"u"||window.navigator==null)return!1;let n=(t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands;return Array.isArray(n)&&n.some(r=>e.test(r.brand))||e.test(window.navigator.userAgent)}function Ir(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function He(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const Dr=He(function(){return Ir(/^Mac/i)}),Ru=He(function(){return Ir(/^iPhone/i)}),Su=He(function(){return Ir(/^iPad/i)||Dr()&&navigator.maxTouchPoints>1}),ku=He(function(){return Ru()||Su()});He(function(){return Dr()||ku()});He(function(){return xn(/AppleWebKit/i)&&!$u()});const $u=He(function(){return xn(/Chrome/i)}),Pu=He(function(){return xn(/Android/i)});He(function(){return xn(/Firefox/i)});function ls(){let e=p.useRef(new Map),t=p.useCallback((o,i,s,l)=>{let a=l?.once?(...c)=>{e.current.delete(s),s(...c)}:s;e.current.set(s,{type:i,eventTarget:o,fn:a,options:l}),o.addEventListener(i,a,l)},[]),n=p.useCallback((o,i,s,l)=>{var a;let c=((a=e.current.get(s))===null||a===void 0?void 0:a.fn)||s;o.removeEventListener(i,c,l),e.current.delete(s)},[]),r=p.useCallback(()=>{e.current.forEach((o,i)=>{n(o.eventTarget,o.type,i,o.options)})},[n]);return p.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Tu(e){return e.pointerType===""&&e.isTrusted?!0:Pu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function as(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Ou(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function cs(e){let t=p.useRef({isFocused:!1,observer:null});os(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=wu(r=>{e?.(r)});return p.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=r.target,i=s=>{if(t.current.isFocused=!1,o.disabled){let l=as(s);n(l)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let l=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:l})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:l}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let Lu=!1,jt=null,ur=new Set,$t=new Map,tt=!1,dr=!1;const Mu={Tab:!0,Escape:!0};function jr(e,t){for(let n of ur)n(e,t)}function Au(e){return!(e.metaKey||!Dr()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function un(e){tt=!0,Au(e)&&(jt="keyboard",jr("keyboard",e))}function we(e){jt="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(tt=!0,jr("pointer",e))}function us(e){Tu(e)&&(tt=!0,jt="virtual")}function ds(e){e.target===window||e.target===document||Lu||!e.isTrusted||(!tt&&!dr&&(jt="virtual",jr("virtual",e)),tt=!1,dr=!1)}function fs(){tt=!1,dr=!0}function fr(e){if(typeof window>"u"||typeof document>"u"||$t.get(Je(e)))return;const t=Je(e),n=Xe(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){tt=!0,r.apply(this,arguments)},n.addEventListener("keydown",un,!0),n.addEventListener("keyup",un,!0),n.addEventListener("click",us,!0),t.addEventListener("focus",ds,!0),t.addEventListener("blur",fs,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",we,!0),n.addEventListener("pointermove",we,!0),n.addEventListener("pointerup",we,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",we,!0),n.addEventListener("mousemove",we,!0),n.addEventListener("mouseup",we,!0)),t.addEventListener("beforeunload",()=>{ms(e)},{once:!0}),$t.set(t,{focus:r})}const ms=(e,t)=>{const n=Je(e),r=Xe(e);t&&r.removeEventListener("DOMContentLoaded",t),$t.has(n)&&(n.HTMLElement.prototype.focus=$t.get(n).focus,r.removeEventListener("keydown",un,!0),r.removeEventListener("keyup",un,!0),r.removeEventListener("click",us,!0),n.removeEventListener("focus",ds,!0),n.removeEventListener("blur",fs,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",we,!0),r.removeEventListener("pointermove",we,!0),r.removeEventListener("pointerup",we,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",we,!0),r.removeEventListener("mousemove",we,!0),r.removeEventListener("mouseup",we,!0)),$t.delete(n))};function Fu(e){const t=Xe(e);let n;return t.readyState!=="loading"?fr(e):(n=()=>{fr(e)},t.addEventListener("DOMContentLoaded",n)),()=>ms(e,n)}typeof document<"u"&&Fu();function ps(){return jt!=="pointer"}const Nu=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Iu(e,t,n){let r=Xe(n?.target);const o=typeof window<"u"?Je(n?.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?Je(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?Je(n?.target).HTMLElement:HTMLElement,l=typeof window<"u"?Je(n?.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof o&&!Nu.has(r.activeElement.type)||r.activeElement instanceof i||r.activeElement instanceof s&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof l&&!Mu[n.key])}function Du(e,t,n){fr(),p.useEffect(()=>{let r=(o,i)=>{Iu(!!n?.isTextInput,o,i)&&e(ps())};return ur.add(r),()=>{ur.delete(r)}},t)}function ju(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const i=p.useCallback(a=>{if(a.target===a.currentTarget)return r&&r(a),o&&o(!1),!0},[r,o]),s=cs(i),l=p.useCallback(a=>{const c=Xe(a.target),u=c?cr(c):cr();a.target===a.currentTarget&&u===ss(a.nativeEvent)&&(n&&n(a),o&&o(!0),s(a))},[o,n,s]);return{focusProps:{onFocus:!t&&(n||o||r)?l:void 0,onBlur:!t&&(r||o)?i:void 0}}}function _u(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=p.useRef({isFocusWithin:!1}),{addGlobalListener:s,removeAllGlobalListeners:l}=ls(),a=p.useCallback(f=>{f.currentTarget.contains(f.target)&&i.current.isFocusWithin&&!f.currentTarget.contains(f.relatedTarget)&&(i.current.isFocusWithin=!1,l(),n&&n(f),o&&o(!1))},[n,o,i,l]),c=cs(a),u=p.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const h=Xe(f.target),d=cr(h);if(!i.current.isFocusWithin&&d===ss(f.nativeEvent)){r&&r(f),o&&o(!0),i.current.isFocusWithin=!0,c(f);let g=f.currentTarget;s(h,"focus",v=>{if(i.current.isFocusWithin&&!is(g,v.target)){let b=new h.defaultView.FocusEvent("blur",{relatedTarget:v.target});Ou(b,g);let x=as(b);a(x)}},{capture:!0})}},[r,o,c,s,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:a}}}let dn=!1,Kt=0;function mr(){dn=!0,setTimeout(()=>{dn=!1},50)}function Ro(e){e.pointerType==="touch"&&mr()}function Bu(){if(!(typeof document>"u"))return Kt===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",Ro):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",mr)),Kt++,()=>{Kt--,!(Kt>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Ro):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",mr))}}function _r(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,s]=p.useState(!1),l=p.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;p.useEffect(Bu,[]);let{addGlobalListener:a,removeAllGlobalListeners:c}=ls(),{hoverProps:u,triggerHoverEnd:f}=p.useMemo(()=>{let h=(v,b)=>{if(l.pointerType=b,o||b==="touch"||l.isHovered||!v.currentTarget.contains(v.target))return;l.isHovered=!0;let x=v.currentTarget;l.target=x,a(Xe(v.target),"pointerover",y=>{l.isHovered&&l.target&&!is(l.target,y.target)&&d(y,y.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:x,pointerType:b}),n&&n(!0),s(!0)},d=(v,b)=>{let x=l.target;l.pointerType="",l.target=null,!(b==="touch"||!l.isHovered||!x)&&(l.isHovered=!1,c(),r&&r({type:"hoverend",target:x,pointerType:b}),n&&n(!1),s(!1))},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=v=>{dn&&v.pointerType==="mouse"||h(v,v.pointerType)},g.onPointerLeave=v=>{!o&&v.currentTarget.contains(v.target)&&d(v,v.pointerType)}):process.env.NODE_ENV==="test"&&(g.onTouchStart=()=>{l.ignoreEmulatedMouseEvents=!0},g.onMouseEnter=v=>{!l.ignoreEmulatedMouseEvents&&!dn&&h(v,"mouse"),l.ignoreEmulatedMouseEvents=!1},g.onMouseLeave=v=>{!o&&v.currentTarget.contains(v.target)&&d(v,"mouse")}),{hoverProps:g,triggerHoverEnd:d}},[t,n,r,o,l,a,c]);return p.useEffect(()=>{o&&f({currentTarget:l.target},l.pointerType)},[o]),{hoverProps:u,isHovered:i}}function Br(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=p.useRef({isFocused:!1,isFocusVisible:t||ps()}),[i,s]=p.useState(!1),[l,a]=p.useState(()=>o.current.isFocused&&o.current.isFocusVisible),c=p.useCallback(()=>a(o.current.isFocused&&o.current.isFocusVisible),[]),u=p.useCallback(d=>{o.current.isFocused=d,s(d),c()},[c]);Du(d=>{o.current.isFocusVisible=d,c()},[],{isTextInput:n});let{focusProps:f}=ju({isDisabled:r,onFocusChange:u}),{focusWithinProps:h}=_u({isDisabled:!r,onFocusWithinChange:u});return{isFocused:i,isFocusVisible:l,focusProps:r?h:f}}var Hu=Object.defineProperty,Vu=(e,t,n)=>t in e?Hu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hn=(e,t,n)=>(Vu(e,typeof t!="symbol"?t+"":t,n),n);let Wu=class{constructor(){Hn(this,"current",this.detect()),Hn(this,"handoffState","pending"),Hn(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}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"}},$e=new Wu;function _t(e){var t;return $e.isServer?null:e==null?document:(t=e?.ownerDocument)!=null?t:document}function fn(e){var t,n;return $e.isServer?null:e==null?document:(n=(t=e?.getRootNode)==null?void 0:t.call(e))!=null?n:document}function hs(e){var t,n;return(n=(t=fn(e))==null?void 0:t.activeElement)!=null?n:null}function zu(e){return hs(e)===e}function gs(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function ve(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return gs(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=ve();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function ot(){let[e]=p.useState(ve);return p.useEffect(()=>()=>e.dispose(),[e]),e}let te=(e,t)=>{$e.isServer?p.useEffect(e,t):p.useLayoutEffect(e,t)};function it(e){let t=p.useRef(e);return te(()=>{t.current=e},[e]),t}let q=function(e){let t=it(e);return p.useCallback((...n)=>t.current(...n),[t])};function Uu(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function qu(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function Hr({disabled:e=!1}={}){let t=p.useRef(null),[n,r]=p.useState(!1),o=ot(),i=q(()=>{t.current=null,r(!1),o.dispose()}),s=q(l=>{if(o.dispose(),t.current===null){t.current=l.currentTarget,r(!0);{let a=_t(l.currentTarget);o.addEventListener(a,"pointerup",i,!1),o.addEventListener(a,"pointermove",c=>{if(t.current){let u=Uu(c);r(qu(u,t.current.getBoundingClientRect()))}},!1),o.addEventListener(a,"pointercancel",i,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:s,onPointerUp:i,onClick:i}}}function ye(e){return p.useMemo(()=>e,Object.values(e))}let Gu=p.createContext(void 0);function wn(){return p.useContext(Gu)}function pr(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function ce(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ce),r}var pt=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(pt||{}),Ue=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Ue||{});function ie(){let e=Yu();return p.useCallback(t=>Ku({mergeRefs:e,...t}),[e])}function Ku({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:s,mergeRefs:l}){l=l??Xu;let a=vs(t,e);if(i)return Yt(a,n,r,s,l);let c=o??0;if(c&2){let{static:u=!1,...f}=a;if(u)return Yt(f,n,r,s,l)}if(c&1){let{unmount:u=!0,...f}=a;return ce(u?0:1,{0(){return null},1(){return Yt({...f,hidden:!0,style:{display:"none"}},n,r,s,l)}})}return Yt(a,n,r,s,l)}function Yt(e,t={},n,r,o){let{as:i=n,children:s,refName:l="ref",...a}=Vn(e,["unmount","static"]),c=e.ref!==void 0?{[l]:e.ref}:{},u=typeof s=="function"?s(t):s;"className"in a&&a.className&&typeof a.className=="function"&&(a.className=a.className(t)),a["aria-labelledby"]&&a["aria-labelledby"]===a.id&&(a["aria-labelledby"]=void 0);let f={};if(t){let h=!1,d=[];for(let[g,v]of Object.entries(t))typeof v=="boolean"&&(h=!0),v===!0&&d.push(g.replace(/([A-Z])/g,b=>`-${b.toLowerCase()}`));if(h){f["data-headlessui-state"]=d.join(" ");for(let g of d)f[`data-${g}`]=""}}if(ft(i)&&(Object.keys(ze(a)).length>0||Object.keys(ze(f)).length>0))if(!p.isValidElement(u)||Array.isArray(u)&&u.length>1||Ju(u)){if(Object.keys(ze(a)).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(ze(a)).concat(Object.keys(ze(f))).map(h=>` - ${h}`).join(`
|
|
4
4
|
`),"","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(h=>` - ${h}`).join(`
|
|
5
5
|
`)].join(`
|
|
6
|
-
`))}else{let h=u.props,d=h?.className,g=typeof d=="function"?(...x)=>pr(d(...x),a.className):pr(d,a.className),v=g?{className:g}:{},b=gs(u.props,ze(Vn(a,["ref"])));for(let x in f)x in b&&delete f[x];return p.cloneElement(u,Object.assign({},b,f,c,{ref:o(Xu(u),c.ref)},v))}return p.createElement(i,Object.assign({},Vn(a,["ref"]),!ft(i)&&c,!ft(i)&&f),u)}function Ku(){let e=p.useRef([]),t=p.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function Yu(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function gs(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[o=>{var i;return(i=o?.preventDefault)==null?void 0:i.call(o)}]);for(let r in n)Object.assign(t,{[r](o,...i){let s=n[r];for(let l of s){if((o instanceof Event||o?.nativeEvent instanceof Event)&&o.defaultPrevented)return;l(o,...i)}}});return t}function Lt(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];for(let r in n)Object.assign(t,{[r](...o){let i=n[r];for(let s of i)s?.(...o)}});return t}function oe(e){var t;return Object.assign(p.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function ze(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Vn(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function Xu(e){return p.version.split(".")[0]>="19"?e.props.ref:e.ref}function ft(e){return e===p.Fragment||e===Symbol.for("react.fragment")}function Zu(e){return ft(e.type)}let Ju="button";function Qu(e,t){var n;let r=wn(),{disabled:o=r||!1,autoFocus:i=!1,...s}=e,{isFocusVisible:l,focusProps:a}=Br({autoFocus:i}),{isHovered:c,hoverProps:u}=_r({isDisabled:o}),{pressed:f,pressProps:h}=Hr({disabled:o}),d=Lt({ref:t,type:(n=s.type)!=null?n:"button",disabled:o||void 0,autoFocus:i},a,u,h),g=ye({disabled:o,hover:c,focus:l,active:f,autofocus:i});return ie()({ourProps:d,theirProps:s,slot:g,defaultTag:Ju,name:"Button"})}let ed=oe(Qu);function td(e,t,n){let[r,o]=p.useState(n),i=e!==void 0,s=p.useRef(i),l=p.useRef(!1),a=p.useRef(!1);return i&&!s.current&&!l.current?(l.current=!0,s.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&s.current&&!a.current&&(a.current=!0,s.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:r,q(c=>(i||Ye.flushSync(()=>o(c)),t?.(c)))]}function nd(e){let[t]=p.useState(e);return t}function vs(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))xs(n,bs(t,r),o);return n}function bs(e,t){return e?e+"["+t+"]":t}function xs(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())xs(e,bs(t,r.toString()),o);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):od(n)&&!p.isValidElement(n)&&vs(n,t,e)}function rd(e){var t,n;let r=(t=e?.form)!=null?t:e.closest("form");if(r){for(let o of r.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(n=r.requestSubmit)==null||n.call(r)}}function od(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}let id="span";var Vr=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Vr||{});function sd(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["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 ie()({ourProps:i,theirProps:o,slot:{},defaultTag:id,name:"Hidden"})}let ws=oe(sd),ld=p.createContext(null);function ad({children:e}){let t=p.useContext(ld);if(!t)return p.createElement(p.Fragment,null,e);let{target:n}=t;return n?Ye.createPortal(p.createElement(p.Fragment,null,e),n):null}function cd({data:e,form:t,disabled:n,onReset:r,overrides:o}){let[i,s]=p.useState(null),l=ot();return p.useEffect(()=>{if(r&&i)return l.addEventListener(i,"reset",r)},[i,t,r]),p.createElement(ad,null,p.createElement(ud,{setForm:s,formId:t}),vs(e).map(([a,c])=>p.createElement(ws,{features:Vr.Hidden,...ze({key:a,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:a,value:c,...o})})))}function ud({setForm:e,formId:t}){return p.useEffect(()=>{if(t){let n=document.getElementById(t);n&&e(n)}},[e,t]),t?null:p.createElement(ws,{features:Vr.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:n=>{if(!n)return;let r=n.closest("form");r&&e(r)}})}let dd=p.createContext(void 0);function ys(){return p.useContext(dd)}function Es(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function yn(e){return Es(e)&&"tagName"in e}function Ve(e){return yn(e)&&"accessKey"in e}function qe(e){return yn(e)&&"tabIndex"in e}function fd(e){return yn(e)&&"style"in e}function md(e){return Ve(e)&&e.nodeName==="IFRAME"}function Cs(e){return Ve(e)&&e.nodeName==="INPUT"}function So(e){return Ve(e)&&e.nodeName==="LABEL"}function pd(e){return Ve(e)&&e.nodeName==="FIELDSET"}function Rs(e){return Ve(e)&&e.nodeName==="LEGEND"}function hd(e){return yn(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function hr(e){let t=e.parentElement,n=null;for(;t&&!pd(t);)Rs(t)&&(n=t),t=t.parentElement;let r=t?.getAttribute("disabled")==="";return r&&gd(n)?!1:r}function gd(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(Rs(t))return!1;t=t.previousElementSibling}return!0}let Ss=Symbol();function $s(e,t=!0){return Object.assign(e,{[Ss]:t})}function ue(...e){let t=p.useRef(e);p.useEffect(()=>{t.current=e},[e]);let n=q(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||r?.[Ss])?void 0:n}let Wr=p.createContext(null);Wr.displayName="DescriptionContext";function ks(){let e=p.useContext(Wr);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,ks),t}return e}function vd(){var e,t;return(t=(e=p.useContext(Wr))==null?void 0:e.value)!=null?t:void 0}let bd="p";function xd(e,t){let n=p.useId(),r=wn(),{id:o=`headlessui-description-${n}`,...i}=e,s=ks(),l=ue(t);te(()=>s.register(o),[o,s.register]);let a=ye({...s.slot,disabled:r||!1}),c={ref:l,...s.props,id:o};return ie()({ourProps:c,theirProps:i,slot:a,defaultTag:bd,name:s.name||"Description"})}let wd=oe(xd);Object.assign(wd,{});var J=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(J||{});let En=p.createContext(null);En.displayName="LabelContext";function Ps(){let e=p.useContext(En);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Ps),t}return e}function Ts(e){var t,n,r;let o=(n=(t=p.useContext(En))==null?void 0:t.value)!=null?n:void 0;return((r=e?.length)!=null?r:0)>0?[o,...e].filter(Boolean).join(" "):o}function yd({inherit:e=!1}={}){let t=Ts(),[n,r]=p.useState([]),o=e?[t,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,p.useMemo(()=>function(i){let s=q(a=>(r(c=>[...c,a]),()=>r(c=>{let u=c.slice(),f=u.indexOf(a);return f!==-1&&u.splice(f,1),u}))),l=p.useMemo(()=>({register:s,slot:i.slot,name:i.name,props:i.props,value:i.value}),[s,i.slot,i.name,i.props,i.value]);return p.createElement(En.Provider,{value:l},i.children)},[r])]}let Ed="label";function Cd(e,t){var n;let r=p.useId(),o=Ps(),i=ys(),s=wn(),{id:l=`headlessui-label-${r}`,htmlFor:a=i??((n=o.props)==null?void 0:n.htmlFor),passive:c=!1,...u}=e,f=ue(t);te(()=>o.register(l),[l,o.register]);let h=q(v=>{let b=v.currentTarget;if(!(v.target!==v.currentTarget&&hd(v.target))&&(So(b)&&v.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(v),So(b))){let x=document.getElementById(b.htmlFor);if(x){let y=x.getAttribute("disabled");if(y==="true"||y==="")return;let w=x.getAttribute("aria-disabled");if(w==="true"||w==="")return;(Cs(x)&&(x.type==="file"||x.type==="radio"||x.type==="checkbox")||x.role==="radio"||x.role==="checkbox"||x.role==="switch")&&x.click(),x.focus({preventScroll:!0})}}}),d=ye({...o.slot,disabled:s||!1}),g={ref:f,...o.props,id:l,htmlFor:a,onClick:h};return c&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in u&&delete u.onClick),ie()({ourProps:g,theirProps:u,slot:d,defaultTag:a?Ed:"div",name:o.name||"Label"})}let Rd=oe(Cd),Sd=Object.assign(Rd,{}),$d=p.createContext(()=>{});function kd({value:e,children:t}){return p.createElement($d.Provider,{value:e},t)}function Pd(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function Td(e=Pd){return p.useCallback((t,n)=>{if(typeof e=="string"){let r=e;return t?.[r]===n?.[r]}return e(t,n)},[e])}function $o(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function Od(e,t,n=!1){let[r,o]=p.useState(()=>$o(t));return te(()=>{if(!t||!e)return;let i=ve();return i.requestAnimationFrame(function s(){i.requestAnimationFrame(s),o(l=>{let a=$o(t);return a.width===l.width&&a.height===l.height?l:a})}),()=>{i.dispose()}},[t,e]),n?{width:`${r.width}px`,height:`${r.height}px`}:r}var Os=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Os||{});function Ld(e){let t=p.useRef(null),n=q(o=>{t.current=o.pointerType,!hr(o.currentTarget)&&o.pointerType==="mouse"&&o.button===Os.Left&&(o.preventDefault(),e(o))}),r=q(o=>{t.current!=="mouse"&&(hr(o.currentTarget)||e(o))});return{onPointerDown:n,onClick:r}}let Ls=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};var Md=Object.defineProperty,Ad=(e,t,n)=>t in e?Md(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fd=(e,t,n)=>(Ad(e,t+"",n),n),Ms=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},be=(e,t,n)=>(Ms(e,t,"read from private field"),n?n.call(e):t.get(e)),Wn=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},ko=(e,t,n,r)=>(Ms(e,t,"write to private field"),t.set(e,n),n),Se,St,$t;let As=class{constructor(t){Wn(this,Se,{}),Wn(this,St,new Ls(()=>new Set)),Wn(this,$t,new Set),Fd(this,"disposables",ve()),ko(this,Se,t),ke.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return be(this,Se)}subscribe(t,n){if(ke.isServer)return()=>{};let r={selector:t,callback:n,current:t(be(this,Se))};return be(this,$t).add(r),this.disposables.add(()=>{be(this,$t).delete(r)})}on(t,n){return ke.isServer?()=>{}:(be(this,St).get(t).add(n),this.disposables.add(()=>{be(this,St).get(t).delete(n)}))}send(t){let n=this.reduce(be(this,Se),t);if(n!==be(this,Se)){ko(this,Se,n);for(let r of be(this,$t)){let o=r.selector(be(this,Se));Fs(r.current,o)||(r.current=o,r.callback(o))}for(let r of be(this,St).get(t.type))r(be(this,Se),t)}}};Se=new WeakMap,St=new WeakMap,$t=new WeakMap;function Fs(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null?!1:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:zn(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:zn(e.entries(),t.entries()):Po(e)&&Po(t)?zn(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function zn(e,t){do{let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}while(!0)}function Po(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function Un(e){let[t,n]=e(),r=ve();return(...o)=>{t(...o),r.dispose(),r.microTask(n)}}var Nd=Object.defineProperty,Id=(e,t,n)=>t in e?Nd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,To=(e,t,n)=>(Id(e,typeof t!="symbol"?t+"":t,n),n),Ns=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(Ns||{});let Dd={0(e,t){let n=t.id,r=e.stack,o=e.stack.indexOf(n);if(o!==-1){let i=e.stack.slice();return i.splice(o,1),i.push(n),r=i,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(r===-1)return e;let o=e.stack.slice();return o.splice(r,1),{...e,stack:o}}},jd=class Is extends As{constructor(){super(...arguments),To(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),To(this,"selectors",{isTop:(t,n)=>t.stack[t.stack.length-1]===n,inStack:(t,n)=>t.stack.includes(n)})}static new(){return new Is({stack:[]})}reduce(t,n){return ce(n.type,Dd,t,n)}};const zr=new Ls(()=>jd.new());var Xt={exports:{}},qn={};var Oo;function _d(){if(Oo)return qn;Oo=1;var e=p;function t(a,c){return a===c&&(a!==0||1/a===1/c)||a!==a&&c!==c}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,i=e.useEffect,s=e.useMemo,l=e.useDebugValue;return qn.useSyncExternalStoreWithSelector=function(a,c,u,f,h){var d=o(null);if(d.current===null){var g={hasValue:!1,value:null};d.current=g}else g=d.current;d=s(function(){function b(R){if(!x){if(x=!0,y=R,R=f(R),h!==void 0&&g.hasValue){var P=g.value;if(h(P,R))return w=P}return w=R}if(P=w,n(y,R))return P;var T=f(R);return h!==void 0&&h(P,T)?(y=R,P):(y=R,w=T)}var x=!1,y,w,S=u===void 0?null:u;return[function(){return b(c())},S===null?void 0:function(){return b(S())}]},[c,u,f,h]);var v=r(a,d[0],d[1]);return i(function(){g.hasValue=!0,g.value=v},[v]),l(v),v},qn}var Gn={};var Lo;function Bd(){return Lo||(Lo=1,process.env.NODE_ENV!=="production"&&(function(){function e(a,c){return a===c&&(a!==0||1/a===1/c)||a!==a&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=p,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,o=t.useRef,i=t.useEffect,s=t.useMemo,l=t.useDebugValue;Gn.useSyncExternalStoreWithSelector=function(a,c,u,f,h){var d=o(null);if(d.current===null){var g={hasValue:!1,value:null};d.current=g}else g=d.current;d=s(function(){function b(R){if(!x){if(x=!0,y=R,R=f(R),h!==void 0&&g.hasValue){var P=g.value;if(h(P,R))return w=P}return w=R}if(P=w,n(y,R))return P;var T=f(R);return h!==void 0&&h(P,T)?(y=R,P):(y=R,w=T)}var x=!1,y,w,S=u===void 0?null:u;return[function(){return b(c())},S===null?void 0:function(){return b(S())}]},[c,u,f,h]);var v=r(a,d[0],d[1]);return i(function(){g.hasValue=!0,g.value=v},[v]),l(v),v},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Gn}var Mo;function Hd(){return Mo||(Mo=1,process.env.NODE_ENV==="production"?Xt.exports=_d():Xt.exports=Bd()),Xt.exports}var Vd=Hd();function fe(e,t,n=Fs){return Vd.useSyncExternalStoreWithSelector(q(r=>e.subscribe(Wd,r)),q(()=>e.state),q(()=>e.state),q(t),n)}function Wd(e){return e}function Ds(e,t){let n=p.useId(),r=zr.get(t),[o,i]=fe(r,p.useCallback(s=>[r.selectors.isTop(s,n),r.selectors.inStack(s,n)],[r,n]));return te(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?i?o:!0:!1}let gr=new Map,Pt=new Map;function Ao(e){var t;let n=(t=Pt.get(e))!=null?t:0;return Pt.set(e,n+1),n!==0?()=>Fo(e):(gr.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>Fo(e))}function Fo(e){var t;let n=(t=Pt.get(e))!=null?t:1;if(n===1?Pt.delete(e):Pt.set(e,n-1),n!==1)return;let r=gr.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,gr.delete(e))}function zd(e,{allowed:t,disallowed:n}={}){let r=Ds(e,"inert-others");te(()=>{var o,i;if(!r)return;let s=ve();for(let a of(o=n?.())!=null?o:[])a&&s.add(Ao(a));let l=(i=t?.())!=null?i:[];for(let a of l){if(!a)continue;let c=_t(a);if(!c)continue;let u=a.parentElement;for(;u&&u!==c.body;){for(let f of u.children)l.some(h=>f.contains(h))||s.add(Ao(f));u=u.parentElement}}return s.dispose},[r,t,n])}function Ud(e,t,n){let r=it(o=>{let i=o.getBoundingClientRect();i.x===0&&i.y===0&&i.width===0&&i.height===0&&n()});p.useEffect(()=>{if(!e)return;let o=t===null?null:Ve(t)?t:t.current;if(!o)return;let i=ve();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>r.current(o));s.observe(o),i.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>r.current(o));s.observe(o),i.add(()=>s.disconnect())}return()=>i.dispose()},[t,r,e])}let vr=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),qd=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var br=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(br||{}),Gd=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Gd||{}),Kd=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Kd||{});function js(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(vr)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function Yd(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(qd)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Ur=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ur||{});function _s(e,t=0){var n;return e===((n=_t(e))==null?void 0:n.body)?!1:ce(t,{0(){return e.matches(vr)},1(){let r=e;for(;r!==null;){if(r.matches(vr))return!0;r=r.parentElement}return!1}})}var Xd=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Xd||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));let Zd=["textarea","input"].join(",");function Jd(e){var t,n;return(n=(t=e?.matches)==null?void 0:t.call(e,Zd))!=null?n:!1}function Bs(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let s=o.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Qd(e,t,n=e===null?document.body:fn(e)){return ef(js(n),t,{relativeTo:e})}function ef(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?fn(e[0]):document:fn(e),s=Array.isArray(e)?n?Bs(e):e:t&64?Yd(e):js(e);o.length>0&&s.length>1&&(s=s.filter(d=>!o.some(g=>g!=null&&"current"in g?g?.current===d:g===d))),r=r??i?.activeElement;let l=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),a=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(r))-1;if(t&4)return Math.max(0,s.indexOf(r))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=t&32?{preventScroll:!0}:{},u=0,f=s.length,h;do{if(u>=f||u+f<=0)return 0;let d=a+u;if(t&16)d=(d+f)%f;else{if(d<0)return 3;if(d>=f)return 1}h=s[d],h?.focus(c),u+=l}while(h!==ps(h));return t&6&&Jd(h)&&h.select(),2}function Hs(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function tf(){return/Android/gi.test(window.navigator.userAgent)}function No(){return Hs()||tf()}function dt(e,t,n,r){let o=it(n);p.useEffect(()=>{if(!e)return;function i(s){o.current(s)}return document.addEventListener(t,i,r),()=>document.removeEventListener(t,i,r)},[e,t,r])}function nf(e,t,n,r){let o=it(n);p.useEffect(()=>{if(!e)return;function i(s){o.current(s)}return window.addEventListener(t,i,r),()=>window.removeEventListener(t,i,r)},[e,t,r])}const Io=30;function rf(e,t,n){let r=it(n),o=p.useCallback(function(l,a){if(l.defaultPrevented)return;let c=a(l);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let u=(function f(h){return typeof h=="function"?f(h()):Array.isArray(h)||h instanceof Set?h:[h]})(t);for(let f of u)if(f!==null&&(f.contains(c)||l.composed&&l.composedPath().includes(f)))return;return!_s(c,Ur.Loose)&&c.tabIndex!==-1&&l.preventDefault(),r.current(l,c)},[r,t]),i=p.useRef(null);dt(e,"pointerdown",l=>{var a,c;No()||(i.current=((c=(a=l.composedPath)==null?void 0:a.call(l))==null?void 0:c[0])||l.target)},!0),dt(e,"pointerup",l=>{if(No()||!i.current)return;let a=i.current;return i.current=null,o(l,()=>a)},!0);let s=p.useRef({x:0,y:0});dt(e,"touchstart",l=>{s.current.x=l.touches[0].clientX,s.current.y=l.touches[0].clientY},!0),dt(e,"touchend",l=>{let a={x:l.changedTouches[0].clientX,y:l.changedTouches[0].clientY};if(!(Math.abs(a.x-s.current.x)>=Io||Math.abs(a.y-s.current.y)>=Io))return o(l,()=>qe(l.target)?l.target:null)},!0),nf(e,"blur",l=>o(l,()=>md(window.document.activeElement)?window.document.activeElement:null),!0)}function xr(...e){return p.useMemo(()=>_t(...e),[...e])}var of=(e=>(e[e.Ignore=0]="Ignore",e[e.Select=1]="Select",e[e.Close=2]="Close",e))(of||{});const Zt={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},sf=200,Do=5;function lf(e,{trigger:t,action:n,close:r,select:o}){let i=p.useRef(null),s=p.useRef(null),l=p.useRef(null);dt(e&&t!==null,"pointerdown",a=>{Es(a?.target)&&t!=null&&t.contains(a.target)&&(s.current=a.x,l.current=a.y,i.current=a.timeStamp)}),dt(e&&t!==null,"pointerup",a=>{var c,u;let f=i.current;if(f===null||(i.current=null,!qe(a.target))||Math.abs(a.x-((c=s.current)!=null?c:a.x))<Do&&Math.abs(a.y-((u=l.current)!=null?u:a.y))<Do)return;let h=n(a);switch(h.kind){case 0:return;case 1:{a.timeStamp-f>sf&&(o(h.target),r());break}case 2:{r();break}}},{capture:!0})}function Vs(e,t){return p.useMemo(()=>{var n;if(e.type)return e.type;let r=(n=e.as)!=null?n:"button";if(typeof r=="string"&&r.toLowerCase()==="button"||t?.tagName==="BUTTON"&&!t.hasAttribute("type"))return"button"},[e.type,e.as,t])}function af(e){return p.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function cf(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let s=t[o].call(n,...i);s&&(n=s,r.forEach(l=>l()))}}}function uf(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=(n=t.defaultView)!=null?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),i=Math.max(0,e-o);n.style(r,"paddingRight",`${i}px`)}}}function df(){return Hs()?{before({doc:e,d:t,meta:n}){function r(o){for(let i of n().containers)for(let s of i())if(s.contains(o))return!0;return!1}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let l=ve();l.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>l.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,s=null;t.addEventListener(e,"click",l=>{if(qe(l.target))try{let a=l.target.closest("a");if(!a)return;let{hash:c}=new URL(a.href),u=e.querySelector(c);qe(u)&&!r(u)&&(s=u)}catch{}},!0),t.group(l=>{t.addEventListener(e,"touchstart",a=>{if(l.dispose(),qe(a.target)&&fd(a.target))if(r(a.target)){let c=a.target;for(;c.parentElement&&r(c.parentElement);)c=c.parentElement;l.style(c,"overscrollBehavior","contain")}else l.style(a.target,"touchAction","none")})}),t.addEventListener(e,"touchmove",l=>{if(qe(l.target)){if(Cs(l.target))return;if(r(l.target)){let a=l.target;for(;a.parentElement&&a.dataset.headlessuiPortal!==""&&!(a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth);)a=a.parentElement;a.dataset.headlessuiPortal===""&&l.preventDefault()}else l.preventDefault()}},{passive:!1}),t.add(()=>{var l;let a=(l=window.scrollY)!=null?l:window.pageYOffset;i!==a&&window.scrollTo(0,i),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function ff(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function jo(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let Qe=cf(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:ve(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(t),r.computedMeta=jo(r.meta),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=jo(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},n=[df(),uf(),ff()];n.forEach(({before:r})=>r?.(t)),n.forEach(({after:r})=>r?.(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Qe.subscribe(()=>{let e=Qe.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&Qe.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Qe.dispatch("TEARDOWN",n)}});function mf(e,t,n=()=>({containers:[]})){let r=af(Qe),o=t?r.get(t):void 0,i=o?o.count>0:!1;return te(()=>{if(!(!t||!e))return Qe.dispatch("PUSH",t,n),()=>Qe.dispatch("POP",t,n)},[e,t]),i}function pf(e,t,n=()=>[document.body]){let r=Ds(e,"scroll-lock");mf(r,t,o=>{var i;return{containers:[...(i=o.containers)!=null?i:[],n]}})}function _o(e){return[e.screenX,e.screenY]}function hf(){let e=p.useRef([-1,-1]);return{wasMoved(t){let n=_o(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=_o(t)}}}function gf(e=0){let[t,n]=p.useState(e),r=p.useCallback(a=>n(a),[]),o=p.useCallback(a=>n(c=>c|a),[]),i=p.useCallback(a=>(t&a)===a,[t]),s=p.useCallback(a=>n(c=>c&~a),[]),l=p.useCallback(a=>n(c=>c^a),[]);return{flags:t,setFlag:r,addFlag:o,hasFlag:i,removeFlag:s,toggleFlag:l}}var Bo,Ho;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Bo=process==null?void 0:process.env)==null?void 0:Bo.NODE_ENV)==="test"&&typeof((Ho=Element?.prototype)==null?void 0:Ho.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
|
7
|
-
`)),[]});var vf=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(vf||{});function qr(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function Gr(e,t,n,r){let[o,i]=p.useState(n),{hasFlag:s,addFlag:l,removeFlag:a}=gf(e&&o?3:0),c=p.useRef(!1),u=p.useRef(!1),f=ot();return te(()=>{var h;if(e){if(n&&i(!0),!t){n&&l(3);return}return(h=r?.start)==null||h.call(r,n),bf(t,{inFlight:c,prepare(){u.current?u.current=!1:u.current=c.current,c.current=!0,!u.current&&(n?(l(3),a(4)):(l(4),a(2)))},run(){u.current?n?(a(3),l(4)):(a(4),l(3)):n?a(1):l(1)},done(){var d;u.current&&yf(t)||(c.current=!1,a(7),n||i(!1),(d=r?.end)==null||d.call(r,n))}})}},[e,n,t,f]),e?[o,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function bf(e,{prepare:t,run:n,done:r,inFlight:o}){let i=ve();return wf(e,{prepare:t,inFlight:o}),i.nextFrame(()=>{n(),i.requestAnimationFrame(()=>{i.add(xf(e,r))})}),i.dispose}function xf(e,t){var n,r;let o=ve();if(!e)return o.dispose;let i=!1;o.add(()=>{i=!0});let s=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(l=>l instanceof CSSTransition))!=null?r:[];return s.length===0?(t(),o.dispose):(Promise.allSettled(s.map(l=>l.finished)).then(()=>{i||t()}),o.dispose)}function wf(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function yf(e){var t,n;return((n=(t=e.getAnimations)==null?void 0:t.call(e))!=null?n:[]).some(r=>r instanceof CSSTransition&&r.playState!=="finished")}function Cn(){return typeof window<"u"}function wt(e){return Kr(e)?(e.nodeName||"").toLowerCase():"#document"}function me(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Le(e){var t;return(t=(Kr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Kr(e){return Cn()?e instanceof Node||e instanceof me(e).Node:!1}function K(e){return Cn()?e instanceof Element||e instanceof me(e).Element:!1}function ge(e){return Cn()?e instanceof HTMLElement||e instanceof me(e).HTMLElement:!1}function wr(e){return!Cn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof me(e).ShadowRoot}const Ef=new Set(["inline","contents"]);function Bt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Ef.has(o)}const Cf=new Set(["table","td","th"]);function Rf(e){return Cf.has(wt(e))}const Sf=[":popover-open",":modal"];function Rn(e){return Sf.some(t=>{try{return e.matches(t)}catch{return!1}})}const $f=["transform","translate","scale","rotate","perspective"],kf=["transform","translate","scale","rotate","perspective","filter"],Pf=["paint","layout","strict","content"];function Yr(e){const t=Sn(),n=K(e)?Ee(e):e;return $f.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||kf.some(r=>(n.willChange||"").includes(r))||Pf.some(r=>(n.contain||"").includes(r))}function Tf(e){let t=je(e);for(;ge(t)&&!Ne(t);){if(Yr(t))return t;if(Rn(t))return null;t=je(t)}return null}function Sn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Of=new Set(["html","body","#document"]);function Ne(e){return Of.has(wt(e))}function Ee(e){return me(e).getComputedStyle(e)}function $n(e){return K(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function je(e){if(wt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wr(e)&&e.host||Le(e);return wr(t)?t.host:t}function Ws(e){const t=je(e);return Ne(t)?e.ownerDocument?e.ownerDocument.body:e.body:ge(t)&&Bt(t)?t:Ws(t)}function Ke(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ws(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=me(o);if(i){const l=yr(s);return t.concat(s,s.visualViewport||[],Bt(o)?o:[],l&&n?Ke(l):[])}return t.concat(o,Ke(o,[],n))}function yr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lf(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}const Mf=["top","right","bottom","left"],Vo=["start","end"],Wo=Mf.reduce((e,t)=>e.concat(t,t+"-"+Vo[0],t+"-"+Vo[1]),[]),nt=Math.min,se=Math.max,Mt=Math.round,Jt=Math.floor,Pe=e=>({x:e,y:e}),Af={left:"right",right:"left",bottom:"top",top:"bottom"},Ff={start:"end",end:"start"};function zo(e,t,n){return se(e,nt(t,n))}function st(e,t){return typeof e=="function"?e(t):e}function Oe(e){return e.split("-")[0]}function Te(e){return e.split("-")[1]}function zs(e){return e==="x"?"y":"x"}function Us(e){return e==="y"?"height":"width"}const Nf=new Set(["top","bottom"]);function Ae(e){return Nf.has(Oe(e))?"y":"x"}function qs(e){return zs(Ae(e))}function Gs(e,t,n){n===void 0&&(n=!1);const r=Te(e),o=qs(e),i=Us(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=pn(s)),[s,pn(s)]}function If(e){const t=pn(e);return[mn(e),t,mn(t)]}function mn(e){return e.replace(/start|end/g,t=>Ff[t])}const Uo=["left","right"],qo=["right","left"],Df=["top","bottom"],jf=["bottom","top"];function _f(e,t,n){switch(e){case"top":case"bottom":return n?t?qo:Uo:t?Uo:qo;case"left":case"right":return t?Df:jf;default:return[]}}function Bf(e,t,n,r){const o=Te(e);let i=_f(Oe(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(mn)))),i}function pn(e){return e.replace(/left|right|bottom|top/g,t=>Af[t])}function Hf(e){return{top:0,right:0,bottom:0,left:0,...e}}function Vf(e){return typeof e!="number"?Hf(e):{top:e,right:e,bottom:e,left:e}}function hn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Go(e,t,n){let{reference:r,floating:o}=e;const i=Ae(t),s=qs(t),l=Us(s),a=Oe(t),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[l]/2-o[l]/2;let d;switch(a){case"top":d={x:u,y:r.y-o.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(Te(t)){case"start":d[s]-=h*(n&&c?-1:1);break;case"end":d[s]+=h*(n&&c?-1:1);break}return d}const Wf=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,l=i.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=Go(c,r,a),h=r,d={},g=0;for(let v=0;v<l.length;v++){const{name:b,fn:x}=l[v],{x:y,y:w,data:S,reset:R}=await x({x:u,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:d,rects:c,platform:s,elements:{reference:e,floating:t}});u=y??u,f=w??f,d={...d,[b]:{...d[b],...S}},R&&g<=50&&(g++,typeof R=="object"&&(R.placement&&(h=R.placement),R.rects&&(c=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:u,y:f}=Go(c,h,a)),v=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:d}};async function Ht(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:l,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=st(t,e),g=Vf(d),b=l[h?f==="floating"?"reference":"floating":f],x=hn(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),y=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),S=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},R=hn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:w,strategy:a}):y);return{top:(x.top-R.top+g.top)/S.y,bottom:(R.bottom-x.bottom+g.bottom)/S.y,left:(x.left-R.left+g.left)/S.x,right:(R.right-x.right+g.right)/S.x}}function zf(e,t,n){return(e?[...n.filter(o=>Te(o)===e),...n.filter(o=>Te(o)!==e)]:n.filter(o=>Oe(o)===o)).filter(o=>e?Te(o)===e||(t?mn(o)!==o:!1):!0)}const Uf=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:s,placement:l,platform:a,elements:c}=t,{crossAxis:u=!1,alignment:f,allowedPlacements:h=Wo,autoAlignment:d=!0,...g}=st(e,t),v=f!==void 0||h===Wo?zf(f||null,d,h):h,b=await Ht(t,g),x=((n=s.autoPlacement)==null?void 0:n.index)||0,y=v[x];if(y==null)return{};const w=Gs(y,i,await(a.isRTL==null?void 0:a.isRTL(c.floating)));if(l!==y)return{reset:{placement:v[0]}};const S=[b[Oe(y)],b[w[0]],b[w[1]]],R=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:y,overflows:S}],P=v[x+1];if(P)return{data:{index:x+1,overflows:R},reset:{placement:P}};const T=R.map($=>{const D=Te($.placement);return[$.placement,D&&u?$.overflows.slice(0,2).reduce((W,z)=>W+z,0):$.overflows[0],$.overflows]}).sort(($,D)=>$[1]-D[1]),F=((o=T.filter($=>$[2].slice(0,Te($[0])?2:3).every(D=>D<=0))[0])==null?void 0:o[0])||T[0][0];return F!==l?{data:{index:x+1,overflows:R},reset:{placement:F}}:{}}}},qf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...b}=st(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=Oe(o),y=Ae(l),w=Oe(l)===l,S=await(a.isRTL==null?void 0:a.isRTL(c.floating)),R=h||(w||!v?[pn(l)]:If(l)),P=g!=="none";!h&&P&&R.push(...Bf(l,v,g,S));const T=[l,...R],k=await Ht(t,b),F=[];let $=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&F.push(k[x]),f){const O=Gs(o,s,S);F.push(k[O[0]],k[O[1]])}if($=[...$,{placement:o,overflows:F}],!F.every(O=>O<=0)){var D,W;const O=(((D=i.flip)==null?void 0:D.index)||0)+1,A=T[O];if(A&&(!(f==="alignment"?y!==Ae(A):!1)||$.every(C=>Ae(C.placement)===y?C.overflows[0]>0:!0)))return{data:{index:O,overflows:$},reset:{placement:A}};let _=(W=$.filter(L=>L.overflows[0]<=0).sort((L,C)=>L.overflows[1]-C.overflows[1])[0])==null?void 0:W.placement;if(!_)switch(d){case"bestFit":{var z;const L=(z=$.filter(C=>{if(P){const M=Ae(C.placement);return M===y||M==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(M=>M>0).reduce((M,V)=>M+V,0)]).sort((C,M)=>C[1]-M[1])[0])==null?void 0:z[0];L&&(_=L);break}case"initialPlacement":_=l;break}if(o!==_)return{reset:{placement:_}}}return{}}}},Gf=new Set(["left","top"]);async function Kf(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Oe(n),l=Te(n),a=Ae(n)==="y",c=Gf.has(s)?-1:1,u=i&&a?-1:1,f=st(t,e);let{mainAxis:h,crossAxis:d,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof g=="number"&&(d=l==="end"?g*-1:g),a?{x:d*u,y:h*c}:{x:h*c,y:d*u}}const Yf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:l}=t,a=await Kf(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:s}}}}},Xf=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:b=>{let{x,y}=b;return{x,y}}},...a}=st(e,t),c={x:n,y:r},u=await Ht(t,a),f=Ae(Oe(o)),h=zs(f);let d=c[h],g=c[f];if(i){const b=h==="y"?"top":"left",x=h==="y"?"bottom":"right",y=d+u[b],w=d-u[x];d=zo(y,d,w)}if(s){const b=f==="y"?"top":"left",x=f==="y"?"bottom":"right",y=g+u[b],w=g-u[x];g=zo(y,g,w)}const v=l.fn({...t,[h]:d,[f]:g});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[h]:i,[f]:s}}}}}},Zf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:l}=t,{apply:a=()=>{},...c}=st(e,t),u=await Ht(t,c),f=Oe(o),h=Te(o),d=Ae(o)==="y",{width:g,height:v}=i.floating;let b,x;f==="top"||f==="bottom"?(b=f,x=h===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(x=f,b=h==="end"?"top":"bottom");const y=v-u.top-u.bottom,w=g-u.left-u.right,S=nt(v-u[b],y),R=nt(g-u[x],w),P=!t.middlewareData.shift;let T=S,k=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=y),P&&!h){const $=se(u.left,0),D=se(u.right,0),W=se(u.top,0),z=se(u.bottom,0);d?k=g-2*($!==0||D!==0?$+D:se(u.left,u.right)):T=v-2*(W!==0||z!==0?W+z:se(u.top,u.bottom))}await a({...t,availableWidth:k,availableHeight:T});const F=await s.getDimensions(l.floating);return g!==F.width||v!==F.height?{reset:{rects:!0}}:{}}}};function Ks(e){const t=Ee(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ge(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,l=Mt(n)!==i||Mt(r)!==s;return l&&(n=i,r=s),{width:n,height:r,$:l}}function Xr(e){return K(e)?e:e.contextElement}function mt(e){const t=Xr(e);if(!ge(t))return Pe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ks(t);let s=(i?Mt(n.width):n.width)/r,l=(i?Mt(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Jf=Pe(0);function Ys(e){const t=me(e);return!Sn()||!t.visualViewport?Jf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Qf(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==me(e)?!1:t}function rt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Xr(e);let s=Pe(1);t&&(r?K(r)&&(s=mt(r)):s=mt(e));const l=Qf(i,n,r)?Ys(i):Pe(0);let a=(o.left+l.x)/s.x,c=(o.top+l.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i){const h=me(i),d=r&&K(r)?me(r):r;let g=h,v=yr(g);for(;v&&r&&d!==g;){const b=mt(v),x=v.getBoundingClientRect(),y=Ee(v),w=x.left+(v.clientLeft+parseFloat(y.paddingLeft))*b.x,S=x.top+(v.clientTop+parseFloat(y.paddingTop))*b.y;a*=b.x,c*=b.y,u*=b.x,f*=b.y,a+=w,c+=S,g=me(v),v=yr(g)}}return hn({width:u,height:f,x:a,y:c})}function kn(e,t){const n=$n(e).scrollLeft;return t?t.left+n:rt(Le(e)).left+n}function Xs(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-kn(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function em(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Le(r),l=t?Rn(t.floating):!1;if(r===s||l&&i)return n;let a={scrollLeft:0,scrollTop:0},c=Pe(1);const u=Pe(0),f=ge(r);if((f||!f&&!i)&&((wt(r)!=="body"||Bt(s))&&(a=$n(r)),ge(r))){const d=rt(r);c=mt(r),u.x=d.x+r.clientLeft,u.y=d.y+r.clientTop}const h=s&&!f&&!i?Xs(s,a):Pe(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-a.scrollTop*c.y+u.y+h.y}}function tm(e){return Array.from(e.getClientRects())}function nm(e){const t=Le(e),n=$n(e),r=e.ownerDocument.body,o=se(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=se(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+kn(e);const l=-n.scrollTop;return Ee(r).direction==="rtl"&&(s+=se(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:l}}const Ko=25;function rm(e,t){const n=me(e),r=Le(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;const u=Sn();(!u||u&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}const c=kn(r);if(c<=0){const u=r.ownerDocument,f=u.body,h=getComputedStyle(f),d=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(r.clientWidth-f.clientWidth-d);g<=Ko&&(i-=g)}else c<=Ko&&(i+=c);return{width:i,height:s,x:l,y:a}}const om=new Set(["absolute","fixed"]);function im(e,t){const n=rt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ge(e)?mt(e):Pe(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,a=o*i.x,c=r*i.y;return{width:s,height:l,x:a,y:c}}function Yo(e,t,n){let r;if(t==="viewport")r=rm(e,n);else if(t==="document")r=nm(Le(e));else if(K(t))r=im(t,n);else{const o=Ys(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return hn(r)}function Zs(e,t){const n=je(e);return n===t||!K(n)||Ne(n)?!1:Ee(n).position==="fixed"||Zs(n,t)}function sm(e,t){const n=t.get(e);if(n)return n;let r=Ke(e,[],!1).filter(l=>K(l)&&wt(l)!=="body"),o=null;const i=Ee(e).position==="fixed";let s=i?je(e):e;for(;K(s)&&!Ne(s);){const l=Ee(s),a=Yr(s);!a&&l.position==="fixed"&&(o=null),(i?!a&&!o:!a&&l.position==="static"&&!!o&&om.has(o.position)||Bt(s)&&!a&&Zs(e,s))?r=r.filter(u=>u!==s):o=l,s=je(s)}return t.set(e,r),r}function lm(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Rn(t)?[]:sm(t,this._c):[].concat(n),r],l=s[0],a=s.reduce((c,u)=>{const f=Yo(t,u,o);return c.top=se(f.top,c.top),c.right=nt(f.right,c.right),c.bottom=nt(f.bottom,c.bottom),c.left=se(f.left,c.left),c},Yo(t,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function am(e){const{width:t,height:n}=Ks(e);return{width:t,height:n}}function cm(e,t,n){const r=ge(t),o=Le(t),i=n==="fixed",s=rt(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const a=Pe(0);function c(){a.x=kn(o)}if(r||!r&&!i)if((wt(t)!=="body"||Bt(o))&&(l=$n(t)),r){const d=rt(t,!0,i,t);a.x=d.x+t.clientLeft,a.y=d.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?Xs(o,l):Pe(0),f=s.left+l.scrollLeft-a.x-u.x,h=s.top+l.scrollTop-a.y-u.y;return{x:f,y:h,width:s.width,height:s.height}}function Kn(e){return Ee(e).position==="static"}function Xo(e,t){if(!ge(e)||Ee(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Le(e)===n&&(n=n.ownerDocument.body),n}function Js(e,t){const n=me(e);if(Rn(e))return n;if(!ge(e)){let o=je(e);for(;o&&!Ne(o);){if(K(o)&&!Kn(o))return o;o=je(o)}return n}let r=Xo(e,t);for(;r&&Rf(r)&&Kn(r);)r=Xo(r,t);return r&&Ne(r)&&Kn(r)&&!Yr(r)?n:r||Tf(e)||n}const um=async function(e){const t=this.getOffsetParent||Js,n=this.getDimensions,r=await n(e.floating);return{reference:cm(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function dm(e){return Ee(e).direction==="rtl"}const fm={convertOffsetParentRelativeRectToViewportRelativeRect:em,getDocumentElement:Le,getClippingRect:lm,getOffsetParent:Js,getElementRects:um,getClientRects:tm,getDimensions:am,getScale:mt,isElement:K,isRTL:dm};function Qs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mm(e,t){let n=null,r;const o=Le(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function s(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),i();const c=e.getBoundingClientRect(),{left:u,top:f,width:h,height:d}=c;if(l||t(),!h||!d)return;const g=Jt(f),v=Jt(o.clientWidth-(u+h)),b=Jt(o.clientHeight-(f+d)),x=Jt(u),w={rootMargin:-g+"px "+-v+"px "+-b+"px "+-x+"px",threshold:se(0,nt(1,a))||1};let S=!0;function R(P){const T=P[0].intersectionRatio;if(T!==a){if(!S)return s();T?s(!1,T):r=setTimeout(()=>{s(!1,1e-7)},1e3)}T===1&&!Qs(c,e.getBoundingClientRect())&&s(),S=!1}try{n=new IntersectionObserver(R,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(R,w)}n.observe(e)}return s(!0),i}function pm(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,c=Xr(e),u=o||i?[...c?Ke(c):[],...Ke(t)]:[];u.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const f=c&&l?mm(c,n):null;let h=-1,d=null;s&&(d=new ResizeObserver(x=>{let[y]=x;y&&y.target===c&&d&&(d.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=d)==null||w.observe(t)})),n()}),c&&!a&&d.observe(c),d.observe(t));let g,v=a?rt(e):null;a&&b();function b(){const x=rt(e);v&&!Qs(v,x)&&n(),v=x,g=requestAnimationFrame(b)}return n(),()=>{var x;u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f?.(),(x=d)==null||x.disconnect(),d=null,a&&cancelAnimationFrame(g)}}const Yn=Ht,hm=Yf,gm=Uf,vm=Xf,bm=qf,xm=Zf,wm=(e,t,n)=>{const r=new Map,o={platform:fm,...n},i={...o.platform,_c:r};return Wf(e,t,{...o,platform:i})};var ym=typeof document<"u",Em=function(){},rn=ym?p.useLayoutEffect:Em;function gn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!gn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!gn(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function el(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zo(e,t){const n=el(e);return Math.round(t*n)/n}function Xn(e){const t=m.useRef(e);return rn(()=>{t.current=e}),t}function tl(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:a,open:c}=e,[u,f]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,d]=m.useState(r);gn(h,r)||d(r);const[g,v]=m.useState(null),[b,x]=m.useState(null),y=m.useCallback(C=>{C!==P.current&&(P.current=C,v(C))},[]),w=m.useCallback(C=>{C!==T.current&&(T.current=C,x(C))},[]),S=i||g,R=s||b,P=m.useRef(null),T=m.useRef(null),k=m.useRef(u),F=a!=null,$=Xn(a),D=Xn(o),W=Xn(c),z=m.useCallback(()=>{if(!P.current||!T.current)return;const C={placement:t,strategy:n,middleware:h};D.current&&(C.platform=D.current),wm(P.current,T.current,C).then(M=>{const V={...M,isPositioned:W.current!==!1};O.current&&!gn(k.current,V)&&(k.current=V,an.flushSync(()=>{f(V)}))})},[h,t,n,D,W]);rn(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,f(C=>({...C,isPositioned:!1})))},[c]);const O=m.useRef(!1);rn(()=>(O.current=!0,()=>{O.current=!1}),[]),rn(()=>{if(S&&(P.current=S),R&&(T.current=R),S&&R){if($.current)return $.current(S,R,z);z()}},[S,R,z,$,F]);const A=m.useMemo(()=>({reference:P,floating:T,setReference:y,setFloating:w}),[y,w]),_=m.useMemo(()=>({reference:S,floating:R}),[S,R]),L=m.useMemo(()=>{const C={position:n,left:0,top:0};if(!_.floating)return C;const M=Zo(_.floating,u.x),V=Zo(_.floating,u.y);return l?{...C,transform:"translate("+M+"px, "+V+"px)",...el(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:V}},[n,l,_.floating,u.x,u.y]);return m.useMemo(()=>({...u,update:z,refs:A,elements:_,floatingStyles:L}),[u,z,A,_,L])}const Zr=(e,t)=>({...hm(e),options:[e,t]}),nl=(e,t)=>({...vm(e),options:[e,t]}),Cm=(e,t)=>({...bm(e),options:[e,t]}),Rm=(e,t)=>({...xm(e),options:[e,t]}),Sm=(e,t)=>({...gm(e),options:[e,t]}),rl={...m},$m=rl.useInsertionEffect,km=$m||(e=>e());function ol(e){const t=m.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return km(()=>{t.current=e}),m.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}var Er=typeof document<"u"?p.useLayoutEffect:p.useEffect;let Jo=!1,Pm=0;const Qo=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Pm++;function Tm(){const[e,t]=m.useState(()=>Jo?Qo():void 0);return Er(()=>{e==null&&t(Qo())},[]),m.useEffect(()=>{Jo=!0},[]),e}const Om=rl.useId,Lm=Om||Tm;let At;process.env.NODE_ENV!=="production"&&(At=new Set);function Mm(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=At)!=null&&e.has(o))){var i;(i=At)==null||i.add(o),console.warn(o)}}function Am(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=At)!=null&&e.has(o))){var i;(i=At)==null||i.add(o),console.error(o)}}function Fm(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const Nm=m.createContext(null),Im=m.createContext(null),Dm=()=>{var e;return((e=m.useContext(Nm))==null?void 0:e.id)||null},jm=()=>m.useContext(Im),_m="data-floating-ui-focusable";function Bm(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Lm(),i=m.useRef({}),[s]=m.useState(()=>Fm()),l=Dm()!=null;if(process.env.NODE_ENV!=="production"){const d=r.reference;d&&!K(d)&&Am("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,c]=m.useState(r.reference),u=ol((d,g,v)=>{i.current.openEvent=d?g:void 0,s.emit("openchange",{open:d,event:g,reason:v,nested:l}),n?.(d,g,v)}),f=m.useMemo(()=>({setPositionReference:c}),[]),h=m.useMemo(()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference}),[a,r.reference,r.floating]);return m.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:h,events:s,floatingId:o,refs:f}),[t,u,h,s,o,f])}function Hm(e){e===void 0&&(e={});const{nodeId:t}=e,n=Bm({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=m.useState(null),[l,a]=m.useState(null),u=o?.domReference||i,f=m.useRef(null),h=jm();Er(()=>{u&&(f.current=u)},[u]);const d=tl({...e,elements:{...o,...l&&{reference:l}}}),g=m.useCallback(w=>{const S=K(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;a(S),d.refs.setReference(S)},[d.refs]),v=m.useCallback(w=>{(K(w)||w===null)&&(f.current=w,s(w)),(K(d.refs.reference.current)||d.refs.reference.current===null||w!==null&&!K(w))&&d.refs.setReference(w)},[d.refs]),b=m.useMemo(()=>({...d.refs,setReference:v,setPositionReference:g,domReference:f}),[d.refs,v,g]),x=m.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),y=m.useMemo(()=>({...d,...r,refs:b,elements:x,nodeId:t}),[d,b,x,t,r]);return Er(()=>{r.dataRef.current.floatingContext=y;const w=h?.nodesRef.current.find(S=>S.id===t);w&&(w.context=y)}),m.useMemo(()=>({...d,context:y,refs:b,elements:x}),[d,b,x,y])}const ei="active",ti="selected";function Zn(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[ei]:s,[ti]:l,...a}=e;i=a}return{...n==="floating"&&{tabIndex:-1,[_m]:""},...i,...t.map(s=>{const l=s?s[n]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((s,l)=>(l&&Object.entries(l).forEach(a=>{let[c,u]=a;if(!(o&&[ei,ti].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),s[c]=function(){for(var h,d=arguments.length,g=new Array(d),v=0;v<d;v++)g[v]=arguments[v];return(h=r.get(c))==null?void 0:h.map(b=>b(...g)).find(b=>b!==void 0)}}}else s[c]=u}),s),{})}}function Vm(e){e===void 0&&(e=[]);const t=e.map(l=>l?.reference),n=e.map(l=>l?.floating),r=e.map(l=>l?.item),o=m.useCallback(l=>Zn(l,e,"reference"),t),i=m.useCallback(l=>Zn(l,e,"floating"),n),s=m.useCallback(l=>Zn(l,e,"item"),r);return m.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}function ni(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const Wm=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:o,offset:i=0,index:s=0,minItemsVisible:l=4,referenceOverflowThreshold:a=0,scrollRef:c,...u}=st(e,t),{rects:f,elements:{floating:h}}=t,d=n.current[s],g=c?.current||h,v=h.clientTop||g.clientTop,b=h.clientTop!==0,x=g.clientTop!==0,y=h===g;if(process.env.NODE_ENV!=="production"&&(t.placement.startsWith("bottom")||Mm('`placement` side must be "bottom" when using the `inner`',"middleware.")),!d)return{};const w={...t,...await Zr(-d.offsetTop-h.clientTop-f.reference.height/2-d.offsetHeight/2-i).fn(t)},S=await Yn(ni(w,g.scrollHeight+v+h.clientTop),u),R=await Yn(w,{...u,elementContext:"reference"}),P=se(0,S.top),T=w.y+P,$=(g.scrollHeight>g.clientHeight?D=>D:Mt)(se(0,g.scrollHeight+(b&&y||x?v*2:0)-P-se(0,S.bottom)));if(g.style.maxHeight=$+"px",g.scrollTop=P,o){const D=g.offsetHeight<d.offsetHeight*nt(l,n.current.length)-1||R.top>=-a||R.bottom>=-a;an.flushSync(()=>o(D))}return r&&(r.current=await Yn(ni({...w,y:T},g.offsetHeight+v+h.clientTop),u)),{y:T}}});function zm(e,t){const{open:n,elements:r}=e,{enabled:o=!0,overflowRef:i,scrollRef:s,onChange:l}=t,a=ol(l),c=m.useRef(!1),u=m.useRef(null),f=m.useRef(null);m.useEffect(()=>{if(!o)return;function d(v){if(v.ctrlKey||!g||i.current==null)return;const b=v.deltaY,x=i.current.top>=-.5,y=i.current.bottom>=-.5,w=g.scrollHeight-g.clientHeight,S=b<0?-1:1,R=b<0?"max":"min";g.scrollHeight<=g.clientHeight||(!x&&b>0||!y&&b<0?(v.preventDefault(),an.flushSync(()=>{a(P=>P+Math[R](b,w*S))})):/firefox/i.test(Lf())&&(g.scrollTop+=b))}const g=s?.current||r.floating;if(n&&g)return g.addEventListener("wheel",d),requestAnimationFrame(()=>{u.current=g.scrollTop,i.current!=null&&(f.current={...i.current})}),()=>{u.current=null,f.current=null,g.removeEventListener("wheel",d)}},[o,n,r.floating,i,s,a]);const h=m.useMemo(()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const d=s?.current||r.floating;if(!(!i.current||!d||!c.current)){if(u.current!==null){const g=d.scrollTop-u.current;(i.current.bottom<-.5&&g<-1||i.current.top<-.5&&g>1)&&an.flushSync(()=>a(v=>v+g))}requestAnimationFrame(()=>{u.current=d.scrollTop})}}}),[r.floating,a,i,s]);return m.useMemo(()=>o?{floating:h}:{},[o,h])}let yt=p.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});yt.displayName="FloatingContext";let Jr=p.createContext(null);Jr.displayName="PlacementContext";function Um(e){return p.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function qm(){return p.useContext(yt).setReference}function Gm(){return p.useContext(yt).getReferenceProps}function Km(){let{getFloatingProps:e,slot:t}=p.useContext(yt);return p.useCallback((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function Ym(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=p.useContext(Jr),n=p.useMemo(()=>e,[JSON.stringify(e,(o,i)=>{var s;return(s=i?.outerHTML)!=null?s:i})]);te(()=>{t?.(n??null)},[t,n]);let r=p.useContext(yt);return p.useMemo(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}let ri=4;function Xm({children:e,enabled:t=!0}){let[n,r]=p.useState(null),[o,i]=p.useState(0),s=p.useRef(null),[l,a]=p.useState(null);Zm(l);let c=t&&n!==null&&l!==null,{to:u="bottom",gap:f=0,offset:h=0,padding:d=0,inner:g}=Jm(n,l),[v,b="center"]=u.split(" ");te(()=>{c&&i(0)},[c]);let{refs:x,floatingStyles:y,context:w}=Hm({open:c,placement:v==="selection"?b==="center"?"bottom":`bottom-${b}`:b==="center"?`${v}`:`${v}-${b}`,strategy:"absolute",transform:!1,middleware:[Zr({mainAxis:v==="selection"?0:f,crossAxis:h}),nl({padding:d}),v!=="selection"&&Cm({padding:d}),v==="selection"&&g?Wm({...g,padding:d,overflowRef:s,offset:o,minItemsVisible:ri,referenceOverflowThreshold:d,onFallbackChange(D){var W,z;if(!D)return;let O=w.elements.floating;if(!O)return;let A=parseFloat(getComputedStyle(O).scrollPaddingBottom)||0,_=Math.min(ri,O.childElementCount),L=0,C=0;for(let M of(z=(W=w.elements.floating)==null?void 0:W.childNodes)!=null?z:[])if(Ve(M)){let V=M.offsetTop,X=V+M.clientHeight+A,B=O.scrollTop,j=B+O.clientHeight;if(V>=B&&X<=j)_--;else{C=Math.max(0,Math.min(X,j)-Math.max(V,B)),L=M.clientHeight;break}}_>=1&&i(M=>{let V=L*_-C+A;return M>=V?M:V})}}):null,Rm({padding:d,apply({availableWidth:D,availableHeight:W,elements:z}){Object.assign(z.floating.style,{overflow:"auto",maxWidth:`${D}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${W}px)`})}})].filter(Boolean),whileElementsMounted:pm}),[S=v,R=b]=w.placement.split("-");v==="selection"&&(S="selection");let P=p.useMemo(()=>({anchor:[S,R].filter(Boolean).join(" ")}),[S,R]),T=zm(w,{overflowRef:s,onChange:i}),{getReferenceProps:k,getFloatingProps:F}=Vm([T]),$=q(D=>{a(D),x.setFloating(D)});return m.createElement(Jr.Provider,{value:r},m.createElement(yt.Provider,{value:{setFloating:$,setReference:x.setReference,styles:y,getReferenceProps:k,getFloatingProps:F,slot:P}},e))}function Zm(e){te(()=>{if(!e)return;let t=new MutationObserver(()=>{let n=window.getComputedStyle(e).maxHeight,r=parseFloat(n);if(isNaN(r))return;let o=parseInt(n);isNaN(o)||r!==o&&(e.style.maxHeight=`${Math.ceil(r)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function Jm(e,t){var n,r,o;let i=Jn((n=e?.gap)!=null?n:"var(--anchor-gap, 0)",t),s=Jn((r=e?.offset)!=null?r:"var(--anchor-offset, 0)",t),l=Jn((o=e?.padding)!=null?o:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:s,padding:l}}function Jn(e,t,n=void 0){let r=ot(),o=q((a,c)=>{if(a==null)return[n,null];if(typeof a=="number")return[a,null];if(typeof a=="string"){if(!c)return[n,null];let u=oi(a,c);return[u,f=>{let h=il(a);{let d=h.map(g=>window.getComputedStyle(c).getPropertyValue(g));r.requestAnimationFrame(function g(){r.nextFrame(g);let v=!1;for(let[x,y]of h.entries()){let w=window.getComputedStyle(c).getPropertyValue(y);if(d[x]!==w){d[x]=w,v=!0;break}}if(!v)return;let b=oi(a,c);u!==b&&(f(b),u=b)})}return r.dispose}]}return[n,null]}),i=p.useMemo(()=>o(e,t)[0],[e,t]),[s=i,l]=p.useState();return te(()=>{let[a,c]=o(e,t);if(l(a),!!c)return c(l)},[e,t]),s}function il(e){let t=/var\((.*)\)/.exec(e);if(t){let n=t[1].indexOf(",");if(n===-1)return[t[1]];let r=t[1].slice(0,n).trim(),o=t[1].slice(n+1).trim();return o?[r,...il(o)]:[r]}return[]}function oi(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}function Qm({children:e,freeze:t},n){let r=sl(t,e);return p.isValidElement(r)?p.cloneElement(r,{ref:n}):p.createElement(p.Fragment,null,r)}p.forwardRef(Qm);function sl(e,t){let[n,r]=p.useState(t);return!e&&n!==t&&r(t),e?n:t}let Pn=p.createContext(null);Pn.displayName="OpenClosedContext";var ae=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ae||{});function Tn(){return p.useContext(Pn)}function Qr({value:e,children:t}){return p.createElement(Pn.Provider,{value:e},t)}function ep({children:e}){return p.createElement(Pn.Provider,{value:null},e)}function tp(e){throw new Error("Unexpected object: "+e)}var Q=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Q||{});function Qt(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let i=0;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 1:{o===-1&&(o=n.length);for(let i=o-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 2:{for(let i=o+1;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 3:{for(let i=n.length-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 4:{for(let i=0;i<n.length;++i)if(t.resolveId(n[i],i,n)===e.id)return i;return r}case 5:return null;default:tp(e)}}function ll(e){let t=q(e),n=p.useRef(!1);p.useEffect(()=>(n.current=!1,()=>{n.current=!0,hs(()=>{n.current&&t()})}),[t])}let np=p.createContext(!1);function rp(){return p.useContext(np)}function op(e){let t=rp(),n=p.useContext(cl),[r,o]=p.useState(()=>{var i;if(!t&&n!==null)return(i=n.current)!=null?i:null;if(ke.isServer)return null;let s=e?.getElementById("headlessui-portal-root");if(s)return s;if(e===null)return null;let l=e.createElement("div");return l.setAttribute("id","headlessui-portal-root"),e.body.appendChild(l)});return p.useEffect(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),p.useEffect(()=>{t||n!==null&&o(n.current)},[n,o,t]),r}let al=p.Fragment,ip=oe(function(e,t){let{ownerDocument:n=null,...r}=e,o=p.useRef(null),i=ue($s(h=>{o.current=h}),t),s=xr(o.current),l=n??s,a=op(l),c=p.useContext(cp),u=ot(),f=ie();return ll(()=>{var h;a&&a.childNodes.length<=0&&((h=a.parentElement)==null||h.removeChild(a))}),a?Ye.createPortal(p.createElement("div",{"data-headlessui-portal":"",ref:h=>{u.dispose(),c&&h&&u.add(c.register(h))}},f({ourProps:{ref:i},theirProps:r,slot:{},defaultTag:al,name:"Portal"})),a):null});function sp(e,t){let n=ue(t),{enabled:r=!0,ownerDocument:o,...i}=e,s=ie();return r?p.createElement(ip,{...i,ownerDocument:o,ref:n}):s({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:al,name:"Portal"})}let lp=p.Fragment,cl=p.createContext(null);function ap(e,t){let{target:n,...r}=e,o={ref:ue(t)},i=ie();return p.createElement(cl.Provider,{value:n},i({ourProps:o,theirProps:r,defaultTag:lp,name:"Popover.Group"}))}let cp=p.createContext(null),up=oe(sp),dp=oe(ap),fp=Object.assign(up,{Group:dp});const on={Idle:{kind:"Idle"},Tracked:e=>({kind:"Tracked",position:e}),Moved:{kind:"Moved"}};function ul(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function mp(e,t,n){let r=ve();if(t.kind==="Tracked"){let o=function(){i!==ul(e)&&(r.dispose(),n())},{position:i}=t,s=new ResizeObserver(o);s.observe(e),r.add(()=>s.disconnect()),r.addEventListener(window,"scroll",o,{passive:!0}),r.addEventListener(window,"resize",o)}return()=>r.dispose()}function pp(){let e=typeof document>"u";return"useSyncExternalStore"in m?(t=>t.useSyncExternalStore)(m)(()=>()=>{},()=>!1,()=>!e):!1}function dl(){let e=pp(),[t,n]=m.useState(ke.isHandoffComplete);return t&&ke.isHandoffComplete===!1&&n(!1),m.useEffect(()=>{t!==!0&&n(!0)},[t]),m.useEffect(()=>ke.handoff(),[]),e?!1:t}function hp(){let e=p.useRef(!1);return te(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function fl(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!ft((t=e.as)!=null?t:pl)||p.Children.count(e.children)===1}let On=p.createContext(null);On.displayName="TransitionContext";var gp=(e=>(e.Visible="visible",e.Hidden="hidden",e))(gp||{});function vp(){let e=p.useContext(On);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function bp(){let e=p.useContext(Ln);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Ln=p.createContext(null);Ln.displayName="NestingContext";function Mn(e){return"children"in e?Mn(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function ml(e,t){let n=it(e),r=p.useRef([]),o=hp(),i=ot(),s=q((d,g=Ue.Hidden)=>{let v=r.current.findIndex(({el:b})=>b===d);v!==-1&&(ce(g,{[Ue.Unmount](){r.current.splice(v,1)},[Ue.Hidden](){r.current[v].state="hidden"}}),i.microTask(()=>{var b;!Mn(r)&&o.current&&((b=n.current)==null||b.call(n))}))}),l=q(d=>{let g=r.current.find(({el:v})=>v===d);return g?g.state!=="visible"&&(g.state="visible"):r.current.push({el:d,state:"visible"}),()=>s(d,Ue.Unmount)}),a=p.useRef([]),c=p.useRef(Promise.resolve()),u=p.useRef({enter:[],leave:[]}),f=q((d,g,v)=>{a.current.splice(0),t&&(t.chains.current[g]=t.chains.current[g].filter(([b])=>b!==d)),t?.chains.current[g].push([d,new Promise(b=>{a.current.push(b)})]),t?.chains.current[g].push([d,new Promise(b=>{Promise.all(u.current[g].map(([x,y])=>y)).then(()=>b())})]),g==="enter"?c.current=c.current.then(()=>t?.wait.current).then(()=>v(g)):v(g)}),h=q((d,g,v)=>{Promise.all(u.current[g].splice(0).map(([b,x])=>x)).then(()=>{var b;(b=a.current.shift())==null||b()}).then(()=>v(g))});return p.useMemo(()=>({children:r,register:l,unregister:s,onStart:f,onStop:h,wait:c,chains:u}),[l,s,r,f,h,u,c])}let pl=p.Fragment,hl=pt.RenderStrategy;function xp(e,t){var n,r;let{transition:o=!0,beforeEnter:i,afterEnter:s,beforeLeave:l,afterLeave:a,enter:c,enterFrom:u,enterTo:f,entered:h,leave:d,leaveFrom:g,leaveTo:v,...b}=e,[x,y]=p.useState(null),w=p.useRef(null),S=fl(e),R=ue(...S?[w,t,y]:t===null?[]:[t]),P=(n=b.unmount)==null||n?Ue.Unmount:Ue.Hidden,{show:T,appear:k,initial:F}=vp(),[$,D]=p.useState(T?"visible":"hidden"),W=bp(),{register:z,unregister:O}=W;te(()=>z(w),[z,w]),te(()=>{if(P===Ue.Hidden&&w.current){if(T&&$!=="visible"){D("visible");return}return ce($,{hidden:()=>O(w),visible:()=>z(w)})}},[$,w,z,O,T,P]);let A=dl();te(()=>{if(S&&A&&$==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,$,A,S]);let _=F&&!k,L=k&&T&&F,C=p.useRef(!1),M=ml(()=>{C.current||(D("hidden"),O(w))},W),V=q(G=>{C.current=!0;let pe=G?"enter":"leave";M.onStart(w,pe,de=>{de==="enter"?i?.():de==="leave"&&l?.()})}),X=q(G=>{let pe=G?"enter":"leave";C.current=!1,M.onStop(w,pe,de=>{de==="enter"?s?.():de==="leave"&&a?.()}),pe==="leave"&&!Mn(M)&&(D("hidden"),O(w))});p.useEffect(()=>{S&&o||(V(T),X(T))},[T,S,o]);let B=!(!o||!S||!A||_),[,j]=Gr(B,x,T,{start:V,end:X}),ee=ze({ref:R,className:((r=pr(b.className,L&&c,L&&u,j.enter&&c,j.enter&&j.closed&&u,j.enter&&!j.closed&&f,j.leave&&d,j.leave&&!j.closed&&g,j.leave&&j.closed&&v,!j.transition&&T&&h))==null?void 0:r.trim())||void 0,...qr(j)}),Y=0;$==="visible"&&(Y|=ae.Open),$==="hidden"&&(Y|=ae.Closed),T&&$==="hidden"&&(Y|=ae.Opening),!T&&$==="visible"&&(Y|=ae.Closing);let H=ie();return p.createElement(Ln.Provider,{value:M},p.createElement(Qr,{value:Y},H({ourProps:ee,theirProps:b,defaultTag:pl,features:hl,visible:$==="visible",name:"Transition.Child"})))}function wp(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,s=p.useRef(null),l=fl(e),a=ue(...l?[s,t]:t===null?[]:[t]);dl();let c=Tn();if(n===void 0&&c!==null&&(n=(c&ae.Open)===ae.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,f]=p.useState(n?"visible":"hidden"),h=ml(()=>{n||f("hidden")}),[d,g]=p.useState(!0),v=p.useRef([n]);te(()=>{d!==!1&&v.current[v.current.length-1]!==n&&(v.current.push(n),g(!1))},[v,n]);let b=p.useMemo(()=>({show:n,appear:r,initial:d}),[n,r,d]);te(()=>{n?f("visible"):!Mn(h)&&s.current!==null&&f("hidden")},[n,h]);let x={unmount:o},y=q(()=>{var R;d&&g(!1),(R=e.beforeEnter)==null||R.call(e)}),w=q(()=>{var R;d&&g(!1),(R=e.beforeLeave)==null||R.call(e)}),S=ie();return p.createElement(Ln.Provider,{value:h},p.createElement(On.Provider,{value:b},S({ourProps:{...x,as:p.Fragment,children:p.createElement(gl,{ref:a,...x,...i,beforeEnter:y,beforeLeave:w})},theirProps:{},defaultTag:p.Fragment,features:hl,visible:u==="visible",name:"Transition"})))}function yp(e,t){let n=p.useContext(On)!==null,r=Tn()!==null;return p.createElement(p.Fragment,null,!n&&r?p.createElement(Cr,{ref:t,...e}):p.createElement(gl,{ref:t,...e}))}let Cr=oe(wp),gl=oe(xp),Ep=oe(yp),Cp=Object.assign(Cr,{Child:Ep,Root:Cr});var ii;let Rp=(ii=p.startTransition)!=null?ii:function(e){e()};var Sp=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Sp||{}),$p=(e=>(e[e.ToggleDisclosure=0]="ToggleDisclosure",e[e.CloseDisclosure=1]="CloseDisclosure",e[e.SetButtonId=2]="SetButtonId",e[e.SetPanelId=3]="SetPanelId",e[e.SetButtonElement=4]="SetButtonElement",e[e.SetPanelElement=5]="SetPanelElement",e))($p||{});let kp={0:e=>({...e,disclosureState:ce(e.disclosureState,{0:1,1:0})}),1:e=>e.disclosureState===1?e:{...e,disclosureState:1},2(e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},3(e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}},4(e,t){return e.buttonElement===t.element?e:{...e,buttonElement:t.element}},5(e,t){return e.panelElement===t.element?e:{...e,panelElement:t.element}}},eo=p.createContext(null);eo.displayName="DisclosureContext";function to(e){let t=p.useContext(eo);if(t===null){let n=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,to),n}return t}let no=p.createContext(null);no.displayName="DisclosureAPIContext";function vl(e){let t=p.useContext(no);if(t===null){let n=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,vl),n}return t}let ro=p.createContext(null);ro.displayName="DisclosurePanelContext";function Pp(){return p.useContext(ro)}function Tp(e,t){return ce(t.type,kp,e,t)}let Op=p.Fragment;function Lp(e,t){let{defaultOpen:n=!1,...r}=e,o=p.useRef(null),i=ue(t,$s(v=>{o.current=v},e.as===void 0||ft(e.as))),s=p.useReducer(Tp,{disclosureState:n?0:1,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:l,buttonId:a},c]=s,u=q(v=>{c({type:1});let b=_t(o.current);if(!b||!a)return;let x=v?qe(v)?v:"current"in v&&qe(v.current)?v.current:b.getElementById(a):b.getElementById(a);x?.focus()}),f=p.useMemo(()=>({close:u}),[u]),h=ye({open:l===0,close:u}),d={ref:i},g=ie();return p.createElement(eo.Provider,{value:s},p.createElement(no.Provider,{value:f},p.createElement(kd,{value:u},p.createElement(Qr,{value:ce(l,{0:ae.Open,1:ae.Closed})},g({ourProps:d,theirProps:r,slot:h,defaultTag:Op,name:"Disclosure"})))))}let Mp="button";function Ap(e,t){let n=p.useId(),{id:r=`headlessui-disclosure-button-${n}`,disabled:o=!1,autoFocus:i=!1,...s}=e,[l,a]=to("Disclosure.Button"),c=Pp(),u=c===null?!1:c===l.panelId,f=p.useRef(null),h=ue(f,t,q(F=>{if(!u)return a({type:4,element:F})}));p.useEffect(()=>{if(!u)return a({type:2,buttonId:r}),()=>{a({type:2,buttonId:null})}},[r,a,u]);let d=q(F=>{var $;if(u){if(l.disclosureState===1)return;switch(F.key){case J.Space:case J.Enter:F.preventDefault(),F.stopPropagation(),a({type:0}),($=l.buttonElement)==null||$.focus();break}}else switch(F.key){case J.Space:case J.Enter:F.preventDefault(),F.stopPropagation(),a({type:0});break}}),g=q(F=>{F.key===J.Space&&F.preventDefault()}),v=q(F=>{var $;hr(F.currentTarget)||o||(u?(a({type:0}),($=l.buttonElement)==null||$.focus()):a({type:0}))}),{isFocusVisible:b,focusProps:x}=Br({autoFocus:i}),{isHovered:y,hoverProps:w}=_r({isDisabled:o}),{pressed:S,pressProps:R}=Hr({disabled:o}),P=ye({open:l.disclosureState===0,hover:y,active:S,disabled:o,focus:b,autofocus:i}),T=Vs(e,l.buttonElement),k=Lt(u?{ref:h,type:T,disabled:o||void 0,autoFocus:i,onKeyDown:d,onClick:v}:{ref:h,id:r,type:T,"aria-expanded":l.disclosureState===0,"aria-controls":l.panelElement?l.panelId:void 0,disabled:o||void 0,autoFocus:i,onKeyDown:d,onKeyUp:g,onClick:v},x,w,R);return ie()({ourProps:k,theirProps:s,slot:P,defaultTag:Mp,name:"Disclosure.Button"})}let Fp="div",Np=pt.RenderStrategy|pt.Static;function Ip(e,t){let n=p.useId(),{id:r=`headlessui-disclosure-panel-${n}`,transition:o=!1,...i}=e,[s,l]=to("Disclosure.Panel"),{close:a}=vl("Disclosure.Panel"),[c,u]=p.useState(null),f=ue(t,q(y=>{Rp(()=>l({type:5,element:y}))}),u);p.useEffect(()=>(l({type:3,panelId:r}),()=>{l({type:3,panelId:null})}),[r,l]);let h=Tn(),[d,g]=Gr(o,c,h!==null?(h&ae.Open)===ae.Open:s.disclosureState===0),v=ye({open:s.disclosureState===0,close:a}),b={ref:f,id:r,...qr(g)},x=ie();return p.createElement(ep,null,p.createElement(ro.Provider,{value:s.panelId},x({ourProps:b,theirProps:i,slot:v,defaultTag:Fp,features:Np,visible:d,name:"Disclosure.Panel"})))}let Dp=oe(Lp),bl=oe(Ap),xl=oe(Ip),jp=Object.assign(Dp,{Button:bl,Panel:xl}),si=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function li(e){var t,n;let r=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!Ve(o))return r;let i=!1;for(let l of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))l.remove(),i=!0;let s=i?(n=o.innerText)!=null?n:"":r;return si.test(s)&&(s=s.replace(si,"")),s}function _p(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(o=>{let i=document.getElementById(o);if(i){let s=i.getAttribute("aria-label");return typeof s=="string"?s.trim():li(i).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return li(e).trim()}function Bp(e){let t=p.useRef(""),n=p.useRef("");return q(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(t.current===o)return n.current;let i=_p(r).trim().toLowerCase();return t.current=o,n.current=i,i})}var Hp=Object.defineProperty,Vp=(e,t,n)=>t in e?Hp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ai=(e,t,n)=>(Vp(e,typeof t!="symbol"?t+"":t,n),n),le=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(le||{}),Ge=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Ge||{}),sn=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(sn||{}),wl=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.SelectOption=5]="SelectOption",e[e.RegisterOptions=6]="RegisterOptions",e[e.UnregisterOptions=7]="UnregisterOptions",e[e.SetButtonElement=8]="SetButtonElement",e[e.SetOptionsElement=9]="SetOptionsElement",e[e.SortOptions=10]="SortOptions",e[e.MarkButtonAsMoved=11]="MarkButtonAsMoved",e))(wl||{});function ci(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=Bs(t(e.options.slice()),i=>i.dataRef.current.domRef.current),o=n?r.indexOf(n):null;return o===-1&&(o=null),{options:r,activeOptionIndex:o}}let Wp={1(e){if(e.dataRef.current.disabled||e.listboxState===1)return e;let t=e.buttonElement?on.Tracked(ul(e.buttonElement)):e.buttonPositionState;return{...e,activeOptionIndex:null,pendingFocus:{focus:Q.Nothing},listboxState:1,__demoMode:!1,buttonPositionState:t}},0(e,t){if(e.dataRef.current.disabled||e.listboxState===0)return e;let n=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,o=e.options.findIndex(i=>r(i.dataRef.current.value));return o!==-1&&(n=o),{...e,frozenValue:!1,pendingFocus:t.focus,listboxState:0,activeOptionIndex:n,__demoMode:!1,buttonPositionState:on.Idle}},2(e,t){var n,r,o,i,s;if(e.dataRef.current.disabled||e.listboxState===1)return e;let l={...e,searchQuery:"",activationTrigger:(n=t.trigger)!=null?n:1,__demoMode:!1};if(t.focus===Q.Nothing)return{...l,activeOptionIndex:null};if(t.focus===Q.Specific)return{...l,activeOptionIndex:e.options.findIndex(u=>u.id===t.id)};if(t.focus===Q.Previous){let u=e.activeOptionIndex;if(u!==null){let f=e.options[u].dataRef.current.domRef,h=Qt(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});if(h!==null){let d=e.options[h].dataRef.current.domRef;if(((r=f.current)==null?void 0:r.previousElementSibling)===d.current||((o=d.current)==null?void 0:o.previousElementSibling)===null)return{...l,activeOptionIndex:h}}}}else if(t.focus===Q.Next){let u=e.activeOptionIndex;if(u!==null){let f=e.options[u].dataRef.current.domRef,h=Qt(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});if(h!==null){let d=e.options[h].dataRef.current.domRef;if(((i=f.current)==null?void 0:i.nextElementSibling)===d.current||((s=d.current)==null?void 0:s.nextElementSibling)===null)return{...l,activeOptionIndex:h}}}}let a=ci(e),c=Qt(t,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled});return{...l,...a,activeOptionIndex:c}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),o=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(s=>{var l;return!s.dataRef.current.disabled&&((l=s.dataRef.current.textValue)==null?void 0:l.startsWith(r))}),i=o?e.options.indexOf(o):-1;return i===-1||i===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:i,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5(e){return e.dataRef.current.mode===0?{...e,frozenValue:!0}:{...e}},6:(e,t)=>{let n=e.options.concat(t.options),r=e.activeOptionIndex;if(e.pendingFocus.focus!==Q.Nothing&&(r=Qt(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:o=>o.id,resolveDisabled:o=>o.dataRef.current.disabled})),e.activeOptionIndex===null){let{isSelected:o}=e.dataRef.current;if(o){let i=n.findIndex(s=>o?.(s.dataRef.current.value));i!==-1&&(r=i)}}return{...e,options:n,activeOptionIndex:r,pendingFocus:{focus:Q.Nothing},pendingShouldSort:!0}},7:(e,t)=>{let n=e.options,r=[],o=new Set(t.options);for(let[i,s]of n.entries())if(o.has(s.id)&&(r.push(i),o.delete(s.id),o.size===0))break;if(r.length>0){n=n.slice();for(let i of r.reverse())n.splice(i,1)}return{...e,options:n,activationTrigger:1}},8:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},9:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element},10:e=>e.pendingShouldSort?{...e,...ci(e),pendingShouldSort:!1}:e,11(e){return e.buttonPositionState.kind!=="Tracked"?e:{...e,buttonPositionState:on.Moved}}};class oo extends As{constructor(t){super(t),ai(this,"actions",{onChange:n=>{let{onChange:r,compare:o,mode:i,value:s}=this.state.dataRef.current;return ce(i,{0:()=>r?.(n),1:()=>{let l=s.slice(),a=l.findIndex(c=>o(c,n));return a===-1?l.push(n):l.splice(a,1),r?.(l)}})},registerOption:Un(()=>{let n=[],r=new Set;return[(o,i)=>{r.has(i)||(r.add(i),n.push({id:o,dataRef:i}))},()=>(r.clear(),this.send({type:6,options:n.splice(0)}))]}),unregisterOption:Un(()=>{let n=[];return[r=>n.push(r),()=>{this.send({type:7,options:n.splice(0)})}]}),goToOption:Un(()=>{let n=null;return[(r,o)=>{n={type:2,...r,trigger:o}},()=>n&&this.send(n)]}),closeListbox:()=>{this.send({type:1})},openListbox:n=>{this.send({type:0,focus:n})},selectActiveOption:()=>{var n;if(this.state.activeOptionIndex!==null){let{dataRef:r}=this.state.options[this.state.activeOptionIndex];this.actions.selectOption(r.current.value)}else this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(n=this.state.buttonElement)==null||n.focus({preventScroll:!0}))},selectOption:n=>{this.send({type:5,value:n})},search:n=>{this.send({type:3,value:n})},clearSearch:()=>{this.send({type:4})},setButtonElement:n=>{this.send({type:8,element:n})},setOptionsElement:n=>{this.send({type:9,element:n})}}),ai(this,"selectors",{activeDescendantId(n){var r;let o=n.activeOptionIndex,i=n.options;return o===null||(r=i[o])==null?void 0:r.id},isActive(n,r){var o;let i=n.activeOptionIndex,s=n.options;return i!==null?((o=s[i])==null?void 0:o.id)===r:!1},hasFrozenValue(n){return n.frozenValue},shouldScrollIntoView(n,r){return n.__demoMode||n.listboxState!==0||n.activationTrigger===0?!1:this.isActive(n,r)},didButtonMove(n){return n.buttonPositionState.kind==="Moved"}}),this.on(6,()=>{requestAnimationFrame(()=>{this.send({type:10})})});{let n=this.state.id,r=zr.get(null);this.disposables.add(r.on(Ns.Push,o=>{!r.selectors.isTop(o,n)&&this.state.listboxState===0&&this.actions.closeListbox()})),this.on(0,()=>r.actions.push(n)),this.on(1,()=>r.actions.pop(n))}this.disposables.group(n=>{this.on(1,r=>{r.buttonElement&&(n.dispose(),n.add(mp(r.buttonElement,r.buttonPositionState,()=>{this.send({type:11})})))})}),this.on(5,(n,r)=>{var o;this.actions.onChange(r.value),this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(o=this.state.buttonElement)==null||o.focus({preventScroll:!0}))})}static new({id:t,__demoMode:n=!1}){return new oo({id:t,dataRef:{current:{}},listboxState:n?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:Q.Nothing},frozenValue:!1,__demoMode:n,buttonPositionState:on.Idle})}reduce(t,n){return ce(n.type,Wp,t,n)}}const yl=p.createContext(null);function io(e){let t=p.useContext(yl);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,El),n}return t}function El({id:e,__demoMode:t=!1}){let n=p.useMemo(()=>oo.new({id:e,__demoMode:t}),[]);return ll(()=>n.dispose()),n}let An=p.createContext(null);An.displayName="ListboxDataContext";function Vt(e){let t=p.useContext(An);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Vt),n}return t}let zp=p.Fragment;function Up(e,t){let n=p.useId(),r=wn(),{value:o,defaultValue:i,form:s,name:l,onChange:a,by:c,invalid:u=!1,disabled:f=r||!1,horizontal:h=!1,multiple:d=!1,__demoMode:g=!1,...v}=e;const b=h?"horizontal":"vertical";let x=ue(t),y=nd(i),[w=d?[]:void 0,S]=td(o,a,y),R=El({id:n,__demoMode:g}),P=p.useRef({static:!1,hold:!1}),T=p.useRef(new Map),k=Td(c),F=p.useCallback(B=>ce($.mode,{[Ge.Multi]:()=>w.some(j=>k(j,B)),[Ge.Single]:()=>k(w,B)}),[w]),$=ye({value:w,disabled:f,invalid:u,mode:d?Ge.Multi:Ge.Single,orientation:b,onChange:S,compare:k,isSelected:F,optionsPropsRef:P,listRef:T});te(()=>{R.state.dataRef.current=$},[$]);let D=fe(R,B=>B.listboxState),W=zr.get(null),z=fe(W,p.useCallback(B=>W.selectors.isTop(B,n),[W,n])),[O,A]=fe(R,B=>[B.buttonElement,B.optionsElement]);rf(z,[O,A],(B,j)=>{R.send({type:wl.CloseListbox}),_s(j,Ur.Loose)||(B.preventDefault(),O?.focus())});let _=ye({open:D===le.Open,disabled:f,invalid:u,value:w}),[L,C]=yd({inherit:!0}),M={ref:x},V=p.useCallback(()=>{if(y!==void 0)return S?.(y)},[S,y]),X=ie();return p.createElement(C,{value:L,props:{htmlFor:O?.id},slot:{open:D===le.Open,disabled:f}},p.createElement(Xm,null,p.createElement(yl.Provider,{value:R},p.createElement(An.Provider,{value:$},p.createElement(Qr,{value:ce(D,{[le.Open]:ae.Open,[le.Closed]:ae.Closed})},l!=null&&w!=null&&p.createElement(cd,{disabled:f,data:{[l]:w},form:s,onReset:V}),X({ourProps:M,theirProps:v,slot:_,defaultTag:zp,name:"Listbox"}))))))}let qp="button";function Gp(e,t){let n=p.useId(),r=ys(),o=Vt("Listbox.Button"),i=io("Listbox.Button"),{id:s=r||`headlessui-listbox-button-${n}`,disabled:l=o.disabled||!1,autoFocus:a=!1,...c}=e,u=ue(t,qm(),i.actions.setButtonElement),f=Gm(),[h,d,g]=fe(i,A=>[A.listboxState,A.buttonElement,A.optionsElement]),v=h===le.Open;lf(v,{trigger:d,action:p.useCallback(A=>{if(d!=null&&d.contains(A.target))return Zt.Ignore;let _=A.target.closest('[role="option"]:not([data-disabled])');return Ve(_)?Zt.Select(_):g!=null&&g.contains(A.target)?Zt.Ignore:Zt.Close},[d,g]),close:i.actions.closeListbox,select:i.actions.selectActiveOption});let b=q(A=>{switch(A.key){case J.Enter:rd(A.currentTarget);break;case J.Space:case J.ArrowDown:A.preventDefault(),i.actions.openListbox({focus:o.value?Q.Nothing:Q.First});break;case J.ArrowUp:A.preventDefault(),i.actions.openListbox({focus:o.value?Q.Nothing:Q.Last});break}}),x=q(A=>{A.key===J.Space&&A.preventDefault()}),y=Ld(A=>{var _;i.state.listboxState===le.Open?(Ye.flushSync(()=>i.actions.closeListbox()),(_=i.state.buttonElement)==null||_.focus({preventScroll:!0})):(A.preventDefault(),i.actions.openListbox({focus:Q.Nothing}))}),w=q(A=>A.preventDefault()),S=Ts([s]),R=vd(),{isFocusVisible:P,focusProps:T}=Br({autoFocus:a}),{isHovered:k,hoverProps:F}=_r({isDisabled:l}),{pressed:$,pressProps:D}=Hr({disabled:l}),W=ye({open:h===le.Open,active:$||h===le.Open,disabled:l,invalid:o.invalid,value:o.value,hover:k,focus:P,autofocus:a}),z=fe(i,A=>A.listboxState===le.Open),O=Lt(f(),{ref:u,id:s,type:Vs(e,d),"aria-haspopup":"listbox","aria-controls":g?.id,"aria-expanded":z,"aria-labelledby":S,"aria-describedby":R,disabled:l||void 0,autoFocus:a,onKeyDown:b,onKeyUp:x,onKeyPress:w},y,T,F,D);return ie()({ourProps:O,theirProps:c,slot:W,defaultTag:qp,name:"Listbox.Button"})}let Cl=p.createContext(!1),Kp="div",Yp=pt.RenderStrategy|pt.Static;function Xp(e,t){let n=p.useId(),{id:r=`headlessui-listbox-options-${n}`,anchor:o,portal:i=!1,modal:s=!0,transition:l=!1,...a}=e,c=Um(o),[u,f]=p.useState(null);c&&(i=!0);let h=Vt("Listbox.Options"),d=io("Listbox.Options"),[g,v,b,x]=fe(d,H=>[H.listboxState,H.buttonElement,H.optionsElement,H.__demoMode]),y=xr(v),w=xr(b),S=Tn(),[R,P]=Gr(l,u,S!==null?(S&ae.Open)===ae.Open:g===le.Open);Ud(R,v,d.actions.closeListbox);let T=x?!1:s&&g===le.Open;pf(T,w);let k=x?!1:s&&g===le.Open;zd(k,{allowed:p.useCallback(()=>[v,b],[v,b])});let F=fe(d,d.selectors.didButtonMove)?!1:R,$=fe(d,d.selectors.hasFrozenValue)&&!e.static,D=sl($,h.value),W=p.useCallback(H=>h.compare(D,H),[h.compare,D]),z=fe(d,H=>{var G;if(c==null||!((G=c?.to)!=null&&G.includes("selection")))return null;let pe=H.options.findIndex(de=>W(de.dataRef.current.value));return pe===-1&&(pe=0),pe}),O=(()=>{if(c==null)return;if(z===null)return{...c,inner:void 0};let H=Array.from(h.listRef.current.values());return{...c,inner:{listRef:{current:H},index:z}}})(),[A,_]=Ym(O),L=Km(),C=ue(t,c?A:null,d.actions.setOptionsElement,f),M=ot();p.useEffect(()=>{let H=b;H&&g===le.Open&&(Wu(H)||H==null||H.focus({preventScroll:!0}))},[g,b]);let V=q(H=>{var G;switch(M.dispose(),H.key){case J.Space:if(d.state.searchQuery!=="")return H.preventDefault(),H.stopPropagation(),d.actions.search(H.key);case J.Enter:H.preventDefault(),H.stopPropagation(),d.actions.selectActiveOption();break;case ce(h.orientation,{vertical:J.ArrowDown,horizontal:J.ArrowRight}):return H.preventDefault(),H.stopPropagation(),d.actions.goToOption({focus:Q.Next});case ce(h.orientation,{vertical:J.ArrowUp,horizontal:J.ArrowLeft}):return H.preventDefault(),H.stopPropagation(),d.actions.goToOption({focus:Q.Previous});case J.Home:case J.PageUp:return H.preventDefault(),H.stopPropagation(),d.actions.goToOption({focus:Q.First});case J.End:case J.PageDown:return H.preventDefault(),H.stopPropagation(),d.actions.goToOption({focus:Q.Last});case J.Escape:H.preventDefault(),H.stopPropagation(),Ye.flushSync(()=>d.actions.closeListbox()),(G=d.state.buttonElement)==null||G.focus({preventScroll:!0});return;case J.Tab:H.preventDefault(),H.stopPropagation(),Ye.flushSync(()=>d.actions.closeListbox()),Qd(d.state.buttonElement,H.shiftKey?br.Previous:br.Next);break;default:H.key.length===1&&(d.actions.search(H.key),M.setTimeout(()=>d.actions.clearSearch(),350));break}}),X=fe(d,H=>{var G;return(G=H.buttonElement)==null?void 0:G.id}),B=ye({open:g===le.Open}),j=Lt(c?L():{},{id:r,ref:C,"aria-activedescendant":fe(d,d.selectors.activeDescendantId),"aria-multiselectable":h.mode===Ge.Multi?!0:void 0,"aria-labelledby":X,"aria-orientation":h.orientation,onKeyDown:V,role:"listbox",tabIndex:g===le.Open?0:void 0,style:{...a.style,..._,"--button-width":Od(R,v,!0).width},...qr(P)}),ee=ie(),Y=p.useMemo(()=>h.mode===Ge.Multi?h:{...h,isSelected:W},[h,W]);return p.createElement(fp,{enabled:i?e.static||R:!1,ownerDocument:y},p.createElement(An.Provider,{value:Y},ee({ourProps:j,theirProps:a,slot:B,defaultTag:Kp,features:Yp,visible:F,name:"Listbox.Options"})))}let Zp="div";function Jp(e,t){let n=p.useId(),{id:r=`headlessui-listbox-option-${n}`,disabled:o=!1,value:i,...s}=e,l=p.useContext(Cl)===!0,a=Vt("Listbox.Option"),c=io("Listbox.Option"),u=fe(c,$=>c.selectors.isActive($,r)),f=a.isSelected(i),h=p.useRef(null),d=Bp(h),g=it({disabled:o,value:i,domRef:h,get textValue(){return d()}}),v=ue(t,h,$=>{$?a.listRef.current.set(r,$):a.listRef.current.delete(r)}),b=fe(c,$=>c.selectors.shouldScrollIntoView($,r));te(()=>{if(b)return ve().requestAnimationFrame(()=>{var $,D;(D=($=h.current)==null?void 0:$.scrollIntoView)==null||D.call($,{block:"nearest"})})},[b,h]),te(()=>{if(!l)return c.actions.registerOption(r,g),()=>c.actions.unregisterOption(r)},[g,r,l]);let x=q($=>{if(o)return $.preventDefault();c.actions.selectOption(i)}),y=q(()=>{if(o)return c.actions.goToOption({focus:Q.Nothing});c.actions.goToOption({focus:Q.Specific,id:r})}),w=hf(),S=q($=>w.update($)),R=q($=>{w.wasMoved($)&&(o||u&&c.state.activationTrigger===sn.Pointer||c.actions.goToOption({focus:Q.Specific,id:r},sn.Pointer))}),P=q($=>{w.wasMoved($)&&(o||u&&c.state.activationTrigger===sn.Pointer&&c.actions.goToOption({focus:Q.Nothing}))}),T=ye({active:u,focus:u,selected:f,disabled:o,selectedOption:f&&l}),k=l?{}:{id:r,ref:v,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":f,disabled:void 0,onClick:x,onFocus:y,onPointerEnter:S,onMouseEnter:S,onPointerMove:R,onMouseMove:R,onPointerLeave:P,onMouseLeave:P},F=ie();return!f&&l?null:F({ourProps:k,theirProps:s,slot:T,defaultTag:Zp,name:"Listbox.Option"})}let Qp=p.Fragment;function eh(e,t){let{options:n,placeholder:r,...o}=e,i={ref:ue(t)},s=Vt("ListboxSelectedOption"),l=ye({}),a=s.value===void 0||s.value===null||s.mode===Ge.Multi&&Array.isArray(s.value)&&s.value.length===0,c=ie();return p.createElement(Cl.Provider,{value:!0},c({ourProps:i,theirProps:{...o,children:p.createElement(p.Fragment,null,r&&a?r:n)},slot:l,defaultTag:Qp,name:"ListboxSelectedOption"}))}let th=oe(Up),Rl=oe(Gp),nh=Sd,Sl=oe(Xp),$l=oe(Jp),rh=oe(eh),oh=Object.assign(th,{Button:Rl,Label:nh,Options:Sl,Option:$l,SelectedOption:rh});function kl({children:e,className:t,disabled:n=!1,intent:r="primary",...o}){return E.jsx(ed,{className:re("rounded-md font-bold cursor-pointer px-2",ih(r,!!n),{"opacity-50 cursor-default":n},t),"data-focus":!0,disabled:n,...o,children:e})}function ih(e,t){switch(e){case"danger":return re("bg-red-400 text-red-950 focus:text-black",{"hover:bg-red-500 focus:text-black":!t});case"none":return re("bg-white/20 text-slate-300 focus:text-white",{"hover:bg-white/10 focus:text-white":!t});case"success":return re("bg-emerald-400 text-emerald-950 focus:text-black",{"hover:bg-emerald-500 focus:text-black":!t});case"primary":return re("bg-sky-400 text-sky-950 focus:text-black",{"hover:bg-sky-500 focus:text-black":!t});case"warning":return re("bg-amber-400 text-amber-950 focus:text-black",{"hover:bg-amber-500 focus:text-black":!t})}}function so({children:e}){return E.jsx(hu,{FallbackComponent:sh,children:e})}function sh({error:e,resetErrorBoundary:t}){return E.jsx(Fr,{intent:"danger",children:E.jsxs(he,{align:"start",direction:"column",gap:2,children:[E.jsx("div",{className:"font-bold",children:"Something went wrong!"}),E.jsx("pre",{className:"text-sm font-monospace text-red-300",children:e.message}),E.jsx(kl,{intent:"danger",onClick:t,children:"Retry"})]})})}function Wt({children:e,onClick:t,to:n,...r}){const o=!!ka(n),[i,s]=p.useTransition(),l=Li();return E.jsx("a",{children:typeof e=="function"?e({isActive:o,isPending:i}):e,"data-link":n,onClick:a=>{t?.(a),s(()=>{l(n)})},...r})}function lh(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function ah(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function ch(){return/apple/i.test(navigator.vendor)}function uh(){return lh().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function dh(){return ah().includes("jsdom/")}const fh="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ui(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Ft(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&wr(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ut(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Qn(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function mh(e){return e.matches("html,body")}function et(e){return e?.ownerDocument||document}function ph(e){return ge(e)&&e.matches(fh)}function hh(e){if(!e||dh())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function ln(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...ln(e,o.id,n)])}function gh(e){return"nativeEvent"in e}function Rr(e,t){const n=["mouse","pen"];return n.push("",void 0),n.includes(e)}var vh=typeof document<"u",bh=function(){},Ie=vh?p.useLayoutEffect:bh;const xh={...m};function en(e){const t=m.useRef(e);return Ie(()=>{t.current=e}),t}const wh=xh.useInsertionEffect,yh=wh||(e=>e());function $e(e){const t=m.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return yh(()=>{t.current=e}),m.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Eh="data-floating-ui-focusable",di="active",fi="selected",Ch={...m};let mi=!1,Rh=0;const pi=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Rh++;function Sh(){const[e,t]=m.useState(()=>mi?pi():void 0);return Ie(()=>{e==null&&t(pi())},[]),m.useEffect(()=>{mi=!0},[]),e}const $h=Ch.useId,Pl=$h||Sh;let Sr;process.env.NODE_ENV!=="production"&&(Sr=new Set);function kh(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Sr)!=null&&e.has(o))){var i;(i=Sr)==null||i.add(o),console.error(o)}}function Ph(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const Th=m.createContext(null),Oh=m.createContext(null),Tl=()=>{var e;return((e=m.useContext(Th))==null?void 0:e.id)||null},lo=()=>m.useContext(Oh);function Fn(e){return"data-floating-ui-"+e}function xe(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const hi=Fn("safe-polygon");function er(e,t,n){if(n&&!Rr(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function tr(e){return typeof e=="function"?e():e}function Lh(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:l=!0,delay:a=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:h=!0}=t,d=lo(),g=Tl(),v=en(c),b=en(a),x=en(n),y=en(f),w=m.useRef(),S=m.useRef(-1),R=m.useRef(),P=m.useRef(-1),T=m.useRef(!0),k=m.useRef(!1),F=m.useRef(()=>{}),$=m.useRef(!1),D=$e(()=>{var L;const C=(L=o.current.openEvent)==null?void 0:L.type;return C?.includes("mouse")&&C!=="mousedown"});m.useEffect(()=>{if(!l)return;function L(C){let{open:M}=C;M||(xe(S),xe(P),T.current=!0,$.current=!1)}return i.on("openchange",L),()=>{i.off("openchange",L)}},[l,i]),m.useEffect(()=>{if(!l||!v.current||!n)return;function L(M){D()&&r(!1,M,"hover")}const C=et(s.floating).documentElement;return C.addEventListener("mouseleave",L),()=>{C.removeEventListener("mouseleave",L)}},[s.floating,n,r,l,v,D]);const W=m.useCallback(function(L,C,M){C===void 0&&(C=!0),M===void 0&&(M="hover");const V=er(b.current,"close",w.current);V&&!R.current?(xe(S),S.current=window.setTimeout(()=>r(!1,L,M),V)):C&&(xe(S),r(!1,L,M))},[b,r]),z=$e(()=>{F.current(),R.current=void 0}),O=$e(()=>{if(k.current){const L=et(s.floating).body;L.style.pointerEvents="",L.removeAttribute(hi),k.current=!1}}),A=$e(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);m.useEffect(()=>{if(!l)return;function L(B){if(xe(S),T.current=!1,u&&!Rr(w.current)||tr(y.current)>0&&!er(b.current,"open"))return;const j=er(b.current,"open",w.current);j?S.current=window.setTimeout(()=>{x.current||r(!0,B,"hover")},j):n||r(!0,B,"hover")}function C(B){if(A()){O();return}F.current();const j=et(s.floating);if(xe(P),$.current=!1,v.current&&o.current.floatingContext){n||xe(S),R.current=v.current({...o.current.floatingContext,tree:d,x:B.clientX,y:B.clientY,onClose(){O(),z(),A()||W(B,!0,"safe-polygon")}});const Y=R.current;j.addEventListener("mousemove",Y),F.current=()=>{j.removeEventListener("mousemove",Y)};return}(w.current!=="touch"||!Ft(s.floating,B.relatedTarget))&&W(B)}function M(B){A()||o.current.floatingContext&&(v.current==null||v.current({...o.current.floatingContext,tree:d,x:B.clientX,y:B.clientY,onClose(){O(),z(),A()||W(B)}})(B))}function V(){xe(S)}function X(B){A()||W(B,!1)}if(K(s.domReference)){const B=s.domReference,j=s.floating;return n&&B.addEventListener("mouseleave",M),h&&B.addEventListener("mousemove",L,{once:!0}),B.addEventListener("mouseenter",L),B.addEventListener("mouseleave",C),j&&(j.addEventListener("mouseleave",M),j.addEventListener("mouseenter",V),j.addEventListener("mouseleave",X)),()=>{n&&B.removeEventListener("mouseleave",M),h&&B.removeEventListener("mousemove",L),B.removeEventListener("mouseenter",L),B.removeEventListener("mouseleave",C),j&&(j.removeEventListener("mouseleave",M),j.removeEventListener("mouseenter",V),j.removeEventListener("mouseleave",X))}}},[s,l,e,u,h,W,z,O,r,n,x,d,b,v,o,A,y]),Ie(()=>{var L;if(l&&n&&(L=v.current)!=null&&(L=L.__options)!=null&&L.blockPointerEvents&&D()){k.current=!0;const M=s.floating;if(K(s.domReference)&&M){var C;const V=et(s.floating).body;V.setAttribute(hi,"");const X=s.domReference,B=d==null||(C=d.nodesRef.current.find(j=>j.id===g))==null||(C=C.context)==null?void 0:C.elements.floating;return B&&(B.style.pointerEvents=""),V.style.pointerEvents="none",X.style.pointerEvents="auto",M.style.pointerEvents="auto",()=>{V.style.pointerEvents="",X.style.pointerEvents="",M.style.pointerEvents=""}}}},[l,n,g,s,d,v,D]),Ie(()=>{n||(w.current=void 0,$.current=!1,z(),O())},[n,z,O]),m.useEffect(()=>()=>{z(),xe(S),xe(P),O()},[l,s.domReference,z,O]);const _=m.useMemo(()=>{function L(C){w.current=C.pointerType}return{onPointerDown:L,onPointerEnter:L,onMouseMove(C){const{nativeEvent:M}=C;function V(){!T.current&&!x.current&&r(!0,M,"hover")}u&&!Rr(w.current)||n||tr(y.current)===0||$.current&&C.movementX**2+C.movementY**2<2||(xe(P),w.current==="touch"?V():($.current=!0,P.current=window.setTimeout(V,tr(y.current))))}}},[u,r,n,x,y]);return m.useMemo(()=>l?{reference:_}:{},[l,_])}const Mh=m.createContext(null),gi=Fn("portal");function Ah(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Pl(),o=Fh(),[i,s]=m.useState(null),l=m.useRef(null);return Ie(()=>()=>{i?.remove(),queueMicrotask(()=>{l.current=null})},[i]),Ie(()=>{if(!r||l.current)return;const a=t?document.getElementById(t):null;if(!a)return;const c=document.createElement("div");c.id=r,c.setAttribute(gi,""),a.appendChild(c),l.current=c,s(c)},[t,r]),Ie(()=>{if(n===null||!r||l.current)return;let a=n||o?.portalNode;a&&!Kr(a)&&(a=a.current),a=a||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,a.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(gi,""),a=c||a,a.appendChild(u),l.current=u,s(u)},[t,n,r,o]),i}const Fh=()=>m.useContext(Mh),Nh={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Ih={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},vi=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function Dh(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:l=!0,outsidePress:a=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:h=!1,bubbles:d,capture:g}=t,v=lo(),b=$e(typeof a=="function"?a:()=>!1),x=typeof a=="function"?b:a,y=m.useRef(!1),{escapeKey:w,outsidePress:S}=vi(d),{escapeKey:R,outsidePress:P}=vi(g),T=m.useRef(!1),k=$e(O=>{var A;if(!n||!s||!l||O.key!=="Escape"||T.current)return;const _=(A=i.current.floatingContext)==null?void 0:A.nodeId,L=v?ln(v.nodesRef.current,_):[];if(!w&&(O.stopPropagation(),L.length>0)){let C=!0;if(L.forEach(M=>{var V;if((V=M.context)!=null&&V.open&&!M.context.dataRef.current.__escapeKeyBubbles){C=!1;return}}),!C)return}r(!1,gh(O)?O.nativeEvent:O,"escape-key")}),F=$e(O=>{var A;const _=()=>{var L;k(O),(L=ut(O))==null||L.removeEventListener("keydown",_)};(A=ut(O))==null||A.addEventListener("keydown",_)}),$=$e(O=>{var A;const _=i.current.insideReactTree;i.current.insideReactTree=!1;const L=y.current;if(y.current=!1,c==="click"&&L||_||typeof x=="function"&&!x(O))return;const C=ut(O),M="["+Fn("inert")+"]",V=et(o.floating).querySelectorAll(M);let X=K(C)?C:null;for(;X&&!Ne(X);){const Y=je(X);if(Ne(Y)||!K(Y))break;X=Y}if(V.length&&K(C)&&!mh(C)&&!Ft(C,o.floating)&&Array.from(V).every(Y=>!Ft(X,Y)))return;if(ge(C)&&z){const Y=Ne(C),H=Ee(C),G=/auto|scroll/,pe=Y||G.test(H.overflowX),de=Y||G.test(H.overflowY),lt=pe&&C.clientWidth>0&&C.scrollWidth>C.clientWidth,Et=de&&C.clientHeight>0&&C.scrollHeight>C.clientHeight,at=H.direction==="rtl",Ml=Et&&(at?O.offsetX<=C.offsetWidth-C.clientWidth:O.offsetX>C.clientWidth),Al=lt&&O.offsetY>C.clientHeight;if(Ml||Al)return}const B=(A=i.current.floatingContext)==null?void 0:A.nodeId,j=v&&ln(v.nodesRef.current,B).some(Y=>{var H;return Qn(O,(H=Y.context)==null?void 0:H.elements.floating)});if(Qn(O,o.floating)||Qn(O,o.domReference)||j)return;const ee=v?ln(v.nodesRef.current,B):[];if(ee.length>0){let Y=!0;if(ee.forEach(H=>{var G;if((G=H.context)!=null&&G.open&&!H.context.dataRef.current.__outsidePressBubbles){Y=!1;return}}),!Y)return}r(!1,O,"outside-press")}),D=$e(O=>{var A;const _=()=>{var L;$(O),(L=ut(O))==null||L.removeEventListener(c,_)};(A=ut(O))==null||A.addEventListener(c,_)});m.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=w,i.current.__outsidePressBubbles=S;let O=-1;function A(V){r(!1,V,"ancestor-scroll")}function _(){window.clearTimeout(O),T.current=!0}function L(){O=window.setTimeout(()=>{T.current=!1},Sn()?5:0)}const C=et(o.floating);l&&(C.addEventListener("keydown",R?F:k,R),C.addEventListener("compositionstart",_),C.addEventListener("compositionend",L)),x&&C.addEventListener(c,P?D:$,P);let M=[];return h&&(K(o.domReference)&&(M=Ke(o.domReference)),K(o.floating)&&(M=M.concat(Ke(o.floating))),!K(o.reference)&&o.reference&&o.reference.contextElement&&(M=M.concat(Ke(o.reference.contextElement)))),M=M.filter(V=>{var X;return V!==((X=C.defaultView)==null?void 0:X.visualViewport)}),M.forEach(V=>{V.addEventListener("scroll",A,{passive:!0})}),()=>{l&&(C.removeEventListener("keydown",R?F:k,R),C.removeEventListener("compositionstart",_),C.removeEventListener("compositionend",L)),x&&C.removeEventListener(c,P?D:$,P),M.forEach(V=>{V.removeEventListener("scroll",A)}),window.clearTimeout(O)}},[i,o,l,x,c,n,r,h,s,w,S,k,R,F,$,P,D]),m.useEffect(()=>{i.current.insideReactTree=!1},[i,x,c]);const W=m.useMemo(()=>({onKeyDown:k,...u&&{[Nh[f]]:O=>{r(!1,O.nativeEvent,"reference-press")},...f!=="click"&&{onClick(O){r(!1,O.nativeEvent,"reference-press")}}}}),[k,r,u,f]),z=m.useMemo(()=>({onKeyDown:k,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[Ih[c]]:()=>{i.current.insideReactTree=!0}}),[k,c,i]);return m.useMemo(()=>s?{reference:W,floating:z}:{},[s,W,z])}function jh(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Pl(),i=m.useRef({}),[s]=m.useState(()=>Ph()),l=Tl()!=null;if(process.env.NODE_ENV!=="production"){const d=r.reference;d&&!K(d)&&kh("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,c]=m.useState(r.reference),u=$e((d,g,v)=>{i.current.openEvent=d?g:void 0,s.emit("openchange",{open:d,event:g,reason:v,nested:l}),n?.(d,g,v)}),f=m.useMemo(()=>({setPositionReference:c}),[]),h=m.useMemo(()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference}),[a,r.reference,r.floating]);return m.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:h,events:s,floatingId:o,refs:f}),[t,u,h,s,o,f])}function _h(e){e===void 0&&(e={});const{nodeId:t}=e,n=jh({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=m.useState(null),[l,a]=m.useState(null),u=o?.domReference||i,f=m.useRef(null),h=lo();Ie(()=>{u&&(f.current=u)},[u]);const d=tl({...e,elements:{...o,...l&&{reference:l}}}),g=m.useCallback(w=>{const S=K(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;a(S),d.refs.setReference(S)},[d.refs]),v=m.useCallback(w=>{(K(w)||w===null)&&(f.current=w,s(w)),(K(d.refs.reference.current)||d.refs.reference.current===null||w!==null&&!K(w))&&d.refs.setReference(w)},[d.refs]),b=m.useMemo(()=>({...d.refs,setReference:v,setPositionReference:g,domReference:f}),[d.refs,v,g]),x=m.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),y=m.useMemo(()=>({...d,...r,refs:b,elements:x,nodeId:t}),[d,b,x,t,r]);return Ie(()=>{r.dataRef.current.floatingContext=y;const w=h?.nodesRef.current.find(S=>S.id===t);w&&(w.context=y)}),m.useMemo(()=>({...d,context:y,refs:b,elements:x}),[d,b,x,y])}function nr(){return uh()&&ch()}function Bh(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:l=!0,visibleOnly:a=!0}=t,c=m.useRef(!1),u=m.useRef(-1),f=m.useRef(!0);m.useEffect(()=>{if(!l)return;const d=me(s.domReference);function g(){!n&&ge(s.domReference)&&s.domReference===ui(et(s.domReference))&&(c.current=!0)}function v(){f.current=!0}function b(){f.current=!1}return d.addEventListener("blur",g),nr()&&(d.addEventListener("keydown",v,!0),d.addEventListener("pointerdown",b,!0)),()=>{d.removeEventListener("blur",g),nr()&&(d.removeEventListener("keydown",v,!0),d.removeEventListener("pointerdown",b,!0))}},[s.domReference,n,l]),m.useEffect(()=>{if(!l)return;function d(g){let{reason:v}=g;(v==="reference-press"||v==="escape-key")&&(c.current=!0)}return o.on("openchange",d),()=>{o.off("openchange",d)}},[o,l]),m.useEffect(()=>()=>{xe(u)},[]);const h=m.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(d){if(c.current)return;const g=ut(d.nativeEvent);if(a&&K(g)){if(nr()&&!d.relatedTarget){if(!f.current&&!ph(g))return}else if(!hh(g))return}r(!0,d.nativeEvent,"focus")},onBlur(d){c.current=!1;const g=d.relatedTarget,v=d.nativeEvent,b=K(g)&&g.hasAttribute(Fn("focus-guard"))&&g.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var x;const y=ui(s.domReference?s.domReference.ownerDocument:document);!g&&y===s.domReference||Ft((x=i.current.floatingContext)==null?void 0:x.refs.floating.current,y)||Ft(s.domReference,y)||b||r(!1,v,"focus")})}}),[i,s.domReference,r,a]);return m.useMemo(()=>l?{reference:h}:{},[l,h])}function rr(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[di]:s,[fi]:l,...a}=e;i=a}return{...n==="floating"&&{tabIndex:-1,[Eh]:""},...i,...t.map(s=>{const l=s?s[n]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((s,l)=>(l&&Object.entries(l).forEach(a=>{let[c,u]=a;if(!(o&&[di,fi].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),s[c]=function(){for(var h,d=arguments.length,g=new Array(d),v=0;v<d;v++)g[v]=arguments[v];return(h=r.get(c))==null?void 0:h.map(b=>b(...g)).find(b=>b!==void 0)}}}else s[c]=u}),s),{})}}function Hh(e){e===void 0&&(e=[]);const t=e.map(l=>l?.reference),n=e.map(l=>l?.floating),r=e.map(l=>l?.item),o=m.useCallback(l=>rr(l,e,"reference"),t),i=m.useCallback(l=>rr(l,e,"floating"),n),s=m.useCallback(l=>rr(l,e,"item"),r);return m.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}function ao({children:e,className:t,content:n,positions:r,showOnFocus:o=!1,showOnHover:i=!0,usePortal:s}){const[l,a]=p.useState(!1),c=Ah({root:document.body}),{refs:u,floatingStyles:f,context:h}=_h({onOpenChange:a,open:l,middleware:[Zr(4),nl(),Sm(r?{allowedPlacements:r}:{})]}),d=Lh(h,{enabled:i}),g=Bh(h,{enabled:o}),v=Dh(h),{getReferenceProps:b,getFloatingProps:x}=Hh([v,g,d]),y=S=>{if(o)switch(S.key){case"Escape":{a(!1);break}case"Enter":{a(!0);break}}};let w=null;return l&&(w=E.jsx("div",{className:re("bg-white/80 text-black rounded-md px-2 py-1 shadow-md whitespace-nowrap z-40",t),ref:u.setFloating,style:f,...x(),children:n}),s&&c&&(w=Ye.createPortal(w,c))),E.jsxs("div",{className:re("group relative flex justify-center",t),onKeyDown:y,children:[E.jsx("div",{ref:u.setReference,...b(),children:e}),w]})}function bi({ariaLabel:e,children:t,className:n="",onClick:r,title:o}){return E.jsx(ao,{className:n,content:o,children:E.jsx("button",{"aria-label":e||o,className:re("cursor-pointer",n),onClick:r,children:t})})}function co({children:e,className:t,href:n,target:r="_blank",...o}){return E.jsx("a",{className:t,href:n,target:r,rel:"noopener noreferrer",...o,children:e})}function or({ariaLabel:e,children:t,className:n="",title:r,...o}){const i="to"in o?E.jsx(Wt,{"aria-label":e||r,children:t,className:"text-header-icons! cursor-pointer",to:o.to}):E.jsx(co,{"aria-label":e||r,children:t,className:"text-header-icons! cursor-pointer",href:o.href});return E.jsx(ao,{className:n,content:r,children:i})}function Vh({children:e}){return E.jsx("div",{className:"w-full shrink-0 flex flex-col gap-4 py-4 overflow-y-auto",children:e})}function Ol({children:e,commonQuestions:t,overview:n,packageDescription:r,packageName:o,repositoryUrl:i,showOpenCollectLink:s,versions:l}){const[a,c]=p.useState({isNavVisible:!1,isSiteSearchVisible:!1}),u=p.useCallback(d=>c(g=>g.isNavVisible===d?g:{...g,isNavVisible:d}),[]),f=p.useCallback(d=>c(g=>g.isSiteSearchVisible===d?g:{...g,isSiteSearchVisible:d}),[]),h=p.useMemo(()=>({commonQuestions:t,isNavVisible:a.isNavVisible,isSiteSearchVisible:a.isSiteSearchVisible,overview:n,packageDescription:r,packageName:o,repositoryUrl:i.replace(".git",""),setIsNavVisible:u,setIsSiteSearchVisible:f,showOpenCollectLink:!!s,versions:l}),[t,n,r,o,i,u,f,s,a.isNavVisible,a.isSiteSearchVisible,l]);return E.jsx(Vi.Provider,{children:e,value:h})}Ol.displayName="LibraryContextProvider";function Wh(){const{setIsNavVisible:e,setIsSiteSearchVisible:t}=Dt(),{pathname:n}=Be();return p.useLayoutEffect(()=>{e(!1),t(!1);const r=document.body.querySelector("[data-main-scrollable]");if(r){const o=setTimeout(()=>{r.scrollTo(0,0)},1);return()=>{clearTimeout(o)}}},[n,e,t]),null}const zh={"*":p.lazy(()=>Promise.resolve().then(()=>require("./PageNotFound-bzcasFul.cjs"))),"/":p.lazy(()=>Promise.resolve().then(()=>require("./GettingStartedRoute-Dh1xOg49.cjs"))),"/common-questions":p.lazy(()=>Promise.resolve().then(()=>require("./CommonQuestionsRoute-Bi0vu3D0.cjs"))),"/support":p.lazy(()=>Promise.resolve().then(()=>require("./SupportRoute-BxMpPywd.cjs"))),"/versions":p.lazy(()=>Promise.resolve().then(()=>require("./VersionsRoute-0EYAk1l2.cjs")))};function Uh(e,t=250){const[n,r]=p.useState(e);return p.useEffect(()=>{if(t===0)p.startTransition(()=>r(e));else{const o=setTimeout(()=>{p.startTransition(()=>r(e))},t);return()=>{clearTimeout(o)}}},[t,e]),n}let ir;function qh(){return ir===void 0&&(ir=new Promise(e=>{Promise.all([Promise.resolve().then(()=>require("./fuse-CM2wbN_z.cjs")).then(t=>t.default),fetch("/generated/search-records.json").then(t=>t.json()),fetch("/generated/search-index.json").then(t=>t.json())]).then(([t,n,r])=>{const o=new t(n,{isCaseSensitive:!1,keys:["title","text"],threshold:.8},t.parseIndex(r));e(o)})})),ir}function Gh({isActive:e,result:{item:{path:t,section:n,title:r}},searchTextDeferred:o}){const i=p.useMemo(()=>{const s=[],l=r.toLowerCase().split(o.toLowerCase());let a=0;for(let c=0;c<l.length;c++){const u=l[c];s.push(r.substring(a,a+u.length)),a+=u.length,s.push(E.jsx("mark",{className:"bg-transparent text-yellow-500",children:r.substring(a,a+o.length)},a)),a+=o.length}return a<r.length-1&&s.push(r.substring(a)),s},[o,r]);return E.jsx("li",{className:re("rounded px-2 py-1 hover:bg-white/10 cursor-pointer transition",{"bg-white/10":e}),children:E.jsxs(Wt,{className:"flex flex-row items-center gap-2 text-lg","data-active-search-result":e||void 0,to:t,children:[n&&E.jsx("div",{className:"text-sm text-white/80",children:n}),E.jsx("div",{className:"grow",children:i}),E.jsx(kr,{className:"h-4 w-4"})]})})}function Kh({inputRef:e,searchTextDeferred:t}){const n=p.use(qh()),[r,o]=p.useState(0),i=p.useMemo(()=>t?n.search(t,{limit:10}):[],[n,t]);return p.useEffect(()=>{if(e){const s=l=>{switch(l.key){case"ArrowDown":{const a=r<i.length-1?r+1:0;o(a);break}case"ArrowUp":{const a=r>0?r-1:i.length-1;o(a);break}case"Enter":{const a=document.body.querySelector("[data-active-search-result]");a instanceof HTMLAnchorElement&&a.click();break}}};return e.addEventListener("keydown",s),()=>{e.removeEventListener("keydown",s)}}},[r,e,i,t]),E.jsxs("ul",{className:"border-t border-white/10 pt-3 mt-3",children:[t&&i.length===0&&E.jsxs("div",{children:['No results for "',t,'"']}),i.map((s,l)=>E.jsx(Gh,{isActive:r===l,result:s,searchTextDeferred:t},l))]})}function Yh(){const{isSiteSearchVisible:e,setIsSiteSearchVisible:t}=Dt(),[n,r]=p.useState(null),[o,i]=p.useState(""),s=Uh(o);return p.useEffect(()=>{if(!e){const l=a=>{switch(a.key){case"K":case"k":{(a.metaKey||a.ctrlKey)&&t(!0);break}}};return document.body.addEventListener("keydown",l),()=>{document.body.removeEventListener("keydown",l)}}},[e,t]),e?E.jsx("div",{className:"fixed inset-0 backdrop-blur-md p-4 flex flex-col items-center animate duration-500 animate-fade-in",onClick:()=>{i(""),t(!1)},children:E.jsxs("div",{className:"shadow-lg bg-black/80 rounded-lg py-3 pl-4 pr-3 max-w-full w-200",children:[E.jsxs("div",{className:"flex items-center gap-3",onClick:l=>l.stopPropagation(),children:[E.jsx(wi,{className:"w-4 h-4"}),E.jsx("input",{autoFocus:!0,className:"grow text-lg md:tex-md",onKeyDown:l=>{l.key==="Escape"&&(i(""),t(!1))},onChange:l=>{i(l.currentTarget.value)},ref:r,placeholder:"Search documentation",value:o}),E.jsx("div",{className:"border border-white/20 rounded text-sm px-1 cursor-pointer",onClick:()=>t(!1),children:"esc"})]}),s&&E.jsx(Kh,{inputRef:n,searchTextDeferred:s},s)]})}):null}const Xh=navigator.userAgent.indexOf("Win")>=0?"^K":"⌘K";function Zh({navLinks:e,routes:t,...n}){return E.jsx(Ol,{...n,children:E.jsx(Jh,{navLinks:e,routes:t})})}function Jh({navLinks:e,routes:t}){const{isNavVisible:n,isSiteSearchVisible:r,packageDescription:o,packageName:i,setIsNavVisible:s,setIsSiteSearchVisible:l,versions:a}=Dt();return E.jsxs(fc,{children:[E.jsx(Wh,{}),E.jsxs("div",{className:"h-full w-full max-w-350 mx-auto flex flex-col",children:[E.jsxs(he,{align:"center",className:"h-12 w-full p-4",direction:"row",gap:4,children:[E.jsx(Rc,{className:"shrink-0 w-8 h-8"}),E.jsxs(he,{className:"overflow-hidden",align:"center",direction:"row",gap:4,children:[E.jsx(Wt,{children:i,className:"text-xl text-header-package-name! font-bold cursor-pointer truncate",to:"/"}),E.jsx("div",{className:"hidden md:block text-header-package-description",children:o})]}),E.jsx("div",{className:"grow"}),E.jsxs(he,{align:"center",direction:"row",gap:4,children:[E.jsx(bi,{isActive:r,onClick:()=>l(!r),title:"Site search",children:E.jsxs("div",{className:"h-8 flex items-center justify-center gap-1 px-2 bg-black/40 rounded-full text-sm",children:[E.jsx(wi,{className:"w-4 h-4"}),Xh]})}),a!==void 0&&E.jsx(or,{ariaLabel:"Documentation for other versions",children:E.jsx(Hi,{className:"w-6 h-6"}),title:"Previous versions",to:"/versions"}),E.jsx(or,{ariaLabel:"NPM project page",children:E.jsx(Cc,{className:"w-8 h-8"}),className:"hidden sm:block",href:`https://www.npmjs.com/package/${i}`,title:"NPM package"}),E.jsx(or,{ariaLabel:"GitHub project page",children:E.jsx(Ec,{className:"w-6 h-6"}),className:"hidden sm:block",href:`https://github.com/bvaughn/${i}`,title:"Source code"}),E.jsx(bi,{ariaLabel:"Site navigation menu",className:"block md:hidden",isActive:n,onClick:()=>s(!n),title:n?"Hide menu":"Show menu",children:n?E.jsx(Zl,{className:"w-6 h-6 fill-current drop-shadow-black/20 drop-shadow-xs"}):E.jsx(_l,{className:"w-6 h-6 fill-current drop-shadow-black/20 drop-shadow-xs"})})]})]}),E.jsxs("div",{className:"grow shrink flex flex-row shadow-lg mx-2 rounded-t-3xl overflow-hidden",children:[E.jsx("section",{className:re("w-full bg-black/90 md:block md:w-80 md:bg-black/80 overflow-auto",{hidden:!n}),children:E.jsx(Vh,{children:e})}),E.jsx("main",{className:re("w-full bg-black/90 relative overflow-auto",{hidden:n}),children:E.jsx("div",{className:"h-full p-4 py-4 overflow-auto [mask-image:linear-gradient(to_bottom,transparent,black_1.5rem)]","data-main-scrollable":!0,children:E.jsx(Wa,{children:Object.entries({...zh,...t}).map(([c,u])=>E.jsx(Fi,{element:E.jsx(so,{children:E.jsx(u,{})},c),path:c},c))})})})]})]}),E.jsx(Yh,{})]})}function Qh({children:e,className:t,...n}){return E.jsx(so,{children:E.jsx("div",{className:`border-lg bg-black/30 text-slate-300 rounded-lg p-2 ${t}`,...n,children:e})})}const eg=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},m.createElement("path",{d:"m424-424-86-86q-11-11-28-11t-28 11q-11 11-11 28t11 28l114 114q12 12 28 12t28-12l226-226q11-11 11-28t-11-28q-11-11-28-11t-28 11L424-424ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Z"})),tg=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},m.createElement("path",{d:"M320-440h320q17 0 28.5-11.5T680-480q0-17-11.5-28.5T640-520H320q-17 0-28.5 11.5T280-480q0 17 11.5 28.5T320-440ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Z"})),ng=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},m.createElement("path",{d:"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Z"}));function rg({checked:e,children:t,className:n,indeterminate:r,onChange:o,...i}){let s,l;return r?(s=tg,l="fill-white"):e?(s=eg,l="fill-blue-600"):(s=ng,l="fill-slate-600"),E.jsxs("label",{className:`cursor-pointer rounded-lg flex flex-row items-center outline-none group ${n}`,"data-focus-within":!0,...i,children:[E.jsx("input",{checked:e,className:"w-0 h-0",onChange:a=>{o(a.currentTarget.checked)},type:"checkbox"}),E.jsx(s,{className:l}),t&&E.jsxs(E.Fragment,{children:[" ",t]})]})}function uo({className:e="",html:t}){return E.jsx("div",{className:"relative",children:E.jsx("code",{className:re("text-sm md:text-base block text-left whitespace-pre-wrap break-normal text-white! rounded-md p-3 bg-black","flex flex-col",e),dangerouslySetInnerHTML:{__html:t}})})}function zt({className:e,sections:t}){return E.jsx(he,{className:e,direction:"column",gap:2,children:t.map(({content:n,intent:r},o)=>r?E.jsx(Fr,{html:!0,inline:!0,intent:r,minimal:!0,children:n},o):E.jsx("div",{dangerouslySetInnerHTML:{__html:n.replaceAll("<ul>",'<ul class="list-disc pl-4">')}},o))})}function fo({section:e,sourceCodePath:t,title:n}){const{repositoryUrl:r}=Dt();return E.jsxs(E.Fragment,{children:[E.jsxs("header",{className:"text-xl",children:[e&&E.jsxs(E.Fragment,{children:[E.jsx("span",{className:"text-xl whitespace-nowrap","data-section":!0,children:e})," ",E.jsx(kr,{className:"size-4 text-slate-400 inline"})," "]}),E.jsx("span",{className:"text-xl","data-title":!0,children:n}),t&&E.jsx(co,{className:"text-sm text-emerald-300 hover:text-white",href:`${r}/blob/main/${t}`,children:E.jsx(Dl,{className:"inline-block size-4 fill-current ml-2 mb-1"})})]}),E.jsx("title",{children:e?`${e}: ${n}`:n})]})}function og({method:e}){return E.jsxs(E.Fragment,{children:[E.jsx("dd",{className:"[&_code]:text-sky-300 text-lg font-bold",children:e.name}),E.jsxs("dt",{className:"mb-2",children:[E.jsx(zt,{sections:e.description}),E.jsx(uo,{className:"mt-2 p-2 flex flex-col",html:e.html})]})]})}function ig({json:e,section:t}){return E.jsxs(he,{direction:"column",gap:4,children:[E.jsx(fo,{section:t,sourceCodePath:e.filePath,title:`${e.name}`}),E.jsx(zt,{sections:e.description}),E.jsx(he,{direction:"column",children:E.jsx("dl",{className:"flex flex-col gap-2",children:e.methods.map((n,r)=>E.jsx(og,{method:n},r))})})]})}function sg({children:e,className:t,onChange:n,value:r,...o}){return E.jsx("input",{className:`rounded-md bg-black/30 border border-2 border-transparent py-1 px-2 outline-none focus:border-emerald-300 ${t}`,"data-focus":!0,onChange:i=>{n(i.currentTarget.value)},value:r,...o,children:e})}function lg(){return E.jsxs(he,{align:"center",className:"text-slate-300",direction:"row",gap:2,children:[E.jsx(Nl,{className:"size-4 animate-spin"}),"Loading..."]})}function Ll({children:e,className:t,disabled:n}){return E.jsx(he,{align:"center",className:re("px-4 h-8 cursor-pointer text-white/90 hover:text-white focus:bg-white/10 focus-within:bg-white/10",{"pointer-events-none text-white/50":n},t),direction:"row",gap:1,children:e})}function ag({children:e,className:t,path:n}){return E.jsx(Wt,{to:n,children:({isActive:r,isPending:o})=>E.jsx(Ll,{className:re("px-4 cursor-pointer",{"font-bold text-nav-active hover:text-nav-hover":r,"opacity-50 pointer-events-none":o},t),children:E.jsx(he,{align:"center",direction:"row",gap:2,children:e})})})}function cg({children:e,label:t}){return E.jsxs(jp,{as:"section",defaultOpen:!0,children:[E.jsx(bl,{className:"w-full group border-none! data-focus:bg-white/10",children:E.jsxs(Ll,{children:[E.jsx("div",{className:"uppercase text-sm font-bold text-white/50",children:t}),E.jsx("div",{className:"grow"}),E.jsx(kr,{className:"size-4 fill-white/60 group-data-hover:fill-white/50 group-data-open:rotate-90"})]})}),E.jsx(xl,{className:"pl-4",children:e})]})}function ug(e){const t=[],n=[];return Object.values(e.props).forEach(r=>{r.required?n.push(r):t.push(r)}),t.sort((r,o)=>r.name.localeCompare(o.name)),n.sort((r,o)=>r.name.localeCompare(o.name)),{optionalProps:t,requiredProps:n}}function dg({prop:e}){return E.jsxs(E.Fragment,{children:[E.jsx("dt",{className:"mt-6 pl-8 indent-[-1rem]",children:E.jsx(uo,{className:"bg-transparent inline-flex flex-col p-0",html:e.html})}),E.jsx("dd",{className:"mt-2 pl-4 [&_code]:text-sky-300",children:E.jsx(zt,{sections:e.description})})]})}function $r({header:e,props:t}){return t.length===0?null:E.jsxs(he,{direction:"column",children:[E.jsx("div",{className:"text-lg font-bold",children:e}),E.jsx("dl",{children:t.map(n=>E.jsx(dg,{prop:n},n.name))})]})}function fg({json:e,section:t}){const{optionalProps:n,requiredProps:r}=p.useMemo(()=>ug(e),[e]);return E.jsxs(he,{direction:"column",gap:4,children:[E.jsx(fo,{section:t,sourceCodePath:e.filePath,title:`${e.name} component`}),E.jsx(zt,{sections:e.description}),E.jsx($r,{header:"Required props",props:r}),E.jsx($r,{header:"Optional props",props:n})]})}const mg=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},m.createElement("path",{d:"m424-408-86-86q-11-11-28-11t-28 11q-11 11-11 28t11 28l114 114q12 12 28 12t28-12l226-226q11-11 11-28t-11-28q-11-11-28-11t-28 11L424-408Zm56 328q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"})),pg=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},m.createElement("path",{d:"M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"}));function hg({checked:e,children:t,className:n,name:r,onChange:o,value:i,...s}){let l,a;return e?(l=mg,a="fill-blue-600"):(l=pg,a="fill-slate-600"),E.jsxs("label",{className:`cursor-pointer rounded-full flex flex-row items-center outline-none group ${n}`,"data-focus-within":!0,...s,children:[E.jsx("input",{checked:e,className:"w-0 h-0",name:r,onChange:()=>{o(i)},type:"radio",value:i}),E.jsx(l,{className:a}),t&&E.jsxs(E.Fragment,{children:[" ",t]})]})}function gg({className:e,defaultValue:t,onChange:n,options:r,placeholder:o="",value:i}){return E.jsx(oh,{value:i??t,onChange:n,children:E.jsxs("div",{className:`relative ${e}`,children:[E.jsxs(Rl,{className:"w-full h-9 text-left rounded-md bg-black/30 border border-2 border-transparent py-1 px-2 outline-none focus:border-teal-300","data-focus":!0,children:[i?.label?E.jsx("span",{className:"block truncate",children:i.label}):E.jsx("span",{className:"block truncate text-slate-500",children:o}),E.jsx("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2",children:E.jsx(zl,{className:"h-4 w-4 text-gray-400","aria-hidden":"true"})})]}),E.jsx(Cp,{as:p.Fragment,leaveFrom:"opacity-100",leaveTo:"opacity-0",children:E.jsx(Sl,{className:"absolute z-10 mt-1 max-h-50 w-full overflow-auto rounded-md py-1 bg-black/90","data-focus":!0,children:r.map((s,l)=>E.jsx($l,{className:re("relative cursor-pointer select-none h-7 py-1 px-2 text-slate-300 border-none!","data-focus:text-teal-300 data-focus:bg-black","data-active:text-teal-300 data-active:bg-black","data-selected:text-teal-300 data-selected:font-bold"),value:s,children:s.label},l))})})]})})}function vg(e,t){switch(e){case"danger":return t?"bg-red-950 text-red-300 [&_svg]:text-red-500":"bg-black/10 bg-border border-2 border-red-500 text-white [&_svg]:text-red-500 [&_a]:text-red-400!";case"none":return t?"bg-white/10 text-slate-300 [&_svg]:text-slate-400":"bg-black/10 bg-border border-2 border-white/40 text-white [&_svg]:text-white/60";case"primary":return t?"bg-sky-950 text-sky-300 [&_svg]:text-sky-400":"bg-black/10 bg-border border-2 border-sky-400 text-white [&_svg]:text-sky-400";case"success":return t?"bg-emerald-950 text-emerald-300 [&_svg]:text-emerald-400":"bg-black/10 bg-border border-2 border-emerald-400 text-white [&_svg]:text-emerald-400";case"warning":return t?"bg-amber-950/65 text-amber-200 [&_svg]:text-amber-300":"bg-black/10 bg-border border-2 border-amber-400 text-white [&_svg]:text-amber-400 [&_a]:text-amber-400!"}}exports.AppRoot=Zh;exports.Block=Qh;exports.Box=he;exports.Button=kl;exports.Callout=Fr;exports.Checkbox=rg;exports.Code=uo;exports.ComponentProps=fg;exports.ComponentPropsSection=$r;exports.DocsSection=zt;exports.ErrorBoundary=so;exports.ExternalLink=co;exports.Header=fo;exports.ImperativeHandle=ig;exports.Input=sg;exports.Link=Wt;exports.LoadingSpinner=lg;exports.NavLink=ag;exports.NavSection=cg;exports.Radio=hg;exports.Select=gg;exports.SvgTags=Hi;exports.Tooltip=ao;exports.assert=Wi;exports.cn=re;exports.getIntentClassNames=vg;exports.useLibraryContext=Dt;
|
|
8
|
-
//# sourceMappingURL=index-
|
|
6
|
+
`))}else{let h=u.props,d=h?.className,g=typeof d=="function"?(...x)=>pr(d(...x),a.className):pr(d,a.className),v=g?{className:g}:{},b=vs(u.props,ze(Vn(a,["ref"])));for(let x in f)x in b&&delete f[x];return p.cloneElement(u,Object.assign({},b,f,c,{ref:o(Zu(u),c.ref)},v))}return p.createElement(i,Object.assign({},Vn(a,["ref"]),!ft(i)&&c,!ft(i)&&f),u)}function Yu(){let e=p.useRef([]),t=p.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function Xu(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function vs(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[o=>{var i;return(i=o?.preventDefault)==null?void 0:i.call(o)}]);for(let r in n)Object.assign(t,{[r](o,...i){let s=n[r];for(let l of s){if((o instanceof Event||o?.nativeEvent instanceof Event)&&o.defaultPrevented)return;l(o,...i)}}});return t}function Lt(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];for(let r in n)Object.assign(t,{[r](...o){let i=n[r];for(let s of i)s?.(...o)}});return t}function oe(e){var t;return Object.assign(p.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function ze(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Vn(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function Zu(e){return p.version.split(".")[0]>="19"?e.props.ref:e.ref}function ft(e){return e===p.Fragment||e===Symbol.for("react.fragment")}function Ju(e){return ft(e.type)}let Qu="button";function ed(e,t){var n;let r=wn(),{disabled:o=r||!1,autoFocus:i=!1,...s}=e,{isFocusVisible:l,focusProps:a}=Br({autoFocus:i}),{isHovered:c,hoverProps:u}=_r({isDisabled:o}),{pressed:f,pressProps:h}=Hr({disabled:o}),d=Lt({ref:t,type:(n=s.type)!=null?n:"button",disabled:o||void 0,autoFocus:i},a,u,h),g=ye({disabled:o,hover:c,focus:l,active:f,autofocus:i});return ie()({ourProps:d,theirProps:s,slot:g,defaultTag:Qu,name:"Button"})}let td=oe(ed);function nd(e,t,n){let[r,o]=p.useState(n),i=e!==void 0,s=p.useRef(i),l=p.useRef(!1),a=p.useRef(!1);return i&&!s.current&&!l.current?(l.current=!0,s.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&s.current&&!a.current&&(a.current=!0,s.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:r,q(c=>(i||Ye.flushSync(()=>o(c)),t?.(c)))]}function rd(e){let[t]=p.useState(e);return t}function bs(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))ws(n,xs(t,r),o);return n}function xs(e,t){return e?e+"["+t+"]":t}function ws(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())ws(e,xs(t,r.toString()),o);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):id(n)&&!p.isValidElement(n)&&bs(n,t,e)}function od(e){var t,n;let r=(t=e?.form)!=null?t:e.closest("form");if(r){for(let o of r.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(n=r.requestSubmit)==null||n.call(r)}}function id(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}let sd="span";var Vr=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Vr||{});function ld(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["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 ie()({ourProps:i,theirProps:o,slot:{},defaultTag:sd,name:"Hidden"})}let ys=oe(ld),ad=p.createContext(null);function cd({children:e}){let t=p.useContext(ad);if(!t)return p.createElement(p.Fragment,null,e);let{target:n}=t;return n?Ye.createPortal(p.createElement(p.Fragment,null,e),n):null}function ud({data:e,form:t,disabled:n,onReset:r,overrides:o}){let[i,s]=p.useState(null),l=ot();return p.useEffect(()=>{if(r&&i)return l.addEventListener(i,"reset",r)},[i,t,r]),p.createElement(cd,null,p.createElement(dd,{setForm:s,formId:t}),bs(e).map(([a,c])=>p.createElement(ys,{features:Vr.Hidden,...ze({key:a,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:a,value:c,...o})})))}function dd({setForm:e,formId:t}){return p.useEffect(()=>{if(t){let n=document.getElementById(t);n&&e(n)}},[e,t]),t?null:p.createElement(ys,{features:Vr.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:n=>{if(!n)return;let r=n.closest("form");r&&e(r)}})}let fd=p.createContext(void 0);function Es(){return p.useContext(fd)}function Cs(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function yn(e){return Cs(e)&&"tagName"in e}function Ve(e){return yn(e)&&"accessKey"in e}function qe(e){return yn(e)&&"tabIndex"in e}function md(e){return yn(e)&&"style"in e}function pd(e){return Ve(e)&&e.nodeName==="IFRAME"}function Rs(e){return Ve(e)&&e.nodeName==="INPUT"}function So(e){return Ve(e)&&e.nodeName==="LABEL"}function hd(e){return Ve(e)&&e.nodeName==="FIELDSET"}function Ss(e){return Ve(e)&&e.nodeName==="LEGEND"}function gd(e){return yn(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function hr(e){let t=e.parentElement,n=null;for(;t&&!hd(t);)Ss(t)&&(n=t),t=t.parentElement;let r=t?.getAttribute("disabled")==="";return r&&vd(n)?!1:r}function vd(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(Ss(t))return!1;t=t.previousElementSibling}return!0}let ks=Symbol();function $s(e,t=!0){return Object.assign(e,{[ks]:t})}function ue(...e){let t=p.useRef(e);p.useEffect(()=>{t.current=e},[e]);let n=q(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||r?.[ks])?void 0:n}let Wr=p.createContext(null);Wr.displayName="DescriptionContext";function Ps(){let e=p.useContext(Wr);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Ps),t}return e}function bd(){var e,t;return(t=(e=p.useContext(Wr))==null?void 0:e.value)!=null?t:void 0}let xd="p";function wd(e,t){let n=p.useId(),r=wn(),{id:o=`headlessui-description-${n}`,...i}=e,s=Ps(),l=ue(t);te(()=>s.register(o),[o,s.register]);let a=ye({...s.slot,disabled:r||!1}),c={ref:l,...s.props,id:o};return ie()({ourProps:c,theirProps:i,slot:a,defaultTag:xd,name:s.name||"Description"})}let yd=oe(wd);Object.assign(yd,{});var J=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(J||{});let En=p.createContext(null);En.displayName="LabelContext";function Ts(){let e=p.useContext(En);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Ts),t}return e}function Os(e){var t,n,r;let o=(n=(t=p.useContext(En))==null?void 0:t.value)!=null?n:void 0;return((r=e?.length)!=null?r:0)>0?[o,...e].filter(Boolean).join(" "):o}function Ed({inherit:e=!1}={}){let t=Os(),[n,r]=p.useState([]),o=e?[t,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,p.useMemo(()=>function(i){let s=q(a=>(r(c=>[...c,a]),()=>r(c=>{let u=c.slice(),f=u.indexOf(a);return f!==-1&&u.splice(f,1),u}))),l=p.useMemo(()=>({register:s,slot:i.slot,name:i.name,props:i.props,value:i.value}),[s,i.slot,i.name,i.props,i.value]);return p.createElement(En.Provider,{value:l},i.children)},[r])]}let Cd="label";function Rd(e,t){var n;let r=p.useId(),o=Ts(),i=Es(),s=wn(),{id:l=`headlessui-label-${r}`,htmlFor:a=i??((n=o.props)==null?void 0:n.htmlFor),passive:c=!1,...u}=e,f=ue(t);te(()=>o.register(l),[l,o.register]);let h=q(v=>{let b=v.currentTarget;if(!(v.target!==v.currentTarget&&gd(v.target))&&(So(b)&&v.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(v),So(b))){let x=document.getElementById(b.htmlFor);if(x){let y=x.getAttribute("disabled");if(y==="true"||y==="")return;let w=x.getAttribute("aria-disabled");if(w==="true"||w==="")return;(Rs(x)&&(x.type==="file"||x.type==="radio"||x.type==="checkbox")||x.role==="radio"||x.role==="checkbox"||x.role==="switch")&&x.click(),x.focus({preventScroll:!0})}}}),d=ye({...o.slot,disabled:s||!1}),g={ref:f,...o.props,id:l,htmlFor:a,onClick:h};return c&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in u&&delete u.onClick),ie()({ourProps:g,theirProps:u,slot:d,defaultTag:a?Cd:"div",name:o.name||"Label"})}let Sd=oe(Rd),kd=Object.assign(Sd,{}),$d=p.createContext(()=>{});function Pd({value:e,children:t}){return p.createElement($d.Provider,{value:e},t)}function Td(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function Od(e=Td){return p.useCallback((t,n)=>{if(typeof e=="string"){let r=e;return t?.[r]===n?.[r]}return e(t,n)},[e])}function ko(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function Ld(e,t,n=!1){let[r,o]=p.useState(()=>ko(t));return te(()=>{if(!t||!e)return;let i=ve();return i.requestAnimationFrame(function s(){i.requestAnimationFrame(s),o(l=>{let a=ko(t);return a.width===l.width&&a.height===l.height?l:a})}),()=>{i.dispose()}},[t,e]),n?{width:`${r.width}px`,height:`${r.height}px`}:r}var Ls=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Ls||{});function Md(e){let t=p.useRef(null),n=q(o=>{t.current=o.pointerType,!hr(o.currentTarget)&&o.pointerType==="mouse"&&o.button===Ls.Left&&(o.preventDefault(),e(o))}),r=q(o=>{t.current!=="mouse"&&(hr(o.currentTarget)||e(o))});return{onPointerDown:n,onClick:r}}let Ms=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};var Ad=Object.defineProperty,Fd=(e,t,n)=>t in e?Ad(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nd=(e,t,n)=>(Fd(e,t+"",n),n),As=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},be=(e,t,n)=>(As(e,t,"read from private field"),n?n.call(e):t.get(e)),Wn=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},$o=(e,t,n,r)=>(As(e,t,"write to private field"),t.set(e,n),n),Se,St,kt;let Fs=class{constructor(t){Wn(this,Se,{}),Wn(this,St,new Ms(()=>new Set)),Wn(this,kt,new Set),Nd(this,"disposables",ve()),$o(this,Se,t),$e.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return be(this,Se)}subscribe(t,n){if($e.isServer)return()=>{};let r={selector:t,callback:n,current:t(be(this,Se))};return be(this,kt).add(r),this.disposables.add(()=>{be(this,kt).delete(r)})}on(t,n){return $e.isServer?()=>{}:(be(this,St).get(t).add(n),this.disposables.add(()=>{be(this,St).get(t).delete(n)}))}send(t){let n=this.reduce(be(this,Se),t);if(n!==be(this,Se)){$o(this,Se,n);for(let r of be(this,kt)){let o=r.selector(be(this,Se));Ns(r.current,o)||(r.current=o,r.callback(o))}for(let r of be(this,St).get(t.type))r(be(this,Se),t)}}};Se=new WeakMap,St=new WeakMap,kt=new WeakMap;function Ns(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null?!1:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:zn(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:zn(e.entries(),t.entries()):Po(e)&&Po(t)?zn(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function zn(e,t){do{let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}while(!0)}function Po(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function Un(e){let[t,n]=e(),r=ve();return(...o)=>{t(...o),r.dispose(),r.microTask(n)}}var Id=Object.defineProperty,Dd=(e,t,n)=>t in e?Id(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,To=(e,t,n)=>(Dd(e,typeof t!="symbol"?t+"":t,n),n),Is=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(Is||{});let jd={0(e,t){let n=t.id,r=e.stack,o=e.stack.indexOf(n);if(o!==-1){let i=e.stack.slice();return i.splice(o,1),i.push(n),r=i,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(r===-1)return e;let o=e.stack.slice();return o.splice(r,1),{...e,stack:o}}},_d=class Ds extends Fs{constructor(){super(...arguments),To(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),To(this,"selectors",{isTop:(t,n)=>t.stack[t.stack.length-1]===n,inStack:(t,n)=>t.stack.includes(n)})}static new(){return new Ds({stack:[]})}reduce(t,n){return ce(n.type,jd,t,n)}};const zr=new Ms(()=>_d.new());var Xt={exports:{}},qn={};var Oo;function Bd(){if(Oo)return qn;Oo=1;var e=p;function t(a,c){return a===c&&(a!==0||1/a===1/c)||a!==a&&c!==c}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,i=e.useEffect,s=e.useMemo,l=e.useDebugValue;return qn.useSyncExternalStoreWithSelector=function(a,c,u,f,h){var d=o(null);if(d.current===null){var g={hasValue:!1,value:null};d.current=g}else g=d.current;d=s(function(){function b(R){if(!x){if(x=!0,y=R,R=f(R),h!==void 0&&g.hasValue){var P=g.value;if(h(P,R))return w=P}return w=R}if(P=w,n(y,R))return P;var T=f(R);return h!==void 0&&h(P,T)?(y=R,P):(y=R,w=T)}var x=!1,y,w,S=u===void 0?null:u;return[function(){return b(c())},S===null?void 0:function(){return b(S())}]},[c,u,f,h]);var v=r(a,d[0],d[1]);return i(function(){g.hasValue=!0,g.value=v},[v]),l(v),v},qn}var Gn={};var Lo;function Hd(){return Lo||(Lo=1,process.env.NODE_ENV!=="production"&&(function(){function e(a,c){return a===c&&(a!==0||1/a===1/c)||a!==a&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=p,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,o=t.useRef,i=t.useEffect,s=t.useMemo,l=t.useDebugValue;Gn.useSyncExternalStoreWithSelector=function(a,c,u,f,h){var d=o(null);if(d.current===null){var g={hasValue:!1,value:null};d.current=g}else g=d.current;d=s(function(){function b(R){if(!x){if(x=!0,y=R,R=f(R),h!==void 0&&g.hasValue){var P=g.value;if(h(P,R))return w=P}return w=R}if(P=w,n(y,R))return P;var T=f(R);return h!==void 0&&h(P,T)?(y=R,P):(y=R,w=T)}var x=!1,y,w,S=u===void 0?null:u;return[function(){return b(c())},S===null?void 0:function(){return b(S())}]},[c,u,f,h]);var v=r(a,d[0],d[1]);return i(function(){g.hasValue=!0,g.value=v},[v]),l(v),v},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Gn}var Mo;function Vd(){return Mo||(Mo=1,process.env.NODE_ENV==="production"?Xt.exports=Bd():Xt.exports=Hd()),Xt.exports}var Wd=Vd();function fe(e,t,n=Ns){return Wd.useSyncExternalStoreWithSelector(q(r=>e.subscribe(zd,r)),q(()=>e.state),q(()=>e.state),q(t),n)}function zd(e){return e}function js(e,t){let n=p.useId(),r=zr.get(t),[o,i]=fe(r,p.useCallback(s=>[r.selectors.isTop(s,n),r.selectors.inStack(s,n)],[r,n]));return te(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?i?o:!0:!1}let gr=new Map,Pt=new Map;function Ao(e){var t;let n=(t=Pt.get(e))!=null?t:0;return Pt.set(e,n+1),n!==0?()=>Fo(e):(gr.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>Fo(e))}function Fo(e){var t;let n=(t=Pt.get(e))!=null?t:1;if(n===1?Pt.delete(e):Pt.set(e,n-1),n!==1)return;let r=gr.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,gr.delete(e))}function Ud(e,{allowed:t,disallowed:n}={}){let r=js(e,"inert-others");te(()=>{var o,i;if(!r)return;let s=ve();for(let a of(o=n?.())!=null?o:[])a&&s.add(Ao(a));let l=(i=t?.())!=null?i:[];for(let a of l){if(!a)continue;let c=_t(a);if(!c)continue;let u=a.parentElement;for(;u&&u!==c.body;){for(let f of u.children)l.some(h=>f.contains(h))||s.add(Ao(f));u=u.parentElement}}return s.dispose},[r,t,n])}function qd(e,t,n){let r=it(o=>{let i=o.getBoundingClientRect();i.x===0&&i.y===0&&i.width===0&&i.height===0&&n()});p.useEffect(()=>{if(!e)return;let o=t===null?null:Ve(t)?t:t.current;if(!o)return;let i=ve();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>r.current(o));s.observe(o),i.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>r.current(o));s.observe(o),i.add(()=>s.disconnect())}return()=>i.dispose()},[t,r,e])}let vr=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),Gd=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var br=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(br||{}),Kd=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Kd||{}),Yd=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Yd||{});function _s(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(vr)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function Xd(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Gd)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Ur=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ur||{});function Bs(e,t=0){var n;return e===((n=_t(e))==null?void 0:n.body)?!1:ce(t,{0(){return e.matches(vr)},1(){let r=e;for(;r!==null;){if(r.matches(vr))return!0;r=r.parentElement}return!1}})}var Zd=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Zd||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));let Jd=["textarea","input"].join(",");function Qd(e){var t,n;return(n=(t=e?.matches)==null?void 0:t.call(e,Jd))!=null?n:!1}function Hs(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let s=o.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function ef(e,t,n=e===null?document.body:fn(e)){return tf(_s(n),t,{relativeTo:e})}function tf(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?fn(e[0]):document:fn(e),s=Array.isArray(e)?n?Hs(e):e:t&64?Xd(e):_s(e);o.length>0&&s.length>1&&(s=s.filter(d=>!o.some(g=>g!=null&&"current"in g?g?.current===d:g===d))),r=r??i?.activeElement;let l=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),a=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(r))-1;if(t&4)return Math.max(0,s.indexOf(r))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=t&32?{preventScroll:!0}:{},u=0,f=s.length,h;do{if(u>=f||u+f<=0)return 0;let d=a+u;if(t&16)d=(d+f)%f;else{if(d<0)return 3;if(d>=f)return 1}h=s[d],h?.focus(c),u+=l}while(h!==hs(h));return t&6&&Qd(h)&&h.select(),2}function Vs(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function nf(){return/Android/gi.test(window.navigator.userAgent)}function No(){return Vs()||nf()}function dt(e,t,n,r){let o=it(n);p.useEffect(()=>{if(!e)return;function i(s){o.current(s)}return document.addEventListener(t,i,r),()=>document.removeEventListener(t,i,r)},[e,t,r])}function rf(e,t,n,r){let o=it(n);p.useEffect(()=>{if(!e)return;function i(s){o.current(s)}return window.addEventListener(t,i,r),()=>window.removeEventListener(t,i,r)},[e,t,r])}const Io=30;function of(e,t,n){let r=it(n),o=p.useCallback(function(l,a){if(l.defaultPrevented)return;let c=a(l);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let u=(function f(h){return typeof h=="function"?f(h()):Array.isArray(h)||h instanceof Set?h:[h]})(t);for(let f of u)if(f!==null&&(f.contains(c)||l.composed&&l.composedPath().includes(f)))return;return!Bs(c,Ur.Loose)&&c.tabIndex!==-1&&l.preventDefault(),r.current(l,c)},[r,t]),i=p.useRef(null);dt(e,"pointerdown",l=>{var a,c;No()||(i.current=((c=(a=l.composedPath)==null?void 0:a.call(l))==null?void 0:c[0])||l.target)},!0),dt(e,"pointerup",l=>{if(No()||!i.current)return;let a=i.current;return i.current=null,o(l,()=>a)},!0);let s=p.useRef({x:0,y:0});dt(e,"touchstart",l=>{s.current.x=l.touches[0].clientX,s.current.y=l.touches[0].clientY},!0),dt(e,"touchend",l=>{let a={x:l.changedTouches[0].clientX,y:l.changedTouches[0].clientY};if(!(Math.abs(a.x-s.current.x)>=Io||Math.abs(a.y-s.current.y)>=Io))return o(l,()=>qe(l.target)?l.target:null)},!0),rf(e,"blur",l=>o(l,()=>pd(window.document.activeElement)?window.document.activeElement:null),!0)}function xr(...e){return p.useMemo(()=>_t(...e),[...e])}var sf=(e=>(e[e.Ignore=0]="Ignore",e[e.Select=1]="Select",e[e.Close=2]="Close",e))(sf||{});const Zt={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},lf=200,Do=5;function af(e,{trigger:t,action:n,close:r,select:o}){let i=p.useRef(null),s=p.useRef(null),l=p.useRef(null);dt(e&&t!==null,"pointerdown",a=>{Cs(a?.target)&&t!=null&&t.contains(a.target)&&(s.current=a.x,l.current=a.y,i.current=a.timeStamp)}),dt(e&&t!==null,"pointerup",a=>{var c,u;let f=i.current;if(f===null||(i.current=null,!qe(a.target))||Math.abs(a.x-((c=s.current)!=null?c:a.x))<Do&&Math.abs(a.y-((u=l.current)!=null?u:a.y))<Do)return;let h=n(a);switch(h.kind){case 0:return;case 1:{a.timeStamp-f>lf&&(o(h.target),r());break}case 2:{r();break}}},{capture:!0})}function Ws(e,t){return p.useMemo(()=>{var n;if(e.type)return e.type;let r=(n=e.as)!=null?n:"button";if(typeof r=="string"&&r.toLowerCase()==="button"||t?.tagName==="BUTTON"&&!t.hasAttribute("type"))return"button"},[e.type,e.as,t])}function cf(e){return p.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function uf(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let s=t[o].call(n,...i);s&&(n=s,r.forEach(l=>l()))}}}function df(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=(n=t.defaultView)!=null?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),i=Math.max(0,e-o);n.style(r,"paddingRight",`${i}px`)}}}function ff(){return Vs()?{before({doc:e,d:t,meta:n}){function r(o){for(let i of n().containers)for(let s of i())if(s.contains(o))return!0;return!1}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let l=ve();l.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>l.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,s=null;t.addEventListener(e,"click",l=>{if(qe(l.target))try{let a=l.target.closest("a");if(!a)return;let{hash:c}=new URL(a.href),u=e.querySelector(c);qe(u)&&!r(u)&&(s=u)}catch{}},!0),t.group(l=>{t.addEventListener(e,"touchstart",a=>{if(l.dispose(),qe(a.target)&&md(a.target))if(r(a.target)){let c=a.target;for(;c.parentElement&&r(c.parentElement);)c=c.parentElement;l.style(c,"overscrollBehavior","contain")}else l.style(a.target,"touchAction","none")})}),t.addEventListener(e,"touchmove",l=>{if(qe(l.target)){if(Rs(l.target))return;if(r(l.target)){let a=l.target;for(;a.parentElement&&a.dataset.headlessuiPortal!==""&&!(a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth);)a=a.parentElement;a.dataset.headlessuiPortal===""&&l.preventDefault()}else l.preventDefault()}},{passive:!1}),t.add(()=>{var l;let a=(l=window.scrollY)!=null?l:window.pageYOffset;i!==a&&window.scrollTo(0,i),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function mf(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function jo(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let Qe=uf(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:ve(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(t),r.computedMeta=jo(r.meta),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=jo(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},n=[ff(),df(),mf()];n.forEach(({before:r})=>r?.(t)),n.forEach(({after:r})=>r?.(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Qe.subscribe(()=>{let e=Qe.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&Qe.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Qe.dispatch("TEARDOWN",n)}});function pf(e,t,n=()=>({containers:[]})){let r=cf(Qe),o=t?r.get(t):void 0,i=o?o.count>0:!1;return te(()=>{if(!(!t||!e))return Qe.dispatch("PUSH",t,n),()=>Qe.dispatch("POP",t,n)},[e,t]),i}function hf(e,t,n=()=>[document.body]){let r=js(e,"scroll-lock");pf(r,t,o=>{var i;return{containers:[...(i=o.containers)!=null?i:[],n]}})}function _o(e){return[e.screenX,e.screenY]}function gf(){let e=p.useRef([-1,-1]);return{wasMoved(t){let n=_o(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=_o(t)}}}function vf(e=0){let[t,n]=p.useState(e),r=p.useCallback(a=>n(a),[]),o=p.useCallback(a=>n(c=>c|a),[]),i=p.useCallback(a=>(t&a)===a,[t]),s=p.useCallback(a=>n(c=>c&~a),[]),l=p.useCallback(a=>n(c=>c^a),[]);return{flags:t,setFlag:r,addFlag:o,hasFlag:i,removeFlag:s,toggleFlag:l}}var Bo,Ho;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Bo=process==null?void 0:process.env)==null?void 0:Bo.NODE_ENV)==="test"&&typeof((Ho=Element?.prototype)==null?void 0:Ho.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
|
7
|
+
`)),[]});var bf=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(bf||{});function qr(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function Gr(e,t,n,r){let[o,i]=p.useState(n),{hasFlag:s,addFlag:l,removeFlag:a}=vf(e&&o?3:0),c=p.useRef(!1),u=p.useRef(!1),f=ot();return te(()=>{var h;if(e){if(n&&i(!0),!t){n&&l(3);return}return(h=r?.start)==null||h.call(r,n),xf(t,{inFlight:c,prepare(){u.current?u.current=!1:u.current=c.current,c.current=!0,!u.current&&(n?(l(3),a(4)):(l(4),a(2)))},run(){u.current?n?(a(3),l(4)):(a(4),l(3)):n?a(1):l(1)},done(){var d;u.current&&Ef(t)||(c.current=!1,a(7),n||i(!1),(d=r?.end)==null||d.call(r,n))}})}},[e,n,t,f]),e?[o,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function xf(e,{prepare:t,run:n,done:r,inFlight:o}){let i=ve();return yf(e,{prepare:t,inFlight:o}),i.nextFrame(()=>{n(),i.requestAnimationFrame(()=>{i.add(wf(e,r))})}),i.dispose}function wf(e,t){var n,r;let o=ve();if(!e)return o.dispose;let i=!1;o.add(()=>{i=!0});let s=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(l=>l instanceof CSSTransition))!=null?r:[];return s.length===0?(t(),o.dispose):(Promise.allSettled(s.map(l=>l.finished)).then(()=>{i||t()}),o.dispose)}function yf(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function Ef(e){var t,n;return((n=(t=e.getAnimations)==null?void 0:t.call(e))!=null?n:[]).some(r=>r instanceof CSSTransition&&r.playState!=="finished")}function Cn(){return typeof window<"u"}function wt(e){return Kr(e)?(e.nodeName||"").toLowerCase():"#document"}function me(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Le(e){var t;return(t=(Kr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Kr(e){return Cn()?e instanceof Node||e instanceof me(e).Node:!1}function K(e){return Cn()?e instanceof Element||e instanceof me(e).Element:!1}function ge(e){return Cn()?e instanceof HTMLElement||e instanceof me(e).HTMLElement:!1}function wr(e){return!Cn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof me(e).ShadowRoot}const Cf=new Set(["inline","contents"]);function Bt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Cf.has(o)}const Rf=new Set(["table","td","th"]);function Sf(e){return Rf.has(wt(e))}const kf=[":popover-open",":modal"];function Rn(e){return kf.some(t=>{try{return e.matches(t)}catch{return!1}})}const $f=["transform","translate","scale","rotate","perspective"],Pf=["transform","translate","scale","rotate","perspective","filter"],Tf=["paint","layout","strict","content"];function Yr(e){const t=Sn(),n=K(e)?Ee(e):e;return $f.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Pf.some(r=>(n.willChange||"").includes(r))||Tf.some(r=>(n.contain||"").includes(r))}function Of(e){let t=je(e);for(;ge(t)&&!Ne(t);){if(Yr(t))return t;if(Rn(t))return null;t=je(t)}return null}function Sn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Lf=new Set(["html","body","#document"]);function Ne(e){return Lf.has(wt(e))}function Ee(e){return me(e).getComputedStyle(e)}function kn(e){return K(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function je(e){if(wt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wr(e)&&e.host||Le(e);return wr(t)?t.host:t}function zs(e){const t=je(e);return Ne(t)?e.ownerDocument?e.ownerDocument.body:e.body:ge(t)&&Bt(t)?t:zs(t)}function Ke(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=zs(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=me(o);if(i){const l=yr(s);return t.concat(s,s.visualViewport||[],Bt(o)?o:[],l&&n?Ke(l):[])}return t.concat(o,Ke(o,[],n))}function yr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Mf(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}const Af=["top","right","bottom","left"],Vo=["start","end"],Wo=Af.reduce((e,t)=>e.concat(t,t+"-"+Vo[0],t+"-"+Vo[1]),[]),nt=Math.min,se=Math.max,Mt=Math.round,Jt=Math.floor,Pe=e=>({x:e,y:e}),Ff={left:"right",right:"left",bottom:"top",top:"bottom"},Nf={start:"end",end:"start"};function zo(e,t,n){return se(e,nt(t,n))}function st(e,t){return typeof e=="function"?e(t):e}function Oe(e){return e.split("-")[0]}function Te(e){return e.split("-")[1]}function Us(e){return e==="x"?"y":"x"}function qs(e){return e==="y"?"height":"width"}const If=new Set(["top","bottom"]);function Ae(e){return If.has(Oe(e))?"y":"x"}function Gs(e){return Us(Ae(e))}function Ks(e,t,n){n===void 0&&(n=!1);const r=Te(e),o=Gs(e),i=qs(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=pn(s)),[s,pn(s)]}function Df(e){const t=pn(e);return[mn(e),t,mn(t)]}function mn(e){return e.replace(/start|end/g,t=>Nf[t])}const Uo=["left","right"],qo=["right","left"],jf=["top","bottom"],_f=["bottom","top"];function Bf(e,t,n){switch(e){case"top":case"bottom":return n?t?qo:Uo:t?Uo:qo;case"left":case"right":return t?jf:_f;default:return[]}}function Hf(e,t,n,r){const o=Te(e);let i=Bf(Oe(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(mn)))),i}function pn(e){return e.replace(/left|right|bottom|top/g,t=>Ff[t])}function Vf(e){return{top:0,right:0,bottom:0,left:0,...e}}function Wf(e){return typeof e!="number"?Vf(e):{top:e,right:e,bottom:e,left:e}}function hn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Go(e,t,n){let{reference:r,floating:o}=e;const i=Ae(t),s=Gs(t),l=qs(s),a=Oe(t),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[l]/2-o[l]/2;let d;switch(a){case"top":d={x:u,y:r.y-o.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(Te(t)){case"start":d[s]-=h*(n&&c?-1:1);break;case"end":d[s]+=h*(n&&c?-1:1);break}return d}const zf=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,l=i.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=Go(c,r,a),h=r,d={},g=0;for(let v=0;v<l.length;v++){const{name:b,fn:x}=l[v],{x:y,y:w,data:S,reset:R}=await x({x:u,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:d,rects:c,platform:s,elements:{reference:e,floating:t}});u=y??u,f=w??f,d={...d,[b]:{...d[b],...S}},R&&g<=50&&(g++,typeof R=="object"&&(R.placement&&(h=R.placement),R.rects&&(c=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:u,y:f}=Go(c,h,a)),v=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:d}};async function Ht(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:l,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=st(t,e),g=Wf(d),b=l[h?f==="floating"?"reference":"floating":f],x=hn(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),y=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),S=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},R=hn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:w,strategy:a}):y);return{top:(x.top-R.top+g.top)/S.y,bottom:(R.bottom-x.bottom+g.bottom)/S.y,left:(x.left-R.left+g.left)/S.x,right:(R.right-x.right+g.right)/S.x}}function Uf(e,t,n){return(e?[...n.filter(o=>Te(o)===e),...n.filter(o=>Te(o)!==e)]:n.filter(o=>Oe(o)===o)).filter(o=>e?Te(o)===e||(t?mn(o)!==o:!1):!0)}const qf=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:s,placement:l,platform:a,elements:c}=t,{crossAxis:u=!1,alignment:f,allowedPlacements:h=Wo,autoAlignment:d=!0,...g}=st(e,t),v=f!==void 0||h===Wo?Uf(f||null,d,h):h,b=await Ht(t,g),x=((n=s.autoPlacement)==null?void 0:n.index)||0,y=v[x];if(y==null)return{};const w=Ks(y,i,await(a.isRTL==null?void 0:a.isRTL(c.floating)));if(l!==y)return{reset:{placement:v[0]}};const S=[b[Oe(y)],b[w[0]],b[w[1]]],R=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:y,overflows:S}],P=v[x+1];if(P)return{data:{index:x+1,overflows:R},reset:{placement:P}};const T=R.map(k=>{const D=Te(k.placement);return[k.placement,D&&u?k.overflows.slice(0,2).reduce((W,z)=>W+z,0):k.overflows[0],k.overflows]}).sort((k,D)=>k[1]-D[1]),F=((o=T.filter(k=>k[2].slice(0,Te(k[0])?2:3).every(D=>D<=0))[0])==null?void 0:o[0])||T[0][0];return F!==l?{data:{index:x+1,overflows:R},reset:{placement:F}}:{}}}},Gf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...b}=st(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=Oe(o),y=Ae(l),w=Oe(l)===l,S=await(a.isRTL==null?void 0:a.isRTL(c.floating)),R=h||(w||!v?[pn(l)]:Df(l)),P=g!=="none";!h&&P&&R.push(...Hf(l,v,g,S));const T=[l,...R],$=await Ht(t,b),F=[];let k=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&F.push($[x]),f){const O=Ks(o,s,S);F.push($[O[0]],$[O[1]])}if(k=[...k,{placement:o,overflows:F}],!F.every(O=>O<=0)){var D,W;const O=(((D=i.flip)==null?void 0:D.index)||0)+1,A=T[O];if(A&&(!(f==="alignment"?y!==Ae(A):!1)||k.every(C=>Ae(C.placement)===y?C.overflows[0]>0:!0)))return{data:{index:O,overflows:k},reset:{placement:A}};let _=(W=k.filter(L=>L.overflows[0]<=0).sort((L,C)=>L.overflows[1]-C.overflows[1])[0])==null?void 0:W.placement;if(!_)switch(d){case"bestFit":{var z;const L=(z=k.filter(C=>{if(P){const M=Ae(C.placement);return M===y||M==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(M=>M>0).reduce((M,V)=>M+V,0)]).sort((C,M)=>C[1]-M[1])[0])==null?void 0:z[0];L&&(_=L);break}case"initialPlacement":_=l;break}if(o!==_)return{reset:{placement:_}}}return{}}}},Kf=new Set(["left","top"]);async function Yf(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Oe(n),l=Te(n),a=Ae(n)==="y",c=Kf.has(s)?-1:1,u=i&&a?-1:1,f=st(t,e);let{mainAxis:h,crossAxis:d,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof g=="number"&&(d=l==="end"?g*-1:g),a?{x:d*u,y:h*c}:{x:h*c,y:d*u}}const Xf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:l}=t,a=await Yf(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:s}}}}},Zf=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:b=>{let{x,y}=b;return{x,y}}},...a}=st(e,t),c={x:n,y:r},u=await Ht(t,a),f=Ae(Oe(o)),h=Us(f);let d=c[h],g=c[f];if(i){const b=h==="y"?"top":"left",x=h==="y"?"bottom":"right",y=d+u[b],w=d-u[x];d=zo(y,d,w)}if(s){const b=f==="y"?"top":"left",x=f==="y"?"bottom":"right",y=g+u[b],w=g-u[x];g=zo(y,g,w)}const v=l.fn({...t,[h]:d,[f]:g});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[h]:i,[f]:s}}}}}},Jf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:l}=t,{apply:a=()=>{},...c}=st(e,t),u=await Ht(t,c),f=Oe(o),h=Te(o),d=Ae(o)==="y",{width:g,height:v}=i.floating;let b,x;f==="top"||f==="bottom"?(b=f,x=h===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(x=f,b=h==="end"?"top":"bottom");const y=v-u.top-u.bottom,w=g-u.left-u.right,S=nt(v-u[b],y),R=nt(g-u[x],w),P=!t.middlewareData.shift;let T=S,$=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&($=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=y),P&&!h){const k=se(u.left,0),D=se(u.right,0),W=se(u.top,0),z=se(u.bottom,0);d?$=g-2*(k!==0||D!==0?k+D:se(u.left,u.right)):T=v-2*(W!==0||z!==0?W+z:se(u.top,u.bottom))}await a({...t,availableWidth:$,availableHeight:T});const F=await s.getDimensions(l.floating);return g!==F.width||v!==F.height?{reset:{rects:!0}}:{}}}};function Ys(e){const t=Ee(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ge(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,l=Mt(n)!==i||Mt(r)!==s;return l&&(n=i,r=s),{width:n,height:r,$:l}}function Xr(e){return K(e)?e:e.contextElement}function mt(e){const t=Xr(e);if(!ge(t))return Pe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ys(t);let s=(i?Mt(n.width):n.width)/r,l=(i?Mt(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Qf=Pe(0);function Xs(e){const t=me(e);return!Sn()||!t.visualViewport?Qf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function em(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==me(e)?!1:t}function rt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Xr(e);let s=Pe(1);t&&(r?K(r)&&(s=mt(r)):s=mt(e));const l=em(i,n,r)?Xs(i):Pe(0);let a=(o.left+l.x)/s.x,c=(o.top+l.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i){const h=me(i),d=r&&K(r)?me(r):r;let g=h,v=yr(g);for(;v&&r&&d!==g;){const b=mt(v),x=v.getBoundingClientRect(),y=Ee(v),w=x.left+(v.clientLeft+parseFloat(y.paddingLeft))*b.x,S=x.top+(v.clientTop+parseFloat(y.paddingTop))*b.y;a*=b.x,c*=b.y,u*=b.x,f*=b.y,a+=w,c+=S,g=me(v),v=yr(g)}}return hn({width:u,height:f,x:a,y:c})}function $n(e,t){const n=kn(e).scrollLeft;return t?t.left+n:rt(Le(e)).left+n}function Zs(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-$n(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function tm(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Le(r),l=t?Rn(t.floating):!1;if(r===s||l&&i)return n;let a={scrollLeft:0,scrollTop:0},c=Pe(1);const u=Pe(0),f=ge(r);if((f||!f&&!i)&&((wt(r)!=="body"||Bt(s))&&(a=kn(r)),ge(r))){const d=rt(r);c=mt(r),u.x=d.x+r.clientLeft,u.y=d.y+r.clientTop}const h=s&&!f&&!i?Zs(s,a):Pe(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-a.scrollTop*c.y+u.y+h.y}}function nm(e){return Array.from(e.getClientRects())}function rm(e){const t=Le(e),n=kn(e),r=e.ownerDocument.body,o=se(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=se(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+$n(e);const l=-n.scrollTop;return Ee(r).direction==="rtl"&&(s+=se(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:l}}const Ko=25;function om(e,t){const n=me(e),r=Le(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;const u=Sn();(!u||u&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}const c=$n(r);if(c<=0){const u=r.ownerDocument,f=u.body,h=getComputedStyle(f),d=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(r.clientWidth-f.clientWidth-d);g<=Ko&&(i-=g)}else c<=Ko&&(i+=c);return{width:i,height:s,x:l,y:a}}const im=new Set(["absolute","fixed"]);function sm(e,t){const n=rt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ge(e)?mt(e):Pe(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,a=o*i.x,c=r*i.y;return{width:s,height:l,x:a,y:c}}function Yo(e,t,n){let r;if(t==="viewport")r=om(e,n);else if(t==="document")r=rm(Le(e));else if(K(t))r=sm(t,n);else{const o=Xs(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return hn(r)}function Js(e,t){const n=je(e);return n===t||!K(n)||Ne(n)?!1:Ee(n).position==="fixed"||Js(n,t)}function lm(e,t){const n=t.get(e);if(n)return n;let r=Ke(e,[],!1).filter(l=>K(l)&&wt(l)!=="body"),o=null;const i=Ee(e).position==="fixed";let s=i?je(e):e;for(;K(s)&&!Ne(s);){const l=Ee(s),a=Yr(s);!a&&l.position==="fixed"&&(o=null),(i?!a&&!o:!a&&l.position==="static"&&!!o&&im.has(o.position)||Bt(s)&&!a&&Js(e,s))?r=r.filter(u=>u!==s):o=l,s=je(s)}return t.set(e,r),r}function am(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Rn(t)?[]:lm(t,this._c):[].concat(n),r],l=s[0],a=s.reduce((c,u)=>{const f=Yo(t,u,o);return c.top=se(f.top,c.top),c.right=nt(f.right,c.right),c.bottom=nt(f.bottom,c.bottom),c.left=se(f.left,c.left),c},Yo(t,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function cm(e){const{width:t,height:n}=Ys(e);return{width:t,height:n}}function um(e,t,n){const r=ge(t),o=Le(t),i=n==="fixed",s=rt(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const a=Pe(0);function c(){a.x=$n(o)}if(r||!r&&!i)if((wt(t)!=="body"||Bt(o))&&(l=kn(t)),r){const d=rt(t,!0,i,t);a.x=d.x+t.clientLeft,a.y=d.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?Zs(o,l):Pe(0),f=s.left+l.scrollLeft-a.x-u.x,h=s.top+l.scrollTop-a.y-u.y;return{x:f,y:h,width:s.width,height:s.height}}function Kn(e){return Ee(e).position==="static"}function Xo(e,t){if(!ge(e)||Ee(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Le(e)===n&&(n=n.ownerDocument.body),n}function Qs(e,t){const n=me(e);if(Rn(e))return n;if(!ge(e)){let o=je(e);for(;o&&!Ne(o);){if(K(o)&&!Kn(o))return o;o=je(o)}return n}let r=Xo(e,t);for(;r&&Sf(r)&&Kn(r);)r=Xo(r,t);return r&&Ne(r)&&Kn(r)&&!Yr(r)?n:r||Of(e)||n}const dm=async function(e){const t=this.getOffsetParent||Qs,n=this.getDimensions,r=await n(e.floating);return{reference:um(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function fm(e){return Ee(e).direction==="rtl"}const mm={convertOffsetParentRelativeRectToViewportRelativeRect:tm,getDocumentElement:Le,getClippingRect:am,getOffsetParent:Qs,getElementRects:dm,getClientRects:nm,getDimensions:cm,getScale:mt,isElement:K,isRTL:fm};function el(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function pm(e,t){let n=null,r;const o=Le(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function s(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),i();const c=e.getBoundingClientRect(),{left:u,top:f,width:h,height:d}=c;if(l||t(),!h||!d)return;const g=Jt(f),v=Jt(o.clientWidth-(u+h)),b=Jt(o.clientHeight-(f+d)),x=Jt(u),w={rootMargin:-g+"px "+-v+"px "+-b+"px "+-x+"px",threshold:se(0,nt(1,a))||1};let S=!0;function R(P){const T=P[0].intersectionRatio;if(T!==a){if(!S)return s();T?s(!1,T):r=setTimeout(()=>{s(!1,1e-7)},1e3)}T===1&&!el(c,e.getBoundingClientRect())&&s(),S=!1}try{n=new IntersectionObserver(R,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(R,w)}n.observe(e)}return s(!0),i}function hm(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,c=Xr(e),u=o||i?[...c?Ke(c):[],...Ke(t)]:[];u.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const f=c&&l?pm(c,n):null;let h=-1,d=null;s&&(d=new ResizeObserver(x=>{let[y]=x;y&&y.target===c&&d&&(d.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=d)==null||w.observe(t)})),n()}),c&&!a&&d.observe(c),d.observe(t));let g,v=a?rt(e):null;a&&b();function b(){const x=rt(e);v&&!el(v,x)&&n(),v=x,g=requestAnimationFrame(b)}return n(),()=>{var x;u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f?.(),(x=d)==null||x.disconnect(),d=null,a&&cancelAnimationFrame(g)}}const Yn=Ht,gm=Xf,vm=qf,bm=Zf,xm=Gf,wm=Jf,ym=(e,t,n)=>{const r=new Map,o={platform:mm,...n},i={...o.platform,_c:r};return zf(e,t,{...o,platform:i})};var Em=typeof document<"u",Cm=function(){},rn=Em?p.useLayoutEffect:Cm;function gn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!gn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!gn(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function tl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zo(e,t){const n=tl(e);return Math.round(t*n)/n}function Xn(e){const t=m.useRef(e);return rn(()=>{t.current=e}),t}function nl(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:a,open:c}=e,[u,f]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,d]=m.useState(r);gn(h,r)||d(r);const[g,v]=m.useState(null),[b,x]=m.useState(null),y=m.useCallback(C=>{C!==P.current&&(P.current=C,v(C))},[]),w=m.useCallback(C=>{C!==T.current&&(T.current=C,x(C))},[]),S=i||g,R=s||b,P=m.useRef(null),T=m.useRef(null),$=m.useRef(u),F=a!=null,k=Xn(a),D=Xn(o),W=Xn(c),z=m.useCallback(()=>{if(!P.current||!T.current)return;const C={placement:t,strategy:n,middleware:h};D.current&&(C.platform=D.current),ym(P.current,T.current,C).then(M=>{const V={...M,isPositioned:W.current!==!1};O.current&&!gn($.current,V)&&($.current=V,an.flushSync(()=>{f(V)}))})},[h,t,n,D,W]);rn(()=>{c===!1&&$.current.isPositioned&&($.current.isPositioned=!1,f(C=>({...C,isPositioned:!1})))},[c]);const O=m.useRef(!1);rn(()=>(O.current=!0,()=>{O.current=!1}),[]),rn(()=>{if(S&&(P.current=S),R&&(T.current=R),S&&R){if(k.current)return k.current(S,R,z);z()}},[S,R,z,k,F]);const A=m.useMemo(()=>({reference:P,floating:T,setReference:y,setFloating:w}),[y,w]),_=m.useMemo(()=>({reference:S,floating:R}),[S,R]),L=m.useMemo(()=>{const C={position:n,left:0,top:0};if(!_.floating)return C;const M=Zo(_.floating,u.x),V=Zo(_.floating,u.y);return l?{...C,transform:"translate("+M+"px, "+V+"px)",...tl(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:V}},[n,l,_.floating,u.x,u.y]);return m.useMemo(()=>({...u,update:z,refs:A,elements:_,floatingStyles:L}),[u,z,A,_,L])}const Zr=(e,t)=>({...gm(e),options:[e,t]}),rl=(e,t)=>({...bm(e),options:[e,t]}),Rm=(e,t)=>({...xm(e),options:[e,t]}),Sm=(e,t)=>({...wm(e),options:[e,t]}),km=(e,t)=>({...vm(e),options:[e,t]}),ol={...m},$m=ol.useInsertionEffect,Pm=$m||(e=>e());function il(e){const t=m.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Pm(()=>{t.current=e}),m.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}var Er=typeof document<"u"?p.useLayoutEffect:p.useEffect;let Jo=!1,Tm=0;const Qo=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Tm++;function Om(){const[e,t]=m.useState(()=>Jo?Qo():void 0);return Er(()=>{e==null&&t(Qo())},[]),m.useEffect(()=>{Jo=!0},[]),e}const Lm=ol.useId,Mm=Lm||Om;let At;process.env.NODE_ENV!=="production"&&(At=new Set);function Am(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=At)!=null&&e.has(o))){var i;(i=At)==null||i.add(o),console.warn(o)}}function Fm(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=At)!=null&&e.has(o))){var i;(i=At)==null||i.add(o),console.error(o)}}function Nm(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const Im=m.createContext(null),Dm=m.createContext(null),jm=()=>{var e;return((e=m.useContext(Im))==null?void 0:e.id)||null},_m=()=>m.useContext(Dm),Bm="data-floating-ui-focusable";function Hm(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Mm(),i=m.useRef({}),[s]=m.useState(()=>Nm()),l=jm()!=null;if(process.env.NODE_ENV!=="production"){const d=r.reference;d&&!K(d)&&Fm("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,c]=m.useState(r.reference),u=il((d,g,v)=>{i.current.openEvent=d?g:void 0,s.emit("openchange",{open:d,event:g,reason:v,nested:l}),n?.(d,g,v)}),f=m.useMemo(()=>({setPositionReference:c}),[]),h=m.useMemo(()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference}),[a,r.reference,r.floating]);return m.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:h,events:s,floatingId:o,refs:f}),[t,u,h,s,o,f])}function Vm(e){e===void 0&&(e={});const{nodeId:t}=e,n=Hm({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=m.useState(null),[l,a]=m.useState(null),u=o?.domReference||i,f=m.useRef(null),h=_m();Er(()=>{u&&(f.current=u)},[u]);const d=nl({...e,elements:{...o,...l&&{reference:l}}}),g=m.useCallback(w=>{const S=K(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;a(S),d.refs.setReference(S)},[d.refs]),v=m.useCallback(w=>{(K(w)||w===null)&&(f.current=w,s(w)),(K(d.refs.reference.current)||d.refs.reference.current===null||w!==null&&!K(w))&&d.refs.setReference(w)},[d.refs]),b=m.useMemo(()=>({...d.refs,setReference:v,setPositionReference:g,domReference:f}),[d.refs,v,g]),x=m.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),y=m.useMemo(()=>({...d,...r,refs:b,elements:x,nodeId:t}),[d,b,x,t,r]);return Er(()=>{r.dataRef.current.floatingContext=y;const w=h?.nodesRef.current.find(S=>S.id===t);w&&(w.context=y)}),m.useMemo(()=>({...d,context:y,refs:b,elements:x}),[d,b,x,y])}const ei="active",ti="selected";function Zn(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[ei]:s,[ti]:l,...a}=e;i=a}return{...n==="floating"&&{tabIndex:-1,[Bm]:""},...i,...t.map(s=>{const l=s?s[n]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((s,l)=>(l&&Object.entries(l).forEach(a=>{let[c,u]=a;if(!(o&&[ei,ti].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),s[c]=function(){for(var h,d=arguments.length,g=new Array(d),v=0;v<d;v++)g[v]=arguments[v];return(h=r.get(c))==null?void 0:h.map(b=>b(...g)).find(b=>b!==void 0)}}}else s[c]=u}),s),{})}}function Wm(e){e===void 0&&(e=[]);const t=e.map(l=>l?.reference),n=e.map(l=>l?.floating),r=e.map(l=>l?.item),o=m.useCallback(l=>Zn(l,e,"reference"),t),i=m.useCallback(l=>Zn(l,e,"floating"),n),s=m.useCallback(l=>Zn(l,e,"item"),r);return m.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}function ni(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const zm=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:o,offset:i=0,index:s=0,minItemsVisible:l=4,referenceOverflowThreshold:a=0,scrollRef:c,...u}=st(e,t),{rects:f,elements:{floating:h}}=t,d=n.current[s],g=c?.current||h,v=h.clientTop||g.clientTop,b=h.clientTop!==0,x=g.clientTop!==0,y=h===g;if(process.env.NODE_ENV!=="production"&&(t.placement.startsWith("bottom")||Am('`placement` side must be "bottom" when using the `inner`',"middleware.")),!d)return{};const w={...t,...await Zr(-d.offsetTop-h.clientTop-f.reference.height/2-d.offsetHeight/2-i).fn(t)},S=await Yn(ni(w,g.scrollHeight+v+h.clientTop),u),R=await Yn(w,{...u,elementContext:"reference"}),P=se(0,S.top),T=w.y+P,k=(g.scrollHeight>g.clientHeight?D=>D:Mt)(se(0,g.scrollHeight+(b&&y||x?v*2:0)-P-se(0,S.bottom)));if(g.style.maxHeight=k+"px",g.scrollTop=P,o){const D=g.offsetHeight<d.offsetHeight*nt(l,n.current.length)-1||R.top>=-a||R.bottom>=-a;an.flushSync(()=>o(D))}return r&&(r.current=await Yn(ni({...w,y:T},g.offsetHeight+v+h.clientTop),u)),{y:T}}});function Um(e,t){const{open:n,elements:r}=e,{enabled:o=!0,overflowRef:i,scrollRef:s,onChange:l}=t,a=il(l),c=m.useRef(!1),u=m.useRef(null),f=m.useRef(null);m.useEffect(()=>{if(!o)return;function d(v){if(v.ctrlKey||!g||i.current==null)return;const b=v.deltaY,x=i.current.top>=-.5,y=i.current.bottom>=-.5,w=g.scrollHeight-g.clientHeight,S=b<0?-1:1,R=b<0?"max":"min";g.scrollHeight<=g.clientHeight||(!x&&b>0||!y&&b<0?(v.preventDefault(),an.flushSync(()=>{a(P=>P+Math[R](b,w*S))})):/firefox/i.test(Mf())&&(g.scrollTop+=b))}const g=s?.current||r.floating;if(n&&g)return g.addEventListener("wheel",d),requestAnimationFrame(()=>{u.current=g.scrollTop,i.current!=null&&(f.current={...i.current})}),()=>{u.current=null,f.current=null,g.removeEventListener("wheel",d)}},[o,n,r.floating,i,s,a]);const h=m.useMemo(()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const d=s?.current||r.floating;if(!(!i.current||!d||!c.current)){if(u.current!==null){const g=d.scrollTop-u.current;(i.current.bottom<-.5&&g<-1||i.current.top<-.5&&g>1)&&an.flushSync(()=>a(v=>v+g))}requestAnimationFrame(()=>{u.current=d.scrollTop})}}}),[r.floating,a,i,s]);return m.useMemo(()=>o?{floating:h}:{},[o,h])}let yt=p.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});yt.displayName="FloatingContext";let Jr=p.createContext(null);Jr.displayName="PlacementContext";function qm(e){return p.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function Gm(){return p.useContext(yt).setReference}function Km(){return p.useContext(yt).getReferenceProps}function Ym(){let{getFloatingProps:e,slot:t}=p.useContext(yt);return p.useCallback((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function Xm(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=p.useContext(Jr),n=p.useMemo(()=>e,[JSON.stringify(e,(o,i)=>{var s;return(s=i?.outerHTML)!=null?s:i})]);te(()=>{t?.(n??null)},[t,n]);let r=p.useContext(yt);return p.useMemo(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}let ri=4;function Zm({children:e,enabled:t=!0}){let[n,r]=p.useState(null),[o,i]=p.useState(0),s=p.useRef(null),[l,a]=p.useState(null);Jm(l);let c=t&&n!==null&&l!==null,{to:u="bottom",gap:f=0,offset:h=0,padding:d=0,inner:g}=Qm(n,l),[v,b="center"]=u.split(" ");te(()=>{c&&i(0)},[c]);let{refs:x,floatingStyles:y,context:w}=Vm({open:c,placement:v==="selection"?b==="center"?"bottom":`bottom-${b}`:b==="center"?`${v}`:`${v}-${b}`,strategy:"absolute",transform:!1,middleware:[Zr({mainAxis:v==="selection"?0:f,crossAxis:h}),rl({padding:d}),v!=="selection"&&Rm({padding:d}),v==="selection"&&g?zm({...g,padding:d,overflowRef:s,offset:o,minItemsVisible:ri,referenceOverflowThreshold:d,onFallbackChange(D){var W,z;if(!D)return;let O=w.elements.floating;if(!O)return;let A=parseFloat(getComputedStyle(O).scrollPaddingBottom)||0,_=Math.min(ri,O.childElementCount),L=0,C=0;for(let M of(z=(W=w.elements.floating)==null?void 0:W.childNodes)!=null?z:[])if(Ve(M)){let V=M.offsetTop,X=V+M.clientHeight+A,B=O.scrollTop,j=B+O.clientHeight;if(V>=B&&X<=j)_--;else{C=Math.max(0,Math.min(X,j)-Math.max(V,B)),L=M.clientHeight;break}}_>=1&&i(M=>{let V=L*_-C+A;return M>=V?M:V})}}):null,Sm({padding:d,apply({availableWidth:D,availableHeight:W,elements:z}){Object.assign(z.floating.style,{overflow:"auto",maxWidth:`${D}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${W}px)`})}})].filter(Boolean),whileElementsMounted:hm}),[S=v,R=b]=w.placement.split("-");v==="selection"&&(S="selection");let P=p.useMemo(()=>({anchor:[S,R].filter(Boolean).join(" ")}),[S,R]),T=Um(w,{overflowRef:s,onChange:i}),{getReferenceProps:$,getFloatingProps:F}=Wm([T]),k=q(D=>{a(D),x.setFloating(D)});return m.createElement(Jr.Provider,{value:r},m.createElement(yt.Provider,{value:{setFloating:k,setReference:x.setReference,styles:y,getReferenceProps:$,getFloatingProps:F,slot:P}},e))}function Jm(e){te(()=>{if(!e)return;let t=new MutationObserver(()=>{let n=window.getComputedStyle(e).maxHeight,r=parseFloat(n);if(isNaN(r))return;let o=parseInt(n);isNaN(o)||r!==o&&(e.style.maxHeight=`${Math.ceil(r)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function Qm(e,t){var n,r,o;let i=Jn((n=e?.gap)!=null?n:"var(--anchor-gap, 0)",t),s=Jn((r=e?.offset)!=null?r:"var(--anchor-offset, 0)",t),l=Jn((o=e?.padding)!=null?o:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:s,padding:l}}function Jn(e,t,n=void 0){let r=ot(),o=q((a,c)=>{if(a==null)return[n,null];if(typeof a=="number")return[a,null];if(typeof a=="string"){if(!c)return[n,null];let u=oi(a,c);return[u,f=>{let h=sl(a);{let d=h.map(g=>window.getComputedStyle(c).getPropertyValue(g));r.requestAnimationFrame(function g(){r.nextFrame(g);let v=!1;for(let[x,y]of h.entries()){let w=window.getComputedStyle(c).getPropertyValue(y);if(d[x]!==w){d[x]=w,v=!0;break}}if(!v)return;let b=oi(a,c);u!==b&&(f(b),u=b)})}return r.dispose}]}return[n,null]}),i=p.useMemo(()=>o(e,t)[0],[e,t]),[s=i,l]=p.useState();return te(()=>{let[a,c]=o(e,t);if(l(a),!!c)return c(l)},[e,t]),s}function sl(e){let t=/var\((.*)\)/.exec(e);if(t){let n=t[1].indexOf(",");if(n===-1)return[t[1]];let r=t[1].slice(0,n).trim(),o=t[1].slice(n+1).trim();return o?[r,...sl(o)]:[r]}return[]}function oi(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}function ep({children:e,freeze:t},n){let r=ll(t,e);return p.isValidElement(r)?p.cloneElement(r,{ref:n}):p.createElement(p.Fragment,null,r)}p.forwardRef(ep);function ll(e,t){let[n,r]=p.useState(t);return!e&&n!==t&&r(t),e?n:t}let Pn=p.createContext(null);Pn.displayName="OpenClosedContext";var ae=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ae||{});function Tn(){return p.useContext(Pn)}function Qr({value:e,children:t}){return p.createElement(Pn.Provider,{value:e},t)}function tp({children:e}){return p.createElement(Pn.Provider,{value:null},e)}function np(e){throw new Error("Unexpected object: "+e)}var Q=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Q||{});function Qt(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let i=0;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 1:{o===-1&&(o=n.length);for(let i=o-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 2:{for(let i=o+1;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 3:{for(let i=n.length-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 4:{for(let i=0;i<n.length;++i)if(t.resolveId(n[i],i,n)===e.id)return i;return r}case 5:return null;default:np(e)}}function al(e){let t=q(e),n=p.useRef(!1);p.useEffect(()=>(n.current=!1,()=>{n.current=!0,gs(()=>{n.current&&t()})}),[t])}let rp=p.createContext(!1);function op(){return p.useContext(rp)}function ip(e){let t=op(),n=p.useContext(ul),[r,o]=p.useState(()=>{var i;if(!t&&n!==null)return(i=n.current)!=null?i:null;if($e.isServer)return null;let s=e?.getElementById("headlessui-portal-root");if(s)return s;if(e===null)return null;let l=e.createElement("div");return l.setAttribute("id","headlessui-portal-root"),e.body.appendChild(l)});return p.useEffect(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),p.useEffect(()=>{t||n!==null&&o(n.current)},[n,o,t]),r}let cl=p.Fragment,sp=oe(function(e,t){let{ownerDocument:n=null,...r}=e,o=p.useRef(null),i=ue($s(h=>{o.current=h}),t),s=xr(o.current),l=n??s,a=ip(l),c=p.useContext(up),u=ot(),f=ie();return al(()=>{var h;a&&a.childNodes.length<=0&&((h=a.parentElement)==null||h.removeChild(a))}),a?Ye.createPortal(p.createElement("div",{"data-headlessui-portal":"",ref:h=>{u.dispose(),c&&h&&u.add(c.register(h))}},f({ourProps:{ref:i},theirProps:r,slot:{},defaultTag:cl,name:"Portal"})),a):null});function lp(e,t){let n=ue(t),{enabled:r=!0,ownerDocument:o,...i}=e,s=ie();return r?p.createElement(sp,{...i,ownerDocument:o,ref:n}):s({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:cl,name:"Portal"})}let ap=p.Fragment,ul=p.createContext(null);function cp(e,t){let{target:n,...r}=e,o={ref:ue(t)},i=ie();return p.createElement(ul.Provider,{value:n},i({ourProps:o,theirProps:r,defaultTag:ap,name:"Popover.Group"}))}let up=p.createContext(null),dp=oe(lp),fp=oe(cp),mp=Object.assign(dp,{Group:fp});const on={Idle:{kind:"Idle"},Tracked:e=>({kind:"Tracked",position:e}),Moved:{kind:"Moved"}};function dl(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function pp(e,t,n){let r=ve();if(t.kind==="Tracked"){let o=function(){i!==dl(e)&&(r.dispose(),n())},{position:i}=t,s=new ResizeObserver(o);s.observe(e),r.add(()=>s.disconnect()),r.addEventListener(window,"scroll",o,{passive:!0}),r.addEventListener(window,"resize",o)}return()=>r.dispose()}function hp(){let e=typeof document>"u";return"useSyncExternalStore"in m?(t=>t.useSyncExternalStore)(m)(()=>()=>{},()=>!1,()=>!e):!1}function fl(){let e=hp(),[t,n]=m.useState($e.isHandoffComplete);return t&&$e.isHandoffComplete===!1&&n(!1),m.useEffect(()=>{t!==!0&&n(!0)},[t]),m.useEffect(()=>$e.handoff(),[]),e?!1:t}function gp(){let e=p.useRef(!1);return te(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function ml(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!ft((t=e.as)!=null?t:hl)||p.Children.count(e.children)===1}let On=p.createContext(null);On.displayName="TransitionContext";var vp=(e=>(e.Visible="visible",e.Hidden="hidden",e))(vp||{});function bp(){let e=p.useContext(On);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function xp(){let e=p.useContext(Ln);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Ln=p.createContext(null);Ln.displayName="NestingContext";function Mn(e){return"children"in e?Mn(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function pl(e,t){let n=it(e),r=p.useRef([]),o=gp(),i=ot(),s=q((d,g=Ue.Hidden)=>{let v=r.current.findIndex(({el:b})=>b===d);v!==-1&&(ce(g,{[Ue.Unmount](){r.current.splice(v,1)},[Ue.Hidden](){r.current[v].state="hidden"}}),i.microTask(()=>{var b;!Mn(r)&&o.current&&((b=n.current)==null||b.call(n))}))}),l=q(d=>{let g=r.current.find(({el:v})=>v===d);return g?g.state!=="visible"&&(g.state="visible"):r.current.push({el:d,state:"visible"}),()=>s(d,Ue.Unmount)}),a=p.useRef([]),c=p.useRef(Promise.resolve()),u=p.useRef({enter:[],leave:[]}),f=q((d,g,v)=>{a.current.splice(0),t&&(t.chains.current[g]=t.chains.current[g].filter(([b])=>b!==d)),t?.chains.current[g].push([d,new Promise(b=>{a.current.push(b)})]),t?.chains.current[g].push([d,new Promise(b=>{Promise.all(u.current[g].map(([x,y])=>y)).then(()=>b())})]),g==="enter"?c.current=c.current.then(()=>t?.wait.current).then(()=>v(g)):v(g)}),h=q((d,g,v)=>{Promise.all(u.current[g].splice(0).map(([b,x])=>x)).then(()=>{var b;(b=a.current.shift())==null||b()}).then(()=>v(g))});return p.useMemo(()=>({children:r,register:l,unregister:s,onStart:f,onStop:h,wait:c,chains:u}),[l,s,r,f,h,u,c])}let hl=p.Fragment,gl=pt.RenderStrategy;function wp(e,t){var n,r;let{transition:o=!0,beforeEnter:i,afterEnter:s,beforeLeave:l,afterLeave:a,enter:c,enterFrom:u,enterTo:f,entered:h,leave:d,leaveFrom:g,leaveTo:v,...b}=e,[x,y]=p.useState(null),w=p.useRef(null),S=ml(e),R=ue(...S?[w,t,y]:t===null?[]:[t]),P=(n=b.unmount)==null||n?Ue.Unmount:Ue.Hidden,{show:T,appear:$,initial:F}=bp(),[k,D]=p.useState(T?"visible":"hidden"),W=xp(),{register:z,unregister:O}=W;te(()=>z(w),[z,w]),te(()=>{if(P===Ue.Hidden&&w.current){if(T&&k!=="visible"){D("visible");return}return ce(k,{hidden:()=>O(w),visible:()=>z(w)})}},[k,w,z,O,T,P]);let A=fl();te(()=>{if(S&&A&&k==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,k,A,S]);let _=F&&!$,L=$&&T&&F,C=p.useRef(!1),M=pl(()=>{C.current||(D("hidden"),O(w))},W),V=q(G=>{C.current=!0;let pe=G?"enter":"leave";M.onStart(w,pe,de=>{de==="enter"?i?.():de==="leave"&&l?.()})}),X=q(G=>{let pe=G?"enter":"leave";C.current=!1,M.onStop(w,pe,de=>{de==="enter"?s?.():de==="leave"&&a?.()}),pe==="leave"&&!Mn(M)&&(D("hidden"),O(w))});p.useEffect(()=>{S&&o||(V(T),X(T))},[T,S,o]);let B=!(!o||!S||!A||_),[,j]=Gr(B,x,T,{start:V,end:X}),ee=ze({ref:R,className:((r=pr(b.className,L&&c,L&&u,j.enter&&c,j.enter&&j.closed&&u,j.enter&&!j.closed&&f,j.leave&&d,j.leave&&!j.closed&&g,j.leave&&j.closed&&v,!j.transition&&T&&h))==null?void 0:r.trim())||void 0,...qr(j)}),Y=0;k==="visible"&&(Y|=ae.Open),k==="hidden"&&(Y|=ae.Closed),T&&k==="hidden"&&(Y|=ae.Opening),!T&&k==="visible"&&(Y|=ae.Closing);let H=ie();return p.createElement(Ln.Provider,{value:M},p.createElement(Qr,{value:Y},H({ourProps:ee,theirProps:b,defaultTag:hl,features:gl,visible:k==="visible",name:"Transition.Child"})))}function yp(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,s=p.useRef(null),l=ml(e),a=ue(...l?[s,t]:t===null?[]:[t]);fl();let c=Tn();if(n===void 0&&c!==null&&(n=(c&ae.Open)===ae.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,f]=p.useState(n?"visible":"hidden"),h=pl(()=>{n||f("hidden")}),[d,g]=p.useState(!0),v=p.useRef([n]);te(()=>{d!==!1&&v.current[v.current.length-1]!==n&&(v.current.push(n),g(!1))},[v,n]);let b=p.useMemo(()=>({show:n,appear:r,initial:d}),[n,r,d]);te(()=>{n?f("visible"):!Mn(h)&&s.current!==null&&f("hidden")},[n,h]);let x={unmount:o},y=q(()=>{var R;d&&g(!1),(R=e.beforeEnter)==null||R.call(e)}),w=q(()=>{var R;d&&g(!1),(R=e.beforeLeave)==null||R.call(e)}),S=ie();return p.createElement(Ln.Provider,{value:h},p.createElement(On.Provider,{value:b},S({ourProps:{...x,as:p.Fragment,children:p.createElement(vl,{ref:a,...x,...i,beforeEnter:y,beforeLeave:w})},theirProps:{},defaultTag:p.Fragment,features:gl,visible:u==="visible",name:"Transition"})))}function Ep(e,t){let n=p.useContext(On)!==null,r=Tn()!==null;return p.createElement(p.Fragment,null,!n&&r?p.createElement(Cr,{ref:t,...e}):p.createElement(vl,{ref:t,...e}))}let Cr=oe(yp),vl=oe(wp),Cp=oe(Ep),Rp=Object.assign(Cr,{Child:Cp,Root:Cr});var ii;let Sp=(ii=p.startTransition)!=null?ii:function(e){e()};var kp=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(kp||{}),$p=(e=>(e[e.ToggleDisclosure=0]="ToggleDisclosure",e[e.CloseDisclosure=1]="CloseDisclosure",e[e.SetButtonId=2]="SetButtonId",e[e.SetPanelId=3]="SetPanelId",e[e.SetButtonElement=4]="SetButtonElement",e[e.SetPanelElement=5]="SetPanelElement",e))($p||{});let Pp={0:e=>({...e,disclosureState:ce(e.disclosureState,{0:1,1:0})}),1:e=>e.disclosureState===1?e:{...e,disclosureState:1},2(e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},3(e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}},4(e,t){return e.buttonElement===t.element?e:{...e,buttonElement:t.element}},5(e,t){return e.panelElement===t.element?e:{...e,panelElement:t.element}}},eo=p.createContext(null);eo.displayName="DisclosureContext";function to(e){let t=p.useContext(eo);if(t===null){let n=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,to),n}return t}let no=p.createContext(null);no.displayName="DisclosureAPIContext";function bl(e){let t=p.useContext(no);if(t===null){let n=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,bl),n}return t}let ro=p.createContext(null);ro.displayName="DisclosurePanelContext";function Tp(){return p.useContext(ro)}function Op(e,t){return ce(t.type,Pp,e,t)}let Lp=p.Fragment;function Mp(e,t){let{defaultOpen:n=!1,...r}=e,o=p.useRef(null),i=ue(t,$s(v=>{o.current=v},e.as===void 0||ft(e.as))),s=p.useReducer(Op,{disclosureState:n?0:1,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:l,buttonId:a},c]=s,u=q(v=>{c({type:1});let b=_t(o.current);if(!b||!a)return;let x=v?qe(v)?v:"current"in v&&qe(v.current)?v.current:b.getElementById(a):b.getElementById(a);x?.focus()}),f=p.useMemo(()=>({close:u}),[u]),h=ye({open:l===0,close:u}),d={ref:i},g=ie();return p.createElement(eo.Provider,{value:s},p.createElement(no.Provider,{value:f},p.createElement(Pd,{value:u},p.createElement(Qr,{value:ce(l,{0:ae.Open,1:ae.Closed})},g({ourProps:d,theirProps:r,slot:h,defaultTag:Lp,name:"Disclosure"})))))}let Ap="button";function Fp(e,t){let n=p.useId(),{id:r=`headlessui-disclosure-button-${n}`,disabled:o=!1,autoFocus:i=!1,...s}=e,[l,a]=to("Disclosure.Button"),c=Tp(),u=c===null?!1:c===l.panelId,f=p.useRef(null),h=ue(f,t,q(F=>{if(!u)return a({type:4,element:F})}));p.useEffect(()=>{if(!u)return a({type:2,buttonId:r}),()=>{a({type:2,buttonId:null})}},[r,a,u]);let d=q(F=>{var k;if(u){if(l.disclosureState===1)return;switch(F.key){case J.Space:case J.Enter:F.preventDefault(),F.stopPropagation(),a({type:0}),(k=l.buttonElement)==null||k.focus();break}}else switch(F.key){case J.Space:case J.Enter:F.preventDefault(),F.stopPropagation(),a({type:0});break}}),g=q(F=>{F.key===J.Space&&F.preventDefault()}),v=q(F=>{var k;hr(F.currentTarget)||o||(u?(a({type:0}),(k=l.buttonElement)==null||k.focus()):a({type:0}))}),{isFocusVisible:b,focusProps:x}=Br({autoFocus:i}),{isHovered:y,hoverProps:w}=_r({isDisabled:o}),{pressed:S,pressProps:R}=Hr({disabled:o}),P=ye({open:l.disclosureState===0,hover:y,active:S,disabled:o,focus:b,autofocus:i}),T=Ws(e,l.buttonElement),$=Lt(u?{ref:h,type:T,disabled:o||void 0,autoFocus:i,onKeyDown:d,onClick:v}:{ref:h,id:r,type:T,"aria-expanded":l.disclosureState===0,"aria-controls":l.panelElement?l.panelId:void 0,disabled:o||void 0,autoFocus:i,onKeyDown:d,onKeyUp:g,onClick:v},x,w,R);return ie()({ourProps:$,theirProps:s,slot:P,defaultTag:Ap,name:"Disclosure.Button"})}let Np="div",Ip=pt.RenderStrategy|pt.Static;function Dp(e,t){let n=p.useId(),{id:r=`headlessui-disclosure-panel-${n}`,transition:o=!1,...i}=e,[s,l]=to("Disclosure.Panel"),{close:a}=bl("Disclosure.Panel"),[c,u]=p.useState(null),f=ue(t,q(y=>{Sp(()=>l({type:5,element:y}))}),u);p.useEffect(()=>(l({type:3,panelId:r}),()=>{l({type:3,panelId:null})}),[r,l]);let h=Tn(),[d,g]=Gr(o,c,h!==null?(h&ae.Open)===ae.Open:s.disclosureState===0),v=ye({open:s.disclosureState===0,close:a}),b={ref:f,id:r,...qr(g)},x=ie();return p.createElement(tp,null,p.createElement(ro.Provider,{value:s.panelId},x({ourProps:b,theirProps:i,slot:v,defaultTag:Np,features:Ip,visible:d,name:"Disclosure.Panel"})))}let jp=oe(Mp),xl=oe(Fp),wl=oe(Dp),_p=Object.assign(jp,{Button:xl,Panel:wl}),si=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function li(e){var t,n;let r=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!Ve(o))return r;let i=!1;for(let l of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))l.remove(),i=!0;let s=i?(n=o.innerText)!=null?n:"":r;return si.test(s)&&(s=s.replace(si,"")),s}function Bp(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(o=>{let i=document.getElementById(o);if(i){let s=i.getAttribute("aria-label");return typeof s=="string"?s.trim():li(i).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return li(e).trim()}function Hp(e){let t=p.useRef(""),n=p.useRef("");return q(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(t.current===o)return n.current;let i=Bp(r).trim().toLowerCase();return t.current=o,n.current=i,i})}var Vp=Object.defineProperty,Wp=(e,t,n)=>t in e?Vp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ai=(e,t,n)=>(Wp(e,typeof t!="symbol"?t+"":t,n),n),le=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(le||{}),Ge=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Ge||{}),sn=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(sn||{}),yl=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.SelectOption=5]="SelectOption",e[e.RegisterOptions=6]="RegisterOptions",e[e.UnregisterOptions=7]="UnregisterOptions",e[e.SetButtonElement=8]="SetButtonElement",e[e.SetOptionsElement=9]="SetOptionsElement",e[e.SortOptions=10]="SortOptions",e[e.MarkButtonAsMoved=11]="MarkButtonAsMoved",e))(yl||{});function ci(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=Hs(t(e.options.slice()),i=>i.dataRef.current.domRef.current),o=n?r.indexOf(n):null;return o===-1&&(o=null),{options:r,activeOptionIndex:o}}let zp={1(e){if(e.dataRef.current.disabled||e.listboxState===1)return e;let t=e.buttonElement?on.Tracked(dl(e.buttonElement)):e.buttonPositionState;return{...e,activeOptionIndex:null,pendingFocus:{focus:Q.Nothing},listboxState:1,__demoMode:!1,buttonPositionState:t}},0(e,t){if(e.dataRef.current.disabled||e.listboxState===0)return e;let n=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,o=e.options.findIndex(i=>r(i.dataRef.current.value));return o!==-1&&(n=o),{...e,frozenValue:!1,pendingFocus:t.focus,listboxState:0,activeOptionIndex:n,__demoMode:!1,buttonPositionState:on.Idle}},2(e,t){var n,r,o,i,s;if(e.dataRef.current.disabled||e.listboxState===1)return e;let l={...e,searchQuery:"",activationTrigger:(n=t.trigger)!=null?n:1,__demoMode:!1};if(t.focus===Q.Nothing)return{...l,activeOptionIndex:null};if(t.focus===Q.Specific)return{...l,activeOptionIndex:e.options.findIndex(u=>u.id===t.id)};if(t.focus===Q.Previous){let u=e.activeOptionIndex;if(u!==null){let f=e.options[u].dataRef.current.domRef,h=Qt(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});if(h!==null){let d=e.options[h].dataRef.current.domRef;if(((r=f.current)==null?void 0:r.previousElementSibling)===d.current||((o=d.current)==null?void 0:o.previousElementSibling)===null)return{...l,activeOptionIndex:h}}}}else if(t.focus===Q.Next){let u=e.activeOptionIndex;if(u!==null){let f=e.options[u].dataRef.current.domRef,h=Qt(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});if(h!==null){let d=e.options[h].dataRef.current.domRef;if(((i=f.current)==null?void 0:i.nextElementSibling)===d.current||((s=d.current)==null?void 0:s.nextElementSibling)===null)return{...l,activeOptionIndex:h}}}}let a=ci(e),c=Qt(t,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled});return{...l,...a,activeOptionIndex:c}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),o=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(s=>{var l;return!s.dataRef.current.disabled&&((l=s.dataRef.current.textValue)==null?void 0:l.startsWith(r))}),i=o?e.options.indexOf(o):-1;return i===-1||i===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:i,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5(e){return e.dataRef.current.mode===0?{...e,frozenValue:!0}:{...e}},6:(e,t)=>{let n=e.options.concat(t.options),r=e.activeOptionIndex;if(e.pendingFocus.focus!==Q.Nothing&&(r=Qt(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:o=>o.id,resolveDisabled:o=>o.dataRef.current.disabled})),e.activeOptionIndex===null){let{isSelected:o}=e.dataRef.current;if(o){let i=n.findIndex(s=>o?.(s.dataRef.current.value));i!==-1&&(r=i)}}return{...e,options:n,activeOptionIndex:r,pendingFocus:{focus:Q.Nothing},pendingShouldSort:!0}},7:(e,t)=>{let n=e.options,r=[],o=new Set(t.options);for(let[i,s]of n.entries())if(o.has(s.id)&&(r.push(i),o.delete(s.id),o.size===0))break;if(r.length>0){n=n.slice();for(let i of r.reverse())n.splice(i,1)}return{...e,options:n,activationTrigger:1}},8:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},9:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element},10:e=>e.pendingShouldSort?{...e,...ci(e),pendingShouldSort:!1}:e,11(e){return e.buttonPositionState.kind!=="Tracked"?e:{...e,buttonPositionState:on.Moved}}};class oo extends Fs{constructor(t){super(t),ai(this,"actions",{onChange:n=>{let{onChange:r,compare:o,mode:i,value:s}=this.state.dataRef.current;return ce(i,{0:()=>r?.(n),1:()=>{let l=s.slice(),a=l.findIndex(c=>o(c,n));return a===-1?l.push(n):l.splice(a,1),r?.(l)}})},registerOption:Un(()=>{let n=[],r=new Set;return[(o,i)=>{r.has(i)||(r.add(i),n.push({id:o,dataRef:i}))},()=>(r.clear(),this.send({type:6,options:n.splice(0)}))]}),unregisterOption:Un(()=>{let n=[];return[r=>n.push(r),()=>{this.send({type:7,options:n.splice(0)})}]}),goToOption:Un(()=>{let n=null;return[(r,o)=>{n={type:2,...r,trigger:o}},()=>n&&this.send(n)]}),closeListbox:()=>{this.send({type:1})},openListbox:n=>{this.send({type:0,focus:n})},selectActiveOption:()=>{var n;if(this.state.activeOptionIndex!==null){let{dataRef:r}=this.state.options[this.state.activeOptionIndex];this.actions.selectOption(r.current.value)}else this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(n=this.state.buttonElement)==null||n.focus({preventScroll:!0}))},selectOption:n=>{this.send({type:5,value:n})},search:n=>{this.send({type:3,value:n})},clearSearch:()=>{this.send({type:4})},setButtonElement:n=>{this.send({type:8,element:n})},setOptionsElement:n=>{this.send({type:9,element:n})}}),ai(this,"selectors",{activeDescendantId(n){var r;let o=n.activeOptionIndex,i=n.options;return o===null||(r=i[o])==null?void 0:r.id},isActive(n,r){var o;let i=n.activeOptionIndex,s=n.options;return i!==null?((o=s[i])==null?void 0:o.id)===r:!1},hasFrozenValue(n){return n.frozenValue},shouldScrollIntoView(n,r){return n.__demoMode||n.listboxState!==0||n.activationTrigger===0?!1:this.isActive(n,r)},didButtonMove(n){return n.buttonPositionState.kind==="Moved"}}),this.on(6,()=>{requestAnimationFrame(()=>{this.send({type:10})})});{let n=this.state.id,r=zr.get(null);this.disposables.add(r.on(Is.Push,o=>{!r.selectors.isTop(o,n)&&this.state.listboxState===0&&this.actions.closeListbox()})),this.on(0,()=>r.actions.push(n)),this.on(1,()=>r.actions.pop(n))}this.disposables.group(n=>{this.on(1,r=>{r.buttonElement&&(n.dispose(),n.add(pp(r.buttonElement,r.buttonPositionState,()=>{this.send({type:11})})))})}),this.on(5,(n,r)=>{var o;this.actions.onChange(r.value),this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(o=this.state.buttonElement)==null||o.focus({preventScroll:!0}))})}static new({id:t,__demoMode:n=!1}){return new oo({id:t,dataRef:{current:{}},listboxState:n?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:Q.Nothing},frozenValue:!1,__demoMode:n,buttonPositionState:on.Idle})}reduce(t,n){return ce(n.type,zp,t,n)}}const El=p.createContext(null);function io(e){let t=p.useContext(El);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Cl),n}return t}function Cl({id:e,__demoMode:t=!1}){let n=p.useMemo(()=>oo.new({id:e,__demoMode:t}),[]);return al(()=>n.dispose()),n}let An=p.createContext(null);An.displayName="ListboxDataContext";function Vt(e){let t=p.useContext(An);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Vt),n}return t}let Up=p.Fragment;function qp(e,t){let n=p.useId(),r=wn(),{value:o,defaultValue:i,form:s,name:l,onChange:a,by:c,invalid:u=!1,disabled:f=r||!1,horizontal:h=!1,multiple:d=!1,__demoMode:g=!1,...v}=e;const b=h?"horizontal":"vertical";let x=ue(t),y=rd(i),[w=d?[]:void 0,S]=nd(o,a,y),R=Cl({id:n,__demoMode:g}),P=p.useRef({static:!1,hold:!1}),T=p.useRef(new Map),$=Od(c),F=p.useCallback(B=>ce(k.mode,{[Ge.Multi]:()=>w.some(j=>$(j,B)),[Ge.Single]:()=>$(w,B)}),[w]),k=ye({value:w,disabled:f,invalid:u,mode:d?Ge.Multi:Ge.Single,orientation:b,onChange:S,compare:$,isSelected:F,optionsPropsRef:P,listRef:T});te(()=>{R.state.dataRef.current=k},[k]);let D=fe(R,B=>B.listboxState),W=zr.get(null),z=fe(W,p.useCallback(B=>W.selectors.isTop(B,n),[W,n])),[O,A]=fe(R,B=>[B.buttonElement,B.optionsElement]);of(z,[O,A],(B,j)=>{R.send({type:yl.CloseListbox}),Bs(j,Ur.Loose)||(B.preventDefault(),O?.focus())});let _=ye({open:D===le.Open,disabled:f,invalid:u,value:w}),[L,C]=Ed({inherit:!0}),M={ref:x},V=p.useCallback(()=>{if(y!==void 0)return S?.(y)},[S,y]),X=ie();return p.createElement(C,{value:L,props:{htmlFor:O?.id},slot:{open:D===le.Open,disabled:f}},p.createElement(Zm,null,p.createElement(El.Provider,{value:R},p.createElement(An.Provider,{value:k},p.createElement(Qr,{value:ce(D,{[le.Open]:ae.Open,[le.Closed]:ae.Closed})},l!=null&&w!=null&&p.createElement(ud,{disabled:f,data:{[l]:w},form:s,onReset:V}),X({ourProps:M,theirProps:v,slot:_,defaultTag:Up,name:"Listbox"}))))))}let Gp="button";function Kp(e,t){let n=p.useId(),r=Es(),o=Vt("Listbox.Button"),i=io("Listbox.Button"),{id:s=r||`headlessui-listbox-button-${n}`,disabled:l=o.disabled||!1,autoFocus:a=!1,...c}=e,u=ue(t,Gm(),i.actions.setButtonElement),f=Km(),[h,d,g]=fe(i,A=>[A.listboxState,A.buttonElement,A.optionsElement]),v=h===le.Open;af(v,{trigger:d,action:p.useCallback(A=>{if(d!=null&&d.contains(A.target))return Zt.Ignore;let _=A.target.closest('[role="option"]:not([data-disabled])');return Ve(_)?Zt.Select(_):g!=null&&g.contains(A.target)?Zt.Ignore:Zt.Close},[d,g]),close:i.actions.closeListbox,select:i.actions.selectActiveOption});let b=q(A=>{switch(A.key){case J.Enter:od(A.currentTarget);break;case J.Space:case J.ArrowDown:A.preventDefault(),i.actions.openListbox({focus:o.value?Q.Nothing:Q.First});break;case J.ArrowUp:A.preventDefault(),i.actions.openListbox({focus:o.value?Q.Nothing:Q.Last});break}}),x=q(A=>{A.key===J.Space&&A.preventDefault()}),y=Md(A=>{var _;i.state.listboxState===le.Open?(Ye.flushSync(()=>i.actions.closeListbox()),(_=i.state.buttonElement)==null||_.focus({preventScroll:!0})):(A.preventDefault(),i.actions.openListbox({focus:Q.Nothing}))}),w=q(A=>A.preventDefault()),S=Os([s]),R=bd(),{isFocusVisible:P,focusProps:T}=Br({autoFocus:a}),{isHovered:$,hoverProps:F}=_r({isDisabled:l}),{pressed:k,pressProps:D}=Hr({disabled:l}),W=ye({open:h===le.Open,active:k||h===le.Open,disabled:l,invalid:o.invalid,value:o.value,hover:$,focus:P,autofocus:a}),z=fe(i,A=>A.listboxState===le.Open),O=Lt(f(),{ref:u,id:s,type:Ws(e,d),"aria-haspopup":"listbox","aria-controls":g?.id,"aria-expanded":z,"aria-labelledby":S,"aria-describedby":R,disabled:l||void 0,autoFocus:a,onKeyDown:b,onKeyUp:x,onKeyPress:w},y,T,F,D);return ie()({ourProps:O,theirProps:c,slot:W,defaultTag:Gp,name:"Listbox.Button"})}let Rl=p.createContext(!1),Yp="div",Xp=pt.RenderStrategy|pt.Static;function Zp(e,t){let n=p.useId(),{id:r=`headlessui-listbox-options-${n}`,anchor:o,portal:i=!1,modal:s=!0,transition:l=!1,...a}=e,c=qm(o),[u,f]=p.useState(null);c&&(i=!0);let h=Vt("Listbox.Options"),d=io("Listbox.Options"),[g,v,b,x]=fe(d,H=>[H.listboxState,H.buttonElement,H.optionsElement,H.__demoMode]),y=xr(v),w=xr(b),S=Tn(),[R,P]=Gr(l,u,S!==null?(S&ae.Open)===ae.Open:g===le.Open);qd(R,v,d.actions.closeListbox);let T=x?!1:s&&g===le.Open;hf(T,w);let $=x?!1:s&&g===le.Open;Ud($,{allowed:p.useCallback(()=>[v,b],[v,b])});let F=fe(d,d.selectors.didButtonMove)?!1:R,k=fe(d,d.selectors.hasFrozenValue)&&!e.static,D=ll(k,h.value),W=p.useCallback(H=>h.compare(D,H),[h.compare,D]),z=fe(d,H=>{var G;if(c==null||!((G=c?.to)!=null&&G.includes("selection")))return null;let pe=H.options.findIndex(de=>W(de.dataRef.current.value));return pe===-1&&(pe=0),pe}),O=(()=>{if(c==null)return;if(z===null)return{...c,inner:void 0};let H=Array.from(h.listRef.current.values());return{...c,inner:{listRef:{current:H},index:z}}})(),[A,_]=Xm(O),L=Ym(),C=ue(t,c?A:null,d.actions.setOptionsElement,f),M=ot();p.useEffect(()=>{let H=b;H&&g===le.Open&&(zu(H)||H==null||H.focus({preventScroll:!0}))},[g,b]);let V=q(H=>{var G;switch(M.dispose(),H.key){case J.Space:if(d.state.searchQuery!=="")return H.preventDefault(),H.stopPropagation(),d.actions.search(H.key);case J.Enter:H.preventDefault(),H.stopPropagation(),d.actions.selectActiveOption();break;case ce(h.orientation,{vertical:J.ArrowDown,horizontal:J.ArrowRight}):return H.preventDefault(),H.stopPropagation(),d.actions.goToOption({focus:Q.Next});case ce(h.orientation,{vertical:J.ArrowUp,horizontal:J.ArrowLeft}):return H.preventDefault(),H.stopPropagation(),d.actions.goToOption({focus:Q.Previous});case J.Home:case J.PageUp:return H.preventDefault(),H.stopPropagation(),d.actions.goToOption({focus:Q.First});case J.End:case J.PageDown:return H.preventDefault(),H.stopPropagation(),d.actions.goToOption({focus:Q.Last});case J.Escape:H.preventDefault(),H.stopPropagation(),Ye.flushSync(()=>d.actions.closeListbox()),(G=d.state.buttonElement)==null||G.focus({preventScroll:!0});return;case J.Tab:H.preventDefault(),H.stopPropagation(),Ye.flushSync(()=>d.actions.closeListbox()),ef(d.state.buttonElement,H.shiftKey?br.Previous:br.Next);break;default:H.key.length===1&&(d.actions.search(H.key),M.setTimeout(()=>d.actions.clearSearch(),350));break}}),X=fe(d,H=>{var G;return(G=H.buttonElement)==null?void 0:G.id}),B=ye({open:g===le.Open}),j=Lt(c?L():{},{id:r,ref:C,"aria-activedescendant":fe(d,d.selectors.activeDescendantId),"aria-multiselectable":h.mode===Ge.Multi?!0:void 0,"aria-labelledby":X,"aria-orientation":h.orientation,onKeyDown:V,role:"listbox",tabIndex:g===le.Open?0:void 0,style:{...a.style,..._,"--button-width":Ld(R,v,!0).width},...qr(P)}),ee=ie(),Y=p.useMemo(()=>h.mode===Ge.Multi?h:{...h,isSelected:W},[h,W]);return p.createElement(mp,{enabled:i?e.static||R:!1,ownerDocument:y},p.createElement(An.Provider,{value:Y},ee({ourProps:j,theirProps:a,slot:B,defaultTag:Yp,features:Xp,visible:F,name:"Listbox.Options"})))}let Jp="div";function Qp(e,t){let n=p.useId(),{id:r=`headlessui-listbox-option-${n}`,disabled:o=!1,value:i,...s}=e,l=p.useContext(Rl)===!0,a=Vt("Listbox.Option"),c=io("Listbox.Option"),u=fe(c,k=>c.selectors.isActive(k,r)),f=a.isSelected(i),h=p.useRef(null),d=Hp(h),g=it({disabled:o,value:i,domRef:h,get textValue(){return d()}}),v=ue(t,h,k=>{k?a.listRef.current.set(r,k):a.listRef.current.delete(r)}),b=fe(c,k=>c.selectors.shouldScrollIntoView(k,r));te(()=>{if(b)return ve().requestAnimationFrame(()=>{var k,D;(D=(k=h.current)==null?void 0:k.scrollIntoView)==null||D.call(k,{block:"nearest"})})},[b,h]),te(()=>{if(!l)return c.actions.registerOption(r,g),()=>c.actions.unregisterOption(r)},[g,r,l]);let x=q(k=>{if(o)return k.preventDefault();c.actions.selectOption(i)}),y=q(()=>{if(o)return c.actions.goToOption({focus:Q.Nothing});c.actions.goToOption({focus:Q.Specific,id:r})}),w=gf(),S=q(k=>w.update(k)),R=q(k=>{w.wasMoved(k)&&(o||u&&c.state.activationTrigger===sn.Pointer||c.actions.goToOption({focus:Q.Specific,id:r},sn.Pointer))}),P=q(k=>{w.wasMoved(k)&&(o||u&&c.state.activationTrigger===sn.Pointer&&c.actions.goToOption({focus:Q.Nothing}))}),T=ye({active:u,focus:u,selected:f,disabled:o,selectedOption:f&&l}),$=l?{}:{id:r,ref:v,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":f,disabled:void 0,onClick:x,onFocus:y,onPointerEnter:S,onMouseEnter:S,onPointerMove:R,onMouseMove:R,onPointerLeave:P,onMouseLeave:P},F=ie();return!f&&l?null:F({ourProps:$,theirProps:s,slot:T,defaultTag:Jp,name:"Listbox.Option"})}let eh=p.Fragment;function th(e,t){let{options:n,placeholder:r,...o}=e,i={ref:ue(t)},s=Vt("ListboxSelectedOption"),l=ye({}),a=s.value===void 0||s.value===null||s.mode===Ge.Multi&&Array.isArray(s.value)&&s.value.length===0,c=ie();return p.createElement(Rl.Provider,{value:!0},c({ourProps:i,theirProps:{...o,children:p.createElement(p.Fragment,null,r&&a?r:n)},slot:l,defaultTag:eh,name:"ListboxSelectedOption"}))}let nh=oe(qp),Sl=oe(Kp),rh=kd,kl=oe(Zp),$l=oe(Qp),oh=oe(th),ih=Object.assign(nh,{Button:Sl,Label:rh,Options:kl,Option:$l,SelectedOption:oh});function Pl({children:e,className:t,disabled:n=!1,intent:r="primary",...o}){return E.jsx(td,{className:re("rounded-md font-bold cursor-pointer px-2",sh(r,!!n),{"opacity-50 cursor-default":n},t),"data-focus":!0,disabled:n,...o,children:e})}function sh(e,t){switch(e){case"danger":return re("bg-red-400 text-red-950 focus:text-black",{"hover:bg-red-500 focus:text-black":!t});case"none":return re("bg-white/20 text-slate-300 focus:text-white",{"hover:bg-white/10 focus:text-white":!t});case"success":return re("bg-emerald-400 text-emerald-950 focus:text-black",{"hover:bg-emerald-500 focus:text-black":!t});case"primary":return re("bg-sky-400 text-sky-950 focus:text-black",{"hover:bg-sky-500 focus:text-black":!t});case"warning":return re("bg-amber-400 text-amber-950 focus:text-black",{"hover:bg-amber-500 focus:text-black":!t})}}function so({children:e}){return E.jsx(gu,{FallbackComponent:lh,children:e})}function lh({error:e,resetErrorBoundary:t}){return E.jsx(Fr,{intent:"danger",children:E.jsxs(he,{align:"start",direction:"column",gap:2,children:[E.jsx("div",{className:"font-bold",children:"Something went wrong!"}),E.jsx("pre",{className:"text-sm font-monospace text-red-300",children:e.message}),E.jsx(Pl,{intent:"danger",onClick:t,children:"Retry"})]})})}function Wt({children:e,onClick:t,to:n,...r}){const o=!!Pa(n),[i,s]=p.useTransition(),l=Mi();return E.jsx("a",{children:typeof e=="function"?e({isActive:o,isPending:i}):e,"data-link":n,onClick:a=>{t?.(a),s(()=>{l(n)})},...r})}function ah(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function ch(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function uh(){return/apple/i.test(navigator.vendor)}function dh(){return ah().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function fh(){return ch().includes("jsdom/")}const mh="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ui(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Ft(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&wr(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ut(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Qn(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function ph(e){return e.matches("html,body")}function et(e){return e?.ownerDocument||document}function hh(e){return ge(e)&&e.matches(mh)}function gh(e){if(!e||fh())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function ln(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...ln(e,o.id,n)])}function vh(e){return"nativeEvent"in e}function Rr(e,t){const n=["mouse","pen"];return n.push("",void 0),n.includes(e)}var bh=typeof document<"u",xh=function(){},Ie=bh?p.useLayoutEffect:xh;const wh={...m};function en(e){const t=m.useRef(e);return Ie(()=>{t.current=e}),t}const yh=wh.useInsertionEffect,Eh=yh||(e=>e());function ke(e){const t=m.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Eh(()=>{t.current=e}),m.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Ch="data-floating-ui-focusable",di="active",fi="selected",Rh={...m};let mi=!1,Sh=0;const pi=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Sh++;function kh(){const[e,t]=m.useState(()=>mi?pi():void 0);return Ie(()=>{e==null&&t(pi())},[]),m.useEffect(()=>{mi=!0},[]),e}const $h=Rh.useId,Tl=$h||kh;let Sr;process.env.NODE_ENV!=="production"&&(Sr=new Set);function Ph(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Sr)!=null&&e.has(o))){var i;(i=Sr)==null||i.add(o),console.error(o)}}function Th(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const Oh=m.createContext(null),Lh=m.createContext(null),Ol=()=>{var e;return((e=m.useContext(Oh))==null?void 0:e.id)||null},lo=()=>m.useContext(Lh);function Fn(e){return"data-floating-ui-"+e}function xe(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const hi=Fn("safe-polygon");function er(e,t,n){if(n&&!Rr(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function tr(e){return typeof e=="function"?e():e}function Mh(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:l=!0,delay:a=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:h=!0}=t,d=lo(),g=Ol(),v=en(c),b=en(a),x=en(n),y=en(f),w=m.useRef(),S=m.useRef(-1),R=m.useRef(),P=m.useRef(-1),T=m.useRef(!0),$=m.useRef(!1),F=m.useRef(()=>{}),k=m.useRef(!1),D=ke(()=>{var L;const C=(L=o.current.openEvent)==null?void 0:L.type;return C?.includes("mouse")&&C!=="mousedown"});m.useEffect(()=>{if(!l)return;function L(C){let{open:M}=C;M||(xe(S),xe(P),T.current=!0,k.current=!1)}return i.on("openchange",L),()=>{i.off("openchange",L)}},[l,i]),m.useEffect(()=>{if(!l||!v.current||!n)return;function L(M){D()&&r(!1,M,"hover")}const C=et(s.floating).documentElement;return C.addEventListener("mouseleave",L),()=>{C.removeEventListener("mouseleave",L)}},[s.floating,n,r,l,v,D]);const W=m.useCallback(function(L,C,M){C===void 0&&(C=!0),M===void 0&&(M="hover");const V=er(b.current,"close",w.current);V&&!R.current?(xe(S),S.current=window.setTimeout(()=>r(!1,L,M),V)):C&&(xe(S),r(!1,L,M))},[b,r]),z=ke(()=>{F.current(),R.current=void 0}),O=ke(()=>{if($.current){const L=et(s.floating).body;L.style.pointerEvents="",L.removeAttribute(hi),$.current=!1}}),A=ke(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);m.useEffect(()=>{if(!l)return;function L(B){if(xe(S),T.current=!1,u&&!Rr(w.current)||tr(y.current)>0&&!er(b.current,"open"))return;const j=er(b.current,"open",w.current);j?S.current=window.setTimeout(()=>{x.current||r(!0,B,"hover")},j):n||r(!0,B,"hover")}function C(B){if(A()){O();return}F.current();const j=et(s.floating);if(xe(P),k.current=!1,v.current&&o.current.floatingContext){n||xe(S),R.current=v.current({...o.current.floatingContext,tree:d,x:B.clientX,y:B.clientY,onClose(){O(),z(),A()||W(B,!0,"safe-polygon")}});const Y=R.current;j.addEventListener("mousemove",Y),F.current=()=>{j.removeEventListener("mousemove",Y)};return}(w.current!=="touch"||!Ft(s.floating,B.relatedTarget))&&W(B)}function M(B){A()||o.current.floatingContext&&(v.current==null||v.current({...o.current.floatingContext,tree:d,x:B.clientX,y:B.clientY,onClose(){O(),z(),A()||W(B)}})(B))}function V(){xe(S)}function X(B){A()||W(B,!1)}if(K(s.domReference)){const B=s.domReference,j=s.floating;return n&&B.addEventListener("mouseleave",M),h&&B.addEventListener("mousemove",L,{once:!0}),B.addEventListener("mouseenter",L),B.addEventListener("mouseleave",C),j&&(j.addEventListener("mouseleave",M),j.addEventListener("mouseenter",V),j.addEventListener("mouseleave",X)),()=>{n&&B.removeEventListener("mouseleave",M),h&&B.removeEventListener("mousemove",L),B.removeEventListener("mouseenter",L),B.removeEventListener("mouseleave",C),j&&(j.removeEventListener("mouseleave",M),j.removeEventListener("mouseenter",V),j.removeEventListener("mouseleave",X))}}},[s,l,e,u,h,W,z,O,r,n,x,d,b,v,o,A,y]),Ie(()=>{var L;if(l&&n&&(L=v.current)!=null&&(L=L.__options)!=null&&L.blockPointerEvents&&D()){$.current=!0;const M=s.floating;if(K(s.domReference)&&M){var C;const V=et(s.floating).body;V.setAttribute(hi,"");const X=s.domReference,B=d==null||(C=d.nodesRef.current.find(j=>j.id===g))==null||(C=C.context)==null?void 0:C.elements.floating;return B&&(B.style.pointerEvents=""),V.style.pointerEvents="none",X.style.pointerEvents="auto",M.style.pointerEvents="auto",()=>{V.style.pointerEvents="",X.style.pointerEvents="",M.style.pointerEvents=""}}}},[l,n,g,s,d,v,D]),Ie(()=>{n||(w.current=void 0,k.current=!1,z(),O())},[n,z,O]),m.useEffect(()=>()=>{z(),xe(S),xe(P),O()},[l,s.domReference,z,O]);const _=m.useMemo(()=>{function L(C){w.current=C.pointerType}return{onPointerDown:L,onPointerEnter:L,onMouseMove(C){const{nativeEvent:M}=C;function V(){!T.current&&!x.current&&r(!0,M,"hover")}u&&!Rr(w.current)||n||tr(y.current)===0||k.current&&C.movementX**2+C.movementY**2<2||(xe(P),w.current==="touch"?V():(k.current=!0,P.current=window.setTimeout(V,tr(y.current))))}}},[u,r,n,x,y]);return m.useMemo(()=>l?{reference:_}:{},[l,_])}const Ah=m.createContext(null),gi=Fn("portal");function Fh(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Tl(),o=Nh(),[i,s]=m.useState(null),l=m.useRef(null);return Ie(()=>()=>{i?.remove(),queueMicrotask(()=>{l.current=null})},[i]),Ie(()=>{if(!r||l.current)return;const a=t?document.getElementById(t):null;if(!a)return;const c=document.createElement("div");c.id=r,c.setAttribute(gi,""),a.appendChild(c),l.current=c,s(c)},[t,r]),Ie(()=>{if(n===null||!r||l.current)return;let a=n||o?.portalNode;a&&!Kr(a)&&(a=a.current),a=a||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,a.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(gi,""),a=c||a,a.appendChild(u),l.current=u,s(u)},[t,n,r,o]),i}const Nh=()=>m.useContext(Ah),Ih={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Dh={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},vi=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function jh(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:l=!0,outsidePress:a=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:h=!1,bubbles:d,capture:g}=t,v=lo(),b=ke(typeof a=="function"?a:()=>!1),x=typeof a=="function"?b:a,y=m.useRef(!1),{escapeKey:w,outsidePress:S}=vi(d),{escapeKey:R,outsidePress:P}=vi(g),T=m.useRef(!1),$=ke(O=>{var A;if(!n||!s||!l||O.key!=="Escape"||T.current)return;const _=(A=i.current.floatingContext)==null?void 0:A.nodeId,L=v?ln(v.nodesRef.current,_):[];if(!w&&(O.stopPropagation(),L.length>0)){let C=!0;if(L.forEach(M=>{var V;if((V=M.context)!=null&&V.open&&!M.context.dataRef.current.__escapeKeyBubbles){C=!1;return}}),!C)return}r(!1,vh(O)?O.nativeEvent:O,"escape-key")}),F=ke(O=>{var A;const _=()=>{var L;$(O),(L=ut(O))==null||L.removeEventListener("keydown",_)};(A=ut(O))==null||A.addEventListener("keydown",_)}),k=ke(O=>{var A;const _=i.current.insideReactTree;i.current.insideReactTree=!1;const L=y.current;if(y.current=!1,c==="click"&&L||_||typeof x=="function"&&!x(O))return;const C=ut(O),M="["+Fn("inert")+"]",V=et(o.floating).querySelectorAll(M);let X=K(C)?C:null;for(;X&&!Ne(X);){const Y=je(X);if(Ne(Y)||!K(Y))break;X=Y}if(V.length&&K(C)&&!ph(C)&&!Ft(C,o.floating)&&Array.from(V).every(Y=>!Ft(X,Y)))return;if(ge(C)&&z){const Y=Ne(C),H=Ee(C),G=/auto|scroll/,pe=Y||G.test(H.overflowX),de=Y||G.test(H.overflowY),lt=pe&&C.clientWidth>0&&C.scrollWidth>C.clientWidth,Et=de&&C.clientHeight>0&&C.scrollHeight>C.clientHeight,at=H.direction==="rtl",Al=Et&&(at?O.offsetX<=C.offsetWidth-C.clientWidth:O.offsetX>C.clientWidth),Fl=lt&&O.offsetY>C.clientHeight;if(Al||Fl)return}const B=(A=i.current.floatingContext)==null?void 0:A.nodeId,j=v&&ln(v.nodesRef.current,B).some(Y=>{var H;return Qn(O,(H=Y.context)==null?void 0:H.elements.floating)});if(Qn(O,o.floating)||Qn(O,o.domReference)||j)return;const ee=v?ln(v.nodesRef.current,B):[];if(ee.length>0){let Y=!0;if(ee.forEach(H=>{var G;if((G=H.context)!=null&&G.open&&!H.context.dataRef.current.__outsidePressBubbles){Y=!1;return}}),!Y)return}r(!1,O,"outside-press")}),D=ke(O=>{var A;const _=()=>{var L;k(O),(L=ut(O))==null||L.removeEventListener(c,_)};(A=ut(O))==null||A.addEventListener(c,_)});m.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=w,i.current.__outsidePressBubbles=S;let O=-1;function A(V){r(!1,V,"ancestor-scroll")}function _(){window.clearTimeout(O),T.current=!0}function L(){O=window.setTimeout(()=>{T.current=!1},Sn()?5:0)}const C=et(o.floating);l&&(C.addEventListener("keydown",R?F:$,R),C.addEventListener("compositionstart",_),C.addEventListener("compositionend",L)),x&&C.addEventListener(c,P?D:k,P);let M=[];return h&&(K(o.domReference)&&(M=Ke(o.domReference)),K(o.floating)&&(M=M.concat(Ke(o.floating))),!K(o.reference)&&o.reference&&o.reference.contextElement&&(M=M.concat(Ke(o.reference.contextElement)))),M=M.filter(V=>{var X;return V!==((X=C.defaultView)==null?void 0:X.visualViewport)}),M.forEach(V=>{V.addEventListener("scroll",A,{passive:!0})}),()=>{l&&(C.removeEventListener("keydown",R?F:$,R),C.removeEventListener("compositionstart",_),C.removeEventListener("compositionend",L)),x&&C.removeEventListener(c,P?D:k,P),M.forEach(V=>{V.removeEventListener("scroll",A)}),window.clearTimeout(O)}},[i,o,l,x,c,n,r,h,s,w,S,$,R,F,k,P,D]),m.useEffect(()=>{i.current.insideReactTree=!1},[i,x,c]);const W=m.useMemo(()=>({onKeyDown:$,...u&&{[Ih[f]]:O=>{r(!1,O.nativeEvent,"reference-press")},...f!=="click"&&{onClick(O){r(!1,O.nativeEvent,"reference-press")}}}}),[$,r,u,f]),z=m.useMemo(()=>({onKeyDown:$,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[Dh[c]]:()=>{i.current.insideReactTree=!0}}),[$,c,i]);return m.useMemo(()=>s?{reference:W,floating:z}:{},[s,W,z])}function _h(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Tl(),i=m.useRef({}),[s]=m.useState(()=>Th()),l=Ol()!=null;if(process.env.NODE_ENV!=="production"){const d=r.reference;d&&!K(d)&&Ph("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,c]=m.useState(r.reference),u=ke((d,g,v)=>{i.current.openEvent=d?g:void 0,s.emit("openchange",{open:d,event:g,reason:v,nested:l}),n?.(d,g,v)}),f=m.useMemo(()=>({setPositionReference:c}),[]),h=m.useMemo(()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference}),[a,r.reference,r.floating]);return m.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:h,events:s,floatingId:o,refs:f}),[t,u,h,s,o,f])}function Bh(e){e===void 0&&(e={});const{nodeId:t}=e,n=_h({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=m.useState(null),[l,a]=m.useState(null),u=o?.domReference||i,f=m.useRef(null),h=lo();Ie(()=>{u&&(f.current=u)},[u]);const d=nl({...e,elements:{...o,...l&&{reference:l}}}),g=m.useCallback(w=>{const S=K(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;a(S),d.refs.setReference(S)},[d.refs]),v=m.useCallback(w=>{(K(w)||w===null)&&(f.current=w,s(w)),(K(d.refs.reference.current)||d.refs.reference.current===null||w!==null&&!K(w))&&d.refs.setReference(w)},[d.refs]),b=m.useMemo(()=>({...d.refs,setReference:v,setPositionReference:g,domReference:f}),[d.refs,v,g]),x=m.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),y=m.useMemo(()=>({...d,...r,refs:b,elements:x,nodeId:t}),[d,b,x,t,r]);return Ie(()=>{r.dataRef.current.floatingContext=y;const w=h?.nodesRef.current.find(S=>S.id===t);w&&(w.context=y)}),m.useMemo(()=>({...d,context:y,refs:b,elements:x}),[d,b,x,y])}function nr(){return dh()&&uh()}function Hh(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:l=!0,visibleOnly:a=!0}=t,c=m.useRef(!1),u=m.useRef(-1),f=m.useRef(!0);m.useEffect(()=>{if(!l)return;const d=me(s.domReference);function g(){!n&&ge(s.domReference)&&s.domReference===ui(et(s.domReference))&&(c.current=!0)}function v(){f.current=!0}function b(){f.current=!1}return d.addEventListener("blur",g),nr()&&(d.addEventListener("keydown",v,!0),d.addEventListener("pointerdown",b,!0)),()=>{d.removeEventListener("blur",g),nr()&&(d.removeEventListener("keydown",v,!0),d.removeEventListener("pointerdown",b,!0))}},[s.domReference,n,l]),m.useEffect(()=>{if(!l)return;function d(g){let{reason:v}=g;(v==="reference-press"||v==="escape-key")&&(c.current=!0)}return o.on("openchange",d),()=>{o.off("openchange",d)}},[o,l]),m.useEffect(()=>()=>{xe(u)},[]);const h=m.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(d){if(c.current)return;const g=ut(d.nativeEvent);if(a&&K(g)){if(nr()&&!d.relatedTarget){if(!f.current&&!hh(g))return}else if(!gh(g))return}r(!0,d.nativeEvent,"focus")},onBlur(d){c.current=!1;const g=d.relatedTarget,v=d.nativeEvent,b=K(g)&&g.hasAttribute(Fn("focus-guard"))&&g.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var x;const y=ui(s.domReference?s.domReference.ownerDocument:document);!g&&y===s.domReference||Ft((x=i.current.floatingContext)==null?void 0:x.refs.floating.current,y)||Ft(s.domReference,y)||b||r(!1,v,"focus")})}}),[i,s.domReference,r,a]);return m.useMemo(()=>l?{reference:h}:{},[l,h])}function rr(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[di]:s,[fi]:l,...a}=e;i=a}return{...n==="floating"&&{tabIndex:-1,[Ch]:""},...i,...t.map(s=>{const l=s?s[n]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((s,l)=>(l&&Object.entries(l).forEach(a=>{let[c,u]=a;if(!(o&&[di,fi].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),s[c]=function(){for(var h,d=arguments.length,g=new Array(d),v=0;v<d;v++)g[v]=arguments[v];return(h=r.get(c))==null?void 0:h.map(b=>b(...g)).find(b=>b!==void 0)}}}else s[c]=u}),s),{})}}function Vh(e){e===void 0&&(e=[]);const t=e.map(l=>l?.reference),n=e.map(l=>l?.floating),r=e.map(l=>l?.item),o=m.useCallback(l=>rr(l,e,"reference"),t),i=m.useCallback(l=>rr(l,e,"floating"),n),s=m.useCallback(l=>rr(l,e,"item"),r);return m.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}function ao({children:e,className:t,content:n,positions:r,showOnFocus:o=!1,showOnHover:i=!0,usePortal:s}){const[l,a]=p.useState(!1),c=Fh({root:document.body}),{refs:u,floatingStyles:f,context:h}=Bh({onOpenChange:a,open:l,middleware:[Zr(4),rl(),km(r?{allowedPlacements:r}:{})]}),d=Mh(h,{enabled:i}),g=Hh(h,{enabled:o}),v=jh(h),{getReferenceProps:b,getFloatingProps:x}=Vh([v,g,d]),y=S=>{if(o)switch(S.key){case"Escape":{a(!1);break}case"Enter":{a(!0);break}}};let w=null;return l&&(w=E.jsx("div",{className:re("bg-white/80 text-black rounded-md px-2 py-1 shadow-md whitespace-nowrap z-40",t),ref:u.setFloating,style:f,...x(),children:n}),s&&c&&(w=Ye.createPortal(w,c))),E.jsxs("div",{className:re("group relative flex justify-center",t),onKeyDown:y,children:[E.jsx("div",{ref:u.setReference,...b(),children:e}),w]})}function bi({ariaLabel:e,children:t,className:n="",onClick:r,title:o}){return E.jsx(ao,{className:n,content:o,children:E.jsx("button",{"aria-label":e||o,className:re("cursor-pointer",n),onClick:r,children:t})})}function co({children:e,className:t,href:n,target:r="_blank",...o}){return E.jsx("a",{className:t,href:n,target:r,rel:"noopener noreferrer",...o,children:e})}function or({ariaLabel:e,children:t,className:n="",title:r,...o}){const i="to"in o?E.jsx(Wt,{"aria-label":e||r,children:t,className:"text-header-icons! cursor-pointer",to:o.to}):E.jsx(co,{"aria-label":e||r,children:t,className:"text-header-icons! cursor-pointer",href:o.href});return E.jsx(ao,{className:n,content:r,children:i})}function Wh({children:e}){return E.jsx("div",{className:"w-full shrink-0 flex flex-col gap-4 py-4 overflow-y-auto",children:e})}function Ll({children:e,commonQuestions:t,overview:n,packageDescription:r,packageName:o,repositoryUrl:i,showOpenCollectLink:s,versions:l}){const[a,c]=p.useState({isNavVisible:!1,isSiteSearchVisible:!1}),u=p.useCallback(d=>c(g=>g.isNavVisible===d?g:{...g,isNavVisible:d}),[]),f=p.useCallback(d=>c(g=>g.isSiteSearchVisible===d?g:{...g,isSiteSearchVisible:d}),[]),h=p.useMemo(()=>({commonQuestions:t,isNavVisible:a.isNavVisible,isSiteSearchVisible:a.isSiteSearchVisible,overview:n,packageDescription:r,packageName:o,repositoryUrl:i.replace(".git",""),setIsNavVisible:u,setIsSiteSearchVisible:f,showOpenCollectLink:!!s,versions:l}),[t,n,r,o,i,u,f,s,a.isNavVisible,a.isSiteSearchVisible,l]);return E.jsx(Wi.Provider,{children:e,value:h})}Ll.displayName="LibraryContextProvider";function zh(){const{setIsNavVisible:e,setIsSiteSearchVisible:t}=Dt(),{pathname:n}=Be();return p.useLayoutEffect(()=>{e(!1),t(!1);const r=document.body.querySelector("[data-main-scrollable]");if(r){const o=setTimeout(()=>{r.scrollTo(0,0)},1);return()=>{clearTimeout(o)}}},[n,e,t]),null}const Uh={"*":p.lazy(()=>Promise.resolve().then(()=>require("./PageNotFound-pPQgf0wT.cjs"))),"/":p.lazy(()=>Promise.resolve().then(()=>require("./GettingStartedRoute-Dj9vAFwF.cjs"))),"/common-questions":p.lazy(()=>Promise.resolve().then(()=>require("./CommonQuestionsRoute-DKgVI5bf.cjs"))),"/support":p.lazy(()=>Promise.resolve().then(()=>require("./SupportRoute-BbSurNA_.cjs"))),"/versions":p.lazy(()=>Promise.resolve().then(()=>require("./VersionsRoute-DpDr0_Rf.cjs")))};function qh(e,t=250){const[n,r]=p.useState(e);return p.useEffect(()=>{if(t===0)p.startTransition(()=>r(e));else{const o=setTimeout(()=>{p.startTransition(()=>r(e))},t);return()=>{clearTimeout(o)}}},[t,e]),n}let ir;function Gh(){return ir===void 0&&(ir=new Promise(e=>{Promise.all([Promise.resolve().then(()=>require("./fuse-CM2wbN_z.cjs")).then(t=>t.default),fetch("/generated/search-records.json").then(t=>t.json()),fetch("/generated/search-index.json").then(t=>t.json())]).then(([t,n,r])=>{const o=new t(n,{ignoreLocation:!0,includeMatches:!1,isCaseSensitive:!1,keys:[{name:"title",weight:5},{name:"section",weight:1},{name:"text",weight:1}],minMatchCharLength:2,threshold:0},t.parseIndex(r));e(o)})})),ir}function Kh({isActive:e,result:{item:{path:t,section:n,text:r,title:o}},searchTextDeferred:i}){const s=p.useRef(null),l=p.useMemo(()=>xi(o,i),[i,o]),a=p.useMemo(()=>r?xi(r,i,{maxLength:150,leading:25}):"",[i,r]);return p.useEffect(()=>{e&&s.current?.scrollIntoView({behavior:"smooth",block:"nearest"})},[e]),E.jsx("li",{ref:s,children:E.jsxs(Wt,{className:re("rounded px-2 py-1 text-white/80 hover:text-white hover:bg-white/10 cursor-pointer transition-colors!","flex flex-row items-center gap-2 overflow-auto",{"bg-sky-950 hover:bg-sky-950 text-white":e}),"data-active-search-result":e||void 0,to:t,children:[E.jsxs("div",{className:"grow-1 shrink-1 overflow-auto flex flex-col gap-1",children:[E.jsxs("div",{className:"grow text-lg truncate text-white",children:[n,n&&" ",l]}),a&&E.jsx("div",{className:"text-sm truncate pb-1",children:a})]}),E.jsx($r,{className:"h-4 w-4 shrink-0"})]})})}function xi(e,t,n){const{maxLength:r=250,leading:o=0}=n??{};if(t=t.toLowerCase(),r&&e.length>r){const a=e.toLowerCase().indexOf(t),c=Math.max(0,a-o),u=Math.min(e.length,c+r);e=e.substring(c,u),c>0&&(e="…"+e)}const i=[],s=e.toLowerCase().split(t);let l=0;for(let a=0;a<s.length;a++){const c=s[a];i.push(e.substring(l,l+c.length)),l+=c.length;const u=e.substring(l,l+t.length);u&&i.push(E.jsx("mark",{className:"bg-transparent text-sky-300",children:u},l)),l+=t.length}return l<e.length-1&&i.push(e.substring(l)),i}function Yh({inputRef:e,searchTextDeferred:t}){const n=p.use(Gh()),[r,o]=p.useState(0),i=p.useMemo(()=>t?n.search(t,{limit:10}):[],[n,t]);return p.useEffect(()=>{if(e){const s=l=>{switch(l.key){case"ArrowDown":{const a=r<i.length-1?r+1:0;o(a);break}case"ArrowUp":{const a=r>0?r-1:i.length-1;o(a);break}case"Enter":{const a=document.body.querySelector("[data-active-search-result]");a instanceof HTMLAnchorElement&&a.click();break}}};return e.addEventListener("keydown",s),()=>{e.removeEventListener("keydown",s)}}},[r,e,i,t]),E.jsxs("ul",{className:"border-t border-white/10 pt-3 mt-3 flex flex-col gap-1 overflow-auto",children:[t&&i.length===0&&E.jsxs("div",{children:['No results for "',t,'"']}),i.map((s,l)=>E.jsx(Kh,{isActive:r===l,result:s,searchTextDeferred:t},l))]})}function Xh(){const{isSiteSearchVisible:e,setIsSiteSearchVisible:t}=Dt(),[n,r]=p.useState(null),[o,i]=p.useState(""),s=qh(o);return p.useEffect(()=>{if(!e){const l=a=>{switch(a.key){case"K":case"k":{(a.metaKey||a.ctrlKey)&&t(!0);break}}};return document.body.addEventListener("keydown",l),()=>{document.body.removeEventListener("keydown",l)}}},[e,t]),e?E.jsx("div",{className:"fixed inset-0 backdrop-blur-md p-4 flex flex-col items-center animate duration-500 animate-fade-in",onClick:()=>{i(""),t(!1)},children:E.jsxs("div",{className:"shadow-background-gradient-2/20 shadow-md bg-black/80 rounded-lg py-3 pl-4 pr-3 max-w-full w-200 max-h-full overflow-auto flex flex-col",children:[E.jsxs("div",{className:"flex items-center gap-3 shrink-0",onClick:l=>l.stopPropagation(),children:[E.jsx(yi,{className:"w-4 h-4"}),E.jsx("input",{autoFocus:!0,className:"grow text-lg md:tex-md",onKeyDown:l=>{l.key==="Escape"&&(i(""),t(!1))},onChange:l=>{i(l.currentTarget.value)},ref:r,placeholder:"Search documentation",value:o}),E.jsx("div",{className:"border border-white/20 rounded text-sm px-1 cursor-pointer",onClick:()=>t(!1),children:"esc"})]}),s&&E.jsx(Yh,{inputRef:n,searchTextDeferred:s},s)]})}):null}const Zh=navigator.userAgent.indexOf("Win")>=0?"^K":"⌘K";function Jh({enableSiteSearch:e,navLinks:t,routes:n,...r}){return E.jsx(Ll,{...r,children:E.jsx(Qh,{enableSiteSearch:e,navLinks:t,routes:n})})}function Qh({enableSiteSearch:e,navLinks:t,routes:n}){const{isNavVisible:r,isSiteSearchVisible:o,packageDescription:i,packageName:s,setIsNavVisible:l,setIsSiteSearchVisible:a,versions:c}=Dt();return E.jsxs(mc,{children:[E.jsx(zh,{}),E.jsxs("div",{className:"h-full w-full max-w-350 mx-auto flex flex-col",children:[E.jsxs(he,{align:"center",className:"h-12 w-full p-4",direction:"row",gap:4,children:[E.jsx(Sc,{className:"shrink-0 w-8 h-8"}),E.jsxs(he,{className:"overflow-hidden",align:"center",direction:"row",gap:4,children:[E.jsx(Wt,{children:s,className:"text-xl text-header-package-name! font-bold cursor-pointer truncate",to:"/"}),E.jsx("div",{className:"hidden md:block text-header-package-description",children:i})]}),E.jsx("div",{className:"grow"}),E.jsxs(he,{align:"center",direction:"row",gap:4,children:[e&&E.jsx(bi,{isActive:o,onClick:()=>a(!o),title:"Site search",children:E.jsxs("div",{className:"h-8 flex items-center justify-center gap-1 px-2 rounded-full text-sm bg-black/40 hover:bg-black/60 transition-colors!",children:[E.jsx(yi,{className:"w-4 h-4"}),Zh]})}),c!==void 0&&E.jsx(or,{ariaLabel:"Documentation for other versions",children:E.jsx(Vi,{className:"w-6 h-6"}),title:"Previous versions",to:"/versions"}),E.jsx(or,{ariaLabel:"NPM project page",children:E.jsx(Rc,{className:"w-8 h-8"}),className:"hidden sm:block",href:`https://www.npmjs.com/package/${s}`,title:"NPM package"}),E.jsx(or,{ariaLabel:"GitHub project page",children:E.jsx(Cc,{className:"w-6 h-6"}),className:"hidden sm:block",href:`https://github.com/bvaughn/${s}`,title:"Source code"}),E.jsx(bi,{ariaLabel:"Site navigation menu",className:"block md:hidden",isActive:r,onClick:()=>l(!r),title:r?"Hide menu":"Show menu",children:r?E.jsx(Jl,{className:"w-6 h-6 fill-current drop-shadow-black/20 drop-shadow-xs"}):E.jsx(Bl,{className:"w-6 h-6 fill-current drop-shadow-black/20 drop-shadow-xs"})})]})]}),E.jsxs("div",{className:"grow shrink flex flex-row shadow-lg mx-2 rounded-t-3xl overflow-hidden",children:[E.jsx("section",{className:re("w-full bg-black/90 md:block md:w-80 md:bg-black/80 overflow-auto",{hidden:!r}),children:E.jsx(Wh,{children:t})}),E.jsx("main",{className:re("w-full bg-black/90 relative overflow-auto",{hidden:r}),children:E.jsx("div",{className:"h-full p-4 py-4 overflow-auto [mask-image:linear-gradient(to_bottom,transparent,black_1.5rem)]","data-main-scrollable":!0,children:E.jsx(za,{children:Object.entries({...Uh,...n}).map(([u,f])=>E.jsx(Ni,{element:E.jsx(so,{children:E.jsx(f,{})},u),path:u},u))})})})]})]}),e&&E.jsx(Xh,{})]})}function eg({children:e,className:t,...n}){return E.jsx(so,{children:E.jsx("div",{className:`border-lg bg-black/30 text-slate-300 rounded-lg p-2 ${t}`,...n,children:e})})}const tg=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},m.createElement("path",{d:"m424-424-86-86q-11-11-28-11t-28 11q-11 11-11 28t11 28l114 114q12 12 28 12t28-12l226-226q11-11 11-28t-11-28q-11-11-28-11t-28 11L424-424ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Z"})),ng=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},m.createElement("path",{d:"M320-440h320q17 0 28.5-11.5T680-480q0-17-11.5-28.5T640-520H320q-17 0-28.5 11.5T280-480q0 17 11.5 28.5T320-440ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Z"})),rg=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},m.createElement("path",{d:"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Z"}));function og({checked:e,children:t,className:n,indeterminate:r,onChange:o,...i}){let s,l;return r?(s=ng,l="fill-white"):e?(s=tg,l="fill-blue-600"):(s=rg,l="fill-slate-600"),E.jsxs("label",{className:`cursor-pointer rounded-lg flex flex-row items-center outline-none group ${n}`,"data-focus-within":!0,...i,children:[E.jsx("input",{checked:e,className:"w-0 h-0",onChange:a=>{o(a.currentTarget.checked)},type:"checkbox"}),E.jsx(s,{className:l}),t&&E.jsxs(E.Fragment,{children:[" ",t]})]})}function uo({className:e="",html:t}){return E.jsx("div",{className:"relative",children:E.jsx("code",{className:re("text-sm md:text-base block text-left whitespace-pre-wrap break-normal text-white! rounded-md p-3 bg-black","flex flex-col",e),dangerouslySetInnerHTML:{__html:t}})})}function zt({className:e,sections:t}){return E.jsx(he,{className:e,direction:"column",gap:2,children:t.map(({content:n,intent:r},o)=>r?E.jsx(Fr,{html:!0,inline:!0,intent:r,minimal:!0,children:n},o):E.jsx("div",{dangerouslySetInnerHTML:{__html:n.replaceAll("<ul>",'<ul class="list-disc pl-4">')}},o))})}function fo({section:e,sourceCodePath:t,title:n}){const{repositoryUrl:r}=Dt();return E.jsxs(E.Fragment,{children:[E.jsxs("header",{className:"text-xl",children:[e&&E.jsxs(E.Fragment,{children:[E.jsx("span",{className:"text-xl whitespace-nowrap","data-section":!0,children:e})," ",E.jsx($r,{className:"size-4 text-slate-400 inline"})," "]}),E.jsx("span",{className:"text-xl","data-title":!0,children:n}),t&&E.jsx(co,{className:"text-sm text-emerald-300 hover:text-white",href:`${r}/blob/main/${t}`,children:E.jsx(jl,{className:"inline-block size-4 fill-current ml-2 mb-1"})})]}),E.jsx("title",{children:e?`${e}: ${n}`:n})]})}function ig({method:e}){return E.jsxs(E.Fragment,{children:[E.jsx("dd",{className:"[&_code]:text-sky-300 text-lg font-bold",children:e.name}),E.jsxs("dt",{className:"mb-2",children:[E.jsx(zt,{sections:e.description}),E.jsx(uo,{className:"mt-2 p-2 flex flex-col",html:e.html})]})]})}function sg({json:e,section:t}){return E.jsxs(he,{direction:"column",gap:4,children:[E.jsx(fo,{section:t,sourceCodePath:e.filePath,title:`${e.name}`}),E.jsx(zt,{sections:e.description}),E.jsx(he,{direction:"column",children:E.jsx("dl",{className:"flex flex-col gap-2",children:e.methods.map((n,r)=>E.jsx(ig,{method:n},r))})})]})}function lg({children:e,className:t,onChange:n,value:r,...o}){return E.jsx("input",{className:`rounded-md bg-black/30 border border-2 border-transparent py-1 px-2 outline-none focus:border-emerald-300 ${t}`,"data-focus":!0,onChange:i=>{n(i.currentTarget.value)},value:r,...o,children:e})}function ag(){return E.jsxs(he,{align:"center",className:"text-slate-300",direction:"row",gap:2,children:[E.jsx(Il,{className:"size-4 animate-spin"}),"Loading..."]})}function Ml({children:e,className:t,disabled:n}){return E.jsx(he,{align:"center",className:re("px-4 h-8 cursor-pointer text-white/90 hover:text-white focus:bg-white/10 focus-within:bg-white/10",{"pointer-events-none text-white/50":n},t),direction:"row",gap:1,children:e})}function cg({children:e,className:t,path:n}){return E.jsx(Wt,{to:n,children:({isActive:r,isPending:o})=>E.jsx(Ml,{className:re("px-4 cursor-pointer",{"font-bold text-nav-active hover:text-nav-hover":r,"opacity-50 pointer-events-none":o},t),children:E.jsx(he,{align:"center",direction:"row",gap:2,children:e})})})}function ug({children:e,label:t}){return E.jsxs(_p,{as:"section",defaultOpen:!0,children:[E.jsx(xl,{className:"w-full group border-none! data-focus:bg-white/10",children:E.jsxs(Ml,{children:[E.jsx("div",{className:"uppercase text-sm font-bold text-white/50",children:t}),E.jsx("div",{className:"grow"}),E.jsx($r,{className:"size-4 fill-white/60 group-data-hover:fill-white/50 group-data-open:rotate-90"})]})}),E.jsx(wl,{className:"pl-4",children:e})]})}function dg(e){const t=[],n=[];return Object.values(e.props).forEach(r=>{r.required?n.push(r):t.push(r)}),t.sort((r,o)=>r.name.localeCompare(o.name)),n.sort((r,o)=>r.name.localeCompare(o.name)),{optionalProps:t,requiredProps:n}}function fg({prop:e}){return E.jsxs(E.Fragment,{children:[E.jsx("dt",{className:"mt-6 pl-8 indent-[-1rem]",children:E.jsx(uo,{className:"bg-transparent inline-flex flex-col p-0",html:e.html})}),E.jsx("dd",{className:"mt-2 pl-4 [&_code]:text-sky-300",children:E.jsx(zt,{sections:e.description})})]})}function kr({header:e,props:t}){return t.length===0?null:E.jsxs(he,{direction:"column",children:[E.jsx("div",{className:"text-lg font-bold",children:e}),E.jsx("dl",{children:t.map(n=>E.jsx(fg,{prop:n},n.name))})]})}function mg({json:e,section:t}){const{optionalProps:n,requiredProps:r}=p.useMemo(()=>dg(e),[e]);return E.jsxs(he,{direction:"column",gap:4,children:[E.jsx(fo,{section:t,sourceCodePath:e.filePath,title:`${e.name} component`}),E.jsx(zt,{sections:e.description}),E.jsx(kr,{header:"Required props",props:r}),E.jsx(kr,{header:"Optional props",props:n})]})}const pg=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},m.createElement("path",{d:"m424-408-86-86q-11-11-28-11t-28 11q-11 11-11 28t11 28l114 114q12 12 28 12t28-12l226-226q11-11 11-28t-11-28q-11-11-28-11t-28 11L424-408Zm56 328q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"})),hg=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},m.createElement("path",{d:"M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"}));function gg({checked:e,children:t,className:n,name:r,onChange:o,value:i,...s}){let l,a;return e?(l=pg,a="fill-blue-600"):(l=hg,a="fill-slate-600"),E.jsxs("label",{className:`cursor-pointer rounded-full flex flex-row items-center outline-none group ${n}`,"data-focus-within":!0,...s,children:[E.jsx("input",{checked:e,className:"w-0 h-0",name:r,onChange:()=>{o(i)},type:"radio",value:i}),E.jsx(l,{className:a}),t&&E.jsxs(E.Fragment,{children:[" ",t]})]})}function vg({className:e,defaultValue:t,onChange:n,options:r,placeholder:o="",value:i}){return E.jsx(ih,{value:i??t,onChange:n,children:E.jsxs("div",{className:`relative ${e}`,children:[E.jsxs(Sl,{className:"w-full h-9 text-left rounded-md bg-black/30 border border-2 border-transparent py-1 px-2 outline-none focus:border-teal-300","data-focus":!0,children:[i?.label?E.jsx("span",{className:"block truncate",children:i.label}):E.jsx("span",{className:"block truncate text-slate-500",children:o}),E.jsx("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2",children:E.jsx(Ul,{className:"h-4 w-4 text-gray-400","aria-hidden":"true"})})]}),E.jsx(Rp,{as:p.Fragment,leaveFrom:"opacity-100",leaveTo:"opacity-0",children:E.jsx(kl,{className:"absolute z-10 mt-1 max-h-50 w-full overflow-auto rounded-md py-1 bg-black/90","data-focus":!0,children:r.map((s,l)=>E.jsx($l,{className:re("relative cursor-pointer select-none h-7 py-1 px-2 text-slate-300 border-none!","data-focus:text-teal-300 data-focus:bg-black","data-active:text-teal-300 data-active:bg-black","data-selected:text-teal-300 data-selected:font-bold"),value:s,children:s.label},l))})})]})})}function bg(e,t){switch(e){case"danger":return t?"bg-red-950 text-red-300 [&_svg]:text-red-500":"bg-black/10 bg-border border-2 border-red-500 text-white [&_svg]:text-red-500 [&_a]:text-red-400!";case"none":return t?"bg-white/10 text-slate-300 [&_svg]:text-slate-400":"bg-black/10 bg-border border-2 border-white/40 text-white [&_svg]:text-white/60";case"primary":return t?"bg-sky-950 text-sky-300 [&_svg]:text-sky-400":"bg-black/10 bg-border border-2 border-sky-400 text-white [&_svg]:text-sky-400";case"success":return t?"bg-emerald-950 text-emerald-300 [&_svg]:text-emerald-400":"bg-black/10 bg-border border-2 border-emerald-400 text-white [&_svg]:text-emerald-400";case"warning":return t?"bg-amber-950/65 text-amber-200 [&_svg]:text-amber-300":"bg-black/10 bg-border border-2 border-amber-400 text-white [&_svg]:text-amber-400 [&_a]:text-amber-400!"}}exports.AppRoot=Jh;exports.Block=eg;exports.Box=he;exports.Button=Pl;exports.Callout=Fr;exports.Checkbox=og;exports.Code=uo;exports.ComponentProps=mg;exports.ComponentPropsSection=kr;exports.DocsSection=zt;exports.ErrorBoundary=so;exports.ExternalLink=co;exports.Header=fo;exports.ImperativeHandle=sg;exports.Input=lg;exports.Link=Wt;exports.LoadingSpinner=ag;exports.NavLink=cg;exports.NavSection=ug;exports.Radio=gg;exports.Select=vg;exports.SvgTags=Vi;exports.Tooltip=ao;exports.assert=zi;exports.cn=re;exports.getIntentClassNames=bg;exports.useLibraryContext=Dt;
|
|
8
|
+
//# sourceMappingURL=index-BWhTJgvX.cjs.map
|