@flarehr/superhero-salpac-profile-admin 1.0.720 → 1.0.721
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.
|
@@ -8,7 +8,7 @@ var __defProp=Object.defineProperty,__typeError=e=>{throw TypeError(e)},__defNor
|
|
|
8
8
|
* LICENSE.md file in the root directory of this source tree.
|
|
9
9
|
*
|
|
10
10
|
* @license MIT
|
|
11
|
-
*/(r.expires)||!Number.isFinite(r.expires.valueOf()))throw new TypeError(`option expires is invalid: ${r.expires}`);o+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(o+="; HttpOnly");r.secure&&(o+="; Secure");r.partitioned&&(o+="; Partitioned");if(r.priority){switch("string"==typeof r.priority?r.priority.toLowerCase():void 0){case"low":o+="; Priority=Low";break;case"medium":o+="; Priority=Medium";break;case"high":o+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${r.priority}`)}}if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:case"strict":o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"none":o+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${r.sameSite}`)}}return o};const po=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,ho=/^[\u0021-\u003A\u003C-\u007E]*$/,fo=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,mo=/^[\u0020-\u003A\u003D-\u007E]*$/,vo=Object.prototype.toString,go=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function _o(e,t,r){do{const r=e.charCodeAt(t);if(32!==r&&9!==r)return t}while(++t<r);return r}function yo(e,t,r){for(;t>r;){const r=e.charCodeAt(--t);if(32!==r&&9!==r)return t+1}return r}function wo(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(yc){return e}}var bo="popstate";function xo(e={}){return function(e,t,r,n={}){let{window:i=document.defaultView,v5Compat:o=!1}=n,a=i.history,s="POP",l=null,c=u();null==c&&(c=0,a.replaceState({...a.state,idx:c},""));function u(){return(a.state||{idx:null}).idx}function d(){s="POP";let e=u(),t=null==e?null:e-c;c=e,l&&l({action:s,location:m.location,delta:t})}function p(e,t){s="PUSH";let n=Co(m.location,e,t);r&&r(n,e),c=u()+1;let d=Eo(n,c),p=m.createHref(n);try{a.pushState(d,"",p)}catch(h){if(h instanceof DOMException&&"DataCloneError"===h.name)throw h;i.location.assign(p)}o&&l&&l({action:s,location:m.location,delta:1})}function h(e,t){s="REPLACE";let n=Co(m.location,e,t);r&&r(n,e),c=u();let i=Eo(n,c),d=m.createHref(n);a.replaceState(i,"",d),o&&l&&l({action:s,location:m.location,delta:0})}function f(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,r="string"==typeof e?e:To(e);return r=r.replace(/ $/,"%20"),ko(t,`No window.location.(origin|href) available to create URL for href: ${r}`),new URL(r,t)}let m={get action(){return s},get location(){return e(i,a)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(bo,d),l=e,()=>{i.removeEventListener(bo,d),l=null}},createHref:e=>t(i,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:p,replace:h,go:e=>a.go(e)};return m}((function(e,t){let{pathname:r="/",search:n="",hash:i=""}=Po(e.location.hash.substring(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),Co("",{pathname:r,search:n,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");n=-1===r?t:t.slice(0,r)}return n+"#"+("string"==typeof t?t:To(t))}),(function(e,t){So("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}),e)}function ko(e,t){if(!1===e||null==e)throw new Error(t)}function So(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(yc){}}}function Eo(e,t){return{usr:e.state,key:e.key,idx:t}}function Co(e,t,r=null,n){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?Po(t):t,state:r,key:t&&t.key||n||Math.random().toString(36).substring(2,10)}}function To({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function Po(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function Ro(e,t,r="/"){return function(e,t,r,n){let i="string"==typeof t?Po(t):t,o=jo(i.pathname||"/",r);if(null==o)return null;let a=Ao(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]));return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let s=null;for(let l=0;null==s&&l<a.length;++l){let e=Uo(o);s=Ho(a[l],e,n)}return s}(e,t,r,!1)}function Ao(e,t=[],r=[],n=""){let i=(e,i,o)=>{let a={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};a.relativePath.startsWith("/")&&(ko(a.relativePath.startsWith(n),`Absolute route path "${a.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),a.relativePath=a.relativePath.slice(n.length));let s=Ko([n,a.relativePath]),l=r.concat(a);e.children&&e.children.length>0&&(ko(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${s}".`),Ao(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:$o(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var r;if(""!==e.path&&(null==(r=e.path)?void 0:r.includes("?")))for(let n of Oo(e.path))i(e,t,n);else i(e,t)})),t}function Oo(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(0===n.length)return i?[o,""]:[o];let a=Oo(n.join("/")),s=[];return s.push(...a.map((e=>""===e?o:[o,e].join("/")))),i&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}var Lo=/^:[\w-]+$/,Mo=3,Fo=2,Io=1,Do=10,Go=-2,No=e=>"*"===e;function $o(e,t){let r=e.split("/"),n=r.length;return r.some(No)&&(n+=Go),t&&(n+=Fo),r.filter((e=>!No(e))).reduce(((e,t)=>e+(Lo.test(t)?Mo:""===t?Io:Do)),n)}function Ho(e,t,r=!1){let{routesMeta:n}=e,i={},o="/",a=[];for(let s=0;s<n.length;++s){let e=n[s],l=s===n.length-1,c="/"===o?t:t.slice(o.length)||"/",u=Wo({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},c),d=e.route;if(!u&&l&&r&&!n[n.length-1].route.index&&(u=Wo({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!u)return null;Object.assign(i,u.params),a.push({params:i,pathname:Ko([o,u.pathname]),pathnameBase:Vo(Ko([o,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(o=Ko([o,u.pathnameBase]))}return a}function Wo(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=function(e,t=!1,r=!0){So("*"===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 n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(n.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,n]}(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce(((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=s[n]||"";a=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const i=s[n];return e[t]=r&&!i?void 0:(i||"").replace(/%2F/g,"/"),e}),{}),pathname:o,pathnameBase:a,pattern:e}}function Uo(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return So(!1,`The URL path "${e}" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function jo(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function Bo(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function zo(e){let t=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t.map(((e,r)=>r===t.length-1?e.pathname:e.pathnameBase))}function qo(e,t,r,n=!1){let i;"string"==typeof e?i=Po(e):(i={...e},ko(!i.pathname||!i.pathname.includes("?"),Bo("?","pathname","search",i)),ko(!i.pathname||!i.pathname.includes("#"),Bo("#","pathname","hash",i)),ko(!i.search||!i.search.includes("#"),Bo("#","search","hash",i)));let o,a=""===e||""===i.pathname,s=a?"/":i.pathname;if(null==s)o=r;else{let e=t.length-1;if(!n&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t="/"){let{pathname:r,search:n="",hash:i=""}="string"==typeof e?Po(e):e,o=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:o,search:Qo(n),hash:Yo(i)}}(i,o),c=s&&"/"!==s&&s.endsWith("/"),u=(a||"."===s)&&r.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}var Ko=e=>e.join("/").replace(/\/\/+/g,"/"),Vo=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Qo=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Yo=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var Xo=["POST","PUT","PATCH","DELETE"];new Set(Xo);var Zo=["GET",...Xo];new Set(Zo);var Jo=at(null);Jo.displayName="DataRouter";var ea=at(null);ea.displayName="DataRouterState";var ta=at({isTransitioning:!1});ta.displayName="ViewTransition",at(new Map).displayName="Fetchers",at(null).displayName="Await";var ra=at(null);ra.displayName="Navigation";var na=at(null);na.displayName="Location";var ia=at({outlet:null,matches:[],isDataRoute:!1});ia.displayName="Route";var oa=at(null);function aa(){return null!=Gt(na)}function sa(){return ko(aa(),"useLocation() may be used only in the context of a <Router> component."),Gt(na).location}oa.displayName="RouteError";var la="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ca(e){Gt(ra).static||Lt(e)}function ua(){let{isDataRoute:e}=Gt(ia);return e?function(){let{router:e}=function(e){let t=Gt(Jo);return ko(t,ya(e)),t}("useNavigate"),t=wa("useNavigate"),r=Mt(!1);return ca((()=>{r.current=!0})),Dt((async(n,i={})=>{So(r.current,la),r.current&&("number"==typeof n?e.navigate(n):await e.navigate(n,{fromRouteId:t,...i}))}),[e,t])}():function(){ko(aa(),"useNavigate() may be used only in the context of a <Router> component.");let e=Gt(Jo),{basename:t,navigator:r}=Gt(ra),{matches:n}=Gt(ia),{pathname:i}=sa(),o=JSON.stringify(zo(n)),a=Mt(!1);return ca((()=>{a.current=!0})),Dt(((n,s={})=>{if(So(a.current,la),!a.current)return;if("number"==typeof n)return void r.go(n);let l=qo(n,JSON.parse(o),i,"path"===s.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:Ko([t,l.pathname])),(s.replace?r.replace:r.push)(l,s.state,s)}),[t,r,o,i,e])}()}var da=at(null);function pa(e){let t=Gt(ia).outlet;return t?De(da.Provider,{value:e},t):t}function ha(e,{relative:t}={}){let{matches:r}=Gt(ia),{pathname:n}=sa(),i=JSON.stringify(zo(r));return It((()=>qo(e,JSON.parse(i),n,"path"===t)),[e,i,n,t])}function fa(e,t,r,n){var i;ko(aa(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=Gt(ra),{matches:a}=Gt(ia),s=a[a.length-1],l=s?s.params:{},c=s?s.pathname:"/",u=s?s.pathnameBase:"/",d=s&&s.route;{let e=d&&d.path||"";xa(c,!d||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) 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.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let p,h=sa();if(t){let e="string"==typeof t?Po(t):t;ko("/"===u||(null==(i=e.pathname)?void 0:i.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${e.pathname}" was given in the \`location\` prop.`),p=e}else p=h;let f=p.pathname||"/",m=f;if("/"!==u){let e=u.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let v=Ro(e,{pathname:m});So(d||null!=v,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),So(null==v||void 0!==v[v.length-1].route.element||void 0!==v[v.length-1].route.Component||void 0!==v[v.length-1].route.lazy,`Matched leaf route at location "${p.pathname}${p.search}${p.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 g=function(e,t=[],r=null){if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let n=e,i=null==r?void 0:r.errors;if(null!=i){let e=n.findIndex((e=>e.route.id&&void 0!==(null==i?void 0:i[e.route.id])));ko(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),n=n.slice(0,Math.min(n.length,e+1))}let o=!1,a=-1;if(r)for(let s=0;s<n.length;s++){let e=n[s];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(a=s),e.route.id){let{loaderData:t,errors:i}=r,s=e.route.loader&&!t.hasOwnProperty(e.route.id)&&(!i||void 0===i[e.route.id]);if(e.route.lazy||s){o=!0,n=a>=0?n.slice(0,a+1):[n[0]];break}}}return n.reduceRight(((e,s,l)=>{let c,u=!1,d=null,p=null;r&&(c=i&&s.route.id?i[s.route.id]:void 0,d=s.route.errorElement||va,o&&(a<0&&0===l?(xa("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),u=!0,p=null):a===l&&(u=!0,p=s.route.hydrateFallbackElement||null)));let h=t.concat(n.slice(0,l+1)),f=()=>{let t;return t=c?d:u?p:s.route.Component?De(s.route.Component,null):s.route.element?s.route.element:e,De(_a,{match:s,routeContext:{outlet:e,matches:h,isDataRoute:null!=r},children:t})};return r&&(s.route.ErrorBoundary||s.route.errorElement||0===l)?De(ga,{location:r.location,revalidation:r.revalidation,component:d,error:c,children:f(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):f()}),null)}(v&&v.map((e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:Ko([u,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:Ko([u,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),a,r,n);return t&&g?De(na.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...p},navigationType:"POP"}},g):g}function ma(){let e=function(){var e;let t=Gt(oa),r=function(e){let t=Gt(ea);return ko(t,ya(e)),t}("useRouteError"),n=wa("useRouteError");if(void 0!==t)return t;return null==(e=r.errors)?void 0:e[n]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=De($e,null,De("p",null,"💿 Hey developer 👋"),De("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",De("code",{style:o},"ErrorBoundary")," or"," ",De("code",{style:o},"errorElement")," prop on your route.")),De($e,null,De("h2",null,"Unexpected Application Error!"),De("h3",{style:{fontStyle:"italic"}},t),r?De("pre",{style:i},r):null,a)}var va=De(ma,null),ga=class extends He{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||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?De(ia.Provider,{value:this.props.routeContext},De(oa.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function _a({routeContext:e,match:t,children:r}){let n=Gt(Jo);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),De(ia.Provider,{value:e},r)}function ya(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function wa(e){let t=function(e){let t=Gt(ia);return ko(t,ya(e)),t}(e),r=t.matches[t.matches.length-1];return ko(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}var ba={};function xa(e,t,r){t||ba[e]||(ba[e]=!0,So(!1,r))}function ka({to:e,replace:t,state:r,relative:n}){ko(aa(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=Gt(ra);So(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=Gt(ia),{pathname:a}=sa(),s=ua(),l=qo(e,zo(o),a,"path"===n),c=JSON.stringify(l);return Ot((()=>{s(JSON.parse(c),{replace:t,state:r,relative:n})}),[s,c,n,t,r]),null}function Sa(e){return pa(e.context)}function Ea(e){ko(!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 Ca({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:i,static:o=!1}){ko(!aa(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=e.replace(/^\/*/,"/"),s=It((()=>({basename:a,navigator:i,static:o,future:{}})),[a,i,o]);"string"==typeof r&&(r=Po(r));let{pathname:l="/",search:c="",hash:u="",state:d=null,key:p="default"}=r,h=It((()=>{let e=jo(l,a);return null==e?null:{location:{pathname:e,search:c,hash:u,state:d,key:p},navigationType:n}}),[a,l,c,u,d,p,n]);return So(null!=h,`<Router basename="${a}"> is not able to match the URL "${l}${c}${u}" because it does not start with the basename, so the <Router> won't render anything.`),null==h?null:De(ra.Provider,{value:s},De(na.Provider,{children:t,value:h}))}function Ta({children:e,location:t}){return fa(Pa(e),t)}function Pa(e,t=[]){let r=[];return ir.forEach(e,((e,n)=>{if(!Dr(e))return;let i=[...t,n];if(e.type===$e)return void r.push.apply(r,Pa(e.props.children,i));ko(e.type===Ea,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ko(!e.props.index||!e.props.children,"An index route cannot have child routes.");let o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=Pa(e.props.children,i)),r.push(o)})),r}Jt((function({routes:e,future:t,state:r}){return fa(e,void 0,r,t)}));var Ra="get",Aa="application/x-www-form-urlencoded";function Oa(e){return null!=e&&"string"==typeof e.tagName}var La=null;var Ma=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Fa(e){return null==e||Ma.has(e)?e:(So(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Aa}"`),null)}function Ia(e,t){let r,n,i,o,a;if(Oa(s=e)&&"form"===s.tagName.toLowerCase()){let a=e.getAttribute("action");n=a?jo(a,t):null,r=e.getAttribute("method")||Ra,i=Fa(e.getAttribute("enctype"))||Aa,o=new FormData(e)}else if(function(e){return Oa(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Oa(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||a.getAttribute("action");if(n=s?jo(s,t):null,r=e.getAttribute("formmethod")||a.getAttribute("method")||Ra,i=Fa(e.getAttribute("formenctype"))||Fa(a.getAttribute("enctype"))||Aa,o=new FormData(a,e),!function(){if(null===La)try{new FormData(document.createElement("form"),0),La=!1}catch(yc){La=!0}return La}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}else t&&o.append(t,n)}}else{if(Oa(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ra,n=null,i=Aa,a=e}var s;return o&&"text/plain"===i&&(a=o,o=void 0),{action:n,method:r.toLowerCase(),encType:i,formData:o,body:a}}function Da(e,t){if(!1===e||null==e)throw new Error(t)}function Ga(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function Na(e,t,r){return function(e,t){let r=new Set;return new Set(t),e.reduce(((e,t)=>{let n=JSON.stringify(function(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}(t));return r.has(n)||(r.add(n),e.push({key:n,link:t})),e}),[])}((await Promise.all(e.map((async e=>{let n=t.routes[e.route.id];if(n){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise((()=>{}))}}(n,r);return e.links?e.links():[]}return[]})))).flat(1).filter(Ga).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}function $a(e,t,r,n,i,o){let a=(e,t)=>!r[t]||e.route.id!==r[t].route.id,s=(e,t)=>{var n;return r[t].pathname!==e.pathname||(null==(n=r[t].route.path)?void 0:n.endsWith("*"))&&r[t].params["*"]!==e.params["*"]};return"assets"===o?t.filter(((e,t)=>a(e,t)||s(e,t))):"data"===o?t.filter(((t,o)=>{var l;let c=n.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(a(t,o)||s(t,o))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:(null==(l=r[0])?void 0:l.params)||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0})):[]}function Ha(e,t){return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let n=[r.module];return r.imports&&(n=n.concat(r.imports)),n})).flat(1),[...new Set(r)];var r}var Wa=at(void 0);function Ua(){let e=Gt(Wa);return Da(e,"You must render this element inside a <HydratedRouter> element"),e}function ja(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Ba({page:e,...t}){let{router:r}=function(){let e=Gt(Jo);return Da(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}(),n=It((()=>Ro(r.routes,e,r.basename)),[r.routes,e,r.basename]);return n?De(za,{page:e,matches:n,...t}):null}function za({page:e,matches:t,...r}){let n=sa(),{manifest:i,routeModules:o}=Ua(),{loaderData:a,matches:s}=function(){let e=Gt(ea);return Da(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}(),l=It((()=>$a(e,t,s,i,n,"data")),[e,t,s,i,n]),c=It((()=>$a(e,t,s,i,n,"assets")),[e,t,s,i,n]),u=It((()=>{if(e===n.pathname+n.search+n.hash)return[];let r=new Set,s=!1;if(t.forEach((e=>{var t;let n=i.routes[e.route.id];n&&n.hasLoader&&(!l.some((t=>t.route.id===e.route.id))&&e.route.id in a&&(null==(t=o[e.route.id])?void 0:t.shouldRevalidate)||n.hasClientLoader?s=!0:r.add(e.route.id))})),0===r.size)return[];let c=function(e){let t="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===t.pathname?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}(e);return s&&r.size>0&&c.searchParams.set("_routes",t.filter((e=>r.has(e.route.id))).map((e=>e.route.id)).join(",")),[c.pathname+c.search]}),[a,n,i,l,t,e,o]),d=It((()=>Ha(c,i)),[c,i]),p=function(e){let{manifest:t,routeModules:r}=Ua(),[n,i]=Rt([]);return Ot((()=>{let n=!1;return Na(e,t,r).then((e=>{n||i(e)})),()=>{n=!0}}),[e,t,r]),n}(c);return De($e,null,u.map((e=>De("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r}))),d.map((e=>De("link",{key:e,rel:"modulepreload",href:e,...r}))),p.map((({key:e,link:t})=>De("link",{key:e,...t}))))}function qa(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}Wa.displayName="FrameworkContext";var Ka="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Ka&&(window.__reactRouterVersion="7.1.1")}catch(yc){}function Va({basename:e,children:t,window:r}){let n=Mt();null==n.current&&(n.current=xo({window:r,v5Compat:!0}));let i=n.current,[o,a]=Rt({action:i.action,location:i.location}),s=Dt((e=>{zr((()=>a(e)))}),[a]);return Lt((()=>i.listen(s)),[i,s]),De(Ca,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:i})}var Qa=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ya=rr((function({onClick:e,discover:t="render",prefetch:r="none",relative:n,reloadDocument:i,replace:o,state:a,target:s,to:l,preventScrollReset:c,viewTransition:u,...d},p){let h,{basename:f}=Gt(ra),m="string"==typeof l&&Qa.test(l),v=!1;if("string"==typeof l&&m&&(h=l,Ka))try{let e=new URL(window.location.href),t=l.startsWith("//")?new URL(e.protocol+l):new URL(l),r=jo(t.pathname,f);t.origin===e.origin&&null!=r?l=r+t.search+t.hash:v=!0}catch(yc){So(!1,`<Link to="${l}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let g=function(e,{relative:t}={}){ko(aa(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=Gt(ra),{hash:i,pathname:o,search:a}=ha(e,{relative:t}),s=o;return"/"!==r&&(s="/"===o?r:Ko([r,o])),n.createHref({pathname:s,search:a,hash:i})}(l,{relative:n}),[_,y,w]=function(e,t){let r=Gt(Wa),[n,i]=Rt(!1),[o,a]=Rt(!1),{onFocus:s,onBlur:l,onMouseEnter:c,onMouseLeave:u,onTouchStart:d}=t,p=Mt(null);Ot((()=>{if("render"===e&&a(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{a(e.isIntersecting)}))}),{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}}),[e]),Ot((()=>{if(n){let e=setTimeout((()=>{a(!0)}),100);return()=>{clearTimeout(e)}}}),[n]);let h=()=>{i(!0)},f=()=>{i(!1),a(!1)};return r?"intent"!==e?[o,p,{}]:[o,p,{onFocus:ja(s,h),onBlur:ja(l,f),onMouseEnter:ja(c,h),onMouseLeave:ja(u,f),onTouchStart:ja(d,h)}]:[!1,p,{}]}(r,d),b=function(e,{target:t,replace:r,state:n,preventScrollReset:i,relative:o,viewTransition:a}={}){let s=ua(),l=sa(),c=ha(e,{relative:o});return Dt((u=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(u,t)){u.preventDefault();let t=void 0!==r?r:To(l)===To(c);s(e,{replace:t,state:n,preventScrollReset:i,relative:o,viewTransition:a})}}),[l,s,c,r,n,t,e,i,o,a])}(l,{replace:o,state:a,target:s,preventScrollReset:c,relative:n,viewTransition:u});let x=De("a",{...d,...w,href:h||g,onClick:v||i?e:function(t){e&&e(t),t.defaultPrevented||b(t)},ref:qa(p,y),target:s,"data-discover":m||"render"!==t?void 0:"true"});return _&&!m?De($e,null,x,De(Ba,{page:g})):x}));Ya.displayName="Link";var Xa=rr((function({"aria-current":e="page",caseSensitive:t=!1,className:r="",end:n=!1,style:i,to:o,viewTransition:a,children:s,...l},c){let u=ha(o,{relative:l.relative}),d=sa(),p=Gt(ea),{navigator:h,basename:f}=Gt(ra),m=null!=p&&function(e,t={}){let r=Gt(ta);ko(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Za("useViewTransitionState"),i=ha(e,{relative:t.relative});if(!r.isTransitioning)return!1;let o=jo(r.currentLocation.pathname,n)||r.currentLocation.pathname,a=jo(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=Wo(i.pathname,a)||null!=Wo(i.pathname,o)}(u)&&!0===a,v=h.encodeLocation?h.encodeLocation(u).pathname:u.pathname,g=d.pathname,_=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(g=g.toLowerCase(),_=_?_.toLowerCase():null,v=v.toLowerCase()),_&&f&&(_=jo(_,f)||_);const y="/"!==v&&v.endsWith("/")?v.length-1:v.length;let w,b=g===v||!n&&g.startsWith(v)&&"/"===g.charAt(y),x=null!=_&&(_===v||!n&&_.startsWith(v)&&"/"===_.charAt(v.length)),k={isActive:b,isPending:x,isTransitioning:m},S=b?e:void 0;w="function"==typeof r?r(k):[r,b?"active":null,x?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let E="function"==typeof i?i(k):i;return De(Ya,{...l,"aria-current":S,className:w,ref:c,style:E,to:o,viewTransition:a},"function"==typeof s?s(k):s)}));function Za(e){let t=Gt(Jo);return ko(t,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}Xa.displayName="NavLink",rr((({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:i,state:o,method:a=Ra,action:s,onSubmit:l,relative:c,preventScrollReset:u,viewTransition:d,...p},h)=>{let f=function(){let{router:e}=Za("useSubmit"),{basename:t}=Gt(ra),r=wa("useRouteId");return Dt((async(n,i={})=>{let{action:o,method:a,encType:s,formData:l,body:c}=Ia(n,t);if(!1===i.navigate){let t=i.fetcherKey||es();await e.fetch(t,r,i.action||o,{preventScrollReset:i.preventScrollReset,formData:l,body:c,formMethod:i.method||a,formEncType:i.encType||s,flushSync:i.flushSync})}else await e.navigate(i.action||o,{preventScrollReset:i.preventScrollReset,formData:l,body:c,formMethod:i.method||a,formEncType:i.encType||s,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})}),[e,t,r])}(),m=function(e,{relative:t}={}){let{basename:r}=Gt(ra),n=Gt(ia);ko(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),o={...ha(e||".",{relative:t})},a=sa();if(null==e){o.search=a.search;let e=new URLSearchParams(o.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let r=e.toString();o.search=r?`?${r}`:""}}e&&"."!==e||!i.route.index||(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index");"/"!==r&&(o.pathname="/"===o.pathname?r:Ko([r,o.pathname]));return To(o)}(s,{relative:c}),v="get"===a.toLowerCase()?"get":"post",g="string"==typeof s&&Qa.test(s);return De("form",{ref:h,method:v,action:m,onSubmit:n?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let n=e.nativeEvent.submitter,s=(null==n?void 0:n.getAttribute("formmethod"))||a;f(n||e.currentTarget,{fetcherKey:t,method:s,navigate:r,replace:i,state:o,relative:c,preventScrollReset:u,viewTransition:d})},...p,"data-discover":g||"render"!==e?void 0:"true"})})).displayName="Form";var Ja=0,es=()=>`__${String(++Ja)}__`;new TextEncoder;var ts=0;function rs(e,t,r,n,i,o){t||(t={});var a,s,l=t;"ref"in t&&(a=t.ref,delete t.ref);var c={type:e,props:l,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--ts,__i:-1,__u:0,__source:i,__self:o};if("function"==typeof e&&(a=e.defaultProps))for(s in a)void 0===l[s]&&(l[s]=a[s]);return we.vnode&&we.vnode(c),c}var ns=$e;function is(e,t,r){return Xi.call(t,"css")?rs(to,Ji(e,t),r):rs(e,t,r)}function os(e,t,r){return Xi.call(t,"css")?rs(to,Ji(e,t),r):rs(e,t,r)}const as=co.span({whiteSpace:"nowrap",borderBottomWidth:"2px",paddingLeft:"0.25rem",paddingRight:"0.25rem",paddingTop:"1rem",paddingBottom:"1rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500"},(({isActive:e})=>e?{cursor:"default","--tw-border-opacity":"1",borderColor:"rgb(99 102 241 / var(--tw-border-opacity))","--tw-text-opacity":"1",color:"rgb(79 70 229 / var(--tw-text-opacity))"}:{cursor:"pointer",borderColor:"transparent","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))",":hover":{"--tw-border-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-border-opacity))","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))"}})),ss=co.span({marginLeft:"0.25rem",display:"inline-flex",width:"1.25rem",alignItems:"center",justifyContent:"center",borderRadius:"9999px",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',fontWeight:"700","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))"},(({isActive:e})=>e?{"--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))"}:{"--tw-bg-opacity":"1",backgroundColor:"rgb(107 114 128 / var(--tw-bg-opacity))",".group:hover &":{"--tw-bg-opacity":"1",backgroundColor:"rgb(55 65 81 / var(--tw-bg-opacity))"}})),ls=({tabs:e})=>is("div",{css:{display:"block"},children:is("div",{css:{borderBottomWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-border-opacity))",paddingBottom:"1rem"},children:is("nav",{"aria-label":"Tabs",css:{marginBottom:"-2px",display:"flex","> :not([hidden]) ~ :not([hidden])":{"--tw-space-x-reverse":"0",marginRight:"calc(2rem * var(--tw-space-x-reverse))",marginLeft:"calc(2rem * calc(1 - var(--tw-space-x-reverse)))"},paddingTop:"1rem"},children:e.map((e=>is(Xa,{to:e.id,children:({isActive:t})=>os(as,{className:"group",isActive:t,children:[e.displayName,void 0!==e.count&&is(ss,{isActive:t,children:e.count})]})},e.id)))})})});var cs=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},us="undefined"==typeof window||"Deno"in globalThis;function ds(){}function ps(e){return"number"==typeof e&&e>=0&&e!==1/0}function hs(e,t){return Math.max(e+(t||0)-Date.now(),0)}function fs(e,t){return"function"==typeof e?e(t):e}function ms(e,t){return"function"==typeof e?e(t):e}function vs(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:a,stale:s}=e;if(a)if(n){if(t.queryHash!==_s(a,t.options))return!1}else if(!ws(t.queryKey,a))return!1;if("all"!==r){const e=t.isActive();if("active"===r&&!e)return!1;if("inactive"===r&&e)return!1}return("boolean"!=typeof s||t.isStale()===s)&&((!i||i===t.state.fetchStatus)&&!(o&&!o(t)))}function gs(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(ys(t.options.mutationKey)!==ys(o))return!1}else if(!ws(t.options.mutationKey,o))return!1}return(!n||t.state.status===n)&&!(i&&!i(t))}function _s(e,t){return((null==t?void 0:t.queryKeyHashFn)||ys)(e)}function ys(e){return JSON.stringify(e,((e,t)=>Ss(t)?Object.keys(t).sort().reduce(((e,r)=>(e[r]=t[r],e)),{}):t))}function ws(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((r=>!ws(e[r],t[r]))))}function bs(e,t){if(e===t)return e;const r=ks(e)&&ks(t);if(r||Ss(e)&&Ss(t)){const n=r?e:Object.keys(e),i=n.length,o=r?t:Object.keys(t),a=o.length,s=r?[]:{};let l=0;for(let c=0;c<a;c++){const i=r?c:o[c];(!r&&n.includes(i)||r)&&void 0===e[i]&&void 0===t[i]?(s[i]=void 0,l++):(s[i]=bs(e[i],t[i]),s[i]===e[i]&&void 0!==e[i]&&l++)}return i===a&&l===i?e:s}return t}function xs(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function ks(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ss(e){if(!Es(e))return!1;const t=e.constructor;if(void 0===t)return!0;const r=t.prototype;return!!Es(r)&&(!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function Es(e){return"[object Object]"===Object.prototype.toString.call(e)}function Cs(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?bs(e,t):t}function Ts(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Ps(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Rs=Symbol();function As(e,t){return!e.queryFn&&(null==t?void 0:t.initialPromise)?()=>t.initialPromise:e.queryFn&&e.queryFn!==Rs?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}var Os=new(n=class extends cs{constructor(){super(),__privateAdd(this,e),__privateAdd(this,t),__privateAdd(this,r),__privateSet(this,r,(e=>{if(!us&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}))}onSubscribe(){__privateGet(this,t)||this.setEventListener(__privateGet(this,r))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=__privateGet(this,t))||e.call(this),__privateSet(this,t,void 0))}setEventListener(e){var n;__privateSet(this,r,e),null==(n=__privateGet(this,t))||n.call(this),__privateSet(this,t,e((e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})))}setFocused(t){__privateGet(this,e)!==t&&(__privateSet(this,e,t),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach((t=>{t(e)}))}isFocused(){var t;return"boolean"==typeof __privateGet(this,e)?__privateGet(this,e):"hidden"!==(null==(t=globalThis.document)?void 0:t.visibilityState)}},e=new WeakMap,t=new WeakMap,r=new WeakMap,n),Ls=new(s=class extends cs{constructor(){super(),__privateAdd(this,i,!0),__privateAdd(this,o),__privateAdd(this,a),__privateSet(this,a,(e=>{if(!us&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}))}onSubscribe(){__privateGet(this,o)||this.setEventListener(__privateGet(this,a))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=__privateGet(this,o))||e.call(this),__privateSet(this,o,void 0))}setEventListener(e){var t;__privateSet(this,a,e),null==(t=__privateGet(this,o))||t.call(this),__privateSet(this,o,e(this.setOnline.bind(this)))}setOnline(e){__privateGet(this,i)!==e&&(__privateSet(this,i,e),this.listeners.forEach((t=>{t(e)})))}isOnline(){return __privateGet(this,i)}},i=new WeakMap,o=new WeakMap,a=new WeakMap,s);function Ms(){let e,t;const r=new Promise(((r,n)=>{e=r,t=n}));function n(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch((()=>{})),r.resolve=t=>{n({status:"fulfilled",value:t}),e(t)},r.reject=e=>{n({status:"rejected",reason:e}),t(e)},r}function Fs(e){return Math.min(1e3*2**e,3e4)}function Is(e){return"online"!==(e??"online")||Ls.isOnline()}var Ds=class extends Error{constructor(e){super("CancelledError"),this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}};function Gs(e){return e instanceof Ds}function Ns(e){let t,r=!1,n=0,i=!1;const o=Ms(),a=()=>Os.isFocused()&&("always"===e.networkMode||Ls.isOnline())&&e.canRun(),s=()=>Is(e.networkMode)&&e.canRun(),l=r=>{var n;i||(i=!0,null==(n=e.onSuccess)||n.call(e,r),null==t||t(),o.resolve(r))},c=r=>{var n;i||(i=!0,null==(n=e.onError)||n.call(e,r),null==t||t(),o.reject(r))},u=()=>new Promise((r=>{var n;t=e=>{(i||a())&&r(e)},null==(n=e.onPause)||n.call(e)})).then((()=>{var r;t=void 0,i||null==(r=e.onContinue)||r.call(e)})),d=()=>{if(i)return;let t;const o=0===n?e.initialPromise:void 0;try{t=o??e.fn()}catch(s){t=Promise.reject(s)}Promise.resolve(t).then(l).catch((t=>{var o;if(i)return;const s=e.retry??(us?0:3),l=e.retryDelay??Fs,p="function"==typeof l?l(n,t):l,h=!0===s||"number"==typeof s&&n<s||"function"==typeof s&&s(n,t);var f;!r&&h?(n++,null==(o=e.onFail)||o.call(e,n,t),(f=p,new Promise((e=>{setTimeout(e,f)}))).then((()=>a()?void 0:u())).then((()=>{r?c(t):d()}))):c(t)}))};return{promise:o,cancel:t=>{var r;i||(c(new Ds(t)),null==(r=e.abort)||r.call(e))},continue:()=>(null==t||t(),o),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:s,start:()=>(s()?d():u().then(d),o)}}var $s=function(){let e=[],t=0,r=e=>{e()},n=e=>{e()},i=e=>setTimeout(e,0);const o=n=>{t?e.push(n):i((()=>{r(n)}))};return{batch:o=>{let a;t++;try{a=o()}finally{t--,t||(()=>{const t=e;e=[],t.length&&i((()=>{n((()=>{t.forEach((e=>{r(e)}))}))}))})()}return a},batchCalls:e=>(...t)=>{o((()=>{e(...t)}))},schedule:o,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{n=e},setScheduler:e=>{i=e}}}(),Hs=(c=class{constructor(){__privateAdd(this,l)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ps(this.gcTime)&&__privateSet(this,l,setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(us?1/0:3e5))}clearGcTimeout(){__privateGet(this,l)&&(clearTimeout(__privateGet(this,l)),__privateSet(this,l,void 0))}},l=new WeakMap,c),Ws=(_=class extends Hs{constructor(e){super(),__privateAdd(this,v),__privateAdd(this,u),__privateAdd(this,d),__privateAdd(this,p),__privateAdd(this,h),__privateAdd(this,f),__privateAdd(this,m),__privateSet(this,m,!1),__privateSet(this,f,e.defaultOptions),this.setOptions(e.options),this.observers=[],__privateSet(this,p,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,__privateSet(this,u,function(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}(this.options)),this.state=e.state??__privateGet(this,u),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return null==(e=__privateGet(this,h))?void 0:e.promise}setOptions(e){this.options={...__privateGet(this,f),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||__privateGet(this,p).remove(this)}setData(e,t){const r=Cs(this.state.data,e,this.options);return __privateMethod(this,v,g).call(this,{data:r,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),r}setState(e,t){__privateMethod(this,v,g).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var t,r;const n=null==(t=__privateGet(this,h))?void 0:t.promise;return null==(r=__privateGet(this,h))||r.cancel(e),n?n.then(ds).catch(ds):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(__privateGet(this,u))}isActive(){return this.observers.some((e=>!1!==ms(e.options.enabled,this)))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rs||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some((e=>e.getCurrentResult().isStale)):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!hs(this.state.dataUpdatedAt,e)}onFocus(){var e;const t=this.observers.find((e=>e.shouldFetchOnWindowFocus()));null==t||t.refetch({cancelRefetch:!1}),null==(e=__privateGet(this,h))||e.continue()}onOnline(){var e;const t=this.observers.find((e=>e.shouldFetchOnReconnect()));null==t||t.refetch({cancelRefetch:!1}),null==(e=__privateGet(this,h))||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),__privateGet(this,p).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter((t=>t!==e)),this.observers.length||(__privateGet(this,h)&&(__privateGet(this,m)?__privateGet(this,h).cancel({revert:!0}):__privateGet(this,h).cancelRetry()),this.scheduleGc()),__privateGet(this,p).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||__privateMethod(this,v,g).call(this,{type:"invalidate"})}fetch(e,t){var r,n,i;if("idle"!==this.state.fetchStatus)if(void 0!==this.state.data&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(__privateGet(this,h))return __privateGet(this,h).continueRetry(),__privateGet(this,h).promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}const o=new AbortController,a=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(__privateSet(this,m,!0),o.signal)})},s={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{const e=As(this.options,t),r={queryKey:this.queryKey,meta:this.meta};return a(r),__privateSet(this,m,!1),this.options.persister?this.options.persister(e,r,this):e(r)}};a(s),null==(r=this.options.behavior)||r.onFetch(s,this),__privateSet(this,d,this.state),"idle"!==this.state.fetchStatus&&this.state.fetchMeta===(null==(n=s.fetchOptions)?void 0:n.meta)||__privateMethod(this,v,g).call(this,{type:"fetch",meta:null==(i=s.fetchOptions)?void 0:i.meta});const l=e=>{var t,r,n,i;Gs(e)&&e.silent||__privateMethod(this,v,g).call(this,{type:"error",error:e}),Gs(e)||(null==(r=(t=__privateGet(this,p).config).onError)||r.call(t,e,this),null==(i=(n=__privateGet(this,p).config).onSettled)||i.call(n,this.state.data,e,this)),this.scheduleGc()};return __privateSet(this,h,Ns({initialPromise:null==t?void 0:t.initialPromise,fn:s.fetchFn,abort:o.abort.bind(o),onSuccess:e=>{var t,r,n,i;if(void 0!==e){try{this.setData(e)}catch(o){return void l(o)}null==(r=(t=__privateGet(this,p).config).onSuccess)||r.call(t,e,this),null==(i=(n=__privateGet(this,p).config).onSettled)||i.call(n,e,this.state.error,this),this.scheduleGc()}else l(new Error(`${this.queryHash} data is undefined`))},onError:l,onFail:(e,t)=>{__privateMethod(this,v,g).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{__privateMethod(this,v,g).call(this,{type:"pause"})},onContinue:()=>{__privateMethod(this,v,g).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),__privateGet(this,h).start()}},u=new WeakMap,d=new WeakMap,p=new WeakMap,h=new WeakMap,f=new WeakMap,m=new WeakMap,v=new WeakSet,g=function(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...Us(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return Gs(r)&&r.revert&&__privateGet(this,d)?{...__privateGet(this,d),fetchStatus:"idle"}:{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),$s.batch((()=>{this.observers.forEach((e=>{e.onQueryUpdate()})),__privateGet(this,p).notify({query:this,type:"updated",action:e})}))},_);function Us(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Is(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}var js=(w=class extends cs{constructor(e={}){super(),__privateAdd(this,y),this.config=e,__privateSet(this,y,new Map)}build(e,t,r){const n=t.queryKey,i=t.queryHash??_s(n,t);let o=this.get(i);return o||(o=new Ws({cache:this,queryKey:n,queryHash:i,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)}),this.add(o)),o}add(e){__privateGet(this,y).has(e.queryHash)||(__privateGet(this,y).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=__privateGet(this,y).get(e.queryHash);t&&(e.destroy(),t===e&&__privateGet(this,y).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){$s.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}get(e){return __privateGet(this,y).get(e)}getAll(){return[...__privateGet(this,y).values()]}find(e){const t={exact:!0,...e};return this.getAll().find((e=>vs(t,e)))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter((t=>vs(e,t))):t}notify(e){$s.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}onFocus(){$s.batch((()=>{this.getAll().forEach((e=>{e.onFocus()}))}))}onOnline(){$s.batch((()=>{this.getAll().forEach((e=>{e.onOnline()}))}))}},y=new WeakMap,w),Bs=(C=class extends Hs{constructor(e){super(),__privateAdd(this,S),__privateAdd(this,b),__privateAdd(this,x),__privateAdd(this,k),this.mutationId=e.mutationId,__privateSet(this,x,e.mutationCache),__privateSet(this,b,[]),this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){__privateGet(this,b).includes(e)||(__privateGet(this,b).push(e),this.clearGcTimeout(),__privateGet(this,x).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){__privateSet(this,b,__privateGet(this,b).filter((t=>t!==e))),this.scheduleGc(),__privateGet(this,x).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){__privateGet(this,b).length||("pending"===this.state.status?this.scheduleGc():__privateGet(this,x).remove(this))}continue(){var e;return(null==(e=__privateGet(this,k))?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var t,r,n,i,o,a,s,l,c,u,d,p,h,f,m,v,g,_,y,w;__privateSet(this,k,Ns({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{__privateMethod(this,S,E).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{__privateMethod(this,S,E).call(this,{type:"pause"})},onContinue:()=>{__privateMethod(this,S,E).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>__privateGet(this,x).canRun(this)}));const b="pending"===this.state.status,C=!__privateGet(this,k).canStart();try{if(!b){__privateMethod(this,S,E).call(this,{type:"pending",variables:e,isPaused:C}),await(null==(r=(t=__privateGet(this,x).config).onMutate)?void 0:r.call(t,e,this));const o=await(null==(i=(n=this.options).onMutate)?void 0:i.call(n,e));o!==this.state.context&&__privateMethod(this,S,E).call(this,{type:"pending",context:o,variables:e,isPaused:C})}const h=await __privateGet(this,k).start();return await(null==(a=(o=__privateGet(this,x).config).onSuccess)?void 0:a.call(o,h,e,this.state.context,this)),await(null==(l=(s=this.options).onSuccess)?void 0:l.call(s,h,e,this.state.context)),await(null==(u=(c=__privateGet(this,x).config).onSettled)?void 0:u.call(c,h,null,this.state.variables,this.state.context,this)),await(null==(p=(d=this.options).onSettled)?void 0:p.call(d,h,null,e,this.state.context)),__privateMethod(this,S,E).call(this,{type:"success",data:h}),h}catch(T){try{throw await(null==(f=(h=__privateGet(this,x).config).onError)?void 0:f.call(h,T,e,this.state.context,this)),await(null==(v=(m=this.options).onError)?void 0:v.call(m,T,e,this.state.context)),await(null==(_=(g=__privateGet(this,x).config).onSettled)?void 0:_.call(g,void 0,T,this.state.variables,this.state.context,this)),await(null==(w=(y=this.options).onSettled)?void 0:w.call(y,void 0,T,e,this.state.context)),T}finally{__privateMethod(this,S,E).call(this,{type:"error",error:T})}}finally{__privateGet(this,x).runNext(this)}}},b=new WeakMap,x=new WeakMap,k=new WeakMap,S=new WeakSet,E=function(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),$s.batch((()=>{__privateGet(this,b).forEach((t=>{t.onMutationUpdate(e)})),__privateGet(this,x).notify({mutation:this,type:"updated",action:e})}))},C);var zs=(R=class extends cs{constructor(e={}){super(),__privateAdd(this,T),__privateAdd(this,P),this.config=e,__privateSet(this,T,new Map),__privateSet(this,P,Date.now())}build(e,t,r){const n=new Bs({mutationCache:this,mutationId:++__privateWrapper(this,P)._,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){const t=qs(e),r=__privateGet(this,T).get(t)??[];r.push(e),__privateGet(this,T).set(t,r),this.notify({type:"added",mutation:e})}remove(e){var t;const r=qs(e);if(__privateGet(this,T).has(r)){const n=null==(t=__privateGet(this,T).get(r))?void 0:t.filter((t=>t!==e));n&&(0===n.length?__privateGet(this,T).delete(r):__privateGet(this,T).set(r,n))}this.notify({type:"removed",mutation:e})}canRun(e){var t;const r=null==(t=__privateGet(this,T).get(qs(e)))?void 0:t.find((e=>"pending"===e.state.status));return!r||r===e}runNext(e){var t;const r=null==(t=__privateGet(this,T).get(qs(e)))?void 0:t.find((t=>t!==e&&t.state.isPaused));return(null==r?void 0:r.continue())??Promise.resolve()}clear(){$s.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}getAll(){return[...__privateGet(this,T).values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find((e=>gs(t,e)))}findAll(e={}){return this.getAll().filter((t=>gs(e,t)))}notify(e){$s.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}resumePausedMutations(){const e=this.getAll().filter((e=>e.state.isPaused));return $s.batch((()=>Promise.all(e.map((e=>e.continue().catch(ds))))))}},T=new WeakMap,P=new WeakMap,R);function qs(e){var t;return(null==(t=e.options.scope)?void 0:t.id)??String(e.mutationId)}function Ks(e){return{onFetch:(t,r)=>{var n,i,o,a,s;const l=t.options,c=null==(o=null==(i=null==(n=t.fetchOptions)?void 0:n.meta)?void 0:i.fetchMore)?void 0:o.direction,u=(null==(a=t.state.data)?void 0:a.pages)||[],d=(null==(s=t.state.data)?void 0:s.pageParams)||[];let p={pages:[],pageParams:[]},h=0;const f=async()=>{let r=!1;const n=As(t.options,t.fetchOptions),i=async(e,i,o)=>{if(r)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);const a={queryKey:t.queryKey,pageParam:i,direction:o?"backward":"forward",meta:t.options.meta};var s;s=a,Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",(()=>{r=!0})),t.signal)});const l=await n(a),{maxPages:c}=t.options,u=o?Ps:Ts;return{pages:u(e.pages,l,c),pageParams:u(e.pageParams,i,c)}};if(c&&u.length){const e="backward"===c,t={pages:u,pageParams:d},r=(e?Qs:Vs)(l,t);p=await i(t,r,e)}else{const t=e??u.length;do{const e=0===h?d[0]??l.initialPageParam:Vs(l,p);if(h>0&&null==e)break;p=await i(p,e),h++}while(h<t)}return p};t.options.persister?t.fetchFn=()=>{var e,n;return null==(n=(e=t.options).persister)?void 0:n.call(e,f,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=f}}}function Vs(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function Qs(e,{pages:t,pageParams:r}){var n;return t.length>0?null==(n=e.getPreviousPageParam)?void 0:n.call(e,t[0],t,r[0],r):void 0}var Ys=(N=class{constructor(e={}){__privateAdd(this,A),__privateAdd(this,O),__privateAdd(this,L),__privateAdd(this,M),__privateAdd(this,F),__privateAdd(this,I),__privateAdd(this,D),__privateAdd(this,G),__privateSet(this,A,e.queryCache||new js),__privateSet(this,O,e.mutationCache||new zs),__privateSet(this,L,e.defaultOptions||{}),__privateSet(this,M,new Map),__privateSet(this,F,new Map),__privateSet(this,I,0)}mount(){__privateWrapper(this,I)._++,1===__privateGet(this,I)&&(__privateSet(this,D,Os.subscribe((async e=>{e&&(await this.resumePausedMutations(),__privateGet(this,A).onFocus())}))),__privateSet(this,G,Ls.subscribe((async e=>{e&&(await this.resumePausedMutations(),__privateGet(this,A).onOnline())}))))}unmount(){var e,t;__privateWrapper(this,I)._--,0===__privateGet(this,I)&&(null==(e=__privateGet(this,D))||e.call(this),__privateSet(this,D,void 0),null==(t=__privateGet(this,G))||t.call(this),__privateSet(this,G,void 0))}isFetching(e){return __privateGet(this,A).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return __privateGet(this,O).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const r=this.defaultQueryOptions({queryKey:e});return null==(t=__privateGet(this,A).get(r.queryHash))?void 0:t.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(void 0===t)return this.fetchQuery(e);{const r=this.defaultQueryOptions(e),n=__privateGet(this,A).build(this,r);return e.revalidateIfStale&&n.isStaleByTime(fs(r.staleTime,n))&&this.prefetchQuery(r),Promise.resolve(t)}}getQueriesData(e){return __privateGet(this,A).findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=__privateGet(this,A).get(n.queryHash),o=function(e,t){return"function"==typeof e?e(t):e}(t,null==i?void 0:i.state.data);if(void 0!==o)return __privateGet(this,A).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return $s.batch((()=>__privateGet(this,A).findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,r)]))))}getQueryState(e){var t;const r=this.defaultQueryOptions({queryKey:e});return null==(t=__privateGet(this,A).get(r.queryHash))?void 0:t.state}removeQueries(e){const t=__privateGet(this,A);$s.batch((()=>{t.findAll(e).forEach((e=>{t.remove(e)}))}))}resetQueries(e,t){const r=__privateGet(this,A),n={type:"active",...e};return $s.batch((()=>(r.findAll(e).forEach((e=>{e.reset()})),this.refetchQueries(n,t))))}cancelQueries(e={},t={}){const r={revert:!0,...t},n=$s.batch((()=>__privateGet(this,A).findAll(e).map((e=>e.cancel(r)))));return Promise.all(n).then(ds).catch(ds)}invalidateQueries(e={},t={}){return $s.batch((()=>{if(__privateGet(this,A).findAll(e).forEach((e=>{e.invalidate()})),"none"===e.refetchType)return Promise.resolve();const r={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(r,t)}))}refetchQueries(e={},t){const r={...t,cancelRefetch:(null==t?void 0:t.cancelRefetch)??!0},n=$s.batch((()=>__privateGet(this,A).findAll(e).filter((e=>!e.isDisabled())).map((e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(ds)),"paused"===e.state.fetchStatus?Promise.resolve():t}))));return Promise.all(n).then(ds)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const r=__privateGet(this,A).build(this,t);return r.isStaleByTime(fs(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ds).catch(ds)}fetchInfiniteQuery(e){return e.behavior=Ks(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ds).catch(ds)}ensureInfiniteQueryData(e){return e.behavior=Ks(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ls.isOnline()?__privateGet(this,O).resumePausedMutations():Promise.resolve()}getQueryCache(){return __privateGet(this,A)}getMutationCache(){return __privateGet(this,O)}getDefaultOptions(){return __privateGet(this,L)}setDefaultOptions(e){__privateSet(this,L,e)}setQueryDefaults(e,t){__privateGet(this,M).set(ys(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...__privateGet(this,M).values()];let r={};return t.forEach((t=>{ws(e,t.queryKey)&&(r={...r,...t.defaultOptions})})),r}setMutationDefaults(e,t){__privateGet(this,F).set(ys(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...__privateGet(this,F).values()];let r={};return t.forEach((t=>{ws(e,t.mutationKey)&&(r={...r,...t.defaultOptions})})),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...__privateGet(this,L).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=_s(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),!0!==t.enabled&&t.queryFn===Rs&&(t.enabled=!1),t}defaultMutationOptions(e){return(null==e?void 0:e._defaulted)?e:{...__privateGet(this,L).mutations,...(null==e?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){__privateGet(this,A).clear(),__privateGet(this,O).clear()}},A=new WeakMap,O=new WeakMap,L=new WeakMap,M=new WeakMap,F=new WeakMap,I=new WeakMap,D=new WeakMap,G=new WeakMap,N),Xs=(ue=class extends cs{constructor(e,t){super(),__privateAdd(this,ee),__privateAdd(this,$),__privateAdd(this,H),__privateAdd(this,W),__privateAdd(this,U),__privateAdd(this,j),__privateAdd(this,B),__privateAdd(this,z),__privateAdd(this,q),__privateAdd(this,K),__privateAdd(this,V),__privateAdd(this,Q),__privateAdd(this,Y),__privateAdd(this,X),__privateAdd(this,Z),__privateAdd(this,J,new Set),this.options=t,__privateSet(this,$,e),__privateSet(this,q,null),__privateSet(this,z,Ms()),this.options.experimental_prefetchInRender||__privateGet(this,z).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(__privateGet(this,H).addObserver(this),Zs(__privateGet(this,H),this.options)?__privateMethod(this,ee,te).call(this):this.updateResult(),__privateMethod(this,ee,oe).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Js(__privateGet(this,H),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Js(__privateGet(this,H),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,__privateMethod(this,ee,ae).call(this),__privateMethod(this,ee,se).call(this),__privateGet(this,H).removeObserver(this)}setOptions(e,t){const r=this.options,n=__privateGet(this,H);if(this.options=__privateGet(this,$).defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof ms(this.options.enabled,__privateGet(this,H)))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");__privateMethod(this,ee,le).call(this),__privateGet(this,H).setOptions(this.options),r._defaulted&&!xs(this.options,r)&&__privateGet(this,$).getQueryCache().notify({type:"observerOptionsUpdated",query:__privateGet(this,H),observer:this});const i=this.hasListeners();i&&el(__privateGet(this,H),n,this.options,r)&&__privateMethod(this,ee,te).call(this),this.updateResult(t),!i||__privateGet(this,H)===n&&ms(this.options.enabled,__privateGet(this,H))===ms(r.enabled,__privateGet(this,H))&&fs(this.options.staleTime,__privateGet(this,H))===fs(r.staleTime,__privateGet(this,H))||__privateMethod(this,ee,re).call(this);const o=__privateMethod(this,ee,ne).call(this);!i||__privateGet(this,H)===n&&ms(this.options.enabled,__privateGet(this,H))===ms(r.enabled,__privateGet(this,H))&&o===__privateGet(this,Z)||__privateMethod(this,ee,ie).call(this,o)}getOptimisticResult(e){const t=__privateGet(this,$).getQueryCache().build(__privateGet(this,$),e),r=this.createResult(t,e);return function(e,t){if(!xs(e.getCurrentResult(),t))return!0;return!1}(this,r)&&(__privateSet(this,U,r),__privateSet(this,B,this.options),__privateSet(this,j,__privateGet(this,H).state)),r}getCurrentResult(){return __privateGet(this,U)}trackResult(e,t){const r={};return Object.keys(e).forEach((n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(n),null==t||t(n),e[n])})})),r}trackProp(e){__privateGet(this,J).add(e)}getCurrentQuery(){return __privateGet(this,H)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=__privateGet(this,$).defaultQueryOptions(e),r=__privateGet(this,$).getQueryCache().build(__privateGet(this,$),t);return r.fetch().then((()=>this.createResult(r,t)))}fetch(e){return __privateMethod(this,ee,te).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then((()=>(this.updateResult(),__privateGet(this,U))))}createResult(e,t){var r;const n=__privateGet(this,H),i=this.options,o=__privateGet(this,U),a=__privateGet(this,j),s=__privateGet(this,B),l=e!==n?e.state:__privateGet(this,W),{state:c}=e;let u,d={...c},p=!1;if(t._optimisticResults){const r=this.hasListeners(),o=!r&&Zs(e,t),a=r&&el(e,n,t,i);(o||a)&&(d={...d,...Us(c.data,e.options)}),"isRestoring"===t._optimisticResults&&(d.fetchStatus="idle")}let{error:h,errorUpdatedAt:f,status:m}=d;if(t.select&&void 0!==d.data)if(o&&d.data===(null==a?void 0:a.data)&&t.select===__privateGet(this,K))u=__privateGet(this,V);else try{__privateSet(this,K,t.select),u=t.select(d.data),u=Cs(null==o?void 0:o.data,u,t),__privateSet(this,V,u),__privateSet(this,q,null)}catch(x){__privateSet(this,q,x)}else u=d.data;if(void 0!==t.placeholderData&&void 0===u&&"pending"===m){let e;if((null==o?void 0:o.isPlaceholderData)&&t.placeholderData===(null==s?void 0:s.placeholderData))e=o.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(null==(r=__privateGet(this,Q))?void 0:r.state.data,__privateGet(this,Q)):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),__privateSet(this,q,null)}catch(x){__privateSet(this,q,x)}void 0!==e&&(m="success",u=Cs(null==o?void 0:o.data,e,t),p=!0)}__privateGet(this,q)&&(h=__privateGet(this,q),u=__privateGet(this,V),f=Date.now(),m="error");const v="fetching"===d.fetchStatus,g="pending"===m,_="error"===m,y=g&&v,w=void 0!==u,b={status:m,fetchStatus:d.fetchStatus,isPending:g,isSuccess:"success"===m,isError:_,isInitialLoading:y,isLoading:y,data:u,dataUpdatedAt:d.dataUpdatedAt,error:h,errorUpdatedAt:f,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:v,isRefetching:v&&!g,isLoadingError:_&&!w,isPaused:"paused"===d.fetchStatus,isPlaceholderData:p,isRefetchError:_&&w,isStale:tl(e,t),refetch:this.refetch,promise:__privateGet(this,z)};if(this.options.experimental_prefetchInRender){const t=e=>{"error"===b.status?e.reject(b.error):void 0!==b.data&&e.resolve(b.data)},r=()=>{const e=__privateSet(this,z,b.promise=Ms());t(e)},i=__privateGet(this,z);switch(i.status){case"pending":e.queryHash===n.queryHash&&t(i);break;case"fulfilled":"error"!==b.status&&b.data===i.value||r();break;case"rejected":"error"===b.status&&b.error===i.reason||r()}}return b}updateResult(e){const t=__privateGet(this,U),r=this.createResult(__privateGet(this,H),this.options);if(__privateSet(this,j,__privateGet(this,H).state),__privateSet(this,B,this.options),void 0!==__privateGet(this,j).data&&__privateSet(this,Q,__privateGet(this,H)),xs(r,t))return;__privateSet(this,U,r);const n={};!1!==(null==e?void 0:e.listeners)&&(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options,r="function"==typeof e?e():e;if("all"===r||!r&&!__privateGet(this,J).size)return!0;const n=new Set(r??__privateGet(this,J));return this.options.throwOnError&&n.add("error"),Object.keys(__privateGet(this,U)).some((e=>{const r=e;return __privateGet(this,U)[r]!==t[r]&&n.has(r)}))})()&&(n.listeners=!0),__privateMethod(this,ee,ce).call(this,{...n,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&__privateMethod(this,ee,oe).call(this)}},$=new WeakMap,H=new WeakMap,W=new WeakMap,U=new WeakMap,j=new WeakMap,B=new WeakMap,z=new WeakMap,q=new WeakMap,K=new WeakMap,V=new WeakMap,Q=new WeakMap,Y=new WeakMap,X=new WeakMap,Z=new WeakMap,J=new WeakMap,ee=new WeakSet,te=function(e){__privateMethod(this,ee,le).call(this);let t=__privateGet(this,H).fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(ds)),t},re=function(){__privateMethod(this,ee,ae).call(this);const e=fs(this.options.staleTime,__privateGet(this,H));if(us||__privateGet(this,U).isStale||!ps(e))return;const t=hs(__privateGet(this,U).dataUpdatedAt,e);__privateSet(this,Y,setTimeout((()=>{__privateGet(this,U).isStale||this.updateResult()}),t+1))},ne=function(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(__privateGet(this,H)):this.options.refetchInterval)??!1},ie=function(e){__privateMethod(this,ee,se).call(this),__privateSet(this,Z,e),!us&&!1!==ms(this.options.enabled,__privateGet(this,H))&&ps(__privateGet(this,Z))&&0!==__privateGet(this,Z)&&__privateSet(this,X,setInterval((()=>{(this.options.refetchIntervalInBackground||Os.isFocused())&&__privateMethod(this,ee,te).call(this)}),__privateGet(this,Z)))},oe=function(){__privateMethod(this,ee,re).call(this),__privateMethod(this,ee,ie).call(this,__privateMethod(this,ee,ne).call(this))},ae=function(){__privateGet(this,Y)&&(clearTimeout(__privateGet(this,Y)),__privateSet(this,Y,void 0))},se=function(){__privateGet(this,X)&&(clearInterval(__privateGet(this,X)),__privateSet(this,X,void 0))},le=function(){const e=__privateGet(this,$).getQueryCache().build(__privateGet(this,$),this.options);if(e===__privateGet(this,H))return;const t=__privateGet(this,H);__privateSet(this,H,e),__privateSet(this,W,e.state),this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))},ce=function(e){$s.batch((()=>{e.listeners&&this.listeners.forEach((e=>{e(__privateGet(this,U))})),__privateGet(this,$).getQueryCache().notify({query:__privateGet(this,H),type:"observerResultsUpdated"})}))},ue);function Zs(e,t){return function(e,t){return!1!==ms(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&Js(e,t,t.refetchOnMount)}function Js(e,t,r){if(!1!==ms(t.enabled,e)){const n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&tl(e,t)}return!1}function el(e,t,r,n){return(e!==t||!1===ms(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&tl(e,r)}function tl(e,t){return!1!==ms(t.enabled,e)&&e.isStaleByTime(fs(t.staleTime,e))}var rl=(_e=class extends cs{constructor(e,t){super(),__privateAdd(this,me),__privateAdd(this,de),__privateAdd(this,pe),__privateAdd(this,he),__privateAdd(this,fe),__privateSet(this,de,e),this.setOptions(t),this.bindMethods(),__privateMethod(this,me,ve).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const r=this.options;this.options=__privateGet(this,de).defaultMutationOptions(e),xs(this.options,r)||__privateGet(this,de).getMutationCache().notify({type:"observerOptionsUpdated",mutation:__privateGet(this,he),observer:this}),(null==r?void 0:r.mutationKey)&&this.options.mutationKey&&ys(r.mutationKey)!==ys(this.options.mutationKey)?this.reset():"pending"===(null==(t=__privateGet(this,he))?void 0:t.state.status)&&__privateGet(this,he).setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||null==(e=__privateGet(this,he))||e.removeObserver(this)}onMutationUpdate(e){__privateMethod(this,me,ve).call(this),__privateMethod(this,me,ge).call(this,e)}getCurrentResult(){return __privateGet(this,pe)}reset(){var e;null==(e=__privateGet(this,he))||e.removeObserver(this),__privateSet(this,he,void 0),__privateMethod(this,me,ve).call(this),__privateMethod(this,me,ge).call(this)}mutate(e,t){var r;return __privateSet(this,fe,t),null==(r=__privateGet(this,he))||r.removeObserver(this),__privateSet(this,he,__privateGet(this,de).getMutationCache().build(__privateGet(this,de),this.options)),__privateGet(this,he).addObserver(this),__privateGet(this,he).execute(e)}},de=new WeakMap,pe=new WeakMap,he=new WeakMap,fe=new WeakMap,me=new WeakSet,ve=function(){var e;const t=(null==(e=__privateGet(this,he))?void 0:e.state)??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};__privateSet(this,pe,{...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset})},ge=function(e){$s.batch((()=>{var t,r,n,i,o,a,s,l;if(__privateGet(this,fe)&&this.hasListeners()){const c=__privateGet(this,pe).variables,u=__privateGet(this,pe).context;"success"===(null==e?void 0:e.type)?(null==(r=(t=__privateGet(this,fe)).onSuccess)||r.call(t,e.data,c,u),null==(i=(n=__privateGet(this,fe)).onSettled)||i.call(n,e.data,null,c,u)):"error"===(null==e?void 0:e.type)&&(null==(a=(o=__privateGet(this,fe)).onError)||a.call(o,e.error,c,u),null==(l=(s=__privateGet(this,fe)).onSettled)||l.call(s,void 0,e.error,c,u))}this.listeners.forEach((e=>{e(__privateGet(this,pe))}))}))},_e),nl=at(void 0),il=e=>{const t=Gt(nl);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ol=({client:e,children:t})=>(Ot((()=>(e.mount(),()=>{e.unmount()})),[e]),rs(nl.Provider,{value:e,children:t})),al=at(!1);al.Provider;var sl=at(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}());function ll(e,t){return"function"==typeof e?e(...t):!!e}function cl(){}var ul=(e,t,r)=>t.fetchOptimistic(e).catch((()=>{r.clearReset()}));function dl(e,t,r){var n,i,o,a,s;const l=il(),c=Gt(al),u=Gt(sl),d=l.defaultQueryOptions(e);null==(i=null==(n=l.getDefaultOptions().queries)?void 0:n._experimental_beforeQuery)||i.call(n,d),d._optimisticResults=c?"isRestoring":"optimistic",(e=>{e.suspense&&(void 0===e.staleTime&&(e.staleTime=1e3),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3)))})(d),((e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))})(d,u),(e=>{Ot((()=>{e.clearReset()}),[e])})(u);const p=!l.getQueryCache().get(d.queryHash),[h]=Rt((()=>new t(l,d))),f=h.getOptimisticResult(d);if(Yr(Dt((e=>{const t=c?cl:h.subscribe($s.batchCalls(e));return h.updateResult(),t}),[h,c]),(()=>h.getCurrentResult())),Ot((()=>{h.setOptions(d,{listeners:!1})}),[d,h]),((e,t)=>(null==e?void 0:e.suspense)&&t.isPending)(d,f))throw ul(d,h,u);if((({result:e,errorResetBoundary:t,throwOnError:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&ll(r,[e.error,n]))({result:f,errorResetBoundary:u,throwOnError:d.throwOnError,query:l.getQueryCache().get(d.queryHash)}))throw f.error;if(null==(a=null==(o=l.getDefaultOptions().queries)?void 0:o._experimental_afterQuery)||a.call(o,d,f),d.experimental_prefetchInRender&&!us&&((e,t)=>e.isLoading&&e.isFetching&&!t)(f,c)){const e=p?ul(d,h,u):null==(s=l.getQueryCache().get(d.queryHash))?void 0:s.promise;null==e||e.catch(cl).finally((()=>{h.updateResult()}))}return d.notifyOnChangeProps?f:h.trackResult(f)}function pl(e,t){return dl(e,Xs)}class hl extends Error{constructor(e,t){super(e),__publicField(this,"_response"),this._response=t,Object.setPrototypeOf(this,hl.prototype)}get response(){return this._response}}const fl=async(e,t,r,n)=>{const i=await fetch(e,{method:r,body:n?JSON.stringify(n):void 0,headers:{"content-type":"application/json","x-app-version":"1.0.720",authorization:`Bearer ${t}`},signal:(null==AbortSignal?void 0:AbortSignal.timeout)&&AbortSignal.timeout(15e3)});if(!i.ok)throw new hl(`[API Error] Status: ${i.status}, ${i.statusText}`,i);return i},ml=async(e,t,r,n)=>{const i=await fl(e,t,r,n);return await i.json()};let vl;const gl=()=>{if(vl)return vl;return vl=new Ys({defaultOptions:{queries:{retry:(e,t)=>{var r;return t instanceof hl&&![401,403].includes((null==(r=t.response)?void 0:r.status)||0)}}}}),vl},_l="linkedProfilesForAccount",yl="salaryPackagedItem",wl="checkProfileSearchAuthorization",bl="invoices",xl=at({account:{accountId:""},backend:{url:"",accessToken:""}}),kl="/salary-packaging/admin/v1.0",Sl=()=>{const e=Gt(xl);return{checkProfileSearchAuthorization:It((()=>(e=>async()=>{const t=new URL(`${e.backend.url}${kl}/accounts/${e.account.accountId}/auth`);return ml(t,e.backend.accessToken,"GET")})(e)),[e]),searchProfilesForAccount:It((()=>(e=>async t=>{const r=new URL(`${e.backend.url}${kl}/accounts/${e.account.accountId}/profile-search?search=${t}`);return ml(r,e.backend.accessToken,"GET")})(e)),[e]),ingestClient:It((()=>(e=>async()=>{const t=new Date;t.setUTCDate((new Date).getUTCDate()-2);const r=new Date;r.setUTCDate((new Date).getUTCDate()+2);const n=new URL(`${e.backend.url}${kl}/ingest/clients`);await fl(n,e.backend.accessToken,"POST",{startDate:t.toISOString().split("T")[0],endDate:r.toISOString().split("T")[0]})})(e)),[e]),linkedProfilesForAccount:It((()=>(e=>async()=>{const t=new URL(`${e.backend.url}${kl}/accounts/${e.account.accountId}/profiles`);return ml(t,e.backend.accessToken,"GET")})(e)),[e]),unlinkProfile:It((()=>(e=>async t=>{const r=new URL(`${e.backend.url}${kl}/accounts/${e.account.accountId}/profiles/${t}/unlink`);await fl(r,e.backend.accessToken,"POST")})(e)),[e]),salaryPackagedItem:It((()=>(e=>async(t,r)=>{const n=new URL(`${e.backend.url}${kl}/accounts/${e.account.accountId}/profiles/${t}/items/${r}`);return ml(n,e.backend.accessToken,"GET")})(e)),[e]),invoices:It((()=>(e=>async()=>{const t=new URL(`${e.backend.url}${kl}/accounts/${e.account.accountId}/invoices`);return ml(t,e.backend.accessToken,"GET")})(e)),[e])}},El=e=>{const{linkedProfilesForAccount:t,checkProfileSearchAuthorization:r}=Sl(),n=pl({queryKey:[_l],queryFn:t}),i=pl({queryKey:[wl],queryFn:r});Ot((()=>{i.error&&e.onError(i.error.message),n.error&&e.onError(n.error.message)}),[i.error,n.error,e]);const o=It((()=>{var e;return[{id:"search",displayName:"Search"},{id:"profiles",displayName:"Linked Profiles",count:null==(e=n.data)?void 0:e.length},{id:"invoices",displayName:"Invoices"}]}),[n.data]);return i.isSuccess&&"Linked"!==i.data.status?is(ka,{to:"unlinked",replace:!0}):i.isSuccess?os(ns,{children:[is(ls,{tabs:o}),is("div",{css:{marginLeft:"1rem",marginTop:"1rem"},children:is(Sa,{})})]}):is("div",{children:"Loading..."})},Cl=e=>is(Eh,{children:is("button",{as:"button",onClick:()=>e.onClick(e.id),css:{display:"inline-flex",alignItems:"center",fill:"var(--fl-color-primary-600)",paddingLeft:"0.25rem",paddingRight:"0.25rem"},children:e.children})}),Tl=e=>is(Sh,{children:is("ul",{css:{listStyleType:"none"},children:e.value.split(",").map((t=>is("li",{children:e.navTo?is(Xa,{css:{"--tw-text-opacity":"1",color:"rgb(79 70 229 / var(--tw-text-opacity))",textDecorationLine:"underline"},to:e.navTo,children:t}):t},t)))})}),Pl="undefined"!=typeof document?Zr.useLayoutEffect:()=>{};const Rl=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},Al=e=>{if(e&&"window"in e&&e.window===e)return e;return Rl(e).defaultView||window};function Ol(e){let t=null;return()=>(null==t&&(t=e()),t)}const Ll=Ol((function(){return e=/^Mac/i,"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform);var e,t})),Ml=Ol((function(){return e=/Android/i,"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent));var e,t}));class Fl{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function Il(e){let t=Mt({isFocused:!1,observer:null});Pl((()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]);let r=function(e){const t=Mt(null);return Pl((()=>{t.current=e}),[e]),Dt(((...e)=>{const r=t.current;return null==r?void 0:r(...e)}),[])}((t=>{null==e||e(t)}));return Dt((e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=e.target,i=e=>{t.current.isFocused=!1,n.disabled&&r(new Fl("blur",e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};n.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver((()=>{if(t.current.isFocused&&n.disabled){var e;null===(e=t.current.observer)||void 0===e||e.disconnect();let r=n===document.activeElement?null:document.activeElement;n.dispatchEvent(new FocusEvent("blur",{relatedTarget:r})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:r}))}})),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}}),[r])}let Dl=null,Gl=new Set,Nl=new Map,$l=!1,Hl=!1;const Wl={Tab:!0,Escape:!0};function Ul(e,t){for(let r of Gl)r(e,t)}function jl(e){$l=!0,function(e){return!(e.metaKey||!Ll()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(Dl="keyboard",Ul("keyboard",e))}function Bl(e){Dl="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||($l=!0,Ul("pointer",e))}function zl(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||(Ml()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType))&&($l=!0,Dl="virtual")}function ql(e){e.target!==window&&e.target!==document&&($l||Hl||(Dl="virtual",Ul("virtual",e)),$l=!1,Hl=!1)}function Kl(){$l=!1,Hl=!0}function Vl(e){if("undefined"==typeof window||Nl.get(Al(e)))return;const t=Al(e),r=Rl(e);let n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){$l=!0,n.apply(this,arguments)},r.addEventListener("keydown",jl,!0),r.addEventListener("keyup",jl,!0),r.addEventListener("click",zl,!0),t.addEventListener("focus",ql,!0),t.addEventListener("blur",Kl,!1),"undefined"!=typeof PointerEvent?(r.addEventListener("pointerdown",Bl,!0),r.addEventListener("pointermove",Bl,!0),r.addEventListener("pointerup",Bl,!0)):(r.addEventListener("mousedown",Bl,!0),r.addEventListener("mousemove",Bl,!0),r.addEventListener("mouseup",Bl,!0)),t.addEventListener("beforeunload",(()=>{Ql(e)}),{once:!0}),Nl.set(t,{focus:n})}const Ql=(e,t)=>{const r=Al(e),n=Rl(e);t&&n.removeEventListener("DOMContentLoaded",t),Nl.has(r)&&(r.HTMLElement.prototype.focus=Nl.get(r).focus,n.removeEventListener("keydown",jl,!0),n.removeEventListener("keyup",jl,!0),n.removeEventListener("click",zl,!0),r.removeEventListener("focus",ql,!0),r.removeEventListener("blur",Kl,!1),"undefined"!=typeof PointerEvent?(n.removeEventListener("pointerdown",Bl,!0),n.removeEventListener("pointermove",Bl,!0),n.removeEventListener("pointerup",Bl,!0)):(n.removeEventListener("mousedown",Bl,!0),n.removeEventListener("mousemove",Bl,!0),n.removeEventListener("mouseup",Bl,!0)),Nl.delete(r))};function Yl(){return"pointer"!==Dl}"undefined"!=typeof document&&function(e){const t=Rl(e);let r;"loading"!==t.readyState?Vl(e):(r=()=>{Vl(e)},t.addEventListener("DOMContentLoaded",r))}();const Xl=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Zl(e,t,r){Vl(),Ot((()=>{let t=(t,n)=>{(function(e,t,r){var n;const i="undefined"!=typeof window?Al(null==r?void 0:r.target).HTMLInputElement:HTMLInputElement,o="undefined"!=typeof window?Al(null==r?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,a="undefined"!=typeof window?Al(null==r?void 0:r.target).HTMLElement:HTMLElement,s="undefined"!=typeof window?Al(null==r?void 0:r.target).KeyboardEvent:KeyboardEvent;return!((e=e||(null==r?void 0:r.target)instanceof i&&!Xl.has(null==r||null===(n=r.target)||void 0===n?void 0:n.type)||(null==r?void 0:r.target)instanceof o||(null==r?void 0:r.target)instanceof a&&(null==r?void 0:r.target.isContentEditable))&&"keyboard"===t&&r instanceof s&&!Wl[r.key])})(!!(null==r?void 0:r.isTextInput),t,n)&&e(Yl())};return Gl.add(t),()=>{Gl.delete(t)}}),t)}let Jl=!1,ec=0;function tc(){Jl=!0,setTimeout((()=>{Jl=!1}),50)}function rc(e){"touch"===e.pointerType&&tc()}function nc(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",rc):document.addEventListener("touchend",tc),ec++,()=>{ec--,ec>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",rc):document.removeEventListener("touchend",tc))}}function ic(e={}){let{autoFocus:t=!1,isTextInput:r,within:n}=e,i=Mt({isFocused:!1,isFocusVisible:t||Yl()}),[o,a]=Rt(!1),[s,l]=Rt((()=>i.current.isFocused&&i.current.isFocusVisible)),c=Dt((()=>l(i.current.isFocused&&i.current.isFocusVisible)),[]),u=Dt((e=>{i.current.isFocused=e,a(e),c()}),[c]);Zl((e=>{i.current.isFocusVisible=e,c()}),[],{isTextInput:r});let{focusProps:d}=function(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:i}=e;const o=Dt((e=>{if(e.target===e.currentTarget)return n&&n(e),i&&i(!1),!0}),[n,i]),a=Il(o),s=Dt((e=>{const t=Rl(e.target);e.target===e.currentTarget&&t.activeElement===e.target&&(r&&r(e),i&&i(!0),a(e))}),[i,r,a]);return{focusProps:{onFocus:!t&&(r||i||n)?s:void 0,onBlur:t||!n&&!i?void 0:o}}}({isDisabled:n,onFocusChange:u}),{focusWithinProps:p}=function(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:i}=e,o=Mt({isFocusWithin:!1}),a=Dt((e=>{o.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(o.current.isFocusWithin=!1,r&&r(e),i&&i(!1))}),[r,i,o]),s=Il(a),l=Dt((e=>{o.current.isFocusWithin||document.activeElement!==e.target||(n&&n(e),i&&i(!0),o.current.isFocusWithin=!0,s(e))}),[n,i,s]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:a}}}({isDisabled:!n,onFocusWithinChange:u});return{isFocused:o,isFocusVisible:s,focusProps:n?p:d}}var oc=Object.defineProperty,ac=(e,t,r)=>(((e,t,r)=>{t in e?oc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);let sc=new class{constructor(){ac(this,"current",this.detect()),ac(this,"handoffState","pending"),ac(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}};function lc(e){return sc.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function cc(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function uc(){let e=[],t={addEventListener:(e,r,n,i)=>(e.addEventListener(r,n,i),t.add((()=>e.removeEventListener(r,n,i)))),requestAnimationFrame(...e){let r=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(r)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let r=setTimeout(...e);return t.add((()=>clearTimeout(r)))},microTask(...e){let r={current:!0};return cc((()=>{r.current&&e[0]()})),t.add((()=>{r.current=!1}))},style(e,t,r){let n=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:r}),this.add((()=>{Object.assign(e.style,{[t]:n})}))},group(e){let t=uc();return e(t),this.add((()=>t.dispose()))},add:t=>(e.includes(t)||e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let t of e.splice(r,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function dc(){let[e]=Rt(uc);return Ot((()=>()=>e.dispose()),[e]),e}let pc=(e,t)=>{sc.isServer?Ot(e,t):Lt(e,t)};function hc(e){let t=Mt(e);return pc((()=>{t.current=e}),[e]),t}let fc=function(e){let t=hc(e);return Zr.useCallback(((...e)=>t.current(...e)),[t])};let mc=at(void 0);function vc(){return Gt(mc)}function gc(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}function _c(e,t,...r){if(e in t){let n=t[e];return"function"==typeof n?n(...r):n}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,_c),n}var yc,wc,bc=((wc=bc||{})[wc.None=0]="None",wc[wc.RenderStrategy=1]="RenderStrategy",wc[wc.Static=2]="Static",wc),xc=((yc=xc||{})[yc.Unmount=0]="Unmount",yc[yc.Hidden=1]="Hidden",yc);function kc(){let e=function(){let e=Mt([]),t=Dt((t=>{for(let r of e.current)null!=r&&("function"==typeof r?r(t):r.current=t)}),[]);return(...r)=>{if(!r.every((e=>null==e)))return e.current=r,t}}();return Dt((t=>function({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:i,visible:o=!0,name:a,mergeRefs:s}){s=null!=s?s:Ec;let l=Cc(t,e);if(o)return Sc(l,r,n,a,s);let c=null!=i?i:0;if(2&c){let{static:e=!1,...t}=l;if(e)return Sc(t,r,n,a,s)}if(1&c){let{unmount:e=!0,...t}=l;return _c(e?0:1,{0:()=>null,1:()=>Sc({...t,hidden:!0,style:{display:"none"}},r,n,a,s)})}return Sc(l,r,n,a,s)}({mergeRefs:e,...t})),[e])}function Sc(e,t={},r,n,i){let{as:o=r,children:a,refName:s="ref",...l}=Ac(e,["unmount","static"]),c=void 0!==e.ref?{[s]:e.ref}:{},u="function"==typeof a?a(t):a;"className"in l&&l.className&&"function"==typeof l.className&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let d={};if(t){let e=!1,r=[];for(let[n,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&r.push(n.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`)));if(e){d["data-headlessui-state"]=r.join(" ");for(let e of r)d[`data-${e}`]=""}}if(o===$e&&(Object.keys(Rc(l)).length>0||Object.keys(Rc(d)).length>0)){if(Dr(u)&&!(Array.isArray(u)&&u.length>1)){let e=u.props,t=null==e?void 0:e.className,r="function"==typeof t?(...e)=>gc(t(...e),l.className):gc(t,l.className),n=r?{className:r}:{},o=Cc(u.props,Rc(Ac(l,["ref"])));for(let i in d)i in o&&delete d[i];return $r(u,Object.assign({},o,d,c,{ref:i(Oc(u),c.ref)},n))}if(Object.keys(Rc(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Rc(l)).concat(Object.keys(Rc(d))).map((e=>` - ${e}`)).join("\n"),"","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((e=>` - ${e}`)).join("\n")].join("\n"))}return De(o,Object.assign({},Ac(l,["ref"]),o!==$e&&c,o!==$e&&d),u)}function Ec(...e){return e.every((e=>null==e))?void 0:t=>{for(let r of e)null!=r&&("function"==typeof r?r(t):r.current=t)}}function Cc(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];if(t.disabled||t["aria-disabled"])for(let n in r)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n)&&(r[n]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let n in r)Object.assign(t,{[n](e,...t){let i=r[n];for(let r of i){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;r(e,...t)}}});return t}function Tc(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];for(let n in r)Object.assign(t,{[n](...e){let t=r[n];for(let r of t)null==r||r(...e)}});return t}function Pc(e){var t;return Object.assign(rr(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Rc(e){let t=Object.assign({},e);for(let r in t)void 0===t[r]&&delete t[r];return t}function Ac(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}function Oc(e){return Zr.version.split(".")[0]>="19"?e.props.ref:e.ref}let Lc=at(void 0);function Mc(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=""===(null==t?void 0:t.getAttribute("disabled"));return(!n||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(r))&&n}let Fc=Symbol();function Ic(...e){let t=Mt(e);Ot((()=>{t.current=e}),[e]);let r=fc((e=>{for(let r of t.current)null!=r&&("function"==typeof r?r(e):r.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[Fc])))?void 0:r}let Dc=at(null);function Gc(){let e=Gt(Dc);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Gc),e}return e}Dc.displayName="DescriptionContext";let Nc=Pc((function(e,t){let r=$t(),n=vc(),{id:i=`headlessui-description-${r}`,...o}=e,a=Gc(),s=Ic(t);pc((()=>a.register(i)),[i,a.register]);let l=n||!1,c=It((()=>({...a.slot,disabled:l})),[a.slot,l]),u={ref:s,...a.props,id:i};return kc()({ourProps:u,theirProps:o,slot:c,defaultTag:"p",name:a.name||"Description"})}));Object.assign(Nc,{});var $c,Hc=(($c=Hc||{}).Space=" ",$c.Enter="Enter",$c.Escape="Escape",$c.Backspace="Backspace",$c.Delete="Delete",$c.ArrowLeft="ArrowLeft",$c.ArrowUp="ArrowUp",$c.ArrowRight="ArrowRight",$c.ArrowDown="ArrowDown",$c.Home="Home",$c.End="End",$c.PageUp="PageUp",$c.PageDown="PageDown",$c.Tab="Tab",$c);let Wc=at(null);function Uc(){let e=Gt(Wc);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Uc),e}return e}function jc({inherit:e=!1}={}){let t=function(){var e,t;let r=null!=(t=null==(e=Gt(Wc))?void 0:e.value)?t:void 0;return r}(),[r,n]=Rt([]),i=e?[t,...r].filter(Boolean):r;return[i.length>0?i.join(" "):void 0,It((()=>function(e){let t=fc((e=>(n((t=>[...t,e])),()=>n((t=>{let r=t.slice(),n=r.indexOf(e);return-1!==n&&r.splice(n,1),r}))))),r=It((()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value})),[t,e.slot,e.name,e.props,e.value]);return Zr.createElement(Wc.Provider,{value:r},e.children)}),[n])]}Wc.displayName="LabelContext";let Bc=Pc((function(e,t){var r;let n=$t(),i=Uc(),o=Gt(Lc),a=vc(),{id:s=`headlessui-label-${n}`,htmlFor:l=(null!=o?o:null==(r=i.props)?void 0:r.htmlFor),passive:c=!1,...u}=e,d=Ic(t);pc((()=>i.register(s)),[s,i.register]);let p=fc((e=>{let t=e.currentTarget;if(t instanceof HTMLLabelElement&&e.preventDefault(),i.props&&"onClick"in i.props&&"function"==typeof i.props.onClick&&i.props.onClick(e),t instanceof HTMLLabelElement){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let r=e.getAttribute("aria-disabled");if("true"===r||""===r)return;(e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}})),h=a||!1,f=It((()=>({...i.slot,disabled:h})),[i.slot,h]),m={ref:d,...i.props,id:s,htmlFor:l,onClick:p};return c&&("onClick"in m&&(delete m.htmlFor,delete m.onClick),"onClick"in u&&delete u.onClick),kc()({ourProps:m,theirProps:u,slot:f,defaultTag:l?"label":"div",name:i.name||"Label"})}));function zc(e,t=!1){let[r,n]=At((()=>({})),{}),i=It((()=>function(e){if(null===e)return{width:0,height:0};let{width:t,height:r}=e.getBoundingClientRect();return{width:t,height:r}}(e)),[e,r]);return pc((()=>{if(!e)return;let t=new ResizeObserver(n);return t.observe(e),()=>{t.disconnect()}}),[e]),t?{width:`${i.width}px`,height:`${i.height}px`}:i}Object.assign(Bc,{});let qc=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}};function Kc(e,t){let r=e(),n=new Set;return{getSnapshot:()=>r,subscribe:e=>(n.add(e),()=>n.delete(e)),dispatch(e,...i){let o=t[e].call(r,...i);o&&(r=o,n.forEach((e=>e())))}}}function Vc(e){return Yr(e.subscribe,e.getSnapshot,e.getSnapshot)}let Qc=new qc((()=>Kc((()=>[]),{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(-1===t)return this;let r=this.slice();return r.splice(t,1),r}})));function Yc(e,t){let r=Qc.get(t),n=$t(),i=Vc(r);if(pc((()=>{if(e)return r.dispatch("ADD",n),()=>r.dispatch("REMOVE",n)}),[r,e]),!e)return!1;let o=i.indexOf(n),a=i.length;return-1===o&&(o=a,a+=1),o===a-1}let Xc=new Map,Zc=new Map;function Jc(e){var t;let r=null!=(t=Zc.get(e))?t:0;return Zc.set(e,r+1),0!==r||(Xc.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>eu(e)}function eu(e){var t;let r=null!=(t=Zc.get(e))?t:1;if(1===r?Zc.delete(e):Zc.set(e,r-1),1!==r)return;let n=Xc.get(e);n&&(null===n["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n["aria-hidden"]),e.inert=n.inert,Xc.delete(e))}let tu=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(","),ru=["[data-autofocus]"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var nu,iu,ou,au=((ou=au||{})[ou.First=1]="First",ou[ou.Previous=2]="Previous",ou[ou.Next=4]="Next",ou[ou.Last=8]="Last",ou[ou.WrapAround=16]="WrapAround",ou[ou.NoScroll=32]="NoScroll",ou[ou.AutoFocus=64]="AutoFocus",ou),su=((iu=su||{})[iu.Error=0]="Error",iu[iu.Overflow=1]="Overflow",iu[iu.Success=2]="Success",iu[iu.Underflow=3]="Underflow",iu),lu=((nu=lu||{})[nu.Previous=-1]="Previous",nu[nu.Next=1]="Next",nu);function cu(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(tu)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}var uu=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(uu||{});function du(e,t=0){var r;return e!==(null==(r=lc(e))?void 0:r.body)&&_c(t,{0:()=>e.matches(tu),1(){let t=e;for(;null!==t;){if(t.matches(tu))return!0;t=t.parentElement}return!1}})}function pu(e){let t=lc(e);uc().nextFrame((()=>{t&&!du(t.activeElement,0)&&function(e){null==e||e.focus({preventScroll:!0})}(e)}))}var hu=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(hu||{});"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));let fu=["textarea","input"].join(",");function mu(e,t=e=>e){return e.slice().sort(((e,r)=>{let n=t(e),i=t(r);if(null===n||null===i)return 0;let o=n.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}function vu(e,t){return function(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:i=[]}={}){let o=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,a=Array.isArray(e)?r?mu(e):e:64&t?function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(ru)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}(e):cu(e);i.length>0&&a.length>1&&(a=a.filter((e=>!i.some((t=>null!=t&&"current"in t?(null==t?void 0:t.current)===e:t===e))))),n=null!=n?n:o.activeElement;let s,l=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,a.indexOf(n))-1;if(4&t)return Math.max(0,a.indexOf(n))+1;if(8&t)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=32&t?{preventScroll:!0}:{},d=0,p=a.length;do{if(d>=p||d+p<=0)return 0;let e=c+d;if(16&t)e=(e+p)%p;else{if(e<0)return 3;if(e>=p)return 1}s=a[e],null==s||s.focus(u),d+=l}while(s!==o.activeElement);return 6&t&&function(e){var t,r;return null!=(r=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,fu))&&r}(s)&&s.select(),2}(cu(),t,{relativeTo:e})}function gu(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function _u(){return gu()||/Android/gi.test(window.navigator.userAgent)}function yu(e,t,r,n){let i=hc(r);Ot((()=>{if(e)return document.addEventListener(t,r,n),()=>document.removeEventListener(t,r,n);function r(e){i.current(e)}}),[e,t,n])}function wu(e,t,r){let n=Yc(e,"outside-click"),i=hc(r),o=Dt((function(e,r){if(e.defaultPrevented)return;let n=r(e);if(null===n||!n.getRootNode().contains(n)||!n.isConnected)return;let o=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of o)if(null!==t&&(t.contains(n)||e.composed&&e.composedPath().includes(t)))return;return!du(n,uu.Loose)&&-1!==n.tabIndex&&e.preventDefault(),i.current(e,n)}),[i,t]),a=Mt(null);yu(n,"pointerdown",(e=>{var t,r;a.current=(null==(r=null==(t=e.composedPath)?void 0:t.call(e))?void 0:r[0])||e.target}),!0),yu(n,"mousedown",(e=>{var t,r;a.current=(null==(r=null==(t=e.composedPath)?void 0:t.call(e))?void 0:r[0])||e.target}),!0),yu(n,"click",(e=>{_u()||a.current&&(o(e,(()=>a.current)),a.current=null)}),!0);let s=Mt({x:0,y:0});yu(n,"touchstart",(e=>{s.current.x=e.touches[0].clientX,s.current.y=e.touches[0].clientY}),!0),yu(n,"touchend",(e=>{let t=e.changedTouches[0].clientX,r=e.changedTouches[0].clientY;if(!(Math.abs(t-s.current.x)>=30||Math.abs(r-s.current.y)>=30))return o(e,(()=>e.target instanceof HTMLElement?e.target:null))}),!0),function(e,t,r,n){let i=hc(r);Ot((()=>{if(e)return window.addEventListener(t,r,n),()=>window.removeEventListener(t,r,n);function r(e){i.current(e)}}),[e,t,n])}(n,"blur",(e=>o(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}function bu(...e){return It((()=>lc(...e)),[...e])}function xu(e,t){return It((()=>{var r;if(e.type)return e.type;let n=null!=(r=e.as)?r:"button";return"string"==typeof n&&"button"===n.toLowerCase()||"BUTTON"===(null==t?void 0:t.tagName)&&!t.hasAttribute("type")?"button":void 0}),[e.type,e.as,t])}function ku(){let e;return{before({doc:t}){var r;let n=t.documentElement,i=null!=(r=t.defaultView)?r:window;e=Math.max(0,i.innerWidth-n.clientWidth)},after({doc:t,d:r}){let n=t.documentElement,i=Math.max(0,n.clientWidth-n.offsetWidth),o=Math.max(0,e-i);r.style(n,"paddingRight",`${o}px`)}}}function Su(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let Eu=Kc((()=>new Map),{PUSH(e,t){var r;let n=null!=(r=this.get(e))?r:{doc:e,count:0,d:uc(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:r}){let n={doc:e,d:t,meta:Su(r)},i=[gu()?{before({doc:e,d:t,meta:r}){function n(e){return r.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var r;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let r=uc();r.style(e.documentElement,"scrollBehavior","auto"),t.add((()=>t.microTask((()=>r.dispose()))))}let i=null!=(r=window.scrollY)?r:window.pageYOffset,o=null;t.addEventListener(e,"click",(t=>{if(t.target instanceof HTMLElement)try{let r=t.target.closest("a");if(!r)return;let{hash:i}=new URL(r.href),a=e.querySelector(i);a&&!n(a)&&(o=a)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(e.target instanceof HTMLElement)if(n(e.target)){let r=e.target;for(;r.parentElement&&n(r.parentElement);)r=r.parentElement;t.style(r,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(e.target instanceof HTMLElement){if("INPUT"===e.target.tagName)return;if(n(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;i!==t&&window.scrollTo(0,i),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)}))}))}}:{},ku(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];i.forEach((({before:e})=>null==e?void 0:e(n))),i.forEach((({after:e})=>null==e?void 0:e(n)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function Cu(e,t,r=()=>[document.body]){!function(e,t,r=()=>({containers:[]})){let n=Vc(Eu),i=t?n.get(t):void 0,o=!!i&&i.count>0;pc((()=>{if(t&&e)return Eu.dispatch("PUSH",t,r),()=>Eu.dispatch("POP",t,r)}),[e,t])}(Yc(e,"scroll-lock"),t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],r]}}))}function Tu(e){return[e.screenX,e.screenY]}Eu.subscribe((()=>{let e=Eu.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let e="hidden"===t.get(r.doc),n=0!==r.count;(n&&!e||!n&&e)&&Eu.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),0===r.count&&Eu.dispatch("TEARDOWN",r)}}));var Pu,Ru;"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"undefined"!=typeof Element&&"test"===(null==(Pu=null==process?void 0:{})?void 0:Pu.NODE_ENV)&&void 0===(null==(Ru=null==Element?void 0:Element.prototype)?void 0:Ru.getAnimations)&&(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("\n")),[]});var Au=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(Au||{});function Ou(e){let t={};for(let r in e)!0===e[r]&&(t[`data-${r}`]="");return t}function Lu(e,t,r,n){let[i,o]=Rt(r),{hasFlag:a,addFlag:s,removeFlag:l}=function(e=0){let[t,r]=Rt(e),n=Dt((e=>r(e)),[t]),i=Dt((e=>r((t=>t|e))),[t]),o=Dt((e=>(t&e)===e),[t]),a=Dt((e=>r((t=>t&~e))),[r]),s=Dt((e=>r((t=>t^e))),[r]);return{flags:t,setFlag:n,addFlag:i,hasFlag:o,removeFlag:a,toggleFlag:s}}(e&&i?3:0),c=Mt(!1),u=Mt(!1),d=dc();return pc((()=>{var i;if(e)return r&&o(!0),t?(null==(i=null==n?void 0:n.start)||i.call(n,r),function(e,{prepare:t,run:r,done:n,inFlight:i}){let o=uc();return function(e,{inFlight:t,prepare:r}){if(null!=t&&t.current)return void r();let n=e.style.transition;e.style.transition="none",r(),e.offsetHeight,e.style.transition=n}(e,{prepare:t,inFlight:i}),o.nextFrame((()=>{r(),o.requestAnimationFrame((()=>{o.add(function(e,t){var r,n;let i=uc();if(!e)return i.dispose;let o=!1;i.add((()=>{o=!0}));let a=null!=(n=null==(r=e.getAnimations)?void 0:r.call(e).filter((e=>e instanceof CSSTransition)))?n:[];return 0===a.length?(t(),i.dispose):(Promise.allSettled(a.map((e=>e.finished))).then((()=>{o||t()})),i.dispose)}(e,n))}))})),o.dispose}(t,{inFlight:c,prepare(){u.current?u.current=!1:u.current=c.current,c.current=!0,!u.current&&(r?(s(3),l(4)):(s(4),l(2)))},run(){u.current?r?(l(3),s(4)):(l(4),s(3)):r?l(1):s(1)},done(){var e;u.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(c.current=!1,l(7),r||o(!1),null==(e=null==n?void 0:n.end)||e.call(n,r))}})):void(r&&s(3))}),[e,r,t,d]),e?[i,{closed:a(1),enter:a(2),leave:a(4),transition:a(2)||a(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Mu(){return"undefined"!=typeof window}function Fu(e){return Gu(e)?(e.nodeName||"").toLowerCase():"#document"}function Iu(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Du(e){var t;return null==(t=(Gu(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Gu(e){return!!Mu()&&(e instanceof Node||e instanceof Iu(e).Node)}function Nu(e){return!!Mu()&&(e instanceof Element||e instanceof Iu(e).Element)}function $u(e){return!!Mu()&&(e instanceof HTMLElement||e instanceof Iu(e).HTMLElement)}function Hu(e){return!(!Mu()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Iu(e).ShadowRoot)}function Wu(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Ku(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function Uu(e){return["table","td","th"].includes(Fu(e))}function ju(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(yc){return!1}}))}function Bu(e){const t=zu(),r=Nu(e)?Ku(e):e;return"none"!==r.transform||"none"!==r.perspective||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","perspective","filter"].some((e=>(r.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(r.contain||"").includes(e)))}function zu(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function qu(e){return["html","body","#document"].includes(Fu(e))}function Ku(e){return Iu(e).getComputedStyle(e)}function Vu(e){return Nu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qu(e){if("html"===Fu(e))return e;const t=e.assignedSlot||e.parentNode||Hu(e)&&e.host||Du(e);return Hu(t)?t.host:t}function Yu(e){const t=Qu(e);return qu(t)?e.ownerDocument?e.ownerDocument.body:e.body:$u(t)&&Wu(t)?t:Yu(t)}function Xu(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const i=Yu(e),o=i===(null==(n=e.ownerDocument)?void 0:n.body),a=Iu(i);if(o){const e=Zu(a);return t.concat(a,a.visualViewport||[],Wu(i)?i:[],e&&r?Xu(e):[])}return t.concat(i,Xu(i,[],r))}function Zu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Ju=Math.min,ed=Math.max,td=Math.round,rd=Math.floor,nd=e=>({x:e,y:e}),id={left:"right",right:"left",bottom:"top",top:"bottom"},od={start:"end",end:"start"};function ad(e,t,r){return ed(e,Ju(t,r))}function sd(e,t){return"function"==typeof e?e(t):e}function ld(e){return e.split("-")[0]}function cd(e){return e.split("-")[1]}function ud(e){return"x"===e?"y":"x"}function dd(e){return"y"===e?"height":"width"}function pd(e){return["top","bottom"].includes(ld(e))?"y":"x"}function hd(e){return ud(pd(e))}function fd(e){return e.replace(/start|end/g,(e=>od[e]))}function md(e){return e.replace(/left|right|bottom|top/g,(e=>id[e]))}function vd(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function gd(e,t,r){let{reference:n,floating:i}=e;const o=pd(t),a=hd(t),s=dd(a),l=ld(t),c="y"===o,u=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,p=n[s]/2-i[s]/2;let h;switch(l){case"top":h={x:u,y:n.y-i.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-i.width,y:d};break;default:h={x:n.x,y:n.y}}switch(cd(t)){case"start":h[a]-=p*(r&&c?-1:1);break;case"end":h[a]+=p*(r&&c?-1:1)}return h}async function _d(e,t){var r;void 0===t&&(t={});const{x:n,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=sd(t,e),f=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(h),m=s[p?"floating"===d?"reference":"floating":d],v=vd(await o.getClippingRect({element:null==(r=await(null==o.isElement?void 0:o.isElement(m)))||r?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),g="floating"===d?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,_=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),y=await(null==o.isElement?void 0:o.isElement(_))&&await(null==o.getScale?void 0:o.getScale(_))||{x:1,y:1},w=vd(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:_,strategy:l}):g);return{top:(v.top-w.top+f.top)/y.y,bottom:(w.bottom-v.bottom+f.bottom)/y.y,left:(v.left-w.left+f.left)/y.x,right:(w.right-v.right+f.right)/y.x}}function yd(e){const t=Ku(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=$u(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,s=td(r)!==o||td(n)!==a;return s&&(r=o,n=a),{width:r,height:n,$:s}}function wd(e){return Nu(e)?e:e.contextElement}function bd(e){const t=wd(e);if(!$u(t))return nd(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:o}=yd(t);let a=(o?td(r.width):r.width)/n,s=(o?td(r.height):r.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const xd=nd(0);function kd(e){const t=Iu(e);return zu()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:xd}function Sd(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const i=e.getBoundingClientRect(),o=wd(e);let a=nd(1);t&&(n?Nu(n)&&(a=bd(n)):a=bd(e));const s=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==Iu(e))&&t}(o,r,n)?kd(o):nd(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,u=i.width/a.x,d=i.height/a.y;if(o){const e=Iu(o),t=n&&Nu(n)?Iu(n):n;let r=e,i=Zu(r);for(;i&&n&&t!==r;){const e=bd(i),t=i.getBoundingClientRect(),n=Ku(i),o=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=o,c+=a,r=Iu(i),i=Zu(r)}}return vd({width:u,height:d,x:l,y:c})}function Ed(e,t){const r=Vu(e).scrollLeft;return t?t.left+r:Sd(Du(e)).left+r}function Cd(e,t,r){void 0===r&&(r=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:Ed(e,n)),y:n.top+t.scrollTop}}function Td(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=Iu(e),n=Du(e),i=r.visualViewport;let o=n.clientWidth,a=n.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const e=zu();(!e||e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}(e,r);else if("document"===t)n=function(e){const t=Du(e),r=Vu(e),n=e.ownerDocument.body,i=ed(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=ed(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Ed(e);const s=-r.scrollTop;return"rtl"===Ku(n).direction&&(a+=ed(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:s}}(Du(e));else if(Nu(t))n=function(e,t){const r=Sd(e,!0,"fixed"===t),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=$u(e)?bd(e):nd(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:n*o.y}}(t,r);else{const r=kd(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return vd(n)}function Pd(e,t){const r=Qu(e);return!(r===t||!Nu(r)||qu(r))&&("fixed"===Ku(r).position||Pd(r,t))}function Rd(e,t,r){const n=$u(t),i=Du(t),o="fixed"===r,a=Sd(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=nd(0);if(n||!n&&!o)if(("body"!==Fu(t)||Wu(i))&&(s=Vu(t)),n){const e=Sd(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=Ed(i));const c=!i||n||o?nd(0):Cd(i,s);return{x:a.left+s.scrollLeft-l.x-c.x,y:a.top+s.scrollTop-l.y-c.y,width:a.width,height:a.height}}function Ad(e){return"static"===Ku(e).position}function Od(e,t){if(!$u(e)||"fixed"===Ku(e).position)return null;if(t)return t(e);let r=e.offsetParent;return Du(e)===r&&(r=r.ownerDocument.body),r}function Ld(e,t){const r=Iu(e);if(ju(e))return r;if(!$u(e)){let t=Qu(e);for(;t&&!qu(t);){if(Nu(t)&&!Ad(t))return t;t=Qu(t)}return r}let n=Od(e,t);for(;n&&Uu(n)&&Ad(n);)n=Od(n,t);return n&&qu(n)&&Ad(n)&&!Bu(n)?r:n||function(e){let t=Qu(e);for(;$u(t)&&!qu(t);){if(Bu(t))return t;if(ju(t))return null;t=Qu(t)}return null}(e)||r}const Md={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const o="fixed"===i,a=Du(n),s=!!t&&ju(t.floating);if(n===a||s&&o)return r;let l={scrollLeft:0,scrollTop:0},c=nd(1);const u=nd(0),d=$u(n);if((d||!d&&!o)&&(("body"!==Fu(n)||Wu(a))&&(l=Vu(n)),$u(n))){const e=Sd(n);c=bd(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}const p=!a||d||o?nd(0):Cd(a,l,!0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:Du,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const o=[..."clippingAncestors"===r?ju(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=Xu(e,[],!1).filter((e=>Nu(e)&&"body"!==Fu(e))),i=null;const o="fixed"===Ku(e).position;let a=o?Qu(e):e;for(;Nu(a)&&!qu(a);){const t=Ku(a),r=Bu(a);r||"fixed"!==t.position||(i=null),(o?!r&&!i:!r&&"static"===t.position&&i&&["absolute","fixed"].includes(i.position)||Wu(a)&&!r&&Pd(e,a))?n=n.filter((e=>e!==a)):i=t,a=Qu(a)}return t.set(e,n),n}(t,this._c):[].concat(r),n],a=o[0],s=o.reduce(((e,r)=>{const n=Td(t,r,i);return e.top=ed(n.top,e.top),e.right=Ju(n.right,e.right),e.bottom=Ju(n.bottom,e.bottom),e.left=ed(n.left,e.left),e}),Td(t,a,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Ld,getElementRects:async function(e){const t=this.getOffsetParent||Ld,r=this.getDimensions,n=await r(e.floating);return{reference:Rd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=yd(e);return{width:t,height:r}},getScale:bd,isElement:Nu,isRTL:function(e){return"rtl"===Ku(e).direction}};function Fd(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,c=wd(e),u=i||o?[...c?Xu(c):[],...Xu(t)]:[];u.forEach((e=>{i&&e.addEventListener("scroll",r,{passive:!0}),o&&e.addEventListener("resize",r)}));const d=c&&s?function(e,t){let r,n=null;const i=Du(e);function o(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),o();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const h={rootMargin:-rd(u)+"px "+-rd(i.clientWidth-(c+d))+"px "+-rd(i.clientHeight-(u+p))+"px "+-rd(c)+"px",threshold:ed(0,Ju(1,l))||1};let f=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!f)return a();t?a(!1,t):r=setTimeout((()=>{a(!1,1e-7)}),1e3)}f=!1}try{n=new IntersectionObserver(m,{...h,root:i.ownerDocument})}catch(yc){n=new IntersectionObserver(m,h)}n.observe(e)}(!0),o}(c,r):null;let p,h=-1,f=null;a&&(f=new ResizeObserver((e=>{let[n]=e;n&&n.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),r()})),c&&!l&&f.observe(c),f.observe(t));let m=l?Sd(e):null;return l&&function t(){const n=Sd(e);!m||n.x===m.x&&n.y===m.y&&n.width===m.width&&n.height===m.height||r();m=n,p=requestAnimationFrame(t)}(),r(),()=>{var e;u.forEach((e=>{i&&e.removeEventListener("scroll",r),o&&e.removeEventListener("resize",r)})),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const Id=_d,Dd=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:o,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:r,platform:n,elements:i}=e,o=await(null==n.isRTL?void 0:n.isRTL(i.floating)),a=ld(r),s=cd(r),l="y"===pd(r),c=["left","top"].includes(a)?-1:1,u=o&&l?-1:1,d=sd(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof f&&(h="end"===s?-1*f:f),l?{x:h*u,y:p*c}:{x:p*c,y:h*u}}(t,e);return a===(null==(r=s.offset)?void 0:r.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},Gd=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=sd(e,t),c={x:r,y:n},u=await _d(t,l),d=pd(ld(i)),p=ud(d);let h=c[p],f=c[d];if(o){const e="y"===p?"bottom":"right";h=ad(h+u["y"===p?"top":"left"],h,h-u[e])}if(a){const e="y"===d?"bottom":"right";f=ad(f+u["y"===d?"top":"left"],f,f-u[e])}const m=s.fn({...t,[p]:h,[d]:f});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[p]:o,[d]:a}}}}}},Nd=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:o,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...v}=sd(e,t);if(null!=(r=o.arrow)&&r.alignmentOffset)return{};const g=ld(i),_=pd(s),y=ld(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),b=p||(y||!m?[md(s)]:function(e){const t=md(e);return[fd(e),t,fd(t)]}(s)),x="none"!==f;!p&&x&&b.push(...function(e,t,r,n){const i=cd(e);let o=function(e,t,r){const n=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?i:n:t?n:i;case"left":case"right":return t?o:a;default:return[]}}(ld(e),"start"===r,n);return i&&(o=o.map((e=>e+"-"+i)),t&&(o=o.concat(o.map(fd)))),o}(s,m,f,w));const k=[s,...b],S=await _d(t,v),E=[];let C=(null==(n=o.flip)?void 0:n.overflows)||[];if(u&&E.push(S[g]),d){const e=function(e,t,r){void 0===r&&(r=!1);const n=cd(e),i=hd(e),o=dd(i);let a="x"===i?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=md(a)),[a,md(a)]}(i,a,w);E.push(S[e[0]],S[e[1]])}if(C=[...C,{placement:i,overflows:E}],!E.every((e=>e<=0))){var T,P;const e=((null==(T=o.flip)?void 0:T.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let r=null==(P=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:P.placement;if(!r)switch(h){case"bestFit":{var R;const e=null==(R=C.filter((e=>{if(x){const t=pd(e.placement);return t===_||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:R[0];e&&(r=e);break}case"initialPlacement":r=s}if(i!==r)return{reset:{placement:r}}}return{}}}},$d=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:o,platform:a,elements:s}=t,{apply:l=()=>{},...c}=sd(e,t),u=await _d(t,c),d=ld(i),p=cd(i),h="y"===pd(i),{width:f,height:m}=o.floating;let v,g;"top"===d||"bottom"===d?(v=d,g=p===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,v="end"===p?"top":"bottom");const _=m-u.top-u.bottom,y=f-u.left-u.right,w=Ju(m-u[v],_),b=Ju(f-u[g],y),x=!t.middlewareData.shift;let k=w,S=b;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(S=y),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(k=_),x&&!p){const e=ed(u.left,0),t=ed(u.right,0),r=ed(u.top,0),n=ed(u.bottom,0);h?S=f-2*(0!==e||0!==t?e+t:ed(u.left,u.right)):k=m-2*(0!==r||0!==n?r+n:ed(u.top,u.bottom))}await l({...t,availableWidth:S,availableHeight:k});const E=await a.getDimensions(s.floating);return f!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}},Hd=(e,t,r)=>{const n=new Map,i={platform:Md,...r},o={...i.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,s=o.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=gd(c,n,l),p=n,h={},f=0;for(let m=0;m<s.length;m++){const{name:r,fn:o}=s[m],{x:v,y:g,data:_,reset:y}=await o({x:u,y:d,initialPlacement:n,placement:p,strategy:i,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=g?g:d,h={...h,[r]:{...h[r],..._}},y&&f<=50&&(f++,"object"==typeof y&&(y.placement&&(p=y.placement),y.rects&&(c=!0===y.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):y.rects),({x:u,y:d}=gd(c,p,l))),m=-1)}return{x:u,y:d,placement:p,strategy:i,middlewareData:h}})(e,t,{...i,platform:o})};var Wd="undefined"!=typeof document?Lt:Ot;function Ud(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!=n--;)if(!Ud(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;0!=n--;){const r=i[n];if(("_owner"!==r||!e.$$typeof)&&!Ud(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function jd(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Bd(e,t){const r=jd(e);return Math.round(t*r)/r}function zd(e){const t=Mt(e);return Wd((()=>{t.current=e})),t}const qd=(e,t)=>({...Dd(e),options:[e,t]}),Kd=(e,t)=>({...Nd(e),options:[e,t]}),Vd=(e,t)=>({...$d(e),options:[e,t]}),Qd={...Jr},Yd=Qd.useInsertionEffect||(e=>e());function Xd(e){const t=Mt((()=>{}));return Yd((()=>{t.current=e})),Dt((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return null==t.current?void 0:t.current(...r)}),[])}var Zd="undefined"!=typeof document?Lt:Ot;let Jd=!1,ep=0;const tp=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ep++;const rp=Qd.useId||function(){const[e,t]=Rt((()=>Jd?tp():void 0));return Zd((()=>{null==e&&t(tp())}),[]),Ot((()=>{Jd=!0}),[]),e};const np=at(null),ip=at(null),op="data-floating-ui-focusable";function ap(e){const{open:t=!1,onOpenChange:r,elements:n}=e,i=rp(),o=Mt({}),[a]=Rt((()=>function(){const e=new Map;return{emit(t,r){var n;null==(n=e.get(t))||n.forEach((e=>e(r)))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,(null==(n=e.get(t))?void 0:n.filter((e=>e!==r)))||[])}}}())),s=null!=((null==(l=Gt(np))?void 0:l.id)||null);var l;const[c,u]=Rt(n.reference),d=Xd(((e,t,n)=>{o.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:n,nested:s}),null==r||r(e,t,n)})),p=It((()=>({setPositionReference:u})),[]),h=It((()=>({reference:c||n.reference||null,floating:n.floating||null,domReference:n.reference})),[c,n.reference,n.floating]);return It((()=>({dataRef:o,open:t,onOpenChange:d,elements:h,events:a,floatingId:i,refs:p})),[t,d,h,a,i,p])}function sp(e){void 0===e&&(e={});const{nodeId:t}=e,r=ap({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,i=n.elements,[o,a]=Rt(null),[s,l]=Rt(null),c=(null==i?void 0:i.domReference)||o,u=Mt(null),d=Gt(ip);Zd((()=>{c&&(u.current=c)}),[c]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=Rt({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=Rt(n);Ud(p,n)||h(n);const[f,m]=Rt(null),[v,g]=Rt(null),_=Dt((e=>{e!==x.current&&(x.current=e,m(e))}),[]),y=Dt((e=>{e!==k.current&&(k.current=e,g(e))}),[]),w=o||f,b=a||v,x=Mt(null),k=Mt(null),S=Mt(u),E=null!=l,C=zd(l),T=zd(i),P=zd(c),R=Dt((()=>{if(!x.current||!k.current)return;const e={placement:t,strategy:r,middleware:p};T.current&&(e.platform=T.current),Hd(x.current,k.current,e).then((e=>{const t={...e,isPositioned:!1!==P.current};A.current&&!Ud(S.current,t)&&(S.current=t,jr((()=>{d(t)})))}))}),[p,t,r,T,P]);Wd((()=>{!1===c&&S.current.isPositioned&&(S.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const A=Mt(!1);Wd((()=>(A.current=!0,()=>{A.current=!1})),[]),Wd((()=>{if(w&&(x.current=w),b&&(k.current=b),w&&b){if(C.current)return C.current(w,b,R);R()}}),[w,b,R,C,E]);const O=It((()=>({reference:x,floating:k,setReference:_,setFloating:y})),[_,y]),L=It((()=>({reference:w,floating:b})),[w,b]),M=It((()=>{const e={position:r,left:0,top:0};if(!L.floating)return e;const t=Bd(L.floating,u.x),n=Bd(L.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...jd(L.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,s,L.floating,u.x,u.y]);return It((()=>({...u,update:R,refs:O,elements:L,floatingStyles:M})),[u,R,O,L,M])}({...e,elements:{...i,...s&&{reference:s}}}),h=Dt((e=>{const t=Nu(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l(t),p.refs.setReference(t)}),[p.refs]),f=Dt((e=>{(Nu(e)||null===e)&&(u.current=e,a(e)),(Nu(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!Nu(e))&&p.refs.setReference(e)}),[p.refs]),m=It((()=>({...p.refs,setReference:f,setPositionReference:h,domReference:u})),[p.refs,f,h]),v=It((()=>({...p.elements,domReference:c})),[p.elements,c]),g=It((()=>({...p,...n,refs:m,elements:v,nodeId:t})),[p,m,v,t,n]);return Zd((()=>{n.dataRef.current.floatingContext=g;const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===t));e&&(e.context=g)})),It((()=>({...p,context:g,refs:m,elements:v})),[p,m,v,g])}const lp="active",cp="selected";function up(e,t,r){const n=new Map,i="item"===r;let o=e;if(i&&e){const{[lp]:t,[cp]:r,...n}=e;o=n}return{..."floating"===r&&{tabIndex:-1,[op]:""},...o,...t.map((t=>{const n=t?t[r]:null;return"function"==typeof n?e?n(e):null:n})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[r,o]=t;var a;i&&[lp,cp].includes(r)||(0===r.indexOf("on")?(n.has(r)||n.set(r,[]),"function"==typeof o&&(null==(a=n.get(r))||a.push(o),e[r]=function(){for(var e,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return null==(e=n.get(r))?void 0:e.map((e=>e(...i))).find((e=>void 0!==e))})):e[r]=o)})),e):e),{})}}function dp(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}function pp(e,t){const{open:r,elements:n}=e,{enabled:i=!0,overflowRef:o,scrollRef:a,onChange:s}=t,l=Xd(s),c=Mt(!1),u=Mt(null),d=Mt(null);Ot((()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||null==o.current)return;const r=e.deltaY,n=o.current.top>=-.5,i=o.current.bottom>=-.5,a=t.scrollHeight-t.clientHeight,s=r<0?-1:1,c=r<0?"max":"min";t.scrollHeight<=t.clientHeight||(!n&&r>0||!i&&r<0?(e.preventDefault(),jr((()=>{l((e=>e+Math[c](r,a*s)))}))):/firefox/i.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:r}=e;return t+"/"+r})).join(" "):navigator.userAgent}())&&(t.scrollTop+=r))}const t=(null==a?void 0:a.current)||n.floating;return r&&t?(t.addEventListener("wheel",e),requestAnimationFrame((()=>{u.current=t.scrollTop,null!=o.current&&(d.current={...o.current})})),()=>{u.current=null,d.current=null,t.removeEventListener("wheel",e)}):void 0}),[i,r,n.floating,o,a,l]);const p=It((()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const e=(null==a?void 0:a.current)||n.floating;if(o.current&&e&&c.current){if(null!==u.current){const t=e.scrollTop-u.current;(o.current.bottom<-.5&&t<-1||o.current.top<-.5&&t>1)&&jr((()=>l((e=>e+t))))}requestAnimationFrame((()=>{u.current=e.scrollTop}))}}})),[n.floating,l,o,a]);return It((()=>i?{floating:p}:{}),[i,p])}let hp=at({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});hp.displayName="FloatingContext";let fp=at(null);fp.displayName="PlacementContext";function mp({children:e,enabled:t=!0}){let[r,n]=Rt(null),[i,o]=Rt(0),a=Mt(null),[s,l]=Rt(null);!function(e){pc((()=>{if(!e)return;let t=new MutationObserver((()=>{let t=window.getComputedStyle(e).maxHeight,r=parseFloat(t);if(isNaN(r))return;let n=parseInt(t);isNaN(n)||r!==n&&(e.style.maxHeight=`${Math.ceil(r)}px`)}));return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}}),[e])}(s);let c=t&&null!==r&&null!==s,{to:u="bottom",gap:d=0,offset:p=0,padding:h=0,inner:f}=function(e,t){var r,n,i;let o=vp(null!=(r=null==e?void 0:e.gap)?r:"var(--anchor-gap, 0)",t),a=vp(null!=(n=null==e?void 0:e.offset)?n:"var(--anchor-offset, 0)",t),s=vp(null!=(i=null==e?void 0:e.padding)?i:"var(--anchor-padding, 0)",t);return{...e,gap:o,offset:a,padding:s}}(r,s),[m,v="center"]=u.split(" ");pc((()=>{c&&o(0)}),[c]);let{refs:g,floatingStyles:_,context:y}=sp({open:c,placement:"selection"===m?"center"===v?"bottom":`bottom-${v}`:"center"===v?`${m}`:`${m}-${v}`,strategy:"absolute",transform:!1,middleware:[qd({mainAxis:"selection"===m?0:d,crossAxis:p}),(k={padding:h},{...Gd(k),options:[k,S]}),"selection"!==m&&Kd({padding:h}),"selection"===m&&f?(x={...f,padding:h,overflowRef:a,offset:i,minItemsVisible:4,referenceOverflowThreshold:h,onFallbackChange(e){var t,r;if(!e)return;let n=y.elements.floating;if(!n)return;let i=parseFloat(getComputedStyle(n).scrollPaddingBottom)||0,a=Math.min(4,n.childElementCount),s=0,l=0;for(let o of null!=(r=null==(t=y.elements.floating)?void 0:t.childNodes)?r:[])if(o instanceof HTMLElement){let e=o.offsetTop,t=e+o.clientHeight+i,r=n.scrollTop,c=r+n.clientHeight;if(!(e>=r&&t<=c)){l=Math.max(0,Math.min(t,c)-Math.max(e,r)),s=o.clientHeight;break}a--}a>=1&&o((e=>{let t=s*a-l+i;return e>=t?e:t}))}},{name:"inner",options:x,async fn(e){const{listRef:t,overflowRef:r,onFallbackChange:n,offset:i=0,index:o=0,minItemsVisible:a=4,referenceOverflowThreshold:s=0,scrollRef:l,...c}=sd(x,e),{rects:u,elements:{floating:d}}=e,p=t.current[o],h=(null==l?void 0:l.current)||d,f=d.clientTop||h.clientTop,m=0!==d.clientTop,v=0!==h.clientTop,g=d===h;if(!p)return{};const _={...e,...await qd(-p.offsetTop-d.clientTop-u.reference.height/2-p.offsetHeight/2-i).fn(e)},y=await Id(dp(_,h.scrollHeight+f+d.clientTop),c),w=await Id(_,{...c,elementContext:"reference"}),b=ed(0,y.top),k=_.y+b,S=h.scrollHeight>h.clientHeight,E=(S?e=>e:td)(ed(0,h.scrollHeight+(m&&g||v?2*f:0)-b-ed(0,y.bottom)));if(h.style.maxHeight=E+"px",h.scrollTop=b,n){const e=S&&h.offsetHeight<p.offsetHeight*a-1||w.top>=-s||w.bottom>=-s;jr((()=>n(e)))}return r&&(r.current=await Id(dp({..._,y:k},h.offsetHeight+f+d.clientTop),c)),{y:k}}}):null,Vd({padding:h,apply({availableWidth:e,availableHeight:t,elements:r}){Object.assign(r.floating.style,{overflow:"auto",maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:Fd}),[w=m,b=v]=y.placement.split("-");var x,k,S;"selection"===m&&(w="selection");let E=It((()=>({anchor:[w,b].filter(Boolean).join(" ")})),[w,b]),C=pp(y,{overflowRef:a,onChange:o}),{getReferenceProps:T,getFloatingProps:P}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),r=e.map((e=>null==e?void 0:e.floating)),n=e.map((e=>null==e?void 0:e.item)),i=Dt((t=>up(t,e,"reference")),t),o=Dt((t=>up(t,e,"floating")),r),a=Dt((t=>up(t,e,"item")),n);return It((()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a})),[i,o,a])}([C]),R=fc((e=>{l(e),g.setFloating(e)}));return De(fp.Provider,{value:n},De(hp.Provider,{value:{setFloating:R,setReference:g.setReference,styles:_,getReferenceProps:T,getFloatingProps:P,slot:E}},e))}function vp(e,t,r=void 0){let n=dc(),i=fc(((e,t)=>{if(null==e)return[r,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[r,null];let i=_p(e,t);return[i,r=>{let o=gp(e);{let a=o.map((e=>window.getComputedStyle(t).getPropertyValue(e)));n.requestAnimationFrame((function s(){n.nextFrame(s);let l=!1;for(let[e,r]of o.entries()){let n=window.getComputedStyle(t).getPropertyValue(r);if(a[e]!==n){a[e]=n,l=!0;break}}if(!l)return;let c=_p(e,t);i!==c&&(r(c),i=c)}))}return n.dispose}]}return[r,null]})),o=It((()=>i(e,t)[0]),[e,t]),[a=o,s]=Rt();return pc((()=>{let[r,n]=i(e,t);if(s(r),n)return n(s)}),[e,t]),a}function gp(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(",");if(-1===e)return[t[1]];let r=t[1].slice(0,e).trim(),n=t[1].slice(e+1).trim();return n?[r,...gp(n)]:[r]}return[]}function _p(e,t){let r=document.createElement("div");t.appendChild(r),r.style.setProperty("margin-top","0px","important"),r.style.setProperty("margin-top",e,"important");let n=parseFloat(window.getComputedStyle(r).marginTop)||0;return t.removeChild(r),n}let yp=at(null);yp.displayName="OpenClosedContext";var wp=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(wp||{});function bp(){return Gt(yp)}function xp({value:e,children:t}){return Zr.createElement(yp.Provider,{value:e},t)}var kp,Sp=((kp=Sp||{})[kp.First=0]="First",kp[kp.Previous=1]="Previous",kp[kp.Next=2]="Next",kp[kp.Last=3]="Last",kp[kp.Specific=4]="Specific",kp[kp.Nothing=5]="Nothing",kp);function Ep(e,t){let r=t.resolveItems();if(r.length<=0)return null;let n=t.resolveActiveIndex(),i=null!=n?n:-1;switch(e.focus){case 0:for(let e=0;e<r.length;++e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 1:-1===i&&(i=r.length);for(let e=i-1;e>=0;--e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 2:for(let e=i+1;e<r.length;++e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 3:for(let e=r.length-1;e>=0;--e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 4:for(let n=0;n<r.length;++n)if(t.resolveId(r[n],n,r)===e.id)return n;return n;case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}function Cp(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in Jr&&(e=>e.useSyncExternalStore)(Jr)((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,r]=Rt(sc.isHandoffComplete);return t&&!1===sc.isHandoffComplete&&r(!1),Ot((()=>{!0!==t&&r(!0)}),[t]),Ot((()=>sc.handoff()),[]),!e&&t}let Tp=at(!1);function Pp(e){let t=Gt(Tp),r=Gt(Lp),n=bu(e),[i,o]=Rt((()=>{var e;if(!t&&null!==r)return null!=(e=r.current)?e:null;if(sc.isServer)return null;let i=null==n?void 0:n.getElementById("headlessui-portal-root");if(i)return i;if(null===n)return null;let o=n.createElement("div");return o.setAttribute("id","headlessui-portal-root"),n.body.appendChild(o)}));return Ot((()=>{null!==i&&(null!=n&&n.body.contains(i)||null==n||n.body.appendChild(i))}),[i,n]),Ot((()=>{t||null!==r&&o(r.current)}),[r,o,t]),i}let Rp=$e,Ap=Pc((function(e,t){let r=e,n=Mt(null),i=Ic(function(e,t=!0){return Object.assign(e,{[Fc]:t})}((e=>{n.current=e})),t),o=bu(n),a=Pp(n),[s]=Rt((()=>{var e;return sc.isServer?null:null!=(e=null==o?void 0:o.createElement("div"))?e:null})),l=Gt(Mp),c=Cp();pc((()=>{!a||!s||a.contains(s)||(s.setAttribute("data-headlessui-portal",""),a.appendChild(s))}),[a,s]),pc((()=>{if(s&&l)return l.register(s)}),[l,s]),function(e){let t=fc(e),r=Mt(!1);Ot((()=>(r.current=!1,()=>{r.current=!0,cc((()=>{r.current&&t()}))})),[t])}((()=>{var e;!a||!s||(s instanceof Node&&a.contains(s)&&a.removeChild(s),a.childNodes.length<=0&&(null==(e=a.parentElement)||e.removeChild(a)))}));let u=kc();return c&&a&&s?vr(u({ourProps:{ref:i},theirProps:r,slot:{},defaultTag:Rp,name:"Portal"}),s):null}));let Op=$e,Lp=at(null);let Mp=at(null),Fp=Pc((function(e,t){let r=Ic(t),{enabled:n=!0,...i}=e,o=kc();return n?Zr.createElement(Ap,{...i,ref:r}):o({ourProps:{ref:r},theirProps:i,slot:{},defaultTag:Rp,name:"Portal"})})),Ip=Pc((function(e,t){let{target:r,...n}=e,i={ref:Ic(t)},o=kc();return Zr.createElement(Lp.Provider,{value:r},o({ourProps:i,theirProps:n,defaultTag:Op,name:"Popover.Group"}))})),Dp=Object.assign(Fp,{Group:Ip});function Gp(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:jp)!==$e||1===Zr.Children.count(e.children)}let Np=at(null);Np.displayName="TransitionContext";var $p=(e=>(e.Visible="visible",e.Hidden="hidden",e))($p||{});let Hp=at(null);function Wp(e){return"children"in e?Wp(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function Up(e,t){let r=hc(e),n=Mt([]),i=function(){let e=Mt(!1);return pc((()=>(e.current=!0,()=>{e.current=!1})),[]),e}(),o=dc(),a=fc(((e,t=xc.Hidden)=>{let a=n.current.findIndex((({el:t})=>t===e));-1!==a&&(_c(t,{[xc.Unmount](){n.current.splice(a,1)},[xc.Hidden](){n.current[a].state="hidden"}}),o.microTask((()=>{var e;!Wp(n)&&i.current&&(null==(e=r.current)||e.call(r))})))})),s=fc((e=>{let t=n.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):n.current.push({el:e,state:"visible"}),()=>a(e,xc.Unmount)})),l=Mt([]),c=Mt(Promise.resolve()),u=Mt({enter:[],leave:[]}),d=fc(((e,r,n)=>{l.current.splice(0),t&&(t.chains.current[r]=t.chains.current[r].filter((([t])=>t!==e))),null==t||t.chains.current[r].push([e,new Promise((e=>{l.current.push(e)}))]),null==t||t.chains.current[r].push([e,new Promise((e=>{Promise.all(u.current[r].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===r?c.current=c.current.then((()=>null==t?void 0:t.wait.current)).then((()=>n(r))):n(r)})),p=fc(((e,t,r)=>{Promise.all(u.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=l.current.shift())||e()})).then((()=>r(t)))}));return It((()=>({children:n,register:s,unregister:a,onStart:d,onStop:p,wait:c,chains:u})),[s,a,n,d,p,u,c])}Hp.displayName="NestingContext";let jp=$e,Bp=bc.RenderStrategy;let zp=Pc((function(e,t){let{show:r,appear:n=!1,unmount:i=!0,...o}=e,a=Mt(null),s=Ic(...Gp(e)?[a,t]:null===t?[]:[t]);Cp();let l=bp();if(void 0===r&&null!==l&&(r=(l&wp.Open)===wp.Open),void 0===r)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,u]=Rt(r?"visible":"hidden"),d=Up((()=>{r||u("hidden")})),[p,h]=Rt(!0),f=Mt([r]);pc((()=>{!1!==p&&f.current[f.current.length-1]!==r&&(f.current.push(r),h(!1))}),[f,r]);let m=It((()=>({show:r,appear:n,initial:p})),[r,n,p]);pc((()=>{r?u("visible"):!Wp(d)&&null!==a.current&&u("hidden")}),[r,d]);let v={unmount:i},g=fc((()=>{var t;p&&h(!1),null==(t=e.beforeEnter)||t.call(e)})),_=fc((()=>{var t;p&&h(!1),null==(t=e.beforeLeave)||t.call(e)})),y=kc();return Zr.createElement(Hp.Provider,{value:d},Zr.createElement(Np.Provider,{value:m},y({ourProps:{...v,as:$e,children:Zr.createElement(qp,{ref:s,...v,...o,beforeEnter:g,beforeLeave:_})},theirProps:{},defaultTag:$e,features:Bp,visible:"visible"===c,name:"Transition"})))})),qp=Pc((function(e,t){var r,n;let{transition:i=!0,beforeEnter:o,afterEnter:a,beforeLeave:s,afterLeave:l,enter:c,enterFrom:u,enterTo:d,entered:p,leave:h,leaveFrom:f,leaveTo:m,...v}=e,[g,_]=Rt(null),y=Mt(null),w=Gp(e),b=Ic(...w?[y,t,_]:null===t?[]:[t]),x=null==(r=v.unmount)||r?xc.Unmount:xc.Hidden,{show:k,appear:S,initial:E}=function(){let e=Gt(Np);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[C,T]=Rt(k?"visible":"hidden"),P=function(){let e=Gt(Hp);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:R,unregister:A}=P;pc((()=>R(y)),[R,y]),pc((()=>{if(x===xc.Hidden&&y.current)return k&&"visible"!==C?void T("visible"):_c(C,{hidden:()=>A(y),visible:()=>R(y)})}),[C,y,R,A,k,x]);let O=Cp();pc((()=>{if(w&&O&&"visible"===C&&null===y.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[y,C,O,w]);let L=E&&!S,M=S&&k&&E,F=Mt(!1),I=Up((()=>{F.current||(T("hidden"),A(y))}),P),D=fc((e=>{F.current=!0;let t=e?"enter":"leave";I.onStart(y,t,(e=>{"enter"===e?null==o||o():"leave"===e&&(null==s||s())}))})),G=fc((e=>{let t=e?"enter":"leave";F.current=!1,I.onStop(y,t,(e=>{"enter"===e?null==a||a():"leave"===e&&(null==l||l())})),"leave"===t&&!Wp(I)&&(T("hidden"),A(y))}));Ot((()=>{w&&i||(D(k),G(k))}),[k,w,i]);let N=(()=>!(!i||!w||!O||L))(),[,$]=Lu(N,g,k,{start:D,end:G}),H=Rc({ref:b,className:(null==(n=gc(v.className,M&&c,M&&u,$.enter&&c,$.enter&&$.closed&&u,$.enter&&!$.closed&&d,$.leave&&h,$.leave&&!$.closed&&f,$.leave&&$.closed&&m,!$.transition&&k&&p))?void 0:n.trim())||void 0,...Ou($)}),W=0;"visible"===C&&(W|=wp.Open),"hidden"===C&&(W|=wp.Closed),$.enter&&(W|=wp.Opening),$.leave&&(W|=wp.Closing);let U=kc();return Zr.createElement(Hp.Provider,{value:I},Zr.createElement(xp,{value:W},U({ourProps:H,theirProps:v,defaultTag:jp,features:Bp,visible:"visible"===C,name:"Transition.Child"})))})),Kp=Pc((function(e,t){let r=null!==Gt(Np),n=null!==bp();return Zr.createElement(Zr.Fragment,null,!r&&n?Zr.createElement(zp,{ref:t,...e}):Zr.createElement(qp,{ref:t,...e}))})),Vp=Object.assign(zp,{Child:Kp,Root:zp});let Qp=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Yp(e){var t,r;let n=null!=(t=e.innerText)?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return n;let o=!1;for(let s of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),o=!0;let a=o?null!=(r=i.innerText)?r:"":n;return Qp.test(a)&&(a=a.replace(Qp,"")),a}function Xp(e){let t=Mt(""),r=Mt("");return fc((()=>{let n=e.current;if(!n)return"";let i=n.innerText;if(t.current===i)return r.current;let o=function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let r=e.getAttribute("aria-labelledby");if(r){let e=r.split(" ").map((e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():Yp(t).trim()}return null})).filter(Boolean);if(e.length>0)return e.join(", ")}return Yp(e).trim()}(n).trim().toLowerCase();return t.current=i,r.current=o,o}))}var Zp=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Zp||{}),Jp=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Jp||{}),eh=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetItemsElement=8]="SetItemsElement",e))(eh||{});function th(e,t=e=>e){let r=null!==e.activeItemIndex?e.items[e.activeItemIndex]:null,n=mu(t(e.items.slice()),(e=>e.dataRef.current.domRef.current)),i=r?n.indexOf(r):null;return-1===i&&(i=null),{items:n,activeItemIndex:i}}let rh={1:e=>1===e.menuState?e:{...e,activeItemIndex:null,menuState:1},0:e=>0===e.menuState?e:{...e,__demoMode:!1,menuState:0},2:(e,t)=>{var r,n,i,o,a;if(1===e.menuState)return e;let s={...e,searchQuery:"",activationTrigger:null!=(r=t.trigger)?r:1,__demoMode:!1};if(t.focus===Sp.Nothing)return{...s,activeItemIndex:null};if(t.focus===Sp.Specific)return{...s,activeItemIndex:e.items.findIndex((e=>e.id===t.id))};if(t.focus===Sp.Previous){let r=e.activeItemIndex;if(null!==r){let o=e.items[r].dataRef.current.domRef,a=Ep(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==a){let t=e.items[a].dataRef.current.domRef;if((null==(n=o.current)?void 0:n.previousElementSibling)===t.current||null===(null==(i=t.current)?void 0:i.previousElementSibling))return{...s,activeItemIndex:a}}}}else if(t.focus===Sp.Next){let r=e.activeItemIndex;if(null!==r){let n=e.items[r].dataRef.current.domRef,i=Ep(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==i){let t=e.items[i].dataRef.current.domRef;if((null==(o=n.current)?void 0:o.nextElementSibling)===t.current||null===(null==(a=t.current)?void 0:a.nextElementSibling))return{...s,activeItemIndex:i}}}}let l=th(e),c=Ep(t,{resolveItems:()=>l.items,resolveActiveIndex:()=>l.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...s,...l,activeItemIndex:c}},3:(e,t)=>{let r=""!==e.searchQuery?0:1,n=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeItemIndex?e.items.slice(e.activeItemIndex+r).concat(e.items.slice(0,e.activeItemIndex+r)):e.items).find((e=>{var t;return(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(n))&&!e.dataRef.current.disabled})),o=i?e.items.indexOf(i):-1;return-1===o||o===e.activeItemIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeItemIndex:o,activationTrigger:1}},4:e=>""===e.searchQuery?e:{...e,searchQuery:"",searchActiveItemIndex:null},5:(e,t)=>{let r=th(e,(e=>[...e,{id:t.id,dataRef:t.dataRef}]));return{...e,...r}},6:(e,t)=>{let r=th(e,(e=>{let r=e.findIndex((e=>e.id===t.id));return-1!==r&&e.splice(r,1),e}));return{...e,...r,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.itemsElement===t.element?e:{...e,itemsElement:t.element}},nh=at(null);function ih(e){let t=Gt(nh);if(null===t){let t=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ih),t}return t}function oh(e,t){return _c(t.type,rh,e,t)}nh.displayName="MenuContext";let ah=$e;let sh=bc.RenderStrategy|bc.Static;let lh=$e;let ch=Pc((function(e,t){let{__demoMode:r=!1,...n}=e,i=At(oh,{__demoMode:r,menuState:r?0:1,buttonElement:null,itemsElement:null,items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:o,itemsElement:a,buttonElement:s},l]=i,c=Ic(t);wu(0===o,[s,a],((e,t)=>{l({type:1}),du(t,uu.Loose)||(e.preventDefault(),null==s||s.focus())}));let u=fc((()=>{l({type:1})})),d=It((()=>({open:0===o,close:u})),[o,u]),p={ref:c},h=kc();return Zr.createElement(mp,null,Zr.createElement(nh.Provider,{value:i},Zr.createElement(xp,{value:_c(o,{0:wp.Open,1:wp.Closed})},h({ourProps:p,theirProps:n,slot:d,defaultTag:ah,name:"Menu"}))))})),uh=Pc((function(e,t){var r;let n=$t(),{id:i=`headlessui-menu-button-${n}`,disabled:o=!1,autoFocus:a=!1,...s}=e,[l,c]=ih("Menu.Button"),u=Gt(hp).getReferenceProps,d=Ic(t,Gt(hp).setReference,fc((e=>c({type:7,element:e})))),p=fc((e=>{switch(e.key){case Hc.Space:case Hc.Enter:case Hc.ArrowDown:e.preventDefault(),e.stopPropagation(),jr((()=>c({type:0}))),c({type:2,focus:Sp.First});break;case Hc.ArrowUp:e.preventDefault(),e.stopPropagation(),jr((()=>c({type:0}))),c({type:2,focus:Sp.Last})}})),h=fc((e=>{if(e.key===Hc.Space)e.preventDefault()})),f=fc((e=>{var t;if(Mc(e.currentTarget))return e.preventDefault();o||(0===l.menuState?(jr((()=>c({type:1}))),null==(t=l.buttonElement)||t.focus({preventScroll:!0})):(e.preventDefault(),c({type:0})))})),{isFocusVisible:m,focusProps:v}=ic({autoFocus:a}),{isHovered:g,hoverProps:_}=function(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:i}=e,[o,a]=Rt(!1),s=Mt({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;Ot(nc,[]);let{hoverProps:l,triggerHoverEnd:c}=It((()=>{let e=(e,n)=>{if(s.pointerType=n,i||"touch"===n||s.isHovered||!e.currentTarget.contains(e.target))return;s.isHovered=!0;let o=e.currentTarget;s.target=o,t&&t({type:"hoverstart",target:o,pointerType:n}),r&&r(!0),a(!0)},o=(e,t)=>{if(s.pointerType="",s.target=null,"touch"===t||!s.isHovered)return;s.isHovered=!1;let i=e.currentTarget;n&&n({type:"hoverend",target:i,pointerType:t}),r&&r(!1),a(!1)},l={};return"undefined"!=typeof PointerEvent?(l.onPointerEnter=t=>{Jl&&"mouse"===t.pointerType||e(t,t.pointerType)},l.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,e.pointerType)}):(l.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},l.onMouseEnter=t=>{s.ignoreEmulatedMouseEvents||Jl||e(t,"mouse"),s.ignoreEmulatedMouseEvents=!1},l.onMouseLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,"mouse")}),{hoverProps:l,triggerHoverEnd:o}}),[t,r,n,i,s]);return Ot((()=>{i&&c({currentTarget:s.target},s.pointerType)}),[i]),{hoverProps:l,isHovered:o}}({isDisabled:o}),{pressed:y,pressProps:w}=function({disabled:e=!1}={}){let t=Mt(null),[r,n]=Rt(!1),i=dc(),o=fc((()=>{t.current=null,n(!1),i.dispose()})),a=fc((e=>{if(i.dispose(),null===t.current){t.current=e.currentTarget,n(!0);{let r=lc(e.currentTarget);i.addEventListener(r,"pointerup",o,!1),i.addEventListener(r,"pointermove",(e=>{if(t.current){let r=function(e){let t=e.width/2,r=e.height/2;return{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}(e);n(function(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}(r,t.current.getBoundingClientRect()))}}),!1),i.addEventListener(r,"pointercancel",o,!1)}}}));return{pressed:r,pressProps:e?{}:{onPointerDown:a,onPointerUp:o,onClick:o}}}({disabled:o}),b=It((()=>({open:0===l.menuState,active:y||0===l.menuState,disabled:o,hover:g,focus:m,autofocus:a})),[l,g,m,y,o,a]),x=Tc(u(),{ref:d,id:i,type:xu(e,l.buttonElement),"aria-haspopup":"menu","aria-controls":null==(r=l.itemsElement)?void 0:r.id,"aria-expanded":0===l.menuState,disabled:o||void 0,autoFocus:a,onKeyDown:p,onKeyUp:h,onClick:f},v,_,w);return kc()({ourProps:x,theirProps:s,slot:b,defaultTag:"button",name:"Menu.Button"})})),dh=Pc((function(e,t){var r,n;let i=$t(),{id:o=`headlessui-menu-items-${i}`,anchor:a,portal:s=!1,modal:l=!0,transition:c=!1,...u}=e,d=function(e){return It((()=>e?"string"==typeof e?{to:e}:e:null),[e])}(a),[p,h]=ih("Menu.Items"),[f,m]=function(e=null){!1===e&&(e=null),"string"==typeof e&&(e={to:e});let t=Gt(fp),r=It((()=>e),[JSON.stringify(e,((e,t)=>{var r;return null!=(r=null==t?void 0:t.outerHTML)?r:t}))]);pc((()=>{null==t||t(null!=r?r:null)}),[t,r]);let n=Gt(hp);return It((()=>[n.setFloating,e?n.styles:{}]),[n.setFloating,e,n.styles])}(d),v=function(){let{getFloatingProps:e,slot:t}=Gt(hp);return Dt(((...r)=>Object.assign({},e(...r),{"data-anchor":t.anchor})),[e,t])}(),[g,_]=Rt(null),y=Ic(t,d?f:null,fc((e=>h({type:8,element:e}))),_),w=bu(p.itemsElement);d&&(s=!0);let b=bp(),[x,k]=Lu(c,g,null!==b?(b&wp.Open)===wp.Open:0===p.menuState);!function(e,t,r){let n=hc((e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&r()}));Ot((()=>{if(!e)return;let r=null===t?null:t instanceof HTMLElement?t:t.current;if(!r)return;let i=uc();if("undefined"!=typeof ResizeObserver){let e=new ResizeObserver((()=>n.current(r)));e.observe(r),i.add((()=>e.disconnect()))}if("undefined"!=typeof IntersectionObserver){let e=new IntersectionObserver((()=>n.current(r)));e.observe(r),i.add((()=>e.disconnect()))}return()=>i.dispose()}),[t,n,e])}(x,p.buttonElement,(()=>{h({type:1})})),Cu(!p.__demoMode&&(l&&0===p.menuState),w),function(e,{allowed:t,disallowed:r}={}){let n=Yc(e,"inert-others");pc((()=>{var e,i;if(!n)return;let o=uc();for(let t of null!=(e=null==r?void 0:r())?e:[])t&&o.add(Jc(t));let a=null!=(i=null==t?void 0:t())?i:[];for(let t of a){if(!t)continue;let e=lc(t);if(!e)continue;let r=t.parentElement;for(;r&&r!==e.body;){for(let e of r.children)a.some((t=>e.contains(t)))||o.add(Jc(e));r=r.parentElement}}return o.dispose}),[n,t,r])}(!p.__demoMode&&(l&&0===p.menuState),{allowed:Dt((()=>[p.buttonElement,p.itemsElement]),[p.buttonElement,p.itemsElement])});let S=!function(e,t){let r=Mt({left:0,top:0});if(pc((()=>{if(!t)return;let e=t.getBoundingClientRect();e&&(r.current=e)}),[e,t]),null==t||!e||t===document.activeElement)return!1;let n=t.getBoundingClientRect();return n.top!==r.current.top||n.left!==r.current.left}(0!==p.menuState,p.buttonElement)&&x;Ot((()=>{let e=p.itemsElement;e&&0===p.menuState&&e!==(null==w?void 0:w.activeElement)&&e.focus({preventScroll:!0})}),[p.menuState,p.itemsElement,w]),function(e,{container:t,accept:r,walk:n}){let i=Mt(r),o=Mt(n);Ot((()=>{i.current=r,o.current=n}),[r,n]),pc((()=>{if(!t||!e)return;let r=lc(t);if(!r)return;let n=i.current,a=o.current,s=Object.assign((e=>n(e)),{acceptNode:n}),l=r.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,s,!1);for(;l.nextNode();)a(l.currentNode)}),[t,e,i,o])}(0===p.menuState,{container:p.itemsElement,accept:e=>"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let E=dc(),C=fc((e=>{var t,r,n;switch(E.dispose(),e.key){case Hc.Space:if(""!==p.searchQuery)return e.preventDefault(),e.stopPropagation(),h({type:3,value:e.key});case Hc.Enter:if(e.preventDefault(),e.stopPropagation(),h({type:1}),null!==p.activeItemIndex){let{dataRef:e}=p.items[p.activeItemIndex];null==(r=null==(t=e.current)?void 0:t.domRef.current)||r.click()}pu(p.buttonElement);break;case Hc.ArrowDown:return e.preventDefault(),e.stopPropagation(),h({type:2,focus:Sp.Next});case Hc.ArrowUp:return e.preventDefault(),e.stopPropagation(),h({type:2,focus:Sp.Previous});case Hc.Home:case Hc.PageUp:return e.preventDefault(),e.stopPropagation(),h({type:2,focus:Sp.First});case Hc.End:case Hc.PageDown:return e.preventDefault(),e.stopPropagation(),h({type:2,focus:Sp.Last});case Hc.Escape:e.preventDefault(),e.stopPropagation(),jr((()=>h({type:1}))),null==(n=p.buttonElement)||n.focus({preventScroll:!0});break;case Hc.Tab:e.preventDefault(),e.stopPropagation(),jr((()=>h({type:1}))),vu(p.buttonElement,e.shiftKey?au.Previous:au.Next);break;default:1===e.key.length&&(h({type:3,value:e.key}),E.setTimeout((()=>h({type:4})),350))}})),T=fc((e=>{if(e.key===Hc.Space)e.preventDefault()})),P=It((()=>({open:0===p.menuState})),[p.menuState]),R=Tc(d?v():{},{"aria-activedescendant":null===p.activeItemIndex||null==(r=p.items[p.activeItemIndex])?void 0:r.id,"aria-labelledby":null==(n=p.buttonElement)?void 0:n.id,id:o,onKeyDown:C,onKeyUp:T,role:"menu",tabIndex:0===p.menuState?0:void 0,ref:y,style:{...u.style,...m,"--button-width":zc(p.buttonElement,!0).width},...Ou(k)}),A=kc();return Zr.createElement(Dp,{enabled:!!s&&(e.static||x)},A({ourProps:R,theirProps:u,slot:P,defaultTag:"div",features:sh,visible:S,name:"Menu.Items"}))})),ph=Pc((function(e,t){let r=$t(),{id:n=`headlessui-menu-item-${r}`,disabled:i=!1,...o}=e,[a,s]=ih("Menu.Item"),l=null!==a.activeItemIndex&&a.items[a.activeItemIndex].id===n,c=Mt(null),u=Ic(t,c);pc((()=>{if(!a.__demoMode&&0===a.menuState&&l&&0!==a.activationTrigger)return uc().requestAnimationFrame((()=>{var e,t;null==(t=null==(e=c.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}))}),[a.__demoMode,c,l,a.menuState,a.activationTrigger,a.activeItemIndex]);let d=Xp(c),p=Mt({disabled:i,domRef:c,get textValue(){return d()}});pc((()=>{p.current.disabled=i}),[p,i]),pc((()=>(s({type:5,id:n,dataRef:p}),()=>s({type:6,id:n}))),[p,n]);let h=fc((()=>{s({type:1})})),f=fc((e=>{if(i)return e.preventDefault();s({type:1}),pu(a.buttonElement)})),m=fc((()=>{if(i)return s({type:2,focus:Sp.Nothing});s({type:2,focus:Sp.Specific,id:n})})),v=function(){let e=Mt([-1,-1]);return{wasMoved(t){let r=Tu(t);return(e.current[0]!==r[0]||e.current[1]!==r[1])&&(e.current=r,!0)},update(t){e.current=Tu(t)}}}(),g=fc((e=>{v.update(e),!i&&(l||s({type:2,focus:Sp.Specific,id:n,trigger:0}))})),_=fc((e=>{v.wasMoved(e)&&(i||l||s({type:2,focus:Sp.Specific,id:n,trigger:0}))})),y=fc((e=>{v.wasMoved(e)&&(i||l&&s({type:2,focus:Sp.Nothing}))})),[w,b]=jc(),[x,k]=function(){let[e,t]=Rt([]);return[e.length>0?e.join(" "):void 0,It((()=>function(e){let r=fc((e=>(t((t=>[...t,e])),()=>t((t=>{let r=t.slice(),n=r.indexOf(e);return-1!==n&&r.splice(n,1),r}))))),n=It((()=>({register:r,slot:e.slot,name:e.name,props:e.props,value:e.value})),[r,e.slot,e.name,e.props,e.value]);return Zr.createElement(Dc.Provider,{value:n},e.children)}),[t])]}(),S=It((()=>({active:l,focus:l,disabled:i,close:h})),[l,i,h]),E={id:n,ref:u,role:"menuitem",tabIndex:!0===i?void 0:-1,"aria-disabled":!0===i||void 0,"aria-labelledby":w,"aria-describedby":x,disabled:void 0,onClick:f,onFocus:m,onPointerEnter:g,onMouseEnter:g,onPointerMove:_,onMouseMove:_,onPointerLeave:y,onMouseLeave:y},C=kc();return Zr.createElement(b,null,Zr.createElement(k,null,C({ourProps:E,theirProps:o,slot:S,defaultTag:lh,name:"Menu.Item"})))})),hh=Pc((function(e,t){let[r,n]=jc(),i=e,o={ref:t,"aria-labelledby":r,role:"group"},a=kc();return Zr.createElement(n,null,a({ourProps:o,theirProps:i,slot:{},defaultTag:"div",name:"Menu.Section"}))})),fh=Pc((function(e,t){let r=$t(),{id:n=`headlessui-menu-heading-${r}`,...i}=e,o=Uc();pc((()=>o.register(n)),[n,o.register]);let a={id:n,ref:t,role:"presentation",...o.props};return kc()({ourProps:a,theirProps:i,slot:{},defaultTag:"header",name:"Menu.Heading"})})),mh=Pc((function(e,t){let r=e,n={ref:t,role:"separator"};return kc()({ourProps:n,theirProps:r,slot:{},defaultTag:"div",name:"Menu.Separator"})})),vh=Object.assign(ch,{Button:uh,Items:dh,Item:ph,Section:hh,Heading:fh,Separator:mh});function gh({title:e,titleId:t,...r},n){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?De("title",{id:t},e):null,De("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 12a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const _h=rr(gh);function yh({title:e,titleId:t,...r},n){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?De("title",{id:t},e):null,De("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const wh=rr(yh),bh=e=>is(Sh,{children:os(vh,{as:"div",children:[is("div",{children:os(uh,{css:{display:"flex",alignItems:"center",borderRadius:"9999px","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity))",":hover":{"--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity))"},":focus":{outline:"2px solid transparent",outlineOffset:"2px","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-opacity":"1","--tw-ring-color":"rgb(99 102 241 / var(--tw-ring-opacity))","--tw-ring-offset-width":"2px","--tw-ring-offset-color":"#f3f4f6"}},children:[is("span",{css:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},children:"Open options"}),is(_h,{"aria-hidden":"true",css:{width:"1.25rem",height:"1.25rem"}})]})}),is(dh,{transition:!0,className:"right-45 w-30",css:{position:"fixed",zIndex:"10",marginTop:"0.5rem",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))","--tw-shadow":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","--tw-ring-color":"rgb(0 0 0 / 0.05)",transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms",":focus":{outline:"2px solid transparent",outlineOffset:"2px"},"&[data-closed]":{"--tw-scale-x":".95","--tw-scale-y":".95",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",opacity:"0"},"&[data-enter]":{transitionDuration:"100ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)"},"&[data-leave]":{transitionDuration:"75ms",transitionTimingFunction:"cubic-bezier(0.4, 0, 1, 1)"}},children:e.items.map(((t,r)=>is(ph,{children:is("button",{type:"button",css:{display:"block",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))","&[data-focus]":{"--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))",outline:"2px solid transparent",outlineOffset:"2px"}},onClick:()=>{t.onClick(e.id)},children:t.label},r)},r)))})]})}),xh=e=>{const t=new Date(e.value);return os(Sh,{children:[t.toLocaleDateString(),is("br",{}),t.toLocaleTimeString()]})},kh=e=>{const[t,r]=Rt(!1);return os(Sh,{css:{position:"relative"},children:[is(Vp,{show:t,children:is("div",{css:{position:"absolute",bottom:"3rem",display:"flex",height:"2rem",width:"4.313rem",flexDirection:"row",alignItems:"flex-start",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(17 24 39 / var(--tw-bg-opacity))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",opacity:"0.9","--tw-shadow":"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",transitionProperty:"opacity",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms","&[data-closed]":{opacity:"0"},"&[data-enter]":{transitionDuration:"100ms",transitionTimingFunction:"cubic-bezier(0.4, 0, 1, 1)"},"&[data-leave]":{transitionDuration:"500ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)"}},children:is("p",{css:{order:"0",height:"1rem",width:"2.813rem",flex:"none",flexGrow:"0",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"500",fontStyle:"normal","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))"},children:"Copied"})})}),is("button",{onClick:async()=>{await(async e=>{await navigator.clipboard.writeText(e)})(e.value),r(!0),setTimeout((()=>{r(!1)}),3e3)},type:"button",css:{display:"block",flexShrink:"1",borderRadius:"0.375rem",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(209 213 219 / var(--tw-bg-opacity))"},"&[data-focus]":{"--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))",outline:"2px solid transparent",outlineOffset:"2px"}},children:e.value})]})},Sh=co.td`
|
|
11
|
+
*/(r.expires)||!Number.isFinite(r.expires.valueOf()))throw new TypeError(`option expires is invalid: ${r.expires}`);o+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(o+="; HttpOnly");r.secure&&(o+="; Secure");r.partitioned&&(o+="; Partitioned");if(r.priority){switch("string"==typeof r.priority?r.priority.toLowerCase():void 0){case"low":o+="; Priority=Low";break;case"medium":o+="; Priority=Medium";break;case"high":o+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${r.priority}`)}}if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:case"strict":o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"none":o+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${r.sameSite}`)}}return o};const po=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,ho=/^[\u0021-\u003A\u003C-\u007E]*$/,fo=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,mo=/^[\u0020-\u003A\u003D-\u007E]*$/,vo=Object.prototype.toString,go=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function _o(e,t,r){do{const r=e.charCodeAt(t);if(32!==r&&9!==r)return t}while(++t<r);return r}function yo(e,t,r){for(;t>r;){const r=e.charCodeAt(--t);if(32!==r&&9!==r)return t+1}return r}function wo(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(yc){return e}}var bo="popstate";function xo(e={}){return function(e,t,r,n={}){let{window:i=document.defaultView,v5Compat:o=!1}=n,a=i.history,s="POP",l=null,c=u();null==c&&(c=0,a.replaceState({...a.state,idx:c},""));function u(){return(a.state||{idx:null}).idx}function d(){s="POP";let e=u(),t=null==e?null:e-c;c=e,l&&l({action:s,location:m.location,delta:t})}function p(e,t){s="PUSH";let n=Co(m.location,e,t);r&&r(n,e),c=u()+1;let d=Eo(n,c),p=m.createHref(n);try{a.pushState(d,"",p)}catch(h){if(h instanceof DOMException&&"DataCloneError"===h.name)throw h;i.location.assign(p)}o&&l&&l({action:s,location:m.location,delta:1})}function h(e,t){s="REPLACE";let n=Co(m.location,e,t);r&&r(n,e),c=u();let i=Eo(n,c),d=m.createHref(n);a.replaceState(i,"",d),o&&l&&l({action:s,location:m.location,delta:0})}function f(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,r="string"==typeof e?e:To(e);return r=r.replace(/ $/,"%20"),ko(t,`No window.location.(origin|href) available to create URL for href: ${r}`),new URL(r,t)}let m={get action(){return s},get location(){return e(i,a)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(bo,d),l=e,()=>{i.removeEventListener(bo,d),l=null}},createHref:e=>t(i,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:p,replace:h,go:e=>a.go(e)};return m}((function(e,t){let{pathname:r="/",search:n="",hash:i=""}=Po(e.location.hash.substring(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),Co("",{pathname:r,search:n,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");n=-1===r?t:t.slice(0,r)}return n+"#"+("string"==typeof t?t:To(t))}),(function(e,t){So("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}),e)}function ko(e,t){if(!1===e||null==e)throw new Error(t)}function So(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(yc){}}}function Eo(e,t){return{usr:e.state,key:e.key,idx:t}}function Co(e,t,r=null,n){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?Po(t):t,state:r,key:t&&t.key||n||Math.random().toString(36).substring(2,10)}}function To({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function Po(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function Ro(e,t,r="/"){return function(e,t,r,n){let i="string"==typeof t?Po(t):t,o=jo(i.pathname||"/",r);if(null==o)return null;let a=Ao(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]));return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let s=null;for(let l=0;null==s&&l<a.length;++l){let e=Uo(o);s=Ho(a[l],e,n)}return s}(e,t,r,!1)}function Ao(e,t=[],r=[],n=""){let i=(e,i,o)=>{let a={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};a.relativePath.startsWith("/")&&(ko(a.relativePath.startsWith(n),`Absolute route path "${a.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),a.relativePath=a.relativePath.slice(n.length));let s=Ko([n,a.relativePath]),l=r.concat(a);e.children&&e.children.length>0&&(ko(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${s}".`),Ao(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:$o(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var r;if(""!==e.path&&(null==(r=e.path)?void 0:r.includes("?")))for(let n of Oo(e.path))i(e,t,n);else i(e,t)})),t}function Oo(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(0===n.length)return i?[o,""]:[o];let a=Oo(n.join("/")),s=[];return s.push(...a.map((e=>""===e?o:[o,e].join("/")))),i&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}var Lo=/^:[\w-]+$/,Mo=3,Fo=2,Io=1,Do=10,Go=-2,No=e=>"*"===e;function $o(e,t){let r=e.split("/"),n=r.length;return r.some(No)&&(n+=Go),t&&(n+=Fo),r.filter((e=>!No(e))).reduce(((e,t)=>e+(Lo.test(t)?Mo:""===t?Io:Do)),n)}function Ho(e,t,r=!1){let{routesMeta:n}=e,i={},o="/",a=[];for(let s=0;s<n.length;++s){let e=n[s],l=s===n.length-1,c="/"===o?t:t.slice(o.length)||"/",u=Wo({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},c),d=e.route;if(!u&&l&&r&&!n[n.length-1].route.index&&(u=Wo({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!u)return null;Object.assign(i,u.params),a.push({params:i,pathname:Ko([o,u.pathname]),pathnameBase:Vo(Ko([o,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(o=Ko([o,u.pathnameBase]))}return a}function Wo(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=function(e,t=!1,r=!0){So("*"===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 n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(n.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,n]}(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce(((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=s[n]||"";a=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const i=s[n];return e[t]=r&&!i?void 0:(i||"").replace(/%2F/g,"/"),e}),{}),pathname:o,pathnameBase:a,pattern:e}}function Uo(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return So(!1,`The URL path "${e}" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function jo(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function Bo(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function zo(e){let t=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t.map(((e,r)=>r===t.length-1?e.pathname:e.pathnameBase))}function qo(e,t,r,n=!1){let i;"string"==typeof e?i=Po(e):(i={...e},ko(!i.pathname||!i.pathname.includes("?"),Bo("?","pathname","search",i)),ko(!i.pathname||!i.pathname.includes("#"),Bo("#","pathname","hash",i)),ko(!i.search||!i.search.includes("#"),Bo("#","search","hash",i)));let o,a=""===e||""===i.pathname,s=a?"/":i.pathname;if(null==s)o=r;else{let e=t.length-1;if(!n&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t="/"){let{pathname:r,search:n="",hash:i=""}="string"==typeof e?Po(e):e,o=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:o,search:Qo(n),hash:Yo(i)}}(i,o),c=s&&"/"!==s&&s.endsWith("/"),u=(a||"."===s)&&r.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}var Ko=e=>e.join("/").replace(/\/\/+/g,"/"),Vo=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Qo=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Yo=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var Xo=["POST","PUT","PATCH","DELETE"];new Set(Xo);var Zo=["GET",...Xo];new Set(Zo);var Jo=at(null);Jo.displayName="DataRouter";var ea=at(null);ea.displayName="DataRouterState";var ta=at({isTransitioning:!1});ta.displayName="ViewTransition",at(new Map).displayName="Fetchers",at(null).displayName="Await";var ra=at(null);ra.displayName="Navigation";var na=at(null);na.displayName="Location";var ia=at({outlet:null,matches:[],isDataRoute:!1});ia.displayName="Route";var oa=at(null);function aa(){return null!=Gt(na)}function sa(){return ko(aa(),"useLocation() may be used only in the context of a <Router> component."),Gt(na).location}oa.displayName="RouteError";var la="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ca(e){Gt(ra).static||Lt(e)}function ua(){let{isDataRoute:e}=Gt(ia);return e?function(){let{router:e}=function(e){let t=Gt(Jo);return ko(t,ya(e)),t}("useNavigate"),t=wa("useNavigate"),r=Mt(!1);return ca((()=>{r.current=!0})),Dt((async(n,i={})=>{So(r.current,la),r.current&&("number"==typeof n?e.navigate(n):await e.navigate(n,{fromRouteId:t,...i}))}),[e,t])}():function(){ko(aa(),"useNavigate() may be used only in the context of a <Router> component.");let e=Gt(Jo),{basename:t,navigator:r}=Gt(ra),{matches:n}=Gt(ia),{pathname:i}=sa(),o=JSON.stringify(zo(n)),a=Mt(!1);return ca((()=>{a.current=!0})),Dt(((n,s={})=>{if(So(a.current,la),!a.current)return;if("number"==typeof n)return void r.go(n);let l=qo(n,JSON.parse(o),i,"path"===s.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:Ko([t,l.pathname])),(s.replace?r.replace:r.push)(l,s.state,s)}),[t,r,o,i,e])}()}var da=at(null);function pa(e){let t=Gt(ia).outlet;return t?De(da.Provider,{value:e},t):t}function ha(e,{relative:t}={}){let{matches:r}=Gt(ia),{pathname:n}=sa(),i=JSON.stringify(zo(r));return It((()=>qo(e,JSON.parse(i),n,"path"===t)),[e,i,n,t])}function fa(e,t,r,n){var i;ko(aa(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=Gt(ra),{matches:a}=Gt(ia),s=a[a.length-1],l=s?s.params:{},c=s?s.pathname:"/",u=s?s.pathnameBase:"/",d=s&&s.route;{let e=d&&d.path||"";xa(c,!d||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) 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.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let p,h=sa();if(t){let e="string"==typeof t?Po(t):t;ko("/"===u||(null==(i=e.pathname)?void 0:i.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${e.pathname}" was given in the \`location\` prop.`),p=e}else p=h;let f=p.pathname||"/",m=f;if("/"!==u){let e=u.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let v=Ro(e,{pathname:m});So(d||null!=v,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),So(null==v||void 0!==v[v.length-1].route.element||void 0!==v[v.length-1].route.Component||void 0!==v[v.length-1].route.lazy,`Matched leaf route at location "${p.pathname}${p.search}${p.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 g=function(e,t=[],r=null){if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let n=e,i=null==r?void 0:r.errors;if(null!=i){let e=n.findIndex((e=>e.route.id&&void 0!==(null==i?void 0:i[e.route.id])));ko(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),n=n.slice(0,Math.min(n.length,e+1))}let o=!1,a=-1;if(r)for(let s=0;s<n.length;s++){let e=n[s];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(a=s),e.route.id){let{loaderData:t,errors:i}=r,s=e.route.loader&&!t.hasOwnProperty(e.route.id)&&(!i||void 0===i[e.route.id]);if(e.route.lazy||s){o=!0,n=a>=0?n.slice(0,a+1):[n[0]];break}}}return n.reduceRight(((e,s,l)=>{let c,u=!1,d=null,p=null;r&&(c=i&&s.route.id?i[s.route.id]:void 0,d=s.route.errorElement||va,o&&(a<0&&0===l?(xa("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),u=!0,p=null):a===l&&(u=!0,p=s.route.hydrateFallbackElement||null)));let h=t.concat(n.slice(0,l+1)),f=()=>{let t;return t=c?d:u?p:s.route.Component?De(s.route.Component,null):s.route.element?s.route.element:e,De(_a,{match:s,routeContext:{outlet:e,matches:h,isDataRoute:null!=r},children:t})};return r&&(s.route.ErrorBoundary||s.route.errorElement||0===l)?De(ga,{location:r.location,revalidation:r.revalidation,component:d,error:c,children:f(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):f()}),null)}(v&&v.map((e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:Ko([u,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:Ko([u,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),a,r,n);return t&&g?De(na.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...p},navigationType:"POP"}},g):g}function ma(){let e=function(){var e;let t=Gt(oa),r=function(e){let t=Gt(ea);return ko(t,ya(e)),t}("useRouteError"),n=wa("useRouteError");if(void 0!==t)return t;return null==(e=r.errors)?void 0:e[n]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=De($e,null,De("p",null,"💿 Hey developer 👋"),De("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",De("code",{style:o},"ErrorBoundary")," or"," ",De("code",{style:o},"errorElement")," prop on your route.")),De($e,null,De("h2",null,"Unexpected Application Error!"),De("h3",{style:{fontStyle:"italic"}},t),r?De("pre",{style:i},r):null,a)}var va=De(ma,null),ga=class extends He{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||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?De(ia.Provider,{value:this.props.routeContext},De(oa.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function _a({routeContext:e,match:t,children:r}){let n=Gt(Jo);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),De(ia.Provider,{value:e},r)}function ya(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function wa(e){let t=function(e){let t=Gt(ia);return ko(t,ya(e)),t}(e),r=t.matches[t.matches.length-1];return ko(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}var ba={};function xa(e,t,r){t||ba[e]||(ba[e]=!0,So(!1,r))}function ka({to:e,replace:t,state:r,relative:n}){ko(aa(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=Gt(ra);So(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=Gt(ia),{pathname:a}=sa(),s=ua(),l=qo(e,zo(o),a,"path"===n),c=JSON.stringify(l);return Ot((()=>{s(JSON.parse(c),{replace:t,state:r,relative:n})}),[s,c,n,t,r]),null}function Sa(e){return pa(e.context)}function Ea(e){ko(!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 Ca({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:i,static:o=!1}){ko(!aa(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=e.replace(/^\/*/,"/"),s=It((()=>({basename:a,navigator:i,static:o,future:{}})),[a,i,o]);"string"==typeof r&&(r=Po(r));let{pathname:l="/",search:c="",hash:u="",state:d=null,key:p="default"}=r,h=It((()=>{let e=jo(l,a);return null==e?null:{location:{pathname:e,search:c,hash:u,state:d,key:p},navigationType:n}}),[a,l,c,u,d,p,n]);return So(null!=h,`<Router basename="${a}"> is not able to match the URL "${l}${c}${u}" because it does not start with the basename, so the <Router> won't render anything.`),null==h?null:De(ra.Provider,{value:s},De(na.Provider,{children:t,value:h}))}function Ta({children:e,location:t}){return fa(Pa(e),t)}function Pa(e,t=[]){let r=[];return ir.forEach(e,((e,n)=>{if(!Dr(e))return;let i=[...t,n];if(e.type===$e)return void r.push.apply(r,Pa(e.props.children,i));ko(e.type===Ea,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ko(!e.props.index||!e.props.children,"An index route cannot have child routes.");let o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=Pa(e.props.children,i)),r.push(o)})),r}Jt((function({routes:e,future:t,state:r}){return fa(e,void 0,r,t)}));var Ra="get",Aa="application/x-www-form-urlencoded";function Oa(e){return null!=e&&"string"==typeof e.tagName}var La=null;var Ma=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Fa(e){return null==e||Ma.has(e)?e:(So(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Aa}"`),null)}function Ia(e,t){let r,n,i,o,a;if(Oa(s=e)&&"form"===s.tagName.toLowerCase()){let a=e.getAttribute("action");n=a?jo(a,t):null,r=e.getAttribute("method")||Ra,i=Fa(e.getAttribute("enctype"))||Aa,o=new FormData(e)}else if(function(e){return Oa(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Oa(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||a.getAttribute("action");if(n=s?jo(s,t):null,r=e.getAttribute("formmethod")||a.getAttribute("method")||Ra,i=Fa(e.getAttribute("formenctype"))||Fa(a.getAttribute("enctype"))||Aa,o=new FormData(a,e),!function(){if(null===La)try{new FormData(document.createElement("form"),0),La=!1}catch(yc){La=!0}return La}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}else t&&o.append(t,n)}}else{if(Oa(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ra,n=null,i=Aa,a=e}var s;return o&&"text/plain"===i&&(a=o,o=void 0),{action:n,method:r.toLowerCase(),encType:i,formData:o,body:a}}function Da(e,t){if(!1===e||null==e)throw new Error(t)}function Ga(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function Na(e,t,r){return function(e,t){let r=new Set;return new Set(t),e.reduce(((e,t)=>{let n=JSON.stringify(function(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}(t));return r.has(n)||(r.add(n),e.push({key:n,link:t})),e}),[])}((await Promise.all(e.map((async e=>{let n=t.routes[e.route.id];if(n){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise((()=>{}))}}(n,r);return e.links?e.links():[]}return[]})))).flat(1).filter(Ga).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}function $a(e,t,r,n,i,o){let a=(e,t)=>!r[t]||e.route.id!==r[t].route.id,s=(e,t)=>{var n;return r[t].pathname!==e.pathname||(null==(n=r[t].route.path)?void 0:n.endsWith("*"))&&r[t].params["*"]!==e.params["*"]};return"assets"===o?t.filter(((e,t)=>a(e,t)||s(e,t))):"data"===o?t.filter(((t,o)=>{var l;let c=n.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(a(t,o)||s(t,o))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:(null==(l=r[0])?void 0:l.params)||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0})):[]}function Ha(e,t){return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let n=[r.module];return r.imports&&(n=n.concat(r.imports)),n})).flat(1),[...new Set(r)];var r}var Wa=at(void 0);function Ua(){let e=Gt(Wa);return Da(e,"You must render this element inside a <HydratedRouter> element"),e}function ja(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Ba({page:e,...t}){let{router:r}=function(){let e=Gt(Jo);return Da(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}(),n=It((()=>Ro(r.routes,e,r.basename)),[r.routes,e,r.basename]);return n?De(za,{page:e,matches:n,...t}):null}function za({page:e,matches:t,...r}){let n=sa(),{manifest:i,routeModules:o}=Ua(),{loaderData:a,matches:s}=function(){let e=Gt(ea);return Da(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}(),l=It((()=>$a(e,t,s,i,n,"data")),[e,t,s,i,n]),c=It((()=>$a(e,t,s,i,n,"assets")),[e,t,s,i,n]),u=It((()=>{if(e===n.pathname+n.search+n.hash)return[];let r=new Set,s=!1;if(t.forEach((e=>{var t;let n=i.routes[e.route.id];n&&n.hasLoader&&(!l.some((t=>t.route.id===e.route.id))&&e.route.id in a&&(null==(t=o[e.route.id])?void 0:t.shouldRevalidate)||n.hasClientLoader?s=!0:r.add(e.route.id))})),0===r.size)return[];let c=function(e){let t="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===t.pathname?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}(e);return s&&r.size>0&&c.searchParams.set("_routes",t.filter((e=>r.has(e.route.id))).map((e=>e.route.id)).join(",")),[c.pathname+c.search]}),[a,n,i,l,t,e,o]),d=It((()=>Ha(c,i)),[c,i]),p=function(e){let{manifest:t,routeModules:r}=Ua(),[n,i]=Rt([]);return Ot((()=>{let n=!1;return Na(e,t,r).then((e=>{n||i(e)})),()=>{n=!0}}),[e,t,r]),n}(c);return De($e,null,u.map((e=>De("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r}))),d.map((e=>De("link",{key:e,rel:"modulepreload",href:e,...r}))),p.map((({key:e,link:t})=>De("link",{key:e,...t}))))}function qa(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}Wa.displayName="FrameworkContext";var Ka="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Ka&&(window.__reactRouterVersion="7.1.1")}catch(yc){}function Va({basename:e,children:t,window:r}){let n=Mt();null==n.current&&(n.current=xo({window:r,v5Compat:!0}));let i=n.current,[o,a]=Rt({action:i.action,location:i.location}),s=Dt((e=>{zr((()=>a(e)))}),[a]);return Lt((()=>i.listen(s)),[i,s]),De(Ca,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:i})}var Qa=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ya=rr((function({onClick:e,discover:t="render",prefetch:r="none",relative:n,reloadDocument:i,replace:o,state:a,target:s,to:l,preventScrollReset:c,viewTransition:u,...d},p){let h,{basename:f}=Gt(ra),m="string"==typeof l&&Qa.test(l),v=!1;if("string"==typeof l&&m&&(h=l,Ka))try{let e=new URL(window.location.href),t=l.startsWith("//")?new URL(e.protocol+l):new URL(l),r=jo(t.pathname,f);t.origin===e.origin&&null!=r?l=r+t.search+t.hash:v=!0}catch(yc){So(!1,`<Link to="${l}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let g=function(e,{relative:t}={}){ko(aa(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=Gt(ra),{hash:i,pathname:o,search:a}=ha(e,{relative:t}),s=o;return"/"!==r&&(s="/"===o?r:Ko([r,o])),n.createHref({pathname:s,search:a,hash:i})}(l,{relative:n}),[_,y,w]=function(e,t){let r=Gt(Wa),[n,i]=Rt(!1),[o,a]=Rt(!1),{onFocus:s,onBlur:l,onMouseEnter:c,onMouseLeave:u,onTouchStart:d}=t,p=Mt(null);Ot((()=>{if("render"===e&&a(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{a(e.isIntersecting)}))}),{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}}),[e]),Ot((()=>{if(n){let e=setTimeout((()=>{a(!0)}),100);return()=>{clearTimeout(e)}}}),[n]);let h=()=>{i(!0)},f=()=>{i(!1),a(!1)};return r?"intent"!==e?[o,p,{}]:[o,p,{onFocus:ja(s,h),onBlur:ja(l,f),onMouseEnter:ja(c,h),onMouseLeave:ja(u,f),onTouchStart:ja(d,h)}]:[!1,p,{}]}(r,d),b=function(e,{target:t,replace:r,state:n,preventScrollReset:i,relative:o,viewTransition:a}={}){let s=ua(),l=sa(),c=ha(e,{relative:o});return Dt((u=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(u,t)){u.preventDefault();let t=void 0!==r?r:To(l)===To(c);s(e,{replace:t,state:n,preventScrollReset:i,relative:o,viewTransition:a})}}),[l,s,c,r,n,t,e,i,o,a])}(l,{replace:o,state:a,target:s,preventScrollReset:c,relative:n,viewTransition:u});let x=De("a",{...d,...w,href:h||g,onClick:v||i?e:function(t){e&&e(t),t.defaultPrevented||b(t)},ref:qa(p,y),target:s,"data-discover":m||"render"!==t?void 0:"true"});return _&&!m?De($e,null,x,De(Ba,{page:g})):x}));Ya.displayName="Link";var Xa=rr((function({"aria-current":e="page",caseSensitive:t=!1,className:r="",end:n=!1,style:i,to:o,viewTransition:a,children:s,...l},c){let u=ha(o,{relative:l.relative}),d=sa(),p=Gt(ea),{navigator:h,basename:f}=Gt(ra),m=null!=p&&function(e,t={}){let r=Gt(ta);ko(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Za("useViewTransitionState"),i=ha(e,{relative:t.relative});if(!r.isTransitioning)return!1;let o=jo(r.currentLocation.pathname,n)||r.currentLocation.pathname,a=jo(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=Wo(i.pathname,a)||null!=Wo(i.pathname,o)}(u)&&!0===a,v=h.encodeLocation?h.encodeLocation(u).pathname:u.pathname,g=d.pathname,_=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(g=g.toLowerCase(),_=_?_.toLowerCase():null,v=v.toLowerCase()),_&&f&&(_=jo(_,f)||_);const y="/"!==v&&v.endsWith("/")?v.length-1:v.length;let w,b=g===v||!n&&g.startsWith(v)&&"/"===g.charAt(y),x=null!=_&&(_===v||!n&&_.startsWith(v)&&"/"===_.charAt(v.length)),k={isActive:b,isPending:x,isTransitioning:m},S=b?e:void 0;w="function"==typeof r?r(k):[r,b?"active":null,x?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let E="function"==typeof i?i(k):i;return De(Ya,{...l,"aria-current":S,className:w,ref:c,style:E,to:o,viewTransition:a},"function"==typeof s?s(k):s)}));function Za(e){let t=Gt(Jo);return ko(t,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}Xa.displayName="NavLink",rr((({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:i,state:o,method:a=Ra,action:s,onSubmit:l,relative:c,preventScrollReset:u,viewTransition:d,...p},h)=>{let f=function(){let{router:e}=Za("useSubmit"),{basename:t}=Gt(ra),r=wa("useRouteId");return Dt((async(n,i={})=>{let{action:o,method:a,encType:s,formData:l,body:c}=Ia(n,t);if(!1===i.navigate){let t=i.fetcherKey||es();await e.fetch(t,r,i.action||o,{preventScrollReset:i.preventScrollReset,formData:l,body:c,formMethod:i.method||a,formEncType:i.encType||s,flushSync:i.flushSync})}else await e.navigate(i.action||o,{preventScrollReset:i.preventScrollReset,formData:l,body:c,formMethod:i.method||a,formEncType:i.encType||s,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})}),[e,t,r])}(),m=function(e,{relative:t}={}){let{basename:r}=Gt(ra),n=Gt(ia);ko(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),o={...ha(e||".",{relative:t})},a=sa();if(null==e){o.search=a.search;let e=new URLSearchParams(o.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let r=e.toString();o.search=r?`?${r}`:""}}e&&"."!==e||!i.route.index||(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index");"/"!==r&&(o.pathname="/"===o.pathname?r:Ko([r,o.pathname]));return To(o)}(s,{relative:c}),v="get"===a.toLowerCase()?"get":"post",g="string"==typeof s&&Qa.test(s);return De("form",{ref:h,method:v,action:m,onSubmit:n?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let n=e.nativeEvent.submitter,s=(null==n?void 0:n.getAttribute("formmethod"))||a;f(n||e.currentTarget,{fetcherKey:t,method:s,navigate:r,replace:i,state:o,relative:c,preventScrollReset:u,viewTransition:d})},...p,"data-discover":g||"render"!==e?void 0:"true"})})).displayName="Form";var Ja=0,es=()=>`__${String(++Ja)}__`;new TextEncoder;var ts=0;function rs(e,t,r,n,i,o){t||(t={});var a,s,l=t;"ref"in t&&(a=t.ref,delete t.ref);var c={type:e,props:l,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--ts,__i:-1,__u:0,__source:i,__self:o};if("function"==typeof e&&(a=e.defaultProps))for(s in a)void 0===l[s]&&(l[s]=a[s]);return we.vnode&&we.vnode(c),c}var ns=$e;function is(e,t,r){return Xi.call(t,"css")?rs(to,Ji(e,t),r):rs(e,t,r)}function os(e,t,r){return Xi.call(t,"css")?rs(to,Ji(e,t),r):rs(e,t,r)}const as=co.span({whiteSpace:"nowrap",borderBottomWidth:"2px",paddingLeft:"0.25rem",paddingRight:"0.25rem",paddingTop:"1rem",paddingBottom:"1rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500"},(({isActive:e})=>e?{cursor:"default","--tw-border-opacity":"1",borderColor:"rgb(99 102 241 / var(--tw-border-opacity))","--tw-text-opacity":"1",color:"rgb(79 70 229 / var(--tw-text-opacity))"}:{cursor:"pointer",borderColor:"transparent","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))",":hover":{"--tw-border-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-border-opacity))","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))"}})),ss=co.span({marginLeft:"0.25rem",display:"inline-flex",width:"1.25rem",alignItems:"center",justifyContent:"center",borderRadius:"9999px",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',fontWeight:"700","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))"},(({isActive:e})=>e?{"--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))"}:{"--tw-bg-opacity":"1",backgroundColor:"rgb(107 114 128 / var(--tw-bg-opacity))",".group:hover &":{"--tw-bg-opacity":"1",backgroundColor:"rgb(55 65 81 / var(--tw-bg-opacity))"}})),ls=({tabs:e})=>is("div",{css:{display:"block"},children:is("div",{css:{borderBottomWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-border-opacity))",paddingBottom:"1rem"},children:is("nav",{"aria-label":"Tabs",css:{marginBottom:"-2px",display:"flex","> :not([hidden]) ~ :not([hidden])":{"--tw-space-x-reverse":"0",marginRight:"calc(2rem * var(--tw-space-x-reverse))",marginLeft:"calc(2rem * calc(1 - var(--tw-space-x-reverse)))"},paddingTop:"1rem"},children:e.map((e=>is(Xa,{to:e.id,children:({isActive:t})=>os(as,{className:"group",isActive:t,children:[e.displayName,void 0!==e.count&&is(ss,{isActive:t,children:e.count})]})},e.id)))})})});var cs=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},us="undefined"==typeof window||"Deno"in globalThis;function ds(){}function ps(e){return"number"==typeof e&&e>=0&&e!==1/0}function hs(e,t){return Math.max(e+(t||0)-Date.now(),0)}function fs(e,t){return"function"==typeof e?e(t):e}function ms(e,t){return"function"==typeof e?e(t):e}function vs(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:a,stale:s}=e;if(a)if(n){if(t.queryHash!==_s(a,t.options))return!1}else if(!ws(t.queryKey,a))return!1;if("all"!==r){const e=t.isActive();if("active"===r&&!e)return!1;if("inactive"===r&&e)return!1}return("boolean"!=typeof s||t.isStale()===s)&&((!i||i===t.state.fetchStatus)&&!(o&&!o(t)))}function gs(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(ys(t.options.mutationKey)!==ys(o))return!1}else if(!ws(t.options.mutationKey,o))return!1}return(!n||t.state.status===n)&&!(i&&!i(t))}function _s(e,t){return((null==t?void 0:t.queryKeyHashFn)||ys)(e)}function ys(e){return JSON.stringify(e,((e,t)=>Ss(t)?Object.keys(t).sort().reduce(((e,r)=>(e[r]=t[r],e)),{}):t))}function ws(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((r=>!ws(e[r],t[r]))))}function bs(e,t){if(e===t)return e;const r=ks(e)&&ks(t);if(r||Ss(e)&&Ss(t)){const n=r?e:Object.keys(e),i=n.length,o=r?t:Object.keys(t),a=o.length,s=r?[]:{};let l=0;for(let c=0;c<a;c++){const i=r?c:o[c];(!r&&n.includes(i)||r)&&void 0===e[i]&&void 0===t[i]?(s[i]=void 0,l++):(s[i]=bs(e[i],t[i]),s[i]===e[i]&&void 0!==e[i]&&l++)}return i===a&&l===i?e:s}return t}function xs(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function ks(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ss(e){if(!Es(e))return!1;const t=e.constructor;if(void 0===t)return!0;const r=t.prototype;return!!Es(r)&&(!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function Es(e){return"[object Object]"===Object.prototype.toString.call(e)}function Cs(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?bs(e,t):t}function Ts(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Ps(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Rs=Symbol();function As(e,t){return!e.queryFn&&(null==t?void 0:t.initialPromise)?()=>t.initialPromise:e.queryFn&&e.queryFn!==Rs?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}var Os=new(n=class extends cs{constructor(){super(),__privateAdd(this,e),__privateAdd(this,t),__privateAdd(this,r),__privateSet(this,r,(e=>{if(!us&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}))}onSubscribe(){__privateGet(this,t)||this.setEventListener(__privateGet(this,r))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=__privateGet(this,t))||e.call(this),__privateSet(this,t,void 0))}setEventListener(e){var n;__privateSet(this,r,e),null==(n=__privateGet(this,t))||n.call(this),__privateSet(this,t,e((e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})))}setFocused(t){__privateGet(this,e)!==t&&(__privateSet(this,e,t),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach((t=>{t(e)}))}isFocused(){var t;return"boolean"==typeof __privateGet(this,e)?__privateGet(this,e):"hidden"!==(null==(t=globalThis.document)?void 0:t.visibilityState)}},e=new WeakMap,t=new WeakMap,r=new WeakMap,n),Ls=new(s=class extends cs{constructor(){super(),__privateAdd(this,i,!0),__privateAdd(this,o),__privateAdd(this,a),__privateSet(this,a,(e=>{if(!us&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}))}onSubscribe(){__privateGet(this,o)||this.setEventListener(__privateGet(this,a))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=__privateGet(this,o))||e.call(this),__privateSet(this,o,void 0))}setEventListener(e){var t;__privateSet(this,a,e),null==(t=__privateGet(this,o))||t.call(this),__privateSet(this,o,e(this.setOnline.bind(this)))}setOnline(e){__privateGet(this,i)!==e&&(__privateSet(this,i,e),this.listeners.forEach((t=>{t(e)})))}isOnline(){return __privateGet(this,i)}},i=new WeakMap,o=new WeakMap,a=new WeakMap,s);function Ms(){let e,t;const r=new Promise(((r,n)=>{e=r,t=n}));function n(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch((()=>{})),r.resolve=t=>{n({status:"fulfilled",value:t}),e(t)},r.reject=e=>{n({status:"rejected",reason:e}),t(e)},r}function Fs(e){return Math.min(1e3*2**e,3e4)}function Is(e){return"online"!==(e??"online")||Ls.isOnline()}var Ds=class extends Error{constructor(e){super("CancelledError"),this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}};function Gs(e){return e instanceof Ds}function Ns(e){let t,r=!1,n=0,i=!1;const o=Ms(),a=()=>Os.isFocused()&&("always"===e.networkMode||Ls.isOnline())&&e.canRun(),s=()=>Is(e.networkMode)&&e.canRun(),l=r=>{var n;i||(i=!0,null==(n=e.onSuccess)||n.call(e,r),null==t||t(),o.resolve(r))},c=r=>{var n;i||(i=!0,null==(n=e.onError)||n.call(e,r),null==t||t(),o.reject(r))},u=()=>new Promise((r=>{var n;t=e=>{(i||a())&&r(e)},null==(n=e.onPause)||n.call(e)})).then((()=>{var r;t=void 0,i||null==(r=e.onContinue)||r.call(e)})),d=()=>{if(i)return;let t;const o=0===n?e.initialPromise:void 0;try{t=o??e.fn()}catch(s){t=Promise.reject(s)}Promise.resolve(t).then(l).catch((t=>{var o;if(i)return;const s=e.retry??(us?0:3),l=e.retryDelay??Fs,p="function"==typeof l?l(n,t):l,h=!0===s||"number"==typeof s&&n<s||"function"==typeof s&&s(n,t);var f;!r&&h?(n++,null==(o=e.onFail)||o.call(e,n,t),(f=p,new Promise((e=>{setTimeout(e,f)}))).then((()=>a()?void 0:u())).then((()=>{r?c(t):d()}))):c(t)}))};return{promise:o,cancel:t=>{var r;i||(c(new Ds(t)),null==(r=e.abort)||r.call(e))},continue:()=>(null==t||t(),o),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:s,start:()=>(s()?d():u().then(d),o)}}var $s=function(){let e=[],t=0,r=e=>{e()},n=e=>{e()},i=e=>setTimeout(e,0);const o=n=>{t?e.push(n):i((()=>{r(n)}))};return{batch:o=>{let a;t++;try{a=o()}finally{t--,t||(()=>{const t=e;e=[],t.length&&i((()=>{n((()=>{t.forEach((e=>{r(e)}))}))}))})()}return a},batchCalls:e=>(...t)=>{o((()=>{e(...t)}))},schedule:o,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{n=e},setScheduler:e=>{i=e}}}(),Hs=(c=class{constructor(){__privateAdd(this,l)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ps(this.gcTime)&&__privateSet(this,l,setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(us?1/0:3e5))}clearGcTimeout(){__privateGet(this,l)&&(clearTimeout(__privateGet(this,l)),__privateSet(this,l,void 0))}},l=new WeakMap,c),Ws=(_=class extends Hs{constructor(e){super(),__privateAdd(this,v),__privateAdd(this,u),__privateAdd(this,d),__privateAdd(this,p),__privateAdd(this,h),__privateAdd(this,f),__privateAdd(this,m),__privateSet(this,m,!1),__privateSet(this,f,e.defaultOptions),this.setOptions(e.options),this.observers=[],__privateSet(this,p,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,__privateSet(this,u,function(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}(this.options)),this.state=e.state??__privateGet(this,u),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return null==(e=__privateGet(this,h))?void 0:e.promise}setOptions(e){this.options={...__privateGet(this,f),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||__privateGet(this,p).remove(this)}setData(e,t){const r=Cs(this.state.data,e,this.options);return __privateMethod(this,v,g).call(this,{data:r,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),r}setState(e,t){__privateMethod(this,v,g).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var t,r;const n=null==(t=__privateGet(this,h))?void 0:t.promise;return null==(r=__privateGet(this,h))||r.cancel(e),n?n.then(ds).catch(ds):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(__privateGet(this,u))}isActive(){return this.observers.some((e=>!1!==ms(e.options.enabled,this)))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rs||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some((e=>e.getCurrentResult().isStale)):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!hs(this.state.dataUpdatedAt,e)}onFocus(){var e;const t=this.observers.find((e=>e.shouldFetchOnWindowFocus()));null==t||t.refetch({cancelRefetch:!1}),null==(e=__privateGet(this,h))||e.continue()}onOnline(){var e;const t=this.observers.find((e=>e.shouldFetchOnReconnect()));null==t||t.refetch({cancelRefetch:!1}),null==(e=__privateGet(this,h))||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),__privateGet(this,p).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter((t=>t!==e)),this.observers.length||(__privateGet(this,h)&&(__privateGet(this,m)?__privateGet(this,h).cancel({revert:!0}):__privateGet(this,h).cancelRetry()),this.scheduleGc()),__privateGet(this,p).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||__privateMethod(this,v,g).call(this,{type:"invalidate"})}fetch(e,t){var r,n,i;if("idle"!==this.state.fetchStatus)if(void 0!==this.state.data&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(__privateGet(this,h))return __privateGet(this,h).continueRetry(),__privateGet(this,h).promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}const o=new AbortController,a=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(__privateSet(this,m,!0),o.signal)})},s={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{const e=As(this.options,t),r={queryKey:this.queryKey,meta:this.meta};return a(r),__privateSet(this,m,!1),this.options.persister?this.options.persister(e,r,this):e(r)}};a(s),null==(r=this.options.behavior)||r.onFetch(s,this),__privateSet(this,d,this.state),"idle"!==this.state.fetchStatus&&this.state.fetchMeta===(null==(n=s.fetchOptions)?void 0:n.meta)||__privateMethod(this,v,g).call(this,{type:"fetch",meta:null==(i=s.fetchOptions)?void 0:i.meta});const l=e=>{var t,r,n,i;Gs(e)&&e.silent||__privateMethod(this,v,g).call(this,{type:"error",error:e}),Gs(e)||(null==(r=(t=__privateGet(this,p).config).onError)||r.call(t,e,this),null==(i=(n=__privateGet(this,p).config).onSettled)||i.call(n,this.state.data,e,this)),this.scheduleGc()};return __privateSet(this,h,Ns({initialPromise:null==t?void 0:t.initialPromise,fn:s.fetchFn,abort:o.abort.bind(o),onSuccess:e=>{var t,r,n,i;if(void 0!==e){try{this.setData(e)}catch(o){return void l(o)}null==(r=(t=__privateGet(this,p).config).onSuccess)||r.call(t,e,this),null==(i=(n=__privateGet(this,p).config).onSettled)||i.call(n,e,this.state.error,this),this.scheduleGc()}else l(new Error(`${this.queryHash} data is undefined`))},onError:l,onFail:(e,t)=>{__privateMethod(this,v,g).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{__privateMethod(this,v,g).call(this,{type:"pause"})},onContinue:()=>{__privateMethod(this,v,g).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),__privateGet(this,h).start()}},u=new WeakMap,d=new WeakMap,p=new WeakMap,h=new WeakMap,f=new WeakMap,m=new WeakMap,v=new WeakSet,g=function(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...Us(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return Gs(r)&&r.revert&&__privateGet(this,d)?{...__privateGet(this,d),fetchStatus:"idle"}:{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),$s.batch((()=>{this.observers.forEach((e=>{e.onQueryUpdate()})),__privateGet(this,p).notify({query:this,type:"updated",action:e})}))},_);function Us(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Is(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}var js=(w=class extends cs{constructor(e={}){super(),__privateAdd(this,y),this.config=e,__privateSet(this,y,new Map)}build(e,t,r){const n=t.queryKey,i=t.queryHash??_s(n,t);let o=this.get(i);return o||(o=new Ws({cache:this,queryKey:n,queryHash:i,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)}),this.add(o)),o}add(e){__privateGet(this,y).has(e.queryHash)||(__privateGet(this,y).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=__privateGet(this,y).get(e.queryHash);t&&(e.destroy(),t===e&&__privateGet(this,y).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){$s.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}get(e){return __privateGet(this,y).get(e)}getAll(){return[...__privateGet(this,y).values()]}find(e){const t={exact:!0,...e};return this.getAll().find((e=>vs(t,e)))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter((t=>vs(e,t))):t}notify(e){$s.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}onFocus(){$s.batch((()=>{this.getAll().forEach((e=>{e.onFocus()}))}))}onOnline(){$s.batch((()=>{this.getAll().forEach((e=>{e.onOnline()}))}))}},y=new WeakMap,w),Bs=(C=class extends Hs{constructor(e){super(),__privateAdd(this,S),__privateAdd(this,b),__privateAdd(this,x),__privateAdd(this,k),this.mutationId=e.mutationId,__privateSet(this,x,e.mutationCache),__privateSet(this,b,[]),this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){__privateGet(this,b).includes(e)||(__privateGet(this,b).push(e),this.clearGcTimeout(),__privateGet(this,x).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){__privateSet(this,b,__privateGet(this,b).filter((t=>t!==e))),this.scheduleGc(),__privateGet(this,x).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){__privateGet(this,b).length||("pending"===this.state.status?this.scheduleGc():__privateGet(this,x).remove(this))}continue(){var e;return(null==(e=__privateGet(this,k))?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var t,r,n,i,o,a,s,l,c,u,d,p,h,f,m,v,g,_,y,w;__privateSet(this,k,Ns({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{__privateMethod(this,S,E).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{__privateMethod(this,S,E).call(this,{type:"pause"})},onContinue:()=>{__privateMethod(this,S,E).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>__privateGet(this,x).canRun(this)}));const b="pending"===this.state.status,C=!__privateGet(this,k).canStart();try{if(!b){__privateMethod(this,S,E).call(this,{type:"pending",variables:e,isPaused:C}),await(null==(r=(t=__privateGet(this,x).config).onMutate)?void 0:r.call(t,e,this));const o=await(null==(i=(n=this.options).onMutate)?void 0:i.call(n,e));o!==this.state.context&&__privateMethod(this,S,E).call(this,{type:"pending",context:o,variables:e,isPaused:C})}const h=await __privateGet(this,k).start();return await(null==(a=(o=__privateGet(this,x).config).onSuccess)?void 0:a.call(o,h,e,this.state.context,this)),await(null==(l=(s=this.options).onSuccess)?void 0:l.call(s,h,e,this.state.context)),await(null==(u=(c=__privateGet(this,x).config).onSettled)?void 0:u.call(c,h,null,this.state.variables,this.state.context,this)),await(null==(p=(d=this.options).onSettled)?void 0:p.call(d,h,null,e,this.state.context)),__privateMethod(this,S,E).call(this,{type:"success",data:h}),h}catch(T){try{throw await(null==(f=(h=__privateGet(this,x).config).onError)?void 0:f.call(h,T,e,this.state.context,this)),await(null==(v=(m=this.options).onError)?void 0:v.call(m,T,e,this.state.context)),await(null==(_=(g=__privateGet(this,x).config).onSettled)?void 0:_.call(g,void 0,T,this.state.variables,this.state.context,this)),await(null==(w=(y=this.options).onSettled)?void 0:w.call(y,void 0,T,e,this.state.context)),T}finally{__privateMethod(this,S,E).call(this,{type:"error",error:T})}}finally{__privateGet(this,x).runNext(this)}}},b=new WeakMap,x=new WeakMap,k=new WeakMap,S=new WeakSet,E=function(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),$s.batch((()=>{__privateGet(this,b).forEach((t=>{t.onMutationUpdate(e)})),__privateGet(this,x).notify({mutation:this,type:"updated",action:e})}))},C);var zs=(R=class extends cs{constructor(e={}){super(),__privateAdd(this,T),__privateAdd(this,P),this.config=e,__privateSet(this,T,new Map),__privateSet(this,P,Date.now())}build(e,t,r){const n=new Bs({mutationCache:this,mutationId:++__privateWrapper(this,P)._,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){const t=qs(e),r=__privateGet(this,T).get(t)??[];r.push(e),__privateGet(this,T).set(t,r),this.notify({type:"added",mutation:e})}remove(e){var t;const r=qs(e);if(__privateGet(this,T).has(r)){const n=null==(t=__privateGet(this,T).get(r))?void 0:t.filter((t=>t!==e));n&&(0===n.length?__privateGet(this,T).delete(r):__privateGet(this,T).set(r,n))}this.notify({type:"removed",mutation:e})}canRun(e){var t;const r=null==(t=__privateGet(this,T).get(qs(e)))?void 0:t.find((e=>"pending"===e.state.status));return!r||r===e}runNext(e){var t;const r=null==(t=__privateGet(this,T).get(qs(e)))?void 0:t.find((t=>t!==e&&t.state.isPaused));return(null==r?void 0:r.continue())??Promise.resolve()}clear(){$s.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}getAll(){return[...__privateGet(this,T).values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find((e=>gs(t,e)))}findAll(e={}){return this.getAll().filter((t=>gs(e,t)))}notify(e){$s.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}resumePausedMutations(){const e=this.getAll().filter((e=>e.state.isPaused));return $s.batch((()=>Promise.all(e.map((e=>e.continue().catch(ds))))))}},T=new WeakMap,P=new WeakMap,R);function qs(e){var t;return(null==(t=e.options.scope)?void 0:t.id)??String(e.mutationId)}function Ks(e){return{onFetch:(t,r)=>{var n,i,o,a,s;const l=t.options,c=null==(o=null==(i=null==(n=t.fetchOptions)?void 0:n.meta)?void 0:i.fetchMore)?void 0:o.direction,u=(null==(a=t.state.data)?void 0:a.pages)||[],d=(null==(s=t.state.data)?void 0:s.pageParams)||[];let p={pages:[],pageParams:[]},h=0;const f=async()=>{let r=!1;const n=As(t.options,t.fetchOptions),i=async(e,i,o)=>{if(r)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);const a={queryKey:t.queryKey,pageParam:i,direction:o?"backward":"forward",meta:t.options.meta};var s;s=a,Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",(()=>{r=!0})),t.signal)});const l=await n(a),{maxPages:c}=t.options,u=o?Ps:Ts;return{pages:u(e.pages,l,c),pageParams:u(e.pageParams,i,c)}};if(c&&u.length){const e="backward"===c,t={pages:u,pageParams:d},r=(e?Qs:Vs)(l,t);p=await i(t,r,e)}else{const t=e??u.length;do{const e=0===h?d[0]??l.initialPageParam:Vs(l,p);if(h>0&&null==e)break;p=await i(p,e),h++}while(h<t)}return p};t.options.persister?t.fetchFn=()=>{var e,n;return null==(n=(e=t.options).persister)?void 0:n.call(e,f,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=f}}}function Vs(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function Qs(e,{pages:t,pageParams:r}){var n;return t.length>0?null==(n=e.getPreviousPageParam)?void 0:n.call(e,t[0],t,r[0],r):void 0}var Ys=(N=class{constructor(e={}){__privateAdd(this,A),__privateAdd(this,O),__privateAdd(this,L),__privateAdd(this,M),__privateAdd(this,F),__privateAdd(this,I),__privateAdd(this,D),__privateAdd(this,G),__privateSet(this,A,e.queryCache||new js),__privateSet(this,O,e.mutationCache||new zs),__privateSet(this,L,e.defaultOptions||{}),__privateSet(this,M,new Map),__privateSet(this,F,new Map),__privateSet(this,I,0)}mount(){__privateWrapper(this,I)._++,1===__privateGet(this,I)&&(__privateSet(this,D,Os.subscribe((async e=>{e&&(await this.resumePausedMutations(),__privateGet(this,A).onFocus())}))),__privateSet(this,G,Ls.subscribe((async e=>{e&&(await this.resumePausedMutations(),__privateGet(this,A).onOnline())}))))}unmount(){var e,t;__privateWrapper(this,I)._--,0===__privateGet(this,I)&&(null==(e=__privateGet(this,D))||e.call(this),__privateSet(this,D,void 0),null==(t=__privateGet(this,G))||t.call(this),__privateSet(this,G,void 0))}isFetching(e){return __privateGet(this,A).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return __privateGet(this,O).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const r=this.defaultQueryOptions({queryKey:e});return null==(t=__privateGet(this,A).get(r.queryHash))?void 0:t.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(void 0===t)return this.fetchQuery(e);{const r=this.defaultQueryOptions(e),n=__privateGet(this,A).build(this,r);return e.revalidateIfStale&&n.isStaleByTime(fs(r.staleTime,n))&&this.prefetchQuery(r),Promise.resolve(t)}}getQueriesData(e){return __privateGet(this,A).findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=__privateGet(this,A).get(n.queryHash),o=function(e,t){return"function"==typeof e?e(t):e}(t,null==i?void 0:i.state.data);if(void 0!==o)return __privateGet(this,A).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return $s.batch((()=>__privateGet(this,A).findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,r)]))))}getQueryState(e){var t;const r=this.defaultQueryOptions({queryKey:e});return null==(t=__privateGet(this,A).get(r.queryHash))?void 0:t.state}removeQueries(e){const t=__privateGet(this,A);$s.batch((()=>{t.findAll(e).forEach((e=>{t.remove(e)}))}))}resetQueries(e,t){const r=__privateGet(this,A),n={type:"active",...e};return $s.batch((()=>(r.findAll(e).forEach((e=>{e.reset()})),this.refetchQueries(n,t))))}cancelQueries(e={},t={}){const r={revert:!0,...t},n=$s.batch((()=>__privateGet(this,A).findAll(e).map((e=>e.cancel(r)))));return Promise.all(n).then(ds).catch(ds)}invalidateQueries(e={},t={}){return $s.batch((()=>{if(__privateGet(this,A).findAll(e).forEach((e=>{e.invalidate()})),"none"===e.refetchType)return Promise.resolve();const r={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(r,t)}))}refetchQueries(e={},t){const r={...t,cancelRefetch:(null==t?void 0:t.cancelRefetch)??!0},n=$s.batch((()=>__privateGet(this,A).findAll(e).filter((e=>!e.isDisabled())).map((e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(ds)),"paused"===e.state.fetchStatus?Promise.resolve():t}))));return Promise.all(n).then(ds)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const r=__privateGet(this,A).build(this,t);return r.isStaleByTime(fs(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ds).catch(ds)}fetchInfiniteQuery(e){return e.behavior=Ks(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ds).catch(ds)}ensureInfiniteQueryData(e){return e.behavior=Ks(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ls.isOnline()?__privateGet(this,O).resumePausedMutations():Promise.resolve()}getQueryCache(){return __privateGet(this,A)}getMutationCache(){return __privateGet(this,O)}getDefaultOptions(){return __privateGet(this,L)}setDefaultOptions(e){__privateSet(this,L,e)}setQueryDefaults(e,t){__privateGet(this,M).set(ys(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...__privateGet(this,M).values()];let r={};return t.forEach((t=>{ws(e,t.queryKey)&&(r={...r,...t.defaultOptions})})),r}setMutationDefaults(e,t){__privateGet(this,F).set(ys(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...__privateGet(this,F).values()];let r={};return t.forEach((t=>{ws(e,t.mutationKey)&&(r={...r,...t.defaultOptions})})),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...__privateGet(this,L).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=_s(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),!0!==t.enabled&&t.queryFn===Rs&&(t.enabled=!1),t}defaultMutationOptions(e){return(null==e?void 0:e._defaulted)?e:{...__privateGet(this,L).mutations,...(null==e?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){__privateGet(this,A).clear(),__privateGet(this,O).clear()}},A=new WeakMap,O=new WeakMap,L=new WeakMap,M=new WeakMap,F=new WeakMap,I=new WeakMap,D=new WeakMap,G=new WeakMap,N),Xs=(ue=class extends cs{constructor(e,t){super(),__privateAdd(this,ee),__privateAdd(this,$),__privateAdd(this,H),__privateAdd(this,W),__privateAdd(this,U),__privateAdd(this,j),__privateAdd(this,B),__privateAdd(this,z),__privateAdd(this,q),__privateAdd(this,K),__privateAdd(this,V),__privateAdd(this,Q),__privateAdd(this,Y),__privateAdd(this,X),__privateAdd(this,Z),__privateAdd(this,J,new Set),this.options=t,__privateSet(this,$,e),__privateSet(this,q,null),__privateSet(this,z,Ms()),this.options.experimental_prefetchInRender||__privateGet(this,z).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(__privateGet(this,H).addObserver(this),Zs(__privateGet(this,H),this.options)?__privateMethod(this,ee,te).call(this):this.updateResult(),__privateMethod(this,ee,oe).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Js(__privateGet(this,H),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Js(__privateGet(this,H),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,__privateMethod(this,ee,ae).call(this),__privateMethod(this,ee,se).call(this),__privateGet(this,H).removeObserver(this)}setOptions(e,t){const r=this.options,n=__privateGet(this,H);if(this.options=__privateGet(this,$).defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof ms(this.options.enabled,__privateGet(this,H)))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");__privateMethod(this,ee,le).call(this),__privateGet(this,H).setOptions(this.options),r._defaulted&&!xs(this.options,r)&&__privateGet(this,$).getQueryCache().notify({type:"observerOptionsUpdated",query:__privateGet(this,H),observer:this});const i=this.hasListeners();i&&el(__privateGet(this,H),n,this.options,r)&&__privateMethod(this,ee,te).call(this),this.updateResult(t),!i||__privateGet(this,H)===n&&ms(this.options.enabled,__privateGet(this,H))===ms(r.enabled,__privateGet(this,H))&&fs(this.options.staleTime,__privateGet(this,H))===fs(r.staleTime,__privateGet(this,H))||__privateMethod(this,ee,re).call(this);const o=__privateMethod(this,ee,ne).call(this);!i||__privateGet(this,H)===n&&ms(this.options.enabled,__privateGet(this,H))===ms(r.enabled,__privateGet(this,H))&&o===__privateGet(this,Z)||__privateMethod(this,ee,ie).call(this,o)}getOptimisticResult(e){const t=__privateGet(this,$).getQueryCache().build(__privateGet(this,$),e),r=this.createResult(t,e);return function(e,t){if(!xs(e.getCurrentResult(),t))return!0;return!1}(this,r)&&(__privateSet(this,U,r),__privateSet(this,B,this.options),__privateSet(this,j,__privateGet(this,H).state)),r}getCurrentResult(){return __privateGet(this,U)}trackResult(e,t){const r={};return Object.keys(e).forEach((n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(n),null==t||t(n),e[n])})})),r}trackProp(e){__privateGet(this,J).add(e)}getCurrentQuery(){return __privateGet(this,H)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=__privateGet(this,$).defaultQueryOptions(e),r=__privateGet(this,$).getQueryCache().build(__privateGet(this,$),t);return r.fetch().then((()=>this.createResult(r,t)))}fetch(e){return __privateMethod(this,ee,te).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then((()=>(this.updateResult(),__privateGet(this,U))))}createResult(e,t){var r;const n=__privateGet(this,H),i=this.options,o=__privateGet(this,U),a=__privateGet(this,j),s=__privateGet(this,B),l=e!==n?e.state:__privateGet(this,W),{state:c}=e;let u,d={...c},p=!1;if(t._optimisticResults){const r=this.hasListeners(),o=!r&&Zs(e,t),a=r&&el(e,n,t,i);(o||a)&&(d={...d,...Us(c.data,e.options)}),"isRestoring"===t._optimisticResults&&(d.fetchStatus="idle")}let{error:h,errorUpdatedAt:f,status:m}=d;if(t.select&&void 0!==d.data)if(o&&d.data===(null==a?void 0:a.data)&&t.select===__privateGet(this,K))u=__privateGet(this,V);else try{__privateSet(this,K,t.select),u=t.select(d.data),u=Cs(null==o?void 0:o.data,u,t),__privateSet(this,V,u),__privateSet(this,q,null)}catch(x){__privateSet(this,q,x)}else u=d.data;if(void 0!==t.placeholderData&&void 0===u&&"pending"===m){let e;if((null==o?void 0:o.isPlaceholderData)&&t.placeholderData===(null==s?void 0:s.placeholderData))e=o.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(null==(r=__privateGet(this,Q))?void 0:r.state.data,__privateGet(this,Q)):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),__privateSet(this,q,null)}catch(x){__privateSet(this,q,x)}void 0!==e&&(m="success",u=Cs(null==o?void 0:o.data,e,t),p=!0)}__privateGet(this,q)&&(h=__privateGet(this,q),u=__privateGet(this,V),f=Date.now(),m="error");const v="fetching"===d.fetchStatus,g="pending"===m,_="error"===m,y=g&&v,w=void 0!==u,b={status:m,fetchStatus:d.fetchStatus,isPending:g,isSuccess:"success"===m,isError:_,isInitialLoading:y,isLoading:y,data:u,dataUpdatedAt:d.dataUpdatedAt,error:h,errorUpdatedAt:f,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:v,isRefetching:v&&!g,isLoadingError:_&&!w,isPaused:"paused"===d.fetchStatus,isPlaceholderData:p,isRefetchError:_&&w,isStale:tl(e,t),refetch:this.refetch,promise:__privateGet(this,z)};if(this.options.experimental_prefetchInRender){const t=e=>{"error"===b.status?e.reject(b.error):void 0!==b.data&&e.resolve(b.data)},r=()=>{const e=__privateSet(this,z,b.promise=Ms());t(e)},i=__privateGet(this,z);switch(i.status){case"pending":e.queryHash===n.queryHash&&t(i);break;case"fulfilled":"error"!==b.status&&b.data===i.value||r();break;case"rejected":"error"===b.status&&b.error===i.reason||r()}}return b}updateResult(e){const t=__privateGet(this,U),r=this.createResult(__privateGet(this,H),this.options);if(__privateSet(this,j,__privateGet(this,H).state),__privateSet(this,B,this.options),void 0!==__privateGet(this,j).data&&__privateSet(this,Q,__privateGet(this,H)),xs(r,t))return;__privateSet(this,U,r);const n={};!1!==(null==e?void 0:e.listeners)&&(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options,r="function"==typeof e?e():e;if("all"===r||!r&&!__privateGet(this,J).size)return!0;const n=new Set(r??__privateGet(this,J));return this.options.throwOnError&&n.add("error"),Object.keys(__privateGet(this,U)).some((e=>{const r=e;return __privateGet(this,U)[r]!==t[r]&&n.has(r)}))})()&&(n.listeners=!0),__privateMethod(this,ee,ce).call(this,{...n,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&__privateMethod(this,ee,oe).call(this)}},$=new WeakMap,H=new WeakMap,W=new WeakMap,U=new WeakMap,j=new WeakMap,B=new WeakMap,z=new WeakMap,q=new WeakMap,K=new WeakMap,V=new WeakMap,Q=new WeakMap,Y=new WeakMap,X=new WeakMap,Z=new WeakMap,J=new WeakMap,ee=new WeakSet,te=function(e){__privateMethod(this,ee,le).call(this);let t=__privateGet(this,H).fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(ds)),t},re=function(){__privateMethod(this,ee,ae).call(this);const e=fs(this.options.staleTime,__privateGet(this,H));if(us||__privateGet(this,U).isStale||!ps(e))return;const t=hs(__privateGet(this,U).dataUpdatedAt,e);__privateSet(this,Y,setTimeout((()=>{__privateGet(this,U).isStale||this.updateResult()}),t+1))},ne=function(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(__privateGet(this,H)):this.options.refetchInterval)??!1},ie=function(e){__privateMethod(this,ee,se).call(this),__privateSet(this,Z,e),!us&&!1!==ms(this.options.enabled,__privateGet(this,H))&&ps(__privateGet(this,Z))&&0!==__privateGet(this,Z)&&__privateSet(this,X,setInterval((()=>{(this.options.refetchIntervalInBackground||Os.isFocused())&&__privateMethod(this,ee,te).call(this)}),__privateGet(this,Z)))},oe=function(){__privateMethod(this,ee,re).call(this),__privateMethod(this,ee,ie).call(this,__privateMethod(this,ee,ne).call(this))},ae=function(){__privateGet(this,Y)&&(clearTimeout(__privateGet(this,Y)),__privateSet(this,Y,void 0))},se=function(){__privateGet(this,X)&&(clearInterval(__privateGet(this,X)),__privateSet(this,X,void 0))},le=function(){const e=__privateGet(this,$).getQueryCache().build(__privateGet(this,$),this.options);if(e===__privateGet(this,H))return;const t=__privateGet(this,H);__privateSet(this,H,e),__privateSet(this,W,e.state),this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))},ce=function(e){$s.batch((()=>{e.listeners&&this.listeners.forEach((e=>{e(__privateGet(this,U))})),__privateGet(this,$).getQueryCache().notify({query:__privateGet(this,H),type:"observerResultsUpdated"})}))},ue);function Zs(e,t){return function(e,t){return!1!==ms(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&Js(e,t,t.refetchOnMount)}function Js(e,t,r){if(!1!==ms(t.enabled,e)){const n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&tl(e,t)}return!1}function el(e,t,r,n){return(e!==t||!1===ms(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&tl(e,r)}function tl(e,t){return!1!==ms(t.enabled,e)&&e.isStaleByTime(fs(t.staleTime,e))}var rl=(_e=class extends cs{constructor(e,t){super(),__privateAdd(this,me),__privateAdd(this,de),__privateAdd(this,pe),__privateAdd(this,he),__privateAdd(this,fe),__privateSet(this,de,e),this.setOptions(t),this.bindMethods(),__privateMethod(this,me,ve).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const r=this.options;this.options=__privateGet(this,de).defaultMutationOptions(e),xs(this.options,r)||__privateGet(this,de).getMutationCache().notify({type:"observerOptionsUpdated",mutation:__privateGet(this,he),observer:this}),(null==r?void 0:r.mutationKey)&&this.options.mutationKey&&ys(r.mutationKey)!==ys(this.options.mutationKey)?this.reset():"pending"===(null==(t=__privateGet(this,he))?void 0:t.state.status)&&__privateGet(this,he).setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||null==(e=__privateGet(this,he))||e.removeObserver(this)}onMutationUpdate(e){__privateMethod(this,me,ve).call(this),__privateMethod(this,me,ge).call(this,e)}getCurrentResult(){return __privateGet(this,pe)}reset(){var e;null==(e=__privateGet(this,he))||e.removeObserver(this),__privateSet(this,he,void 0),__privateMethod(this,me,ve).call(this),__privateMethod(this,me,ge).call(this)}mutate(e,t){var r;return __privateSet(this,fe,t),null==(r=__privateGet(this,he))||r.removeObserver(this),__privateSet(this,he,__privateGet(this,de).getMutationCache().build(__privateGet(this,de),this.options)),__privateGet(this,he).addObserver(this),__privateGet(this,he).execute(e)}},de=new WeakMap,pe=new WeakMap,he=new WeakMap,fe=new WeakMap,me=new WeakSet,ve=function(){var e;const t=(null==(e=__privateGet(this,he))?void 0:e.state)??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};__privateSet(this,pe,{...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset})},ge=function(e){$s.batch((()=>{var t,r,n,i,o,a,s,l;if(__privateGet(this,fe)&&this.hasListeners()){const c=__privateGet(this,pe).variables,u=__privateGet(this,pe).context;"success"===(null==e?void 0:e.type)?(null==(r=(t=__privateGet(this,fe)).onSuccess)||r.call(t,e.data,c,u),null==(i=(n=__privateGet(this,fe)).onSettled)||i.call(n,e.data,null,c,u)):"error"===(null==e?void 0:e.type)&&(null==(a=(o=__privateGet(this,fe)).onError)||a.call(o,e.error,c,u),null==(l=(s=__privateGet(this,fe)).onSettled)||l.call(s,void 0,e.error,c,u))}this.listeners.forEach((e=>{e(__privateGet(this,pe))}))}))},_e),nl=at(void 0),il=e=>{const t=Gt(nl);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ol=({client:e,children:t})=>(Ot((()=>(e.mount(),()=>{e.unmount()})),[e]),rs(nl.Provider,{value:e,children:t})),al=at(!1);al.Provider;var sl=at(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}());function ll(e,t){return"function"==typeof e?e(...t):!!e}function cl(){}var ul=(e,t,r)=>t.fetchOptimistic(e).catch((()=>{r.clearReset()}));function dl(e,t,r){var n,i,o,a,s;const l=il(),c=Gt(al),u=Gt(sl),d=l.defaultQueryOptions(e);null==(i=null==(n=l.getDefaultOptions().queries)?void 0:n._experimental_beforeQuery)||i.call(n,d),d._optimisticResults=c?"isRestoring":"optimistic",(e=>{e.suspense&&(void 0===e.staleTime&&(e.staleTime=1e3),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3)))})(d),((e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))})(d,u),(e=>{Ot((()=>{e.clearReset()}),[e])})(u);const p=!l.getQueryCache().get(d.queryHash),[h]=Rt((()=>new t(l,d))),f=h.getOptimisticResult(d);if(Yr(Dt((e=>{const t=c?cl:h.subscribe($s.batchCalls(e));return h.updateResult(),t}),[h,c]),(()=>h.getCurrentResult())),Ot((()=>{h.setOptions(d,{listeners:!1})}),[d,h]),((e,t)=>(null==e?void 0:e.suspense)&&t.isPending)(d,f))throw ul(d,h,u);if((({result:e,errorResetBoundary:t,throwOnError:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&ll(r,[e.error,n]))({result:f,errorResetBoundary:u,throwOnError:d.throwOnError,query:l.getQueryCache().get(d.queryHash)}))throw f.error;if(null==(a=null==(o=l.getDefaultOptions().queries)?void 0:o._experimental_afterQuery)||a.call(o,d,f),d.experimental_prefetchInRender&&!us&&((e,t)=>e.isLoading&&e.isFetching&&!t)(f,c)){const e=p?ul(d,h,u):null==(s=l.getQueryCache().get(d.queryHash))?void 0:s.promise;null==e||e.catch(cl).finally((()=>{h.updateResult()}))}return d.notifyOnChangeProps?f:h.trackResult(f)}function pl(e,t){return dl(e,Xs)}class hl extends Error{constructor(e,t){super(e),__publicField(this,"_response"),this._response=t,Object.setPrototypeOf(this,hl.prototype)}get response(){return this._response}}const fl=async(e,t,r,n)=>{const i=await fetch(e,{method:r,body:n?JSON.stringify(n):void 0,headers:{"content-type":"application/json","x-app-version":"1.0.721",authorization:`Bearer ${t}`},signal:(null==AbortSignal?void 0:AbortSignal.timeout)&&AbortSignal.timeout(15e3)});if(!i.ok)throw new hl(`[API Error] Status: ${i.status}, ${i.statusText}`,i);return i},ml=async(e,t,r,n)=>{const i=await fl(e,t,r,n);return await i.json()};let vl;const gl=()=>{if(vl)return vl;return vl=new Ys({defaultOptions:{queries:{retry:(e,t)=>{var r;return t instanceof hl&&![401,403].includes((null==(r=t.response)?void 0:r.status)||0)}}}}),vl},_l="linkedProfilesForAccount",yl="salaryPackagedItem",wl="checkProfileSearchAuthorization",bl="invoices",xl=at({account:{accountId:""},backend:{url:"",accessToken:""}}),kl="/salary-packaging/admin/v1.0",Sl=()=>{const e=Gt(xl);return{checkProfileSearchAuthorization:It((()=>(e=>async()=>{const t=new URL(`${e.backend.url}${kl}/accounts/${e.account.accountId}/auth`);return ml(t,e.backend.accessToken,"GET")})(e)),[e]),searchProfilesForAccount:It((()=>(e=>async t=>{const r=new URL(`${e.backend.url}${kl}/accounts/${e.account.accountId}/profile-search?search=${t}`);return ml(r,e.backend.accessToken,"GET")})(e)),[e]),ingestClient:It((()=>(e=>async()=>{const t=new Date;t.setUTCDate((new Date).getUTCDate()-2);const r=new Date;r.setUTCDate((new Date).getUTCDate()+2);const n=new URL(`${e.backend.url}${kl}/ingest/clients`);await fl(n,e.backend.accessToken,"POST",{startDate:t.toISOString().split("T")[0],endDate:r.toISOString().split("T")[0]})})(e)),[e]),linkedProfilesForAccount:It((()=>(e=>async()=>{const t=new URL(`${e.backend.url}${kl}/accounts/${e.account.accountId}/profiles`);return ml(t,e.backend.accessToken,"GET")})(e)),[e]),unlinkProfile:It((()=>(e=>async t=>{const r=new URL(`${e.backend.url}${kl}/accounts/${e.account.accountId}/profiles/${t}/unlink`);await fl(r,e.backend.accessToken,"POST")})(e)),[e]),salaryPackagedItem:It((()=>(e=>async(t,r)=>{const n=new URL(`${e.backend.url}${kl}/accounts/${e.account.accountId}/profiles/${t}/items/${r}`);return ml(n,e.backend.accessToken,"GET")})(e)),[e]),invoices:It((()=>(e=>async()=>{const t=new URL(`${e.backend.url}${kl}/accounts/${e.account.accountId}/invoices`);return ml(t,e.backend.accessToken,"GET")})(e)),[e])}},El=e=>{const{linkedProfilesForAccount:t,checkProfileSearchAuthorization:r}=Sl(),n=pl({queryKey:[_l],queryFn:t}),i=pl({queryKey:[wl],queryFn:r});Ot((()=>{i.error&&e.onError(i.error.message),n.error&&e.onError(n.error.message)}),[i.error,n.error,e]);const o=It((()=>{var e;return[{id:"search",displayName:"Search"},{id:"profiles",displayName:"Linked Profiles",count:null==(e=n.data)?void 0:e.length},{id:"invoices",displayName:"Invoices"}]}),[n.data]);return i.isSuccess&&"Linked"!==i.data.status?is(ka,{to:"unlinked",replace:!0}):i.isSuccess?os(ns,{children:[is(ls,{tabs:o}),is("div",{css:{marginLeft:"1rem",marginTop:"1rem"},children:is(Sa,{})})]}):is("div",{children:"Loading..."})},Cl=e=>is(Eh,{children:is("button",{as:"button",onClick:()=>e.onClick(e.id),css:{display:"inline-flex",alignItems:"center",fill:"var(--fl-color-primary-600)",paddingLeft:"0.25rem",paddingRight:"0.25rem"},children:e.children})}),Tl=e=>is(Sh,{children:is("ul",{css:{listStyleType:"none"},children:e.value.split(",").map((t=>is("li",{children:e.navTo?is(Xa,{css:{"--tw-text-opacity":"1",color:"rgb(79 70 229 / var(--tw-text-opacity))",textDecorationLine:"underline"},to:e.navTo,children:t}):t},t)))})}),Pl="undefined"!=typeof document?Zr.useLayoutEffect:()=>{};const Rl=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},Al=e=>{if(e&&"window"in e&&e.window===e)return e;return Rl(e).defaultView||window};function Ol(e){let t=null;return()=>(null==t&&(t=e()),t)}const Ll=Ol((function(){return e=/^Mac/i,"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform);var e,t})),Ml=Ol((function(){return e=/Android/i,"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent));var e,t}));class Fl{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function Il(e){let t=Mt({isFocused:!1,observer:null});Pl((()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]);let r=function(e){const t=Mt(null);return Pl((()=>{t.current=e}),[e]),Dt(((...e)=>{const r=t.current;return null==r?void 0:r(...e)}),[])}((t=>{null==e||e(t)}));return Dt((e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=e.target,i=e=>{t.current.isFocused=!1,n.disabled&&r(new Fl("blur",e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};n.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver((()=>{if(t.current.isFocused&&n.disabled){var e;null===(e=t.current.observer)||void 0===e||e.disconnect();let r=n===document.activeElement?null:document.activeElement;n.dispatchEvent(new FocusEvent("blur",{relatedTarget:r})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:r}))}})),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}}),[r])}let Dl=null,Gl=new Set,Nl=new Map,$l=!1,Hl=!1;const Wl={Tab:!0,Escape:!0};function Ul(e,t){for(let r of Gl)r(e,t)}function jl(e){$l=!0,function(e){return!(e.metaKey||!Ll()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(Dl="keyboard",Ul("keyboard",e))}function Bl(e){Dl="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||($l=!0,Ul("pointer",e))}function zl(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||(Ml()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType))&&($l=!0,Dl="virtual")}function ql(e){e.target!==window&&e.target!==document&&($l||Hl||(Dl="virtual",Ul("virtual",e)),$l=!1,Hl=!1)}function Kl(){$l=!1,Hl=!0}function Vl(e){if("undefined"==typeof window||Nl.get(Al(e)))return;const t=Al(e),r=Rl(e);let n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){$l=!0,n.apply(this,arguments)},r.addEventListener("keydown",jl,!0),r.addEventListener("keyup",jl,!0),r.addEventListener("click",zl,!0),t.addEventListener("focus",ql,!0),t.addEventListener("blur",Kl,!1),"undefined"!=typeof PointerEvent?(r.addEventListener("pointerdown",Bl,!0),r.addEventListener("pointermove",Bl,!0),r.addEventListener("pointerup",Bl,!0)):(r.addEventListener("mousedown",Bl,!0),r.addEventListener("mousemove",Bl,!0),r.addEventListener("mouseup",Bl,!0)),t.addEventListener("beforeunload",(()=>{Ql(e)}),{once:!0}),Nl.set(t,{focus:n})}const Ql=(e,t)=>{const r=Al(e),n=Rl(e);t&&n.removeEventListener("DOMContentLoaded",t),Nl.has(r)&&(r.HTMLElement.prototype.focus=Nl.get(r).focus,n.removeEventListener("keydown",jl,!0),n.removeEventListener("keyup",jl,!0),n.removeEventListener("click",zl,!0),r.removeEventListener("focus",ql,!0),r.removeEventListener("blur",Kl,!1),"undefined"!=typeof PointerEvent?(n.removeEventListener("pointerdown",Bl,!0),n.removeEventListener("pointermove",Bl,!0),n.removeEventListener("pointerup",Bl,!0)):(n.removeEventListener("mousedown",Bl,!0),n.removeEventListener("mousemove",Bl,!0),n.removeEventListener("mouseup",Bl,!0)),Nl.delete(r))};function Yl(){return"pointer"!==Dl}"undefined"!=typeof document&&function(e){const t=Rl(e);let r;"loading"!==t.readyState?Vl(e):(r=()=>{Vl(e)},t.addEventListener("DOMContentLoaded",r))}();const Xl=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Zl(e,t,r){Vl(),Ot((()=>{let t=(t,n)=>{(function(e,t,r){var n;const i="undefined"!=typeof window?Al(null==r?void 0:r.target).HTMLInputElement:HTMLInputElement,o="undefined"!=typeof window?Al(null==r?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,a="undefined"!=typeof window?Al(null==r?void 0:r.target).HTMLElement:HTMLElement,s="undefined"!=typeof window?Al(null==r?void 0:r.target).KeyboardEvent:KeyboardEvent;return!((e=e||(null==r?void 0:r.target)instanceof i&&!Xl.has(null==r||null===(n=r.target)||void 0===n?void 0:n.type)||(null==r?void 0:r.target)instanceof o||(null==r?void 0:r.target)instanceof a&&(null==r?void 0:r.target.isContentEditable))&&"keyboard"===t&&r instanceof s&&!Wl[r.key])})(!!(null==r?void 0:r.isTextInput),t,n)&&e(Yl())};return Gl.add(t),()=>{Gl.delete(t)}}),t)}let Jl=!1,ec=0;function tc(){Jl=!0,setTimeout((()=>{Jl=!1}),50)}function rc(e){"touch"===e.pointerType&&tc()}function nc(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",rc):document.addEventListener("touchend",tc),ec++,()=>{ec--,ec>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",rc):document.removeEventListener("touchend",tc))}}function ic(e={}){let{autoFocus:t=!1,isTextInput:r,within:n}=e,i=Mt({isFocused:!1,isFocusVisible:t||Yl()}),[o,a]=Rt(!1),[s,l]=Rt((()=>i.current.isFocused&&i.current.isFocusVisible)),c=Dt((()=>l(i.current.isFocused&&i.current.isFocusVisible)),[]),u=Dt((e=>{i.current.isFocused=e,a(e),c()}),[c]);Zl((e=>{i.current.isFocusVisible=e,c()}),[],{isTextInput:r});let{focusProps:d}=function(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:i}=e;const o=Dt((e=>{if(e.target===e.currentTarget)return n&&n(e),i&&i(!1),!0}),[n,i]),a=Il(o),s=Dt((e=>{const t=Rl(e.target);e.target===e.currentTarget&&t.activeElement===e.target&&(r&&r(e),i&&i(!0),a(e))}),[i,r,a]);return{focusProps:{onFocus:!t&&(r||i||n)?s:void 0,onBlur:t||!n&&!i?void 0:o}}}({isDisabled:n,onFocusChange:u}),{focusWithinProps:p}=function(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:i}=e,o=Mt({isFocusWithin:!1}),a=Dt((e=>{o.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(o.current.isFocusWithin=!1,r&&r(e),i&&i(!1))}),[r,i,o]),s=Il(a),l=Dt((e=>{o.current.isFocusWithin||document.activeElement!==e.target||(n&&n(e),i&&i(!0),o.current.isFocusWithin=!0,s(e))}),[n,i,s]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:a}}}({isDisabled:!n,onFocusWithinChange:u});return{isFocused:o,isFocusVisible:s,focusProps:n?p:d}}var oc=Object.defineProperty,ac=(e,t,r)=>(((e,t,r)=>{t in e?oc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);let sc=new class{constructor(){ac(this,"current",this.detect()),ac(this,"handoffState","pending"),ac(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}};function lc(e){return sc.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function cc(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function uc(){let e=[],t={addEventListener:(e,r,n,i)=>(e.addEventListener(r,n,i),t.add((()=>e.removeEventListener(r,n,i)))),requestAnimationFrame(...e){let r=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(r)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let r=setTimeout(...e);return t.add((()=>clearTimeout(r)))},microTask(...e){let r={current:!0};return cc((()=>{r.current&&e[0]()})),t.add((()=>{r.current=!1}))},style(e,t,r){let n=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:r}),this.add((()=>{Object.assign(e.style,{[t]:n})}))},group(e){let t=uc();return e(t),this.add((()=>t.dispose()))},add:t=>(e.includes(t)||e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let t of e.splice(r,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function dc(){let[e]=Rt(uc);return Ot((()=>()=>e.dispose()),[e]),e}let pc=(e,t)=>{sc.isServer?Ot(e,t):Lt(e,t)};function hc(e){let t=Mt(e);return pc((()=>{t.current=e}),[e]),t}let fc=function(e){let t=hc(e);return Zr.useCallback(((...e)=>t.current(...e)),[t])};let mc=at(void 0);function vc(){return Gt(mc)}function gc(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}function _c(e,t,...r){if(e in t){let n=t[e];return"function"==typeof n?n(...r):n}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,_c),n}var yc,wc,bc=((wc=bc||{})[wc.None=0]="None",wc[wc.RenderStrategy=1]="RenderStrategy",wc[wc.Static=2]="Static",wc),xc=((yc=xc||{})[yc.Unmount=0]="Unmount",yc[yc.Hidden=1]="Hidden",yc);function kc(){let e=function(){let e=Mt([]),t=Dt((t=>{for(let r of e.current)null!=r&&("function"==typeof r?r(t):r.current=t)}),[]);return(...r)=>{if(!r.every((e=>null==e)))return e.current=r,t}}();return Dt((t=>function({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:i,visible:o=!0,name:a,mergeRefs:s}){s=null!=s?s:Ec;let l=Cc(t,e);if(o)return Sc(l,r,n,a,s);let c=null!=i?i:0;if(2&c){let{static:e=!1,...t}=l;if(e)return Sc(t,r,n,a,s)}if(1&c){let{unmount:e=!0,...t}=l;return _c(e?0:1,{0:()=>null,1:()=>Sc({...t,hidden:!0,style:{display:"none"}},r,n,a,s)})}return Sc(l,r,n,a,s)}({mergeRefs:e,...t})),[e])}function Sc(e,t={},r,n,i){let{as:o=r,children:a,refName:s="ref",...l}=Ac(e,["unmount","static"]),c=void 0!==e.ref?{[s]:e.ref}:{},u="function"==typeof a?a(t):a;"className"in l&&l.className&&"function"==typeof l.className&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let d={};if(t){let e=!1,r=[];for(let[n,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&r.push(n.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`)));if(e){d["data-headlessui-state"]=r.join(" ");for(let e of r)d[`data-${e}`]=""}}if(o===$e&&(Object.keys(Rc(l)).length>0||Object.keys(Rc(d)).length>0)){if(Dr(u)&&!(Array.isArray(u)&&u.length>1)){let e=u.props,t=null==e?void 0:e.className,r="function"==typeof t?(...e)=>gc(t(...e),l.className):gc(t,l.className),n=r?{className:r}:{},o=Cc(u.props,Rc(Ac(l,["ref"])));for(let i in d)i in o&&delete d[i];return $r(u,Object.assign({},o,d,c,{ref:i(Oc(u),c.ref)},n))}if(Object.keys(Rc(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Rc(l)).concat(Object.keys(Rc(d))).map((e=>` - ${e}`)).join("\n"),"","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((e=>` - ${e}`)).join("\n")].join("\n"))}return De(o,Object.assign({},Ac(l,["ref"]),o!==$e&&c,o!==$e&&d),u)}function Ec(...e){return e.every((e=>null==e))?void 0:t=>{for(let r of e)null!=r&&("function"==typeof r?r(t):r.current=t)}}function Cc(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];if(t.disabled||t["aria-disabled"])for(let n in r)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n)&&(r[n]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let n in r)Object.assign(t,{[n](e,...t){let i=r[n];for(let r of i){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;r(e,...t)}}});return t}function Tc(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];for(let n in r)Object.assign(t,{[n](...e){let t=r[n];for(let r of t)null==r||r(...e)}});return t}function Pc(e){var t;return Object.assign(rr(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Rc(e){let t=Object.assign({},e);for(let r in t)void 0===t[r]&&delete t[r];return t}function Ac(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}function Oc(e){return Zr.version.split(".")[0]>="19"?e.props.ref:e.ref}let Lc=at(void 0);function Mc(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=""===(null==t?void 0:t.getAttribute("disabled"));return(!n||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(r))&&n}let Fc=Symbol();function Ic(...e){let t=Mt(e);Ot((()=>{t.current=e}),[e]);let r=fc((e=>{for(let r of t.current)null!=r&&("function"==typeof r?r(e):r.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[Fc])))?void 0:r}let Dc=at(null);function Gc(){let e=Gt(Dc);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Gc),e}return e}Dc.displayName="DescriptionContext";let Nc=Pc((function(e,t){let r=$t(),n=vc(),{id:i=`headlessui-description-${r}`,...o}=e,a=Gc(),s=Ic(t);pc((()=>a.register(i)),[i,a.register]);let l=n||!1,c=It((()=>({...a.slot,disabled:l})),[a.slot,l]),u={ref:s,...a.props,id:i};return kc()({ourProps:u,theirProps:o,slot:c,defaultTag:"p",name:a.name||"Description"})}));Object.assign(Nc,{});var $c,Hc=(($c=Hc||{}).Space=" ",$c.Enter="Enter",$c.Escape="Escape",$c.Backspace="Backspace",$c.Delete="Delete",$c.ArrowLeft="ArrowLeft",$c.ArrowUp="ArrowUp",$c.ArrowRight="ArrowRight",$c.ArrowDown="ArrowDown",$c.Home="Home",$c.End="End",$c.PageUp="PageUp",$c.PageDown="PageDown",$c.Tab="Tab",$c);let Wc=at(null);function Uc(){let e=Gt(Wc);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Uc),e}return e}function jc({inherit:e=!1}={}){let t=function(){var e,t;let r=null!=(t=null==(e=Gt(Wc))?void 0:e.value)?t:void 0;return r}(),[r,n]=Rt([]),i=e?[t,...r].filter(Boolean):r;return[i.length>0?i.join(" "):void 0,It((()=>function(e){let t=fc((e=>(n((t=>[...t,e])),()=>n((t=>{let r=t.slice(),n=r.indexOf(e);return-1!==n&&r.splice(n,1),r}))))),r=It((()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value})),[t,e.slot,e.name,e.props,e.value]);return Zr.createElement(Wc.Provider,{value:r},e.children)}),[n])]}Wc.displayName="LabelContext";let Bc=Pc((function(e,t){var r;let n=$t(),i=Uc(),o=Gt(Lc),a=vc(),{id:s=`headlessui-label-${n}`,htmlFor:l=(null!=o?o:null==(r=i.props)?void 0:r.htmlFor),passive:c=!1,...u}=e,d=Ic(t);pc((()=>i.register(s)),[s,i.register]);let p=fc((e=>{let t=e.currentTarget;if(t instanceof HTMLLabelElement&&e.preventDefault(),i.props&&"onClick"in i.props&&"function"==typeof i.props.onClick&&i.props.onClick(e),t instanceof HTMLLabelElement){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let r=e.getAttribute("aria-disabled");if("true"===r||""===r)return;(e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}})),h=a||!1,f=It((()=>({...i.slot,disabled:h})),[i.slot,h]),m={ref:d,...i.props,id:s,htmlFor:l,onClick:p};return c&&("onClick"in m&&(delete m.htmlFor,delete m.onClick),"onClick"in u&&delete u.onClick),kc()({ourProps:m,theirProps:u,slot:f,defaultTag:l?"label":"div",name:i.name||"Label"})}));function zc(e,t=!1){let[r,n]=At((()=>({})),{}),i=It((()=>function(e){if(null===e)return{width:0,height:0};let{width:t,height:r}=e.getBoundingClientRect();return{width:t,height:r}}(e)),[e,r]);return pc((()=>{if(!e)return;let t=new ResizeObserver(n);return t.observe(e),()=>{t.disconnect()}}),[e]),t?{width:`${i.width}px`,height:`${i.height}px`}:i}Object.assign(Bc,{});let qc=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}};function Kc(e,t){let r=e(),n=new Set;return{getSnapshot:()=>r,subscribe:e=>(n.add(e),()=>n.delete(e)),dispatch(e,...i){let o=t[e].call(r,...i);o&&(r=o,n.forEach((e=>e())))}}}function Vc(e){return Yr(e.subscribe,e.getSnapshot,e.getSnapshot)}let Qc=new qc((()=>Kc((()=>[]),{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(-1===t)return this;let r=this.slice();return r.splice(t,1),r}})));function Yc(e,t){let r=Qc.get(t),n=$t(),i=Vc(r);if(pc((()=>{if(e)return r.dispatch("ADD",n),()=>r.dispatch("REMOVE",n)}),[r,e]),!e)return!1;let o=i.indexOf(n),a=i.length;return-1===o&&(o=a,a+=1),o===a-1}let Xc=new Map,Zc=new Map;function Jc(e){var t;let r=null!=(t=Zc.get(e))?t:0;return Zc.set(e,r+1),0!==r||(Xc.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>eu(e)}function eu(e){var t;let r=null!=(t=Zc.get(e))?t:1;if(1===r?Zc.delete(e):Zc.set(e,r-1),1!==r)return;let n=Xc.get(e);n&&(null===n["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n["aria-hidden"]),e.inert=n.inert,Xc.delete(e))}let tu=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(","),ru=["[data-autofocus]"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var nu,iu,ou,au=((ou=au||{})[ou.First=1]="First",ou[ou.Previous=2]="Previous",ou[ou.Next=4]="Next",ou[ou.Last=8]="Last",ou[ou.WrapAround=16]="WrapAround",ou[ou.NoScroll=32]="NoScroll",ou[ou.AutoFocus=64]="AutoFocus",ou),su=((iu=su||{})[iu.Error=0]="Error",iu[iu.Overflow=1]="Overflow",iu[iu.Success=2]="Success",iu[iu.Underflow=3]="Underflow",iu),lu=((nu=lu||{})[nu.Previous=-1]="Previous",nu[nu.Next=1]="Next",nu);function cu(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(tu)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}var uu=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(uu||{});function du(e,t=0){var r;return e!==(null==(r=lc(e))?void 0:r.body)&&_c(t,{0:()=>e.matches(tu),1(){let t=e;for(;null!==t;){if(t.matches(tu))return!0;t=t.parentElement}return!1}})}function pu(e){let t=lc(e);uc().nextFrame((()=>{t&&!du(t.activeElement,0)&&function(e){null==e||e.focus({preventScroll:!0})}(e)}))}var hu=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(hu||{});"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));let fu=["textarea","input"].join(",");function mu(e,t=e=>e){return e.slice().sort(((e,r)=>{let n=t(e),i=t(r);if(null===n||null===i)return 0;let o=n.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}function vu(e,t){return function(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:i=[]}={}){let o=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,a=Array.isArray(e)?r?mu(e):e:64&t?function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(ru)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}(e):cu(e);i.length>0&&a.length>1&&(a=a.filter((e=>!i.some((t=>null!=t&&"current"in t?(null==t?void 0:t.current)===e:t===e))))),n=null!=n?n:o.activeElement;let s,l=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,a.indexOf(n))-1;if(4&t)return Math.max(0,a.indexOf(n))+1;if(8&t)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=32&t?{preventScroll:!0}:{},d=0,p=a.length;do{if(d>=p||d+p<=0)return 0;let e=c+d;if(16&t)e=(e+p)%p;else{if(e<0)return 3;if(e>=p)return 1}s=a[e],null==s||s.focus(u),d+=l}while(s!==o.activeElement);return 6&t&&function(e){var t,r;return null!=(r=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,fu))&&r}(s)&&s.select(),2}(cu(),t,{relativeTo:e})}function gu(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function _u(){return gu()||/Android/gi.test(window.navigator.userAgent)}function yu(e,t,r,n){let i=hc(r);Ot((()=>{if(e)return document.addEventListener(t,r,n),()=>document.removeEventListener(t,r,n);function r(e){i.current(e)}}),[e,t,n])}function wu(e,t,r){let n=Yc(e,"outside-click"),i=hc(r),o=Dt((function(e,r){if(e.defaultPrevented)return;let n=r(e);if(null===n||!n.getRootNode().contains(n)||!n.isConnected)return;let o=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of o)if(null!==t&&(t.contains(n)||e.composed&&e.composedPath().includes(t)))return;return!du(n,uu.Loose)&&-1!==n.tabIndex&&e.preventDefault(),i.current(e,n)}),[i,t]),a=Mt(null);yu(n,"pointerdown",(e=>{var t,r;a.current=(null==(r=null==(t=e.composedPath)?void 0:t.call(e))?void 0:r[0])||e.target}),!0),yu(n,"mousedown",(e=>{var t,r;a.current=(null==(r=null==(t=e.composedPath)?void 0:t.call(e))?void 0:r[0])||e.target}),!0),yu(n,"click",(e=>{_u()||a.current&&(o(e,(()=>a.current)),a.current=null)}),!0);let s=Mt({x:0,y:0});yu(n,"touchstart",(e=>{s.current.x=e.touches[0].clientX,s.current.y=e.touches[0].clientY}),!0),yu(n,"touchend",(e=>{let t=e.changedTouches[0].clientX,r=e.changedTouches[0].clientY;if(!(Math.abs(t-s.current.x)>=30||Math.abs(r-s.current.y)>=30))return o(e,(()=>e.target instanceof HTMLElement?e.target:null))}),!0),function(e,t,r,n){let i=hc(r);Ot((()=>{if(e)return window.addEventListener(t,r,n),()=>window.removeEventListener(t,r,n);function r(e){i.current(e)}}),[e,t,n])}(n,"blur",(e=>o(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}function bu(...e){return It((()=>lc(...e)),[...e])}function xu(e,t){return It((()=>{var r;if(e.type)return e.type;let n=null!=(r=e.as)?r:"button";return"string"==typeof n&&"button"===n.toLowerCase()||"BUTTON"===(null==t?void 0:t.tagName)&&!t.hasAttribute("type")?"button":void 0}),[e.type,e.as,t])}function ku(){let e;return{before({doc:t}){var r;let n=t.documentElement,i=null!=(r=t.defaultView)?r:window;e=Math.max(0,i.innerWidth-n.clientWidth)},after({doc:t,d:r}){let n=t.documentElement,i=Math.max(0,n.clientWidth-n.offsetWidth),o=Math.max(0,e-i);r.style(n,"paddingRight",`${o}px`)}}}function Su(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let Eu=Kc((()=>new Map),{PUSH(e,t){var r;let n=null!=(r=this.get(e))?r:{doc:e,count:0,d:uc(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:r}){let n={doc:e,d:t,meta:Su(r)},i=[gu()?{before({doc:e,d:t,meta:r}){function n(e){return r.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var r;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let r=uc();r.style(e.documentElement,"scrollBehavior","auto"),t.add((()=>t.microTask((()=>r.dispose()))))}let i=null!=(r=window.scrollY)?r:window.pageYOffset,o=null;t.addEventListener(e,"click",(t=>{if(t.target instanceof HTMLElement)try{let r=t.target.closest("a");if(!r)return;let{hash:i}=new URL(r.href),a=e.querySelector(i);a&&!n(a)&&(o=a)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(e.target instanceof HTMLElement)if(n(e.target)){let r=e.target;for(;r.parentElement&&n(r.parentElement);)r=r.parentElement;t.style(r,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(e.target instanceof HTMLElement){if("INPUT"===e.target.tagName)return;if(n(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;i!==t&&window.scrollTo(0,i),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)}))}))}}:{},ku(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];i.forEach((({before:e})=>null==e?void 0:e(n))),i.forEach((({after:e})=>null==e?void 0:e(n)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function Cu(e,t,r=()=>[document.body]){!function(e,t,r=()=>({containers:[]})){let n=Vc(Eu),i=t?n.get(t):void 0,o=!!i&&i.count>0;pc((()=>{if(t&&e)return Eu.dispatch("PUSH",t,r),()=>Eu.dispatch("POP",t,r)}),[e,t])}(Yc(e,"scroll-lock"),t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],r]}}))}function Tu(e){return[e.screenX,e.screenY]}Eu.subscribe((()=>{let e=Eu.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let e="hidden"===t.get(r.doc),n=0!==r.count;(n&&!e||!n&&e)&&Eu.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),0===r.count&&Eu.dispatch("TEARDOWN",r)}}));var Pu,Ru;"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"undefined"!=typeof Element&&"test"===(null==(Pu=null==process?void 0:{})?void 0:Pu.NODE_ENV)&&void 0===(null==(Ru=null==Element?void 0:Element.prototype)?void 0:Ru.getAnimations)&&(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("\n")),[]});var Au=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(Au||{});function Ou(e){let t={};for(let r in e)!0===e[r]&&(t[`data-${r}`]="");return t}function Lu(e,t,r,n){let[i,o]=Rt(r),{hasFlag:a,addFlag:s,removeFlag:l}=function(e=0){let[t,r]=Rt(e),n=Dt((e=>r(e)),[t]),i=Dt((e=>r((t=>t|e))),[t]),o=Dt((e=>(t&e)===e),[t]),a=Dt((e=>r((t=>t&~e))),[r]),s=Dt((e=>r((t=>t^e))),[r]);return{flags:t,setFlag:n,addFlag:i,hasFlag:o,removeFlag:a,toggleFlag:s}}(e&&i?3:0),c=Mt(!1),u=Mt(!1),d=dc();return pc((()=>{var i;if(e)return r&&o(!0),t?(null==(i=null==n?void 0:n.start)||i.call(n,r),function(e,{prepare:t,run:r,done:n,inFlight:i}){let o=uc();return function(e,{inFlight:t,prepare:r}){if(null!=t&&t.current)return void r();let n=e.style.transition;e.style.transition="none",r(),e.offsetHeight,e.style.transition=n}(e,{prepare:t,inFlight:i}),o.nextFrame((()=>{r(),o.requestAnimationFrame((()=>{o.add(function(e,t){var r,n;let i=uc();if(!e)return i.dispose;let o=!1;i.add((()=>{o=!0}));let a=null!=(n=null==(r=e.getAnimations)?void 0:r.call(e).filter((e=>e instanceof CSSTransition)))?n:[];return 0===a.length?(t(),i.dispose):(Promise.allSettled(a.map((e=>e.finished))).then((()=>{o||t()})),i.dispose)}(e,n))}))})),o.dispose}(t,{inFlight:c,prepare(){u.current?u.current=!1:u.current=c.current,c.current=!0,!u.current&&(r?(s(3),l(4)):(s(4),l(2)))},run(){u.current?r?(l(3),s(4)):(l(4),s(3)):r?l(1):s(1)},done(){var e;u.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(c.current=!1,l(7),r||o(!1),null==(e=null==n?void 0:n.end)||e.call(n,r))}})):void(r&&s(3))}),[e,r,t,d]),e?[i,{closed:a(1),enter:a(2),leave:a(4),transition:a(2)||a(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Mu(){return"undefined"!=typeof window}function Fu(e){return Gu(e)?(e.nodeName||"").toLowerCase():"#document"}function Iu(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Du(e){var t;return null==(t=(Gu(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Gu(e){return!!Mu()&&(e instanceof Node||e instanceof Iu(e).Node)}function Nu(e){return!!Mu()&&(e instanceof Element||e instanceof Iu(e).Element)}function $u(e){return!!Mu()&&(e instanceof HTMLElement||e instanceof Iu(e).HTMLElement)}function Hu(e){return!(!Mu()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Iu(e).ShadowRoot)}function Wu(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Ku(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function Uu(e){return["table","td","th"].includes(Fu(e))}function ju(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(yc){return!1}}))}function Bu(e){const t=zu(),r=Nu(e)?Ku(e):e;return"none"!==r.transform||"none"!==r.perspective||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","perspective","filter"].some((e=>(r.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(r.contain||"").includes(e)))}function zu(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function qu(e){return["html","body","#document"].includes(Fu(e))}function Ku(e){return Iu(e).getComputedStyle(e)}function Vu(e){return Nu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qu(e){if("html"===Fu(e))return e;const t=e.assignedSlot||e.parentNode||Hu(e)&&e.host||Du(e);return Hu(t)?t.host:t}function Yu(e){const t=Qu(e);return qu(t)?e.ownerDocument?e.ownerDocument.body:e.body:$u(t)&&Wu(t)?t:Yu(t)}function Xu(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const i=Yu(e),o=i===(null==(n=e.ownerDocument)?void 0:n.body),a=Iu(i);if(o){const e=Zu(a);return t.concat(a,a.visualViewport||[],Wu(i)?i:[],e&&r?Xu(e):[])}return t.concat(i,Xu(i,[],r))}function Zu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Ju=Math.min,ed=Math.max,td=Math.round,rd=Math.floor,nd=e=>({x:e,y:e}),id={left:"right",right:"left",bottom:"top",top:"bottom"},od={start:"end",end:"start"};function ad(e,t,r){return ed(e,Ju(t,r))}function sd(e,t){return"function"==typeof e?e(t):e}function ld(e){return e.split("-")[0]}function cd(e){return e.split("-")[1]}function ud(e){return"x"===e?"y":"x"}function dd(e){return"y"===e?"height":"width"}function pd(e){return["top","bottom"].includes(ld(e))?"y":"x"}function hd(e){return ud(pd(e))}function fd(e){return e.replace(/start|end/g,(e=>od[e]))}function md(e){return e.replace(/left|right|bottom|top/g,(e=>id[e]))}function vd(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function gd(e,t,r){let{reference:n,floating:i}=e;const o=pd(t),a=hd(t),s=dd(a),l=ld(t),c="y"===o,u=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,p=n[s]/2-i[s]/2;let h;switch(l){case"top":h={x:u,y:n.y-i.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-i.width,y:d};break;default:h={x:n.x,y:n.y}}switch(cd(t)){case"start":h[a]-=p*(r&&c?-1:1);break;case"end":h[a]+=p*(r&&c?-1:1)}return h}async function _d(e,t){var r;void 0===t&&(t={});const{x:n,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=sd(t,e),f=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(h),m=s[p?"floating"===d?"reference":"floating":d],v=vd(await o.getClippingRect({element:null==(r=await(null==o.isElement?void 0:o.isElement(m)))||r?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),g="floating"===d?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,_=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),y=await(null==o.isElement?void 0:o.isElement(_))&&await(null==o.getScale?void 0:o.getScale(_))||{x:1,y:1},w=vd(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:_,strategy:l}):g);return{top:(v.top-w.top+f.top)/y.y,bottom:(w.bottom-v.bottom+f.bottom)/y.y,left:(v.left-w.left+f.left)/y.x,right:(w.right-v.right+f.right)/y.x}}function yd(e){const t=Ku(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=$u(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,s=td(r)!==o||td(n)!==a;return s&&(r=o,n=a),{width:r,height:n,$:s}}function wd(e){return Nu(e)?e:e.contextElement}function bd(e){const t=wd(e);if(!$u(t))return nd(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:o}=yd(t);let a=(o?td(r.width):r.width)/n,s=(o?td(r.height):r.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const xd=nd(0);function kd(e){const t=Iu(e);return zu()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:xd}function Sd(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const i=e.getBoundingClientRect(),o=wd(e);let a=nd(1);t&&(n?Nu(n)&&(a=bd(n)):a=bd(e));const s=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==Iu(e))&&t}(o,r,n)?kd(o):nd(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,u=i.width/a.x,d=i.height/a.y;if(o){const e=Iu(o),t=n&&Nu(n)?Iu(n):n;let r=e,i=Zu(r);for(;i&&n&&t!==r;){const e=bd(i),t=i.getBoundingClientRect(),n=Ku(i),o=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=o,c+=a,r=Iu(i),i=Zu(r)}}return vd({width:u,height:d,x:l,y:c})}function Ed(e,t){const r=Vu(e).scrollLeft;return t?t.left+r:Sd(Du(e)).left+r}function Cd(e,t,r){void 0===r&&(r=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:Ed(e,n)),y:n.top+t.scrollTop}}function Td(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=Iu(e),n=Du(e),i=r.visualViewport;let o=n.clientWidth,a=n.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const e=zu();(!e||e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}(e,r);else if("document"===t)n=function(e){const t=Du(e),r=Vu(e),n=e.ownerDocument.body,i=ed(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=ed(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Ed(e);const s=-r.scrollTop;return"rtl"===Ku(n).direction&&(a+=ed(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:s}}(Du(e));else if(Nu(t))n=function(e,t){const r=Sd(e,!0,"fixed"===t),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=$u(e)?bd(e):nd(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:n*o.y}}(t,r);else{const r=kd(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return vd(n)}function Pd(e,t){const r=Qu(e);return!(r===t||!Nu(r)||qu(r))&&("fixed"===Ku(r).position||Pd(r,t))}function Rd(e,t,r){const n=$u(t),i=Du(t),o="fixed"===r,a=Sd(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=nd(0);if(n||!n&&!o)if(("body"!==Fu(t)||Wu(i))&&(s=Vu(t)),n){const e=Sd(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=Ed(i));const c=!i||n||o?nd(0):Cd(i,s);return{x:a.left+s.scrollLeft-l.x-c.x,y:a.top+s.scrollTop-l.y-c.y,width:a.width,height:a.height}}function Ad(e){return"static"===Ku(e).position}function Od(e,t){if(!$u(e)||"fixed"===Ku(e).position)return null;if(t)return t(e);let r=e.offsetParent;return Du(e)===r&&(r=r.ownerDocument.body),r}function Ld(e,t){const r=Iu(e);if(ju(e))return r;if(!$u(e)){let t=Qu(e);for(;t&&!qu(t);){if(Nu(t)&&!Ad(t))return t;t=Qu(t)}return r}let n=Od(e,t);for(;n&&Uu(n)&&Ad(n);)n=Od(n,t);return n&&qu(n)&&Ad(n)&&!Bu(n)?r:n||function(e){let t=Qu(e);for(;$u(t)&&!qu(t);){if(Bu(t))return t;if(ju(t))return null;t=Qu(t)}return null}(e)||r}const Md={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const o="fixed"===i,a=Du(n),s=!!t&&ju(t.floating);if(n===a||s&&o)return r;let l={scrollLeft:0,scrollTop:0},c=nd(1);const u=nd(0),d=$u(n);if((d||!d&&!o)&&(("body"!==Fu(n)||Wu(a))&&(l=Vu(n)),$u(n))){const e=Sd(n);c=bd(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}const p=!a||d||o?nd(0):Cd(a,l,!0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:Du,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const o=[..."clippingAncestors"===r?ju(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=Xu(e,[],!1).filter((e=>Nu(e)&&"body"!==Fu(e))),i=null;const o="fixed"===Ku(e).position;let a=o?Qu(e):e;for(;Nu(a)&&!qu(a);){const t=Ku(a),r=Bu(a);r||"fixed"!==t.position||(i=null),(o?!r&&!i:!r&&"static"===t.position&&i&&["absolute","fixed"].includes(i.position)||Wu(a)&&!r&&Pd(e,a))?n=n.filter((e=>e!==a)):i=t,a=Qu(a)}return t.set(e,n),n}(t,this._c):[].concat(r),n],a=o[0],s=o.reduce(((e,r)=>{const n=Td(t,r,i);return e.top=ed(n.top,e.top),e.right=Ju(n.right,e.right),e.bottom=Ju(n.bottom,e.bottom),e.left=ed(n.left,e.left),e}),Td(t,a,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Ld,getElementRects:async function(e){const t=this.getOffsetParent||Ld,r=this.getDimensions,n=await r(e.floating);return{reference:Rd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=yd(e);return{width:t,height:r}},getScale:bd,isElement:Nu,isRTL:function(e){return"rtl"===Ku(e).direction}};function Fd(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,c=wd(e),u=i||o?[...c?Xu(c):[],...Xu(t)]:[];u.forEach((e=>{i&&e.addEventListener("scroll",r,{passive:!0}),o&&e.addEventListener("resize",r)}));const d=c&&s?function(e,t){let r,n=null;const i=Du(e);function o(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),o();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const h={rootMargin:-rd(u)+"px "+-rd(i.clientWidth-(c+d))+"px "+-rd(i.clientHeight-(u+p))+"px "+-rd(c)+"px",threshold:ed(0,Ju(1,l))||1};let f=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!f)return a();t?a(!1,t):r=setTimeout((()=>{a(!1,1e-7)}),1e3)}f=!1}try{n=new IntersectionObserver(m,{...h,root:i.ownerDocument})}catch(yc){n=new IntersectionObserver(m,h)}n.observe(e)}(!0),o}(c,r):null;let p,h=-1,f=null;a&&(f=new ResizeObserver((e=>{let[n]=e;n&&n.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),r()})),c&&!l&&f.observe(c),f.observe(t));let m=l?Sd(e):null;return l&&function t(){const n=Sd(e);!m||n.x===m.x&&n.y===m.y&&n.width===m.width&&n.height===m.height||r();m=n,p=requestAnimationFrame(t)}(),r(),()=>{var e;u.forEach((e=>{i&&e.removeEventListener("scroll",r),o&&e.removeEventListener("resize",r)})),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const Id=_d,Dd=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:o,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:r,platform:n,elements:i}=e,o=await(null==n.isRTL?void 0:n.isRTL(i.floating)),a=ld(r),s=cd(r),l="y"===pd(r),c=["left","top"].includes(a)?-1:1,u=o&&l?-1:1,d=sd(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof f&&(h="end"===s?-1*f:f),l?{x:h*u,y:p*c}:{x:p*c,y:h*u}}(t,e);return a===(null==(r=s.offset)?void 0:r.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},Gd=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=sd(e,t),c={x:r,y:n},u=await _d(t,l),d=pd(ld(i)),p=ud(d);let h=c[p],f=c[d];if(o){const e="y"===p?"bottom":"right";h=ad(h+u["y"===p?"top":"left"],h,h-u[e])}if(a){const e="y"===d?"bottom":"right";f=ad(f+u["y"===d?"top":"left"],f,f-u[e])}const m=s.fn({...t,[p]:h,[d]:f});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[p]:o,[d]:a}}}}}},Nd=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:o,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...v}=sd(e,t);if(null!=(r=o.arrow)&&r.alignmentOffset)return{};const g=ld(i),_=pd(s),y=ld(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),b=p||(y||!m?[md(s)]:function(e){const t=md(e);return[fd(e),t,fd(t)]}(s)),x="none"!==f;!p&&x&&b.push(...function(e,t,r,n){const i=cd(e);let o=function(e,t,r){const n=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?i:n:t?n:i;case"left":case"right":return t?o:a;default:return[]}}(ld(e),"start"===r,n);return i&&(o=o.map((e=>e+"-"+i)),t&&(o=o.concat(o.map(fd)))),o}(s,m,f,w));const k=[s,...b],S=await _d(t,v),E=[];let C=(null==(n=o.flip)?void 0:n.overflows)||[];if(u&&E.push(S[g]),d){const e=function(e,t,r){void 0===r&&(r=!1);const n=cd(e),i=hd(e),o=dd(i);let a="x"===i?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=md(a)),[a,md(a)]}(i,a,w);E.push(S[e[0]],S[e[1]])}if(C=[...C,{placement:i,overflows:E}],!E.every((e=>e<=0))){var T,P;const e=((null==(T=o.flip)?void 0:T.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let r=null==(P=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:P.placement;if(!r)switch(h){case"bestFit":{var R;const e=null==(R=C.filter((e=>{if(x){const t=pd(e.placement);return t===_||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:R[0];e&&(r=e);break}case"initialPlacement":r=s}if(i!==r)return{reset:{placement:r}}}return{}}}},$d=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:o,platform:a,elements:s}=t,{apply:l=()=>{},...c}=sd(e,t),u=await _d(t,c),d=ld(i),p=cd(i),h="y"===pd(i),{width:f,height:m}=o.floating;let v,g;"top"===d||"bottom"===d?(v=d,g=p===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,v="end"===p?"top":"bottom");const _=m-u.top-u.bottom,y=f-u.left-u.right,w=Ju(m-u[v],_),b=Ju(f-u[g],y),x=!t.middlewareData.shift;let k=w,S=b;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(S=y),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(k=_),x&&!p){const e=ed(u.left,0),t=ed(u.right,0),r=ed(u.top,0),n=ed(u.bottom,0);h?S=f-2*(0!==e||0!==t?e+t:ed(u.left,u.right)):k=m-2*(0!==r||0!==n?r+n:ed(u.top,u.bottom))}await l({...t,availableWidth:S,availableHeight:k});const E=await a.getDimensions(s.floating);return f!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}},Hd=(e,t,r)=>{const n=new Map,i={platform:Md,...r},o={...i.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,s=o.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=gd(c,n,l),p=n,h={},f=0;for(let m=0;m<s.length;m++){const{name:r,fn:o}=s[m],{x:v,y:g,data:_,reset:y}=await o({x:u,y:d,initialPlacement:n,placement:p,strategy:i,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=g?g:d,h={...h,[r]:{...h[r],..._}},y&&f<=50&&(f++,"object"==typeof y&&(y.placement&&(p=y.placement),y.rects&&(c=!0===y.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):y.rects),({x:u,y:d}=gd(c,p,l))),m=-1)}return{x:u,y:d,placement:p,strategy:i,middlewareData:h}})(e,t,{...i,platform:o})};var Wd="undefined"!=typeof document?Lt:Ot;function Ud(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!=n--;)if(!Ud(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;0!=n--;){const r=i[n];if(("_owner"!==r||!e.$$typeof)&&!Ud(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function jd(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Bd(e,t){const r=jd(e);return Math.round(t*r)/r}function zd(e){const t=Mt(e);return Wd((()=>{t.current=e})),t}const qd=(e,t)=>({...Dd(e),options:[e,t]}),Kd=(e,t)=>({...Nd(e),options:[e,t]}),Vd=(e,t)=>({...$d(e),options:[e,t]}),Qd={...Jr},Yd=Qd.useInsertionEffect||(e=>e());function Xd(e){const t=Mt((()=>{}));return Yd((()=>{t.current=e})),Dt((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return null==t.current?void 0:t.current(...r)}),[])}var Zd="undefined"!=typeof document?Lt:Ot;let Jd=!1,ep=0;const tp=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ep++;const rp=Qd.useId||function(){const[e,t]=Rt((()=>Jd?tp():void 0));return Zd((()=>{null==e&&t(tp())}),[]),Ot((()=>{Jd=!0}),[]),e};const np=at(null),ip=at(null),op="data-floating-ui-focusable";function ap(e){const{open:t=!1,onOpenChange:r,elements:n}=e,i=rp(),o=Mt({}),[a]=Rt((()=>function(){const e=new Map;return{emit(t,r){var n;null==(n=e.get(t))||n.forEach((e=>e(r)))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,(null==(n=e.get(t))?void 0:n.filter((e=>e!==r)))||[])}}}())),s=null!=((null==(l=Gt(np))?void 0:l.id)||null);var l;const[c,u]=Rt(n.reference),d=Xd(((e,t,n)=>{o.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:n,nested:s}),null==r||r(e,t,n)})),p=It((()=>({setPositionReference:u})),[]),h=It((()=>({reference:c||n.reference||null,floating:n.floating||null,domReference:n.reference})),[c,n.reference,n.floating]);return It((()=>({dataRef:o,open:t,onOpenChange:d,elements:h,events:a,floatingId:i,refs:p})),[t,d,h,a,i,p])}function sp(e){void 0===e&&(e={});const{nodeId:t}=e,r=ap({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,i=n.elements,[o,a]=Rt(null),[s,l]=Rt(null),c=(null==i?void 0:i.domReference)||o,u=Mt(null),d=Gt(ip);Zd((()=>{c&&(u.current=c)}),[c]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=Rt({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=Rt(n);Ud(p,n)||h(n);const[f,m]=Rt(null),[v,g]=Rt(null),_=Dt((e=>{e!==x.current&&(x.current=e,m(e))}),[]),y=Dt((e=>{e!==k.current&&(k.current=e,g(e))}),[]),w=o||f,b=a||v,x=Mt(null),k=Mt(null),S=Mt(u),E=null!=l,C=zd(l),T=zd(i),P=zd(c),R=Dt((()=>{if(!x.current||!k.current)return;const e={placement:t,strategy:r,middleware:p};T.current&&(e.platform=T.current),Hd(x.current,k.current,e).then((e=>{const t={...e,isPositioned:!1!==P.current};A.current&&!Ud(S.current,t)&&(S.current=t,jr((()=>{d(t)})))}))}),[p,t,r,T,P]);Wd((()=>{!1===c&&S.current.isPositioned&&(S.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const A=Mt(!1);Wd((()=>(A.current=!0,()=>{A.current=!1})),[]),Wd((()=>{if(w&&(x.current=w),b&&(k.current=b),w&&b){if(C.current)return C.current(w,b,R);R()}}),[w,b,R,C,E]);const O=It((()=>({reference:x,floating:k,setReference:_,setFloating:y})),[_,y]),L=It((()=>({reference:w,floating:b})),[w,b]),M=It((()=>{const e={position:r,left:0,top:0};if(!L.floating)return e;const t=Bd(L.floating,u.x),n=Bd(L.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...jd(L.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,s,L.floating,u.x,u.y]);return It((()=>({...u,update:R,refs:O,elements:L,floatingStyles:M})),[u,R,O,L,M])}({...e,elements:{...i,...s&&{reference:s}}}),h=Dt((e=>{const t=Nu(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l(t),p.refs.setReference(t)}),[p.refs]),f=Dt((e=>{(Nu(e)||null===e)&&(u.current=e,a(e)),(Nu(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!Nu(e))&&p.refs.setReference(e)}),[p.refs]),m=It((()=>({...p.refs,setReference:f,setPositionReference:h,domReference:u})),[p.refs,f,h]),v=It((()=>({...p.elements,domReference:c})),[p.elements,c]),g=It((()=>({...p,...n,refs:m,elements:v,nodeId:t})),[p,m,v,t,n]);return Zd((()=>{n.dataRef.current.floatingContext=g;const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===t));e&&(e.context=g)})),It((()=>({...p,context:g,refs:m,elements:v})),[p,m,v,g])}const lp="active",cp="selected";function up(e,t,r){const n=new Map,i="item"===r;let o=e;if(i&&e){const{[lp]:t,[cp]:r,...n}=e;o=n}return{..."floating"===r&&{tabIndex:-1,[op]:""},...o,...t.map((t=>{const n=t?t[r]:null;return"function"==typeof n?e?n(e):null:n})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[r,o]=t;var a;i&&[lp,cp].includes(r)||(0===r.indexOf("on")?(n.has(r)||n.set(r,[]),"function"==typeof o&&(null==(a=n.get(r))||a.push(o),e[r]=function(){for(var e,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return null==(e=n.get(r))?void 0:e.map((e=>e(...i))).find((e=>void 0!==e))})):e[r]=o)})),e):e),{})}}function dp(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}function pp(e,t){const{open:r,elements:n}=e,{enabled:i=!0,overflowRef:o,scrollRef:a,onChange:s}=t,l=Xd(s),c=Mt(!1),u=Mt(null),d=Mt(null);Ot((()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||null==o.current)return;const r=e.deltaY,n=o.current.top>=-.5,i=o.current.bottom>=-.5,a=t.scrollHeight-t.clientHeight,s=r<0?-1:1,c=r<0?"max":"min";t.scrollHeight<=t.clientHeight||(!n&&r>0||!i&&r<0?(e.preventDefault(),jr((()=>{l((e=>e+Math[c](r,a*s)))}))):/firefox/i.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:r}=e;return t+"/"+r})).join(" "):navigator.userAgent}())&&(t.scrollTop+=r))}const t=(null==a?void 0:a.current)||n.floating;return r&&t?(t.addEventListener("wheel",e),requestAnimationFrame((()=>{u.current=t.scrollTop,null!=o.current&&(d.current={...o.current})})),()=>{u.current=null,d.current=null,t.removeEventListener("wheel",e)}):void 0}),[i,r,n.floating,o,a,l]);const p=It((()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const e=(null==a?void 0:a.current)||n.floating;if(o.current&&e&&c.current){if(null!==u.current){const t=e.scrollTop-u.current;(o.current.bottom<-.5&&t<-1||o.current.top<-.5&&t>1)&&jr((()=>l((e=>e+t))))}requestAnimationFrame((()=>{u.current=e.scrollTop}))}}})),[n.floating,l,o,a]);return It((()=>i?{floating:p}:{}),[i,p])}let hp=at({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});hp.displayName="FloatingContext";let fp=at(null);fp.displayName="PlacementContext";function mp({children:e,enabled:t=!0}){let[r,n]=Rt(null),[i,o]=Rt(0),a=Mt(null),[s,l]=Rt(null);!function(e){pc((()=>{if(!e)return;let t=new MutationObserver((()=>{let t=window.getComputedStyle(e).maxHeight,r=parseFloat(t);if(isNaN(r))return;let n=parseInt(t);isNaN(n)||r!==n&&(e.style.maxHeight=`${Math.ceil(r)}px`)}));return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}}),[e])}(s);let c=t&&null!==r&&null!==s,{to:u="bottom",gap:d=0,offset:p=0,padding:h=0,inner:f}=function(e,t){var r,n,i;let o=vp(null!=(r=null==e?void 0:e.gap)?r:"var(--anchor-gap, 0)",t),a=vp(null!=(n=null==e?void 0:e.offset)?n:"var(--anchor-offset, 0)",t),s=vp(null!=(i=null==e?void 0:e.padding)?i:"var(--anchor-padding, 0)",t);return{...e,gap:o,offset:a,padding:s}}(r,s),[m,v="center"]=u.split(" ");pc((()=>{c&&o(0)}),[c]);let{refs:g,floatingStyles:_,context:y}=sp({open:c,placement:"selection"===m?"center"===v?"bottom":`bottom-${v}`:"center"===v?`${m}`:`${m}-${v}`,strategy:"absolute",transform:!1,middleware:[qd({mainAxis:"selection"===m?0:d,crossAxis:p}),(k={padding:h},{...Gd(k),options:[k,S]}),"selection"!==m&&Kd({padding:h}),"selection"===m&&f?(x={...f,padding:h,overflowRef:a,offset:i,minItemsVisible:4,referenceOverflowThreshold:h,onFallbackChange(e){var t,r;if(!e)return;let n=y.elements.floating;if(!n)return;let i=parseFloat(getComputedStyle(n).scrollPaddingBottom)||0,a=Math.min(4,n.childElementCount),s=0,l=0;for(let o of null!=(r=null==(t=y.elements.floating)?void 0:t.childNodes)?r:[])if(o instanceof HTMLElement){let e=o.offsetTop,t=e+o.clientHeight+i,r=n.scrollTop,c=r+n.clientHeight;if(!(e>=r&&t<=c)){l=Math.max(0,Math.min(t,c)-Math.max(e,r)),s=o.clientHeight;break}a--}a>=1&&o((e=>{let t=s*a-l+i;return e>=t?e:t}))}},{name:"inner",options:x,async fn(e){const{listRef:t,overflowRef:r,onFallbackChange:n,offset:i=0,index:o=0,minItemsVisible:a=4,referenceOverflowThreshold:s=0,scrollRef:l,...c}=sd(x,e),{rects:u,elements:{floating:d}}=e,p=t.current[o],h=(null==l?void 0:l.current)||d,f=d.clientTop||h.clientTop,m=0!==d.clientTop,v=0!==h.clientTop,g=d===h;if(!p)return{};const _={...e,...await qd(-p.offsetTop-d.clientTop-u.reference.height/2-p.offsetHeight/2-i).fn(e)},y=await Id(dp(_,h.scrollHeight+f+d.clientTop),c),w=await Id(_,{...c,elementContext:"reference"}),b=ed(0,y.top),k=_.y+b,S=h.scrollHeight>h.clientHeight,E=(S?e=>e:td)(ed(0,h.scrollHeight+(m&&g||v?2*f:0)-b-ed(0,y.bottom)));if(h.style.maxHeight=E+"px",h.scrollTop=b,n){const e=S&&h.offsetHeight<p.offsetHeight*a-1||w.top>=-s||w.bottom>=-s;jr((()=>n(e)))}return r&&(r.current=await Id(dp({..._,y:k},h.offsetHeight+f+d.clientTop),c)),{y:k}}}):null,Vd({padding:h,apply({availableWidth:e,availableHeight:t,elements:r}){Object.assign(r.floating.style,{overflow:"auto",maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:Fd}),[w=m,b=v]=y.placement.split("-");var x,k,S;"selection"===m&&(w="selection");let E=It((()=>({anchor:[w,b].filter(Boolean).join(" ")})),[w,b]),C=pp(y,{overflowRef:a,onChange:o}),{getReferenceProps:T,getFloatingProps:P}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),r=e.map((e=>null==e?void 0:e.floating)),n=e.map((e=>null==e?void 0:e.item)),i=Dt((t=>up(t,e,"reference")),t),o=Dt((t=>up(t,e,"floating")),r),a=Dt((t=>up(t,e,"item")),n);return It((()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a})),[i,o,a])}([C]),R=fc((e=>{l(e),g.setFloating(e)}));return De(fp.Provider,{value:n},De(hp.Provider,{value:{setFloating:R,setReference:g.setReference,styles:_,getReferenceProps:T,getFloatingProps:P,slot:E}},e))}function vp(e,t,r=void 0){let n=dc(),i=fc(((e,t)=>{if(null==e)return[r,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[r,null];let i=_p(e,t);return[i,r=>{let o=gp(e);{let a=o.map((e=>window.getComputedStyle(t).getPropertyValue(e)));n.requestAnimationFrame((function s(){n.nextFrame(s);let l=!1;for(let[e,r]of o.entries()){let n=window.getComputedStyle(t).getPropertyValue(r);if(a[e]!==n){a[e]=n,l=!0;break}}if(!l)return;let c=_p(e,t);i!==c&&(r(c),i=c)}))}return n.dispose}]}return[r,null]})),o=It((()=>i(e,t)[0]),[e,t]),[a=o,s]=Rt();return pc((()=>{let[r,n]=i(e,t);if(s(r),n)return n(s)}),[e,t]),a}function gp(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(",");if(-1===e)return[t[1]];let r=t[1].slice(0,e).trim(),n=t[1].slice(e+1).trim();return n?[r,...gp(n)]:[r]}return[]}function _p(e,t){let r=document.createElement("div");t.appendChild(r),r.style.setProperty("margin-top","0px","important"),r.style.setProperty("margin-top",e,"important");let n=parseFloat(window.getComputedStyle(r).marginTop)||0;return t.removeChild(r),n}let yp=at(null);yp.displayName="OpenClosedContext";var wp=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(wp||{});function bp(){return Gt(yp)}function xp({value:e,children:t}){return Zr.createElement(yp.Provider,{value:e},t)}var kp,Sp=((kp=Sp||{})[kp.First=0]="First",kp[kp.Previous=1]="Previous",kp[kp.Next=2]="Next",kp[kp.Last=3]="Last",kp[kp.Specific=4]="Specific",kp[kp.Nothing=5]="Nothing",kp);function Ep(e,t){let r=t.resolveItems();if(r.length<=0)return null;let n=t.resolveActiveIndex(),i=null!=n?n:-1;switch(e.focus){case 0:for(let e=0;e<r.length;++e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 1:-1===i&&(i=r.length);for(let e=i-1;e>=0;--e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 2:for(let e=i+1;e<r.length;++e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 3:for(let e=r.length-1;e>=0;--e)if(!t.resolveDisabled(r[e],e,r))return e;return n;case 4:for(let n=0;n<r.length;++n)if(t.resolveId(r[n],n,r)===e.id)return n;return n;case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}function Cp(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in Jr&&(e=>e.useSyncExternalStore)(Jr)((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,r]=Rt(sc.isHandoffComplete);return t&&!1===sc.isHandoffComplete&&r(!1),Ot((()=>{!0!==t&&r(!0)}),[t]),Ot((()=>sc.handoff()),[]),!e&&t}let Tp=at(!1);function Pp(e){let t=Gt(Tp),r=Gt(Lp),n=bu(e),[i,o]=Rt((()=>{var e;if(!t&&null!==r)return null!=(e=r.current)?e:null;if(sc.isServer)return null;let i=null==n?void 0:n.getElementById("headlessui-portal-root");if(i)return i;if(null===n)return null;let o=n.createElement("div");return o.setAttribute("id","headlessui-portal-root"),n.body.appendChild(o)}));return Ot((()=>{null!==i&&(null!=n&&n.body.contains(i)||null==n||n.body.appendChild(i))}),[i,n]),Ot((()=>{t||null!==r&&o(r.current)}),[r,o,t]),i}let Rp=$e,Ap=Pc((function(e,t){let r=e,n=Mt(null),i=Ic(function(e,t=!0){return Object.assign(e,{[Fc]:t})}((e=>{n.current=e})),t),o=bu(n),a=Pp(n),[s]=Rt((()=>{var e;return sc.isServer?null:null!=(e=null==o?void 0:o.createElement("div"))?e:null})),l=Gt(Mp),c=Cp();pc((()=>{!a||!s||a.contains(s)||(s.setAttribute("data-headlessui-portal",""),a.appendChild(s))}),[a,s]),pc((()=>{if(s&&l)return l.register(s)}),[l,s]),function(e){let t=fc(e),r=Mt(!1);Ot((()=>(r.current=!1,()=>{r.current=!0,cc((()=>{r.current&&t()}))})),[t])}((()=>{var e;!a||!s||(s instanceof Node&&a.contains(s)&&a.removeChild(s),a.childNodes.length<=0&&(null==(e=a.parentElement)||e.removeChild(a)))}));let u=kc();return c&&a&&s?vr(u({ourProps:{ref:i},theirProps:r,slot:{},defaultTag:Rp,name:"Portal"}),s):null}));let Op=$e,Lp=at(null);let Mp=at(null),Fp=Pc((function(e,t){let r=Ic(t),{enabled:n=!0,...i}=e,o=kc();return n?Zr.createElement(Ap,{...i,ref:r}):o({ourProps:{ref:r},theirProps:i,slot:{},defaultTag:Rp,name:"Portal"})})),Ip=Pc((function(e,t){let{target:r,...n}=e,i={ref:Ic(t)},o=kc();return Zr.createElement(Lp.Provider,{value:r},o({ourProps:i,theirProps:n,defaultTag:Op,name:"Popover.Group"}))})),Dp=Object.assign(Fp,{Group:Ip});function Gp(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:jp)!==$e||1===Zr.Children.count(e.children)}let Np=at(null);Np.displayName="TransitionContext";var $p=(e=>(e.Visible="visible",e.Hidden="hidden",e))($p||{});let Hp=at(null);function Wp(e){return"children"in e?Wp(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function Up(e,t){let r=hc(e),n=Mt([]),i=function(){let e=Mt(!1);return pc((()=>(e.current=!0,()=>{e.current=!1})),[]),e}(),o=dc(),a=fc(((e,t=xc.Hidden)=>{let a=n.current.findIndex((({el:t})=>t===e));-1!==a&&(_c(t,{[xc.Unmount](){n.current.splice(a,1)},[xc.Hidden](){n.current[a].state="hidden"}}),o.microTask((()=>{var e;!Wp(n)&&i.current&&(null==(e=r.current)||e.call(r))})))})),s=fc((e=>{let t=n.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):n.current.push({el:e,state:"visible"}),()=>a(e,xc.Unmount)})),l=Mt([]),c=Mt(Promise.resolve()),u=Mt({enter:[],leave:[]}),d=fc(((e,r,n)=>{l.current.splice(0),t&&(t.chains.current[r]=t.chains.current[r].filter((([t])=>t!==e))),null==t||t.chains.current[r].push([e,new Promise((e=>{l.current.push(e)}))]),null==t||t.chains.current[r].push([e,new Promise((e=>{Promise.all(u.current[r].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===r?c.current=c.current.then((()=>null==t?void 0:t.wait.current)).then((()=>n(r))):n(r)})),p=fc(((e,t,r)=>{Promise.all(u.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=l.current.shift())||e()})).then((()=>r(t)))}));return It((()=>({children:n,register:s,unregister:a,onStart:d,onStop:p,wait:c,chains:u})),[s,a,n,d,p,u,c])}Hp.displayName="NestingContext";let jp=$e,Bp=bc.RenderStrategy;let zp=Pc((function(e,t){let{show:r,appear:n=!1,unmount:i=!0,...o}=e,a=Mt(null),s=Ic(...Gp(e)?[a,t]:null===t?[]:[t]);Cp();let l=bp();if(void 0===r&&null!==l&&(r=(l&wp.Open)===wp.Open),void 0===r)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,u]=Rt(r?"visible":"hidden"),d=Up((()=>{r||u("hidden")})),[p,h]=Rt(!0),f=Mt([r]);pc((()=>{!1!==p&&f.current[f.current.length-1]!==r&&(f.current.push(r),h(!1))}),[f,r]);let m=It((()=>({show:r,appear:n,initial:p})),[r,n,p]);pc((()=>{r?u("visible"):!Wp(d)&&null!==a.current&&u("hidden")}),[r,d]);let v={unmount:i},g=fc((()=>{var t;p&&h(!1),null==(t=e.beforeEnter)||t.call(e)})),_=fc((()=>{var t;p&&h(!1),null==(t=e.beforeLeave)||t.call(e)})),y=kc();return Zr.createElement(Hp.Provider,{value:d},Zr.createElement(Np.Provider,{value:m},y({ourProps:{...v,as:$e,children:Zr.createElement(qp,{ref:s,...v,...o,beforeEnter:g,beforeLeave:_})},theirProps:{},defaultTag:$e,features:Bp,visible:"visible"===c,name:"Transition"})))})),qp=Pc((function(e,t){var r,n;let{transition:i=!0,beforeEnter:o,afterEnter:a,beforeLeave:s,afterLeave:l,enter:c,enterFrom:u,enterTo:d,entered:p,leave:h,leaveFrom:f,leaveTo:m,...v}=e,[g,_]=Rt(null),y=Mt(null),w=Gp(e),b=Ic(...w?[y,t,_]:null===t?[]:[t]),x=null==(r=v.unmount)||r?xc.Unmount:xc.Hidden,{show:k,appear:S,initial:E}=function(){let e=Gt(Np);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[C,T]=Rt(k?"visible":"hidden"),P=function(){let e=Gt(Hp);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:R,unregister:A}=P;pc((()=>R(y)),[R,y]),pc((()=>{if(x===xc.Hidden&&y.current)return k&&"visible"!==C?void T("visible"):_c(C,{hidden:()=>A(y),visible:()=>R(y)})}),[C,y,R,A,k,x]);let O=Cp();pc((()=>{if(w&&O&&"visible"===C&&null===y.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[y,C,O,w]);let L=E&&!S,M=S&&k&&E,F=Mt(!1),I=Up((()=>{F.current||(T("hidden"),A(y))}),P),D=fc((e=>{F.current=!0;let t=e?"enter":"leave";I.onStart(y,t,(e=>{"enter"===e?null==o||o():"leave"===e&&(null==s||s())}))})),G=fc((e=>{let t=e?"enter":"leave";F.current=!1,I.onStop(y,t,(e=>{"enter"===e?null==a||a():"leave"===e&&(null==l||l())})),"leave"===t&&!Wp(I)&&(T("hidden"),A(y))}));Ot((()=>{w&&i||(D(k),G(k))}),[k,w,i]);let N=(()=>!(!i||!w||!O||L))(),[,$]=Lu(N,g,k,{start:D,end:G}),H=Rc({ref:b,className:(null==(n=gc(v.className,M&&c,M&&u,$.enter&&c,$.enter&&$.closed&&u,$.enter&&!$.closed&&d,$.leave&&h,$.leave&&!$.closed&&f,$.leave&&$.closed&&m,!$.transition&&k&&p))?void 0:n.trim())||void 0,...Ou($)}),W=0;"visible"===C&&(W|=wp.Open),"hidden"===C&&(W|=wp.Closed),$.enter&&(W|=wp.Opening),$.leave&&(W|=wp.Closing);let U=kc();return Zr.createElement(Hp.Provider,{value:I},Zr.createElement(xp,{value:W},U({ourProps:H,theirProps:v,defaultTag:jp,features:Bp,visible:"visible"===C,name:"Transition.Child"})))})),Kp=Pc((function(e,t){let r=null!==Gt(Np),n=null!==bp();return Zr.createElement(Zr.Fragment,null,!r&&n?Zr.createElement(zp,{ref:t,...e}):Zr.createElement(qp,{ref:t,...e}))})),Vp=Object.assign(zp,{Child:Kp,Root:zp});let Qp=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Yp(e){var t,r;let n=null!=(t=e.innerText)?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return n;let o=!1;for(let s of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),o=!0;let a=o?null!=(r=i.innerText)?r:"":n;return Qp.test(a)&&(a=a.replace(Qp,"")),a}function Xp(e){let t=Mt(""),r=Mt("");return fc((()=>{let n=e.current;if(!n)return"";let i=n.innerText;if(t.current===i)return r.current;let o=function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let r=e.getAttribute("aria-labelledby");if(r){let e=r.split(" ").map((e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():Yp(t).trim()}return null})).filter(Boolean);if(e.length>0)return e.join(", ")}return Yp(e).trim()}(n).trim().toLowerCase();return t.current=i,r.current=o,o}))}var Zp=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Zp||{}),Jp=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Jp||{}),eh=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetItemsElement=8]="SetItemsElement",e))(eh||{});function th(e,t=e=>e){let r=null!==e.activeItemIndex?e.items[e.activeItemIndex]:null,n=mu(t(e.items.slice()),(e=>e.dataRef.current.domRef.current)),i=r?n.indexOf(r):null;return-1===i&&(i=null),{items:n,activeItemIndex:i}}let rh={1:e=>1===e.menuState?e:{...e,activeItemIndex:null,menuState:1},0:e=>0===e.menuState?e:{...e,__demoMode:!1,menuState:0},2:(e,t)=>{var r,n,i,o,a;if(1===e.menuState)return e;let s={...e,searchQuery:"",activationTrigger:null!=(r=t.trigger)?r:1,__demoMode:!1};if(t.focus===Sp.Nothing)return{...s,activeItemIndex:null};if(t.focus===Sp.Specific)return{...s,activeItemIndex:e.items.findIndex((e=>e.id===t.id))};if(t.focus===Sp.Previous){let r=e.activeItemIndex;if(null!==r){let o=e.items[r].dataRef.current.domRef,a=Ep(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==a){let t=e.items[a].dataRef.current.domRef;if((null==(n=o.current)?void 0:n.previousElementSibling)===t.current||null===(null==(i=t.current)?void 0:i.previousElementSibling))return{...s,activeItemIndex:a}}}}else if(t.focus===Sp.Next){let r=e.activeItemIndex;if(null!==r){let n=e.items[r].dataRef.current.domRef,i=Ep(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==i){let t=e.items[i].dataRef.current.domRef;if((null==(o=n.current)?void 0:o.nextElementSibling)===t.current||null===(null==(a=t.current)?void 0:a.nextElementSibling))return{...s,activeItemIndex:i}}}}let l=th(e),c=Ep(t,{resolveItems:()=>l.items,resolveActiveIndex:()=>l.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...s,...l,activeItemIndex:c}},3:(e,t)=>{let r=""!==e.searchQuery?0:1,n=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeItemIndex?e.items.slice(e.activeItemIndex+r).concat(e.items.slice(0,e.activeItemIndex+r)):e.items).find((e=>{var t;return(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(n))&&!e.dataRef.current.disabled})),o=i?e.items.indexOf(i):-1;return-1===o||o===e.activeItemIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeItemIndex:o,activationTrigger:1}},4:e=>""===e.searchQuery?e:{...e,searchQuery:"",searchActiveItemIndex:null},5:(e,t)=>{let r=th(e,(e=>[...e,{id:t.id,dataRef:t.dataRef}]));return{...e,...r}},6:(e,t)=>{let r=th(e,(e=>{let r=e.findIndex((e=>e.id===t.id));return-1!==r&&e.splice(r,1),e}));return{...e,...r,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.itemsElement===t.element?e:{...e,itemsElement:t.element}},nh=at(null);function ih(e){let t=Gt(nh);if(null===t){let t=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ih),t}return t}function oh(e,t){return _c(t.type,rh,e,t)}nh.displayName="MenuContext";let ah=$e;let sh=bc.RenderStrategy|bc.Static;let lh=$e;let ch=Pc((function(e,t){let{__demoMode:r=!1,...n}=e,i=At(oh,{__demoMode:r,menuState:r?0:1,buttonElement:null,itemsElement:null,items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:o,itemsElement:a,buttonElement:s},l]=i,c=Ic(t);wu(0===o,[s,a],((e,t)=>{l({type:1}),du(t,uu.Loose)||(e.preventDefault(),null==s||s.focus())}));let u=fc((()=>{l({type:1})})),d=It((()=>({open:0===o,close:u})),[o,u]),p={ref:c},h=kc();return Zr.createElement(mp,null,Zr.createElement(nh.Provider,{value:i},Zr.createElement(xp,{value:_c(o,{0:wp.Open,1:wp.Closed})},h({ourProps:p,theirProps:n,slot:d,defaultTag:ah,name:"Menu"}))))})),uh=Pc((function(e,t){var r;let n=$t(),{id:i=`headlessui-menu-button-${n}`,disabled:o=!1,autoFocus:a=!1,...s}=e,[l,c]=ih("Menu.Button"),u=Gt(hp).getReferenceProps,d=Ic(t,Gt(hp).setReference,fc((e=>c({type:7,element:e})))),p=fc((e=>{switch(e.key){case Hc.Space:case Hc.Enter:case Hc.ArrowDown:e.preventDefault(),e.stopPropagation(),jr((()=>c({type:0}))),c({type:2,focus:Sp.First});break;case Hc.ArrowUp:e.preventDefault(),e.stopPropagation(),jr((()=>c({type:0}))),c({type:2,focus:Sp.Last})}})),h=fc((e=>{if(e.key===Hc.Space)e.preventDefault()})),f=fc((e=>{var t;if(Mc(e.currentTarget))return e.preventDefault();o||(0===l.menuState?(jr((()=>c({type:1}))),null==(t=l.buttonElement)||t.focus({preventScroll:!0})):(e.preventDefault(),c({type:0})))})),{isFocusVisible:m,focusProps:v}=ic({autoFocus:a}),{isHovered:g,hoverProps:_}=function(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:i}=e,[o,a]=Rt(!1),s=Mt({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;Ot(nc,[]);let{hoverProps:l,triggerHoverEnd:c}=It((()=>{let e=(e,n)=>{if(s.pointerType=n,i||"touch"===n||s.isHovered||!e.currentTarget.contains(e.target))return;s.isHovered=!0;let o=e.currentTarget;s.target=o,t&&t({type:"hoverstart",target:o,pointerType:n}),r&&r(!0),a(!0)},o=(e,t)=>{if(s.pointerType="",s.target=null,"touch"===t||!s.isHovered)return;s.isHovered=!1;let i=e.currentTarget;n&&n({type:"hoverend",target:i,pointerType:t}),r&&r(!1),a(!1)},l={};return"undefined"!=typeof PointerEvent?(l.onPointerEnter=t=>{Jl&&"mouse"===t.pointerType||e(t,t.pointerType)},l.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,e.pointerType)}):(l.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},l.onMouseEnter=t=>{s.ignoreEmulatedMouseEvents||Jl||e(t,"mouse"),s.ignoreEmulatedMouseEvents=!1},l.onMouseLeave=e=>{!i&&e.currentTarget.contains(e.target)&&o(e,"mouse")}),{hoverProps:l,triggerHoverEnd:o}}),[t,r,n,i,s]);return Ot((()=>{i&&c({currentTarget:s.target},s.pointerType)}),[i]),{hoverProps:l,isHovered:o}}({isDisabled:o}),{pressed:y,pressProps:w}=function({disabled:e=!1}={}){let t=Mt(null),[r,n]=Rt(!1),i=dc(),o=fc((()=>{t.current=null,n(!1),i.dispose()})),a=fc((e=>{if(i.dispose(),null===t.current){t.current=e.currentTarget,n(!0);{let r=lc(e.currentTarget);i.addEventListener(r,"pointerup",o,!1),i.addEventListener(r,"pointermove",(e=>{if(t.current){let r=function(e){let t=e.width/2,r=e.height/2;return{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}(e);n(function(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}(r,t.current.getBoundingClientRect()))}}),!1),i.addEventListener(r,"pointercancel",o,!1)}}}));return{pressed:r,pressProps:e?{}:{onPointerDown:a,onPointerUp:o,onClick:o}}}({disabled:o}),b=It((()=>({open:0===l.menuState,active:y||0===l.menuState,disabled:o,hover:g,focus:m,autofocus:a})),[l,g,m,y,o,a]),x=Tc(u(),{ref:d,id:i,type:xu(e,l.buttonElement),"aria-haspopup":"menu","aria-controls":null==(r=l.itemsElement)?void 0:r.id,"aria-expanded":0===l.menuState,disabled:o||void 0,autoFocus:a,onKeyDown:p,onKeyUp:h,onClick:f},v,_,w);return kc()({ourProps:x,theirProps:s,slot:b,defaultTag:"button",name:"Menu.Button"})})),dh=Pc((function(e,t){var r,n;let i=$t(),{id:o=`headlessui-menu-items-${i}`,anchor:a,portal:s=!1,modal:l=!0,transition:c=!1,...u}=e,d=function(e){return It((()=>e?"string"==typeof e?{to:e}:e:null),[e])}(a),[p,h]=ih("Menu.Items"),[f,m]=function(e=null){!1===e&&(e=null),"string"==typeof e&&(e={to:e});let t=Gt(fp),r=It((()=>e),[JSON.stringify(e,((e,t)=>{var r;return null!=(r=null==t?void 0:t.outerHTML)?r:t}))]);pc((()=>{null==t||t(null!=r?r:null)}),[t,r]);let n=Gt(hp);return It((()=>[n.setFloating,e?n.styles:{}]),[n.setFloating,e,n.styles])}(d),v=function(){let{getFloatingProps:e,slot:t}=Gt(hp);return Dt(((...r)=>Object.assign({},e(...r),{"data-anchor":t.anchor})),[e,t])}(),[g,_]=Rt(null),y=Ic(t,d?f:null,fc((e=>h({type:8,element:e}))),_),w=bu(p.itemsElement);d&&(s=!0);let b=bp(),[x,k]=Lu(c,g,null!==b?(b&wp.Open)===wp.Open:0===p.menuState);!function(e,t,r){let n=hc((e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&r()}));Ot((()=>{if(!e)return;let r=null===t?null:t instanceof HTMLElement?t:t.current;if(!r)return;let i=uc();if("undefined"!=typeof ResizeObserver){let e=new ResizeObserver((()=>n.current(r)));e.observe(r),i.add((()=>e.disconnect()))}if("undefined"!=typeof IntersectionObserver){let e=new IntersectionObserver((()=>n.current(r)));e.observe(r),i.add((()=>e.disconnect()))}return()=>i.dispose()}),[t,n,e])}(x,p.buttonElement,(()=>{h({type:1})})),Cu(!p.__demoMode&&(l&&0===p.menuState),w),function(e,{allowed:t,disallowed:r}={}){let n=Yc(e,"inert-others");pc((()=>{var e,i;if(!n)return;let o=uc();for(let t of null!=(e=null==r?void 0:r())?e:[])t&&o.add(Jc(t));let a=null!=(i=null==t?void 0:t())?i:[];for(let t of a){if(!t)continue;let e=lc(t);if(!e)continue;let r=t.parentElement;for(;r&&r!==e.body;){for(let e of r.children)a.some((t=>e.contains(t)))||o.add(Jc(e));r=r.parentElement}}return o.dispose}),[n,t,r])}(!p.__demoMode&&(l&&0===p.menuState),{allowed:Dt((()=>[p.buttonElement,p.itemsElement]),[p.buttonElement,p.itemsElement])});let S=!function(e,t){let r=Mt({left:0,top:0});if(pc((()=>{if(!t)return;let e=t.getBoundingClientRect();e&&(r.current=e)}),[e,t]),null==t||!e||t===document.activeElement)return!1;let n=t.getBoundingClientRect();return n.top!==r.current.top||n.left!==r.current.left}(0!==p.menuState,p.buttonElement)&&x;Ot((()=>{let e=p.itemsElement;e&&0===p.menuState&&e!==(null==w?void 0:w.activeElement)&&e.focus({preventScroll:!0})}),[p.menuState,p.itemsElement,w]),function(e,{container:t,accept:r,walk:n}){let i=Mt(r),o=Mt(n);Ot((()=>{i.current=r,o.current=n}),[r,n]),pc((()=>{if(!t||!e)return;let r=lc(t);if(!r)return;let n=i.current,a=o.current,s=Object.assign((e=>n(e)),{acceptNode:n}),l=r.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,s,!1);for(;l.nextNode();)a(l.currentNode)}),[t,e,i,o])}(0===p.menuState,{container:p.itemsElement,accept:e=>"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let E=dc(),C=fc((e=>{var t,r,n;switch(E.dispose(),e.key){case Hc.Space:if(""!==p.searchQuery)return e.preventDefault(),e.stopPropagation(),h({type:3,value:e.key});case Hc.Enter:if(e.preventDefault(),e.stopPropagation(),h({type:1}),null!==p.activeItemIndex){let{dataRef:e}=p.items[p.activeItemIndex];null==(r=null==(t=e.current)?void 0:t.domRef.current)||r.click()}pu(p.buttonElement);break;case Hc.ArrowDown:return e.preventDefault(),e.stopPropagation(),h({type:2,focus:Sp.Next});case Hc.ArrowUp:return e.preventDefault(),e.stopPropagation(),h({type:2,focus:Sp.Previous});case Hc.Home:case Hc.PageUp:return e.preventDefault(),e.stopPropagation(),h({type:2,focus:Sp.First});case Hc.End:case Hc.PageDown:return e.preventDefault(),e.stopPropagation(),h({type:2,focus:Sp.Last});case Hc.Escape:e.preventDefault(),e.stopPropagation(),jr((()=>h({type:1}))),null==(n=p.buttonElement)||n.focus({preventScroll:!0});break;case Hc.Tab:e.preventDefault(),e.stopPropagation(),jr((()=>h({type:1}))),vu(p.buttonElement,e.shiftKey?au.Previous:au.Next);break;default:1===e.key.length&&(h({type:3,value:e.key}),E.setTimeout((()=>h({type:4})),350))}})),T=fc((e=>{if(e.key===Hc.Space)e.preventDefault()})),P=It((()=>({open:0===p.menuState})),[p.menuState]),R=Tc(d?v():{},{"aria-activedescendant":null===p.activeItemIndex||null==(r=p.items[p.activeItemIndex])?void 0:r.id,"aria-labelledby":null==(n=p.buttonElement)?void 0:n.id,id:o,onKeyDown:C,onKeyUp:T,role:"menu",tabIndex:0===p.menuState?0:void 0,ref:y,style:{...u.style,...m,"--button-width":zc(p.buttonElement,!0).width},...Ou(k)}),A=kc();return Zr.createElement(Dp,{enabled:!!s&&(e.static||x)},A({ourProps:R,theirProps:u,slot:P,defaultTag:"div",features:sh,visible:S,name:"Menu.Items"}))})),ph=Pc((function(e,t){let r=$t(),{id:n=`headlessui-menu-item-${r}`,disabled:i=!1,...o}=e,[a,s]=ih("Menu.Item"),l=null!==a.activeItemIndex&&a.items[a.activeItemIndex].id===n,c=Mt(null),u=Ic(t,c);pc((()=>{if(!a.__demoMode&&0===a.menuState&&l&&0!==a.activationTrigger)return uc().requestAnimationFrame((()=>{var e,t;null==(t=null==(e=c.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}))}),[a.__demoMode,c,l,a.menuState,a.activationTrigger,a.activeItemIndex]);let d=Xp(c),p=Mt({disabled:i,domRef:c,get textValue(){return d()}});pc((()=>{p.current.disabled=i}),[p,i]),pc((()=>(s({type:5,id:n,dataRef:p}),()=>s({type:6,id:n}))),[p,n]);let h=fc((()=>{s({type:1})})),f=fc((e=>{if(i)return e.preventDefault();s({type:1}),pu(a.buttonElement)})),m=fc((()=>{if(i)return s({type:2,focus:Sp.Nothing});s({type:2,focus:Sp.Specific,id:n})})),v=function(){let e=Mt([-1,-1]);return{wasMoved(t){let r=Tu(t);return(e.current[0]!==r[0]||e.current[1]!==r[1])&&(e.current=r,!0)},update(t){e.current=Tu(t)}}}(),g=fc((e=>{v.update(e),!i&&(l||s({type:2,focus:Sp.Specific,id:n,trigger:0}))})),_=fc((e=>{v.wasMoved(e)&&(i||l||s({type:2,focus:Sp.Specific,id:n,trigger:0}))})),y=fc((e=>{v.wasMoved(e)&&(i||l&&s({type:2,focus:Sp.Nothing}))})),[w,b]=jc(),[x,k]=function(){let[e,t]=Rt([]);return[e.length>0?e.join(" "):void 0,It((()=>function(e){let r=fc((e=>(t((t=>[...t,e])),()=>t((t=>{let r=t.slice(),n=r.indexOf(e);return-1!==n&&r.splice(n,1),r}))))),n=It((()=>({register:r,slot:e.slot,name:e.name,props:e.props,value:e.value})),[r,e.slot,e.name,e.props,e.value]);return Zr.createElement(Dc.Provider,{value:n},e.children)}),[t])]}(),S=It((()=>({active:l,focus:l,disabled:i,close:h})),[l,i,h]),E={id:n,ref:u,role:"menuitem",tabIndex:!0===i?void 0:-1,"aria-disabled":!0===i||void 0,"aria-labelledby":w,"aria-describedby":x,disabled:void 0,onClick:f,onFocus:m,onPointerEnter:g,onMouseEnter:g,onPointerMove:_,onMouseMove:_,onPointerLeave:y,onMouseLeave:y},C=kc();return Zr.createElement(b,null,Zr.createElement(k,null,C({ourProps:E,theirProps:o,slot:S,defaultTag:lh,name:"Menu.Item"})))})),hh=Pc((function(e,t){let[r,n]=jc(),i=e,o={ref:t,"aria-labelledby":r,role:"group"},a=kc();return Zr.createElement(n,null,a({ourProps:o,theirProps:i,slot:{},defaultTag:"div",name:"Menu.Section"}))})),fh=Pc((function(e,t){let r=$t(),{id:n=`headlessui-menu-heading-${r}`,...i}=e,o=Uc();pc((()=>o.register(n)),[n,o.register]);let a={id:n,ref:t,role:"presentation",...o.props};return kc()({ourProps:a,theirProps:i,slot:{},defaultTag:"header",name:"Menu.Heading"})})),mh=Pc((function(e,t){let r=e,n={ref:t,role:"separator"};return kc()({ourProps:n,theirProps:r,slot:{},defaultTag:"div",name:"Menu.Separator"})})),vh=Object.assign(ch,{Button:uh,Items:dh,Item:ph,Section:hh,Heading:fh,Separator:mh});function gh({title:e,titleId:t,...r},n){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?De("title",{id:t},e):null,De("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 12a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const _h=rr(gh);function yh({title:e,titleId:t,...r},n){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?De("title",{id:t},e):null,De("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const wh=rr(yh),bh=e=>is(Sh,{children:os(vh,{as:"div",children:[is("div",{children:os(uh,{css:{display:"flex",alignItems:"center",borderRadius:"9999px","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity))",":hover":{"--tw-text-opacity":"1",color:"rgb(75 85 99 / var(--tw-text-opacity))"},":focus":{outline:"2px solid transparent",outlineOffset:"2px","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-opacity":"1","--tw-ring-color":"rgb(99 102 241 / var(--tw-ring-opacity))","--tw-ring-offset-width":"2px","--tw-ring-offset-color":"#f3f4f6"}},children:[is("span",{css:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},children:"Open options"}),is(_h,{"aria-hidden":"true",css:{width:"1.25rem",height:"1.25rem"}})]})}),is(dh,{transition:!0,className:"right-45 w-30",css:{position:"fixed",zIndex:"10",marginTop:"0.5rem",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))","--tw-shadow":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","--tw-ring-color":"rgb(0 0 0 / 0.05)",transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms",":focus":{outline:"2px solid transparent",outlineOffset:"2px"},"&[data-closed]":{"--tw-scale-x":".95","--tw-scale-y":".95",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",opacity:"0"},"&[data-enter]":{transitionDuration:"100ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)"},"&[data-leave]":{transitionDuration:"75ms",transitionTimingFunction:"cubic-bezier(0.4, 0, 1, 1)"}},children:e.items.map(((t,r)=>is(ph,{children:is("button",{type:"button",css:{display:"block",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))","&[data-focus]":{"--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))",outline:"2px solid transparent",outlineOffset:"2px"}},onClick:()=>{t.onClick(e.id)},children:t.label},r)},r)))})]})}),xh=e=>{const t=new Date(e.value);return os(Sh,{children:[t.toLocaleDateString(),is("br",{}),t.toLocaleTimeString()]})},kh=e=>{const[t,r]=Rt(!1);return os(Sh,{css:{position:"relative"},children:[is(Vp,{show:t,children:is("div",{css:{position:"absolute",bottom:"3rem",display:"flex",height:"2rem",width:"4.313rem",flexDirection:"row",alignItems:"flex-start",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(17 24 39 / var(--tw-bg-opacity))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",opacity:"0.9","--tw-shadow":"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",transitionProperty:"opacity",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms","&[data-closed]":{opacity:"0"},"&[data-enter]":{transitionDuration:"100ms",transitionTimingFunction:"cubic-bezier(0.4, 0, 1, 1)"},"&[data-leave]":{transitionDuration:"500ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)"}},children:is("p",{css:{order:"0",height:"1rem",width:"2.813rem",flex:"none",flexGrow:"0",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"500",fontStyle:"normal","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))"},children:"Copied"})})}),is("button",{onClick:async()=>{await(async e=>{await navigator.clipboard.writeText(e)})(e.value),r(!0),setTimeout((()=>{r(!1)}),3e3)},type:"button",css:{display:"block",flexShrink:"1",borderRadius:"0.375rem",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(209 213 219 / var(--tw-bg-opacity))"},"&[data-focus]":{"--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity))","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))",outline:"2px solid transparent",outlineOffset:"2px"}},children:e.value})]})},Sh=co.td`
|
|
12
12
|
${{whiteSpace:"nowrap",paddingTop:"1rem",paddingBottom:"1rem",paddingLeft:"1rem",paddingRight:"0.75rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"}}
|
|
13
13
|
`,Eh=co.td`
|
|
14
14
|
${{whiteSpace:"nowrap",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"1.25rem",paddingBottom:"1.25rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"}}
|
|
@@ -18,6 +18,6 @@ var __defProp=Object.defineProperty,__typeError=e=>{throw TypeError(e)},__defNor
|
|
|
18
18
|
${({prefix:e})=>e?{paddingLeft:"2.5rem"}:{paddingLeft:"0.75rem"}}
|
|
19
19
|
|
|
20
20
|
${({hasError:e})=>e?{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(252 165 165 / var(--tw-ring-opacity))",":focus":{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(220 38 38 / var(--tw-ring-opacity))"}}:{"--tw-ring-opacity":"1","--tw-ring-color":"rgb(209 213 219 / var(--tw-ring-opacity))",":focus":{"--tw-ring-color":"var(--fl-color-primary-600)"}}}
|
|
21
|
-
`;function Dh({title:e,titleId:t,...r},n){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?De("title",{id:t},e):null,De("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const Gh=rr(Dh),Nh=rr((({label:e,id:t,type:r,icon:n,placeholder:i,setPlaceholderOnFocus:o,value:a,className:s,onChange:l,onBlur:c,onEnter:u,error:d,helperText:p,disabled:h,remove:f},m)=>os("div",{className:s,children:[e&&is("label",{htmlFor:t,css:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},children:e}),os("div",{css:{position:"relative",marginTop:"0.5rem"},children:[n&&is("span",{css:{position:"absolute",marginLeft:"0.5rem",marginTop:"0.5rem"},children:n}),os("div",{css:{marginTop:"0.5rem",display:"flex",alignItems:"center"},children:[is(Ih,{type:r,value:a,name:t,id:t,placeholder:i,onChange:e=>{const t=e;t.target instanceof HTMLInputElement&&l(t.target.value.trim())},onBlur:e=>{const t=e;t.target instanceof HTMLInputElement&&c&&c(t.target.value.trim())},onFocus:()=>{i&&o&&!(null==a?void 0:a.trim())&&l(i)},onKeyDown:e=>{"Enter"===e.key&&u&&u()},hasError:!!d,ref:m,disabled:h,prefix:!!n}),f&&os("button",{type:"button",children:[is(Gh,{css:{marginLeft:"0.5rem",height:"1.25rem",width:"1.25rem"},onClick:()=>f()})," "]})]})]}),d&&is("p",{css:{marginTop:"0.5rem",marginBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity))"},children:d}),p&&is("span",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:p})]}))),$h="asc",Hh="desc",Wh=e=>{var t,r;const[n,i]=Rt(""),[o,a]=Rt([]),[s,l]=Rt(e.columns[0]),[c,u]=Rt($h),d=It((()=>s?[...e.data].sort(((e,t)=>{const r=s.sort?s.sort(e[s.field],t[s.field]):e[s.field].localeCompare(t[s.field]);return c===Hh?-1*r:r})):e.data),[e.data,s,c]),p=It((()=>{const t=o.reduce(((e,t)=>e.filter(t.filterFunction)),d);return n&&!e.searchButton?t.filter((e=>e.id.toLowerCase().includes(n.toLowerCase()))):t}),[d,n,o,e.searchButton]),h=It((()=>e.columns.filter((e=>e.filters&&e.filters.length>0)).length>0),[e.columns]),f=()=>{e.searchButton&&e.searchButton.onClick(n)},m=(e,t)=>{const r={name:e.name,filterFunction:r=>e.predicate(r[t.field])},n=o.filter((e=>e.name!==r.name));return()=>n.length<o.length?a([...n]):a([...n,r])};return is(ns,{children:os("div",{css:{paddingLeft:"1rem",paddingRight:"1rem","@media (min-width: 640px)":{paddingLeft:"1.5rem",paddingRight:"1.5rem"},"@media (min-width: 1024px)":{paddingLeft:"2rem",paddingRight:"2rem"}},children:[e.error&&is("div",{css:{marginBottom:"1rem",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(254 242 242 / var(--tw-bg-opacity))",padding:"1rem"},children:os("div",{css:{display:"flex"},children:[is("div",{css:{flexShrink:"0"},children:is(Mh,{css:{height:"1.25rem",width:"1.25rem","--tw-text-opacity":"1",color:"rgb(248 113 113 / var(--tw-text-opacity))"},"aria-hidden":"true"})}),is("div",{css:{marginLeft:"0.75rem"},children:is("h3",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(153 27 27 / var(--tw-text-opacity))"},children:e.error})})]})}),os("div",{css:{"@media (min-width: 640px)":{display:"flex",alignItems:"center"}},children:[os("div",{css:{"@media (min-width: 640px)":{flex:"1 1 auto"}},children:[is("h1",{css:{fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:e.title}),e.subtitle&&is("p",{css:{marginTop:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))"},children:e.subtitle}),os("div",{css:{marginTop:"0.5rem",display:"inline-flex"},children:[is(Nh,{css:{marginTop:"auto",marginBottom:"auto",maxWidth:"20rem"},label:null==(t=e.searchButton)?void 0:t.text,icon:is(wh,{css:{height:"1.25rem",width:"1.25rem","--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity))"}}),id:"search",type:"text",error:null==(r=e.searchButton)?void 0:r.error,onChange:e=>i(e),onEnter:f}),e.searchButton&&is("div",{css:{marginLeft:"1rem",marginTop:"0.5rem"},children:is("button",{type:"button",onClick:f,css:{display:"block",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",textAlign:"center",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(99 102 241 / var(--tw-bg-opacity))"},":focus-visible":{outlineStyle:"solid",outlineWidth:"2px",outlineOffset:"2px",outlineColor:"#4f46e5"}},children:e.searchButton.text})})]})]}),e.addButton&&is("div",{css:{marginTop:"1rem","@media (min-width: 640px)":{marginLeft:"4rem",marginTop:"0px",flex:"none"}},children:is("button",{type:"button",onClick:e.addButton.onClick,css:{display:"block",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",textAlign:"center",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(99 102 241 / var(--tw-bg-opacity))"},":focus-visible":{outlineStyle:"solid",outlineWidth:"2px",outlineOffset:"2px",outlineColor:"#4f46e5"}},children:e.addButton.text})})]}),is("div",{css:{marginTop:"2rem",display:"flow-root"},children:is("div",{css:{marginLeft:"-1rem",marginRight:"-1rem",marginTop:"-0.5rem",marginBottom:"-0.5rem",overflowX:"auto","@media (min-width: 640px)":{marginLeft:"-1.5rem",marginRight:"-1.5rem"},"@media (min-width: 1024px)":{marginLeft:"-2rem",marginRight:"-2rem"}},children:is("div",{css:{display:"inline-block",minWidth:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem",verticalAlign:"middle","@media (min-width: 640px)":{paddingLeft:"1.5rem",paddingRight:"1.5rem"},"@media (min-width: 1024px)":{paddingLeft:"2rem",paddingRight:"2rem"}},children:is("div",{css:{overflow:"hidden","--tw-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","--tw-ring-opacity":"0.05","--tw-ring-color":"rgb(0 0 0 / var(--tw-ring-opacity))","@media (min-width: 640px)":{borderRadius:"0.5rem"}},children:os("table",{css:{minWidth:"100%","> :not([hidden]) ~ :not([hidden])":{"--tw-divide-y-reverse":"0",borderTopWidth:"calc(1px * calc(1 - var(--tw-divide-y-reverse)))",borderBottomWidth:"calc(1px * var(--tw-divide-y-reverse))","--tw-divide-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-divide-opacity))"}},children:[h&&is("thead",{children:is("tr",{children:os("td",{css:{padding:"1rem"},colSpan:e.columns.length,children:[is(Fh,{onClick:()=>a([]),isActive:0==o.length,children:"All"}),e.columns.map((e=>{var t;return null==(t=e.filters)?void 0:t.map((t=>is(Fh,{onClick:m(t,e),isActive:!!o.find((e=>e.name===t.name)),children:t.name},t.name)))}))]})})}),is("thead",{css:{"--tw-bg-opacity":"1",backgroundColor:"rgb(249 250 251 / var(--tw-bg-opacity))"},children:is("tr",{children:e.columns.map((e=>is("th",{scope:"col",css:{paddingTop:"0.875rem",paddingBottom:"0.875rem",paddingLeft:"1rem",paddingRight:"0.75rem",textAlign:"left",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:os("button",{disabled:!e.isSortable,onClick:()=>(e=>{s===e?u(c===$h?Hh:$h):(l(e),u($h))})(e),css:{display:"inline-flex"},children:[is("span",{children:e.name}),os("span",{css:{marginLeft:"0.5rem"},children:[s===e&&c===$h&&is(Rh,{css:{height:"1.25rem",width:"1.25rem"}}),s===e&&c===Hh&&is(Oh,{css:{height:"1.25rem",width:"1.25rem"}}),s!==e&&is("svg",{css:{height:"1.25rem",width:"1.25rem"}})]})]})},e.field)))})}),is("tbody",{css:{"> :not([hidden]) ~ :not([hidden])":{"--tw-divide-y-reverse":"0",borderTopWidth:"calc(1px * calc(1 - var(--tw-divide-y-reverse)))",borderBottomWidth:"calc(1px * var(--tw-divide-y-reverse))","--tw-divide-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-divide-opacity))"},"--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))"},children:p.map(((t,r)=>is("tr",{children:e.columns.map(((e,n)=>is($e,{children:Th(t.id,t[e.field],t,e.type)},`${t[e.field]}-${r}-${n}`)))},`${t[e.columns[0].field]}-${r}`)))})]})})})})})]})})},Uh=[{name:"Profile Id",field:"id",isSortable:!0},{name:"Name",field:"name",isSortable:!0},{name:"Email",field:"email",isSortable:!0},{name:"External Id",field:"externalId",isSortable:!0},{name:"Catch-E Driver Id",field:"catchEId",isSortable:!0}],jh=async e=>{if(!(e instanceof hl))return"Unexpected error occurred";try{return(await e.response.json()).message||`${e.response.status} error occurred`}catch{return`${e.response.status} error occurred`}},Bh=()=>{const[e,t]=Rt(""),[r,n]=Rt(""),{searchProfilesForAccount:i}=Sl(),{data:o,refetch:a,error:s}=pl({queryKey:["searchProfilesForAccount"],queryFn:()=>i(e),enabled:!1,retry:!1});Ot((()=>{e&&a()}),[e,a]),Ot((()=>{s?(async()=>{n(await jh(s))})():n("")}),[s]);return is(Wh,{columns:Uh,data:o||[],title:"Profile Search",subtitle:"Search for a profile using name or email",searchButton:{onClick:e=>{t(e)},text:"Search",error:r}})},zh=e=>({id:e.id,catchEDriverId:e.catchEDriverId,salaryPackagedItems:e.salaryPackagedItems.map((e=>e.catchEContractId)).join(",")}),qh=e=>[{name:"Profile Id",field:"id",isSortable:!0,type:{kind:"copy"}},{name:"Catch-E Driver Id",field:"catchEDriverId",isSortable:!0},{name:"Contracts",field:"salaryPackagedItems",isSortable:!0,type:{kind:"list",navTo:(e,t)=>`${e.id}/contracts/${t}`}},{name:"Actions",field:"menu",isSortable:!1,type:{kind:"menu",items:e}}],Kh=co.div((({isOpen:e})=>e?{display:"block"}:{display:"none"})),Vh=e=>os(Kh,{isOpen:e.isOpen,css:{position:"relative",zIndex:"10"},"aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",children:[is("div",{css:{position:"fixed",inset:"0px",backgroundColor:"rgb(107 114 128 / 0.75)",transitionProperty:"opacity",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms"},"aria-hidden":"true"}),is("div",{css:{position:"fixed",inset:"0px",zIndex:"10",width:"100vw",overflowY:"auto"},children:is("div",{css:{display:"flex",minHeight:"100%",alignItems:"flex-end",justifyContent:"center",padding:"1rem",textAlign:"center","@media (min-width: 640px)":{alignItems:"center",padding:"0px"}},children:os("div",{css:{position:"relative",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",overflow:"hidden",overflowWrap:"break-word",borderRadius:"0.5rem","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",textAlign:"left","--tw-shadow":"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",transitionProperty:"all",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms","@media (min-width: 640px)":{marginTop:"2rem",marginBottom:"2rem",width:"100%",maxWidth:"24rem"}},children:[is("div",{children:e.children}),is("div",{css:{position:"absolute",right:"0px",top:"0px",padding:"0.5rem"},children:is("button",{type:"button",onClick:e.onClose,children:is(Gh,{css:{height:"1.25rem",width:"1.25rem"}})})})]})})})]}),Qh=()=>{const{linkedProfilesForAccount:e,unlinkProfile:t}=Sl(),[r,n]=Rt(""),i=ua(),o=pa(),a=il(),{data:s,error:l}=pl({queryKey:[_l],queryFn:e}),c=It((()=>null==s?void 0:s.map(zh)),[s]),u=[{label:"Unlink",onClick:function(e){const t=il(),[r]=Rt((()=>new rl(t,e)));Ot((()=>{r.setOptions(e)}),[r,e]);const n=Yr(Dt((e=>r.subscribe($s.batchCalls(e))),[r]),(()=>r.getCurrentResult())),i=Dt(((e,t)=>{r.mutate(e,t).catch(cl)}),[r]);if(n.error&&ll(r.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:i,mutateAsync:n.mutate}}({mutationFn:t,onSuccess:()=>{a.invalidateQueries({queryKey:[_l]})},onError:async e=>{n(await jh(e))}}).mutate}];return Ot((()=>{l?(async()=>{n(await jh(l))})():n("")}),[l]),os(ns,{children:[is(Wh,{columns:qh(u),data:c||[],title:"Linked Profiles",subtitle:"Linked profiles for this account",error:r}),is(Vh,{isOpen:null!==o,onClose:()=>i("/profiles"),children:is(Sa,{})})]})},Yh=co.button({marginLeft:"0.75rem",display:"inline-flex",justifyContent:"center",borderRadius:"0.375rem",borderWidth:"1px",borderColor:"transparent","--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(67 56 202 / var(--tw-bg-opacity))"},":focus":{outline:"2px solid transparent",outlineOffset:"2px","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-opacity":"1","--tw-ring-color":"rgb(99 102 241 / var(--tw-ring-opacity))","--tw-ring-offset-width":"2px"},":disabled":{cursor:"not-allowed","--tw-bg-opacity":"1",backgroundColor:"rgb(107 114 128 / var(--tw-bg-opacity))"}}),Xh=co.div({height:"1.25rem",width:"1.25rem","@keyframes spin":{to:{transform:"rotate(360deg)"}},animation:"spin 1s linear infinite",borderRadius:"9999px",borderWidth:"2px",borderColor:"var(--fl-color-primary-600)",borderLeftColor:"transparent",borderTopColor:"transparent"}),Zh=e=>{const[t,r]=Rt(!1);((e,t)=>{const r=Mt();Ot((()=>{r.current=e}),[e]),Ot((()=>{if(t){const e=setInterval(((...e)=>{var t;return null==(t=null==r?void 0:r.current)?void 0:t.call(r,...e)}),t);return()=>clearInterval(e)}}),[t])})((async()=>{await e.onCheck()&&r(!1)}),t?e.checkInterval:void 0),Ot((()=>{if(t){const n=setTimeout((()=>{t&&e.onTimeout(),r(!1)}),e.timeout);return()=>clearTimeout(n)}}));return is(Yh,{onClick:async()=>{r(!0),await e.onClick()||r(!1)},disabled:t,children:t?os(ns,{children:[is(Xh,{}),is("span",{css:{marginLeft:"0.5rem"},children:e.processingText})]}):is(ns,{children:e.text})})},Jh=e=>{var t;const r=ua(),{ingestClient:n,checkProfileSearchAuthorization:i}=Sl(),o=pl({queryKey:[wl],queryFn:i});Ot((()=>{o.error&&e.onError(o.error.message)}),[e,o]),Ot((()=>{var e;"Linked"===(null==(e=o.data)?void 0:e.status)&&r("/")}),[o.data,r]);return os("div",{children:[is("h1",{css:{marginBottom:"1rem",marginLeft:"1rem","--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity))"},children:null==(t=null==o?void 0:o.data)?void 0:t.message}),is(Zh,{onClick:async()=>{try{return await n(),!0}catch(t){return e.onError(await jh(t)),!1}},onCheck:async()=>(await o.refetch(),!1),onTimeout:()=>e.onError("Client sync took too long. Please confirm you have updated Catch-E correctly, refresh the page and try again."),checkInterval:5e3,timeout:3e4,text:"Sync Clients",processingText:"Syncing..."})]})},ef=()=>{const{salaryPackagedItem:e,linkedProfilesForAccount:t}=Sl(),{profileId:r,contractId:n}=function(){let{matches:e}=Gt(ia),t=e[e.length-1];return t?t.params:{}}(),[i,o]=Rt(""),a=pl({queryKey:[_l],queryFn:t}),s=pl({queryKey:[yl,r,n],queryFn:()=>{var t,i,o;return e(r||"",(null==(o=null==(i=null==(t=a.data)?void 0:t.find((e=>e.id===r)))?void 0:i.salaryPackagedItems.find((e=>e.catchEContractId===n)))?void 0:o.itemId)||"")}}),l=It((()=>{var e;return((e,t)=>{var r;return{id:(null==(r=null==e?void 0:e.salaryPackagedItems.find((e=>e.itemId===(null==t?void 0:t.itemId))))?void 0:r.catchEContractId)||"",status:(null==t?void 0:t.status)||"",start:(null==t?void 0:t.details.contractStart)||"",end:(null==t?void 0:t.details.contractEnd)||"",term:(null==t?void 0:t.details.termInMonths)?`${null==t?void 0:t.details.termInMonths} months`:"",vehicle:(null==t?void 0:t.details.vehicle.description)||"",fbtValue:(null==t?void 0:t.details.vehicle.fbtCapitalValue.toString())||""}})(null==(e=a.data)?void 0:e.find((e=>e.id===r)),s.data)}),[a.data,s.data,r]);return Ot((()=>{s.error?(async()=>{o(await jh(s.error))})():o("")}),[s.error]),is(ns,{children:i?is("div",{css:{"--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity))"},children:"errorMessage"}):os("div",{css:{"@media (min-width: 1024px)":{gridColumnStart:"3",gridRowEnd:"1"}},children:[is("h2",{css:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},children:"Summary"}),is("div",{css:{borderRadius:"0.5rem","--tw-bg-opacity":"1",backgroundColor:"rgb(249 250 251 / var(--tw-bg-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","--tw-ring-color":"rgb(17 24 39 / 0.05)"},children:os("dl",{css:{display:"flex",flexWrap:"wrap"},children:[os("div",{css:{flex:"1 1 auto",paddingLeft:"1.5rem",paddingTop:"1.5rem"},children:[is("dt",{css:{fontSize:"0.875rem",lineHeight:"1.5rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"Contract"}),is("dd",{css:{marginTop:"0.25rem",fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:l.id})]}),os("div",{css:{flex:"none",alignSelf:"flex-end",paddingLeft:"1.5rem",paddingRight:"1.5rem",paddingTop:"1rem"},children:[is("dt",{css:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},children:"Status"}),is("dd",{css:{display:"inline-flex",alignItems:"center",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(240 253 244 / var(--tw-bg-opacity))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(21 128 61 / var(--tw-text-opacity))","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-inset":"inset","--tw-ring-color":"rgb(22 163 74 / 0.2)"},children:"active"===l.status?"Active":l.status})]}),is("div",{css:{marginTop:"1.5rem",display:"flex",width:"100%",flex:"none",columnGap:"1rem",borderTopWidth:"1px",borderColor:"rgb(17 24 39 / 0.05)",paddingLeft:"1.5rem",paddingRight:"1.5rem",paddingTop:"1.5rem"},children:os("dl",{css:{"> :not([hidden]) ~ :not([hidden])":{"--tw-divide-y-reverse":"0",borderTopWidth:"calc(1px * calc(1 - var(--tw-divide-y-reverse)))",borderBottomWidth:"calc(1px * var(--tw-divide-y-reverse))","--tw-divide-opacity":"1",borderColor:"rgb(243 244 246 / var(--tw-divide-opacity))"}},children:[os("div",{css:{paddingTop:"1rem",paddingBottom:"1rem","@media (min-width: 640px)":{display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",gap:"1rem"}},children:[is("dt",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"Vehicle"}),is("dd",{css:{marginTop:"0.25rem",fontSize:"0.875rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))","@media (min-width: 640px)":{gridColumn:"span 2 / span 2",marginTop:"0px"}},children:l.vehicle})]}),os("div",{css:{paddingTop:"1rem",paddingBottom:"1rem","@media (min-width: 640px)":{display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",gap:"1rem"}},children:[is("dt",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"FBT Value"}),os("dd",{css:{marginTop:"0.25rem",fontSize:"0.875rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))","@media (min-width: 640px)":{gridColumn:"span 2 / span 2",marginTop:"0px"}},children:["$ ",Number(l.fbtValue).toLocaleString()]})]}),os("div",{css:{paddingTop:"1rem",paddingBottom:"1rem","@media (min-width: 640px)":{display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",gap:"1rem"}},children:[is("dt",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"Period"}),os("dd",{css:{marginTop:"0.25rem",fontSize:"0.875rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))","@media (min-width: 640px)":{gridColumn:"span 2 / span 2",marginTop:"0px"}},children:[new Date(l.start).toLocaleDateString()," to"," ",new Date(l.end).toLocaleDateString()]})]}),os("div",{css:{paddingBottom:"1.25rem",paddingTop:"1rem","@media (min-width: 640px)":{display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",gap:"1rem"}},children:[is("dt",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"Term"}),is("dd",{css:{marginTop:"0.25rem",fontSize:"0.875rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))","@media (min-width: 640px)":{gridColumn:"span 2 / span 2",marginTop:"0px"}},children:l.term})]})]})})]})})]})})},tf=e=>({invoiceRef:e.invoiceRef,postedDate:e.postedDate,status:e.status,amountNet:e.amountNet.toLocaleString(),amountGst:e.amountGst.toLocaleString(),amountReceived:e.amountRecieved.toLocaleString()}),rf=[{name:"Reference",field:"invoiceRef",isSortable:!0},{name:"Posted Date",field:"postedDate",isSortable:!0,type:{kind:"date"}},{name:"Status",field:"status",isSortable:!0,type:{kind:"status"}},{name:"Net",field:"amountNet",isSortable:!0},{name:"Gst",field:"amountGst",isSortable:!0},{name:"Received",field:"amountReceived",isSortable:!0}],nf=()=>{const{invoices:e}=Sl(),[t,r]=Rt(""),{data:n,error:i}=pl({queryKey:[bl],queryFn:e}),o=It((()=>null==n?void 0:n.data.map(tf)),[n]);return Ot((()=>{i?(async()=>{r(await jh(i))})():r("")}),[i]),is(Wh,{columns:rf,data:o||[],title:"Invoices",subtitle:"Posted invoices for this account",error:t})},of=e=>{const[t]=Rt(Qt.create(e.accessToken)),r=It((()=>({account:{accountId:e.accountId},backend:{url:e.backendUrl.replace(/\/?$/,""),accessToken:e.accessToken}})),[e]),[n,i]=Rt(),o=ua();Ot((()=>{t&&!t.isAuthorized&&(i("Access Denied"),o("error"))}),[t,o]);const a=e=>{i(e),o("error")};return is(xl.Provider,{value:r,children:os(Ta,{children:[os(Ea,{path:"",element:is(El,{onError:a}),children:[is(Ea,{index:!0,element:is(ka,{to:"search",replace:!0})}),is(Ea,{path:"search",element:is(Bh,{})}),is(Ea,{path:"profiles",element:is(Qh,{}),children:is(Ea,{path:":profileId/contracts/:contractId",element:is(ef,{})})}),is(Ea,{path:"invoices",element:is(nf,{})})]}),is(Ea,{path:"error",element:n?is("h1",{css:{"--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity))"},children:n}):is(ka,{to:"/search",replace:!0})}),is(Ea,{path:"unlinked",element:is(Jh,{onError:a})}),is(Ea,{path:"*",element:is("h1",{css:{"--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity))"},children:"Page not found"})})]})})},af=no({body:{WebkitTapHighlightColor:"#a855f7",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},":host":{"--fl-color-primary-900":"#000563","--fl-color-primary-800":"#031495","--fl-color-primary-700":"#1033c6","--fl-color-primary-600":"#2e66f7","--fl-color-primary-500":"#5786f8","--fl-color-primary-400":"#88abfa","--fl-color-primary-300":"#b5cbfb","--fl-color-primary-200":"#d6e2fc","--fl-color-primary-100":"#eaf0fe","--fl-color-primary-50":"#f2f6ff","--kit-font-family":"Inter, 'Source Sans Pro', sans-serif",fontFamily:"Inter, 'Source Sans Pro', sans-serif"}}),sf=()=>os($e,{children:[is(ro,{styles:no`
|
|
21
|
+
`;function Dh({title:e,titleId:t,...r},n){return De("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?De("title",{id:t},e):null,De("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const Gh=rr(Dh),Nh=rr((({label:e,id:t,type:r,icon:n,placeholder:i,setPlaceholderOnFocus:o,value:a,className:s,onChange:l,onBlur:c,onEnter:u,error:d,helperText:p,disabled:h,remove:f},m)=>os("div",{className:s,children:[e&&is("label",{htmlFor:t,css:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},children:e}),os("div",{css:{position:"relative",marginTop:"0.5rem"},children:[n&&is("span",{css:{position:"absolute",marginLeft:"0.5rem",marginTop:"0.5rem"},children:n}),os("div",{css:{marginTop:"0.5rem",display:"flex",alignItems:"center"},children:[is(Ih,{type:r,value:a,name:t,id:t,placeholder:i,onChange:e=>{const t=e;t.target instanceof HTMLInputElement&&l(t.target.value.trim())},onBlur:e=>{const t=e;t.target instanceof HTMLInputElement&&c&&c(t.target.value.trim())},onFocus:()=>{i&&o&&!(null==a?void 0:a.trim())&&l(i)},onKeyDown:e=>{"Enter"===e.key&&u&&u()},hasError:!!d,ref:m,disabled:h,prefix:!!n}),f&&os("button",{type:"button",children:[is(Gh,{css:{marginLeft:"0.5rem",height:"1.25rem",width:"1.25rem"},onClick:()=>f()})," "]})]})]}),d&&is("p",{css:{marginTop:"0.5rem",marginBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity))"},children:d}),p&&is("span",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"},children:p})]}))),$h="asc",Hh="desc",Wh=e=>{var t,r;const[n,i]=Rt(""),[o,a]=Rt([]),[s,l]=Rt(e.columns[0]),[c,u]=Rt($h),d=It((()=>s?[...e.data].sort(((e,t)=>{const r=s.sort?s.sort(e[s.field],t[s.field]):e[s.field].localeCompare(t[s.field]);return c===Hh?-1*r:r})):e.data),[e.data,s,c]),p=It((()=>{const t=o.reduce(((e,t)=>e.filter(t.filterFunction)),d);return n&&!e.searchButton?t.filter((e=>e.id.toLowerCase().includes(n.toLowerCase()))):t}),[d,n,o,e.searchButton]),h=It((()=>e.columns.filter((e=>e.filters&&e.filters.length>0)).length>0),[e.columns]),f=()=>{e.searchButton&&e.searchButton.onClick(n)},m=(e,t)=>{const r={name:e.name,filterFunction:r=>e.predicate(r[t.field])},n=o.filter((e=>e.name!==r.name));return()=>n.length<o.length?a([...n]):a([...n,r])};return is(ns,{children:os("div",{css:{paddingLeft:"1rem",paddingRight:"1rem","@media (min-width: 640px)":{paddingLeft:"1.5rem",paddingRight:"1.5rem"},"@media (min-width: 1024px)":{paddingLeft:"2rem",paddingRight:"2rem"}},children:[e.error&&is("div",{css:{marginBottom:"1rem",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(254 242 242 / var(--tw-bg-opacity))",padding:"1rem"},children:os("div",{css:{display:"flex"},children:[is("div",{css:{flexShrink:"0"},children:is(Mh,{css:{height:"1.25rem",width:"1.25rem","--tw-text-opacity":"1",color:"rgb(248 113 113 / var(--tw-text-opacity))"},"aria-hidden":"true"})}),is("div",{css:{marginLeft:"0.75rem"},children:is("h3",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(153 27 27 / var(--tw-text-opacity))"},children:e.error})})]})}),os("div",{css:{"@media (min-width: 640px)":{display:"flex",alignItems:"center"}},children:[os("div",{css:{"@media (min-width: 640px)":{flex:"1 1 auto"}},children:[is("h1",{css:{fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:e.title}),e.subtitle&&is("p",{css:{marginTop:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))"},children:e.subtitle}),os("div",{css:{marginTop:"0.5rem",display:"inline-flex"},children:[is(Nh,{css:{marginTop:"auto",marginBottom:"auto",maxWidth:"20rem"},label:null==(t=e.searchButton)?void 0:t.text,icon:is(wh,{css:{height:"1.25rem",width:"1.25rem","--tw-text-opacity":"1",color:"rgb(156 163 175 / var(--tw-text-opacity))"}}),id:"search",type:"text",error:null==(r=e.searchButton)?void 0:r.error,onChange:e=>i(e),onEnter:f}),e.searchButton&&is("div",{css:{marginLeft:"1rem",marginTop:"0.5rem"},children:is("button",{type:"button",onClick:f,css:{display:"block",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",textAlign:"center",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(99 102 241 / var(--tw-bg-opacity))"},":focus-visible":{outlineStyle:"solid",outlineWidth:"2px",outlineOffset:"2px",outlineColor:"#4f46e5"}},children:e.searchButton.text})})]})]}),e.addButton&&is("div",{css:{marginTop:"1rem","@media (min-width: 640px)":{marginLeft:"4rem",marginTop:"0px",flex:"none"}},children:is("button",{type:"button",onClick:e.addButton.onClick,css:{display:"block",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",textAlign:"center",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(99 102 241 / var(--tw-bg-opacity))"},":focus-visible":{outlineStyle:"solid",outlineWidth:"2px",outlineOffset:"2px",outlineColor:"#4f46e5"}},children:e.addButton.text})})]}),is("div",{css:{marginTop:"2rem",display:"flow-root"},children:is("div",{css:{marginLeft:"-1rem",marginRight:"-1rem",marginTop:"-0.5rem",marginBottom:"-0.5rem",overflowX:"auto","@media (min-width: 640px)":{marginLeft:"-1.5rem",marginRight:"-1.5rem"},"@media (min-width: 1024px)":{marginLeft:"-2rem",marginRight:"-2rem"}},children:is("div",{css:{display:"inline-block",minWidth:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem",verticalAlign:"middle","@media (min-width: 640px)":{paddingLeft:"1.5rem",paddingRight:"1.5rem"},"@media (min-width: 1024px)":{paddingLeft:"2rem",paddingRight:"2rem"}},children:is("div",{css:{overflow:"hidden","--tw-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","--tw-ring-opacity":"0.05","--tw-ring-color":"rgb(0 0 0 / var(--tw-ring-opacity))","@media (min-width: 640px)":{borderRadius:"0.5rem"}},children:os("table",{css:{minWidth:"100%","> :not([hidden]) ~ :not([hidden])":{"--tw-divide-y-reverse":"0",borderTopWidth:"calc(1px * calc(1 - var(--tw-divide-y-reverse)))",borderBottomWidth:"calc(1px * var(--tw-divide-y-reverse))","--tw-divide-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-divide-opacity))"}},children:[h&&is("thead",{children:is("tr",{children:os("td",{css:{padding:"1rem"},colSpan:e.columns.length,children:[is(Fh,{onClick:()=>a([]),isActive:0==o.length,children:"All"}),e.columns.map((e=>{var t;return null==(t=e.filters)?void 0:t.map((t=>is(Fh,{onClick:m(t,e),isActive:!!o.find((e=>e.name===t.name)),children:t.name},t.name)))}))]})})}),is("thead",{css:{"--tw-bg-opacity":"1",backgroundColor:"rgb(249 250 251 / var(--tw-bg-opacity))"},children:is("tr",{children:e.columns.map((e=>is("th",{scope:"col",css:{paddingTop:"0.875rem",paddingBottom:"0.875rem",paddingLeft:"1rem",paddingRight:"0.75rem",textAlign:"left",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:os("button",{disabled:!e.isSortable,onClick:()=>(e=>{s===e?u(c===$h?Hh:$h):(l(e),u($h))})(e),css:{display:"inline-flex"},children:[is("span",{children:e.name}),os("span",{css:{marginLeft:"0.5rem"},children:[s===e&&c===$h&&is(Rh,{css:{height:"1.25rem",width:"1.25rem"}}),s===e&&c===Hh&&is(Oh,{css:{height:"1.25rem",width:"1.25rem"}}),s!==e&&is("svg",{css:{height:"1.25rem",width:"1.25rem"}})]})]})},e.field)))})}),is("tbody",{css:{"> :not([hidden]) ~ :not([hidden])":{"--tw-divide-y-reverse":"0",borderTopWidth:"calc(1px * calc(1 - var(--tw-divide-y-reverse)))",borderBottomWidth:"calc(1px * var(--tw-divide-y-reverse))","--tw-divide-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-divide-opacity))"},"--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))"},children:p.map(((t,r)=>is("tr",{children:e.columns.map(((e,n)=>is($e,{children:Th(t.id,t[e.field],t,e.type)},`${t[e.field]}-${r}-${n}`)))},`${t[e.columns[0].field]}-${r}`)))})]})})})})})]})})},Uh=[{name:"Profile Id",field:"id",isSortable:!0},{name:"Name",field:"name",isSortable:!0},{name:"Email",field:"email",isSortable:!0},{name:"External Id",field:"externalId",isSortable:!0},{name:"Catch-E Driver Id",field:"catchEId",isSortable:!0}],jh=async e=>{if(!(e instanceof hl))return"Unexpected error occurred";try{return(await e.response.json()).message||`${e.response.status} error occurred`}catch{return`${e.response.status} error occurred`}},Bh=()=>{const[e,t]=Rt(""),[r,n]=Rt(""),{searchProfilesForAccount:i}=Sl(),{data:o,refetch:a,error:s}=pl({queryKey:["searchProfilesForAccount"],queryFn:()=>i(e),enabled:!1,retry:!1});Ot((()=>{e&&a()}),[e,a]),Ot((()=>{s?(async()=>{n(await jh(s))})():n("")}),[s]);return is(Wh,{columns:Uh,data:o||[],title:"Profile Search",subtitle:"Search for a profile using name or email",searchButton:{onClick:e=>{t(e)},text:"Search",error:r}})},zh=e=>({id:e.id,catchEDriverId:e.catchEDriverId,salaryPackagedItems:e.salaryPackagedItems.map((e=>e.catchEContractId)).join(",")}),qh=e=>[{name:"Profile Id",field:"id",isSortable:!0,type:{kind:"copy"}},{name:"Catch-E Driver Id",field:"catchEDriverId",isSortable:!0},{name:"Contracts",field:"salaryPackagedItems",isSortable:!0,type:{kind:"list",navTo:(e,t)=>`${e.id}/contracts/${t}`}},{name:"Actions",field:"menu",isSortable:!1,type:{kind:"menu",items:e}}],Kh=co.div((({isOpen:e})=>e?{display:"block"}:{display:"none"})),Vh=e=>os(Kh,{isOpen:e.isOpen,css:{position:"relative",zIndex:"10"},"aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",children:[is("div",{css:{position:"fixed",inset:"0px",backgroundColor:"rgb(107 114 128 / 0.75)",transitionProperty:"opacity",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms"},"aria-hidden":"true"}),is("div",{css:{position:"fixed",inset:"0px",zIndex:"10",width:"100vw",overflowY:"auto"},children:is("div",{css:{display:"flex",minHeight:"100%",alignItems:"flex-end",justifyContent:"center",padding:"1rem",textAlign:"center","@media (min-width: 640px)":{alignItems:"center",padding:"0px"}},children:os("div",{css:{position:"relative",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",overflow:"hidden",overflowWrap:"break-word",borderRadius:"0.5rem","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",textAlign:"left","--tw-shadow":"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",transitionProperty:"all",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms","@media (min-width: 640px)":{marginTop:"2rem",marginBottom:"2rem",width:"100%",maxWidth:"24rem"}},children:[is("div",{children:e.children}),is("div",{css:{position:"absolute",right:"0px",top:"0px",padding:"0.5rem"},children:is("button",{type:"button",onClick:e.onClose,children:is(Gh,{css:{height:"1.25rem",width:"1.25rem"}})})})]})})})]}),Qh=()=>{const{linkedProfilesForAccount:e,unlinkProfile:t}=Sl(),[r,n]=Rt(""),i=ua(),o=pa(),a=il(),{data:s,error:l}=pl({queryKey:[_l],queryFn:e}),c=It((()=>null==s?void 0:s.map(zh)),[s]),u=[{label:"Unlink",onClick:function(e){const t=il(),[r]=Rt((()=>new rl(t,e)));Ot((()=>{r.setOptions(e)}),[r,e]);const n=Yr(Dt((e=>r.subscribe($s.batchCalls(e))),[r]),(()=>r.getCurrentResult())),i=Dt(((e,t)=>{r.mutate(e,t).catch(cl)}),[r]);if(n.error&&ll(r.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:i,mutateAsync:n.mutate}}({mutationFn:t,onSuccess:()=>{a.invalidateQueries({queryKey:[_l]})},onError:async e=>{n(await jh(e))}}).mutate}];return Ot((()=>{l?(async()=>{n(await jh(l))})():n("")}),[l]),os(ns,{children:[is(Wh,{columns:qh(u),data:c||[],title:"Linked Profiles",subtitle:"Linked profiles for this account",error:r}),is(Vh,{isOpen:null!==o,onClose:()=>i("/profiles"),children:is(Sa,{})})]})},Yh=co.button({marginLeft:"0.75rem",display:"inline-flex",justifyContent:"center",borderRadius:"0.375rem",borderWidth:"1px",borderColor:"transparent","--tw-bg-opacity":"1",backgroundColor:"rgb(79 70 229 / var(--tw-bg-opacity))",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(67 56 202 / var(--tw-bg-opacity))"},":focus":{outline:"2px solid transparent",outlineOffset:"2px","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-opacity":"1","--tw-ring-color":"rgb(99 102 241 / var(--tw-ring-opacity))","--tw-ring-offset-width":"2px"},":disabled":{cursor:"not-allowed","--tw-bg-opacity":"1",backgroundColor:"rgb(107 114 128 / var(--tw-bg-opacity))"}}),Xh=co.div({height:"1.25rem",width:"1.25rem","@keyframes spin":{to:{transform:"rotate(360deg)"}},animation:"spin 1s linear infinite",borderRadius:"9999px",borderWidth:"2px",borderColor:"var(--fl-color-primary-600)",borderLeftColor:"transparent",borderTopColor:"transparent"}),Zh=e=>{const[t,r]=Rt(!1);((e,t)=>{const r=Mt();Ot((()=>{r.current=e}),[e]),Ot((()=>{if(t){const e=setInterval(((...e)=>{var t;return null==(t=null==r?void 0:r.current)?void 0:t.call(r,...e)}),t);return()=>clearInterval(e)}}),[t])})((async()=>{await e.onCheck()&&r(!1)}),t?e.checkInterval:void 0),Ot((()=>{if(t){const n=setTimeout((()=>{t&&e.onTimeout(),r(!1)}),e.timeout);return()=>clearTimeout(n)}}));return is(Yh,{onClick:async()=>{r(!0),await e.onClick()||r(!1)},disabled:t,children:t?os(ns,{children:[is(Xh,{}),is("span",{css:{marginLeft:"0.5rem"},children:e.processingText})]}):is(ns,{children:e.text})})},Jh=e=>{var t;const r=ua(),{ingestClient:n,checkProfileSearchAuthorization:i}=Sl(),o=pl({queryKey:[wl],queryFn:i});Ot((()=>{o.error&&e.onError(o.error.message)}),[e,o]),Ot((()=>{var e;"Linked"===(null==(e=o.data)?void 0:e.status)&&r("/")}),[o.data,r]);return os("div",{children:[is("h1",{css:{marginBottom:"1rem",marginLeft:"1rem","--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity))"},children:null==(t=null==o?void 0:o.data)?void 0:t.message}),is(Zh,{onClick:async()=>{try{return await n(),!0}catch(t){return e.onError(await jh(t)),!1}},onCheck:async()=>(await o.refetch(),!1),onTimeout:()=>e.onError("Client sync took too long. Please confirm you have updated Catch-E correctly, refresh the page and try again."),checkInterval:5e3,timeout:3e4,text:"Sync Clients",processingText:"Syncing..."})]})},ef=()=>{const{salaryPackagedItem:e,linkedProfilesForAccount:t}=Sl(),{profileId:r,contractId:n}=function(){let{matches:e}=Gt(ia),t=e[e.length-1];return t?t.params:{}}(),[i,o]=Rt(""),a=pl({queryKey:[_l],queryFn:t}),s=pl({queryKey:[yl,r,n],queryFn:()=>{var t,i,o;return e(r||"",(null==(o=null==(i=null==(t=a.data)?void 0:t.find((e=>e.id===r)))?void 0:i.salaryPackagedItems.find((e=>e.catchEContractId===n)))?void 0:o.itemId)||"")}}),l=It((()=>{var e;return((e,t)=>{var r;return{id:(null==(r=null==e?void 0:e.salaryPackagedItems.find((e=>e.itemId===(null==t?void 0:t.itemId))))?void 0:r.catchEContractId)||"",status:(null==t?void 0:t.status)||"",start:(null==t?void 0:t.details.contractStart)||"",end:(null==t?void 0:t.details.contractEnd)||"",term:(null==t?void 0:t.details.termInMonths)?`${null==t?void 0:t.details.termInMonths} months`:"",vehicle:(null==t?void 0:t.details.vehicle.description)||"",fbtValue:(null==t?void 0:t.details.vehicle.fbtCapitalValue.toString())||""}})(null==(e=a.data)?void 0:e.find((e=>e.id===r)),s.data)}),[a.data,s.data,r]);return Ot((()=>{s.error?(async()=>{o(await jh(s.error))})():o("")}),[s.error]),is(ns,{children:i?is("div",{css:{"--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity))"},children:"errorMessage"}):os("div",{css:{"@media (min-width: 1024px)":{gridColumnStart:"3",gridRowEnd:"1"}},children:[is("h2",{css:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},children:"Summary"}),is("div",{css:{borderRadius:"0.5rem","--tw-bg-opacity":"1",backgroundColor:"rgb(249 250 251 / var(--tw-bg-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","--tw-ring-color":"rgb(17 24 39 / 0.05)"},children:os("dl",{css:{display:"flex",flexWrap:"wrap"},children:[os("div",{css:{flex:"1 1 auto",paddingLeft:"1.5rem",paddingTop:"1.5rem"},children:[is("dt",{css:{fontSize:"0.875rem",lineHeight:"1.5rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"Contract"}),is("dd",{css:{marginTop:"0.25rem",fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:l.id})]}),os("div",{css:{flex:"none",alignSelf:"flex-end",paddingLeft:"1.5rem",paddingRight:"1.5rem",paddingTop:"1rem"},children:[is("dt",{css:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},children:"Status"}),is("dd",{css:{display:"inline-flex",alignItems:"center",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(240 253 244 / var(--tw-bg-opacity))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(21 128 61 / var(--tw-text-opacity))","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)","--tw-ring-inset":"inset","--tw-ring-color":"rgb(22 163 74 / 0.2)"},children:"active"===l.status?"Active":l.status})]}),is("div",{css:{marginTop:"1.5rem",display:"flex",width:"100%",flex:"none",columnGap:"1rem",borderTopWidth:"1px",borderColor:"rgb(17 24 39 / 0.05)",paddingLeft:"1.5rem",paddingRight:"1.5rem",paddingTop:"1.5rem"},children:os("dl",{css:{"> :not([hidden]) ~ :not([hidden])":{"--tw-divide-y-reverse":"0",borderTopWidth:"calc(1px * calc(1 - var(--tw-divide-y-reverse)))",borderBottomWidth:"calc(1px * var(--tw-divide-y-reverse))","--tw-divide-opacity":"1",borderColor:"rgb(243 244 246 / var(--tw-divide-opacity))"}},children:[os("div",{css:{paddingTop:"1rem",paddingBottom:"1rem","@media (min-width: 640px)":{display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",gap:"1rem"}},children:[is("dt",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"Vehicle"}),is("dd",{css:{marginTop:"0.25rem",fontSize:"0.875rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))","@media (min-width: 640px)":{gridColumn:"span 2 / span 2",marginTop:"0px"}},children:l.vehicle})]}),os("div",{css:{paddingTop:"1rem",paddingBottom:"1rem","@media (min-width: 640px)":{display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",gap:"1rem"}},children:[is("dt",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"FBT Value"}),os("dd",{css:{marginTop:"0.25rem",fontSize:"0.875rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))","@media (min-width: 640px)":{gridColumn:"span 2 / span 2",marginTop:"0px"}},children:["$ ",Number(l.fbtValue).toLocaleString()]})]}),os("div",{css:{paddingTop:"1rem",paddingBottom:"1rem","@media (min-width: 640px)":{display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",gap:"1rem"}},children:[is("dt",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"Period"}),os("dd",{css:{marginTop:"0.25rem",fontSize:"0.875rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))","@media (min-width: 640px)":{gridColumn:"span 2 / span 2",marginTop:"0px"}},children:[new Date(l.start).toLocaleDateString()," to"," ",new Date(l.end).toLocaleDateString()]})]}),os("div",{css:{paddingBottom:"1.25rem",paddingTop:"1rem","@media (min-width: 640px)":{display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",gap:"1rem"}},children:[is("dt",{css:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"},children:"Term"}),is("dd",{css:{marginTop:"0.25rem",fontSize:"0.875rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(55 65 81 / var(--tw-text-opacity))","@media (min-width: 640px)":{gridColumn:"span 2 / span 2",marginTop:"0px"}},children:l.term})]})]})})]})})]})})},tf=e=>({invoiceRef:e.invoiceRef,postedDate:e.postedDate,status:e.status,amountNet:e.amountNet.toLocaleString(),amountGst:e.amountGst.toLocaleString(),amountReceived:e.amountRecieved.toLocaleString()}),rf=[{name:"Reference",field:"invoiceRef",isSortable:!0},{name:"Posted Date",field:"postedDate",isSortable:!0,type:{kind:"date"}},{name:"Status",field:"status",isSortable:!0,type:{kind:"status"}},{name:"Net",field:"amountNet",isSortable:!0},{name:"Gst",field:"amountGst",isSortable:!0},{name:"Received",field:"amountReceived",isSortable:!0}],nf=()=>{const{data:e,error:t}=(()=>{const{invoices:e}=Sl(),[t,r]=Rt(""),n=pl({queryKey:[bl],queryFn:e}),i=It((()=>{var e;return null==(e=n.data)?void 0:e.data.map(tf)}),[n]);return Ot((()=>{n.isError?r(n.error.message):r("")}),[n]),{data:i,error:t}})();return is(Wh,{columns:rf,data:e||[],title:"Invoices",subtitle:"Posted invoices for this account",error:t})},of=e=>{const[t]=Rt(Qt.create(e.accessToken)),r=It((()=>({account:{accountId:e.accountId},backend:{url:e.backendUrl.replace(/\/?$/,""),accessToken:e.accessToken}})),[e]),[n,i]=Rt(),o=ua();Ot((()=>{t&&!t.isAuthorized&&(i("Access Denied"),o("error"))}),[t,o]);const a=e=>{i(e),o("error")};return is(xl.Provider,{value:r,children:os(Ta,{children:[os(Ea,{path:"",element:is(El,{onError:a}),children:[is(Ea,{index:!0,element:is(ka,{to:"search",replace:!0})}),is(Ea,{path:"search",element:is(Bh,{})}),is(Ea,{path:"profiles",element:is(Qh,{}),children:is(Ea,{path:":profileId/contracts/:contractId",element:is(ef,{})})}),is(Ea,{path:"invoices",element:is(nf,{})})]}),is(Ea,{path:"error",element:n?is("h1",{css:{"--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity))"},children:n}):is(ka,{to:"/search",replace:!0})}),is(Ea,{path:"unlinked",element:is(Jh,{onError:a})}),is(Ea,{path:"*",element:is("h1",{css:{"--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity))"},children:"Page not found"})})]})})},af=no({body:{WebkitTapHighlightColor:"#a855f7",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},":host":{"--fl-color-primary-900":"#000563","--fl-color-primary-800":"#031495","--fl-color-primary-700":"#1033c6","--fl-color-primary-600":"#2e66f7","--fl-color-primary-500":"#5786f8","--fl-color-primary-400":"#88abfa","--fl-color-primary-300":"#b5cbfb","--fl-color-primary-200":"#d6e2fc","--fl-color-primary-100":"#eaf0fe","--fl-color-primary-50":"#f2f6ff","--kit-font-family":"Inter, 'Source Sans Pro', sans-serif",fontFamily:"Inter, 'Source Sans Pro', sans-serif"}}),sf=()=>os($e,{children:[is(ro,{styles:no`
|
|
22
22
|
${{"*, ::before, ::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"#e5e7eb","--tw-border-spacing-x":"0","--tw-border-spacing-y":"0","--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-scroll-snap-strictness":"proximity","--tw-gradient-from-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-gradient-via-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-gradient-to-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"0px","--tw-ring-offset-color":"#fff","--tw-ring-color":"rgb(59 130 246 / 0.5)","--tw-blur":"var(--tw-empty,/*!*/ /*!*/)","--tw-brightness":"var(--tw-empty,/*!*/ /*!*/)","--tw-contrast":"var(--tw-empty,/*!*/ /*!*/)","--tw-grayscale":"var(--tw-empty,/*!*/ /*!*/)","--tw-hue-rotate":"var(--tw-empty,/*!*/ /*!*/)","--tw-invert":"var(--tw-empty,/*!*/ /*!*/)","--tw-saturate":"var(--tw-empty,/*!*/ /*!*/)","--tw-sepia":"var(--tw-empty,/*!*/ /*!*/)","--tw-drop-shadow":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-blur":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-brightness":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-contrast":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-grayscale":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-hue-rotate":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-invert":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-opacity":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-saturate":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-sepia":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-size":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-layout":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-paint":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-style":"var(--tw-empty,/*!*/ /*!*/)"},"::before, ::after":{"--tw-content":"''"},"html, :host":{lineHeight:"1.5",WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:"4",fontFamily:'Inter, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',fontFeatureSettings:" normal",fontVariationSettings:" normal",WebkitTapHighlightColor:"transparent"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1, h2, h3, h4, h5, h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b, strong":{fontWeight:"bolder"},"code, kbd, samp, pre":{fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',fontFeatureSettings:" normal",fontVariationSettings:" normal",fontSize:"1em"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:"0",position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button, input, optgroup, select, textarea":{fontFamily:"inherit",fontFeatureSettings:"inherit",fontVariationSettings:"inherit",fontSize:"100%",fontWeight:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:"inherit",margin:"0",padding:"0"},"button, select":{textTransform:"none"},"button, input:where([type='button']), input:where([type='reset']), input:where([type='submit'])":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button, ::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol, ul, menu":{listStyle:"none",margin:"0",padding:"0"},dialog:{padding:"0"},textarea:{resize:"vertical"},"input::placeholder, textarea::placeholder":{opacity:"1",color:"#9ca3af"},'button, [role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img, svg, video, canvas, audio, iframe, embed, object":{display:"block",verticalAlign:"middle"},"img, video":{maxWidth:"100%",height:"auto"},'[hidden]:where(:not([hidden="until-found"]))':{display:"none"},"::backdrop":{"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0","--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-scroll-snap-strictness":"proximity","--tw-gradient-from-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-gradient-via-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-gradient-to-position":"var(--tw-empty,/*!*/ /*!*/)","--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"0px","--tw-ring-offset-color":"#fff","--tw-ring-color":"rgb(59 130 246 / 0.5)","--tw-blur":"var(--tw-empty,/*!*/ /*!*/)","--tw-brightness":"var(--tw-empty,/*!*/ /*!*/)","--tw-contrast":"var(--tw-empty,/*!*/ /*!*/)","--tw-grayscale":"var(--tw-empty,/*!*/ /*!*/)","--tw-hue-rotate":"var(--tw-empty,/*!*/ /*!*/)","--tw-invert":"var(--tw-empty,/*!*/ /*!*/)","--tw-saturate":"var(--tw-empty,/*!*/ /*!*/)","--tw-sepia":"var(--tw-empty,/*!*/ /*!*/)","--tw-drop-shadow":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-blur":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-brightness":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-contrast":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-grayscale":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-hue-rotate":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-invert":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-opacity":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-saturate":"var(--tw-empty,/*!*/ /*!*/)","--tw-backdrop-sepia":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-size":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-layout":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-paint":"var(--tw-empty,/*!*/ /*!*/)","--tw-contain-style":"var(--tw-empty,/*!*/ /*!*/)"},"[type='text'],input:where(:not([type])),[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select":{appearance:"none",backgroundColor:"#fff",borderColor:"#6b7280",borderWidth:"1px",borderRadius:"0px",paddingTop:"0.5rem",paddingRight:"0.75rem",paddingBottom:"0.5rem",paddingLeft:"0.75rem",fontSize:"1rem",lineHeight:"1.5rem","--tw-shadow":"0 0 #0000"},"[type='text']:focus, input:where(:not([type])):focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus":{outline:"2px solid transparent",outlineOffset:"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"0px","--tw-ring-offset-color":"#fff","--tw-ring-color":"#2563eb","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)",borderColor:"#2563eb"},"input::placeholder,textarea::placeholder":{color:"#6b7280",opacity:"1"},"::-webkit-datetime-edit-fields-wrapper":{padding:"0"},"::-webkit-date-and-time-value":{minHeight:"1.5em",textAlign:"inherit"},"::-webkit-datetime-edit":{display:"inline-flex"},"::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field":{paddingTop:"0",paddingBottom:"0"},select:{backgroundImage:"url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\")",backgroundPosition:"right 0.5rem center",backgroundRepeat:"no-repeat",backgroundSize:"1.5em 1.5em",paddingRight:"2.5rem",printColorAdjust:"exact"},'[multiple],[size]:where(select:not([size="1"]))':{backgroundImage:"initial",backgroundPosition:"initial",backgroundRepeat:"unset",backgroundSize:"initial",paddingRight:"0.75rem",printColorAdjust:"unset"},"[type='checkbox'],[type='radio']":{appearance:"none",padding:"0",printColorAdjust:"exact",display:"inline-block",verticalAlign:"middle",backgroundOrigin:"border-box",userSelect:"none",flexShrink:"0",height:"1rem",width:"1rem",color:"#2563eb",backgroundColor:"#fff",borderColor:"#6b7280",borderWidth:"1px","--tw-shadow":"0 0 #0000"},"[type='checkbox']":{borderRadius:"0px"},"[type='radio']":{borderRadius:"100%"},"[type='checkbox']:focus,[type='radio']:focus":{outline:"2px solid transparent",outlineOffset:"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"2px","--tw-ring-offset-color":"#fff","--tw-ring-color":"#2563eb","--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)",boxShadow:"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)"},"[type='checkbox']:checked,[type='radio']:checked":{borderColor:"transparent",backgroundColor:"currentColor",backgroundSize:"100% 100%",backgroundPosition:"center",backgroundRepeat:"no-repeat"},"[type='checkbox']:checked":{backgroundImage:"url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e\")"},"@media (forced-colors: active)":{"[type='checkbox']:checked":{appearance:"auto"},"[type='radio']:checked":{appearance:"auto"},"[type='checkbox']:indeterminate":{appearance:"auto"}},"[type='radio']:checked":{backgroundImage:"url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e\")"},"[type='checkbox']:checked:hover,[type='checkbox']:checked:focus,[type='radio']:checked:hover,[type='radio']:checked:focus":{borderColor:"transparent",backgroundColor:"currentColor"},"[type='checkbox']:indeterminate":{backgroundImage:"url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e\")",borderColor:"transparent",backgroundColor:"currentColor",backgroundSize:"100% 100%",backgroundPosition:"center",backgroundRepeat:"no-repeat"},"[type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus":{borderColor:"transparent",backgroundColor:"currentColor"},"[type='file']":{background:"unset",borderColor:"inherit",borderWidth:"0",borderRadius:"0",padding:"0",fontSize:"unset",lineHeight:"inherit"},"[type='file']:focus":{outline:"1px auto -webkit-focus-ring-color"}}}
|
|
23
23
|
`}),is(ro,{styles:af})]}),lf="/salary-packaging-configuration",cf=()=>{const e=window.location.hash.split("#").pop()||"",t=e.lastIndexOf(lf);return t>-1?e.substring(0,t+31):"/"};!function(e,t,r,n){function i(){var t=Reflect.construct(HTMLElement,[],i);return t._vdomComponent=e,t._root=n&&n.shadow?t.attachShadow({mode:n.mode||"open"}):t,t}(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=ut,i.prototype.attributeChangedCallback=pt,i.prototype.disconnectedCallback=ht,r=r||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=r,r.forEach((function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var r=typeof t;null!=t&&"string"!==r&&"boolean"!==r&&"number"!==r||this.setAttribute(e,t)}})})),customElements.define(t,i)}((e=>{const t=Mt(null),{EmotionProvider:r}=((e,t)=>{const[r,n]=Rt();return Ot((()=>{const r=e=>{t&&t.current?e():requestAnimationFrame((()=>r(e)))};r((()=>{n(ii({container:t.current,key:e}))}))}),[e,t]),{EmotionProvider:({children:e})=>r?is(Vi,{value:r,children:e}):is(ns,{})}})("superhero-salpac-profile-admin",t);return os(ns,{children:[is("head",{ref:t}),os(r,{children:[is(sf,{}),is(ol,{client:gl(),children:is(Va,{basename:cf(),children:is("body",{children:is(of,{backendUrl:e.backendUrl||"",accessToken:e.accessToken||"",accountId:e.accountId||""})})})})]})]})}),"superhero-salpac-profile-admin",["backend-url","access-token","account-id"],{shadow:!0})}();
|