react-lib-tools 0.0.25 → 0.0.27
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/README.md +6 -0
- package/dist/{GettingStartedRoute-C52ZxlUq.cjs → GettingStartedRoute-RHOZQuHV.cjs} +2 -2
- package/dist/{GettingStartedRoute-C52ZxlUq.cjs.map → GettingStartedRoute-RHOZQuHV.cjs.map} +1 -1
- package/dist/{GettingStartedRoute-BiU1uw3z.js → GettingStartedRoute-n-O_44X3.js} +2 -2
- package/dist/{GettingStartedRoute-BiU1uw3z.js.map → GettingStartedRoute-n-O_44X3.js.map} +1 -1
- package/dist/{PageNotFound-CB4aWvqZ.js → PageNotFound-CIaTnSUD.js} +2 -2
- package/dist/{PageNotFound-CB4aWvqZ.js.map → PageNotFound-CIaTnSUD.js.map} +1 -1
- package/dist/{PageNotFound-BZHDkIob.cjs → PageNotFound-D_jrycmQ.cjs} +2 -2
- package/dist/{PageNotFound-BZHDkIob.cjs.map → PageNotFound-D_jrycmQ.cjs.map} +1 -1
- package/dist/{SupportRoute-3-Fq8iuG.cjs → SupportRoute-B12GB6Nv.cjs} +2 -2
- package/dist/{SupportRoute-3-Fq8iuG.cjs.map → SupportRoute-B12GB6Nv.cjs.map} +1 -1
- package/dist/{SupportRoute-CCWHUGmp.js → SupportRoute-DAwPlROy.js} +2 -2
- package/dist/{SupportRoute-CCWHUGmp.js.map → SupportRoute-DAwPlROy.js.map} +1 -1
- package/dist/{VersionsRoute-D5nKJAiH.cjs → VersionsRoute-Iss3PSr3.cjs} +2 -2
- package/dist/{VersionsRoute-D5nKJAiH.cjs.map → VersionsRoute-Iss3PSr3.cjs.map} +1 -1
- package/dist/{VersionsRoute-DGvfG4y4.js → VersionsRoute-eEmeVHtt.js} +2 -2
- package/dist/{VersionsRoute-DGvfG4y4.js.map → VersionsRoute-eEmeVHtt.js.map} +1 -1
- package/dist/index-CQs-galX.cjs +8 -0
- package/dist/index-CQs-galX.cjs.map +1 -0
- package/dist/{index-CVXprQ8Z.js → index-Cog7KERk.js} +3456 -2852
- package/dist/index-Cog7KERk.js.map +1 -0
- package/dist/react-lib-tools.cjs +1 -1
- package/dist/react-lib-tools.d.ts +7 -0
- package/dist/react-lib-tools.js +5 -4
- package/package.json +1 -1
- package/styles.css +4 -0
- package/dist/index-CVXprQ8Z.js.map +0 -1
- package/dist/index-MEfvl32g.cjs +0 -8
- package/dist/index-MEfvl32g.cjs.map +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";"use strict";const E=require("react/jsx-runtime"),p=require("react"),Ke=require("react-dom");function li(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=li(p),nn=li(Ke);function Cs({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 Rs=m.forwardRef(Cs);function $s({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 si=m.forwardRef($s);function Ss({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 ks=m.forwardRef(Ss);function Ts({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 Os=m.forwardRef(Ts);function Ps({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 ai=m.forwardRef(Ps);function Ls({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 Ms=m.forwardRef(Ls);function As({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 Fs=m.forwardRef(As);function Is({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 Ns=m.forwardRef(Is);function Ds({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 js=m.forwardRef(Ds);var no="popstate";function _s(e={}){function t(r,o){let{pathname:i,search:l,hash:s}=r.location;return Jn("",{pathname:i,search:l,hash:s},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:Rt(o)}return Hs(t,n,null,e)}function Y(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ee(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Bs(){return Math.random().toString(36).substring(2,10)}function ro(e,t){return{usr:e.state,key:e.key,idx:t}}function Jn(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?st(t):t,state:n,key:t&&t.key||r||Bs()}}function Rt({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 st(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 Hs(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,l=o.history,s="POP",a=null,u=c();u==null&&(u=0,l.replaceState({...l.state,idx:u},""));function c(){return(l.state||{idx:null}).idx}function f(){s="POP";let b=c(),x=b==null?null:b-u;u=b,a&&a({action:s,location:v.location,delta:x})}function h(b,x){s="PUSH";let y=Jn(v.location,b,x);u=c()+1;let w=ro(y,u),$=v.createHref(y);try{l.pushState(w,"",$)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;o.location.assign($)}i&&a&&a({action:s,location:v.location,delta:1})}function d(b,x){s="REPLACE";let y=Jn(v.location,b,x);u=c();let w=ro(y,u),$=v.createHref(y);l.replaceState(w,"",$),i&&a&&a({action:s,location:v.location,delta:0})}function g(b){return Vs(b)}let v={get action(){return s},get location(){return e(o,l)},listen(b){if(a)throw new Error("A history only accepts one active listener");return o.addEventListener(no,f),a=b,()=>{o.removeEventListener(no,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 l.go(b)}};return v}function Vs(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Y(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Rt(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function ui(e,t,n="/"){return zs(e,t,n,!1)}function zs(e,t,n,r){let o=typeof t=="string"?st(t):t,i=Me(o.pathname||"/",n);if(i==null)return null;let l=ci(e);Ws(l);let s=null;for(let a=0;s==null&&a<l.length;++a){let u=fi(i);s=Qs(l[a],u,r)}return s}function ci(e,t=[],n=[],r="",o=!1){let i=(l,s,a=o,u)=>{let c={relativePath:u===void 0?l.path||"":u,caseSensitive:l.caseSensitive===!0,childrenIndex:s,route:l};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(r)&&a)return;Y(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let f=Le([r,c.relativePath]),h=n.concat(c);l.children&&l.children.length>0&&(Y(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),ci(l.children,t,h,f,a)),!(l.path==null&&!l.index)&&t.push({path:f,score:Xs(f,l.index),routesMeta:h})};return e.forEach((l,s)=>{if(l.path===""||!l.path?.includes("?"))i(l,s);else for(let a of di(l.path))i(l,s,!0,a)}),t}function di(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 l=di(r.join("/")),s=[];return s.push(...l.map(a=>a===""?i:[i,a].join("/"))),o&&s.push(...l),s.map(a=>e.startsWith("/")&&a===""?"/":a)}function Ws(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Js(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var Us=/^:[\w-]+$/,qs=3,Gs=2,Ks=1,Ys=10,Zs=-2,oo=e=>e==="*";function Xs(e,t){let n=e.split("/"),r=n.length;return n.some(oo)&&(r+=Zs),t&&(r+=Gs),n.filter(o=>!oo(o)).reduce((o,i)=>o+(Us.test(i)?qs:i===""?Ks:Ys),r)}function Js(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 Qs(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",l=[];for(let s=0;s<r.length;++s){let a=r[s],u=s===r.length-1,c=i==="/"?t:t.slice(i.length)||"/",f=$t({path:a.relativePath,caseSensitive:a.caseSensitive,end:u},c),h=a.route;if(!f&&u&&n&&!r[r.length-1].route.index&&(f=$t({path:a.relativePath,caseSensitive:a.caseSensitive,end:!1},c)),!f)return null;Object.assign(o,f.params),l.push({params:o,pathname:Le([i,f.pathname]),pathnameBase:ia(Le([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=Le([i,f.pathnameBase]))}return l}function $t(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ea(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],l=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce((u,{paramName:c,isOptional:f},h)=>{if(c==="*"){let g=s[h]||"";l=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const d=s[h];return f&&!d?u[c]=void 0:u[c]=(d||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:l,pattern:e}}function ea(e,t=!1,n=!0){Ee(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,(l,s,a)=>(r.push({paramName:s,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 fi(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ee(!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 Me(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 ta=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,na=e=>ta.test(e);function ra(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?st(e):e,i;if(n)if(na(n))i=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),Ee(!1,`Pathnames cannot have embedded double slashes - normalizing ${l} -> ${n}`)}n.startsWith("/")?i=io(n.substring(1),"/"):i=io(n,t)}else i=t;return{pathname:i,search:la(r),hash:sa(o)}}function io(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 Pn(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 oa(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function mi(e){let t=oa(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function pi(e,t,n,r=!1){let o;typeof e=="string"?o=st(e):(o={...e},Y(!o.pathname||!o.pathname.includes("?"),Pn("?","pathname","search",o)),Y(!o.pathname||!o.pathname.includes("#"),Pn("#","pathname","hash",o)),Y(!o.search||!o.search.includes("#"),Pn("#","search","hash",o)));let i=e===""||o.pathname==="",l=i?"/":o.pathname,s;if(l==null)s=n;else{let f=t.length-1;if(!r&&l.startsWith("..")){let h=l.split("/");for(;h[0]==="..";)h.shift(),f-=1;o.pathname=h.join("/")}s=f>=0?t[f]:"/"}let a=ra(o,s),u=l&&l!=="/"&&l.endsWith("/"),c=(i||l===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||c)&&(a.pathname+="/"),a}var Le=e=>e.join("/").replace(/\/\/+/g,"/"),ia=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),la=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,sa=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function aa(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ua(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var hi=["POST","PUT","PATCH","DELETE"];new Set(hi);var ca=["GET",...hi];new Set(ca);var at=m.createContext(null);at.displayName="DataRouter";var fn=m.createContext(null);fn.displayName="DataRouterState";m.createContext(!1);var gi=m.createContext({isTransitioning:!1});gi.displayName="ViewTransition";var da=m.createContext(new Map);da.displayName="Fetchers";var fa=m.createContext(null);fa.displayName="Await";var Re=m.createContext(null);Re.displayName="Navigation";var Lt=m.createContext(null);Lt.displayName="Location";var Ae=m.createContext({outlet:null,matches:[],isDataRoute:!1});Ae.displayName="Route";var yr=m.createContext(null);yr.displayName="RouteError";function ma(e,{relative:t}={}){Y(ut(),"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:l}=Mt(e,{relative:t}),s=i;return n!=="/"&&(s=i==="/"?n:Le([n,i])),r.createHref({pathname:s,search:l,hash:o})}function ut(){return m.useContext(Lt)!=null}function Fe(){return Y(ut(),"useLocation() may be used only in the context of a <Router> component."),m.useContext(Lt).location}function pa(e){Y(ut(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=Fe();return m.useMemo(()=>$t(e,fi(t)),[t,e])}var vi="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function bi(e){m.useContext(Re).static||m.useLayoutEffect(e)}function xi(){let{isDataRoute:e}=m.useContext(Ae);return e?ka():ha()}function ha(){Y(ut(),"useNavigate() may be used only in the context of a <Router> component.");let e=m.useContext(at),{basename:t,navigator:n}=m.useContext(Re),{matches:r}=m.useContext(Ae),{pathname:o}=Fe(),i=JSON.stringify(mi(r)),l=m.useRef(!1);return bi(()=>{l.current=!0}),m.useCallback((a,u={})=>{if(Ee(l.current,vi),!l.current)return;if(typeof a=="number"){n.go(a);return}let c=pi(a,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Le([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,i,o,e])}m.createContext(null);function Mt(e,{relative:t}={}){let{matches:n}=m.useContext(Ae),{pathname:r}=Fe(),o=JSON.stringify(mi(n));return m.useMemo(()=>pi(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function ga(e,t){return wi(e,t)}function wi(e,t,n,r,o){Y(ut(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=m.useContext(Re),{matches:l}=m.useContext(Ae),s=l[l.length-1],a=s?s.params:{},u=s?s.pathname:"/",c=s?s.pathnameBase:"/",f=s&&s.route;{let y=f&&f.path||"";yi(u,!f||y.endsWith("*")||y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (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
|
+
|
|
3
|
+
Please change the parent <Route path="${y}"> to <Route path="${y==="/"?"*":`${y}/*`}">.`)}let h=Fe(),d;if(t){let y=typeof t=="string"?st(t):t;Y(c==="/"||y.pathname?.startsWith(c),`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 "${c}" but pathname "${y.pathname}" was given in the \`location\` prop.`),d=y}else d=h;let g=d.pathname||"/",v=g;if(c!=="/"){let y=c.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(y.length).join("/")}let b=ui(e,{pathname:v});Ee(f||b!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Ee(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=ya(b&&b.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:Le([c,i.encodeLocation?i.encodeLocation(y.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:Le([c,i.encodeLocation?i.encodeLocation(y.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathnameBase])})),l,n,r,o);return t&&x?m.createElement(Lt.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...d},navigationType:"POP"}},x):x}function va(){let e=Sa(),t=aa(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},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=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,l)}var ba=m.createElement(va,null),xa=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(Ae.Provider,{value:this.props.routeContext},m.createElement(yr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function wa({routeContext:e,match:t,children:n}){let r=m.useContext(at);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),m.createElement(Ae.Provider,{value:e},n)}function ya(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,l=n?.errors;if(l!=null){let c=i.findIndex(f=>f.route.id&&l?.[f.route.id]!==void 0);Y(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),i=i.slice(0,Math.min(i.length,c+1))}let s=!1,a=-1;if(n)for(let c=0;c<i.length;c++){let f=i[c];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(a=c),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){s=!0,a>=0?i=i.slice(0,a+1):i=[i[0]];break}}}let u=n&&r?(c,f)=>{r(c,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:ua(n.matches),errorInfo:f})}:void 0;return i.reduceRight((c,f,h)=>{let d,g=!1,v=null,b=null;n&&(d=l&&f.route.id?l[f.route.id]:void 0,v=f.route.errorElement||ba,s&&(a<0&&h===0?(yi("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=c,m.createElement(wa,{match:f,routeContext:{outlet:c,matches:x,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?m.createElement(xa,{location:n.location,revalidation:n.revalidation,component:v,error:d,children:y(),routeContext:{outlet:null,matches:x,isDataRoute:!0},onError:u}):y()},null)}function Er(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ea(e){let t=m.useContext(at);return Y(t,Er(e)),t}function Ca(e){let t=m.useContext(fn);return Y(t,Er(e)),t}function Ra(e){let t=m.useContext(Ae);return Y(t,Er(e)),t}function Cr(e){let t=Ra(e),n=t.matches[t.matches.length-1];return Y(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function $a(){return Cr("useRouteId")}function Sa(){let e=m.useContext(yr),t=Ca("useRouteError"),n=Cr("useRouteError");return e!==void 0?e:t.errors?.[n]}function ka(){let{router:e}=Ea("useNavigate"),t=Cr("useNavigate"),n=m.useRef(!1);return bi(()=>{n.current=!0}),m.useCallback(async(o,i={})=>{Ee(n.current,vi),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var lo={};function yi(e,t,n){!t&&!lo[e]&&(lo[e]=!0,Ee(!1,n))}m.memo(Ta);function Ta({routes:e,future:t,state:n,unstable_onError:r}){return wi(e,void 0,n,r,t)}function Ei(e){Y(!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 Oa({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:i=!1,unstable_useTransitions:l}){Y(!ut(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),a=m.useMemo(()=>({basename:s,navigator:o,static:i,unstable_useTransitions:l,future:{}}),[s,o,i,l]);typeof n=="string"&&(n=st(n));let{pathname:u="/",search:c="",hash:f="",state:h=null,key:d="default"}=n,g=m.useMemo(()=>{let v=Me(u,s);return v==null?null:{location:{pathname:v,search:c,hash:f,state:h,key:d},navigationType:r}},[s,u,c,f,h,d,r]);return Ee(g!=null,`<Router basename="${s}"> is not able to match the URL "${u}${c}${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(Lt.Provider,{children:t,value:g}))}function Pa({children:e,location:t}){return ga(Qn(e),t)}function Qn(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,Qn(r.props.children,i));return}Y(r.type===Ei,`[${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>`),Y(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={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&&(l.children=Qn(r.props.children,i)),n.push(l)}),n}var Xt="get",Jt="application/x-www-form-urlencoded";function mn(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function La(e){return mn(e)&&e.tagName.toLowerCase()==="button"}function Ma(e){return mn(e)&&e.tagName.toLowerCase()==="form"}function Aa(e){return mn(e)&&e.tagName.toLowerCase()==="input"}function Fa(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ia(e,t){return e.button===0&&(!t||t==="_self")&&!Fa(e)}var Ht=null;function Na(){if(Ht===null)try{new FormData(document.createElement("form"),0),Ht=!1}catch{Ht=!0}return Ht}var Da=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ln(e){return e!=null&&!Da.has(e)?(Ee(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Jt}"`),null):e}function ja(e,t){let n,r,o,i,l;if(Ma(e)){let s=e.getAttribute("action");r=s?Me(s,t):null,n=e.getAttribute("method")||Xt,o=Ln(e.getAttribute("enctype"))||Jt,i=new FormData(e)}else if(La(e)||Aa(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let a=e.getAttribute("formaction")||s.getAttribute("action");if(r=a?Me(a,t):null,n=e.getAttribute("formmethod")||s.getAttribute("method")||Xt,o=Ln(e.getAttribute("formenctype"))||Ln(s.getAttribute("enctype"))||Jt,i=new FormData(s,e),!Na()){let{name:u,type:c,value:f}=e;if(c==="image"){let h=u?`${u}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else u&&i.append(u,f)}}else{if(mn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Xt,r=null,o=Jt,l=e}return i&&o==="text/plain"&&(l=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Rr(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function _a(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&&Me(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${n}`,r}async function Ba(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 Ha(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 Va(e,t,n){let r=await Promise.all(e.map(async o=>{let i=t.routes[o.route.id];if(i){let l=await Ba(i,n);return l.links?l.links():[]}return[]}));return qa(r.flat(1).filter(Ha).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function so(e,t,n,r,o,i){let l=(a,u)=>n[u]?a.route.id!==n[u].route.id:!0,s=(a,u)=>n[u].pathname!==a.pathname||n[u].route.path?.endsWith("*")&&n[u].params["*"]!==a.params["*"];return i==="assets"?t.filter((a,u)=>l(a,u)||s(a,u)):i==="data"?t.filter((a,u)=>{let c=r.routes[a.route.id];if(!c||!c.hasLoader)return!1;if(l(a,u)||s(a,u))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 za(e,t,{includeHydrateFallback:n}={}){return Wa(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 Wa(e){return[...new Set(e)]}function Ua(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function qa(e,t){let n=new Set;return new Set(t),e.reduce((r,o)=>{let i=JSON.stringify(Ua(o));return n.has(i)||(n.add(i),r.push({key:i,link:o})),r},[])}function Ci(){let e=m.useContext(at);return Rr(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Ga(){let e=m.useContext(fn);return Rr(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var $r=m.createContext(void 0);$r.displayName="FrameworkContext";function Ri(){let e=m.useContext($r);return Rr(e,"You must render this element inside a <HydratedRouter> element"),e}function Ka(e,t){let n=m.useContext($r),[r,o]=m.useState(!1),[i,l]=m.useState(!1),{onFocus:s,onBlur:a,onMouseEnter:u,onMouseLeave:c,onTouchStart:f}=t,h=m.useRef(null);m.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let v=x=>{x.forEach(y=>{l(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(()=>{l(!0)},100);return()=>{clearTimeout(v)}}},[r]);let d=()=>{o(!0)},g=()=>{o(!1),l(!1)};return n?e!=="intent"?[i,h,{}]:[i,h,{onFocus:ht(s,d),onBlur:ht(a,g),onMouseEnter:ht(u,d),onMouseLeave:ht(c,g),onTouchStart:ht(f,d)}]:[!1,h,{}]}function ht(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ya({page:e,...t}){let{router:n}=Ci(),r=m.useMemo(()=>ui(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?m.createElement(Xa,{page:e,matches:r,...t}):null}function Za(e){let{manifest:t,routeModules:n}=Ri(),[r,o]=m.useState([]);return m.useEffect(()=>{let i=!1;return Va(e,t,n).then(l=>{i||o(l)}),()=>{i=!0}},[e,t,n]),r}function Xa({page:e,matches:t,...n}){let r=Fe(),{manifest:o,routeModules:i}=Ri(),{basename:l}=Ci(),{loaderData:s,matches:a}=Ga(),u=m.useMemo(()=>so(e,t,a,o,r,"data"),[e,t,a,o,r]),c=m.useMemo(()=>so(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||(!u.some(w=>w.route.id===x.route.id)&&x.route.id in s&&i[x.route.id]?.shouldRevalidate||y.hasClientLoader?v=!0:g.add(x.route.id))}),g.size===0)return[];let b=_a(e,l,"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]},[l,s,r,o,u,t,e,i]),h=m.useMemo(()=>za(c,o),[c,o]),d=Za(c);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 Ja(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var $i=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{$i&&(window.__reactRouterVersion="7.10.1")}catch{}function Qa({basename:e,children:t,unstable_useTransitions:n,window:r}){let o=m.useRef();o.current==null&&(o.current=_s({window:r,v5Compat:!0}));let i=o.current,[l,s]=m.useState({action:i.action,location:i.location}),a=m.useCallback(u=>{n===!1?s(u):m.startTransition(()=>s(u))},[n]);return m.useLayoutEffect(()=>i.listen(a),[i,a]),m.createElement(Oa,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:i,unstable_useTransitions:n===!0})}var Si=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ki=m.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:i,replace:l,state:s,target:a,to:u,preventScrollReset:c,viewTransition:f,...h},d){let{basename:g,unstable_useTransitions:v}=m.useContext(Re),b=typeof u=="string"&&Si.test(u),x,y=!1;if(typeof u=="string"&&b&&(x=u,$i))try{let k=new URL(window.location.href),j=u.startsWith("//")?new URL(k.protocol+u):new URL(u),V=Me(j.pathname,g);j.origin===k.origin&&V!=null?u=V+j.search+j.hash:y=!0}catch{Ee(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let w=ma(u,{relative:o}),[$,R,T]=Ka(r,h),O=ru(u,{replace:l,state:s,target:a,preventScrollReset:c,relative:o,viewTransition:f,unstable_useTransitions:v});function S(k){t&&t(k),k.defaultPrevented||O(k)}let M=m.createElement("a",{...h,...T,href:x||w,onClick:y||i?t:S,ref:Ja(d,R),target:a,"data-discover":!b&&n==="render"?"true":void 0});return $&&!b?m.createElement(m.Fragment,null,M,m.createElement(Ya,{page:w})):M});ki.displayName="Link";var eu=m.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:i,to:l,viewTransition:s,children:a,...u},c){let f=Mt(l,{relative:u.relative}),h=Fe(),d=m.useContext(fn),{navigator:g,basename:v}=m.useContext(Re),b=d!=null&&au(f)&&s===!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=Me(w,v)||w);const $=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let R=y===x||!o&&y.startsWith(x)&&y.charAt($)==="/",T=w!=null&&(w===x||!o&&w.startsWith(x)&&w.charAt(x.length)==="/"),O={isActive:R,isPending:T,isTransitioning:b},S=R?t:void 0,M;typeof r=="function"?M=r(O):M=[r,R?"active":null,T?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let k=typeof i=="function"?i(O):i;return m.createElement(ki,{...u,"aria-current":S,className:M,ref:c,style:k,to:l,viewTransition:s},typeof a=="function"?a(O):a)});eu.displayName="NavLink";var tu=m.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:i,method:l=Xt,action:s,onSubmit:a,relative:u,preventScrollReset:c,viewTransition:f,...h},d)=>{let{unstable_useTransitions:g}=m.useContext(Re),v=lu(),b=su(s,{relative:u}),x=l.toLowerCase()==="get"?"get":"post",y=typeof s=="string"&&Si.test(s),w=$=>{if(a&&a($),$.defaultPrevented)return;$.preventDefault();let R=$.nativeEvent.submitter,T=R?.getAttribute("formmethod")||l,O=()=>v(R||$.currentTarget,{fetcherKey:t,method:T,navigate:n,replace:o,state:i,relative:u,preventScrollReset:c,viewTransition:f});g&&n!==!1?m.startTransition(()=>O()):O()};return m.createElement("form",{ref:d,method:x,action:b,onSubmit:r?a:w,...h,"data-discover":!y&&e==="render"?"true":void 0})});tu.displayName="Form";function nu(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ti(e){let t=m.useContext(at);return Y(t,nu(e)),t}function ru(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:i,viewTransition:l,unstable_useTransitions:s}={}){let a=xi(),u=Fe(),c=Mt(e,{relative:i});return m.useCallback(f=>{if(Ia(f,t)){f.preventDefault();let h=n!==void 0?n:Rt(u)===Rt(c),d=()=>a(e,{replace:h,state:r,preventScrollReset:o,relative:i,viewTransition:l});s?m.startTransition(()=>d()):d()}},[u,a,c,n,r,t,e,o,i,l,s])}var ou=0,iu=()=>`__${String(++ou)}__`;function lu(){let{router:e}=Ti("useSubmit"),{basename:t}=m.useContext(Re),n=$a(),r=e.fetch,o=e.navigate;return m.useCallback(async(i,l={})=>{let{action:s,method:a,encType:u,formData:c,body:f}=ja(i,t);if(l.navigate===!1){let h=l.fetcherKey||iu();await r(h,n,l.action||s,{preventScrollReset:l.preventScrollReset,formData:c,body:f,formMethod:l.method||a,formEncType:l.encType||u,flushSync:l.flushSync})}else await o(l.action||s,{preventScrollReset:l.preventScrollReset,formData:c,body:f,formMethod:l.method||a,formEncType:l.encType||u,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,o,t,n])}function su(e,{relative:t}={}){let{basename:n}=m.useContext(Re),r=m.useContext(Ae);Y(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),i={...Mt(e||".",{relative:t})},l=Fe();if(e==null){i.search=l.search;let s=new URLSearchParams(i.search),a=s.getAll("index");if(a.some(c=>c==="")){s.delete("index"),a.filter(f=>f).forEach(f=>s.append("index",f));let c=s.toString();i.search=c?`?${c}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:Le([n,i.pathname])),Rt(i)}function au(e,{relative:t}={}){let n=m.useContext(gi);Y(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ti("useViewTransitionState"),o=Mt(e,{relative:t});if(!n.isTransitioning)return!1;let i=Me(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=Me(n.nextLocation.pathname,r)||n.nextLocation.pathname;return $t(o.pathname,l)!=null||$t(o.pathname,i)!=null}const uu=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"})),cu=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"})),du=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)"}))),Oi=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"})),Pi=p.createContext(null),ao=e=>{let t;const n=new Set,r=(u,c)=>{const f=typeof u=="function"?u(t):u;if(!Object.is(f,t)){const h=t;t=c??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(d=>d(t,h))}},o=()=>t,s={setState:r,getState:o,getInitialState:()=>a,subscribe:u=>(n.add(u),()=>n.delete(u))},a=t=e(r,o,s);return s},fu=(e=>e?ao(e):ao),mu=e=>e;function pu(e,t=mu){const n=p.useSyncExternalStore(e.subscribe,p.useCallback(()=>t(e.getState()),[e,t]),p.useCallback(()=>t(e.getInitialState()),[e,t]));return p.useDebugValue(n),n}const uo=e=>{const t=fu(e),n=r=>pu(t,r);return Object.assign(n,t),n},hu=(e=>e?uo(e):uo),Li=hu(e=>({visible:!1,hide:()=>e({visible:!1}),show:()=>e({visible:!0}),toggle:()=>e(t=>({visible:!t.visible}))}));function Mi(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=Mi(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function gu(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Mi(e))&&(r&&(r+=" "),r+=t);return r}const vu=(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},bu=(e,t)=>({classGroupId:e,validator:t}),Ai=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),rn="-",co=[],xu="arbitrary..",wu=e=>{const t=Eu(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return yu(l);const s=l.split(rn),a=s[0]===""&&s.length>1?1:0;return Fi(s,a,t)},getConflictingClassGroupIds:(l,s)=>{if(s){const a=r[l],u=n[l];return a?u?vu(u,a):a:u||co}return n[l]||co}}},Fi=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const u=Fi(e,t+1,i);if(u)return u}const l=n.validators;if(l===null)return;const s=t===0?e.join(rn):e.slice(t).join(rn),a=l.length;for(let u=0;u<a;u++){const c=l[u];if(c.validator(s))return c.classGroupId}},yu=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?xu+r:void 0})(),Eu=e=>{const{theme:t,classGroups:n}=e;return Cu(n,t)},Cu=(e,t)=>{const n=Ai();for(const r in e){const o=e[r];Sr(o,n,r,t)}return n},Sr=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const l=e[i];Ru(l,t,n,r)}},Ru=(e,t,n,r)=>{if(typeof e=="string"){$u(e,t,n);return}if(typeof e=="function"){Su(e,t,n,r);return}ku(e,t,n,r)},$u=(e,t,n)=>{const r=e===""?t:Ii(t,e);r.classGroupId=n},Su=(e,t,n,r)=>{if(Tu(e)){Sr(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(bu(n,e))},ku=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let l=0;l<i;l++){const[s,a]=o[l];Sr(a,Ii(t,s),n,r)}},Ii=(e,t)=>{let n=e;const r=t.split(rn),o=r.length;for(let i=0;i<o;i++){const l=r[i];let s=n.nextPart.get(l);s||(s=Ai(),n.nextPart.set(l,s)),n=s}return n},Tu=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ou=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,l)=>{n[i]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let l=n[i];if(l!==void 0)return l;if((l=r[i])!==void 0)return o(i,l),l},set(i,l){i in n?n[i]=l:o(i,l)}}},er="!",fo=":",Pu=[],mo=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Lu=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let l=0,s=0,a=0,u;const c=o.length;for(let v=0;v<c;v++){const b=o[v];if(l===0&&s===0){if(b===fo){i.push(o.slice(a,v)),a=v+1;continue}if(b==="/"){u=v;continue}}b==="["?l++:b==="]"?l--:b==="("?s++:b===")"&&s--}const f=i.length===0?o:o.slice(a);let h=f,d=!1;f.endsWith(er)?(h=f.slice(0,-1),d=!0):f.startsWith(er)&&(h=f.slice(1),d=!0);const g=u&&u>a?u-a:void 0;return mo(i,d,h,g)};if(t){const o=t+fo,i=r;r=l=>l.startsWith(o)?i(l.slice(o.length)):mo(Pu,!1,l,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Mu=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 l=n[i],s=l[0]==="[",a=t.has(l);s||a?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(l)):o.push(l)}return o.length>0&&(o.sort(),r.push(...o)),r}},Au=e=>({cache:Ou(e.cacheSize),parseClassName:Lu(e),sortModifiers:Mu(e),...wu(e)}),Fu=/\s+/,Iu=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,l=[],s=e.trim().split(Fu);let a="";for(let u=s.length-1;u>=0;u-=1){const c=s[u],{isExternal:f,modifiers:h,hasImportantModifier:d,baseClassName:g,maybePostfixModifierPosition:v}=n(c);if(f){a=c+(a.length>0?" "+a:a);continue}let b=!!v,x=r(b?g.substring(0,v):g);if(!x){if(!b){a=c+(a.length>0?" "+a:a);continue}if(x=r(g),!x){a=c+(a.length>0?" "+a:a);continue}b=!1}const y=h.length===0?"":h.length===1?h[0]:i(h).join(":"),w=d?y+er:y,$=w+x;if(l.indexOf($)>-1)continue;l.push($);const R=o(x,b);for(let T=0;T<R.length;++T){const O=R[T];l.push(w+O)}a=c+(a.length>0?" "+a:a)}return a},Nu=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Ni(n))&&(o&&(o+=" "),o+=r);return o},Ni=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ni(e[r]))&&(n&&(n+=" "),n+=t);return n},Du=(e,...t)=>{let n,r,o,i;const l=a=>{const u=t.reduce((c,f)=>f(c),e());return n=Au(u),r=n.cache.get,o=n.cache.set,i=s,s(a)},s=a=>{const u=r(a);if(u)return u;const c=Iu(a,n);return o(a,c),c};return i=l,(...a)=>i(Nu(...a))},ju=[],Q=e=>{const t=n=>n[e]||ju;return t.isThemeGetter=!0,t},Di=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ji=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_u=/^\d+\/\d+$/,Bu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Hu=/\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$/,Vu=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Wu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,et=e=>_u.test(e),W=e=>!!e&&!Number.isNaN(Number(e)),De=e=>!!e&&Number.isInteger(Number(e)),Mn=e=>e.endsWith("%")&&W(e.slice(0,-1)),Oe=e=>Bu.test(e),Uu=()=>!0,qu=e=>Hu.test(e)&&!Vu.test(e),_i=()=>!1,Gu=e=>zu.test(e),Ku=e=>Wu.test(e),Yu=e=>!P(e)&&!L(e),Zu=e=>ct(e,Vi,_i),P=e=>Di.test(e),Ue=e=>ct(e,zi,qu),An=e=>ct(e,tc,W),po=e=>ct(e,Bi,_i),Xu=e=>ct(e,Hi,Ku),Vt=e=>ct(e,Wi,Gu),L=e=>ji.test(e),gt=e=>dt(e,zi),Ju=e=>dt(e,nc),ho=e=>dt(e,Bi),Qu=e=>dt(e,Vi),ec=e=>dt(e,Hi),zt=e=>dt(e,Wi,!0),ct=(e,t,n)=>{const r=Di.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},dt=(e,t,n=!1)=>{const r=ji.exec(e);return r?r[1]?t(r[1]):n:!1},Bi=e=>e==="position"||e==="percentage",Hi=e=>e==="image"||e==="url",Vi=e=>e==="length"||e==="size"||e==="bg-size",zi=e=>e==="length",tc=e=>e==="number",nc=e=>e==="family-name",Wi=e=>e==="shadow",rc=()=>{const e=Q("color"),t=Q("font"),n=Q("text"),r=Q("font-weight"),o=Q("tracking"),i=Q("leading"),l=Q("breakpoint"),s=Q("container"),a=Q("spacing"),u=Q("radius"),c=Q("shadow"),f=Q("inset-shadow"),h=Q("text-shadow"),d=Q("drop-shadow"),g=Q("blur"),v=Q("perspective"),b=Q("aspect"),x=Q("ease"),y=Q("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...$(),L,P],T=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],S=()=>[L,P,a],M=()=>[et,"full","auto",...S()],k=()=>[De,"none","subgrid",L,P],j=()=>["auto",{span:["full",De,L,P]},De,L,P],V=()=>[De,"auto",L,P],z=()=>["auto","min","max","fr",L,P],_=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],N=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...S()],A=()=>[et,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],C=()=>[e,L,P],F=()=>[...$(),ho,po,{position:[L,P]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ee=()=>["auto","cover","contain",Qu,Zu,{size:[L,P]}],D=()=>[Mn,gt,Ue],I=()=>["","none","full",u,L,P],te=()=>["",W,gt,Ue],se=()=>["solid","dashed","dotted","double"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>[W,Mn,ho,po],ye=()=>["","none",g,L,P],he=()=>["none",W,L,P],_t=()=>["none",W,L,P],On=()=>[W,L,P],Bt=()=>[et,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Oe],breakpoint:[Oe],color:[Uu],container:[Oe],"drop-shadow":[Oe],ease:["in","out","in-out"],font:[Yu],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Oe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Oe],shadow:[Oe],spacing:["px",W],text:[Oe],"text-shadow":[Oe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",et,P,L,b]}],container:["container"],columns:[{columns:[W,P,L,s]}],"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:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[De,"auto",L,P]}],basis:[{basis:[et,"full","auto",s,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[W,et,"auto","initial","none",P]}],grow:[{grow:["",W,L,P]}],shrink:[{shrink:["",W,L,P]}],order:[{order:[De,"first","last","none",L,P]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[..._(),"normal"]}],"justify-items":[{"justify-items":[...N(),"normal"]}],"justify-self":[{"justify-self":["auto",...N()]}],"align-content":[{content:["normal",..._()]}],"align-items":[{items:[...N(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...N(),{baseline:["","last"]}]}],"place-content":[{"place-content":_()}],"place-items":[{"place-items":[...N(),"baseline"]}],"place-self":[{"place-self":["auto",...N()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:A()}],w:[{w:[s,"screen",...A()]}],"min-w":[{"min-w":[s,"screen","none",...A()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[l]},...A()]}],h:[{h:["screen","lh",...A()]}],"min-h":[{"min-h":["screen","lh","none",...A()]}],"max-h":[{"max-h":["screen","lh",...A()]}],"font-size":[{text:["base",n,gt,Ue]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,L,An]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Mn,P]}],"font-family":[{font:[Ju,P,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,L,P]}],"line-clamp":[{"line-clamp":[W,"none",L,An]}],leading:[{leading:[i,...S()]}],"list-image":[{"list-image":["none",L,P]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",L,P]}],"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:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[W,"from-font","auto",L,Ue]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[W,"auto",L,P]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",L,P]}],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",L,P]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},De,L,P],radial:["",L,P],conic:[De,L,P]},ec,Xu]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:D()}],"gradient-via-pos":[{via:D()}],"gradient-to-pos":[{to:D()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:te()}],"border-w-x":[{"border-x":te()}],"border-w-y":[{"border-y":te()}],"border-w-s":[{"border-s":te()}],"border-w-e":[{"border-e":te()}],"border-w-t":[{"border-t":te()}],"border-w-r":[{"border-r":te()}],"border-w-b":[{"border-b":te()}],"border-w-l":[{"border-l":te()}],"divide-x":[{"divide-x":te()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":te()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"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:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[W,L,P]}],"outline-w":[{outline:["",W,gt,Ue]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",c,zt,Vt]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",f,zt,Vt]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[W,Ue]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":te()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",h,zt,Vt]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[W,L,P]}],"mix-blend":[{"mix-blend":[...B(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":B()}],"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":[W]}],"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":[L,P]}],"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":$()}],"mask-image-conic-pos":[{"mask-conic":[W]}],"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:F()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",L,P]}],filter:[{filter:["","none",L,P]}],blur:[{blur:ye()}],brightness:[{brightness:[W,L,P]}],contrast:[{contrast:[W,L,P]}],"drop-shadow":[{"drop-shadow":["","none",d,zt,Vt]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",W,L,P]}],"hue-rotate":[{"hue-rotate":[W,L,P]}],invert:[{invert:["",W,L,P]}],saturate:[{saturate:[W,L,P]}],sepia:[{sepia:["",W,L,P]}],"backdrop-filter":[{"backdrop-filter":["","none",L,P]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[W,L,P]}],"backdrop-contrast":[{"backdrop-contrast":[W,L,P]}],"backdrop-grayscale":[{"backdrop-grayscale":["",W,L,P]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[W,L,P]}],"backdrop-invert":[{"backdrop-invert":["",W,L,P]}],"backdrop-opacity":[{"backdrop-opacity":[W,L,P]}],"backdrop-saturate":[{"backdrop-saturate":[W,L,P]}],"backdrop-sepia":[{"backdrop-sepia":["",W,L,P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",L,P]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[W,"initial",L,P]}],ease:[{ease:["linear","initial",x,L,P]}],delay:[{delay:[W,L,P]}],animate:[{animate:["none",y,L,P]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,L,P]}],"perspective-origin":[{"perspective-origin":R()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:_t()}],"scale-x":[{"scale-x":_t()}],"scale-y":[{"scale-y":_t()}],"scale-z":[{"scale-z":_t()}],"scale-3d":["scale-3d"],skew:[{skew:On()}],"skew-x":[{"skew-x":On()}],"skew-y":[{"skew-y":On()}],transform:[{transform:[L,P,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Bt()}],"translate-x":[{"translate-x":Bt()}],"translate-y":[{"translate-y":Bt()}],"translate-z":[{"translate-z":Bt()}],"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",L,P]}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",L,P]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[W,gt,Ue,An]}],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"]}},oc=Du(rc);function re(...e){return oc(gu(e))}function ue({align:e,children:t,className:n,direction:r,gap:o=0,grow:i,justify:l,shrink:s,style:a,wrap:u,...c}){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":l==="around","justify-between":l==="between","justify-center":l==="center","justify-end":l==="end","justify-start":l==="start","justify-stretch":l==="stretch","shrink-0":s===0,"shrink-1":s===1,"flex-wrap":u},n),style:a,...c,children:t})}const ic=p.createContext(null),Fn={didCatch:!1,error:null};let lc=class extends p.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Fn}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),l=0;l<o;l++)i[l]=arguments[l];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:i,reason:"imperative-api"}),this.setState(Fn)}}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&&sc(t.resetKeys,o)){var i,l;(i=(l=this.props).onReset)===null||i===void 0||i.call(l,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(Fn)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:o}=this.props,{didCatch:i,error:l}=this.state;let s=t;if(i){const a={error:l,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")s=n(a);else if(r)s=p.createElement(r,a);else if(o!==void 0)s=o;else throw l}return p.createElement(ic.Provider,{value:{didCatch:i,error:l,resetErrorBoundary:this.resetErrorBoundary}},s)}};function sc(){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 kr({children:e,className:t,html:n=!1,inline:r=!1,intent:o="none",minimal:i,...l}){let s=Fs;switch(o){case"none":case"primary":{s=Ns;break}case"success":{s=Os;break}}return E.jsx("div",{className:`${r?"w-fit":"w-full"} rounded-md p-2 px-3 ${ac(o,!!i)} ${t}`,role:"alert",...l,children:E.jsxs("div",{className:"flex flex-row gap-2",children:[E.jsx(s,{className:"w-6 h-6 shrink-0"}),n?E.jsx("div",{dangerouslySetInnerHTML:{__html:e}}):E.jsx("div",{children:e})]})})}function ac(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 Ui=typeof document<"u"?p.useLayoutEffect:()=>{};var In;const uc=(In=p.useInsertionEffect)!==null&&In!==void 0?In:Ui;function cc(e){const t=p.useRef(null);return uc(()=>{t.current=e},[e]),p.useCallback((...n)=>{const r=t.current;return r?.(...n)},[])}const We=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},qe=e=>e&&"window"in e&&e.window===e?e:We(e).defaultView||window;function dc(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function fc(e){return dc(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let mc=!1;function Tr(){return mc}function qi(e,t){if(!Tr())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:fc(n)?n=n.host:n=n.parentNode}return!1}const tr=(e=document)=>{var t;if(!Tr())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 Gi(e){return Tr()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function pn(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 Or(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 Ie(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const Pr=Ie(function(){return Or(/^Mac/i)}),pc=Ie(function(){return Or(/^iPhone/i)}),hc=Ie(function(){return Or(/^iPad/i)||Pr()&&navigator.maxTouchPoints>1}),gc=Ie(function(){return pc()||hc()});Ie(function(){return Pr()||gc()});Ie(function(){return pn(/AppleWebKit/i)&&!vc()});const vc=Ie(function(){return pn(/Chrome/i)}),bc=Ie(function(){return pn(/Android/i)});Ie(function(){return pn(/Firefox/i)});function Ki(){let e=p.useRef(new Map),t=p.useCallback((o,i,l,s)=>{let a=s?.once?(...u)=>{e.current.delete(l),l(...u)}:l;e.current.set(l,{type:i,eventTarget:o,fn:a,options:s}),o.addEventListener(i,a,s)},[]),n=p.useCallback((o,i,l,s)=>{var a;let u=((a=e.current.get(l))===null||a===void 0?void 0:a.fn)||l;o.removeEventListener(i,u,s),e.current.delete(l)},[]),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 xc(e){return e.pointerType===""&&e.isTrusted?!0:bc()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Yi(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function wc(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function Zi(e){let t=p.useRef({isFocused:!1,observer:null});Ui(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=cc(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=l=>{if(t.current.isFocused=!1,o.disabled){let s=Yi(l);n(s)}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 l;(l=t.current.observer)===null||l===void 0||l.disconnect();let s=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let yc=!1,At=null,nr=new Set,Et=new Map,Ye=!1,rr=!1;const Ec={Tab:!0,Escape:!0};function Lr(e,t){for(let n of nr)n(e,t)}function Cc(e){return!(e.metaKey||!Pr()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function on(e){Ye=!0,Cc(e)&&(At="keyboard",Lr("keyboard",e))}function be(e){At="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Ye=!0,Lr("pointer",e))}function Xi(e){xc(e)&&(Ye=!0,At="virtual")}function Ji(e){e.target===window||e.target===document||yc||!e.isTrusted||(!Ye&&!rr&&(At="virtual",Lr("virtual",e)),Ye=!1,rr=!1)}function Qi(){Ye=!1,rr=!0}function or(e){if(typeof window>"u"||typeof document>"u"||Et.get(qe(e)))return;const t=qe(e),n=We(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Ye=!0,r.apply(this,arguments)},n.addEventListener("keydown",on,!0),n.addEventListener("keyup",on,!0),n.addEventListener("click",Xi,!0),t.addEventListener("focus",Ji,!0),t.addEventListener("blur",Qi,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",be,!0),n.addEventListener("pointermove",be,!0),n.addEventListener("pointerup",be,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",be,!0),n.addEventListener("mousemove",be,!0),n.addEventListener("mouseup",be,!0)),t.addEventListener("beforeunload",()=>{el(e)},{once:!0}),Et.set(t,{focus:r})}const el=(e,t)=>{const n=qe(e),r=We(e);t&&r.removeEventListener("DOMContentLoaded",t),Et.has(n)&&(n.HTMLElement.prototype.focus=Et.get(n).focus,r.removeEventListener("keydown",on,!0),r.removeEventListener("keyup",on,!0),r.removeEventListener("click",Xi,!0),n.removeEventListener("focus",Ji,!0),n.removeEventListener("blur",Qi,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",be,!0),r.removeEventListener("pointermove",be,!0),r.removeEventListener("pointerup",be,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",be,!0),r.removeEventListener("mousemove",be,!0),r.removeEventListener("mouseup",be,!0)),Et.delete(n))};function Rc(e){const t=We(e);let n;return t.readyState!=="loading"?or(e):(n=()=>{or(e)},t.addEventListener("DOMContentLoaded",n)),()=>el(e,n)}typeof document<"u"&&Rc();function tl(){return At!=="pointer"}const $c=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Sc(e,t,n){let r=We(n?.target);const o=typeof window<"u"?qe(n?.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?qe(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,l=typeof window<"u"?qe(n?.target).HTMLElement:HTMLElement,s=typeof window<"u"?qe(n?.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof o&&!$c.has(r.activeElement.type)||r.activeElement instanceof i||r.activeElement instanceof l&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof s&&!Ec[n.key])}function kc(e,t,n){or(),p.useEffect(()=>{let r=(o,i)=>{Sc(!!n?.isTextInput,o,i)&&e(tl())};return nr.add(r),()=>{nr.delete(r)}},t)}function Tc(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]),l=Zi(i),s=p.useCallback(a=>{const u=We(a.target),c=u?tr(u):tr();a.target===a.currentTarget&&c===Gi(a.nativeEvent)&&(n&&n(a),o&&o(!0),l(a))},[o,n,l]);return{focusProps:{onFocus:!t&&(n||o||r)?s:void 0,onBlur:!t&&(r||o)?i:void 0}}}function Oc(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=p.useRef({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:s}=Ki(),a=p.useCallback(f=>{f.currentTarget.contains(f.target)&&i.current.isFocusWithin&&!f.currentTarget.contains(f.relatedTarget)&&(i.current.isFocusWithin=!1,s(),n&&n(f),o&&o(!1))},[n,o,i,s]),u=Zi(a),c=p.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const h=We(f.target),d=tr(h);if(!i.current.isFocusWithin&&d===Gi(f.nativeEvent)){r&&r(f),o&&o(!0),i.current.isFocusWithin=!0,u(f);let g=f.currentTarget;l(h,"focus",v=>{if(i.current.isFocusWithin&&!qi(g,v.target)){let b=new h.defaultView.FocusEvent("blur",{relatedTarget:v.target});wc(b,g);let x=Yi(b);a(x)}},{capture:!0})}},[r,o,u,l,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:a}}}let ln=!1,Wt=0;function ir(){ln=!0,setTimeout(()=>{ln=!1},50)}function go(e){e.pointerType==="touch"&&ir()}function Pc(){if(!(typeof document>"u"))return Wt===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",go):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",ir)),Wt++,()=>{Wt--,!(Wt>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",go):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",ir))}}function Mr(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,l]=p.useState(!1),s=p.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;p.useEffect(Pc,[]);let{addGlobalListener:a,removeAllGlobalListeners:u}=Ki(),{hoverProps:c,triggerHoverEnd:f}=p.useMemo(()=>{let h=(v,b)=>{if(s.pointerType=b,o||b==="touch"||s.isHovered||!v.currentTarget.contains(v.target))return;s.isHovered=!0;let x=v.currentTarget;s.target=x,a(We(v.target),"pointerover",y=>{s.isHovered&&s.target&&!qi(s.target,y.target)&&d(y,y.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:x,pointerType:b}),n&&n(!0),l(!0)},d=(v,b)=>{let x=s.target;s.pointerType="",s.target=null,!(b==="touch"||!s.isHovered||!x)&&(s.isHovered=!1,u(),r&&r({type:"hoverend",target:x,pointerType:b}),n&&n(!1),l(!1))},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=v=>{ln&&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=()=>{s.ignoreEmulatedMouseEvents=!0},g.onMouseEnter=v=>{!s.ignoreEmulatedMouseEvents&&!ln&&h(v,"mouse"),s.ignoreEmulatedMouseEvents=!1},g.onMouseLeave=v=>{!o&&v.currentTarget.contains(v.target)&&d(v,"mouse")}),{hoverProps:g,triggerHoverEnd:d}},[t,n,r,o,s,a,u]);return p.useEffect(()=>{o&&f({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:i}}function Ar(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=p.useRef({isFocused:!1,isFocusVisible:t||tl()}),[i,l]=p.useState(!1),[s,a]=p.useState(()=>o.current.isFocused&&o.current.isFocusVisible),u=p.useCallback(()=>a(o.current.isFocused&&o.current.isFocusVisible),[]),c=p.useCallback(d=>{o.current.isFocused=d,l(d),u()},[u]);kc(d=>{o.current.isFocusVisible=d,u()},[],{isTextInput:n});let{focusProps:f}=Tc({isDisabled:r,onFocusChange:c}),{focusWithinProps:h}=Oc({isDisabled:!r,onFocusWithinChange:c});return{isFocused:i,isFocusVisible:s,focusProps:r?h:f}}var Lc=Object.defineProperty,Mc=(e,t,n)=>t in e?Lc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nn=(e,t,n)=>(Mc(e,typeof t!="symbol"?t+"":t,n),n);let Ac=class{constructor(){Nn(this,"current",this.detect()),Nn(this,"handoffState","pending"),Nn(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"}},Se=new Ac;function Ft(e){var t;return Se.isServer?null:e==null?document:(t=e?.ownerDocument)!=null?t:document}function sn(e){var t,n;return Se.isServer?null:e==null?document:(n=(t=e?.getRootNode)==null?void 0:t.call(e))!=null?n:document}function nl(e){var t,n;return(n=(t=sn(e))==null?void 0:t.activeElement)!=null?n:null}function Fc(e){return nl(e)===e}function rl(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function pe(){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 rl(()=>{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=pe();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 Je(){let[e]=p.useState(pe);return p.useEffect(()=>()=>e.dispose(),[e]),e}let J=(e,t)=>{Se.isServer?p.useEffect(e,t):p.useLayoutEffect(e,t)};function Qe(e){let t=p.useRef(e);return J(()=>{t.current=e},[e]),t}let U=function(e){let t=Qe(e);return p.useCallback((...n)=>t.current(...n),[t])};function Ic(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 Nc(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function Fr({disabled:e=!1}={}){let t=p.useRef(null),[n,r]=p.useState(!1),o=Je(),i=U(()=>{t.current=null,r(!1),o.dispose()}),l=U(s=>{if(o.dispose(),t.current===null){t.current=s.currentTarget,r(!0);{let a=Ft(s.currentTarget);o.addEventListener(a,"pointerup",i,!1),o.addEventListener(a,"pointermove",u=>{if(t.current){let c=Ic(u);r(Nc(c,t.current.getBoundingClientRect()))}},!1),o.addEventListener(a,"pointercancel",i,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:l,onPointerUp:i,onClick:i}}}function xe(e){return p.useMemo(()=>e,Object.values(e))}let Dc=p.createContext(void 0);function hn(){return p.useContext(Dc)}function lr(...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 ot=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(ot||{}),_e=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(_e||{});function oe(){let e=_c();return p.useCallback(t=>jc({mergeRefs:e,...t}),[e])}function jc({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:l,mergeRefs:s}){s=s??Bc;let a=ol(t,e);if(i)return Ut(a,n,r,l,s);let u=o??0;if(u&2){let{static:c=!1,...f}=a;if(c)return Ut(f,n,r,l,s)}if(u&1){let{unmount:c=!0,...f}=a;return ce(c?0:1,{0(){return null},1(){return Ut({...f,hidden:!0,style:{display:"none"}},n,r,l,s)}})}return Ut(a,n,r,l,s)}function Ut(e,t={},n,r,o){let{as:i=n,children:l,refName:s="ref",...a}=Dn(e,["unmount","static"]),u=e.ref!==void 0?{[s]:e.ref}:{},c=typeof l=="function"?l(t):l;"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(nt(i)&&(Object.keys(je(a)).length>0||Object.keys(je(f)).length>0))if(!p.isValidElement(c)||Array.isArray(c)&&c.length>1||Vc(c)){if(Object.keys(je(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(je(a)).concat(Object.keys(je(f))).map(h=>` - ${h}`).join(`
|
|
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
|
+
`)].join(`
|
|
6
|
+
`))}else{let h=c.props,d=h?.className,g=typeof d=="function"?(...x)=>lr(d(...x),a.className):lr(d,a.className),v=g?{className:g}:{},b=ol(c.props,je(Dn(a,["ref"])));for(let x in f)x in b&&delete f[x];return p.cloneElement(c,Object.assign({},b,f,u,{ref:o(Hc(c),u.ref)},v))}return p.createElement(i,Object.assign({},Dn(a,["ref"]),!nt(i)&&u,!nt(i)&&f),c)}function _c(){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 Bc(...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 ol(...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 l=n[r];for(let s of l){if((o instanceof Event||o?.nativeEvent instanceof Event)&&o.defaultPrevented)return;s(o,...i)}}});return t}function St(...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 l of i)l?.(...o)}});return t}function ne(e){var t;return Object.assign(p.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function je(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Dn(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function Hc(e){return p.version.split(".")[0]>="19"?e.props.ref:e.ref}function nt(e){return e===p.Fragment||e===Symbol.for("react.fragment")}function Vc(e){return nt(e.type)}let zc="button";function Wc(e,t){var n;let r=hn(),{disabled:o=r||!1,autoFocus:i=!1,...l}=e,{isFocusVisible:s,focusProps:a}=Ar({autoFocus:i}),{isHovered:u,hoverProps:c}=Mr({isDisabled:o}),{pressed:f,pressProps:h}=Fr({disabled:o}),d=St({ref:t,type:(n=l.type)!=null?n:"button",disabled:o||void 0,autoFocus:i},a,c,h),g=xe({disabled:o,hover:u,focus:s,active:f,autofocus:i});return oe()({ourProps:d,theirProps:l,slot:g,defaultTag:zc,name:"Button"})}let Uc=ne(Wc);function qc(e,t,n){let[r,o]=p.useState(n),i=e!==void 0,l=p.useRef(i),s=p.useRef(!1),a=p.useRef(!1);return i&&!l.current&&!s.current?(s.current=!0,l.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&&l.current&&!a.current&&(a.current=!0,l.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,U(u=>(i||Ke.flushSync(()=>o(u)),t?.(u)))]}function Gc(e){let[t]=p.useState(e);return t}function il(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))sl(n,ll(t,r),o);return n}function ll(e,t){return e?e+"["+t+"]":t}function sl(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())sl(e,ll(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,""]):Yc(n)&&!p.isValidElement(n)&&il(n,t,e)}function Kc(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 Yc(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}let Zc="span";var Ir=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ir||{});function Xc(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 oe()({ourProps:i,theirProps:o,slot:{},defaultTag:Zc,name:"Hidden"})}let al=ne(Xc),Jc=p.createContext(null);function Qc({children:e}){let t=p.useContext(Jc);if(!t)return p.createElement(p.Fragment,null,e);let{target:n}=t;return n?Ke.createPortal(p.createElement(p.Fragment,null,e),n):null}function ed({data:e,form:t,disabled:n,onReset:r,overrides:o}){let[i,l]=p.useState(null),s=Je();return p.useEffect(()=>{if(r&&i)return s.addEventListener(i,"reset",r)},[i,t,r]),p.createElement(Qc,null,p.createElement(td,{setForm:l,formId:t}),il(e).map(([a,u])=>p.createElement(al,{features:Ir.Hidden,...je({key:a,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:a,value:u,...o})})))}function td({setForm:e,formId:t}){return p.useEffect(()=>{if(t){let n=document.getElementById(t);n&&e(n)}},[e,t]),t?null:p.createElement(al,{features:Ir.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:n=>{if(!n)return;let r=n.closest("form");r&&e(r)}})}let nd=p.createContext(void 0);function ul(){return p.useContext(nd)}function cl(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function gn(e){return cl(e)&&"tagName"in e}function Ne(e){return gn(e)&&"accessKey"in e}function Be(e){return gn(e)&&"tabIndex"in e}function rd(e){return gn(e)&&"style"in e}function od(e){return Ne(e)&&e.nodeName==="IFRAME"}function dl(e){return Ne(e)&&e.nodeName==="INPUT"}function vo(e){return Ne(e)&&e.nodeName==="LABEL"}function id(e){return Ne(e)&&e.nodeName==="FIELDSET"}function fl(e){return Ne(e)&&e.nodeName==="LEGEND"}function ld(e){return gn(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function sr(e){let t=e.parentElement,n=null;for(;t&&!id(t);)fl(t)&&(n=t),t=t.parentElement;let r=t?.getAttribute("disabled")==="";return r&&sd(n)?!1:r}function sd(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(fl(t))return!1;t=t.previousElementSibling}return!0}let ml=Symbol();function pl(e,t=!0){return Object.assign(e,{[ml]:t})}function de(...e){let t=p.useRef(e);p.useEffect(()=>{t.current=e},[e]);let n=U(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||r?.[ml])?void 0:n}let Nr=p.createContext(null);Nr.displayName="DescriptionContext";function hl(){let e=p.useContext(Nr);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,hl),t}return e}function ad(){var e,t;return(t=(e=p.useContext(Nr))==null?void 0:e.value)!=null?t:void 0}let ud="p";function cd(e,t){let n=p.useId(),r=hn(),{id:o=`headlessui-description-${n}`,...i}=e,l=hl(),s=de(t);J(()=>l.register(o),[o,l.register]);let a=xe({...l.slot,disabled:r||!1}),u={ref:s,...l.props,id:o};return oe()({ourProps:u,theirProps:i,slot:a,defaultTag:ud,name:l.name||"Description"})}let dd=ne(cd);Object.assign(dd,{});var Z=(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))(Z||{});let vn=p.createContext(null);vn.displayName="LabelContext";function gl(){let e=p.useContext(vn);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,gl),t}return e}function vl(e){var t,n,r;let o=(n=(t=p.useContext(vn))==null?void 0:t.value)!=null?n:void 0;return((r=e?.length)!=null?r:0)>0?[o,...e].filter(Boolean).join(" "):o}function fd({inherit:e=!1}={}){let t=vl(),[n,r]=p.useState([]),o=e?[t,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,p.useMemo(()=>function(i){let l=U(a=>(r(u=>[...u,a]),()=>r(u=>{let c=u.slice(),f=c.indexOf(a);return f!==-1&&c.splice(f,1),c}))),s=p.useMemo(()=>({register:l,slot:i.slot,name:i.name,props:i.props,value:i.value}),[l,i.slot,i.name,i.props,i.value]);return p.createElement(vn.Provider,{value:s},i.children)},[r])]}let md="label";function pd(e,t){var n;let r=p.useId(),o=gl(),i=ul(),l=hn(),{id:s=`headlessui-label-${r}`,htmlFor:a=i??((n=o.props)==null?void 0:n.htmlFor),passive:u=!1,...c}=e,f=de(t);J(()=>o.register(s),[s,o.register]);let h=U(v=>{let b=v.currentTarget;if(!(v.target!==v.currentTarget&&ld(v.target))&&(vo(b)&&v.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(v),vo(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;(dl(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=xe({...o.slot,disabled:l||!1}),g={ref:f,...o.props,id:s,htmlFor:a,onClick:h};return u&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in c&&delete c.onClick),oe()({ourProps:g,theirProps:c,slot:d,defaultTag:a?md:"div",name:o.name||"Label"})}let hd=ne(pd),gd=Object.assign(hd,{}),vd=p.createContext(()=>{});function bd({value:e,children:t}){return p.createElement(vd.Provider,{value:e},t)}function xd(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 wd(e=xd){return p.useCallback((t,n)=>{if(typeof e=="string"){let r=e;return t?.[r]===n?.[r]}return e(t,n)},[e])}function bo(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function yd(e,t,n=!1){let[r,o]=p.useState(()=>bo(t));return J(()=>{if(!t||!e)return;let i=pe();return i.requestAnimationFrame(function l(){i.requestAnimationFrame(l),o(s=>{let a=bo(t);return a.width===s.width&&a.height===s.height?s:a})}),()=>{i.dispose()}},[t,e]),n?{width:`${r.width}px`,height:`${r.height}px`}:r}var bl=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(bl||{});function Ed(e){let t=p.useRef(null),n=U(o=>{t.current=o.pointerType,!sr(o.currentTarget)&&o.pointerType==="mouse"&&o.button===bl.Left&&(o.preventDefault(),e(o))}),r=U(o=>{t.current!=="mouse"&&(sr(o.currentTarget)||e(o))});return{onPointerDown:n,onClick:r}}let xl=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 Cd=Object.defineProperty,Rd=(e,t,n)=>t in e?Cd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$d=(e,t,n)=>(Rd(e,t+"",n),n),wl=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},ge=(e,t,n)=>(wl(e,t,"read from private field"),n?n.call(e):t.get(e)),jn=(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)},xo=(e,t,n,r)=>(wl(e,t,"write to private field"),t.set(e,n),n),$e,vt,bt;let yl=class{constructor(t){jn(this,$e,{}),jn(this,vt,new xl(()=>new Set)),jn(this,bt,new Set),$d(this,"disposables",pe()),xo(this,$e,t),Se.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return ge(this,$e)}subscribe(t,n){if(Se.isServer)return()=>{};let r={selector:t,callback:n,current:t(ge(this,$e))};return ge(this,bt).add(r),this.disposables.add(()=>{ge(this,bt).delete(r)})}on(t,n){return Se.isServer?()=>{}:(ge(this,vt).get(t).add(n),this.disposables.add(()=>{ge(this,vt).get(t).delete(n)}))}send(t){let n=this.reduce(ge(this,$e),t);if(n!==ge(this,$e)){xo(this,$e,n);for(let r of ge(this,bt)){let o=r.selector(ge(this,$e));El(r.current,o)||(r.current=o,r.callback(o))}for(let r of ge(this,vt).get(t.type))r(ge(this,$e),t)}}};$e=new WeakMap,vt=new WeakMap,bt=new WeakMap;function El(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:_n(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:_n(e.entries(),t.entries()):wo(e)&&wo(t)?_n(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function _n(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 wo(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function Bn(e){let[t,n]=e(),r=pe();return(...o)=>{t(...o),r.dispose(),r.microTask(n)}}var Sd=Object.defineProperty,kd=(e,t,n)=>t in e?Sd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yo=(e,t,n)=>(kd(e,typeof t!="symbol"?t+"":t,n),n),Cl=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(Cl||{});let Td={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}}},Od=class Rl extends yl{constructor(){super(...arguments),yo(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),yo(this,"selectors",{isTop:(t,n)=>t.stack[t.stack.length-1]===n,inStack:(t,n)=>t.stack.includes(n)})}static new(){return new Rl({stack:[]})}reduce(t,n){return ce(n.type,Td,t,n)}};const Dr=new xl(()=>Od.new());var qt={exports:{}},Hn={};var Eo;function Pd(){if(Eo)return Hn;Eo=1;var e=p;function t(a,u){return a===u&&(a!==0||1/a===1/u)||a!==a&&u!==u}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,i=e.useEffect,l=e.useMemo,s=e.useDebugValue;return Hn.useSyncExternalStoreWithSelector=function(a,u,c,f,h){var d=o(null);if(d.current===null){var g={hasValue:!1,value:null};d.current=g}else g=d.current;d=l(function(){function b(R){if(!x){if(x=!0,y=R,R=f(R),h!==void 0&&g.hasValue){var T=g.value;if(h(T,R))return w=T}return w=R}if(T=w,n(y,R))return T;var O=f(R);return h!==void 0&&h(T,O)?(y=R,T):(y=R,w=O)}var x=!1,y,w,$=c===void 0?null:c;return[function(){return b(u())},$===null?void 0:function(){return b($())}]},[u,c,f,h]);var v=r(a,d[0],d[1]);return i(function(){g.hasValue=!0,g.value=v},[v]),s(v),v},Hn}var Vn={};var Co;function Ld(){return Co||(Co=1,process.env.NODE_ENV!=="production"&&(function(){function e(a,u){return a===u&&(a!==0||1/a===1/u)||a!==a&&u!==u}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,l=t.useMemo,s=t.useDebugValue;Vn.useSyncExternalStoreWithSelector=function(a,u,c,f,h){var d=o(null);if(d.current===null){var g={hasValue:!1,value:null};d.current=g}else g=d.current;d=l(function(){function b(R){if(!x){if(x=!0,y=R,R=f(R),h!==void 0&&g.hasValue){var T=g.value;if(h(T,R))return w=T}return w=R}if(T=w,n(y,R))return T;var O=f(R);return h!==void 0&&h(T,O)?(y=R,T):(y=R,w=O)}var x=!1,y,w,$=c===void 0?null:c;return[function(){return b(u())},$===null?void 0:function(){return b($())}]},[u,c,f,h]);var v=r(a,d[0],d[1]);return i(function(){g.hasValue=!0,g.value=v},[v]),s(v),v},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Vn}var Ro;function Md(){return Ro||(Ro=1,process.env.NODE_ENV==="production"?qt.exports=Pd():qt.exports=Ld()),qt.exports}var Ad=Md();function fe(e,t,n=El){return Ad.useSyncExternalStoreWithSelector(U(r=>e.subscribe(Fd,r)),U(()=>e.state),U(()=>e.state),U(t),n)}function Fd(e){return e}function $l(e,t){let n=p.useId(),r=Dr.get(t),[o,i]=fe(r,p.useCallback(l=>[r.selectors.isTop(l,n),r.selectors.inStack(l,n)],[r,n]));return J(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?i?o:!0:!1}let ar=new Map,Ct=new Map;function $o(e){var t;let n=(t=Ct.get(e))!=null?t:0;return Ct.set(e,n+1),n!==0?()=>So(e):(ar.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>So(e))}function So(e){var t;let n=(t=Ct.get(e))!=null?t:1;if(n===1?Ct.delete(e):Ct.set(e,n-1),n!==1)return;let r=ar.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,ar.delete(e))}function Id(e,{allowed:t,disallowed:n}={}){let r=$l(e,"inert-others");J(()=>{var o,i;if(!r)return;let l=pe();for(let a of(o=n?.())!=null?o:[])a&&l.add($o(a));let s=(i=t?.())!=null?i:[];for(let a of s){if(!a)continue;let u=Ft(a);if(!u)continue;let c=a.parentElement;for(;c&&c!==u.body;){for(let f of c.children)s.some(h=>f.contains(h))||l.add($o(f));c=c.parentElement}}return l.dispose},[r,t,n])}function Nd(e,t,n){let r=Qe(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:Ne(t)?t:t.current;if(!o)return;let i=pe();if(typeof ResizeObserver<"u"){let l=new ResizeObserver(()=>r.current(o));l.observe(o),i.add(()=>l.disconnect())}if(typeof IntersectionObserver<"u"){let l=new IntersectionObserver(()=>r.current(o));l.observe(o),i.add(()=>l.disconnect())}return()=>i.dispose()},[t,r,e])}let ur=["[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(","),Dd=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var cr=(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))(cr||{}),jd=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(jd||{}),_d=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(_d||{});function Sl(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(ur)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function Bd(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Dd)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var jr=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(jr||{});function kl(e,t=0){var n;return e===((n=Ft(e))==null?void 0:n.body)?!1:ce(t,{0(){return e.matches(ur)},1(){let r=e;for(;r!==null;){if(r.matches(ur))return!0;r=r.parentElement}return!1}})}var Hd=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Hd||{});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 Vd=["textarea","input"].join(",");function zd(e){var t,n;return(n=(t=e?.matches)==null?void 0:t.call(e,Vd))!=null?n:!1}function Tl(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 l=o.compareDocumentPosition(i);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Wd(e,t,n=e===null?document.body:sn(e)){return Ud(Sl(n),t,{relativeTo:e})}function Ud(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?sn(e[0]):document:sn(e),l=Array.isArray(e)?n?Tl(e):e:t&64?Bd(e):Sl(e);o.length>0&&l.length>1&&(l=l.filter(d=>!o.some(g=>g!=null&&"current"in g?g?.current===d:g===d))),r=r??i?.activeElement;let s=(()=>{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,l.indexOf(r))-1;if(t&4)return Math.max(0,l.indexOf(r))+1;if(t&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},c=0,f=l.length,h;do{if(c>=f||c+f<=0)return 0;let d=a+c;if(t&16)d=(d+f)%f;else{if(d<0)return 3;if(d>=f)return 1}h=l[d],h?.focus(u),c+=s}while(h!==nl(h));return t&6&&zd(h)&&h.select(),2}function Ol(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function qd(){return/Android/gi.test(window.navigator.userAgent)}function ko(){return Ol()||qd()}function tt(e,t,n,r){let o=Qe(n);p.useEffect(()=>{if(!e)return;function i(l){o.current(l)}return document.addEventListener(t,i,r),()=>document.removeEventListener(t,i,r)},[e,t,r])}function Gd(e,t,n,r){let o=Qe(n);p.useEffect(()=>{if(!e)return;function i(l){o.current(l)}return window.addEventListener(t,i,r),()=>window.removeEventListener(t,i,r)},[e,t,r])}const To=30;function Kd(e,t,n){let r=Qe(n),o=p.useCallback(function(s,a){if(s.defaultPrevented)return;let u=a(s);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let c=(function f(h){return typeof h=="function"?f(h()):Array.isArray(h)||h instanceof Set?h:[h]})(t);for(let f of c)if(f!==null&&(f.contains(u)||s.composed&&s.composedPath().includes(f)))return;return!kl(u,jr.Loose)&&u.tabIndex!==-1&&s.preventDefault(),r.current(s,u)},[r,t]),i=p.useRef(null);tt(e,"pointerdown",s=>{var a,u;ko()||(i.current=((u=(a=s.composedPath)==null?void 0:a.call(s))==null?void 0:u[0])||s.target)},!0),tt(e,"pointerup",s=>{if(ko()||!i.current)return;let a=i.current;return i.current=null,o(s,()=>a)},!0);let l=p.useRef({x:0,y:0});tt(e,"touchstart",s=>{l.current.x=s.touches[0].clientX,l.current.y=s.touches[0].clientY},!0),tt(e,"touchend",s=>{let a={x:s.changedTouches[0].clientX,y:s.changedTouches[0].clientY};if(!(Math.abs(a.x-l.current.x)>=To||Math.abs(a.y-l.current.y)>=To))return o(s,()=>Be(s.target)?s.target:null)},!0),Gd(e,"blur",s=>o(s,()=>od(window.document.activeElement)?window.document.activeElement:null),!0)}function dr(...e){return p.useMemo(()=>Ft(...e),[...e])}var Yd=(e=>(e[e.Ignore=0]="Ignore",e[e.Select=1]="Select",e[e.Close=2]="Close",e))(Yd||{});const Gt={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},Zd=200,Oo=5;function Xd(e,{trigger:t,action:n,close:r,select:o}){let i=p.useRef(null),l=p.useRef(null),s=p.useRef(null);tt(e&&t!==null,"pointerdown",a=>{cl(a?.target)&&t!=null&&t.contains(a.target)&&(l.current=a.x,s.current=a.y,i.current=a.timeStamp)}),tt(e&&t!==null,"pointerup",a=>{var u,c;let f=i.current;if(f===null||(i.current=null,!Be(a.target))||Math.abs(a.x-((u=l.current)!=null?u:a.x))<Oo&&Math.abs(a.y-((c=s.current)!=null?c:a.y))<Oo)return;let h=n(a);switch(h.kind){case 0:return;case 1:{a.timeStamp-f>Zd&&(o(h.target),r());break}case 2:{r();break}}},{capture:!0})}function Pl(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 Jd(e){return p.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function Qd(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 l=t[o].call(n,...i);l&&(n=l,r.forEach(s=>s()))}}}function ef(){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 tf(){return Ol()?{before({doc:e,d:t,meta:n}){function r(o){for(let i of n().containers)for(let l of i())if(l.contains(o))return!0;return!1}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let s=pe();s.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>s.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,l=null;t.addEventListener(e,"click",s=>{if(Be(s.target))try{let a=s.target.closest("a");if(!a)return;let{hash:u}=new URL(a.href),c=e.querySelector(u);Be(c)&&!r(c)&&(l=c)}catch{}},!0),t.group(s=>{t.addEventListener(e,"touchstart",a=>{if(s.dispose(),Be(a.target)&&rd(a.target))if(r(a.target)){let u=a.target;for(;u.parentElement&&r(u.parentElement);)u=u.parentElement;s.style(u,"overscrollBehavior","contain")}else s.style(a.target,"touchAction","none")})}),t.addEventListener(e,"touchmove",s=>{if(Be(s.target)){if(dl(s.target))return;if(r(s.target)){let a=s.target;for(;a.parentElement&&a.dataset.headlessuiPortal!==""&&!(a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth);)a=a.parentElement;a.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()}},{passive:!1}),t.add(()=>{var s;let a=(s=window.scrollY)!=null?s:window.pageYOffset;i!==a&&window.scrollTo(0,i),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})})}}:{}}function nf(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function Po(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let Ge=Qd(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:pe(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(t),r.computedMeta=Po(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=Po(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},n=[tf(),ef(),nf()];n.forEach(({before:r})=>r?.(t)),n.forEach(({after:r})=>r?.(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Ge.subscribe(()=>{let e=Ge.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)&&Ge.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Ge.dispatch("TEARDOWN",n)}});function rf(e,t,n=()=>({containers:[]})){let r=Jd(Ge),o=t?r.get(t):void 0,i=o?o.count>0:!1;return J(()=>{if(!(!t||!e))return Ge.dispatch("PUSH",t,n),()=>Ge.dispatch("POP",t,n)},[e,t]),i}function of(e,t,n=()=>[document.body]){let r=$l(e,"scroll-lock");rf(r,t,o=>{var i;return{containers:[...(i=o.containers)!=null?i:[],n]}})}function Lo(e){return[e.screenX,e.screenY]}function lf(){let e=p.useRef([-1,-1]);return{wasMoved(t){let n=Lo(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=Lo(t)}}}function sf(e=0){let[t,n]=p.useState(e),r=p.useCallback(a=>n(a),[]),o=p.useCallback(a=>n(u=>u|a),[]),i=p.useCallback(a=>(t&a)===a,[t]),l=p.useCallback(a=>n(u=>u&~a),[]),s=p.useCallback(a=>n(u=>u^a),[]);return{flags:t,setFlag:r,addFlag:o,hasFlag:i,removeFlag:l,toggleFlag:s}}var Mo,Ao;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Mo=process==null?void 0:process.env)==null?void 0:Mo.NODE_ENV)==="test"&&typeof((Ao=Element?.prototype)==null?void 0:Ao.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 af=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(af||{});function _r(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function Br(e,t,n,r){let[o,i]=p.useState(n),{hasFlag:l,addFlag:s,removeFlag:a}=sf(e&&o?3:0),u=p.useRef(!1),c=p.useRef(!1),f=Je();return J(()=>{var h;if(e){if(n&&i(!0),!t){n&&s(3);return}return(h=r?.start)==null||h.call(r,n),uf(t,{inFlight:u,prepare(){c.current?c.current=!1:c.current=u.current,u.current=!0,!c.current&&(n?(s(3),a(4)):(s(4),a(2)))},run(){c.current?n?(a(3),s(4)):(a(4),s(3)):n?a(1):s(1)},done(){var d;c.current&&ff(t)||(u.current=!1,a(7),n||i(!1),(d=r?.end)==null||d.call(r,n))}})}},[e,n,t,f]),e?[o,{closed:l(1),enter:l(2),leave:l(4),transition:l(2)||l(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function uf(e,{prepare:t,run:n,done:r,inFlight:o}){let i=pe();return df(e,{prepare:t,inFlight:o}),i.nextFrame(()=>{n(),i.requestAnimationFrame(()=>{i.add(cf(e,r))})}),i.dispose}function cf(e,t){var n,r;let o=pe();if(!e)return o.dispose;let i=!1;o.add(()=>{i=!0});let l=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(s=>s instanceof CSSTransition))!=null?r:[];return l.length===0?(t(),o.dispose):(Promise.allSettled(l.map(s=>s.finished)).then(()=>{i||t()}),o.dispose)}function df(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 ff(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 bn(){return typeof window<"u"}function ft(e){return Ll(e)?(e.nodeName||"").toLowerCase():"#document"}function me(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Te(e){var t;return(t=(Ll(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ll(e){return bn()?e instanceof Node||e instanceof me(e).Node:!1}function K(e){return bn()?e instanceof Element||e instanceof me(e).Element:!1}function we(e){return bn()?e instanceof HTMLElement||e instanceof me(e).HTMLElement:!1}function fr(e){return!bn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof me(e).ShadowRoot}const mf=new Set(["inline","contents"]);function It(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ce(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!mf.has(o)}const pf=new Set(["table","td","th"]);function hf(e){return pf.has(ft(e))}const gf=[":popover-open",":modal"];function xn(e){return gf.some(t=>{try{return e.matches(t)}catch{return!1}})}const vf=["transform","translate","scale","rotate","perspective"],bf=["transform","translate","scale","rotate","perspective","filter"],xf=["paint","layout","strict","content"];function Hr(e){const t=Vr(),n=K(e)?Ce(e):e;return vf.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)||bf.some(r=>(n.willChange||"").includes(r))||xf.some(r=>(n.contain||"").includes(r))}function wf(e){let t=Ve(e);for(;we(t)&&!it(t);){if(Hr(t))return t;if(xn(t))return null;t=Ve(t)}return null}function Vr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const yf=new Set(["html","body","#document"]);function it(e){return yf.has(ft(e))}function Ce(e){return me(e).getComputedStyle(e)}function wn(e){return K(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ve(e){if(ft(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fr(e)&&e.host||Te(e);return fr(t)?t.host:t}function Ml(e){const t=Ve(e);return it(t)?e.ownerDocument?e.ownerDocument.body:e.body:we(t)&&It(t)?t:Ml(t)}function kt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ml(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),l=me(o);if(i){const s=mr(l);return t.concat(l,l.visualViewport||[],It(o)?o:[],s&&n?kt(s):[])}return t.concat(o,kt(o,[],n))}function mr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ef(){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 Ze=Math.min,ie=Math.max,Tt=Math.round,Kt=Math.floor,ke=e=>({x:e,y:e}),Cf={left:"right",right:"left",bottom:"top",top:"bottom"},Rf={start:"end",end:"start"};function Fo(e,t,n){return ie(e,Ze(t,n))}function mt(e,t){return typeof e=="function"?e(t):e}function ze(e){return e.split("-")[0]}function Nt(e){return e.split("-")[1]}function Al(e){return e==="x"?"y":"x"}function Fl(e){return e==="y"?"height":"width"}const $f=new Set(["top","bottom"]);function Pe(e){return $f.has(ze(e))?"y":"x"}function Il(e){return Al(Pe(e))}function Sf(e,t,n){n===void 0&&(n=!1);const r=Nt(e),o=Il(e),i=Fl(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=an(l)),[l,an(l)]}function kf(e){const t=an(e);return[pr(e),t,pr(t)]}function pr(e){return e.replace(/start|end/g,t=>Rf[t])}const Io=["left","right"],No=["right","left"],Tf=["top","bottom"],Of=["bottom","top"];function Pf(e,t,n){switch(e){case"top":case"bottom":return n?t?No:Io:t?Io:No;case"left":case"right":return t?Tf:Of;default:return[]}}function Lf(e,t,n,r){const o=Nt(e);let i=Pf(ze(e),n==="start",r);return o&&(i=i.map(l=>l+"-"+o),t&&(i=i.concat(i.map(pr)))),i}function an(e){return e.replace(/left|right|bottom|top/g,t=>Cf[t])}function Mf(e){return{top:0,right:0,bottom:0,left:0,...e}}function Af(e){return typeof e!="number"?Mf(e):{top:e,right:e,bottom:e,left:e}}function un(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 Do(e,t,n){let{reference:r,floating:o}=e;const i=Pe(t),l=Il(t),s=Fl(l),a=ze(t),u=i==="y",c=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[s]/2-o[s]/2;let d;switch(a){case"top":d={x:c,y:r.y-o.height};break;case"bottom":d={x:c,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(Nt(t)){case"start":d[l]-=h*(n&&u?-1:1);break;case"end":d[l]+=h*(n&&u?-1:1);break}return d}const Ff=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,s=i.filter(Boolean),a=await(l.isRTL==null?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:f}=Do(u,r,a),h=r,d={},g=0;for(let v=0;v<s.length;v++){const{name:b,fn:x}=s[v],{x:y,y:w,data:$,reset:R}=await x({x:c,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:d,rects:u,platform:l,elements:{reference:e,floating:t}});c=y??c,f=w??f,d={...d,[b]:{...d[b],...$}},R&&g<=50&&(g++,typeof R=="object"&&(R.placement&&(h=R.placement),R.rects&&(u=R.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:c,y:f}=Do(u,h,a)),v=-1)}return{x:c,y:f,placement:h,strategy:o,middlewareData:d}};async function yn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:l,elements:s,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=mt(t,e),g=Af(d),b=s[h?f==="floating"?"reference":"floating":f],x=un(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(s.floating)),boundary:u,rootBoundary:c,strategy:a})),y=f==="floating"?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),$=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=un(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:w,strategy:a}):y);return{top:(x.top-R.top+g.top)/$.y,bottom:(R.bottom-x.bottom+g.bottom)/$.y,left:(x.left-R.left+g.left)/$.x,right:(R.right-x.right+g.right)/$.x}}const If=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:s,platform:a,elements:u}=t,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...b}=mt(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=ze(o),y=Pe(s),w=ze(s)===s,$=await(a.isRTL==null?void 0:a.isRTL(u.floating)),R=h||(w||!v?[an(s)]:kf(s)),T=g!=="none";!h&&T&&R.push(...Lf(s,v,g,$));const O=[s,...R],S=await yn(t,b),M=[];let k=((r=i.flip)==null?void 0:r.overflows)||[];if(c&&M.push(S[x]),f){const _=Sf(o,l,$);M.push(S[_[0]],S[_[1]])}if(k=[...k,{placement:o,overflows:M}],!M.every(_=>_<=0)){var j,V;const _=(((j=i.flip)==null?void 0:j.index)||0)+1,N=O[_];if(N&&(!(f==="alignment"?y!==Pe(N):!1)||k.every(C=>Pe(C.placement)===y?C.overflows[0]>0:!0)))return{data:{index:_,overflows:k},reset:{placement:N}};let H=(V=k.filter(A=>A.overflows[0]<=0).sort((A,C)=>A.overflows[1]-C.overflows[1])[0])==null?void 0:V.placement;if(!H)switch(d){case"bestFit":{var z;const A=(z=k.filter(C=>{if(T){const F=Pe(C.placement);return F===y||F==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(F=>F>0).reduce((F,q)=>F+q,0)]).sort((C,F)=>C[1]-F[1])[0])==null?void 0:z[0];A&&(H=A);break}case"initialPlacement":H=s;break}if(o!==H)return{reset:{placement:H}}}return{}}}},Nf=new Set(["left","top"]);async function Df(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=ze(n),s=Nt(n),a=Pe(n)==="y",u=Nf.has(l)?-1:1,c=i&&a?-1:1,f=mt(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 s&&typeof g=="number"&&(d=s==="end"?g*-1:g),a?{x:d*c,y:h*u}:{x:h*u,y:d*c}}const jf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:s}=t,a=await Df(t,e);return l===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:l}}}}},_f=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:l=!1,limiter:s={fn:b=>{let{x,y}=b;return{x,y}}},...a}=mt(e,t),u={x:n,y:r},c=await yn(t,a),f=Pe(ze(o)),h=Al(f);let d=u[h],g=u[f];if(i){const b=h==="y"?"top":"left",x=h==="y"?"bottom":"right",y=d+c[b],w=d-c[x];d=Fo(y,d,w)}if(l){const b=f==="y"?"top":"left",x=f==="y"?"bottom":"right",y=g+c[b],w=g-c[x];g=Fo(y,g,w)}const v=s.fn({...t,[h]:d,[f]:g});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[h]:i,[f]:l}}}}}},Bf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:l,elements:s}=t,{apply:a=()=>{},...u}=mt(e,t),c=await yn(t,u),f=ze(o),h=Nt(o),d=Pe(o)==="y",{width:g,height:v}=i.floating;let b,x;f==="top"||f==="bottom"?(b=f,x=h===(await(l.isRTL==null?void 0:l.isRTL(s.floating))?"start":"end")?"left":"right"):(x=f,b=h==="end"?"top":"bottom");const y=v-c.top-c.bottom,w=g-c.left-c.right,$=Ze(v-c[b],y),R=Ze(g-c[x],w),T=!t.middlewareData.shift;let O=$,S=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=y),T&&!h){const k=ie(c.left,0),j=ie(c.right,0),V=ie(c.top,0),z=ie(c.bottom,0);d?S=g-2*(k!==0||j!==0?k+j:ie(c.left,c.right)):O=v-2*(V!==0||z!==0?V+z:ie(c.top,c.bottom))}await a({...t,availableWidth:S,availableHeight:O});const M=await l.getDimensions(s.floating);return g!==M.width||v!==M.height?{reset:{rects:!0}}:{}}}};function Nl(e){const t=Ce(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=we(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,s=Tt(n)!==i||Tt(r)!==l;return s&&(n=i,r=l),{width:n,height:r,$:s}}function zr(e){return K(e)?e:e.contextElement}function rt(e){const t=zr(e);if(!we(t))return ke(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Nl(t);let l=(i?Tt(n.width):n.width)/r,s=(i?Tt(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const Hf=ke(0);function Dl(e){const t=me(e);return!Vr()||!t.visualViewport?Hf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vf(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==me(e)?!1:t}function Xe(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=zr(e);let l=ke(1);t&&(r?K(r)&&(l=rt(r)):l=rt(e));const s=Vf(i,n,r)?Dl(i):ke(0);let a=(o.left+s.x)/l.x,u=(o.top+s.y)/l.y,c=o.width/l.x,f=o.height/l.y;if(i){const h=me(i),d=r&&K(r)?me(r):r;let g=h,v=mr(g);for(;v&&r&&d!==g;){const b=rt(v),x=v.getBoundingClientRect(),y=Ce(v),w=x.left+(v.clientLeft+parseFloat(y.paddingLeft))*b.x,$=x.top+(v.clientTop+parseFloat(y.paddingTop))*b.y;a*=b.x,u*=b.y,c*=b.x,f*=b.y,a+=w,u+=$,g=me(v),v=mr(g)}}return un({width:c,height:f,x:a,y:u})}function En(e,t){const n=wn(e).scrollLeft;return t?t.left+n:Xe(Te(e)).left+n}function jl(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-En(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function zf(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",l=Te(r),s=t?xn(t.floating):!1;if(r===l||s&&i)return n;let a={scrollLeft:0,scrollTop:0},u=ke(1);const c=ke(0),f=we(r);if((f||!f&&!i)&&((ft(r)!=="body"||It(l))&&(a=wn(r)),we(r))){const d=Xe(r);u=rt(r),c.x=d.x+r.clientLeft,c.y=d.y+r.clientTop}const h=l&&!f&&!i?jl(l,a):ke(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+c.x+h.x,y:n.y*u.y-a.scrollTop*u.y+c.y+h.y}}function Wf(e){return Array.from(e.getClientRects())}function Uf(e){const t=Te(e),n=wn(e),r=e.ownerDocument.body,o=ie(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ie(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+En(e);const s=-n.scrollTop;return Ce(r).direction==="rtl"&&(l+=ie(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:s}}const jo=25;function qf(e,t){const n=me(e),r=Te(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,s=0,a=0;if(o){i=o.width,l=o.height;const c=Vr();(!c||c&&t==="fixed")&&(s=o.offsetLeft,a=o.offsetTop)}const u=En(r);if(u<=0){const c=r.ownerDocument,f=c.body,h=getComputedStyle(f),d=c.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(r.clientWidth-f.clientWidth-d);g<=jo&&(i-=g)}else u<=jo&&(i+=u);return{width:i,height:l,x:s,y:a}}const Gf=new Set(["absolute","fixed"]);function Kf(e,t){const n=Xe(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=we(e)?rt(e):ke(1),l=e.clientWidth*i.x,s=e.clientHeight*i.y,a=o*i.x,u=r*i.y;return{width:l,height:s,x:a,y:u}}function _o(e,t,n){let r;if(t==="viewport")r=qf(e,n);else if(t==="document")r=Uf(Te(e));else if(K(t))r=Kf(t,n);else{const o=Dl(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return un(r)}function _l(e,t){const n=Ve(e);return n===t||!K(n)||it(n)?!1:Ce(n).position==="fixed"||_l(n,t)}function Yf(e,t){const n=t.get(e);if(n)return n;let r=kt(e,[],!1).filter(s=>K(s)&&ft(s)!=="body"),o=null;const i=Ce(e).position==="fixed";let l=i?Ve(e):e;for(;K(l)&&!it(l);){const s=Ce(l),a=Hr(l);!a&&s.position==="fixed"&&(o=null),(i?!a&&!o:!a&&s.position==="static"&&!!o&&Gf.has(o.position)||It(l)&&!a&&_l(e,l))?r=r.filter(c=>c!==l):o=s,l=Ve(l)}return t.set(e,r),r}function Zf(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?xn(t)?[]:Yf(t,this._c):[].concat(n),r],s=l[0],a=l.reduce((u,c)=>{const f=_o(t,c,o);return u.top=ie(f.top,u.top),u.right=Ze(f.right,u.right),u.bottom=Ze(f.bottom,u.bottom),u.left=ie(f.left,u.left),u},_o(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Xf(e){const{width:t,height:n}=Nl(e);return{width:t,height:n}}function Jf(e,t,n){const r=we(t),o=Te(t),i=n==="fixed",l=Xe(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const a=ke(0);function u(){a.x=En(o)}if(r||!r&&!i)if((ft(t)!=="body"||It(o))&&(s=wn(t)),r){const d=Xe(t,!0,i,t);a.x=d.x+t.clientLeft,a.y=d.y+t.clientTop}else o&&u();i&&!r&&o&&u();const c=o&&!r&&!i?jl(o,s):ke(0),f=l.left+s.scrollLeft-a.x-c.x,h=l.top+s.scrollTop-a.y-c.y;return{x:f,y:h,width:l.width,height:l.height}}function zn(e){return Ce(e).position==="static"}function Bo(e,t){if(!we(e)||Ce(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Te(e)===n&&(n=n.ownerDocument.body),n}function Bl(e,t){const n=me(e);if(xn(e))return n;if(!we(e)){let o=Ve(e);for(;o&&!it(o);){if(K(o)&&!zn(o))return o;o=Ve(o)}return n}let r=Bo(e,t);for(;r&&hf(r)&&zn(r);)r=Bo(r,t);return r&&it(r)&&zn(r)&&!Hr(r)?n:r||wf(e)||n}const Qf=async function(e){const t=this.getOffsetParent||Bl,n=this.getDimensions,r=await n(e.floating);return{reference:Jf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function em(e){return Ce(e).direction==="rtl"}const tm={convertOffsetParentRelativeRectToViewportRelativeRect:zf,getDocumentElement:Te,getClippingRect:Zf,getOffsetParent:Bl,getElementRects:Qf,getClientRects:Wf,getDimensions:Xf,getScale:rt,isElement:K,isRTL:em};function Hl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function nm(e,t){let n=null,r;const o=Te(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function l(s,a){s===void 0&&(s=!1),a===void 0&&(a=1),i();const u=e.getBoundingClientRect(),{left:c,top:f,width:h,height:d}=u;if(s||t(),!h||!d)return;const g=Kt(f),v=Kt(o.clientWidth-(c+h)),b=Kt(o.clientHeight-(f+d)),x=Kt(c),w={rootMargin:-g+"px "+-v+"px "+-b+"px "+-x+"px",threshold:ie(0,Ze(1,a))||1};let $=!0;function R(T){const O=T[0].intersectionRatio;if(O!==a){if(!$)return l();O?l(!1,O):r=setTimeout(()=>{l(!1,1e-7)},1e3)}O===1&&!Hl(u,e.getBoundingClientRect())&&l(),$=!1}try{n=new IntersectionObserver(R,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(R,w)}n.observe(e)}return l(!0),i}function rm(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,u=zr(e),c=o||i?[...u?kt(u):[],...kt(t)]:[];c.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const f=u&&s?nm(u,n):null;let h=-1,d=null;l&&(d=new ResizeObserver(x=>{let[y]=x;y&&y.target===u&&d&&(d.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=d)==null||w.observe(t)})),n()}),u&&!a&&d.observe(u),d.observe(t));let g,v=a?Xe(e):null;a&&b();function b(){const x=Xe(e);v&&!Hl(v,x)&&n(),v=x,g=requestAnimationFrame(b)}return n(),()=>{var x;c.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f?.(),(x=d)==null||x.disconnect(),d=null,a&&cancelAnimationFrame(g)}}const Wn=yn,om=jf,im=_f,lm=If,sm=Bf,am=(e,t,n)=>{const r=new Map,o={platform:tm,...n},i={...o.platform,_c:r};return Ff(e,t,{...o,platform:i})};var um=typeof document<"u",cm=function(){},Qt=um?p.useLayoutEffect:cm;function cn(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(!cn(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)&&!cn(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Vl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ho(e,t){const n=Vl(e);return Math.round(t*n)/n}function Un(e){const t=m.useRef(e);return Qt(()=>{t.current=e}),t}function zl(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:s=!0,whileElementsMounted:a,open:u}=e,[c,f]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,d]=m.useState(r);cn(h,r)||d(r);const[g,v]=m.useState(null),[b,x]=m.useState(null),y=m.useCallback(C=>{C!==T.current&&(T.current=C,v(C))},[]),w=m.useCallback(C=>{C!==O.current&&(O.current=C,x(C))},[]),$=i||g,R=l||b,T=m.useRef(null),O=m.useRef(null),S=m.useRef(c),M=a!=null,k=Un(a),j=Un(o),V=Un(u),z=m.useCallback(()=>{if(!T.current||!O.current)return;const C={placement:t,strategy:n,middleware:h};j.current&&(C.platform=j.current),am(T.current,O.current,C).then(F=>{const q={...F,isPositioned:V.current!==!1};_.current&&!cn(S.current,q)&&(S.current=q,nn.flushSync(()=>{f(q)}))})},[h,t,n,j,V]);Qt(()=>{u===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,f(C=>({...C,isPositioned:!1})))},[u]);const _=m.useRef(!1);Qt(()=>(_.current=!0,()=>{_.current=!1}),[]),Qt(()=>{if($&&(T.current=$),R&&(O.current=R),$&&R){if(k.current)return k.current($,R,z);z()}},[$,R,z,k,M]);const N=m.useMemo(()=>({reference:T,floating:O,setReference:y,setFloating:w}),[y,w]),H=m.useMemo(()=>({reference:$,floating:R}),[$,R]),A=m.useMemo(()=>{const C={position:n,left:0,top:0};if(!H.floating)return C;const F=Ho(H.floating,c.x),q=Ho(H.floating,c.y);return s?{...C,transform:"translate("+F+"px, "+q+"px)",...Vl(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:q}},[n,s,H.floating,c.x,c.y]);return m.useMemo(()=>({...c,update:z,refs:N,elements:H,floatingStyles:A}),[c,z,N,H,A])}const Wr=(e,t)=>({...om(e),options:[e,t]}),Wl=(e,t)=>({...im(e),options:[e,t]}),dm=(e,t)=>({...lm(e),options:[e,t]}),fm=(e,t)=>({...sm(e),options:[e,t]}),Ul={...m},mm=Ul.useInsertionEffect,pm=mm||(e=>e());function ql(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 hr=typeof document<"u"?p.useLayoutEffect:p.useEffect;let Vo=!1,hm=0;const zo=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+hm++;function gm(){const[e,t]=m.useState(()=>Vo?zo():void 0);return hr(()=>{e==null&&t(zo())},[]),m.useEffect(()=>{Vo=!0},[]),e}const vm=Ul.useId,bm=vm||gm;let Ot;process.env.NODE_ENV!=="production"&&(Ot=new Set);function xm(){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=Ot)!=null&&e.has(o))){var i;(i=Ot)==null||i.add(o),console.warn(o)}}function wm(){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=Ot)!=null&&e.has(o))){var i;(i=Ot)==null||i.add(o),console.error(o)}}function ym(){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 Em=m.createContext(null),Cm=m.createContext(null),Rm=()=>{var e;return((e=m.useContext(Em))==null?void 0:e.id)||null},$m=()=>m.useContext(Cm),Sm="data-floating-ui-focusable";function km(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=bm(),i=m.useRef({}),[l]=m.useState(()=>ym()),s=Rm()!=null;if(process.env.NODE_ENV!=="production"){const d=r.reference;d&&!K(d)&&wm("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,u]=m.useState(r.reference),c=ql((d,g,v)=>{i.current.openEvent=d?g:void 0,l.emit("openchange",{open:d,event:g,reason:v,nested:s}),n?.(d,g,v)}),f=m.useMemo(()=>({setPositionReference:u}),[]),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:c,elements:h,events:l,floatingId:o,refs:f}),[t,c,h,l,o,f])}function Tm(e){e===void 0&&(e={});const{nodeId:t}=e,n=km({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,l]=m.useState(null),[s,a]=m.useState(null),c=o?.domReference||i,f=m.useRef(null),h=$m();hr(()=>{c&&(f.current=c)},[c]);const d=zl({...e,elements:{...o,...s&&{reference:s}}}),g=m.useCallback(w=>{const $=K(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;a($),d.refs.setReference($)},[d.refs]),v=m.useCallback(w=>{(K(w)||w===null)&&(f.current=w,l(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:c}),[d.elements,c]),y=m.useMemo(()=>({...d,...r,refs:b,elements:x,nodeId:t}),[d,b,x,t,r]);return hr(()=>{r.dataRef.current.floatingContext=y;const w=h?.nodesRef.current.find($=>$.id===t);w&&(w.context=y)}),m.useMemo(()=>({...d,context:y,refs:b,elements:x}),[d,b,x,y])}const Wo="active",Uo="selected";function qn(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Wo]:l,[Uo]:s,...a}=e;i=a}return{...n==="floating"&&{tabIndex:-1,[Sm]:""},...i,...t.map(l=>{const s=l?l[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((l,s)=>(s&&Object.entries(s).forEach(a=>{let[u,c]=a;if(!(o&&[Wo,Uo].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof c=="function"){var f;(f=r.get(u))==null||f.push(c),l[u]=function(){for(var h,d=arguments.length,g=new Array(d),v=0;v<d;v++)g[v]=arguments[v];return(h=r.get(u))==null?void 0:h.map(b=>b(...g)).find(b=>b!==void 0)}}}else l[u]=c}),l),{})}}function Om(e){e===void 0&&(e=[]);const t=e.map(s=>s?.reference),n=e.map(s=>s?.floating),r=e.map(s=>s?.item),o=m.useCallback(s=>qn(s,e,"reference"),t),i=m.useCallback(s=>qn(s,e,"floating"),n),l=m.useCallback(s=>qn(s,e,"item"),r);return m.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:l}),[o,i,l])}function qo(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const Pm=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:o,offset:i=0,index:l=0,minItemsVisible:s=4,referenceOverflowThreshold:a=0,scrollRef:u,...c}=mt(e,t),{rects:f,elements:{floating:h}}=t,d=n.current[l],g=u?.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")||xm('`placement` side must be "bottom" when using the `inner`',"middleware.")),!d)return{};const w={...t,...await Wr(-d.offsetTop-h.clientTop-f.reference.height/2-d.offsetHeight/2-i).fn(t)},$=await Wn(qo(w,g.scrollHeight+v+h.clientTop),c),R=await Wn(w,{...c,elementContext:"reference"}),T=ie(0,$.top),O=w.y+T,k=(g.scrollHeight>g.clientHeight?j=>j:Tt)(ie(0,g.scrollHeight+(b&&y||x?v*2:0)-T-ie(0,$.bottom)));if(g.style.maxHeight=k+"px",g.scrollTop=T,o){const j=g.offsetHeight<d.offsetHeight*Ze(s,n.current.length)-1||R.top>=-a||R.bottom>=-a;nn.flushSync(()=>o(j))}return r&&(r.current=await Wn(qo({...w,y:O},g.offsetHeight+v+h.clientTop),c)),{y:O}}});function Lm(e,t){const{open:n,elements:r}=e,{enabled:o=!0,overflowRef:i,scrollRef:l,onChange:s}=t,a=ql(s),u=m.useRef(!1),c=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,$=b<0?-1:1,R=b<0?"max":"min";g.scrollHeight<=g.clientHeight||(!x&&b>0||!y&&b<0?(v.preventDefault(),nn.flushSync(()=>{a(T=>T+Math[R](b,w*$))})):/firefox/i.test(Ef())&&(g.scrollTop+=b))}const g=l?.current||r.floating;if(n&&g)return g.addEventListener("wheel",d),requestAnimationFrame(()=>{c.current=g.scrollTop,i.current!=null&&(f.current={...i.current})}),()=>{c.current=null,f.current=null,g.removeEventListener("wheel",d)}},[o,n,r.floating,i,l,a]);const h=m.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const d=l?.current||r.floating;if(!(!i.current||!d||!u.current)){if(c.current!==null){const g=d.scrollTop-c.current;(i.current.bottom<-.5&&g<-1||i.current.top<-.5&&g>1)&&nn.flushSync(()=>a(v=>v+g))}requestAnimationFrame(()=>{c.current=d.scrollTop})}}}),[r.floating,a,i,l]);return m.useMemo(()=>o?{floating:h}:{},[o,h])}let pt=p.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});pt.displayName="FloatingContext";let Ur=p.createContext(null);Ur.displayName="PlacementContext";function Mm(e){return p.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function Am(){return p.useContext(pt).setReference}function Fm(){return p.useContext(pt).getReferenceProps}function Im(){let{getFloatingProps:e,slot:t}=p.useContext(pt);return p.useCallback((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function Nm(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=p.useContext(Ur),n=p.useMemo(()=>e,[JSON.stringify(e,(o,i)=>{var l;return(l=i?.outerHTML)!=null?l:i})]);J(()=>{t?.(n??null)},[t,n]);let r=p.useContext(pt);return p.useMemo(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}let Go=4;function Dm({children:e,enabled:t=!0}){let[n,r]=p.useState(null),[o,i]=p.useState(0),l=p.useRef(null),[s,a]=p.useState(null);jm(s);let u=t&&n!==null&&s!==null,{to:c="bottom",gap:f=0,offset:h=0,padding:d=0,inner:g}=_m(n,s),[v,b="center"]=c.split(" ");J(()=>{u&&i(0)},[u]);let{refs:x,floatingStyles:y,context:w}=Tm({open:u,placement:v==="selection"?b==="center"?"bottom":`bottom-${b}`:b==="center"?`${v}`:`${v}-${b}`,strategy:"absolute",transform:!1,middleware:[Wr({mainAxis:v==="selection"?0:f,crossAxis:h}),Wl({padding:d}),v!=="selection"&&dm({padding:d}),v==="selection"&&g?Pm({...g,padding:d,overflowRef:l,offset:o,minItemsVisible:Go,referenceOverflowThreshold:d,onFallbackChange(j){var V,z;if(!j)return;let _=w.elements.floating;if(!_)return;let N=parseFloat(getComputedStyle(_).scrollPaddingBottom)||0,H=Math.min(Go,_.childElementCount),A=0,C=0;for(let F of(z=(V=w.elements.floating)==null?void 0:V.childNodes)!=null?z:[])if(Ne(F)){let q=F.offsetTop,ee=q+F.clientHeight+N,D=_.scrollTop,I=D+_.clientHeight;if(q>=D&&ee<=I)H--;else{C=Math.max(0,Math.min(ee,I)-Math.max(q,D)),A=F.clientHeight;break}}H>=1&&i(F=>{let q=A*H-C+N;return F>=q?F:q})}}):null,fm({padding:d,apply({availableWidth:j,availableHeight:V,elements:z}){Object.assign(z.floating.style,{overflow:"auto",maxWidth:`${j}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${V}px)`})}})].filter(Boolean),whileElementsMounted:rm}),[$=v,R=b]=w.placement.split("-");v==="selection"&&($="selection");let T=p.useMemo(()=>({anchor:[$,R].filter(Boolean).join(" ")}),[$,R]),O=Lm(w,{overflowRef:l,onChange:i}),{getReferenceProps:S,getFloatingProps:M}=Om([O]),k=U(j=>{a(j),x.setFloating(j)});return m.createElement(Ur.Provider,{value:r},m.createElement(pt.Provider,{value:{setFloating:k,setReference:x.setReference,styles:y,getReferenceProps:S,getFloatingProps:M,slot:T}},e))}function jm(e){J(()=>{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 _m(e,t){var n,r,o;let i=Gn((n=e?.gap)!=null?n:"var(--anchor-gap, 0)",t),l=Gn((r=e?.offset)!=null?r:"var(--anchor-offset, 0)",t),s=Gn((o=e?.padding)!=null?o:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:l,padding:s}}function Gn(e,t,n=void 0){let r=Je(),o=U((a,u)=>{if(a==null)return[n,null];if(typeof a=="number")return[a,null];if(typeof a=="string"){if(!u)return[n,null];let c=Ko(a,u);return[c,f=>{let h=Gl(a);{let d=h.map(g=>window.getComputedStyle(u).getPropertyValue(g));r.requestAnimationFrame(function g(){r.nextFrame(g);let v=!1;for(let[x,y]of h.entries()){let w=window.getComputedStyle(u).getPropertyValue(y);if(d[x]!==w){d[x]=w,v=!0;break}}if(!v)return;let b=Ko(a,u);c!==b&&(f(b),c=b)})}return r.dispose}]}return[n,null]}),i=p.useMemo(()=>o(e,t)[0],[e,t]),[l=i,s]=p.useState();return J(()=>{let[a,u]=o(e,t);if(s(a),!!u)return u(s)},[e,t]),l}function Gl(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,...Gl(o)]:[r]}return[]}function Ko(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 Bm({children:e,freeze:t},n){let r=Kl(t,e);return p.isValidElement(r)?p.cloneElement(r,{ref:n}):p.createElement(p.Fragment,null,r)}p.forwardRef(Bm);function Kl(e,t){let[n,r]=p.useState(t);return!e&&n!==t&&r(t),e?n:t}let Cn=p.createContext(null);Cn.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 Rn(){return p.useContext(Cn)}function qr({value:e,children:t}){return p.createElement(Cn.Provider,{value:e},t)}function Hm({children:e}){return p.createElement(Cn.Provider,{value:null},e)}function Vm(e){throw new Error("Unexpected object: "+e)}var X=(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))(X||{});function Yt(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:Vm(e)}}function Yl(e){let t=U(e),n=p.useRef(!1);p.useEffect(()=>(n.current=!1,()=>{n.current=!0,rl(()=>{n.current&&t()})}),[t])}let zm=p.createContext(!1);function Wm(){return p.useContext(zm)}function Um(e){let t=Wm(),n=p.useContext(Xl),[r,o]=p.useState(()=>{var i;if(!t&&n!==null)return(i=n.current)!=null?i:null;if(Se.isServer)return null;let l=e?.getElementById("headlessui-portal-root");if(l)return l;if(e===null)return null;let s=e.createElement("div");return s.setAttribute("id","headlessui-portal-root"),e.body.appendChild(s)});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 Zl=p.Fragment,qm=ne(function(e,t){let{ownerDocument:n=null,...r}=e,o=p.useRef(null),i=de(pl(h=>{o.current=h}),t),l=dr(o.current),s=n??l,a=Um(s),u=p.useContext(Zm),c=Je(),f=oe();return Yl(()=>{var h;a&&a.childNodes.length<=0&&((h=a.parentElement)==null||h.removeChild(a))}),a?Ke.createPortal(p.createElement("div",{"data-headlessui-portal":"",ref:h=>{c.dispose(),u&&h&&c.add(u.register(h))}},f({ourProps:{ref:i},theirProps:r,slot:{},defaultTag:Zl,name:"Portal"})),a):null});function Gm(e,t){let n=de(t),{enabled:r=!0,ownerDocument:o,...i}=e,l=oe();return r?p.createElement(qm,{...i,ownerDocument:o,ref:n}):l({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:Zl,name:"Portal"})}let Km=p.Fragment,Xl=p.createContext(null);function Ym(e,t){let{target:n,...r}=e,o={ref:de(t)},i=oe();return p.createElement(Xl.Provider,{value:n},i({ourProps:o,theirProps:r,defaultTag:Km,name:"Popover.Group"}))}let Zm=p.createContext(null),Xm=ne(Gm),Jm=ne(Ym),Qm=Object.assign(Xm,{Group:Jm});const en={Idle:{kind:"Idle"},Tracked:e=>({kind:"Tracked",position:e}),Moved:{kind:"Moved"}};function Jl(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function ep(e,t,n){let r=pe();if(t.kind==="Tracked"){let o=function(){i!==Jl(e)&&(r.dispose(),n())},{position:i}=t,l=new ResizeObserver(o);l.observe(e),r.add(()=>l.disconnect()),r.addEventListener(window,"scroll",o,{passive:!0}),r.addEventListener(window,"resize",o)}return()=>r.dispose()}function tp(){let e=typeof document>"u";return"useSyncExternalStore"in m?(t=>t.useSyncExternalStore)(m)(()=>()=>{},()=>!1,()=>!e):!1}function Ql(){let e=tp(),[t,n]=m.useState(Se.isHandoffComplete);return t&&Se.isHandoffComplete===!1&&n(!1),m.useEffect(()=>{t!==!0&&n(!0)},[t]),m.useEffect(()=>Se.handoff(),[]),e?!1:t}function np(){let e=p.useRef(!1);return J(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function es(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!nt((t=e.as)!=null?t:ns)||p.Children.count(e.children)===1}let $n=p.createContext(null);$n.displayName="TransitionContext";var rp=(e=>(e.Visible="visible",e.Hidden="hidden",e))(rp||{});function op(){let e=p.useContext($n);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function ip(){let e=p.useContext(Sn);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Sn=p.createContext(null);Sn.displayName="NestingContext";function kn(e){return"children"in e?kn(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function ts(e,t){let n=Qe(e),r=p.useRef([]),o=np(),i=Je(),l=U((d,g=_e.Hidden)=>{let v=r.current.findIndex(({el:b})=>b===d);v!==-1&&(ce(g,{[_e.Unmount](){r.current.splice(v,1)},[_e.Hidden](){r.current[v].state="hidden"}}),i.microTask(()=>{var b;!kn(r)&&o.current&&((b=n.current)==null||b.call(n))}))}),s=U(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"}),()=>l(d,_e.Unmount)}),a=p.useRef([]),u=p.useRef(Promise.resolve()),c=p.useRef({enter:[],leave:[]}),f=U((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(c.current[g].map(([x,y])=>y)).then(()=>b())})]),g==="enter"?u.current=u.current.then(()=>t?.wait.current).then(()=>v(g)):v(g)}),h=U((d,g,v)=>{Promise.all(c.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:s,unregister:l,onStart:f,onStop:h,wait:u,chains:c}),[s,l,r,f,h,c,u])}let ns=p.Fragment,rs=ot.RenderStrategy;function lp(e,t){var n,r;let{transition:o=!0,beforeEnter:i,afterEnter:l,beforeLeave:s,afterLeave:a,enter:u,enterFrom:c,enterTo:f,entered:h,leave:d,leaveFrom:g,leaveTo:v,...b}=e,[x,y]=p.useState(null),w=p.useRef(null),$=es(e),R=de(...$?[w,t,y]:t===null?[]:[t]),T=(n=b.unmount)==null||n?_e.Unmount:_e.Hidden,{show:O,appear:S,initial:M}=op(),[k,j]=p.useState(O?"visible":"hidden"),V=ip(),{register:z,unregister:_}=V;J(()=>z(w),[z,w]),J(()=>{if(T===_e.Hidden&&w.current){if(O&&k!=="visible"){j("visible");return}return ce(k,{hidden:()=>_(w),visible:()=>z(w)})}},[k,w,z,_,O,T]);let N=Ql();J(()=>{if($&&N&&k==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,k,N,$]);let H=M&&!S,A=S&&O&&M,C=p.useRef(!1),F=ts(()=>{C.current||(j("hidden"),_(w))},V),q=U(G=>{C.current=!0;let ye=G?"enter":"leave";F.onStart(w,ye,he=>{he==="enter"?i?.():he==="leave"&&s?.()})}),ee=U(G=>{let ye=G?"enter":"leave";C.current=!1,F.onStop(w,ye,he=>{he==="enter"?l?.():he==="leave"&&a?.()}),ye==="leave"&&!kn(F)&&(j("hidden"),_(w))});p.useEffect(()=>{$&&o||(q(O),ee(O))},[O,$,o]);let D=!(!o||!$||!N||H),[,I]=Br(D,x,O,{start:q,end:ee}),te=je({ref:R,className:((r=lr(b.className,A&&u,A&&c,I.enter&&u,I.enter&&I.closed&&c,I.enter&&!I.closed&&f,I.leave&&d,I.leave&&!I.closed&&g,I.leave&&I.closed&&v,!I.transition&&O&&h))==null?void 0:r.trim())||void 0,..._r(I)}),se=0;k==="visible"&&(se|=ae.Open),k==="hidden"&&(se|=ae.Closed),O&&k==="hidden"&&(se|=ae.Opening),!O&&k==="visible"&&(se|=ae.Closing);let B=oe();return p.createElement(Sn.Provider,{value:F},p.createElement(qr,{value:se},B({ourProps:te,theirProps:b,defaultTag:ns,features:rs,visible:k==="visible",name:"Transition.Child"})))}function sp(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,l=p.useRef(null),s=es(e),a=de(...s?[l,t]:t===null?[]:[t]);Ql();let u=Rn();if(n===void 0&&u!==null&&(n=(u&ae.Open)===ae.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,f]=p.useState(n?"visible":"hidden"),h=ts(()=>{n||f("hidden")}),[d,g]=p.useState(!0),v=p.useRef([n]);J(()=>{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]);J(()=>{n?f("visible"):!kn(h)&&l.current!==null&&f("hidden")},[n,h]);let x={unmount:o},y=U(()=>{var R;d&&g(!1),(R=e.beforeEnter)==null||R.call(e)}),w=U(()=>{var R;d&&g(!1),(R=e.beforeLeave)==null||R.call(e)}),$=oe();return p.createElement(Sn.Provider,{value:h},p.createElement($n.Provider,{value:b},$({ourProps:{...x,as:p.Fragment,children:p.createElement(os,{ref:a,...x,...i,beforeEnter:y,beforeLeave:w})},theirProps:{},defaultTag:p.Fragment,features:rs,visible:c==="visible",name:"Transition"})))}function ap(e,t){let n=p.useContext($n)!==null,r=Rn()!==null;return p.createElement(p.Fragment,null,!n&&r?p.createElement(gr,{ref:t,...e}):p.createElement(os,{ref:t,...e}))}let gr=ne(sp),os=ne(lp),up=ne(ap),cp=Object.assign(gr,{Child:up,Root:gr});var Yo;let dp=(Yo=p.startTransition)!=null?Yo:function(e){e()};var fp=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(fp||{}),mp=(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))(mp||{});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}}},Gr=p.createContext(null);Gr.displayName="DisclosureContext";function Kr(e){let t=p.useContext(Gr);if(t===null){let n=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Kr),n}return t}let Yr=p.createContext(null);Yr.displayName="DisclosureAPIContext";function is(e){let t=p.useContext(Yr);if(t===null){let n=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,is),n}return t}let Zr=p.createContext(null);Zr.displayName="DisclosurePanelContext";function hp(){return p.useContext(Zr)}function gp(e,t){return ce(t.type,pp,e,t)}let vp=p.Fragment;function bp(e,t){let{defaultOpen:n=!1,...r}=e,o=p.useRef(null),i=de(t,pl(v=>{o.current=v},e.as===void 0||nt(e.as))),l=p.useReducer(gp,{disclosureState:n?0:1,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:s,buttonId:a},u]=l,c=U(v=>{u({type:1});let b=Ft(o.current);if(!b||!a)return;let x=v?Be(v)?v:"current"in v&&Be(v.current)?v.current:b.getElementById(a):b.getElementById(a);x?.focus()}),f=p.useMemo(()=>({close:c}),[c]),h=xe({open:s===0,close:c}),d={ref:i},g=oe();return p.createElement(Gr.Provider,{value:l},p.createElement(Yr.Provider,{value:f},p.createElement(bd,{value:c},p.createElement(qr,{value:ce(s,{0:ae.Open,1:ae.Closed})},g({ourProps:d,theirProps:r,slot:h,defaultTag:vp,name:"Disclosure"})))))}let xp="button";function wp(e,t){let n=p.useId(),{id:r=`headlessui-disclosure-button-${n}`,disabled:o=!1,autoFocus:i=!1,...l}=e,[s,a]=Kr("Disclosure.Button"),u=hp(),c=u===null?!1:u===s.panelId,f=p.useRef(null),h=de(f,t,U(M=>{if(!c)return a({type:4,element:M})}));p.useEffect(()=>{if(!c)return a({type:2,buttonId:r}),()=>{a({type:2,buttonId:null})}},[r,a,c]);let d=U(M=>{var k;if(c){if(s.disclosureState===1)return;switch(M.key){case Z.Space:case Z.Enter:M.preventDefault(),M.stopPropagation(),a({type:0}),(k=s.buttonElement)==null||k.focus();break}}else switch(M.key){case Z.Space:case Z.Enter:M.preventDefault(),M.stopPropagation(),a({type:0});break}}),g=U(M=>{M.key===Z.Space&&M.preventDefault()}),v=U(M=>{var k;sr(M.currentTarget)||o||(c?(a({type:0}),(k=s.buttonElement)==null||k.focus()):a({type:0}))}),{isFocusVisible:b,focusProps:x}=Ar({autoFocus:i}),{isHovered:y,hoverProps:w}=Mr({isDisabled:o}),{pressed:$,pressProps:R}=Fr({disabled:o}),T=xe({open:s.disclosureState===0,hover:y,active:$,disabled:o,focus:b,autofocus:i}),O=Pl(e,s.buttonElement),S=St(c?{ref:h,type:O,disabled:o||void 0,autoFocus:i,onKeyDown:d,onClick:v}:{ref:h,id:r,type:O,"aria-expanded":s.disclosureState===0,"aria-controls":s.panelElement?s.panelId:void 0,disabled:o||void 0,autoFocus:i,onKeyDown:d,onKeyUp:g,onClick:v},x,w,R);return oe()({ourProps:S,theirProps:l,slot:T,defaultTag:xp,name:"Disclosure.Button"})}let yp="div",Ep=ot.RenderStrategy|ot.Static;function Cp(e,t){let n=p.useId(),{id:r=`headlessui-disclosure-panel-${n}`,transition:o=!1,...i}=e,[l,s]=Kr("Disclosure.Panel"),{close:a}=is("Disclosure.Panel"),[u,c]=p.useState(null),f=de(t,U(y=>{dp(()=>s({type:5,element:y}))}),c);p.useEffect(()=>(s({type:3,panelId:r}),()=>{s({type:3,panelId:null})}),[r,s]);let h=Rn(),[d,g]=Br(o,u,h!==null?(h&ae.Open)===ae.Open:l.disclosureState===0),v=xe({open:l.disclosureState===0,close:a}),b={ref:f,id:r,..._r(g)},x=oe();return p.createElement(Hm,null,p.createElement(Zr.Provider,{value:l.panelId},x({ourProps:b,theirProps:i,slot:v,defaultTag:yp,features:Ep,visible:d,name:"Disclosure.Panel"})))}let Rp=ne(bp),ls=ne(wp),ss=ne(Cp),$p=Object.assign(Rp,{Button:ls,Panel:ss}),Zo=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Xo(e){var t,n;let r=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!Ne(o))return r;let i=!1;for(let s of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),i=!0;let l=i?(n=o.innerText)!=null?n:"":r;return Zo.test(l)&&(l=l.replace(Zo,"")),l}function Sp(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 l=i.getAttribute("aria-label");return typeof l=="string"?l.trim():Xo(i).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return Xo(e).trim()}function kp(e){let t=p.useRef(""),n=p.useRef("");return U(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(t.current===o)return n.current;let i=Sp(r).trim().toLowerCase();return t.current=o,n.current=i,i})}var Tp=Object.defineProperty,Op=(e,t,n)=>t in e?Tp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jo=(e,t,n)=>(Op(e,typeof t!="symbol"?t+"":t,n),n),le=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(le||{}),He=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(He||{}),tn=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(tn||{}),as=(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))(as||{});function Qo(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=Tl(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 Pp={1(e){if(e.dataRef.current.disabled||e.listboxState===1)return e;let t=e.buttonElement?en.Tracked(Jl(e.buttonElement)):e.buttonPositionState;return{...e,activeOptionIndex:null,pendingFocus:{focus:X.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:en.Idle}},2(e,t){var n,r,o,i,l;if(e.dataRef.current.disabled||e.listboxState===1)return e;let s={...e,searchQuery:"",activationTrigger:(n=t.trigger)!=null?n:1,__demoMode:!1};if(t.focus===X.Nothing)return{...s,activeOptionIndex:null};if(t.focus===X.Specific)return{...s,activeOptionIndex:e.options.findIndex(c=>c.id===t.id)};if(t.focus===X.Previous){let c=e.activeOptionIndex;if(c!==null){let f=e.options[c].dataRef.current.domRef,h=Yt(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{...s,activeOptionIndex:h}}}}else if(t.focus===X.Next){let c=e.activeOptionIndex;if(c!==null){let f=e.options[c].dataRef.current.domRef,h=Yt(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||((l=d.current)==null?void 0:l.nextElementSibling)===null)return{...s,activeOptionIndex:h}}}}let a=Qo(e),u=Yt(t,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:c=>c.id,resolveDisabled:c=>c.dataRef.current.disabled});return{...s,...a,activeOptionIndex:u}},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(l=>{var s;return!l.dataRef.current.disabled&&((s=l.dataRef.current.textValue)==null?void 0:s.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!==X.Nothing&&(r=Yt(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(l=>o?.(l.dataRef.current.value));i!==-1&&(r=i)}}return{...e,options:n,activeOptionIndex:r,pendingFocus:{focus:X.Nothing},pendingShouldSort:!0}},7:(e,t)=>{let n=e.options,r=[],o=new Set(t.options);for(let[i,l]of n.entries())if(o.has(l.id)&&(r.push(i),o.delete(l.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,...Qo(e),pendingShouldSort:!1}:e,11(e){return e.buttonPositionState.kind!=="Tracked"?e:{...e,buttonPositionState:en.Moved}}};class Xr extends yl{constructor(t){super(t),Jo(this,"actions",{onChange:n=>{let{onChange:r,compare:o,mode:i,value:l}=this.state.dataRef.current;return ce(i,{0:()=>r?.(n),1:()=>{let s=l.slice(),a=s.findIndex(u=>o(u,n));return a===-1?s.push(n):s.splice(a,1),r?.(s)}})},registerOption:Bn(()=>{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:Bn(()=>{let n=[];return[r=>n.push(r),()=>{this.send({type:7,options:n.splice(0)})}]}),goToOption:Bn(()=>{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})}}),Jo(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,l=n.options;return i!==null?((o=l[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=Dr.get(null);this.disposables.add(r.on(Cl.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(ep(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 Xr({id:t,dataRef:{current:{}},listboxState:n?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:X.Nothing},frozenValue:!1,__demoMode:n,buttonPositionState:en.Idle})}reduce(t,n){return ce(n.type,Pp,t,n)}}const us=p.createContext(null);function Jr(e){let t=p.useContext(us);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,cs),n}return t}function cs({id:e,__demoMode:t=!1}){let n=p.useMemo(()=>Xr.new({id:e,__demoMode:t}),[]);return Yl(()=>n.dispose()),n}let Tn=p.createContext(null);Tn.displayName="ListboxDataContext";function Dt(e){let t=p.useContext(Tn);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Dt),n}return t}let Lp=p.Fragment;function Mp(e,t){let n=p.useId(),r=hn(),{value:o,defaultValue:i,form:l,name:s,onChange:a,by:u,invalid:c=!1,disabled:f=r||!1,horizontal:h=!1,multiple:d=!1,__demoMode:g=!1,...v}=e;const b=h?"horizontal":"vertical";let x=de(t),y=Gc(i),[w=d?[]:void 0,$]=qc(o,a,y),R=cs({id:n,__demoMode:g}),T=p.useRef({static:!1,hold:!1}),O=p.useRef(new Map),S=wd(u),M=p.useCallback(D=>ce(k.mode,{[He.Multi]:()=>w.some(I=>S(I,D)),[He.Single]:()=>S(w,D)}),[w]),k=xe({value:w,disabled:f,invalid:c,mode:d?He.Multi:He.Single,orientation:b,onChange:$,compare:S,isSelected:M,optionsPropsRef:T,listRef:O});J(()=>{R.state.dataRef.current=k},[k]);let j=fe(R,D=>D.listboxState),V=Dr.get(null),z=fe(V,p.useCallback(D=>V.selectors.isTop(D,n),[V,n])),[_,N]=fe(R,D=>[D.buttonElement,D.optionsElement]);Kd(z,[_,N],(D,I)=>{R.send({type:as.CloseListbox}),kl(I,jr.Loose)||(D.preventDefault(),_?.focus())});let H=xe({open:j===le.Open,disabled:f,invalid:c,value:w}),[A,C]=fd({inherit:!0}),F={ref:x},q=p.useCallback(()=>{if(y!==void 0)return $?.(y)},[$,y]),ee=oe();return p.createElement(C,{value:A,props:{htmlFor:_?.id},slot:{open:j===le.Open,disabled:f}},p.createElement(Dm,null,p.createElement(us.Provider,{value:R},p.createElement(Tn.Provider,{value:k},p.createElement(qr,{value:ce(j,{[le.Open]:ae.Open,[le.Closed]:ae.Closed})},s!=null&&w!=null&&p.createElement(ed,{disabled:f,data:{[s]:w},form:l,onReset:q}),ee({ourProps:F,theirProps:v,slot:H,defaultTag:Lp,name:"Listbox"}))))))}let Ap="button";function Fp(e,t){let n=p.useId(),r=ul(),o=Dt("Listbox.Button"),i=Jr("Listbox.Button"),{id:l=r||`headlessui-listbox-button-${n}`,disabled:s=o.disabled||!1,autoFocus:a=!1,...u}=e,c=de(t,Am(),i.actions.setButtonElement),f=Fm(),[h,d,g]=fe(i,N=>[N.listboxState,N.buttonElement,N.optionsElement]),v=h===le.Open;Xd(v,{trigger:d,action:p.useCallback(N=>{if(d!=null&&d.contains(N.target))return Gt.Ignore;let H=N.target.closest('[role="option"]:not([data-disabled])');return Ne(H)?Gt.Select(H):g!=null&&g.contains(N.target)?Gt.Ignore:Gt.Close},[d,g]),close:i.actions.closeListbox,select:i.actions.selectActiveOption});let b=U(N=>{switch(N.key){case Z.Enter:Kc(N.currentTarget);break;case Z.Space:case Z.ArrowDown:N.preventDefault(),i.actions.openListbox({focus:o.value?X.Nothing:X.First});break;case Z.ArrowUp:N.preventDefault(),i.actions.openListbox({focus:o.value?X.Nothing:X.Last});break}}),x=U(N=>{N.key===Z.Space&&N.preventDefault()}),y=Ed(N=>{var H;i.state.listboxState===le.Open?(Ke.flushSync(()=>i.actions.closeListbox()),(H=i.state.buttonElement)==null||H.focus({preventScroll:!0})):(N.preventDefault(),i.actions.openListbox({focus:X.Nothing}))}),w=U(N=>N.preventDefault()),$=vl([l]),R=ad(),{isFocusVisible:T,focusProps:O}=Ar({autoFocus:a}),{isHovered:S,hoverProps:M}=Mr({isDisabled:s}),{pressed:k,pressProps:j}=Fr({disabled:s}),V=xe({open:h===le.Open,active:k||h===le.Open,disabled:s,invalid:o.invalid,value:o.value,hover:S,focus:T,autofocus:a}),z=fe(i,N=>N.listboxState===le.Open),_=St(f(),{ref:c,id:l,type:Pl(e,d),"aria-haspopup":"listbox","aria-controls":g?.id,"aria-expanded":z,"aria-labelledby":$,"aria-describedby":R,disabled:s||void 0,autoFocus:a,onKeyDown:b,onKeyUp:x,onKeyPress:w},y,O,M,j);return oe()({ourProps:_,theirProps:u,slot:V,defaultTag:Ap,name:"Listbox.Button"})}let ds=p.createContext(!1),Ip="div",Np=ot.RenderStrategy|ot.Static;function Dp(e,t){let n=p.useId(),{id:r=`headlessui-listbox-options-${n}`,anchor:o,portal:i=!1,modal:l=!0,transition:s=!1,...a}=e,u=Mm(o),[c,f]=p.useState(null);u&&(i=!0);let h=Dt("Listbox.Options"),d=Jr("Listbox.Options"),[g,v,b,x]=fe(d,B=>[B.listboxState,B.buttonElement,B.optionsElement,B.__demoMode]),y=dr(v),w=dr(b),$=Rn(),[R,T]=Br(s,c,$!==null?($&ae.Open)===ae.Open:g===le.Open);Nd(R,v,d.actions.closeListbox);let O=x?!1:l&&g===le.Open;of(O,w);let S=x?!1:l&&g===le.Open;Id(S,{allowed:p.useCallback(()=>[v,b],[v,b])});let M=fe(d,d.selectors.didButtonMove)?!1:R,k=fe(d,d.selectors.hasFrozenValue)&&!e.static,j=Kl(k,h.value),V=p.useCallback(B=>h.compare(j,B),[h.compare,j]),z=fe(d,B=>{var G;if(u==null||!((G=u?.to)!=null&&G.includes("selection")))return null;let ye=B.options.findIndex(he=>V(he.dataRef.current.value));return ye===-1&&(ye=0),ye}),_=(()=>{if(u==null)return;if(z===null)return{...u,inner:void 0};let B=Array.from(h.listRef.current.values());return{...u,inner:{listRef:{current:B},index:z}}})(),[N,H]=Nm(_),A=Im(),C=de(t,u?N:null,d.actions.setOptionsElement,f),F=Je();p.useEffect(()=>{let B=b;B&&g===le.Open&&(Fc(B)||B==null||B.focus({preventScroll:!0}))},[g,b]);let q=U(B=>{var G;switch(F.dispose(),B.key){case Z.Space:if(d.state.searchQuery!=="")return B.preventDefault(),B.stopPropagation(),d.actions.search(B.key);case Z.Enter:B.preventDefault(),B.stopPropagation(),d.actions.selectActiveOption();break;case ce(h.orientation,{vertical:Z.ArrowDown,horizontal:Z.ArrowRight}):return B.preventDefault(),B.stopPropagation(),d.actions.goToOption({focus:X.Next});case ce(h.orientation,{vertical:Z.ArrowUp,horizontal:Z.ArrowLeft}):return B.preventDefault(),B.stopPropagation(),d.actions.goToOption({focus:X.Previous});case Z.Home:case Z.PageUp:return B.preventDefault(),B.stopPropagation(),d.actions.goToOption({focus:X.First});case Z.End:case Z.PageDown:return B.preventDefault(),B.stopPropagation(),d.actions.goToOption({focus:X.Last});case Z.Escape:B.preventDefault(),B.stopPropagation(),Ke.flushSync(()=>d.actions.closeListbox()),(G=d.state.buttonElement)==null||G.focus({preventScroll:!0});return;case Z.Tab:B.preventDefault(),B.stopPropagation(),Ke.flushSync(()=>d.actions.closeListbox()),Wd(d.state.buttonElement,B.shiftKey?cr.Previous:cr.Next);break;default:B.key.length===1&&(d.actions.search(B.key),F.setTimeout(()=>d.actions.clearSearch(),350));break}}),ee=fe(d,B=>{var G;return(G=B.buttonElement)==null?void 0:G.id}),D=xe({open:g===le.Open}),I=St(u?A():{},{id:r,ref:C,"aria-activedescendant":fe(d,d.selectors.activeDescendantId),"aria-multiselectable":h.mode===He.Multi?!0:void 0,"aria-labelledby":ee,"aria-orientation":h.orientation,onKeyDown:q,role:"listbox",tabIndex:g===le.Open?0:void 0,style:{...a.style,...H,"--button-width":yd(R,v,!0).width},..._r(T)}),te=oe(),se=p.useMemo(()=>h.mode===He.Multi?h:{...h,isSelected:V},[h,V]);return p.createElement(Qm,{enabled:i?e.static||R:!1,ownerDocument:y},p.createElement(Tn.Provider,{value:se},te({ourProps:I,theirProps:a,slot:D,defaultTag:Ip,features:Np,visible:M,name:"Listbox.Options"})))}let jp="div";function _p(e,t){let n=p.useId(),{id:r=`headlessui-listbox-option-${n}`,disabled:o=!1,value:i,...l}=e,s=p.useContext(ds)===!0,a=Dt("Listbox.Option"),u=Jr("Listbox.Option"),c=fe(u,k=>u.selectors.isActive(k,r)),f=a.isSelected(i),h=p.useRef(null),d=kp(h),g=Qe({disabled:o,value:i,domRef:h,get textValue(){return d()}}),v=de(t,h,k=>{k?a.listRef.current.set(r,k):a.listRef.current.delete(r)}),b=fe(u,k=>u.selectors.shouldScrollIntoView(k,r));J(()=>{if(b)return pe().requestAnimationFrame(()=>{var k,j;(j=(k=h.current)==null?void 0:k.scrollIntoView)==null||j.call(k,{block:"nearest"})})},[b,h]),J(()=>{if(!s)return u.actions.registerOption(r,g),()=>u.actions.unregisterOption(r)},[g,r,s]);let x=U(k=>{if(o)return k.preventDefault();u.actions.selectOption(i)}),y=U(()=>{if(o)return u.actions.goToOption({focus:X.Nothing});u.actions.goToOption({focus:X.Specific,id:r})}),w=lf(),$=U(k=>w.update(k)),R=U(k=>{w.wasMoved(k)&&(o||c&&u.state.activationTrigger===tn.Pointer||u.actions.goToOption({focus:X.Specific,id:r},tn.Pointer))}),T=U(k=>{w.wasMoved(k)&&(o||c&&u.state.activationTrigger===tn.Pointer&&u.actions.goToOption({focus:X.Nothing}))}),O=xe({active:c,focus:c,selected:f,disabled:o,selectedOption:f&&s}),S=s?{}:{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:$,onMouseEnter:$,onPointerMove:R,onMouseMove:R,onPointerLeave:T,onMouseLeave:T},M=oe();return!f&&s?null:M({ourProps:S,theirProps:l,slot:O,defaultTag:jp,name:"Listbox.Option"})}let Bp=p.Fragment;function Hp(e,t){let{options:n,placeholder:r,...o}=e,i={ref:de(t)},l=Dt("ListboxSelectedOption"),s=xe({}),a=l.value===void 0||l.value===null||l.mode===He.Multi&&Array.isArray(l.value)&&l.value.length===0,u=oe();return p.createElement(ds.Provider,{value:!0},u({ourProps:i,theirProps:{...o,children:p.createElement(p.Fragment,null,r&&a?r:n)},slot:s,defaultTag:Bp,name:"ListboxSelectedOption"}))}let Vp=ne(Mp),fs=ne(Fp),zp=gd,ms=ne(Dp),ps=ne(_p),Wp=ne(Hp),Up=Object.assign(Vp,{Button:fs,Label:zp,Options:ms,Option:ps,SelectedOption:Wp});function hs({children:e,className:t,disabled:n=!1,intent:r="primary",...o}){return E.jsx(Uc,{className:re("rounded-md font-bold cursor-pointer px-2",qp(r,!!n),{"opacity-50 cursor-default":n},t),"data-focus":!0,disabled:n,...o,children:e})}function qp(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 Qr({children:e}){return E.jsx(lc,{FallbackComponent:Gp,children:e})}function Gp({error:e,resetErrorBoundary:t}){return E.jsx(kr,{intent:"danger",children:E.jsxs(ue,{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(hs,{intent:"danger",onClick:t,children:"Retry"})]})})}function Pt({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 dn({children:e,onClick:t,to:n,...r}){const o=!!pa(n),[i,l]=p.useTransition(),s=xi();return E.jsx("span",{children:typeof e=="function"?e({isActive:o,isPending:i}):e,"data-link":!0,onClick:a=>{t?.(a),l(()=>{s(n)})},...r})}function Kp({children:e}){return E.jsx("div",{className:"w-full shrink-0 flex flex-col gap-4 py-4 overflow-y-auto",children:e})}function Yp(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Zp(){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 Xp(){return/apple/i.test(navigator.vendor)}function Jp(){return Yp().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Qp(){return Zp().includes("jsdom/")}const eh="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ei(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 vr(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&fr(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function th(e){return"composedPath"in e?e.composedPath()[0]:e.target}function xt(e){return e?.ownerDocument||document}function nh(e){return we(e)&&e.matches(eh)}function rh(e){if(!e||Qp())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function br(e,t){const n=["mouse","pen"];return n.push("",void 0),n.includes(e)}var oh=typeof document<"u",ih=function(){},lt=oh?p.useLayoutEffect:ih;const lh={...m};function Zt(e){const t=m.useRef(e);return lt(()=>{t.current=e}),t}const sh=lh.useInsertionEffect,ah=sh||(e=>e());function wt(e){const t=m.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return ah(()=>{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 uh="data-floating-ui-focusable",ti="active",ni="selected",ch={...m};let ri=!1,dh=0;const oi=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+dh++;function fh(){const[e,t]=m.useState(()=>ri?oi():void 0);return lt(()=>{e==null&&t(oi())},[]),m.useEffect(()=>{ri=!0},[]),e}const mh=ch.useId,ph=mh||fh;let xr;process.env.NODE_ENV!=="production"&&(xr=new Set);function hh(){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=xr)!=null&&e.has(o))){var i;(i=xr)==null||i.add(o),console.error(o)}}function gh(){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 vh=m.createContext(null),bh=m.createContext(null),gs=()=>{var e;return((e=m.useContext(vh))==null?void 0:e.id)||null},vs=()=>m.useContext(bh);function bs(e){return"data-floating-ui-"+e}function ve(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const ii=bs("safe-polygon");function Kn(e,t,n){if(n&&!br(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 Yn(e){return typeof e=="function"?e():e}function xh(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:l}=e,{enabled:s=!0,delay:a=0,handleClose:u=null,mouseOnly:c=!1,restMs:f=0,move:h=!0}=t,d=vs(),g=gs(),v=Zt(u),b=Zt(a),x=Zt(n),y=Zt(f),w=m.useRef(),$=m.useRef(-1),R=m.useRef(),T=m.useRef(-1),O=m.useRef(!0),S=m.useRef(!1),M=m.useRef(()=>{}),k=m.useRef(!1),j=wt(()=>{var A;const C=(A=o.current.openEvent)==null?void 0:A.type;return C?.includes("mouse")&&C!=="mousedown"});m.useEffect(()=>{if(!s)return;function A(C){let{open:F}=C;F||(ve($),ve(T),O.current=!0,k.current=!1)}return i.on("openchange",A),()=>{i.off("openchange",A)}},[s,i]),m.useEffect(()=>{if(!s||!v.current||!n)return;function A(F){j()&&r(!1,F,"hover")}const C=xt(l.floating).documentElement;return C.addEventListener("mouseleave",A),()=>{C.removeEventListener("mouseleave",A)}},[l.floating,n,r,s,v,j]);const V=m.useCallback(function(A,C,F){C===void 0&&(C=!0),F===void 0&&(F="hover");const q=Kn(b.current,"close",w.current);q&&!R.current?(ve($),$.current=window.setTimeout(()=>r(!1,A,F),q)):C&&(ve($),r(!1,A,F))},[b,r]),z=wt(()=>{M.current(),R.current=void 0}),_=wt(()=>{if(S.current){const A=xt(l.floating).body;A.style.pointerEvents="",A.removeAttribute(ii),S.current=!1}}),N=wt(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);m.useEffect(()=>{if(!s)return;function A(D){if(ve($),O.current=!1,c&&!br(w.current)||Yn(y.current)>0&&!Kn(b.current,"open"))return;const I=Kn(b.current,"open",w.current);I?$.current=window.setTimeout(()=>{x.current||r(!0,D,"hover")},I):n||r(!0,D,"hover")}function C(D){if(N()){_();return}M.current();const I=xt(l.floating);if(ve(T),k.current=!1,v.current&&o.current.floatingContext){n||ve($),R.current=v.current({...o.current.floatingContext,tree:d,x:D.clientX,y:D.clientY,onClose(){_(),z(),N()||V(D,!0,"safe-polygon")}});const se=R.current;I.addEventListener("mousemove",se),M.current=()=>{I.removeEventListener("mousemove",se)};return}(w.current!=="touch"||!vr(l.floating,D.relatedTarget))&&V(D)}function F(D){N()||o.current.floatingContext&&(v.current==null||v.current({...o.current.floatingContext,tree:d,x:D.clientX,y:D.clientY,onClose(){_(),z(),N()||V(D)}})(D))}function q(){ve($)}function ee(D){N()||V(D,!1)}if(K(l.domReference)){const D=l.domReference,I=l.floating;return n&&D.addEventListener("mouseleave",F),h&&D.addEventListener("mousemove",A,{once:!0}),D.addEventListener("mouseenter",A),D.addEventListener("mouseleave",C),I&&(I.addEventListener("mouseleave",F),I.addEventListener("mouseenter",q),I.addEventListener("mouseleave",ee)),()=>{n&&D.removeEventListener("mouseleave",F),h&&D.removeEventListener("mousemove",A),D.removeEventListener("mouseenter",A),D.removeEventListener("mouseleave",C),I&&(I.removeEventListener("mouseleave",F),I.removeEventListener("mouseenter",q),I.removeEventListener("mouseleave",ee))}}},[l,s,e,c,h,V,z,_,r,n,x,d,b,v,o,N,y]),lt(()=>{var A;if(s&&n&&(A=v.current)!=null&&(A=A.__options)!=null&&A.blockPointerEvents&&j()){S.current=!0;const F=l.floating;if(K(l.domReference)&&F){var C;const q=xt(l.floating).body;q.setAttribute(ii,"");const ee=l.domReference,D=d==null||(C=d.nodesRef.current.find(I=>I.id===g))==null||(C=C.context)==null?void 0:C.elements.floating;return D&&(D.style.pointerEvents=""),q.style.pointerEvents="none",ee.style.pointerEvents="auto",F.style.pointerEvents="auto",()=>{q.style.pointerEvents="",ee.style.pointerEvents="",F.style.pointerEvents=""}}}},[s,n,g,l,d,v,j]),lt(()=>{n||(w.current=void 0,k.current=!1,z(),_())},[n,z,_]),m.useEffect(()=>()=>{z(),ve($),ve(T),_()},[s,l.domReference,z,_]);const H=m.useMemo(()=>{function A(C){w.current=C.pointerType}return{onPointerDown:A,onPointerEnter:A,onMouseMove(C){const{nativeEvent:F}=C;function q(){!O.current&&!x.current&&r(!0,F,"hover")}c&&!br(w.current)||n||Yn(y.current)===0||k.current&&C.movementX**2+C.movementY**2<2||(ve(T),w.current==="touch"?q():(k.current=!0,T.current=window.setTimeout(q,Yn(y.current))))}}},[c,r,n,x,y]);return m.useMemo(()=>s?{reference:H}:{},[s,H])}function wh(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=ph(),i=m.useRef({}),[l]=m.useState(()=>gh()),s=gs()!=null;if(process.env.NODE_ENV!=="production"){const d=r.reference;d&&!K(d)&&hh("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,u]=m.useState(r.reference),c=wt((d,g,v)=>{i.current.openEvent=d?g:void 0,l.emit("openchange",{open:d,event:g,reason:v,nested:s}),n?.(d,g,v)}),f=m.useMemo(()=>({setPositionReference:u}),[]),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:c,elements:h,events:l,floatingId:o,refs:f}),[t,c,h,l,o,f])}function yh(e){e===void 0&&(e={});const{nodeId:t}=e,n=wh({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,l]=m.useState(null),[s,a]=m.useState(null),c=o?.domReference||i,f=m.useRef(null),h=vs();lt(()=>{c&&(f.current=c)},[c]);const d=zl({...e,elements:{...o,...s&&{reference:s}}}),g=m.useCallback(w=>{const $=K(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;a($),d.refs.setReference($)},[d.refs]),v=m.useCallback(w=>{(K(w)||w===null)&&(f.current=w,l(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:c}),[d.elements,c]),y=m.useMemo(()=>({...d,...r,refs:b,elements:x,nodeId:t}),[d,b,x,t,r]);return lt(()=>{r.dataRef.current.floatingContext=y;const w=h?.nodesRef.current.find($=>$.id===t);w&&(w.context=y)}),m.useMemo(()=>({...d,context:y,refs:b,elements:x}),[d,b,x,y])}function Zn(){return Jp()&&Xp()}function Eh(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:l}=e,{enabled:s=!0,visibleOnly:a=!0}=t,u=m.useRef(!1),c=m.useRef(-1),f=m.useRef(!0);m.useEffect(()=>{if(!s)return;const d=me(l.domReference);function g(){!n&&we(l.domReference)&&l.domReference===ei(xt(l.domReference))&&(u.current=!0)}function v(){f.current=!0}function b(){f.current=!1}return d.addEventListener("blur",g),Zn()&&(d.addEventListener("keydown",v,!0),d.addEventListener("pointerdown",b,!0)),()=>{d.removeEventListener("blur",g),Zn()&&(d.removeEventListener("keydown",v,!0),d.removeEventListener("pointerdown",b,!0))}},[l.domReference,n,s]),m.useEffect(()=>{if(!s)return;function d(g){let{reason:v}=g;(v==="reference-press"||v==="escape-key")&&(u.current=!0)}return o.on("openchange",d),()=>{o.off("openchange",d)}},[o,s]),m.useEffect(()=>()=>{ve(c)},[]);const h=m.useMemo(()=>({onMouseLeave(){u.current=!1},onFocus(d){if(u.current)return;const g=th(d.nativeEvent);if(a&&K(g)){if(Zn()&&!d.relatedTarget){if(!f.current&&!nh(g))return}else if(!rh(g))return}r(!0,d.nativeEvent,"focus")},onBlur(d){u.current=!1;const g=d.relatedTarget,v=d.nativeEvent,b=K(g)&&g.hasAttribute(bs("focus-guard"))&&g.getAttribute("data-type")==="outside";c.current=window.setTimeout(()=>{var x;const y=ei(l.domReference?l.domReference.ownerDocument:document);!g&&y===l.domReference||vr((x=i.current.floatingContext)==null?void 0:x.refs.floating.current,y)||vr(l.domReference,y)||b||r(!1,v,"focus")})}}),[i,l.domReference,r,a]);return m.useMemo(()=>s?{reference:h}:{},[s,h])}function Xn(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[ti]:l,[ni]:s,...a}=e;i=a}return{...n==="floating"&&{tabIndex:-1,[uh]:""},...i,...t.map(l=>{const s=l?l[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((l,s)=>(s&&Object.entries(s).forEach(a=>{let[u,c]=a;if(!(o&&[ti,ni].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof c=="function"){var f;(f=r.get(u))==null||f.push(c),l[u]=function(){for(var h,d=arguments.length,g=new Array(d),v=0;v<d;v++)g[v]=arguments[v];return(h=r.get(u))==null?void 0:h.map(b=>b(...g)).find(b=>b!==void 0)}}}else l[u]=c}),l),{})}}function Ch(e){e===void 0&&(e=[]);const t=e.map(s=>s?.reference),n=e.map(s=>s?.floating),r=e.map(s=>s?.item),o=m.useCallback(s=>Xn(s,e,"reference"),t),i=m.useCallback(s=>Xn(s,e,"floating"),n),l=m.useCallback(s=>Xn(s,e,"item"),r);return m.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:l}),[o,i,l])}function yt({children:e,className:t,content:n,showOnFocus:r=!1,showOnHover:o=!0}){const[i,l]=p.useState(!1),{refs:s,floatingStyles:a,context:u}=yh({onOpenChange:l,open:i,middleware:[Wr(4),Wl()]}),c=xh(u,{enabled:o}),f=Eh(u,{enabled:r}),{getReferenceProps:h,getFloatingProps:d}=Ch([f,c]),g=v=>{if(r)switch(v.key){case"Escape":{l(!1);break}case"Enter":{l(!0);break}}};return E.jsxs("div",{className:re("group relative flex justify-center",t),onKeyDown:g,children:[E.jsx("div",{ref:s.setReference,...h(),children:e}),i&&E.jsx("div",{className:re("bg-white/80 text-black rounded-md px-2 py-1 shadow-md whitespace-nowrap z-40",t),ref:s.setFloating,style:a,...d(),children:n})]})}function Rh(){const{hide:e}=Li(),{pathname:t}=Fe();return p.useLayoutEffect(()=>{e();const n=document.body.querySelector("[data-main-scrollable]");if(n){const r=setTimeout(()=>{n.scrollTo(0,0)},1);return()=>{clearTimeout(r)}}},[e,t]),null}const $h={"*":p.lazy(()=>Promise.resolve().then(()=>require("./PageNotFound-D_jrycmQ.cjs"))),"/":p.lazy(()=>Promise.resolve().then(()=>require("./GettingStartedRoute-RHOZQuHV.cjs"))),"/support":p.lazy(()=>Promise.resolve().then(()=>require("./SupportRoute-B12GB6Nv.cjs"))),"/versions":p.lazy(()=>Promise.resolve().then(()=>require("./VersionsRoute-Iss3PSr3.cjs")))};function Sh({navLinks:e,overview:t,packageDescription:n,packageName:r,routes:o,showOpenCollectLink:i=!1,versions:l}){const{toggle:s,visible:a}=Li(),u=p.useMemo(()=>({overview:t,packageDescription:n,packageName:r,showOpenCollectLink:i,versions:l}),[t,n,r,i,l]);return E.jsx(Pi.Provider,{value:u,children:E.jsxs(Qa,{children:[E.jsx(Rh,{}),E.jsxs("div",{className:"h-full w-full max-w-350 mx-auto flex flex-col",children:[E.jsxs(ue,{align:"center",className:"h-12 w-full p-4",direction:"row",gap:4,children:[E.jsx(du,{className:"w-8 h-8"}),E.jsxs(ue,{className:"overflow-hidden",align:"center",direction:"row",gap:4,children:[E.jsx(dn,{children:r,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:n})]}),E.jsx("div",{className:"grow"}),E.jsxs(ue,{align:"center",direction:"row",gap:4,children:[l!==void 0&&E.jsx(yt,{content:"Previous versions",children:E.jsx(dn,{"aria-label":"Documentation for other versions",className:"text-xs font-bold text-header-icons! cursor-pointer",to:"/versions",children:E.jsx(Oi,{className:"w-6 h-6"})})}),E.jsx(yt,{content:"NPM package",children:E.jsx(Pt,{"aria-label":"NPM project page",className:"text-header-icons!",href:`https://www.npmjs.com/package/${r}`,children:E.jsx(cu,{className:"w-8 h-8"})})}),E.jsx(yt,{content:"Source code",children:E.jsx(Pt,{"aria-label":"GitHub project page",className:"text-header-icons!",href:`https://github.com/bvaughn/${r}`,children:E.jsx(uu,{className:"w-6 h-6"})})}),E.jsx(yt,{className:"block md:hidden",content:a?"Hide menu":"Show menu",children:E.jsx("button",{"aria-label":"Site navigation menu",className:re("cursor-pointer rounded-lg p-1",{"bg-black/40":!a,"bg-black/50 text-white":a}),onClick:s,children:a?E.jsx(js,{className:"w-6 h-6 fill-current drop-shadow-black/20 drop-shadow-xs"}):E.jsx(ks,{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:!a}),children:E.jsx(Kp,{children:e})}),E.jsx("main",{className:re("w-full bg-black/90 relative overflow-auto",{hidden:a}),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(Pa,{children:Object.entries({...$h,...o}).map(([c,f])=>E.jsx(Ei,{element:E.jsx(Qr,{children:E.jsx(f,{})},c),path:c},c))})})})]})]})]})})}function kh({children:e,className:t,...n}){return E.jsx(Qr,{children:E.jsx("div",{className:`border-lg bg-black/30 text-slate-300 rounded-lg p-2 ${t}`,...n,children:e})})}const Th=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"})),Oh=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"})),Ph=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 Lh({checked:e,children:t,className:n,indeterminate:r,onChange:o,...i}){let l,s;return r?(l=Oh,s="fill-white"):e?(l=Th,s="fill-blue-600"):(l=Ph,s="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(l,{className:s}),t&&E.jsxs(E.Fragment,{children:[" ",t]})]})}function eo({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 jt({className:e,sections:t}){return E.jsx(ue,{className:e,direction:"column",gap:2,children:t.map(({content:n,intent:r},o)=>r?E.jsx(kr,{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))})}const xs={url:"https://github.com/bvaughn/react-lib-tools.git"};function ws(e,t="Assertion error"){if(!e)throw Error(t)}function ys(){const e=p.useContext(Pi);return ws(e,"App must be rendered within a LibraryContextProvider"),e}function to({section:e,title:t}){const{packageName:n}=ys();return E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"text-xl",children:[e&&E.jsxs(E.Fragment,{children:[E.jsx("span",{className:"text-xl whitespace-nowrap",children:e})," ",E.jsx(ai,{className:"size-4 text-slate-400 inline"})," "]}),E.jsx("span",{className:"text-xl",children:t})]}),E.jsx("title",{children:`${n}: ${e?`${e}: ${t}`:t}`})]})}function Mh({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:"mt-2",children:[E.jsx(jt,{sections:e.description}),E.jsx(eo,{className:"mt-2 p-2 flex flex-col",html:e.html})]})]})}function Ah({json:e,section:t}){return E.jsxs(ue,{direction:"column",gap:4,children:[E.jsxs(ue,{align:"center",direction:"row",gap:2,wrap:!0,children:[E.jsx(to,{section:t,title:`${e.name}`}),E.jsx(Pt,{className:"text-sm text-emerald-300 hover:text-white",href:`${xs.url.replace(".git","")}/blob/main/${e.filePath}`,children:E.jsx(si,{className:"inline-block size-4 fill-current"})})]}),E.jsx(jt,{sections:e.description}),E.jsx(ue,{direction:"column",children:E.jsx("dl",{className:"flex flex-col gap-2",children:e.methods.map((n,r)=>E.jsx(Mh,{method:n},r))})})]})}function Fh({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 Ih(){return E.jsxs(ue,{align:"center",className:"text-slate-300",direction:"row",gap:2,children:[E.jsx(Rs,{className:"size-4 animate-spin"}),"Loading..."]})}function Es({children:e,className:t,disabled:n}){return E.jsx(ue,{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 Nh({children:e,className:t,path:n}){return E.jsx(dn,{to:n,children:({isActive:r,isPending:o})=>E.jsx(Es,{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(ue,{align:"center",direction:"row",gap:2,children:e})})})}function Dh({children:e,label:t}){return E.jsxs($p,{as:"section",defaultOpen:!0,children:[E.jsx(ls,{className:"w-full group border-none! data-focus:bg-white/10",children:E.jsxs(Es,{children:[E.jsx("div",{className:"uppercase text-sm font-bold text-white/50",children:t}),E.jsx("div",{className:"grow"}),E.jsx(ai,{className:"size-4 fill-white/60 group-data-hover:fill-white/50 group-data-open:rotate-90"})]})}),E.jsx(ss,{className:"pl-4",children:e})]})}function jh(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 _h({prop:e}){return E.jsxs(E.Fragment,{children:[E.jsx("dt",{className:"mt-6 pl-8 indent-[-1rem]",children:E.jsx(eo,{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(jt,{sections:e.description})})]})}function wr({header:e,props:t}){return t.length===0?null:E.jsxs(ue,{direction:"column",children:[E.jsx("div",{className:"text-lg font-bold",children:e}),E.jsx("dl",{children:t.map(n=>E.jsx(_h,{prop:n},n.name))})]})}function Bh({json:e,section:t}){const{optionalProps:n,requiredProps:r}=p.useMemo(()=>jh(e),[e]);return E.jsxs(ue,{direction:"column",gap:4,children:[E.jsxs(ue,{align:"center",direction:"row",gap:2,wrap:!0,children:[E.jsx(to,{section:t,title:`${e.name} component`}),E.jsx(Pt,{className:"text-sm text-emerald-300 hover:text-white",href:`${xs.url.replace(".git","")}/blob/main/${e.filePath}`,children:E.jsx(si,{className:"inline-block size-4 fill-current"})})]}),E.jsx(jt,{sections:e.description}),E.jsx(wr,{header:"Required props",props:r}),E.jsx(wr,{header:"Optional props",props:n})]})}const Hh=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"})),Vh=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 zh({checked:e,children:t,className:n,name:r,onChange:o,value:i,...l}){let s,a;return e?(s=Hh,a="fill-blue-600"):(s=Vh,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,...l,children:[E.jsx("input",{checked:e,className:"w-0 h-0",name:r,onChange:()=>{o(i)},type:"radio",value:i}),E.jsx(s,{className:a}),t&&E.jsxs(E.Fragment,{children:[" ",t]})]})}function Wh({className:e,defaultValue:t,onChange:n,options:r,placeholder:o="",value:i}){return E.jsx(Up,{value:i??t,onChange:n,children:E.jsxs("div",{className:`relative ${e}`,children:[E.jsxs(fs,{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(Ms,{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(ms,{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((l,s)=>E.jsx(ps,{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:l,children:l.label},s))})})]})})}function Uh(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=Sh;exports.Block=kh;exports.Box=ue;exports.Button=hs;exports.Callout=kr;exports.Checkbox=Lh;exports.Code=eo;exports.ComponentProps=Bh;exports.ComponentPropsSection=wr;exports.DocsSection=jt;exports.ErrorBoundary=Qr;exports.ExternalLink=Pt;exports.Header=to;exports.ImperativeHandle=Ah;exports.Input=Fh;exports.Link=dn;exports.LoadingSpinner=Ih;exports.NavLink=Nh;exports.NavSection=Dh;exports.Radio=zh;exports.Select=Wh;exports.SvgTags=Oi;exports.Tooltip=yt;exports.assert=ws;exports.cn=re;exports.getIntentClassNames=Uh;exports.useLibraryContext=ys;
|
|
8
|
+
//# sourceMappingURL=index-CQs-galX.cjs.map
|