@xtandard/permissions 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/dist/{better-auth-NO40ZqSM.mjs → better-auth-BEmX8qyz.mjs} +28 -8
- package/dist/better-auth-BEmX8qyz.mjs.map +1 -0
- package/dist/{better-auth-Bp9YVyQa.d.cts → better-auth-DQET1sXa.d.mts} +24 -5
- package/dist/{better-auth-DHyW5-yt.cjs → better-auth-MR7dBtpo.cjs} +28 -8
- package/dist/better-auth-MR7dBtpo.cjs.map +1 -0
- package/dist/{better-auth-NSXgt6ZU.d.mts → better-auth-vgRYgjYK.d.cts} +24 -5
- package/dist/cli.cjs +12 -6
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +12 -6
- package/dist/cli.mjs.map +1 -1
- package/dist/{contract-BMiOmg2f.d.cts → contract-BAisPHBw.d.cts} +30 -2
- package/dist/{contract-Yc5AZuvv.mjs → contract-BganM0fx.mjs} +34 -2
- package/dist/contract-BganM0fx.mjs.map +1 -0
- package/dist/{contract-CPmJVoRx.cjs → contract-Brnu9XXo.cjs} +45 -1
- package/dist/contract-Brnu9XXo.cjs.map +1 -0
- package/dist/{contract-Dk6d2ylD.d.cts → contract-CXPMGuHk.d.cts} +18 -2
- package/dist/{contract-D32H1t0u.d.mts → contract-D6j-yrBL.d.mts} +30 -2
- package/dist/{contract-DUzgB-He.d.mts → contract-DhS23Pcp.d.mts} +18 -2
- package/dist/{create-fetch-handler-ojjpk1Iw.mjs → create-fetch-handler-B0twltQL.mjs} +43 -6
- package/dist/create-fetch-handler-B0twltQL.mjs.map +1 -0
- package/dist/{create-fetch-handler-BHDU4chu.d.mts → create-fetch-handler-B711wb64.d.mts} +4 -4
- package/dist/{create-fetch-handler-C-WyaRCR.cjs → create-fetch-handler-BHT4vSZs.cjs} +43 -6
- package/dist/create-fetch-handler-BHT4vSZs.cjs.map +1 -0
- package/dist/{create-fetch-handler-BtX64_rS.d.cts → create-fetch-handler-DxhvXuBA.d.cts} +4 -4
- package/dist/{elysia-shared-BUTFTeal.cjs → elysia-shared-BFcWzfc9.cjs} +3 -3
- package/dist/{elysia-shared-BUTFTeal.cjs.map → elysia-shared-BFcWzfc9.cjs.map} +1 -1
- package/dist/{elysia-shared-BM6cPoCU.mjs → elysia-shared-BwUYg0Ln.mjs} +3 -3
- package/dist/{elysia-shared-BM6cPoCU.mjs.map → elysia-shared-BwUYg0Ln.mjs.map} +1 -1
- package/dist/{elysia-shared-DtKViycb.d.cts → elysia-shared-C2LnDOj3.d.cts} +5 -5
- package/dist/{elysia-shared-g8zsb_pU.d.mts → elysia-shared-WuDr0jco.d.mts} +5 -5
- package/dist/{engine-bMoz3iW-.cjs → engine--C7zo-4M.cjs} +93 -13
- package/dist/engine--C7zo-4M.cjs.map +1 -0
- package/dist/{engine-CGGVDCqi.d.cts → engine-BTgwbHeO.d.cts} +49 -9
- package/dist/{engine-DpFIcbgh.d.mts → engine-C3xHfi3q.d.mts} +49 -9
- package/dist/{engine-Bufv0TbD.mjs → engine-CR75K253.mjs} +93 -13
- package/dist/engine-CR75K253.mjs.map +1 -0
- package/dist/entry-auth-better-auth.cjs +6 -3
- package/dist/entry-auth-better-auth.d.cts +4 -4
- package/dist/entry-auth-better-auth.d.mts +4 -4
- package/dist/entry-auth-better-auth.mjs +4 -4
- package/dist/entry-auth-jwt.cjs +6 -2
- package/dist/entry-auth-jwt.cjs.map +1 -1
- package/dist/entry-auth-jwt.d.cts +9 -3
- package/dist/entry-auth-jwt.d.mts +9 -3
- package/dist/entry-auth-jwt.mjs +4 -3
- package/dist/entry-auth-jwt.mjs.map +1 -1
- package/dist/entry-auth-session.cjs +6 -2
- package/dist/entry-auth-session.cjs.map +1 -1
- package/dist/entry-auth-session.d.cts +8 -3
- package/dist/entry-auth-session.d.mts +8 -3
- package/dist/entry-auth-session.mjs +4 -3
- package/dist/entry-auth-session.mjs.map +1 -1
- package/dist/entry-authorization-permissions.cjs +1 -1
- package/dist/entry-authorization-permissions.d.cts +1 -1
- package/dist/entry-authorization-permissions.d.mts +1 -1
- package/dist/entry-authorization-permissions.mjs +1 -1
- package/dist/entry-better-auth-client.d.cts +2 -2
- package/dist/entry-better-auth-client.d.mts +2 -2
- package/dist/entry-better-auth.cjs +1 -1
- package/dist/entry-better-auth.d.cts +2 -2
- package/dist/entry-better-auth.d.mts +2 -2
- package/dist/entry-better-auth.mjs +1 -1
- package/dist/entry-bridges-audit.d.cts +1 -1
- package/dist/entry-bridges-audit.d.mts +1 -1
- package/dist/entry-bridges-webhooks.d.cts +1 -1
- package/dist/entry-bridges-webhooks.d.mts +1 -1
- package/dist/entry-bun.cjs +2 -2
- package/dist/entry-bun.d.cts +4 -4
- package/dist/entry-bun.d.mts +4 -4
- package/dist/entry-bun.mjs +2 -2
- package/dist/entry-elysia.cjs +1 -1
- package/dist/entry-elysia.d.cts +4 -4
- package/dist/entry-elysia.d.mts +4 -4
- package/dist/entry-elysia.mjs +1 -1
- package/dist/entry-elysia2.cjs +1 -1
- package/dist/entry-elysia2.d.cts +4 -4
- package/dist/entry-elysia2.d.mts +4 -4
- package/dist/entry-elysia2.mjs +1 -1
- package/dist/entry-express.cjs +2 -2
- package/dist/entry-express.d.cts +4 -4
- package/dist/entry-express.d.mts +4 -4
- package/dist/entry-express.mjs +2 -2
- package/dist/entry-hono.cjs +2 -2
- package/dist/entry-hono.d.cts +4 -4
- package/dist/entry-hono.d.mts +4 -4
- package/dist/entry-hono.mjs +2 -2
- package/dist/entry-hooks-log.d.cts +1 -1
- package/dist/entry-hooks-log.d.mts +1 -1
- package/dist/entry-next.cjs +2 -2
- package/dist/entry-next.d.cts +5 -5
- package/dist/entry-next.d.mts +5 -5
- package/dist/entry-next.mjs +2 -2
- package/dist/entry-react.d.cts +2 -2
- package/dist/entry-react.d.mts +2 -2
- package/dist/{errors-bL3XQLfE.mjs → errors-CG_OLEEv.mjs} +12 -2
- package/dist/errors-CG_OLEEv.mjs.map +1 -0
- package/dist/{errors-vVYic8gz.cjs → errors-CjpymzFj.cjs} +17 -1
- package/dist/errors-CjpymzFj.cjs.map +1 -0
- package/dist/{guard-BOx5cnMP.mjs → guard-Bj8zk23F.mjs} +2 -2
- package/dist/{guard-BOx5cnMP.mjs.map → guard-Bj8zk23F.mjs.map} +1 -1
- package/dist/{guard-nwdOYe90.cjs → guard-DvaoUgjk.cjs} +2 -2
- package/dist/{guard-nwdOYe90.cjs.map → guard-DvaoUgjk.cjs.map} +1 -1
- package/dist/{guard-C3o7V14m.d.cts → guard-VEK0W8ug.d.cts} +4 -4
- package/dist/{guard-DCbTnqPz.d.mts → guard-k7A71SWC.d.mts} +4 -4
- package/dist/index.cjs +9 -6
- package/dist/index.d.cts +28 -10
- package/dist/index.d.mts +28 -10
- package/dist/index.mjs +7 -7
- package/dist/{kit-DMVBLBI9.d.mts → kit-51JtMxsn.d.mts} +8 -3
- package/dist/{kit-fzXHYb1l.mjs → kit-BM3uosfV.mjs} +23 -8
- package/dist/kit-BM3uosfV.mjs.map +1 -0
- package/dist/{kit-C7tepDB2.cjs → kit-BrqnCcDw.cjs} +28 -7
- package/dist/kit-BrqnCcDw.cjs.map +1 -0
- package/dist/{kit-qAROuhOI.d.cts → kit-DLF7DZrp.d.cts} +8 -3
- package/dist/{permissions-C9PjftY6.mjs → permissions-CeV6M3v7.mjs} +6 -3
- package/dist/permissions-CeV6M3v7.mjs.map +1 -0
- package/dist/{permissions-Cxri_P_k.cjs → permissions-DDEkHNvN.cjs} +6 -3
- package/dist/permissions-DDEkHNvN.cjs.map +1 -0
- package/dist/react-embed.js +1880 -1855
- package/dist/relationships-BLYEJ9tc.cjs.map +1 -1
- package/dist/relationships-BfLonEMI.mjs.map +1 -1
- package/dist/{routes-irNuuZqo.cjs → routes-B2LrYpT0.cjs} +15 -9
- package/dist/routes-B2LrYpT0.cjs.map +1 -0
- package/dist/{routes-DtRb3EO0.mjs → routes-Cx-kl4PY.mjs} +15 -9
- package/dist/routes-Cx-kl4PY.mjs.map +1 -0
- package/dist/{server-CJ7AIJpO.d.mts → server-Bn643UOy.d.mts} +4 -4
- package/dist/{server-C2F4H6bR.d.cts → server-YdH25OEA.d.cts} +4 -4
- package/dist/testing.cjs +1 -1
- package/dist/testing.d.cts +2 -2
- package/dist/testing.d.mts +2 -2
- package/dist/testing.mjs +1 -1
- package/dist/types-elysia2/auth-provider/contract.d.ts +28 -0
- package/dist/types-elysia2/auth-provider/kit.d.ts +5 -0
- package/dist/types-elysia2/engine.d.ts +49 -8
- package/dist/types-elysia2/errors.d.ts +8 -0
- package/dist/types-elysia2/schema.d.ts +16 -0
- package/dist/types-elysia2/server/routes.d.ts +16 -5
- package/dist/types-react/engine.d.ts +49 -8
- package/dist/types-react/errors.d.ts +8 -0
- package/dist/types-react/schema.d.ts +16 -0
- package/dist/types-react/ui/App.d.ts +6 -1
- package/dist/types-react/ui/components/perm-bits.d.ts +5 -1
- package/dist/types-react/ui/types.d.ts +11 -2
- package/dist/ui/assets/index-DdvxpphI.js +104 -0
- package/dist/ui/index.html +1 -1
- package/package.json +1 -1
- package/dist/better-auth-DHyW5-yt.cjs.map +0 -1
- package/dist/better-auth-NO40ZqSM.mjs.map +0 -1
- package/dist/contract-CPmJVoRx.cjs.map +0 -1
- package/dist/contract-Yc5AZuvv.mjs.map +0 -1
- package/dist/create-fetch-handler-C-WyaRCR.cjs.map +0 -1
- package/dist/create-fetch-handler-ojjpk1Iw.mjs.map +0 -1
- package/dist/engine-Bufv0TbD.mjs.map +0 -1
- package/dist/engine-bMoz3iW-.cjs.map +0 -1
- package/dist/errors-bL3XQLfE.mjs.map +0 -1
- package/dist/errors-vVYic8gz.cjs.map +0 -1
- package/dist/kit-C7tepDB2.cjs.map +0 -1
- package/dist/kit-fzXHYb1l.mjs.map +0 -1
- package/dist/permissions-C9PjftY6.mjs.map +0 -1
- package/dist/permissions-Cxri_P_k.cjs.map +0 -1
- package/dist/routes-DtRb3EO0.mjs.map +0 -1
- package/dist/routes-irNuuZqo.cjs.map +0 -1
- package/dist/ui/assets/index-uXGOtyuj.js +0 -104
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
var zT=Object.defineProperty;var r0=n=>{throw TypeError(n)};var DT=(n,i,s)=>i in n?zT(n,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[i]=s;var Nt=(n,i,s)=>DT(n,typeof i!="symbol"?i+"":i,s),lg=(n,i,s)=>i.has(n)||r0("Cannot "+s);var U=(n,i,s)=>(lg(n,i,"read from private field"),s?s.call(n):i.get(n)),Ge=(n,i,s)=>i.has(n)?r0("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(n):i.set(n,s),Ae=(n,i,s,a)=>(lg(n,i,"write to private field"),a?a.call(n,s):i.set(n,s),s),st=(n,i,s)=>(lg(n,i,"access private method"),s);var Cf=(n,i,s,a)=>({set _(c){Ae(n,i,c,s)},get _(){return U(n,i,a)}});function _T(n,i){for(var s=0;s<i.length;s++){const a=i[s];if(typeof a!="string"&&!Array.isArray(a)){for(const c in a)if(c!=="default"&&!(c in n)){const f=Object.getOwnPropertyDescriptor(a,c);f&&Object.defineProperty(n,c,f.get?f:{enumerable:!0,get:()=>a[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))a(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&a(d)}).observe(document,{childList:!0,subtree:!0});function s(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function a(c){if(c.ep)return;c.ep=!0;const f=s(c);fetch(c.href,f)}})();function kT(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ig={exports:{}},et={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var s0;function LT(){if(s0)return et;s0=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),S=Symbol.for("react.view_transition"),C=Symbol.iterator;function T(z){return z===null||typeof z!="object"?null:(z=C&&z[C]||z["@@iterator"],typeof z=="function"?z:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,O={};function E(z,B,W){this.props=z,this.context=B,this.refs=O,this.updater=W||R}E.prototype.isReactComponent={},E.prototype.setState=function(z,B){if(typeof z!="object"&&typeof z!="function"&&z!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,z,B,"setState")},E.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function A(){}A.prototype=E.prototype;function N(z,B,W){this.props=z,this.context=B,this.refs=O,this.updater=W||R}var L=N.prototype=new A;L.constructor=N,j(L,E.prototype),L.isPureReactComponent=!0;var D=Array.isArray;function _(){}var M={H:null,A:null,T:null,S:null},Q=Object.prototype.hasOwnProperty;function J(z,B,W){var ie=W.ref;return{$$typeof:n,type:z,key:B,ref:ie!==void 0?ie:null,props:W}}function re(z,B){return J(z.type,B,z.props)}function te(z){return typeof z=="object"&&z!==null&&z.$$typeof===n}function $(z){var B={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(W){return B[W]})}var oe=/\/+/g;function V(z,B){return typeof z=="object"&&z!==null&&z.key!=null?$(""+z.key):B.toString(36)}function H(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(_,_):(z.status="pending",z.then(function(B){z.status==="pending"&&(z.status="fulfilled",z.value=B)},function(B){z.status==="pending"&&(z.status="rejected",z.reason=B)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function ne(z,B,W,ie,ue){var me=typeof z;(me==="undefined"||me==="boolean")&&(z=null);var ae=!1;if(z===null)ae=!0;else switch(me){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(z.$$typeof){case n:case i:ae=!0;break;case v:return ae=z._init,ne(ae(z._payload),B,W,ie,ue)}}if(ae)return ue=ue(z),ae=ie===""?"."+V(z,0):ie,D(ue)?(W="",ae!=null&&(W=ae.replace(oe,"$&/")+"/"),ne(ue,B,W,"",function(pe){return pe})):ue!=null&&(te(ue)&&(ue=re(ue,W+(ue.key==null||z&&z.key===ue.key?"":(""+ue.key).replace(oe,"$&/")+"/")+ae)),B.push(ue)),1;ae=0;var q=ie===""?".":ie+":";if(D(z))for(var le=0;le<z.length;le++)ie=z[le],me=q+V(ie,le),ae+=ne(ie,B,W,me,ue);else if(le=T(z),typeof le=="function")for(z=le.call(z),le=0;!(ie=z.next()).done;)ie=ie.value,me=q+V(ie,le++),ae+=ne(ie,B,W,me,ue);else if(me==="object"){if(typeof z.then=="function")return ne(H(z),B,W,ie,ue);throw B=String(z),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return ae}function F(z,B,W){if(z==null)return z;var ie=[],ue=0;return ne(z,ie,"","",function(me){return B.call(W,me,ue++)}),ie}function se(z){if(z._status===-1){var B=z._result,W=B();W.then(function(ie){(z._status===0||z._status===-1)&&(z._status=1,z._result=ie,W.status===void 0&&(W.status="fulfilled",W.value=ie))},function(ie){(z._status===0||z._status===-1)&&(z._status=2,z._result=ie,W.status===void 0&&(W.status="rejected",W.reason=ie))}),z._status===-1&&(z._status=0,z._result=W)}if(z._status===1)return z._result.default;throw z._result}var K=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)};function Re(z){var B=M.T,W={};W.types=B!==null?B.types:null,M.T=W;try{var ie=z(),ue=M.S;ue!==null&&ue(W,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(_,K)}catch(me){K(me)}finally{B!==null&&W.types!==null&&(B.types=W.types),M.T=B}}function Ye(z){var B=M.T;if(B!==null){var W=B.types;W===null?B.types=[z]:W.indexOf(z)===-1&&W.push(z)}else Re(Ye.bind(null,z))}var Oe={map:F,forEach:function(z,B,W){F(z,function(){B.apply(this,arguments)},W)},count:function(z){var B=0;return F(z,function(){B++}),B},toArray:function(z){return F(z,function(B){return B})||[]},only:function(z){if(!te(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return et.Activity=b,et.Children=Oe,et.Component=E,et.Fragment=s,et.Profiler=c,et.PureComponent=N,et.StrictMode=a,et.Suspense=m,et.ViewTransition=S,et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,et.__COMPILER_RUNTIME={__proto__:null,c:function(z){return M.H.useMemoCache(z)}},et.addTransitionType=Ye,et.cache=function(z){return function(){return z.apply(null,arguments)}},et.cacheSignal=function(){return null},et.cloneElement=function(z,B,W){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var ie=j({},z.props),ue=z.key;if(B!=null)for(me in B.key!==void 0&&(ue=""+B.key),B)!Q.call(B,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&B.ref===void 0||(ie[me]=B[me]);var me=arguments.length-2;if(me===1)ie.children=W;else if(1<me){for(var ae=Array(me),q=0;q<me;q++)ae[q]=arguments[q+2];ie.children=ae}return J(z.type,ue,ie)},et.createContext=function(z){return z={$$typeof:d,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:f,_context:z},z},et.createElement=function(z,B,W){var ie,ue={},me=null;if(B!=null)for(ie in B.key!==void 0&&(me=""+B.key),B)Q.call(B,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(ue[ie]=B[ie]);var ae=arguments.length-2;if(ae===1)ue.children=W;else if(1<ae){for(var q=Array(ae),le=0;le<ae;le++)q[le]=arguments[le+2];ue.children=q}if(z&&z.defaultProps)for(ie in ae=z.defaultProps,ae)ue[ie]===void 0&&(ue[ie]=ae[ie]);return J(z,me,ue)},et.createRef=function(){return{current:null}},et.forwardRef=function(z){return{$$typeof:h,render:z}},et.isValidElement=te,et.lazy=function(z){return{$$typeof:v,_payload:{_status:-1,_result:z},_init:se}},et.memo=function(z,B){return{$$typeof:g,type:z,compare:B===void 0?null:B}},et.startTransition=Re,et.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},et.use=function(z){return M.H.use(z)},et.useActionState=function(z,B,W){return M.H.useActionState(z,B,W)},et.useCallback=function(z,B){return M.H.useCallback(z,B)},et.useContext=function(z){return M.H.useContext(z)},et.useDebugValue=function(){},et.useDeferredValue=function(z,B){return M.H.useDeferredValue(z,B)},et.useEffect=function(z,B){return M.H.useEffect(z,B)},et.useEffectEvent=function(z){return M.H.useEffectEvent(z)},et.useId=function(){return M.H.useId()},et.useImperativeHandle=function(z,B,W){return M.H.useImperativeHandle(z,B,W)},et.useInsertionEffect=function(z,B){return M.H.useInsertionEffect(z,B)},et.useLayoutEffect=function(z,B){return M.H.useLayoutEffect(z,B)},et.useMemo=function(z,B){return M.H.useMemo(z,B)},et.useOptimistic=function(z,B){return M.H.useOptimistic(z,B)},et.useReducer=function(z,B,W){return M.H.useReducer(z,B,W)},et.useRef=function(z){return M.H.useRef(z)},et.useState=function(z){return M.H.useState(z)},et.useSyncExternalStore=function(z,B,W){return M.H.useSyncExternalStore(z,B,W)},et.useTransition=function(){return M.H.useTransition()},et.version="19.3.1",et}var a0;function Pu(){return a0||(a0=1,ig.exports=LT()),ig.exports}var x=Pu();const dt=kT(x),rp=_T({__proto__:null,default:dt},[x]);var rg={exports:{}},bu={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var o0;function UT(){if(o0)return bu;o0=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(a,c,f){var d=null;if(f!==void 0&&(d=""+f),c.key!==void 0&&(d=""+c.key),"key"in c){f={};for(var h in c)h!=="key"&&(f[h]=c[h])}else f=c;return c=f.ref,{$$typeof:n,type:a,key:d,ref:c!==void 0?c:null,props:f}}return bu.Fragment=i,bu.jsx=s,bu.jsxs=s,bu}var u0;function HT(){return u0||(u0=1,rg.exports=UT()),rg.exports}var p=HT(),sg={exports:{}},vu={},ag={exports:{}},og={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var c0;function IT(){return c0||(c0=1,(function(n){function i(H,ne){var F=H.length;H.push(ne);e:for(;0<F;){var se=F-1>>>1,K=H[se];if(0<c(K,ne))H[se]=ne,H[F]=K,F=se;else break e}}function s(H){return H.length===0?null:H[0]}function a(H){if(H.length===0)return null;var ne=H[0],F=H.pop();if(F!==ne){H[0]=F;e:for(var se=0,K=H.length,Re=K>>>1;se<Re;){var Ye=2*(se+1)-1,Oe=H[Ye],z=Ye+1,B=H[z];if(0>c(Oe,F))z<K&&0>c(B,Oe)?(H[se]=B,H[z]=F,se=z):(H[se]=Oe,H[Ye]=F,se=Ye);else if(z<K&&0>c(B,F))H[se]=B,H[z]=F,se=z;else break e}}return ne}function c(H,ne){var F=H.sortIndex-ne.sortIndex;return F!==0?F:H.id-ne.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var d=Date,h=d.now();n.unstable_now=function(){return d.now()-h}}var m=[],g=[],v=1,b=null,S=3,C=!1,T=!1,R=!1,j=!1,O=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function N(H){for(var ne=s(g);ne!==null;){if(ne.callback===null)a(g);else if(ne.startTime<=H)a(g),ne.sortIndex=ne.expirationTime,i(m,ne);else break;ne=s(g)}}function L(H){if(R=!1,N(H),!T)if(s(m)!==null)T=!0,D||(D=!0,te());else{var ne=s(g);ne!==null&&V(L,ne.startTime-H)}}var D=!1,_=-1,M=5,Q=-1;function J(){return j?!0:!(n.unstable_now()-Q<M)}function re(){if(j=!1,D){var H=n.unstable_now();Q=H;var ne=!0;try{e:{T=!1,R&&(R=!1,E(_),_=-1),C=!0;var F=S;try{t:{for(N(H),b=s(m);b!==null&&!(b.expirationTime>H&&J());){var se=b.callback;if(typeof se=="function"){b.callback=null,S=b.priorityLevel;var K=se(b.expirationTime<=H);if(H=n.unstable_now(),typeof K=="function"){b.callback=K,N(H),ne=!0;break t}b===s(m)&&a(m),N(H)}else a(m);b=s(m)}if(b!==null)ne=!0;else{var Re=s(g);Re!==null&&V(L,Re.startTime-H),ne=!1}}break e}finally{b=null,S=F,C=!1}ne=void 0}}finally{ne?te():D=!1}}}var te;if(typeof A=="function")te=function(){A(re)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,oe=$.port2;$.port1.onmessage=re,te=function(){oe.postMessage(null)}}else te=function(){O(re,0)};function V(H,ne){_=O(function(){H(n.unstable_now())},ne)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(H){H.callback=null},n.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<H?Math.floor(1e3/H):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(H){switch(S){case 1:case 2:case 3:var ne=3;break;default:ne=S}var F=S;S=ne;try{return H()}finally{S=F}},n.unstable_requestPaint=function(){j=!0},n.unstable_runWithPriority=function(H,ne){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var F=S;S=H;try{return ne()}finally{S=F}},n.unstable_scheduleCallback=function(H,ne,F){var se=n.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?se+F:se):F=se,H){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=F+K,H={id:v++,callback:ne,priorityLevel:H,startTime:F,expirationTime:K,sortIndex:-1},F>se?(H.sortIndex=F,i(g,H),s(m)===null&&H===s(g)&&(R?(E(_),_=-1):R=!0,V(L,F-se))):(H.sortIndex=K,i(m,H),T||C||(T=!0,D||(D=!0,te()))),H},n.unstable_shouldYield=J,n.unstable_wrapCallback=function(H){var ne=S;return function(){var F=S;S=ne;try{return H.apply(this,arguments)}finally{S=F}}}})(og)),og}var f0;function VT(){return f0||(f0=1,ag.exports=IT()),ag.exports}var ug={exports:{}},_n={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var d0;function BT(){if(d0)return _n;d0=1;var n=Pu();function i(v){var b="https://react.dev/errors/"+v;if(1<arguments.length){b+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)b+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+v+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var a={d:{f:s,r:function(){throw Error(i(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},c=Symbol.for("react.portal"),f=Symbol.for("react.recoverable"),d=Symbol.for("react.optimistic_key");function h(v,b,S){var C=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:C==null?null:C===d?d:""+C,children:v,containerInfo:b,implementation:S}}var m=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(v,b){if(v==="font")return"";if(typeof b=="string")return b==="use-credentials"?b:""}return _n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,_n.browser=function(v){return{$$typeof:f,_reason:v}},_n.createPortal=function(v,b){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)throw Error(i(299));return h(v,b,null,S)},_n.flushSync=function(v){var b=m.T,S=a.p;try{if(m.T=null,a.p=2,v)return v()}finally{m.T=b,a.p=S,a.d.f()}},_n.preconnect=function(v,b){typeof v=="string"&&(b?(b=b.crossOrigin,b=typeof b=="string"?b==="use-credentials"?b:"":void 0):b=null,a.d.C(v,b))},_n.prefetchDNS=function(v){typeof v=="string"&&a.d.D(v)},_n.preinit=function(v,b){if(typeof v=="string"&&b&&typeof b.as=="string"){var S=b.as,C=g(S,b.crossOrigin),T=typeof b.integrity=="string"?b.integrity:void 0,R=typeof b.fetchPriority=="string"?b.fetchPriority:void 0;S==="style"?a.d.S(v,typeof b.precedence=="string"?b.precedence:void 0,{crossOrigin:C,integrity:T,fetchPriority:R}):S==="script"&&a.d.X(v,{crossOrigin:C,integrity:T,fetchPriority:R,nonce:typeof b.nonce=="string"?b.nonce:void 0})}},_n.preinitModule=function(v,b){if(typeof v=="string")if(typeof b=="object"&&b!==null){if(b.as==null||b.as==="script"){var S=g(b.as,b.crossOrigin);a.d.M(v,{crossOrigin:S,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0})}}else b==null&&a.d.M(v)},_n.preload=function(v,b){if(typeof v=="string"&&typeof b=="object"&&b!==null&&typeof b.as=="string"){var S=b.as,C=g(S,b.crossOrigin);a.d.L(v,S,{crossOrigin:C,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,type:typeof b.type=="string"?b.type:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0,referrerPolicy:typeof b.referrerPolicy=="string"?b.referrerPolicy:void 0,imageSrcSet:typeof b.imageSrcSet=="string"?b.imageSrcSet:void 0,imageSizes:typeof b.imageSizes=="string"?b.imageSizes:void 0,media:typeof b.media=="string"?b.media:void 0})}},_n.preloadModule=function(v,b){if(typeof v=="string")if(b){var S=g(b.as,b.crossOrigin);a.d.m(v,{as:typeof b.as=="string"&&b.as!=="script"?b.as:void 0,crossOrigin:S,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0})}else a.d.m(v)},_n.requestFormReset=function(v){a.d.r(v)},_n.unstable_batchedUpdates=function(v,b){return v(b)},_n.useFormState=function(v,b,S){return m.H.useFormState(v,b,S)},_n.useFormStatus=function(){return m.H.useHostTransitionStatus()},_n.version="19.3.1",_n}var h0;function kS(){if(h0)return ug.exports;h0=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),ug.exports=BT(),ug.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var m0;function qT(){if(m0)return vu;m0=1;var n=VT(),i=Pu(),s=kS();function a(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){for(var t=e,l=t;l&&!l.alternate;)t=l,(t.flags&4098)!==0&&(e=t.return),l=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(f(e)!==e)throw Error(a(188))}function g(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(a(188));return t!==e?null:e}for(var l=e,r=t;;){var o=l.return;if(o===null)break;var u=o.alternate;if(u===null){if(r=o.return,r!==null){l=r;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===l)return m(o),e;if(u===r)return m(o),t;u=u.sibling}throw Error(a(188))}if(l.return!==r.return)l=o,r=u;else{for(var y=!1,w=o.child;w;){if(w===l){y=!0,l=o,r=u;break}if(w===r){y=!0,r=o,l=u;break}w=w.sibling}if(!y){for(w=u.child;w;){if(w===l){y=!0,l=u,r=o;break}if(w===r){y=!0,r=u,l=o;break}w=w.sibling}if(!y)throw Error(a(189))}}if(l.alternate!==r)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}function b(e,t,l,r,o,u){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&l(e,r,o,u)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&b(e.child,t,l,r,o,u))return!0;e=e.sibling}return!1}function S(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function C(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function T(e){var t=[null,null],l=S(e);return l===null||R(t,e,l.child,{foundSelf:!1}),t}function R(e,t,l,r){for(;l!==null;){if(l===t)r.foundSelf=!0;else if(l.tag===5||l.tag===27||l.tag===6){if(r.foundSelf)return e[1]=l,!0;e[0]=l}else if((l.tag!==22||l.memoizedState===null)&&R(e,t,l.child,r))return!0;l=l.sibling}return!1}function j(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(a(559))}}var O=null,E=null;function A(e,t,l){return e===l?!0:e===t?(O=e,!0):!1}function N(e,t,l){return e===l?(E=e,!1):e===t?(E!==null&&(O=e),!0):!1}function L(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function D(e,t,l){for(var r=0,o=e;o;o=l(o))r++;o=0;for(var u=t;u;u=l(u))o++;for(;0<r-o;)e=l(e),r--;for(;0<o-r;)t=l(t),o--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=l(e),t=l(t)}return null}var _=Object.assign,M=Symbol.for("react.element"),Q=Symbol.for("react.transitional.element"),J=Symbol.for("react.portal"),re=Symbol.for("react.fragment"),te=Symbol.for("react.strict_mode"),$=Symbol.for("react.profiler"),oe=Symbol.for("react.consumer"),V=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),se=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),Re=Symbol.for("react.activity"),Ye=Symbol.for("react.legacy_hidden"),Oe=Symbol.for("react.memo_cache_sentinel"),z=Symbol.for("react.view_transition"),B=Symbol.for("react.recoverable"),W=Symbol.iterator;function ie(e){return e===null||typeof e!="object"?null:(e=W&&e[W]||e["@@iterator"],typeof e=="function"?e:null)}var ue=Symbol.for("react.client.reference");function me(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ue?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case re:return"Fragment";case $:return"Profiler";case te:return"StrictMode";case ne:return"Suspense";case F:return"SuspenseList";case Re:return"Activity";case z:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case J:return"Portal";case V:return e.displayName||"Context";case oe:return(e._context.displayName||"Context")+".Consumer";case H:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case se:return t=e.displayName||null,t!==null?t:me(e.type)||"Memo";case K:t=e._payload,e=e._init;try{return me(e(t))}catch{}}return null}var ae=Array.isArray,q=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe={pending:!1,data:null,method:null,action:null},Ke=[],Se=-1;function he(e){return{current:e}}function ye(e){0>Se||(e.current=Ke[Se],Ke[Se]=null,Se--)}function de(e,t){Se++,Ke[Se]=e.current,e.current=t}var Ce=he(null),He=he(null),je=he(null),Ee=he(null);function ve(e,t){switch(de(je,t),de(He,e),de(Ce,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?mx(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=mx(t),e=gx(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ye(Ce),de(Ce,e)}function we(){ye(Ce),ye(He),ye(je)}function xe(e){var t=e.memoizedState;t!==null&&(Va._currentValue=t.memoizedState,de(Ee,e)),t=Ce.current;var l=gx(t,e.type);t!==l&&(de(He,e),de(Ce,l))}function Xe(e){He.current===e&&(ye(Ce),ye(He)),Ee.current===e&&(ye(Ee),Va._currentValue=pe)}var $e,Ve;function Ze(e){if($e===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);$e=t&&t[1]||"",Ve=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+$e+e+Ve}var lt=!1;function St(e,t){if(!e||lt)return"";lt=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(Te){var P=Te}Reflect.construct(e,[],fe)}else{try{fe.call()}catch(Te){P=Te}fe=!1;try{var Z=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),fe=!0,new e}finally{fe&&(Z!==void 0?Object.defineProperty(e.prototype,"props",Z):delete e.prototype.props)}}}else{try{throw Error()}catch(Te){P=Te}(fe=e())&&typeof fe.catch=="function"&&fe.catch(function(){})}}catch(Te){if(Te&&P&&typeof Te.stack=="string")return[Te.stack,P.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=r.DetermineComponentFrameRoot(),y=u[0],w=u[1];if(y&&w){var k=y.split(`
|
|
44
|
+
`),Y=w.split(`
|
|
45
|
+
`);for(o=r=0;r<k.length&&!k[r].includes("DetermineComponentFrameRoot");)r++;for(;o<Y.length&&!Y[o].includes("DetermineComponentFrameRoot");)o++;if(r===k.length||o===Y.length)for(r=k.length-1,o=Y.length-1;1<=r&&0<=o&&k[r]!==Y[o];)o--;for(;1<=r&&0<=o;r--,o--)if(k[r]!==Y[o]){if(r!==1||o!==1)do if(r--,o--,0>o||k[r]!==Y[o]){var ee=`
|
|
46
|
+
`+k[r].replace(" at new "," at ");return e.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",e.displayName)),ee}while(1<=r&&0<=o);break}}}finally{lt=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Ze(l):""}function qt(e,t){switch(e.tag){case 26:case 27:case 5:return Ze(e.type);case 16:return Ze("Lazy");case 13:return e.child!==t&&t!==null?Ze("Suspense Fallback"):Ze("Suspense");case 19:return Ze("SuspenseList");case 0:case 15:return St(e.type,!1);case 11:return St(e.type.render,!1);case 1:return St(e.type,!0);case 31:return Ze("Activity");case 30:return Ze("ViewTransition");default:return""}}function gt(e){try{var t="",l=null;do t+=qt(e,l),l=e,e=e.return;while(e);return t}catch(r){return`
|
|
47
|
+
Error generating stack: `+r.message+`
|
|
48
|
+
`+r.stack}}var Fe=Object.prototype.hasOwnProperty,mn=n.unstable_scheduleCallback,Sn=n.unstable_cancelCallback,wl=n.unstable_shouldYield,tn=n.unstable_requestPaint,it=n.unstable_now,rt=n.unstable_getCurrentPriorityLevel,gn=n.unstable_ImmediatePriority,Be=n.unstable_UserBlockingPriority,tt=n.unstable_NormalPriority,Tt=n.unstable_LowPriority,Pt=n.unstable_IdlePriority,Gt=n.log,En=n.unstable_setDisableYieldValue,pn=null,Yt=null;function Zt(e){if(typeof Gt=="function"&&En(e),Yt&&typeof Yt.setStrictMode=="function")try{Yt.setStrictMode(pn,e)}catch{}}var Qe=Math.clz32?Math.clz32:vi,Bl=Math.log,Wi=Math.LN2;function vi(e){return e>>>=0,e===0?32:31-(Bl(e)/Wi|0)|0}var ql=256,Cl=262144,Pl=4194304;function Hn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function il(e,t,l){var r=e.pendingLanes;if(r===0)return 0;var o=0,u=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var w=r&134217727;return w!==0?(r=w&~u,r!==0?o=Hn(r):(y&=w,y!==0?o=Hn(y):l||(l=w&~e,l!==0&&(o=Hn(l))))):(w=r&~u,w!==0?o=Hn(w):y!==0?o=Hn(y):l||(l=r&~e,l!==0&&(o=Hn(l)))),o===0?0:t!==0&&t!==o&&(t&u)===0&&(u=o&-o,l=t&-t,u>=l||u===32&&(l&4194048)!==0)?t:o}function rl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Yn(e,t){(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var r=31-Qe(l),o=1<<r;t|=e[r],l&=~o}return t}function Tl(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ec(){var e=Pl;return Pl<<=1,(Pl&62914560)===0&&(Pl=4194304),e}function Js(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function ts(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Oo(e,t,l,r,o,u){var y=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var w=e.entanglements,k=e.expirationTimes,Y=e.hiddenUpdates;for(l=y&~l;0<l;){var ee=31-Qe(l),fe=1<<ee;w[ee]=0,k[ee]=-1;var P=Y[ee];if(P!==null)for(Y[ee]=null,ee=0;ee<P.length;ee++){var Z=P[ee];Z!==null&&(Z.lane&=-536870913)}l&=~fe}r!==0&&jo(e,r,0),u!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=u&~(y&~t))}function jo(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Qe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|l&261930}function $s(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var r=31-Qe(l),o=1<<r;o&t|e[r]&t&&(e[r]|=t),l&=~o}}function tc(e,t){var l=t&-t;return l=(l&42)!==0?1:er(l),(l&(e.suspendedLanes|t))!==0?0:l}function er(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ao(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Qn(){var e=le.p;return e!==0?e:(e=window.event,e===void 0?32:$x(e.type))}function Kn(e,t){var l=le.p;try{return le.p=e,t()}finally{le.p=l}}var Fn=Math.random().toString(36).slice(2),Ut="__reactFiber$"+Fn,In="__reactProps$"+Fn,$l="__reactContainer$"+Fn,Ws="__reactEvents$"+Fn,Nd="__reactListeners$"+Fn,ea="__reactHandles$"+Fn,ta="__reactResources$"+Fn,xi="__reactMarker$"+Fn,na="__reactLoad$"+Fn;function la(e){delete e[Ut],delete e[In],delete e[Nd],delete e[ea]}function Si(e){var t;if(t=e[Ut])return t;for(var l=e.parentNode;l;){if(t=l[$l]||l[Ut]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=zx(e);e!==null;){if(l=e[Ut])return l;e=zx(e)}return t}e=l,l=e.parentNode}return null}function tr(e){if(e=e[Ut]||e[$l]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ei(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function Wl(e){var t=e[ta];return t||(t=e[ta]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Jt(e){e[xi]=!0}function nc(e){e[na]=void 0}var lc=new Set,ic={};function Ri(e,t){nr(e,t),nr(e+"Capture",t)}function nr(e,t){for(ic[e]=t,e=0;e<t.length;e++)lc.add(t[e])}var Md=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Ne={},qe={};function nt(e){return Fe.call(qe,e)?!0:Fe.call(Ne,e)?!1:Md.test(e)?qe[e]=!0:(Ne[e]=!0,!1)}var Ie=!1;function Qt(){var e=Ie;return Ie=!1,e}function nn(e,t,l){if(nt(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,l)}}function Ol(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,l)}}function Vn(e,t,l,r){if(r===null)e.removeAttribute(l);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,r)}}function ln(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function zd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Dd(e,t,l){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,u=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(y){l=""+y,u.call(this,y)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return l},setValue:function(y){l=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function rc(e){if(!e._valueTracker){var t=zd(e)?"checked":"value";e._valueTracker=Dd(e,t,""+e[t])}}function ny(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),r="";return e&&(r=zd(e)?e.checked?"true":"false":e.value),e=r,e!==l?(t.setValue(e),!0):!1}var WR=/[\n"\\]/g;function jl(e){return e.replace(WR,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function _d(e,t,l,r,o,u,y,w){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+ln(t)):e.value!==""+ln(t)&&(e.value=""+ln(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?y==="number"&&e.value==t?kd(e,ln(e.value)):kd(e,ln(t)):l!=null?kd(e,ln(l)):r!=null&&e.removeAttribute("value"),o==null&&u!=null&&(e.defaultChecked=!!u),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+ln(w):e.removeAttribute("name")}function ly(e,t,l,r,o,u,y,w){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||l!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){rc(e);return}l=l!=null?""+ln(l):"",t=t!=null?""+ln(t):l,w||t===e.value||(e.value=t),e.defaultValue=t}r=r??o,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=w?e.checked:!!r,e.defaultChecked=!!r,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),rc(e)}function kd(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function ia(e,t,l,r){if(e=e.options,t){t={};for(var o=0;o<l.length;o++)t["$"+l[o]]=!0;for(l=0;l<e.length;l++)o=t.hasOwnProperty("$"+e[l].value),e[l].selected!==o&&(e[l].selected=o),o&&r&&(e[l].defaultSelected=!0)}else{for(l=""+ln(l),t=null,o=0;o<e.length;o++){if(e[o].value===l){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function iy(e,t,l){if(t!=null&&(t=""+ln(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+ln(l):""}function ry(e,t,l,r){if(t==null){if(r!=null){if(l!=null)throw Error(a(92));if(ae(r)){if(1<r.length)throw Error(a(93));r=r[0]}l=r}l==null&&(l=""),t=l}l=ln(t),e.defaultValue=l,r=e.textContent,r===l&&r!==""&&r!==null&&(e.value=r),rc(e)}function ra(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var ew=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function sy(e,t,l){var r=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,l):typeof l!="number"||l===0||ew.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function ay(e,t,l){if(t!=null&&typeof t!="object")throw Error(a(62));if(e=e.style,l!=null){for(var r in l)!l.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="",Ie=!0);for(var o in t)r=t[o],t.hasOwnProperty(o)&&l[o]!==r&&(sy(e,o,r),Ie=!0)}else for(var u in t)t.hasOwnProperty(u)&&sy(e,u,t[u])}function Ld(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tw=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),nw=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function sc(e){return nw.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ei(){}var Ud=null;function Hd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var sa=null,aa=null;function oy(e){var t=tr(e);if(t&&(e=t.stateNode)){var l=e[In]||null;e:switch(e=t.stateNode,t.type){case"input":if(_d(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+jl(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var r=l[t];if(r!==e&&r.form===e.form){var o=r[In]||null;if(!o)throw Error(a(90));_d(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<l.length;t++)r=l[t],r.form===e.form&&ny(r)}break e;case"textarea":iy(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&ia(e,!!l.multiple,t,!1)}}}var Id=!1;function uy(e,t,l){if(Id)return e(t,l);Id=!0;try{var r=e(t);return r}finally{if(Id=!1,(sa!==null||aa!==null)&&(af(),sa&&(t=sa,e=aa,aa=sa=null,oy(t),e)))for(t=0;t<e.length;t++)oy(e[t])}}function No(e,t){var l=e.stateNode;if(l===null)return null;var r=l[In]||null;if(r===null)return null;l=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(a(231,t,typeof l));return l}var wi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vd=!1;if(wi)try{var Mo={};Object.defineProperty(Mo,"passive",{get:function(){Vd=!0}}),window.addEventListener("test",Mo,Mo),window.removeEventListener("test",Mo,Mo)}catch{Vd=!1}var lr=null,Bd=null,ac=null;function cy(){if(ac)return ac;var e,t=Bd,l=t.length,r,o="value"in lr?lr.value:lr.textContent,u=o.length;for(e=0;e<l&&t[e]===o[e];e++);var y=l-e;for(r=1;r<=y&&t[l-r]===o[u-r];r++);return ac=o.slice(e,1<r?1-r:void 0)}function oc(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function uc(){return!0}function fy(){return!1}function Xn(e){function t(l,r,o,u,y){this._reactName=l,this._targetInst=o,this.type=r,this.nativeEvent=u,this.target=y,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(l=e[w],this[w]=l?l(u):u[w]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?uc:fy,this.isPropagationStopped=fy,this}return _(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=uc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=uc)},persist:function(){},isPersistent:uc}),t}var ir={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cc=Xn(ir),zo=_({},ir,{view:0,detail:0}),lw=Xn(zo),qd,Pd,Do,fc=_({},zo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yd,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Do&&(Do&&e.type==="mousemove"?(qd=e.screenX-Do.screenX,Pd=e.screenY-Do.screenY):Pd=qd=0,Do=e),qd)},movementY:function(e){return"movementY"in e?e.movementY:Pd}}),dy=Xn(fc),iw=_({},fc,{dataTransfer:0}),rw=Xn(iw),sw=_({},zo,{relatedTarget:0}),Gd=Xn(sw),aw=_({},ir,{animationName:0,elapsedTime:0,pseudoElement:0}),ow=Xn(aw),uw=_({},ir,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),cw=Xn(uw),fw=_({},ir,{data:0}),hy=Xn(fw),dw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hw={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},mw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gw(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=mw[e])?!!t[e]:!1}function Yd(){return gw}var pw=_({},zo,{key:function(e){if(e.key){var t=dw[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=oc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?hw[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yd,charCode:function(e){return e.type==="keypress"?oc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?oc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),yw=Xn(pw),bw=_({},fc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),my=Xn(bw),vw=_({},ir,{submitter:0}),xw=Xn(vw),Sw=_({},zo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yd}),Ew=Xn(Sw),Rw=_({},ir,{propertyName:0,elapsedTime:0,pseudoElement:0}),ww=Xn(Rw),Cw=_({},fc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Tw=Xn(Cw),Ow=_({},ir,{newState:0,oldState:0,source:0}),jw=Xn(Ow),Aw=[9,13,27,32],Qd=wi&&"CompositionEvent"in window,_o=null;wi&&"documentMode"in document&&(_o=document.documentMode);var Nw=wi&&"TextEvent"in window&&!_o,gy=wi&&(!Qd||_o&&8<_o&&11>=_o),py=" ",yy=!1;function by(e,t){switch(e){case"keyup":return Aw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vy(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var oa=!1;function Mw(e,t){switch(e){case"compositionend":return vy(t);case"keypress":return t.which!==32?null:(yy=!0,py);case"textInput":return e=t.data,e===py&&yy?null:e;default:return null}}function zw(e,t){if(oa)return e==="compositionend"||!Qd&&by(e,t)?(e=cy(),ac=Bd=lr=null,oa=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return gy&&t.locale!=="ko"?null:t.data;default:return null}}var Dw={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function xy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Dw[e.type]:t==="textarea"}function Sy(e,t,l,r){sa?aa?aa.push(r):aa=[r]:sa=r,t=hf(t,"onChange"),0<t.length&&(l=new cc("onChange","change",null,l,r),e.push({event:l,listeners:t}))}var ko=null,Lo=null;function _w(e){ox(e,0)}function dc(e){var t=Ei(e);if(ny(t))return e}function Ey(e,t){if(e==="change")return t}var Ry=!1;if(wi){var Kd;if(wi){var Fd="oninput"in document;if(!Fd){var wy=document.createElement("div");wy.setAttribute("oninput","return;"),Fd=typeof wy.oninput=="function"}Kd=Fd}else Kd=!1;Ry=Kd&&(!document.documentMode||9<document.documentMode)}function Cy(){ko&&(ko.detachEvent("onpropertychange",Ty),Lo=ko=null)}function Ty(e){if(e.propertyName==="value"&&dc(Lo)){var t=[];Sy(t,Lo,e,Hd(e)),uy(_w,t)}}function kw(e,t,l){e==="focusin"?(Cy(),ko=t,Lo=l,ko.attachEvent("onpropertychange",Ty)):e==="focusout"&&Cy()}function Lw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return dc(Lo)}function Uw(e,t){if(e==="click")return dc(t)}function Hw(e,t){if(e==="input"||e==="change")return dc(t)}function Iw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ml=typeof Object.is=="function"?Object.is:Iw;function Uo(e,t){if(ml(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),r=Object.keys(t);if(l.length!==r.length)return!1;for(r=0;r<l.length;r++){var o=l[r];if(!Fe.call(t,o)||!ml(e[o],t[o]))return!1}return!0}function Xd(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Oy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jy(e,t){var l=Oy(e);e=0;for(var r;l;){if(l.nodeType===3){if(r=e+l.textContent.length,e<=t&&r>=t)return{node:l,offset:t-e};e=r}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Oy(l)}}function Ay(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ay(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ny(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Xd(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Xd(e.document)}return t}function Zd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Vw=wi&&"documentMode"in document&&11>=document.documentMode,ua=null,Jd=null,Ho=null,$d=!1;function My(e,t,l){var r=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;$d||ua==null||ua!==Xd(r)||(r=ua,"selectionStart"in r&&Zd(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ho&&Uo(Ho,r)||(Ho=r,r=hf(Jd,"onSelect"),0<r.length&&(t=new cc("onSelect","select",null,t,l),e.push({event:t,listeners:r}),t.target=ua)))}function ns(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var ca={animationend:ns("Animation","AnimationEnd"),animationiteration:ns("Animation","AnimationIteration"),animationstart:ns("Animation","AnimationStart"),transitionrun:ns("Transition","TransitionRun"),transitionstart:ns("Transition","TransitionStart"),transitioncancel:ns("Transition","TransitionCancel"),transitionend:ns("Transition","TransitionEnd")},Wd={},zy={};wi&&(zy=document.createElement("div").style,"AnimationEvent"in window||(delete ca.animationend.animation,delete ca.animationiteration.animation,delete ca.animationstart.animation),"TransitionEvent"in window||delete ca.transitionend.transition);function ls(e){if(Wd[e])return Wd[e];if(!ca[e])return e;var t=ca[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in zy)return Wd[e]=t[l];return e}var Dy=ls("animationend"),_y=ls("animationiteration"),ky=ls("animationstart"),Bw=ls("transitionrun"),qw=ls("transitionstart"),Pw=ls("transitioncancel"),Ly=ls("transitionend"),Uy=new Map,eh="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");eh.push("scrollEnd");function Gl(e,t){Uy.set(e,t),Ri(t,[e])}var Gw=0;function Ci(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=Fl.identifierPrefix;var l=Gw++;return e="_"+e+"t_"+l.toString(32)+"_",t.autoName=e}function Hy(e){if(e==null||typeof e=="string")return e;var t=null,l=Na;if(l!==null)for(var r=0;r<l.length;r++){var o=e[l[r]];if(o!=null){if(o==="none")return"none";t=t==null?o:t+(" "+o)}}return t??e.default}function Ti(e,t){return e=Hy(e),t=Hy(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var hc=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Al=[],fa=0,th=0;function mc(){for(var e=fa,t=th=fa=0;t<e;){var l=Al[t];Al[t++]=null;var r=Al[t];Al[t++]=null;var o=Al[t];Al[t++]=null;var u=Al[t];if(Al[t++]=null,r!==null&&o!==null){var y=r.pending;y===null?o.next=o:(o.next=y.next,y.next=o),r.pending=o}u!==0&&Iy(l,o,u)}}function gc(e,t,l,r){Al[fa++]=e,Al[fa++]=t,Al[fa++]=l,Al[fa++]=r,th|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function nh(e,t,l,r){return gc(e,t,l,r),pc(e)}function is(e,t){return gc(e,null,null,t),pc(e)}function Iy(e,t,l){e.lanes|=l;var r=e.alternate;r!==null&&(r.lanes|=l);for(var o=!1,u=e.return;u!==null;)u.childLanes|=l,r=u.alternate,r!==null&&(r.childLanes|=l),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(o=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,o&&t!==null&&(o=31-Qe(l),e=u.hiddenUpdates,r=e[o],r===null?e[o]=[t]:r.push(t),t.lane=l|536870912),u):null}function pc(e){if(50<su)throw su=0,sf=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var da={};function Yw(e,t,l,r){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sl(e,t,l,r){return new Yw(e,t,l,r)}function lh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Oi(e,t){var l=e.alternate;return l===null?(l=sl(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&1206910976,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Vy(e,t){e.flags&=1206910978;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function yc(e,t,l,r,o,u){var y=0;if(r=e,typeof r=="function")lh(r)&&(y=1);else if(typeof r=="string")y=vT(e,l,Ce.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(r){case Re:return e=sl(31,l,t,o),e.elementType=Re,e.lanes=u,e;case re:return rs(l.children,o,u,t);case te:y=8,o|=24;break;case $:return e=sl(12,l,t,o|2),e.elementType=$,e.lanes=u,e;case ne:return e=sl(13,l,t,o),e.elementType=ne,e.lanes=u,e;case F:return e=sl(19,l,t,o),e.elementType=F,e.lanes=u,e;case Ye:case z:return e=o|32,e=sl(30,l,t,e),e.elementType=z,e.lanes=u,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case V:y=10;break e;case oe:y=9;break e;case H:y=11;break e;case se:y=14;break e;case K:y=16,r=null;break e}y=29,l=Error(a(130,e===null?"null":typeof e,"")),r=null}return t=sl(y,l,t,o),t.elementType=e,t.type=r,t.lanes=u,t}function rs(e,t,l,r){return e=sl(7,e,r,t),e.lanes=l,e}function ih(e,t,l){return e=sl(6,e,null,t),e.lanes=l,e}function By(e){var t=sl(18,null,null,0);return t.stateNode=e,t}function rh(e,t,l){return t=sl(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var qy=new WeakMap;function Nl(e,t){if(typeof e=="object"&&e!==null){var l=qy.get(e);return l!==void 0?l:(t={value:e,source:t,stack:gt(t)},qy.set(e,t),t)}return{value:e,source:t,stack:gt(t)}}var ha=[],ma=0,bc=null,Io=0,Ml=[],zl=0,rr=null,ti=1,ni="";function ji(e,t){ha[ma++]=Io,ha[ma++]=bc,bc=e,Io=t}function Py(e,t,l){Ml[zl++]=ti,Ml[zl++]=ni,Ml[zl++]=rr,rr=e;var r=ti;e=ni;var o=32-Qe(r)-1;r&=~(1<<o),l+=1;var u=32-Qe(t)+o;if(30<u){var y=o-o%5;u=(r&(1<<y)-1).toString(32),r>>=y,o-=y,ti=1<<32-Qe(t)+o|l<<o|r,ni=u+e}else ti=1<<u|l<<o|r,ni=e}function vc(e){e.return!==null&&(ji(e,1),Py(e,1,0))}function sh(e){for(;e===bc;)bc=ha[--ma],ha[ma]=null,Io=ha[--ma],ha[ma]=null;for(;e===rr;)rr=Ml[--zl],Ml[zl]=null,ni=Ml[--zl],Ml[zl]=null,ti=Ml[--zl],Ml[zl]=null}function Gy(e,t){Ml[zl++]=ti,Ml[zl++]=ni,Ml[zl++]=rr,ti=t.id,ni=t.overflow,rr=e}var Rn=null,_t=null,ct=!1,sr=null,Dl=!1,ah=Error(a(519));function ar(e){var t=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Vo(Nl(t,e)),ah}function Yy(e){var t=e.stateNode,l=e.type,r=e.memoizedProps;switch(t[Ut]=e,t[In]=r,l){case"dialog":mt("cancel",t),mt("close",t);break;case"iframe":case"object":case"embed":mt("load",t);break;case"video":case"audio":for(l=0;l<ou.length;l++)mt(ou[l],t);break;case"source":mt("error",t);break;case"img":case"image":case"link":mt("error",t),mt("load",t);break;case"details":mt("toggle",t);break;case"input":mt("invalid",t),ly(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":mt("invalid",t);break;case"textarea":mt("invalid",t),ry(t,r.value,r.defaultValue,r.children)}l=r.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||r.suppressHydrationWarning===!0||dx(t.textContent,l)?(r.popover!=null&&(mt("beforetoggle",t),mt("toggle",t)),r.onScroll!=null&&mt("scroll",t),r.onScrollEnd!=null&&mt("scrollend",t),r.onClick!=null&&(t.onclick=ei),t=!0):t=!1,t||ar(e,!0)}function xc(e){for(Rn=e.return;Rn;)switch(Rn.tag){case 5:case 31:case 13:Dl=!1;return;case 27:case 3:Dl=!0;return;default:Rn=Rn.return}}function ga(e){if(e!==Rn)return!1;if(!ct)return xc(e),ct=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Um(e.type,e.memoizedProps)),l=!l),l&&_t&&ar(e),xc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));_t=Mx(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));_t=Mx(e)}else t===27?(t=_t,Rr(e.type)?(e=Qm,Qm=null,_t=e):_t=t):_t=Rn?kl(e.stateNode.nextSibling):null;return!0}function ss(){_t=Rn=null,ct=!1}function oh(){var e=sr;return e!==null&&(ul===null?ul=e:ul.push.apply(ul,e),sr=null),e}function Vo(e){sr===null?sr=[e]:sr.push(e)}var uh=he(null),as=null,Ai=null;function or(e,t,l){de(uh,t._currentValue),t._currentValue=l}function Ni(e){e._currentValue=uh.current,ye(uh)}function Sc(e,t,l){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===l)break;e=e.return}}function ch(e,t,l,r){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var u=o.dependencies;if(u!==null){var y=o.child;u=u.firstContext;e:for(;u!==null;){var w=u;u=o;for(var k=0;k<t.length;k++)if(w.context===t[k]){u.lanes|=l,w=u.alternate,w!==null&&(w.lanes|=l),Sc(u.return,l,e),r||(y=null);break e}u=w.next}}else if(o.tag===18){if(y=o.return,y===null)throw Error(a(341));y.lanes|=l,u=y.alternate,u!==null&&(u.lanes|=l),Sc(y,l,e),y=null}else o.tag===13&&o.memoizedState!==null&&o.memoizedState.dehydrated===null?(o.lanes|=l,y=o.alternate,y!==null&&(y.lanes|=l),Sc(o.return,l,e),y=o.child,y=y!==null?y.sibling:null):y=o.child;if(y!==null)y.return=o;else for(y=o;y!==null;){if(y===e){y=null;break}if(o=y.sibling,o!==null){o.return=y.return,y=o;break}y=y.return}o=y}}function os(e,t,l,r){e=null;for(var o=t,u=!1;o!==null;){if(!u){if((o.flags&524288)!==0)u=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var y=o.alternate;if(y===null)throw Error(a(387));if(y=y.memoizedProps,y!==null){var w=o.type;ml(o.pendingProps.value,y.value)||(e!==null?e.push(w):e=[w])}}else if(o===Ee.current){if(y=o.alternate,y===null)throw Error(a(387));y.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(Va):e=[Va])}o=o.return}return e!==null&&ch(t,e,l,r),t.flags|=262144,e!==null}function Ec(e){for(e=e.firstContext;e!==null;){if(!ml(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function us(e){as=e,Ai=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function An(e){return Qy(as,e)}function Rc(e,t){return as===null&&us(e),Qy(e,t)}function Qy(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Ai===null){if(e===null)throw Error(a(308));Ai=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ai=Ai.next=t;return l}var Qw=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},Kw=n.unstable_scheduleCallback,Fw=n.unstable_NormalPriority,an={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function fh(){return{controller:new Qw,data:new Map,refCount:0}}function Bo(e){e.refCount--,e.refCount===0&&Kw(Fw,function(){e.controller.abort()})}function Ky(e,t){if((e.pendingLanes&4194048)!==0){var l=e.transitionTypes;for(l===null&&(l=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];l.indexOf(r)===-1&&l.push(r)}}}var qo=null;function Xw(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Po=null,dh=0,cs=0,pa=null;function Zw(e,t){if(Po===null){var l=Po=[];dh=0,cs=jm(),pa={status:"pending",value:void 0,then:function(r){l.push(r)}}}return dh++,t.then(Fy,Fy),t}function Fy(){if(--dh===0&&(qo=null,Po!==null)){pa!==null&&(pa.status="fulfilled");var e=Po;Po=null,cs=0,pa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Jw(e,t){var l=[],r={status:"pending",value:null,reason:null,then:function(o){l.push(o)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var o=0;o<l.length;o++)(0,l[o])(t)},function(o){for(r.status="rejected",r.reason=o,o=0;o<l.length;o++)(0,l[o])(void 0)}),r}var Xy=q.S;q.S=function(e,t){if(Bv=it(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Zw(e,t),qo!==null)for(var l=_a;l!==null;)Ky(l,qo),l=l.next;if(l=e.types,l!==null){for(var r=_a;r!==null;)Ky(r,l),r=r.next;if(cs!==0){r=qo,r===null&&(r=qo=[]);for(var o=0;o<l.length;o++){var u=l[o];r.indexOf(u)===-1&&r.push(u)}}}Xy!==null&&Xy(e,t)};var fs=he(null);function hh(){var e=fs.current;return e!==null?e:zt.pooledCache}function wc(e,t){t===null?de(fs,fs.current):de(fs,t.pool)}function Zy(){var e=hh();return e===null?null:{parent:an._currentValue,pool:e}}var ya=Error(a(460)),mh=Error(a(474)),Cc=Error(a(542)),Tc={then:function(){}};function Jy(e){return e=e.status,e==="fulfilled"||e==="rejected"}function $y(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(ei,ei),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,eb(e),e===void 0&&!("reason"in t)?Error(a(600)):e;default:if(typeof t.status=="string")t.then(ei,ei);else{if(e=zt,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=r}},function(r){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,eb(e),e}throw hs=t,ya}}function ds(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(hs=l,ya):l}}var hs=null;function Wy(){if(hs===null)throw Error(a(459));var e=hs;return hs=null,e}function eb(e){if(e===ya||e===Cc)throw Error(a(483))}var ba=null,Go=0;function Oc(e){var t=Go;return Go+=1,ba===null&&(ba=[]),$y(ba,e,t)}function ur(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function jc(e,t){throw t.$$typeof===M?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function tb(e){function t(G,I){if(e){var X=G.deletions;X===null?(G.deletions=[I],G.flags|=16):X.push(I)}}function l(G,I){if(!e)return null;for(;I!==null;)t(G,I),I=I.sibling;return null}function r(G){for(var I=new Map;G!==null;)G.key===null?I.set(G.index,G):I.set(G.key,G),G=G.sibling;return I}function o(G,I){return G=Oi(G,I),G.index=0,G.sibling=null,G}function u(G,I,X){return G.index=X,e?(X=G.alternate,X!==null?(X=X.index,X<I?(G.flags|=2,I):X):(G.flags|=134217730,I)):(G.flags|=1048576,I)}function y(G){return e&&G.alternate===null&&(G.flags|=134217730),G}function w(G,I,X,ce){return I===null||I.tag!==6?(I=ih(X,G.mode,ce),I.return=G,I):(I=o(I,X),I.return=G,I)}function k(G,I,X,ce){var De=X.type;return De===re?(G=ee(G,I,X.props.children,ce,X.key),ur(G,X),G):I!==null&&(I.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===K&&ds(De)===I.type)?(I=o(I,X.props),ur(I,X),I.return=G,I):(I=yc(X.type,X.key,X.props,null,G.mode,ce),ur(I,X),I.return=G,I)}function Y(G,I,X,ce){return I===null||I.tag!==4||I.stateNode.containerInfo!==X.containerInfo||I.stateNode.implementation!==X.implementation?(I=rh(X,G.mode,ce),I.return=G,I):(I=o(I,X.children||[]),I.return=G,I)}function ee(G,I,X,ce,De){return I===null||I.tag!==7?(I=rs(X,G.mode,ce,De),I.return=G,I):(I=o(I,X),I.return=G,I)}function fe(G,I,X){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return I=ih(""+I,G.mode,X),I.return=G,I;if(typeof I=="object"&&I!==null){switch(I.$$typeof){case Q:return X=yc(I.type,I.key,I.props,null,G.mode,X),ur(X,I),X.return=G,X;case J:return I=rh(I,G.mode,X),I.return=G,I;case K:return I=ds(I),fe(G,I,X)}if(ae(I)||ie(I))return I=rs(I,G.mode,X,null),I.return=G,I;if(typeof I.then=="function")return fe(G,Oc(I),X);if(I.$$typeof===V)return fe(G,Rc(G,I),X);jc(G,I)}return null}function P(G,I,X,ce){var De=I!==null?I.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return De!==null?null:w(G,I,""+X,ce);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case Q:return X.key===De?k(G,I,X,ce):null;case J:return X.key===De?Y(G,I,X,ce):null;case K:return X=ds(X),P(G,I,X,ce)}if(ae(X)||ie(X))return De!==null?null:ee(G,I,X,ce,null);if(typeof X.then=="function")return P(G,I,Oc(X),ce);if(X.$$typeof===V)return P(G,I,Rc(G,X),ce);jc(G,X)}return null}function Z(G,I,X,ce,De){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return G=G.get(X)||null,w(I,G,""+ce,De);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case Q:return G=G.get(ce.key===null?X:ce.key)||null,k(I,G,ce,De);case J:return G=G.get(ce.key===null?X:ce.key)||null,Y(I,G,ce,De);case K:return ce=ds(ce),Z(G,I,X,ce,De)}if(ae(ce)||ie(ce))return G=G.get(X)||null,ee(I,G,ce,De,null);if(typeof ce.then=="function")return Z(G,I,X,Oc(ce),De);if(ce.$$typeof===V)return Z(G,I,X,Rc(I,ce),De);jc(I,ce)}return null}function Te(G,I,X,ce){for(var De=null,yt=null,Pe=I,Je=I=0,cn=null;Pe!==null&&Je<X.length;Je++){Pe.index>Je?(cn=Pe,Pe=null):cn=Pe.sibling;var bt=P(G,Pe,X[Je],ce);if(bt===null){Pe===null&&(Pe=cn);break}e&&Pe&&bt.alternate===null&&t(G,Pe),I=u(bt,I,Je),yt===null?De=bt:yt.sibling=bt,yt=bt,Pe=cn}if(Je===X.length)return l(G,Pe),ct&&ji(G,Je),De;if(Pe===null){for(;Je<X.length;Je++)Pe=fe(G,X[Je],ce),Pe!==null&&(I=u(Pe,I,Je),yt===null?De=Pe:yt.sibling=Pe,yt=Pe);return ct&&ji(G,Je),De}for(Pe=r(Pe);Je<X.length;Je++)cn=Z(Pe,G,Je,X[Je],ce),cn!==null&&(e&&(bt=cn.alternate,bt!==null&&Pe.delete(bt.key===null?Je:bt.key)),I=u(cn,I,Je),yt===null?De=cn:yt.sibling=cn,yt=cn);return e&&Pe.forEach(function(jr){return t(G,jr)}),ct&&ji(G,Je),De}function Ue(G,I,X,ce){if(X==null)throw Error(a(151));for(var De=null,yt=null,Pe=I,Je=I=0,cn=null,bt=X.next();Pe!==null&&!bt.done;Je++,bt=X.next()){Pe.index>Je?(cn=Pe,Pe=null):cn=Pe.sibling;var jr=P(G,Pe,bt.value,ce);if(jr===null){Pe===null&&(Pe=cn);break}e&&Pe&&jr.alternate===null&&t(G,Pe),I=u(jr,I,Je),yt===null?De=jr:yt.sibling=jr,yt=jr,Pe=cn}if(bt.done)return l(G,Pe),ct&&ji(G,Je),De;if(Pe===null){for(;!bt.done;Je++,bt=X.next())bt=fe(G,bt.value,ce),bt!==null&&(I=u(bt,I,Je),yt===null?De=bt:yt.sibling=bt,yt=bt);return ct&&ji(G,Je),De}for(Pe=r(Pe);!bt.done;Je++,bt=X.next())bt=Z(Pe,G,Je,bt.value,ce),bt!==null&&(e&&(cn=bt.alternate,cn!==null&&Pe.delete(cn.key===null?Je:cn.key)),I=u(bt,I,Je),yt===null?De=bt:yt.sibling=bt,yt=bt);return e&&Pe.forEach(function(MT){return t(G,MT)}),ct&&ji(G,Je),De}function ot(G,I,X,ce){if(typeof X=="object"&&X!==null&&X.type===re&&X.key===null&&X.props.ref===void 0&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case Q:e:{for(var De=X.key;I!==null;){if(I.key===De){if(De=X.type,De===re){if(I.tag===7){l(G,I.sibling),ce=o(I,X.props.children),ur(ce,X),ce.return=G,G=ce;break e}}else if(I.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===K&&ds(De)===I.type){l(G,I.sibling),ce=o(I,X.props),ur(ce,X),ce.return=G,G=ce;break e}l(G,I);break}else t(G,I);I=I.sibling}X.type===re?(ce=rs(X.props.children,G.mode,ce,X.key),ur(ce,X),ce.return=G,G=ce):(ce=yc(X.type,X.key,X.props,null,G.mode,ce),ur(ce,X),ce.return=G,G=ce)}return y(G);case J:e:{for(De=X.key;I!==null;){if(I.key===De)if(I.tag===4&&I.stateNode.containerInfo===X.containerInfo&&I.stateNode.implementation===X.implementation){l(G,I.sibling),ce=o(I,X.children||[]),ce.return=G,G=ce;break e}else{l(G,I);break}else t(G,I);I=I.sibling}ce=rh(X,G.mode,ce),ce.return=G,G=ce}return y(G);case K:return X=ds(X),ot(G,I,X,ce)}if(ae(X))return Te(G,I,X,ce);if(ie(X)){if(De=ie(X),typeof De!="function")throw Error(a(150));return X=De.call(X),Ue(G,I,X,ce)}if(typeof X.then=="function")return ot(G,I,Oc(X),ce);if(X.$$typeof===V)return ot(G,I,Rc(G,X),ce);jc(G,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,I!==null&&I.tag===6?(l(G,I.sibling),ce=o(I,X),ce.return=G,G=ce):(l(G,I),ce=ih(X,G.mode,ce),ce.return=G,G=ce),y(G)):l(G,I)}return function(G,I,X,ce){try{Go=0;var De=ot(G,I,X,ce);return ba=null,De}catch(Pe){if(Pe===ya||Pe===Cc)throw Pe;var yt=sl(29,Pe,null,G.mode);return yt.lanes=ce,yt.return=G,yt}finally{}}}var ms=tb(!0),nb=tb(!1),cr=!1;function gh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ph(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function fr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function dr(e,t,l){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Et&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,t=pc(e),Iy(e,null,l),t}return gc(e,r,t,l),pc(e)}function Yo(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,l|=r,t.lanes=l,$s(e,l)}}function yh(e,t){var l=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,l===r)){var o=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var y={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?o=u=y:u=u.next=y,l=l.next}while(l!==null);u===null?o=u=t:u=u.next=t}else o=u=t;l={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:u,shared:r.shared,callbacks:r.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var bh=!1;function Qo(){if(bh){var e=pa;if(e!==null)throw e}}function Ko(e,t,l,r){bh=!1;var o=e.updateQueue;cr=!1;var u=o.firstBaseUpdate,y=o.lastBaseUpdate,w=o.shared.pending;if(w!==null){o.shared.pending=null;var k=w,Y=k.next;k.next=null,y===null?u=Y:y.next=Y,y=k;var ee=e.alternate;ee!==null&&(ee=ee.updateQueue,w=ee.lastBaseUpdate,w!==y&&(w===null?ee.firstBaseUpdate=Y:w.next=Y,ee.lastBaseUpdate=k))}if(u!==null){var fe=o.baseState;y=0,ee=Y=k=null,w=u;do{var P=w.lane&-536870913,Z=P!==w.lane;if(Z?(pt&P)===P:(r&P)===P){P!==0&&P===cs&&(bh=!0),ee!==null&&(ee=ee.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var Te=e,Ue=w;P=t;var ot=l;switch(Ue.tag){case 1:if(Te=Ue.payload,typeof Te=="function"){fe=Te.call(ot,fe,P);break e}fe=Te;break e;case 3:Te.flags=Te.flags&-65537|128;case 0:if(Te=Ue.payload,P=typeof Te=="function"?Te.call(ot,fe,P):Te,P==null)break e;fe=_({},fe,P);break e;case 2:cr=!0}}P=w.callback,P!==null&&(e.flags|=64,Z&&(e.flags|=8192),Z=o.callbacks,Z===null?o.callbacks=[P]:Z.push(P))}else Z={lane:P,tag:w.tag,payload:w.payload,callback:w.callback,next:null},ee===null?(Y=ee=Z,k=fe):ee=ee.next=Z,y|=P;if(w=w.next,w===null){if(w=o.shared.pending,w===null)break;Z=w,w=Z.next,Z.next=null,o.lastBaseUpdate=Z,o.shared.pending=null}}while(!0);ee===null&&(k=fe),o.baseState=k,o.firstBaseUpdate=Y,o.lastBaseUpdate=ee,u===null&&(o.shared.lanes=0),vr|=y,e.lanes=y,e.memoizedState=fe}}function lb(e,t){if(typeof e!="function")throw Error(a(191,e));e.call(t)}function ib(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)lb(l[e],t)}var hr=he(null),Ac=he(0);function rb(e,t){e=ki,de(Ac,e),de(hr,t),ki=e|t.baseLanes}function vh(){de(Ac,ki),de(hr,hr.current)}function xh(){ki=Ac.current,ye(hr),ye(Ac)}var Nn=he(null),Bn=null;function mr(e){var t=e.alternate;de(Mn,Mn.current&1),de(Nn,e),Bn===null&&(t===null||hr.current!==null||t.memoizedState!==null)&&(Bn=e)}function Sh(e){de(Mn,Mn.current),de(Nn,e),Bn===null&&(Bn=e)}function sb(e){e.tag===22?(de(Mn,Mn.current),de(Nn,e),Bn===null&&(Bn=e)):gr()}function gr(){de(Mn,Mn.current),de(Nn,Nn.current)}function gl(e){ye(Nn),Bn===e&&(Bn=null),ye(Mn)}var Mn=he(0);function Fo(e,t){de(Nn,Nn.current),de(Mn,t)}function Eh(e){ye(Mn),ye(Nn),Bn===e&&(Bn=null)}function Nc(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Gm(l)||Ym(l)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Mi=0,at=null,Mt=null,on=null,Mc=!1,va=!1,gs=!1,zc=0,Xo=0,xa=null,$w=0;function $t(){throw Error(a(321))}function Rh(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!ml(e[l],t[l]))return!1;return!0}function wh(e,t,l,r,o,u){return Mi=u,at=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,q.H=e===null||e.memoizedState===null?Pb:Gb,gs=!1,u=l(r,o),gs=!1,va&&(u=ob(t,l,r,o)),ab(e),u}function ab(e){q.H=Ic;var t=Mt!==null&&Mt.next!==null;if(Mi=0,on=Mt=at=null,Mc=!1,Xo=0,xa=null,t)throw Error(a(300));e===null||un||(e=e.dependencies,e!==null&&Ec(e)&&(un=!0))}function ob(e,t,l,r){at=e;var o=0;do{if(va&&(xa=null),Xo=0,va=!1,25<=o)throw Error(a(301));if(o+=1,on=Mt=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}q.H=sC,u=t(l,r)}while(va);return u}function Ww(){var e=q.H,t=e.useState()[0];return t=typeof t.then=="function"?Zo(t):t,e=e.useState()[0],(Mt!==null?Mt.memoizedState:null)!==e&&(at.flags|=1024),t}function Ch(){var e=zc!==0;return zc=0,e}function Th(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Oh(e){if(Mc){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Mc=!1}Mi=0,on=Mt=at=null,va=!1,Xo=zc=0,xa=null}function Zn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return on===null?at.memoizedState=on=e:on=on.next=e,on}function rn(){if(Mt===null){var e=at.alternate;e=e!==null?e.memoizedState:null}else e=Mt.next;var t=on===null?at.memoizedState:on.next;if(t!==null)on=t,Mt=e;else{if(e===null)throw at.alternate===null?Error(a(467)):Error(a(310));Mt=e,e={memoizedState:Mt.memoizedState,baseState:Mt.baseState,baseQueue:Mt.baseQueue,queue:Mt.queue,next:null},on===null?at.memoizedState=on=e:on=on.next=e}return on}function Dc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Zo(e){var t=Xo;return Xo+=1,xa===null&&(xa=[]),e=$y(xa,e,t),t=at,(on===null?t.memoizedState:on.next)===null&&(t=t.alternate,q.H=t===null||t.memoizedState===null?Pb:Gb),e}function _c(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Zo(e);if(e.$$typeof===B)return;if(e.$$typeof===V)return An(e)}throw Error(a(438,String(e)))}function jh(e){var t=null,l=at.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var r=at.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Dc(),at.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),r=0;r<e;r++)l[r]=Oe;return t.index++,l}function zi(e,t){return typeof t=="function"?t(e):t}function kc(e){var t=rn();return Ah(t,Mt,e)}function Ah(e,t,l){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=l;var o=e.baseQueue,u=r.pending;if(u!==null){if(o!==null){var y=o.next;o.next=u.next,u.next=y}t.baseQueue=o=u,r.pending=null}if(u=e.baseState,o===null)e.memoizedState=u;else{t=o.next;var w=y=null,k=null,Y=t,ee=!1;do{var fe=Y.lane&-536870913;if(fe!==Y.lane?(pt&fe)===fe:(Mi&fe)===fe){var P=Y.revertLane;if(P===0)k!==null&&(k=k.next={lane:0,revertLane:0,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),fe===cs&&(ee=!0);else if((Mi&P)===P){Y=Y.next,P===cs&&(ee=!0);continue}else fe={lane:0,revertLane:Y.revertLane,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},k===null?(w=k=fe,y=u):k=k.next=fe,at.lanes|=P,vr|=P;fe=Y.action,gs&&l(u,fe),u=Y.hasEagerState?Y.eagerState:l(u,fe)}else P={lane:fe,revertLane:Y.revertLane,gesture:Y.gesture,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},k===null?(w=k=P,y=u):k=k.next=P,at.lanes|=fe,vr|=fe;Y=Y.next}while(Y!==null&&Y!==t);if(k===null?y=u:k.next=w,!ml(u,e.memoizedState)&&(un=!0,ee&&(l=pa,l!==null)))throw l;e.memoizedState=u,e.baseState=y,e.baseQueue=k,r.lastRenderedState=u}return o===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Nh(e){var t=rn(),l=t.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=e;var r=l.dispatch,o=l.pending,u=t.memoizedState;if(o!==null){l.pending=null;var y=o=o.next;do u=e(u,y.action),y=y.next;while(y!==o);ml(u,t.memoizedState)||(un=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),l.lastRenderedState=u}return[u,r]}function ub(e,t,l){var r=at,o=rn(),u=ct;if(u){if(l===void 0)throw Error(a(407));l=l()}else l=t();var y=!ml((Mt||o).memoizedState,l);if(y&&(o.memoizedState=l,un=!0),o=o.queue,Dh(db.bind(null,r,o,e),[e]),e=o.getSnapshot!==t||y||on!==null&&(on.memoizedState.tag&1)!==0,Sa(e?9:8,{destroy:void 0},fb.bind(null,r,o,l,t),null),e){if(r.flags|=2048,zt===null)throw Error(a(349));u||(Mi&127)!==0||cb(r,t,l)}return l}function cb(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=at.updateQueue,t===null?(t=Dc(),at.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function fb(e,t,l,r){t.value=l,t.getSnapshot=r,hb(t)&&mb(e)}function db(e,t,l){return l(function(){hb(t)&&mb(e)})}function hb(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!ml(e,l)}catch{return!0}}function mb(e){var t=is(e,2);t!==null&&cl(t,e,2)}function Mh(e){var t=Zn();if(typeof e=="function"){var l=e;if(e=l(),gs){Zt(!0);try{l()}finally{Zt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:e},t}function gb(e,t,l,r){return e.baseState=l,Ah(e,Mt,typeof r=="function"?r:zi)}function eC(e,t,l,r,o){if(Hc(e))throw Error(a(485));if(e=t.action,e!==null){var u={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){u.listeners.push(y)}};q.T!==null?l(!0):u.isTransition=!1,r(u),l=t.pending,l===null?(u.next=t.pending=u,pb(t,u)):(u.next=l.next,t.pending=l.next=u)}}function pb(e,t){var l=t.action,r=t.payload,o=e.state;if(t.isTransition){var u=q.T,y={};y.types=u!==null?u.types:null,q.T=y;try{var w=l(o,r),k=q.S;k!==null&&k(y,w),yb(e,t,w)}catch(Y){zh(e,t,Y)}finally{u!==null&&y.types!==null&&(u.types=y.types),q.T=u}}else try{u=l(o,r),yb(e,t,u)}catch(Y){zh(e,t,Y)}}function yb(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(r){bb(e,t,r)},function(r){return zh(e,t,r)}):bb(e,t,l)}function bb(e,t,l){t.status="fulfilled",t.value=l,vb(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,pb(e,l)))}function zh(e,t,l){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=l,vb(t),t=t.next;while(t!==r)}e.action=null}function vb(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function xb(e,t){return t}function Sb(e,t){if(ct){var l=zt.formState;if(l!==null){e:{var r=at;if(ct){if(_t){t:{for(var o=_t,u=Dl;o.nodeType!==8;){if(!u){o=null;break t}if(o=kl(o.nextSibling),o===null){o=null;break t}}u=o.data,o=u==="F!"||u==="F"?o:null}if(o){_t=kl(o.nextSibling),r=o.data==="F!";break e}}ar(r)}r=!1}r&&(t=l[0])}}return l=Zn(),l.memoizedState=l.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xb,lastRenderedState:t},l.queue=r,l=Vb.bind(null,at,r),r.dispatch=l,r=Mh(!1),u=Hh.bind(null,at,!1,r.queue),r=Zn(),o={state:t,dispatch:null,action:e,pending:null},r.queue=o,l=eC.bind(null,at,o,u,l),o.dispatch=l,r.memoizedState=e,[t,l,!1]}function Eb(e){var t=rn();return Rb(t,Mt,e)}function Rb(e,t,l){if(t=Ah(e,t,xb)[0],e=kc(zi)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=Zo(t)}catch(y){throw y===ya?Cc:y}else r=t;t=rn();var o=t.queue,u=o.dispatch;return l!==t.memoizedState&&(at.flags|=2048,Sa(9,{destroy:void 0},tC.bind(null,o,l),null)),[r,u,e]}function tC(e,t){e.action=t}function wb(e){var t=rn(),l=Mt;if(l!==null)return Rb(t,l,e);rn(),t=t.memoizedState,l=rn();var r=l.queue.dispatch;return l.memoizedState=e,[t,r,!1]}function Sa(e,t,l,r){return e={tag:e,create:l,deps:r,inst:t,next:null},t=at.updateQueue,t===null&&(t=Dc(),at.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(r=l.next,l.next=e,e.next=r,t.lastEffect=e),e}function Cb(){return rn().memoizedState}function Lc(e,t,l,r){var o=Zn();at.flags|=e,o.memoizedState=Sa(1|t,{destroy:void 0},l,r===void 0?null:r)}function Uc(e,t,l,r){var o=rn();r=r===void 0?null:r;var u=o.memoizedState.inst;Mt!==null&&r!==null&&Rh(r,Mt.memoizedState.deps)?o.memoizedState=Sa(t,u,l,r):(at.flags|=e,o.memoizedState=Sa(1|t,u,l,r))}function Tb(e,t){Lc(8390656,8,e,t)}function Dh(e,t){Uc(2048,8,e,t)}function nC(e){at.flags|=4;var t=at.updateQueue;if(t===null)t=Dc(),at.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Ob(e){var t=rn().memoizedState;return nC({ref:t,nextImpl:e}),function(){if((Et&2)!==0)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function jb(e,t){return Uc(4,2,e,t)}function Ab(e,t){return Uc(4,4,e,t)}function Nb(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Mb(e,t,l){l=l!=null?l.concat([e]):null,Uc(4,4,Nb.bind(null,t,e),l)}function _h(){}function zb(e,t){var l=rn();t=t===void 0?null:t;var r=l.memoizedState;return t!==null&&Rh(t,r[1])?r[0]:(l.memoizedState=[e,t],e)}function Db(e,t){var l=rn();t=t===void 0?null:t;var r=l.memoizedState;if(t!==null&&Rh(t,r[1]))return r[0];if(r=e(),gs){Zt(!0);try{e()}finally{Zt(!1)}}return l.memoizedState=[r,t],r}function kh(e,t,l){return l===void 0||(Mi&1073741824)!==0&&(pt&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Pv(),at.lanes|=e,vr|=e,l)}function _b(e,t,l,r){return ml(l,t)?l:hr.current!==null?(e=kh(e,l,r),ml(e,t)||(un=!0),e):(Mi&106)===0||(Mi&1073741824)!==0&&(pt&261930)===0?(un=!0,e.memoizedState=l):(e=Pv(),at.lanes|=e,vr|=e,t)}function kb(e,t,l,r,o){var u=le.p;le.p=u!==0&&8>u?u:8;var y=q.T,w={};w.types=y!==null?y.types:null,q.T=w,Hh(e,!1,t,l);try{var k=o(),Y=q.S;if(Y!==null&&Y(w,k),k!==null&&typeof k=="object"&&typeof k.then=="function"){var ee=Jw(k,r);Jo(e,t,ee,vl(e))}else Jo(e,t,r,vl(e))}catch(fe){Jo(e,t,{then:function(){},status:"rejected",reason:fe},vl())}finally{le.p=u,y!==null&&w.types!==null&&(y.types=w.types),q.T=y}}function lC(){}function Lh(e,t,l,r){if(e.tag!==5)throw Error(a(476));var o=Lb(e).queue;kb(e,o,t,pe,l===null?lC:function(){return Ub(e),l(r)})}function Lb(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:pe},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ub(e){var t=Lb(e);t.next===null&&(t=e.alternate.memoizedState),Jo(e,t.next.queue,{},vl())}function Uh(){return An(Va)}function Hb(){return rn().memoizedState}function Ib(){return rn().memoizedState}function iC(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=vl();e=fr(l);var r=dr(t,e,l);r!==null&&(cl(r,t,l),Yo(r,t,l)),t={cache:fh()},e.payload=t;return}t=t.return}}function rC(e,t,l){var r=vl();l={lane:r,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Hc(e)?Bb(t,l):(l=nh(e,t,l,r),l!==null&&(cl(l,e,r),qb(l,t,r)))}function Vb(e,t,l){var r=vl();Jo(e,t,l,r)}function Jo(e,t,l,r){var o={lane:r,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Hc(e))Bb(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var y=t.lastRenderedState,w=u(y,l);if(o.hasEagerState=!0,o.eagerState=w,ml(w,y))return gc(e,t,o,0),zt===null&&mc(),!1}catch{}finally{}if(l=nh(e,t,o,r),l!==null)return cl(l,e,r),qb(l,t,r),!0}return!1}function Hh(e,t,l,r){if(r={lane:2,revertLane:jm(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Hc(e)){if(t)throw Error(a(479))}else t=nh(e,l,r,2),t!==null&&cl(t,e,2)}function Hc(e){var t=e.alternate;return e===at||t!==null&&t===at}function Bb(e,t){va=Mc=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function qb(e,t,l){if((l&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,l|=r,t.lanes=l,$s(e,l)}}var Ic={readContext:An,use:_c,useCallback:$t,useContext:$t,useEffect:$t,useImperativeHandle:$t,useLayoutEffect:$t,useInsertionEffect:$t,useMemo:$t,useReducer:$t,useRef:$t,useState:$t,useDebugValue:$t,useDeferredValue:$t,useTransition:$t,useSyncExternalStore:$t,useId:$t,useHostTransitionStatus:$t,useFormState:$t,useActionState:$t,useOptimistic:$t,useMemoCache:$t,useCacheRefresh:$t,useEffectEvent:$t},Pb={readContext:An,use:_c,useCallback:function(e,t){return Zn().memoizedState=[e,t===void 0?null:t],e},useContext:An,useEffect:Tb,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Lc(4194308,4,Nb.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Lc(4194308,4,e,t)},useInsertionEffect:function(e,t){Lc(4,2,e,t)},useMemo:function(e,t){var l=Zn();t=t===void 0?null:t;var r=e();if(gs){Zt(!0);try{e()}finally{Zt(!1)}}return l.memoizedState=[r,t],r},useReducer:function(e,t,l){var r=Zn();if(l!==void 0){var o=l(t);if(gs){Zt(!0);try{l(t)}finally{Zt(!1)}}}else o=t;return r.memoizedState=r.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},r.queue=e,e=e.dispatch=rC.bind(null,at,e),[r.memoizedState,e]},useRef:function(e){var t=Zn();return e={current:e},t.memoizedState=e},useState:function(e){e=Mh(e);var t=e.queue,l=Vb.bind(null,at,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:_h,useDeferredValue:function(e,t){var l=Zn();return kh(l,e,t)},useTransition:function(){var e=Mh(!1);return e=kb.bind(null,at,e.queue,!0,!1),Zn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var r=at,o=Zn();if(ct){if(l===void 0)throw Error(a(407));l=l()}else{if(l=t(),zt===null)throw Error(a(349));(pt&127)!==0||cb(r,t,l)}o.memoizedState=l;var u={value:l,getSnapshot:t};return o.queue=u,Tb(db.bind(null,r,u,e),[e]),r.flags|=2048,Sa(9,{destroy:void 0},fb.bind(null,r,u,l,t),null),l},useId:function(){var e=Zn(),t=zt.identifierPrefix;if(ct){var l=ni,r=ti;l=(r&~(1<<32-Qe(r)-1)).toString(32)+l,t="_"+t+"R_"+l,l=zc++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=$w++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Uh,useFormState:Sb,useActionState:Sb,useOptimistic:function(e){var t=Zn();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Hh.bind(null,at,!0,l),l.dispatch=t,[e,t]},useMemoCache:jh,useCacheRefresh:function(){return Zn().memoizedState=iC.bind(null,at)},useEffectEvent:function(e){var t=Zn(),l={impl:e};return t.memoizedState=l,function(){if((Et&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},Gb={readContext:An,use:_c,useCallback:zb,useContext:An,useEffect:Dh,useImperativeHandle:Mb,useInsertionEffect:jb,useLayoutEffect:Ab,useMemo:Db,useReducer:kc,useRef:Cb,useState:function(){return kc(zi)},useDebugValue:_h,useDeferredValue:function(e,t){var l=rn();return _b(l,Mt.memoizedState,e,t)},useTransition:function(){var e=kc(zi)[0],t=rn().memoizedState;return[typeof e=="boolean"?e:Zo(e),t]},useSyncExternalStore:ub,useId:Hb,useHostTransitionStatus:Uh,useFormState:Eb,useActionState:Eb,useOptimistic:function(e,t){var l=rn();return gb(l,Mt,e,t)},useMemoCache:jh,useCacheRefresh:Ib,useEffectEvent:Ob},sC={readContext:An,use:_c,useCallback:zb,useContext:An,useEffect:Dh,useImperativeHandle:Mb,useInsertionEffect:jb,useLayoutEffect:Ab,useMemo:Db,useReducer:Nh,useRef:Cb,useState:function(){return Nh(zi)},useDebugValue:_h,useDeferredValue:function(e,t){var l=rn();return Mt===null?kh(l,e,t):_b(l,Mt.memoizedState,e,t)},useTransition:function(){var e=Nh(zi)[0],t=rn().memoizedState;return[typeof e=="boolean"?e:Zo(e),t]},useSyncExternalStore:ub,useId:Hb,useHostTransitionStatus:Uh,useFormState:wb,useActionState:wb,useOptimistic:function(e,t){var l=rn();return Mt!==null?gb(l,Mt,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:jh,useCacheRefresh:Ib,useEffectEvent:Ob};function Ih(e,t,l,r){t=e.memoizedState,l=l(r,t),l=l==null?t:_({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Vh={enqueueSetState:function(e,t,l){e=e._reactInternals;var r=vl(),o=fr(r);o.payload=t,l!=null&&(o.callback=l),t=dr(e,o,r),t!==null&&(cl(t,e,r),Yo(t,e,r))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var r=vl(),o=fr(r);o.tag=1,o.payload=t,l!=null&&(o.callback=l),t=dr(e,o,r),t!==null&&(cl(t,e,r),Yo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=vl(),r=fr(l);r.tag=2,t!=null&&(r.callback=t),t=dr(e,r,l),t!==null&&(cl(t,e,l),Yo(t,e,l))}};function Yb(e,t,l,r,o,u,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,u,y):t.prototype&&t.prototype.isPureReactComponent?!Uo(l,r)||!Uo(o,u):!0}function Qb(e,t,l,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,r),t.state!==e&&Vh.enqueueReplaceState(t,t.state,null)}function ps(e,t){var l=t;if("ref"in t){l={};for(var r in t)r!=="ref"&&(l[r]=t[r])}if(e=e.defaultProps){l===t&&(l=_({},l));for(var o in e)l[o]===void 0&&(l[o]=e[o])}return l}function Kb(e){hc(e)}function Fb(e){console.error(e)}function Xb(e){hc(e)}function Vc(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function Zb(e,t,l){try{var r=e.onCaughtError;r(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Bh(e,t,l){return l=fr(l),l.tag=3,l.payload={element:null},l.callback=function(){Vc(e,t)},l}function Jb(e){return e=fr(e),e.tag=3,e}function $b(e,t,l,r){var o=l.type.getDerivedStateFromError;if(typeof o=="function"){var u=r.value;e.payload=function(){return o(u)},e.callback=function(){Zb(t,l,r)}}var y=l.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Zb(t,l,r),typeof o!="function"&&(xr===null?xr=new Set([this]):xr.add(this));var w=r.stack;this.componentDidCatch(r.value,{componentStack:w!==null?w:""})})}function aC(e,t,l,r,o){if(l.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=l.alternate,t!==null&&os(t,l,o,!0),l=Nn.current,l!==null){switch(l.tag){case 31:case 13:case 19:return Bn===null?of():l.alternate===null&&Wt===0&&(Wt=3),l.flags&=-257,l.flags|=65536,l.lanes=o,r===Tc?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([r]):t.add(r),Cm(e,r,o)),!1;case 22:return l.flags|=65536,r===Tc?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([r]):l.add(r)),Cm(e,r,o)),!1}throw Error(a(435,l.tag))}return Cm(e,r,o),of(),!1}if(ct)return t=Nn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,r!==ah&&(e=Error(a(422),{cause:r}),Vo(Nl(e,l)))):(r!==ah&&(t=Error(a(423),{cause:r}),Vo(Nl(t,l))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,r=Nl(r,l),o=Bh(e.stateNode,r,o),yh(e,o),Wt!==4&&(Wt=2)),!1;var u=Error(a(520),{cause:r});if(u=Nl(u,l),ru===null?ru=[u]:ru.push(u),Wt!==4&&(Wt=2),t===null)return!0;r=Nl(r,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=o&-o,l.lanes|=e,e=Bh(l.stateNode,r,e),yh(l,e),!1;case 1:if(t=l.type,u=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(xr===null||!xr.has(u))))return l.flags|=65536,o&=-o,l.lanes|=o,o=Jb(o),$b(o,e,l,r),yh(l,o),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var qh=Error(a(461)),un=!1;function yn(e,t,l,r){t.child=e===null?nb(t,null,l,r):ms(t,e.child,l,r)}function Wb(e,t,l,r,o){l=l.render;var u=t.ref;if("ref"in r){var y={};for(var w in r)w!=="ref"&&(y[w]=r[w])}else y=r;return us(t),r=wh(e,t,l,y,u,o),w=Ch(),e!==null&&!un?(Th(e,t,o),Di(e,t,o)):(ct&&w&&vc(t),t.flags|=1,yn(e,t,r,o),t.child)}function ev(e,t,l,r,o){if(e===null){var u=l.type;return typeof u=="function"&&!lh(u)&&u.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=u,tv(e,t,u,r,o)):(e=yc(l.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Zh(e,o)){var y=u.memoizedProps;if(l=l.compare,l=l!==null?l:Uo,l(y,r)&&e.ref===t.ref)return Di(e,t,o)}return t.flags|=1,e=Oi(u,r),e.ref=t.ref,e.return=t,t.child=e}function tv(e,t,l,r,o){if(e!==null){var u=e.memoizedProps;if(Uo(u,r)&&e.ref===t.ref)if(un=!1,t.pendingProps=r=u,Zh(e,o))(e.flags&131072)!==0&&(un=!0);else return t.lanes=e.lanes,Di(e,t,o)}return Ph(e,t,l,r,o)}function nv(e,t,l,r){var o=r.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|l:l,e!==null){for(r=t.child=e.child,o=0;r!==null;)o=o|r.lanes|r.childLanes,r=r.sibling;r=o&~u}else r=0,t.child=null;return lv(e,t,u,l,r)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&wc(t,u!==null?u.cachePool:null),u!==null?rb(t,u):vh(),sb(t);else return r=t.lanes=536870912,lv(e,t,u!==null?u.baseLanes|l:l,l,r)}else u!==null?(wc(t,u.cachePool),rb(t,u),gr(),t.memoizedState=null):(e!==null&&wc(t,null),vh(),gr());return yn(e,t,o,l),t.child}function $o(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function lv(e,t,l,r,o){var u=hh();return u=u===null?null:{parent:an._currentValue,pool:u},t.memoizedState={baseLanes:l,cachePool:u},e!==null&&wc(t,null),vh(),sb(t),e!==null&&os(e,t,r,!0),t.childLanes=o,null}function Bc(e,t){return t=qc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function iv(e,t,l){return ms(t,e.child,null,l),e=Bc(t,t.pendingProps),e.flags|=2,gl(t),t.memoizedState=null,e}function oC(e,t,l){var r=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ct){if(r.mode==="hidden")return e=Bc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},$o(null,e);if(Sh(t),(e=_t)?(e=Nx(e,Dl),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:rr!==null?{id:ti,overflow:ni}:null,retryLane:536870912,hydrationErrors:null},l=By(e),l.return=t,t.child=l,Rn=t,_t=null)):e=null,e===null)throw ar(t);return t.lanes=536870912,null}return Bc(t,r)}var u=e.memoizedState;if(u!==null){var y=u.dehydrated;if(Sh(t),o)if(t.flags&256)t.flags&=-257,t=iv(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(un||os(e,t,l,!1),o=(l&e.childLanes)!==0,un||o){if(hr.current===null){if(r=zt,r!==null&&(y=tc(r,l),y!==0&&y!==u.retryLane))throw u.retryLane=y,is(e,y),cl(r,e,y),qh;of()}t=iv(e,t,l)}else e=u.treeContext,_t=kl(y.nextSibling),Rn=t,ct=!0,sr=null,Dl=!1,e!==null&&Gy(t,e),t=Bc(t,r),t.flags|=134221824;return t}return e=Oi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ea(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Ph(e,t,l,r,o){return us(t),l=wh(e,t,l,r,void 0,o),r=Ch(),e!==null&&!un?(Th(e,t,o),Di(e,t,o)):(ct&&r&&vc(t),t.flags|=1,yn(e,t,l,o),t.child)}function rv(e,t,l,r,o,u){return us(t),t.updateQueue=null,l=ob(t,r,l,o),ab(e),r=Ch(),e!==null&&!un?(Th(e,t,u),Di(e,t,u)):(ct&&r&&vc(t),t.flags|=1,yn(e,t,l,u),t.child)}function sv(e,t,l,r,o){if(us(t),t.stateNode===null){var u=da,y=l.contextType;typeof y=="object"&&y!==null&&(u=An(y)),u=new l(r,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Vh,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=r,u.state=t.memoizedState,u.refs={},gh(t),y=l.contextType,u.context=typeof y=="object"&&y!==null?An(y):da,u.state=t.memoizedState,y=l.getDerivedStateFromProps,typeof y=="function"&&(Ih(t,l,y,r),u.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(y=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),y!==u.state&&Vh.enqueueReplaceState(u,u.state,null),Ko(t,r,u,o),Qo(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){u=t.stateNode;var w=t.memoizedProps,k=ps(l,w);u.props=k;var Y=u.context,ee=l.contextType;y=da,typeof ee=="object"&&ee!==null&&(y=An(ee));var fe=l.getDerivedStateFromProps;ee=typeof fe=="function"||typeof u.getSnapshotBeforeUpdate=="function",w=t.pendingProps!==w,ee||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(w||Y!==y)&&Qb(t,u,r,y),cr=!1;var P=t.memoizedState;u.state=P,Ko(t,r,u,o),Qo(),Y=t.memoizedState,w||P!==Y||cr?(typeof fe=="function"&&(Ih(t,l,fe,r),Y=t.memoizedState),(k=cr||Yb(t,l,k,r,P,Y,y))?(ee||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=Y),u.props=r,u.state=Y,u.context=y,r=k):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{u=t.stateNode,ph(e,t),y=t.memoizedProps,ee=ps(l,y),u.props=ee,fe=t.pendingProps,P=u.context,Y=l.contextType,k=da,typeof Y=="object"&&Y!==null&&(k=An(Y)),w=l.getDerivedStateFromProps,(Y=typeof w=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(y!==fe||P!==k)&&Qb(t,u,r,k),cr=!1,P=t.memoizedState,u.state=P,Ko(t,r,u,o),Qo();var Z=t.memoizedState;y!==fe||P!==Z||cr||e!==null&&e.dependencies!==null&&Ec(e.dependencies)?(typeof w=="function"&&(Ih(t,l,w,r),Z=t.memoizedState),(ee=cr||Yb(t,l,ee,r,P,Z,k)||e!==null&&e.dependencies!==null&&Ec(e.dependencies))?(Y||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(r,Z,k),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(r,Z,k)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||y===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=Z),u.props=r,u.state=Z,u.context=k,r=ee):(typeof u.componentDidUpdate!="function"||y===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),r=!1)}return u=r,Ea(e,t),r=(t.flags&128)!==0,u||r?(u=t.stateNode,l=r&&typeof l.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&r?(t.child=ms(t,e.child,null,o),t.child=ms(t,null,l,o)):yn(e,t,l,o),t.memoizedState=u.state,e=t.child):e=Di(e,t,o),e}function av(e,t,l,r){return ss(),t.flags|=256,yn(e,t,l,r),t.child}var Gh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yh(e){return{baseLanes:e,cachePool:Zy()}}function Qh(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=bl),e}function ov(e,t,l){var r=t.pendingProps,o=!1,u=(t.flags&128)!==0,y;if((y=u)||(y=e!==null&&e.memoizedState===null?!1:(Mn.current&2)!==0),y&&(o=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(ct){if(o?mr(t):gr(),(e=_t)?(e=Nx(e,Dl),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:rr!==null?{id:ti,overflow:ni}:null,retryLane:536870912,hydrationErrors:null},l=By(e),l.return=t,t.child=l,Rn=t,_t=null)):e=null,e===null)throw ar(t);return Ym(e)?t.lanes=32:t.lanes=536870912,null}return u=r.children,r=r.fallback,o?(gr(),o=t.mode,u=qc({mode:"hidden",children:u},o),r=rs(r,o,l,null),u.return=t,r.return=t,u.sibling=r,t.child=u,r=t.child,r.memoizedState=Yh(l),r.childLanes=Qh(e,y,l),t.memoizedState=Gh,$o(null,r)):(mr(t),Kh(t,u))}var w=e.memoizedState;if(w!==null){var k=w.dehydrated;if(k!==null)return uC(e,t,u,y,r,k,w,l)}return o?(gr(),o=r.fallback,u=t.mode,w=e.child,k=w.sibling,r=Oi(w,{mode:"hidden",children:r.children}),r.subtreeFlags=w.subtreeFlags&1206910976,k!==null?o=Oi(k,o):(o=rs(o,u,l,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,$o(null,r),r=t.child,o=e.child.memoizedState,o===null?o=Yh(l):(u=o.cachePool,u!==null?(w=an._currentValue,u=u.parent!==w?{parent:w,pool:w}:u):u=Zy(),o={baseLanes:o.baseLanes|l,cachePool:u}),r.memoizedState=o,r.childLanes=Qh(e,y,l),t.memoizedState=Gh,$o(e.child,r)):(mr(t),l=e.child,e=l.sibling,l=Oi(l,{mode:"visible",children:r.children}),l.return=t,l.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=l,t.memoizedState=null,l)}function Kh(e,t){return t=qc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function qc(e,t){return e=sl(22,e,null,t),e.lanes=0,e}function Pc(e,t,l){return ms(t,e.child,null,l),e=Kh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function uC(e,t,l,r,o,u,y,w){if(l)return t.flags&256?(mr(t),t.flags&=-257,Pc(e,t,w)):t.memoizedState!==null?(gr(),t.child=e.child,t.flags|=128,null):(gr(),u=o.fallback,y=t.mode,o=qc({mode:"visible",children:o.children},y),u=rs(u,y,w,null),u.flags|=2,o.return=t,u.return=t,o.sibling=u,t.child=o,ms(t,e.child,null,w),o=t.child,o.memoizedState=Yh(w),o.childLanes=Qh(e,r,w),t.memoizedState=Gh,$o(null,o));if(mr(t),Ym(u)){if(r=u.nextSibling&&u.nextSibling.dataset,r)var k=r.dgst;return r=k,r!==""&&(o=Error(a(419)),o.stack="",o.digest=r,Vo({value:o,source:null,stack:null})),Pc(e,t,w)}if(un||os(e,t,w,!1),r=(w&e.childLanes)!==0,un||r){if(hr.current!==null)return Pc(e,t,w);if(r=zt,r!==null&&(o=tc(r,w),o!==0&&o!==y.retryLane))throw y.retryLane=o,is(e,o),cl(r,e,o),qh;return Gm(u)||of(),Pc(e,t,w)}return Gm(u)?(t.flags|=192,t.child=e.child,null):(e=y.treeContext,_t=kl(u.nextSibling),Rn=t,ct=!0,sr=null,Dl=!1,e!==null&&Gy(t,e),t=Kh(t,o.children),t.flags|=134221824,t)}function uv(e,t,l){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Sc(e.return,t,l)}function cv(e){for(var t=null;e!==null;){var l=e.alternate;l!==null&&Nc(l)===null&&(t=e),e=e.sibling}return t}function Gc(e,t,l,r,o,u){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:l,tailMode:o,treeForkCount:u}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=r,y.tail=l,y.tailMode=o,y.treeForkCount=u)}function Fh(e){var t=e.child;for(e.child=null;t!==null;){var l=t.sibling;t.sibling=e.child,e.child=t,t=l}}function Xh(e,t,l){var r=t.pendingProps,o=r.revealOrder,u=r.tail;r=r.children;var y=Mn.current;if(t.flags&128)return Fo(t,y),null;var w=(y&2)!==0;if(w?(y=y&1|2,t.flags|=128):y&=1,Fo(t,y),o==="backwards"&&e!==null?(Fh(e),yn(e,t,r,l),Fh(e)):yn(e,t,r,l),r=ct?Io:0,!w&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&uv(e,l,t);else if(e.tag===19)uv(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"backwards":l=cv(t.child),l===null?(o=t.child,t.child=null):(o=l.sibling,l.sibling=null,Fh(t)),Gc(t,!0,o,null,u,r);break;case"unstable_legacy-backwards":for(l=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Nc(e)===null){t.child=o;break}e=o.sibling,o.sibling=l,l=o,o=e}Gc(t,!0,l,null,u,r);break;case"together":Gc(t,!1,null,null,void 0,r);break;case"independent":t.memoizedState=null;break;default:l=cv(t.child),l===null?(o=t.child,t.child=null):(o=l.sibling,l.sibling=null),Gc(t,!1,o,l,u,r)}return t.child}function fv(e,t,l){var r=t.pendingProps;return or(t,t.type,r.value),yn(e,t,r.children,l),t.child}function Di(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),vr|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(os(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,l=Oi(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Oi(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Zh(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ec(e)))}function cC(e,t,l){switch(t.tag){case 3:ve(t,t.stateNode.containerInfo),or(t,an,e.memoizedState.cache),ss();break;case 27:case 5:xe(t);break;case 4:ve(t,t.stateNode.containerInfo);break;case 10:or(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Sh(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return mr(t),t.flags|=128,null;r=os(e,t,l,!1);var o=t.child.childLanes;return r||(l&o)!==0?ov(e,t,l):(mr(t),e=Di(e,t,l),e!==null?e.sibling:null)}mr(t);break;case 19:if(t.flags&128)return Xh(e,t,l);if(o=(e.flags&128)!==0,r=(l&t.childLanes)!==0,r||(os(e,t,l,!1),r=(l&t.childLanes)!==0),o){if(r)return Xh(e,t,l);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Fo(t,Mn.current),r)break;return null;case 22:return t.lanes=0,nv(e,t,l,t.pendingProps);case 24:or(t,an,e.memoizedState.cache)}return Di(e,t,l)}function dv(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)un=!0;else{if(!Zh(e,l)&&(t.flags&128)===0)return un=!1,cC(e,t,l);un=(e.flags&131072)!==0}else un=!1,ct&&(t.flags&1048576)!==0&&Py(t,Io,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=ds(t.elementType),t.type=e,typeof e=="function")lh(e)?(r=ps(e,r),t.tag=1,t=sv(null,t,e,r,l)):(t.tag=0,t=Ph(null,t,e,r,l));else{if(e!=null){var o=e.$$typeof;if(o===H){t.tag=11,t=Wb(null,t,e,r,l);break e}else if(o===se){t.tag=14,t=ev(null,t,e,r,l);break e}else if(o===V){t.tag=10,t.type=e,t=fv(null,t,l);break e}}throw t=me(e)||e,Error(a(306,t,""))}}return t;case 0:return Ph(e,t,t.type,t.pendingProps,l);case 1:return r=t.type,o=ps(r,t.pendingProps),sv(e,t,r,o,l);case 3:e:{if(ve(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var u=t.memoizedState;o=u.element,ph(e,t),Ko(t,r,null,l);var y=t.memoizedState;if(r=y.cache,or(t,an,r),r!==u.cache&&ch(t,[an],l,!0),Qo(),r=y.element,u.isDehydrated)if(u={element:r,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=av(e,t,r,l);break e}else if(r!==o){o=Nl(Error(a(424)),t),Vo(o),t=av(e,t,r,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(_t=kl(e.firstChild),Rn=t,ct=!0,sr=null,Dl=!0,l=nb(t,null,r,l),t.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(ss(),r===o){t=Di(e,t,l);break e}yn(e,t,r,l)}t=t.child}return t;case 26:return Ea(e,t),e===null?(l=Ux(t.type,null,t.pendingProps,null))?t.memoizedState=l:ct||(t.stateNode=px(t.type,t.pendingProps,je.current,t)):t.memoizedState=Ux(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return xe(t),e===null&&ct&&(r=t.stateNode=Dx(t.type,t.pendingProps,je.current),Rn=t,Dl=!0,o=_t,Rr(t.type)?(Qm=o,_t=kl(r.firstChild)):_t=o),yn(e,t,t.pendingProps.children,l),Ea(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ct&&((o=r=_t)&&(r=iT(r,t.type,t.pendingProps,Dl),r!==null?(t.stateNode=r,Rn=t,_t=kl(r.firstChild),Dl=!1,o=!0):o=!1),o||ar(t)),xe(t),o=t.type,u=t.pendingProps,y=e!==null?e.memoizedProps:null,r=u.children,Um(o,u)?r=null:y!==null&&Um(o,y)&&(t.flags|=32),t.memoizedState!==null&&(o=wh(e,t,Ww,null,null,l),Va._currentValue=o),Ea(e,t),yn(e,t,r,l),t.child;case 6:return e===null&&ct&&((e=l=_t)&&(l=rT(l,t.pendingProps,Dl),l!==null?(t.stateNode=l,Rn=t,_t=null,e=!0):e=!1),e||ar(t)),null;case 13:return ov(e,t,l);case 4:return ve(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ms(t,null,r,l):yn(e,t,r,l),t.child;case 11:return Wb(e,t,t.type,t.pendingProps,l);case 7:return r=t.pendingProps,Ea(e,t),yn(e,t,r,l),t.child;case 8:return yn(e,t,t.pendingProps.children,l),t.child;case 12:return yn(e,t,t.pendingProps.children,l),t.child;case 10:return fv(e,t,l);case 9:return o=t.type._context,r=t.pendingProps.children,us(t),o=An(o),r=r(o),t.flags|=1,yn(e,t,r,l),t.child;case 14:return ev(e,t,t.type,t.pendingProps,l);case 15:return tv(e,t,t.type,t.pendingProps,l);case 19:return Xh(e,t,l);case 31:return oC(e,t,l);case 22:return nv(e,t,l,t.pendingProps);case 24:return us(t),r=An(an),e===null?(o=hh(),o===null&&(o=zt,u=fh(),o.pooledCache=u,u.refCount++,u!==null&&(o.pooledCacheLanes|=l),o=u),t.memoizedState={parent:r,cache:o},gh(t),or(t,an,o)):((e.lanes&l)!==0&&(ph(e,t),Ko(t,null,null,l),Qo()),o=e.memoizedState,u=t.memoizedState,o.parent!==r?(o={parent:r,cache:r},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),or(t,an,r)):(r=u.cache,or(t,an,r),r!==o.cache&&ch(t,[an],l,!0))),yn(e,t,t.pendingProps.children,l),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!=="auto"?t.flags|=e===null?18882560:18874368:ct&&vc(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Ea(e,t),yn(e,t,r.children,l),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function _i(e){e.flags|=4}function Jh(e,t,l,r,o){var u;if((u=(e.mode&32)!==0)&&(u=l===null?Bx(t,r):Bx(t,r)&&(r.src!==l.src||r.srcSet!==l.srcSet)),u){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(Kv())e.flags|=8192;else throw hs=Tc,mh}else e.flags&=-16777217}function hv(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!qx(t))if(Kv())e.flags|=8192;else throw hs=Tc,mh}function Yc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ec():536870912,e.lanes|=t,Oa|=t)}function Wo(e,t){if(!ct)switch(e.tailMode){case"visible":break;case"collapsed":for(var l=e.tail,r=null;l!==null;)l.alternate!==null&&(r=l),l=l.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null}}function kt(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,r=0;if(t)for(var o=e.child;o!==null;)l|=o.lanes|o.childLanes,r|=o.subtreeFlags&1206910976,r|=o.flags&1206910976,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)l|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=l,t}function fC(e,t,l){var r=t.pendingProps;switch(sh(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return kt(t),null;case 1:return kt(t),null;case 3:return l=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ni(an),we(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(ga(t)?_i(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,oh())),kt(t),null;case 26:var o=t.type,u=t.memoizedState;return e===null?(_i(t),u!==null?(kt(t),hv(t,u)):(kt(t),Jh(t,o,null,r,l))):u?u!==e.memoizedState?(_i(t),kt(t),hv(t,u)):(kt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&_i(t),kt(t),Jh(t,o,e,r,l)),null;case 27:if(Xe(t),l=je.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&_i(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return kt(t),t.subtreeFlags&=-33554433,null}e=Ce.current,ga(t)?Yy(t):(e=Dx(o,r,l),t.stateNode=e,_i(t))}return kt(t),t.subtreeFlags&=-33554433,null;case 5:if(Xe(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&_i(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return kt(t),t.subtreeFlags&=-33554433,null}if(u=Ce.current,ga(t))Yy(t);else{var y=cu(je.current);switch(u){case 1:u=y.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:u=y.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":u=y.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":u=y.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":u=y.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof r.is=="string"?y.createElement("select",{is:r.is}):y.createElement("select"),r.multiple?u.multiple=!0:r.size&&(u.size=r.size);break;default:u=typeof r.is=="string"?y.createElement(o,{is:r.is}):y.createElement(o)}}u[Ut]=t,u[In]=r;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)u.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=u;e:switch(Dn(u,o,r),o){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&_i(t)}}return kt(t),t.subtreeFlags&=-33554433,Jh(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&_i(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(a(166));if(e=je.current,ga(t)){if(e=t.stateNode,l=t.memoizedProps,r=null,o=Rn,o!==null)switch(o.tag){case 27:case 5:r=o.memoizedProps}e[Ut]=t,e=!!(e.nodeValue===l||r!==null&&r.suppressHydrationWarning===!0||dx(e.nodeValue,l)),e||ar(t,!0)}else e=cu(e).createTextNode(r),e[Ut]=t,t.stateNode=e}return kt(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(r=ga(t),l!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(557));e[Ut]=t}else ss(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;kt(t),e=!1}else l=oh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(gl(t),t):(gl(t),null);if((t.flags&128)!==0)throw Error(a(558))}return kt(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=ga(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(a(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(a(317));o[Ut]=t}else ss(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;kt(t),o=!1}else o=oh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(gl(t),t):(gl(t),null)}return gl(t),(t.flags&128)!==0?(t.lanes=l,t):(l=r!==null,e=e!==null&&e.memoizedState!==null,l&&(r=t.child,o=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(o=r.alternate.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==o&&(r.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Yc(t,t.updateQueue),kt(t),null);case 4:return we(),e===null&&zm(t.stateNode.containerInfo),t.flags|=67108864,kt(t),null;case 10:return Ni(t.type),kt(t),null;case 19:if(Eh(t),r=t.memoizedState,r===null)return kt(t),null;if(o=(t.flags&128)!==0,u=r.rendering,u===null)if(o)Wo(r,!1);else{if(Wt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Nc(e),u!==null){for(t.flags|=128,Wo(r,!1),e=u.updateQueue,t.updateQueue=e,Yc(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Vy(l,e),l=l.sibling;return Fo(t,Mn.current&1|2),ct&&ji(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&it()>lf&&(t.flags|=128,o=!0,Wo(r,!1),t.lanes=4194304)}else{if(!o)if(e=Nc(u),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Yc(t,e),Wo(r,!0),r.tail===null&&r.tailMode!=="collapsed"&&r.tailMode!=="visible"&&!u.alternate&&!ct)return kt(t),null}else 2*it()-r.renderingStartTime>lf&&l!==536870912&&(t.flags|=128,o=!0,Wo(r,!1),t.lanes=4194304);r.isBackwards?(u.sibling=t.child,t.child=u):(e=r.last,e!==null?e.sibling=u:t.child=u,r.last=u)}if(r.tail!==null){e=r.tail;e:{for(l=e;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=it(),e.sibling=null,u=Mn.current,u=o?u&1|2:u&1,r.tailMode==="visible"||r.tailMode==="collapsed"||!l||ct?Fo(t,u):(l=u,de(Nn,t),de(Mn,l),Bn===null&&(Bn=t)),ct&&ji(t,r.treeForkCount),e}return kt(t),null;case 22:case 23:return gl(t),xh(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(l&536870912)!==0&&(t.flags&128)===0&&(kt(t),t.subtreeFlags&6&&(t.flags|=8192)):kt(t),l=t.updateQueue,l!==null&&Yc(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==l&&(t.flags|=2048),e!==null&&ye(fs),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Ni(an),kt(t),null;case 25:return null;case 30:return t.flags|=33554432,kt(t),null}throw Error(a(156,t.tag))}function dC(e,t){switch(sh(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ni(an),we(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Xe(t),null;case 31:if(t.memoizedState!==null){if(gl(t),t.alternate===null)throw Error(a(340));ss()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(gl(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));ss()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Eh(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return we(),null;case 10:return Ni(t.type),null;case 22:case 23:return gl(t),xh(),e!==null&&ye(fs),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ni(an),null;case 25:return null;default:return null}}function mv(e,t){switch(sh(t),t.tag){case 3:Ni(an),we();break;case 26:case 27:case 5:Xe(t);break;case 4:we();break;case 31:t.memoizedState!==null&&gl(t);break;case 13:gl(t);break;case 19:Eh(t);break;case 10:Ni(t.type);break;case 22:case 23:gl(t),xh(),e!==null&&ye(fs);break;case 24:Ni(an)}}function eu(e,t){try{var l=t.updateQueue,r=l!==null?l.lastEffect:null;if(r!==null){var o=r.next;l=o;do{if((l.tag&e)===e){r=void 0;var u=l.create,y=l.inst;r=u(),y.destroy=r}l=l.next}while(l!==o)}}catch(w){jt(t,t.return,w)}}function pr(e,t,l){try{var r=t.updateQueue,o=r!==null?r.lastEffect:null;if(o!==null){var u=o.next;r=u;do{if((r.tag&e)===e){var y=r.inst,w=y.destroy;if(w!==void 0){y.destroy=void 0,o=t;var k=l,Y=w;try{Y()}catch(ee){jt(o,k,ee)}}}r=r.next}while(r!==u)}}catch(ee){jt(t,t.return,ee)}}function gv(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{ib(t,l)}catch(r){jt(e,e.return,r)}}}function pv(e,t,l){l.props=ps(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(r){jt(e,t,r)}}function li(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var o=e.stateNode,u=Ci(e.memoizedProps,o);(o.ref===null||o.ref.name!==u)&&(o.ref=Rx(u)),r=o.ref;break;case 7:if(e.stateNode===null){var y=new xl(e);b(e.child,!1,nT,y,void 0,void 0),e.stateNode=y}r=e.stateNode;break;default:r=e.stateNode}typeof l=="function"?e.refCleanup=l(r):l.current=r}}catch(w){jt(e,t,w)}}function zn(e,t){var l=e.ref,r=e.refCleanup;if(l!==null)if(typeof r=="function")try{r()}catch(o){jt(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(o){jt(e,t,o)}else l.current=null}function Qc(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var l=0;l<t.length;l++)Ax(e.stateNode,t[l])}function yv(e){for(var t=e.return;t!==null&&(Wh(t)&&Ax(e.stateNode,t.stateNode),!$h(t));)t=t.return}function tu(e){for(var t=e.return;t!==null&&(Wh(t)&&lT(e.stateNode,t.stateNode),!$h(t));)t=t.return}function $h(e){return e.tag===5||e.tag===3||e.tag===27}function Wh(e){return e&&e.tag===7&&e.stateNode!==null}function em(e){var t=e.type,l=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break e;case"img":l.src?r.src=l.src:l.srcSet&&(r.srcset=l.srcSet)}}catch(o){jt(e,e.return,o)}}function tm(e,t,l){try{var r=e.stateNode;HC(r,e.type,l,t),r[In]=t}catch(o){jt(e,e.return,o)}}function bv(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Rr(e.type)||e.tag===4}function nm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||bv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Rr(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function lm(e,t,l,r){var o=e.tag;if(o===5||o===6)o=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(o,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(o),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=ei)),Qc(e,r),Ie=!0;else if(o!==4&&(o===27&&(Qc(e,r),r=null,Rr(e.type)&&(l=e.stateNode,t=null)),e=e.child,e!==null))for(lm(e,t,l,r),e=e.sibling;e!==null;)lm(e,t,l,r),e=e.sibling}function Kc(e,t,l,r){var o=e.tag;if(o===5||o===6)o=e.stateNode,t?l.insertBefore(o,t):l.appendChild(o),Qc(e,r),Ie=!0;else if(o!==4&&(o===27&&(Qc(e,r),r=null,Rr(e.type)&&(l=e.stateNode)),e=e.child,e!==null))for(Kc(e,t,l,r),e=e.sibling;e!==null;)Kc(e,t,l,r),e=e.sibling}function vv(e){var t=e.stateNode,l=e.memoizedProps;try{for(var r=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Dn(t,r,l),t[Ut]=e,t[In]=l}catch(u){jt(e,e.return,u)}}var Fc=!1,pl=null;function xv(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(Fc=!0)}var ii=null;function Sv(){var e=ii;return ii=null,e}var al=0;function Ra(e,t,l,r,o){return al=0,Ev(e.child,t,l,r,o)}function Ev(e,t,l,r,o){for(var u=!1;e!==null;){if(e.tag===5){var y=e.stateNode;if(r!==null){var w=Vm(y);r.push(w),w.view&&(u=!0)}else u||Vm(y).view&&(u=!0);Fc=!0,Sx(y,al===0?t:t+"_"+al,l),al++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&o||Ev(e.child,t,l,r,o)&&(u=!0));e=e.sibling}return u}function ri(e,t){for(;e!==null;)e.tag===5?Ex(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||ri(e.child,t)),e=e.sibling}function Xc(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Xc(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(a(544));var l=t.name;t=Ti(t.default,t.share),t!=="none"&&(Ra(e,l,t,null,!1)||ri(e.child,!1))}e=e.sibling}}function im(e,t){if(e.tag===30){var l=e.stateNode,r=e.memoizedProps,o=Ci(r,l),u=Ti(r.default,l.paired?r.share:r.enter);u!=="none"?Ra(e,o,u,null,!1)?(Xc(e),l.paired||t||Ma(e,r.onEnter)):ri(e.child,!1):Xc(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)im(e,t),e=e.sibling;else Xc(e)}function rm(e){if(pl!==null&&pl.size!==0){var t=pl;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var l=e.memoizedProps,r=l.name;if(r!=null&&r!=="auto"){var o=t.get(r);if(o!==void 0){var u=Ti(l.default,l.share);if(u!=="none"&&(Ra(e,r,u,null,!1)?(u=e.stateNode,o.paired=u,u.paired=o,Ma(e,l.onShare)):ri(e.child,!1)),t.delete(r),t.size===0)break}}}rm(e)}e=e.sibling}}}function sm(e){if(e.tag===30){var t=e.memoizedProps,l=Ci(t,e.stateNode),r=pl!==null?pl.get(l):void 0,o=Ti(t.default,r!==void 0?t.share:t.exit);o!=="none"&&(Ra(e,l,o,null,!1)?r!==void 0?(o=e.stateNode,r.paired=o,o.paired=r,pl.delete(l),Ma(e,t.onShare)):Ma(e,t.onExit):ri(e.child,!1)),pl!==null&&rm(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)sm(e),e=e.sibling;else pl!==null&&rm(e)}function Rv(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,l=Ci(t,e.stateNode);t=Ti(t.default,t.update),e.flags&=-5,t!=="none"&&Ra(e,l,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&Rv(e);e=e.sibling}}function am(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,ri(e.child,!1))}am(e)}e=e.sibling}}function Zc(e){if(e.tag===30)e.stateNode.paired=null,ri(e.child,!1),am(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Zc(e),e=e.sibling;else am(e)}function wv(e){for(e=e.child;e!==null;)e.tag===30?ri(e.child,!1):(e.subtreeFlags&33554432)!==0&&wv(e),e=e.sibling}function om(e,t,l,r,o,u,y){for(var w=!1;t!==null;){if(t.tag===5){var k=t.stateNode;if(u!==null&&al<u.length){var Y=u[al],ee=Vm(k);(Y.view||ee.view)&&(w=!0);var fe;if(fe=(e.flags&4)===0)if(ee.clip)fe=!0;else{fe=Y.rect;var P=ee.rect;fe=fe.y!==P.y||fe.x!==P.x||fe.height!==P.height||fe.width!==P.width}fe&&(e.flags|=4),ee.abs?ee=!Y.abs:(Y=Y.rect,ee=ee.rect,ee=Y.height!==ee.height||Y.width!==ee.width),ee&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&Sx(k,al===0?l:l+"_"+al,o),w&&(e.flags&4)!==0||(ii===null&&(ii=[]),ii.push(k,al===0?r:r+"_"+al,t.memoizedProps)),al++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&y?e.flags|=t.flags&32:om(e,t.child,l,r,o,u,y)&&(w=!0));t=t.sibling}return w}function Cv(e,t){for(e=e.child;e!==null;){if(e.tag===30){var l=e.memoizedProps,r=e.stateNode,o=Ci(l,r),u=Ti(l.default,l.update),y;y=e.memoizedState,e.memoizedState=null,r=e;var w=e.child;al=0,o=om(r,w,o,o,u,y,!1),(e.flags&4)!==0&&o&&Ma(e,l.onUpdate)}else(e.subtreeFlags&33554432)!==0&&Cv(e);e=e.sibling}}var wn=!1,Ct=!1,si=!1,um=!1,Tv=typeof WeakSet=="function"?WeakSet:Set,Cn=null,ai=!1,nu=!1,Jc=!1,cm=!1;function hC(e,t,l){if(e=e.containerInfo,km=Ba,e=Ny(e),Zd(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var u=o.anchorOffset,y=o.focusNode;o=o.focusOffset;try{r.nodeType,y.nodeType}catch{r=null;break e}var w=0,k=-1,Y=-1,ee=0,fe=0,P=e,Z=null;t:for(;;){for(var Te;P!==r||u!==0&&P.nodeType!==3||(k=w+u),P!==y||o!==0&&P.nodeType!==3||(Y=w+o),P.nodeType===3&&(w+=P.nodeValue.length),(Te=P.firstChild)!==null;)Z=P,P=Te;for(;;){if(P===e)break t;if(Z===r&&++ee===u&&(k=w),Z===y&&++fe===o&&(Y=w),(Te=P.nextSibling)!==null)break;P=Z,Z=P.parentNode}P=Te}r=k===-1||Y===-1?null:{start:k,end:Y}}else r=null}r=r||{start:0,end:0}}else r=null;for(Lm={focusedElem:e,selectionRange:r},Ba=!1,l=(l&335544064)===l,Cn=t,t=l?9270:1024;Cn!==null;){if(e=Cn,l&&(r=e.deletions,r!==null))for(u=0;u<r.length;u++)l&&sm(r[u]);if(e.alternate===null&&(e.flags&2)!==0)l&&xv(e),$c(l);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&l&&sm(r),$c(l);continue}else if(r!==null&&r.memoizedState!==null){l&&xv(e),$c(l);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,Cn=r):(l&&Rv(e),$c(l))}}pl=null}function $c(e){for(;Cn!==null;){var t=Cn,l=e,r=t.alternate,o=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((o&1024)!==0&&r!==null){l=void 0,o=r.memoizedProps,r=r.memoizedState;var u=t.stateNode;try{var y=ps(t.type,o);l=u.getSnapshotBeforeUpdate(y,r),u.__reactInternalSnapshotBeforeUpdate=l}catch(w){jt(t,t.return,w)}}break;case 3:if((o&1024)!==0){if(r=t.stateNode.containerInfo,l=r.nodeType,l===9)Pm(r);else if(l===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":Pm(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:l&&r!==null&&(l=Ci(r.memoizedProps,r.stateNode),o=t.memoizedProps,o=Ti(o.default,o.update),o!=="none"&&Ra(r,l,o,r.memoizedState=[],!0));break;default:if((o&1024)!==0)throw Error(a(163))}if(r=t.sibling,r!==null){r.return=t.return,Cn=r;break}Cn=t.return}}function Ov(e,t,l){var r=l.flags;switch(l.tag){case 0:case 11:case 15:oi(e,l),r&4&&eu(5,l);break;case 1:if(oi(e,l),r&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(y){jt(l,l.return,y)}else{var o=ps(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){jt(l,l.return,y)}}r&64&&gv(l),r&512&&li(l,l.return);break;case 3:if(oi(e,l),r&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{ib(e,t)}catch(y){jt(l,l.return,y)}}break;case 27:t===null&&r&4&&vv(l);case 26:case 5:oi(e,l),t===null&&r&4&&em(l),r&512&&li(l,l.return);break;case 12:oi(e,l);break;case 31:oi(e,l),r&4&&Mv(e,l);break;case 13:oi(e,l),r&4&&zv(e,l),r&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=CC.bind(null,l),sT(e,l))));break;case 22:if(r=l.memoizedState!==null||wn,!r){var u=t!==null&&t.memoizedState!==null||Ct;t=wn,o=Ct,wn=r,(Ct=u)&&!o?(r=2,(l.subtreeFlags&8772)!==0&&(r|=1),Kl(e,l,r)):oi(e,l),wn=t,Ct=o}break;case 30:oi(e,l),r&512&&li(l,l.return);break;case 7:r&512&&li(l,l.return);default:oi(e,l)}}function fm(e,t){for(e=e.child;e!==null;)jv(e,t),e=e.sibling}function jv(e,t){switch(e.tag){case 5:case 26:try{var l=e.stateNode;if(t){var r=l.style;typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none"}else{var o=e.stateNode,u=e.memoizedProps.style,y=u!=null&&u.hasOwnProperty("display")?u.display:null;o.style.display=y==null||typeof y=="boolean"?"":(""+y).trim()}}catch(k){jt(e,e.return,k)}dm(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Ie=!0}catch(k){jt(e,e.return,k)}break;case 18:try{var w=e.stateNode;t?xx(w,!0):xx(e.stateNode,!1)}catch(k){jt(e,e.return,k)}break;case 22:case 23:e.memoizedState===null&&fm(e,t);break;default:fm(e,t)}}function dm(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var l=e,r=t;switch(l.tag){case 4:jv(l,r);break e;case 22:l.memoizedState===null&&dm(l,r);break e;default:dm(l,r)}}e=e.sibling}}function Av(e){var t=e.alternate;t!==null&&(e.alternate=null,Av(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&la(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ht=null,ol=!1;function Yl(e,t,l){for(l=l.child;l!==null;)Nv(e,t,l),l=l.sibling}function Nv(e,t,l){if(Yt&&typeof Yt.onCommitFiberUnmount=="function")try{Yt.onCommitFiberUnmount(pn,l)}catch{}switch(l.tag){case 26:Ct||zn(l,t),Yl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!Ct&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ct||zn(l,t),tu(l);var r=Ht,o=ol;Rr(l.type)&&(Ht=l.stateNode,ol=!1),Yl(e,t,l),_x(l.stateNode,l.type,l.memoizedProps),Ht=r,ol=o;break;case 5:Ct||zn(l,t),tu(l);case 6:if(l.tag===6&&tu(l),r=Ht,o=ol,Ht=null,Yl(e,t,l),Ht=r,ol=o,Ht!==null)if(ol)try{(Ht.nodeType===9?Ht.body:Ht.nodeName==="HTML"?Ht.ownerDocument.body:Ht).removeChild(l.stateNode),Ie=!0}catch(u){jt(l,t,u)}else try{Ht.removeChild(l.stateNode),Ie=!0}catch(u){jt(l,t,u)}break;case 18:Ht!==null&&(ol?(e=Ht,vx(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),qa(e)):vx(Ht,l.stateNode));break;case 4:r=Ht,o=ol,Ht=l.stateNode.containerInfo,ol=!0,Yl(e,t,l),Ht=r,ol=o;break;case 0:case 11:case 14:case 15:pr(2,l,t),Ct||pr(4,l,t),Yl(e,t,l);break;case 1:Ct||(zn(l,t),r=l.stateNode,typeof r.componentWillUnmount=="function"&&pv(l,t,r)),Yl(e,t,l);break;case 21:Yl(e,t,l);break;case 22:Ct=(r=Ct)||l.memoizedState!==null,Yl(e,t,l),Ct=r;break;case 30:zn(l,t),Yl(e,t,l);break;case 7:Ct||zn(l,t),Yl(e,t,l);break;default:Yl(e,t,l)}}function Mv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{qa(e)}catch(l){jt(t,t.return,l)}}}function zv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{qa(e)}catch(l){jt(t,t.return,l)}}function mC(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Tv),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Tv),t;default:throw Error(a(435,e.tag))}}function Wc(e,t){var l=mC(e);t.forEach(function(r){if(!l.has(r)){l.add(r);var o=TC.bind(null,e,r);r.then(o,o)}})}function Jn(e,t,l){var r=t.deletions;if(r!==null)for(var o=0;o<r.length;o++){var u=r[o],y=e,w=t,k=w;e:for(;k!==null;){switch(k.tag){case 27:if(Rr(k.type)){Ht=k.stateNode,ol=!1;break e}break;case 5:Ht=k.stateNode,ol=!1;break e;case 3:case 4:Ht=k.stateNode.containerInfo,ol=!0;break e}k=k.return}if(Ht===null)throw Error(a(160));Nv(y,w,u),Ht=null,ol=!1,y=u.alternate,y!==null&&(y.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Dv(t,e,l),t=t.sibling}var Ql=null;function Dv(e,t,l){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(o&4&&(r=e.updateQueue,r=r!==null?r.events:null,r!==null))for(var u=0;u<r.length;u++){var y=r[u];y.ref.impl=y.nextImpl}Jn(t,e,l),$n(e),o&4&&(pr(3,e,e.return),eu(3,e),pr(5,e,e.return));break;case 1:Jn(t,e,l),$n(e),o&512&&(Ct||r===null||zn(r,r.return)),o&64&&wn&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?t:l.concat(t))));break;case 26:if(u=Ql,Jn(t,e,l),$n(e),o&512&&(Ct||r===null||zn(r,r.return)),o&4)if(o=r!==null?r.memoizedState:null,l=e.memoizedState,r===null)if(l===null)if(e.stateNode===null)if(wn)e.stateNode=px(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,l=e.memoizedProps,o=u.ownerDocument||u;t:switch(t){case"title":r=o.getElementsByTagName("title")[0],(!r||r[xi]||r[Ut]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=o.createElement(t),o.head.insertBefore(r,o.querySelector("head > title"))),Dn(r,t,l),r[Ut]=e,Jt(r),t=r;break e;case"link":if(u=Vx("link","href",o).get(t+(l.href||""))){for(y=0;y<u.length;y++)if(r=u[y],r.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&r.getAttribute("rel")===(l.rel==null?null:l.rel)&&r.getAttribute("title")===(l.title==null?null:l.title)&&r.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){u.splice(y,1);break t}}r=o.createElement(t),Dn(r,t,l),o.head.appendChild(r);break;case"meta":if(u=Vx("meta","content",o).get(t+(l.content||""))){for(y=0;y<u.length;y++)if(r=u[y],r.getAttribute("content")===(l.content==null?null:""+l.content)&&r.getAttribute("name")===(l.name==null?null:l.name)&&r.getAttribute("property")===(l.property==null?null:l.property)&&r.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&r.getAttribute("charset")===(l.charSet==null?null:l.charSet)){u.splice(y,1);break t}}r=o.createElement(t),Dn(r,t,l),o.head.appendChild(r);break;default:throw Error(a(468,t))}r[Ut]=e,Jt(r),t=r}e.stateNode=t}else wn||Zm(u,e.type,e.stateNode);else e.stateNode=Ix(u,l,e.memoizedProps);else o!==l?(o===null?(t=r.stateNode,t===null||Ct||t.parentNode.removeChild(t)):o.count--,l===null?wn||Zm(u,e.type,e.stateNode):Ix(u,l,e.memoizedProps)):l===null&&e.stateNode!==null&&tm(e,e.memoizedProps,r.memoizedProps);break;case 27:Jn(t,e,l),$n(e),o&512&&(Ct||r===null||zn(r,r.return)),r!==null&&o&4&&tm(e,e.memoizedProps,r.memoizedProps);break;case 5:if(u=si,si=!1,Jn(t,e,l),si=u,$n(e),o&512&&(Ct||r===null||zn(r,r.return)),e.flags&32){t=e.stateNode;try{ra(t,""),Ie=!0}catch(ee){jt(e,e.return,ee)}}o&4&&e.stateNode!=null&&(t=e.memoizedProps,tm(e,t,r!==null?r.memoizedProps:t)),o&1024&&(um=!0);break;case 6:if(Jn(t,e,l),$n(e),o&4){if(e.stateNode===null)throw Error(a(162));t=e.memoizedProps,l=e.stateNode;try{l.nodeValue=t,Ie=!0}catch(ee){jt(e,e.return,ee)}}break;case 3:if(Ie=!1,gf=null,u=Ql,Ql=fu(t.containerInfo),Jn(t,e,l),Ql=u,$n(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{qa(t.containerInfo)}catch(ee){jt(e,e.return,ee)}um&&(um=!1,_v(e)),Ie=!1;break;case 4:o=si,si=wn,r=Qt(),u=Ql,Ql=fu(e.stateNode.containerInfo),Jn(t,e,l),$n(e),Ql=u,Ie&&nu&&(Jc=!0),Ie=r,si=o;break;case 12:Jn(t,e,l),$n(e);break;case 31:Jn(t,e,l),$n(e),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Wc(e,t)));break;case 13:Jn(t,e,l),$n(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(nf=it()),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Wc(e,t)));break;case 22:u=e.memoizedState!==null,y=r!==null&&r.memoizedState!==null;var w=wn,k=Ct,Y=si;wn=w||u,si=Y||u,Ct=k||y,Jn(t,e,l),Ct=k,si=Y,wn=w,$n(e),o&8192&&(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,!u||r===null||y||wn||Ct||(t=y||Ct,l=wn,r=Ct,wn=u||wn,Ct=t,yr(e,2),wn=l,Ct=r),!u&&si||fm(e,u)),o&4&&(t=e.updateQueue,t!==null&&(l=t.retryQueue,l!==null&&(t.retryQueue=null,Wc(e,l))));break;case 19:Jn(t,e,l),$n(e),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Wc(e,t)));break;case 30:o&512&&(Ct||r===null||zn(r,r.return)),o=Qt(),u=nu,y=(l&335544064)===l,w=e.memoizedProps,nu=y&&Ti(w.default,w.update)!=="none",Jn(t,e,l),$n(e),y&&r!==null&&Ie&&(e.flags|=4),nu=u,Ie=o;break;case 21:break;case 7:o&512&&(Ct||r===null||zn(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Jn(t,e,l),$n(e)}}function $n(e){var t=e.flags;if(t&2){try{for(var l,r=e.return;r!==null;){if(bv(r)){l=r;break}r=r.return}r=null;for(var o=e.return;o!==null;){if(Wh(o)){var u=o.stateNode;r===null?r=[u]:r.push(u)}if($h(o))break;o=o.return}var y=r;if(l==null)throw Error(a(160));switch(l.tag){case 27:var w=l.stateNode,k=nm(e);Kc(e,k,w,y);break;case 5:var Y=l.stateNode;l.flags&32&&(ra(Y,""),l.flags&=-33);var ee=nm(e);Kc(e,ee,Y,y);break;case 3:case 4:var fe=l.stateNode.containerInfo,P=nm(e);lm(e,P,fe,y);break;default:throw Error(a(161))}}catch(Z){jt(e,e.return,Z)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _v(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_v(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Ba=!0,t.reset(),Ba=!1),e=e.sibling}}function wa(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)kv(t,e),t=t.sibling;else Cv(t)}function kv(e,t){var l=e.alternate;if(l===null)im(e,!1);else switch(e.tag){case 3:if(cm=ai=!1,Sv(),wa(t,e),!ai&&!Jc){if(e=ii,e!==null)for(var r=0;r<e.length;r+=3){l=e[r];var o=e[r+1];Ex(l,e[r+2]),l=l.ownerDocument.documentElement,l!==null&&l.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+o+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),cm=!0}ii=null;break;case 5:wa(t,e);break;case 4:r=ai,ai=!1,wa(t,e),ai&&(Jc=!0),ai=r;break;case 22:e.memoizedState===null&&(l.memoizedState!==null?im(e,!1):wa(t,e));break;case 30:r=ai,o=Sv(),ai=!1,wa(t,e),ai&&(e.flags|=4);var u=e.memoizedProps,y=e.stateNode;t=Ci(u,y),y=Ci(l.memoizedProps,y);var w=Ti(u.default,u.update);w==="none"?t=!1:(u=l.memoizedState,l.memoizedState=null,l=e.child,al=0,t=om(e,l,t,y,w,u,!0),al!==(u===null?0:u.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(Ma(e,e.memoizedProps.onUpdate),ii=o):o!==null&&(o.push.apply(o,ii),ii=o),ai=(e.flags&32)!==0?!0:r;break;default:wa(t,e)}}function oi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Ov(e,t.alternate,t),t=t.sibling}function yr(e,t){for(e=e.child;e!==null;){var l=e,r=t;switch(l.tag){case 0:case 11:case 14:case 15:pr(4,l,l.return),yr(l,r);break;case 1:zn(l,l.return);var o=l.stateNode;typeof o.componentWillUnmount=="function"&&pv(l,l.return,o),yr(l,r);break;case 27:(r&2)!==0&&_x(l.stateNode,l.type,l.memoizedProps);case 5:zn(l,l.return),l.tag!==5&&l.tag!==27||tu(l),yr(l,r);break;case 6:tu(l);break;case 26:zn(l,l.return),o=l.stateNode,l.memoizedState!==null||o===null||Ct||o.parentNode.removeChild(o),yr(l,r);break;case 22:l.memoizedState===null&&yr(l,r);break;case 30:zn(l,l.return),yr(l,r);break;case 7:zn(l,l.return);default:yr(l,r)}e=e.sibling}}function Kl(e,t,l){for(l=(t.subtreeFlags&8772)!==0?l:l&-2,t=t.child;t!==null;){var r=t.alternate,o=e,u=t,y=u.flags,w=(l&1)!==0;switch(u.tag){case 0:case 11:case 15:Kl(o,u,l),eu(4,u);break;case 1:if(Kl(o,u,l),r=u,o=r.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(ee){jt(r,r.return,ee)}if(r=u,o=r.updateQueue,o!==null){var k=r.stateNode;try{var Y=o.shared.hiddenCallbacks;if(Y!==null)for(o.shared.hiddenCallbacks=null,o=0;o<Y.length;o++)lb(Y[o],k)}catch(ee){jt(r,r.return,ee)}}w&&y&64&&gv(u),li(u,u.return);break;case 27:(l&2)!==0&&vv(u);case 5:u.tag!==5&&u.tag!==27||yv(u),Kl(o,u,l),w&&r===null&&y&4&&em(u),li(u,u.return);break;case 6:yv(u);break;case 26:k=u.stateNode,u.memoizedState!==null||k===null||wn||Zm(fu(k.ownerDocument),u.type,k),Kl(o,u,l),w&&r===null&&y&4&&em(u),li(u,u.return);break;case 12:Kl(o,u,l);break;case 31:Kl(o,u,l),w&&y&4&&Mv(o,u);break;case 13:Kl(o,u,l),w&&y&4&&zv(o,u);break;case 22:u.memoizedState===null&&Kl(o,u,l),li(u,u.return);break;case 30:Kl(o,u,l),li(u,u.return);break;case 7:li(u,u.return);default:Kl(o,u,l)}t=t.sibling}}function hm(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Bo(l))}function mm(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Bo(e))}function _l(e,t,l,r){var o=(l&335544064)===l;if(t.subtreeFlags&(o?10262:10256))for(t=t.child;t!==null;)Lv(e,t,l,r),t=t.sibling;else o&&wv(t)}function Lv(e,t,l,r){var o=(l&335544064)===l;o&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Zc(t);var u=t.flags;switch(t.tag){case 0:case 11:case 15:_l(e,t,l,r),u&2048&&eu(9,t);break;case 1:_l(e,t,l,r);break;case 3:_l(e,t,l,r),o&&cm&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),u&2048&&(u=null,t.alternate!==null&&(u=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==u&&(t.refCount++,u!=null&&Bo(u)));break;case 12:if(u&2048){_l(e,t,l,r),u=t.stateNode;try{var y=t.memoizedProps,w=y.id,k=y.onPostCommit;typeof k=="function"&&k(w,t.alternate===null?"mount":"update",u.passiveEffectDuration,-0)}catch(Y){jt(t,t.return,Y)}}else _l(e,t,l,r);break;case 31:_l(e,t,l,r);break;case 13:_l(e,t,l,r);break;case 23:break;case 22:y=t.stateNode,w=t.alternate,t.memoizedState!==null?(o&&w!==null&&w.memoizedState===null&&Zc(w),y._visibility&2?_l(e,t,l,r):lu(e,t)):(o&&w!==null&&w.memoizedState!==null&&Zc(t),y._visibility&2?_l(e,t,l,r):(y._visibility|=2,Ca(e,t,l,r,(t.subtreeFlags&10256)!==0||!1))),u&2048&&hm(w,t);break;case 24:_l(e,t,l,r),u&2048&&mm(t.alternate,t);break;case 30:o&&(u=t.alternate,u!==null&&(ri(u.child,!0),ri(t.child,!0))),_l(e,t,l,r);break;default:_l(e,t,l,r)}}function Ca(e,t,l,r,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,y=t,w=l,k=r,Y=y.flags;switch(y.tag){case 0:case 11:case 15:Ca(u,y,w,k,o),eu(8,y);break;case 23:break;case 22:var ee=y.stateNode;y.memoizedState!==null?ee._visibility&2?Ca(u,y,w,k,o):lu(u,y):(ee._visibility|=2,Ca(u,y,w,k,o)),o&&Y&2048&&hm(y.alternate,y);break;case 24:Ca(u,y,w,k,o),o&&Y&2048&&mm(y.alternate,y);break;default:Ca(u,y,w,k,o)}t=t.sibling}}function lu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,r=t,o=r.flags;switch(r.tag){case 22:lu(l,r),o&2048&&hm(r.alternate,r);break;case 24:lu(l,r),o&2048&&mm(r.alternate,r);break;default:lu(l,r)}t=t.sibling}}var ys=8192;function bs(e,t,l){if(e.subtreeFlags&ys)for(e=e.child;e!==null;)Uv(e,t,l),e=e.sibling}function Uv(e,t,l){switch(e.tag){case 26:bs(e,t,l),e.flags&ys&&(e.memoizedState!==null?xT(l,Ql,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&Gx(l,e)));break;case 5:bs(e,t,l),e.flags&ys&&(e=e.stateNode,(t&335544128)===t&&Gx(l,e));break;case 3:case 4:var r=Ql;Ql=fu(e.stateNode.containerInfo),bs(e,t,l),Ql=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=ys,ys=16777216,bs(e,t,l),ys=r):bs(e,t,l));break;case 30:if((e.flags&ys)!==0&&(r=e.memoizedProps.name,r!=null&&r!=="auto")){var o=e.stateNode;o.paired=null,pl===null&&(pl=new Map),pl.set(r,o)}bs(e,t,l);break;default:bs(e,t,l)}}function Hv(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function iu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var r=t[l];Cn=r,Vv(r,e)}Hv(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Iv(e),e=e.sibling}function Iv(e){switch(e.tag){case 0:case 11:case 15:iu(e),e.flags&2048&&pr(9,e,e.return);break;case 3:iu(e);break;case 12:iu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ef(e)):iu(e);break;default:iu(e)}}function ef(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var r=t[l];Cn=r,Vv(r,e)}Hv(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:pr(8,t,t.return),ef(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,ef(t));break;default:ef(t)}e=e.sibling}}function Vv(e,t){for(;Cn!==null;){var l=Cn;switch(l.tag){case 0:case 11:case 15:pr(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var r=l.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Bo(l.memoizedState.cache)}if(r=l.child,r!==null)r.return=l,Cn=r;else e:for(l=e;Cn!==null;){r=Cn;var o=r.sibling,u=r.return;if(Av(r),r===l){Cn=null;break e}if(o!==null){o.return=u,Cn=o;break e}Cn=u}}}var gC={getCacheForType:function(e){var t=An(an),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return An(an).controller.signal}},pC=typeof WeakMap=="function"?WeakMap:Map,Et=0,zt=null,ht=null,pt=0,Ot=0,yl=null,br=!1,Ta=!1,gm=!1,ki=0,Wt=0,vr=0,vs=0,tf=0,bl=0,Oa=0,ru=null,ul=null,pm=!1,nf=0,Bv=0,lf=1/0,rf=null,xr=null,Kt=0,Fl=null,xs=null,ui=0,ym=0,bm=null,qv=null,ja=null,Aa=null,Na=null,su=0,sf=null;function vl(){return(Et&2)!==0&&pt!==0?pt&-pt:q.T!==null?jm():Qn()}function Pv(){if(bl===0)if((pt&536870912)===0||ct){var e=Cl;Cl<<=1,(Cl&3932160)===0&&(Cl=262144),bl=e}else bl=536870912;return e=Nn.current,e!==null&&(e.flags|=32),bl}function Ma(e,t){if(t!=null){var l=e.stateNode,r=l.ref;r===null&&(r=l.ref=Rx(Ci(e.memoizedProps,l))),Aa===null&&(Aa=[]),Aa.push(t.bind(null,r))}}function cl(e,t,l){(e===zt&&(Ot===2||Ot===9)||e.cancelPendingCommit!==null)&&(za(e,0),Sr(e,pt,bl,!1)),ts(e,l),((Et&2)===0||e!==zt)&&(e===zt&&((Et&2)===0&&(vs|=l),Wt===4&&Sr(e,pt,bl,!1)),ci(e))}function Gv(e,t,l){if((Et&6)!==0)throw Error(a(327));var r=!l&&(t&127)===0&&(t&e.expiredLanes)===0||rl(e,t),o=r?vC(e,t):xm(e,t,!0),u=r;do{if(o===0){Ta&&!r&&Sr(e,t,0,!1);break}else{if(l=e.current.alternate,u&&!yC(l)){o=xm(e,t,!1),u=!1;continue}if(o===2){if(u=t,e.errorRecoveryDisabledLanes&u)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var w=e;o=ru;var k=w.current.memoizedState.isDehydrated;if(k&&(za(w,y).flags|=256),y=xm(w,y,!1),y!==2&&y!==6){if(gm&&!k){w.errorRecoveryDisabledLanes|=u,vs|=u,o=4;break e}u=ul,ul=o,u!==null&&(ul===null?ul=u:ul.push.apply(ul,u))}o=y}if(u=!1,o!==2)continue}}if(o===1){za(e,0),Sr(e,t,0,!0);break}e:{switch(r=e,u=o,u){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Sr(r,t,bl,!br);break e;case 2:ul=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(o=nf+300-it(),10<o)){if(Sr(r,t,bl,!br),il(r,0,!0)!==0)break e;ui=t,r.timeoutHandle=Im(Yv.bind(null,r,l,ul,rf,pm,t,bl,vs,Oa,br,u,"Throttled",-0,0),o);break e}Yv(r,l,ul,rf,pm,t,bl,vs,Oa,br,u,null,-0,0)}}break}while(!0);ci(e)}function Yv(e,t,l,r,o,u,y,w,k,Y,ee,fe,P,Z){e.timeoutHandle=-1;var Te=t.subtreeFlags,Ue=(u&335544064)===u;if(fe=null,(Ue||Te&8192||(Te&16785408)===16785408)&&(fe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ei},pl=null,Uv(t,u,fe),Ue&&(Te=fe,Ue=e.containerInfo,Ue=(Ue.nodeType===9?Ue:Ue.ownerDocument).__reactViewTransition,Ue!=null&&(Te.count++,Te.waitingForViewTransition=!0,Te=mu.bind(Te),Ue.finished.then(Te,Te))),Te=(u&62914560)===u?nf-it():(u&4194048)===u?Bv-it():0,Te=ST(fe,Te),Te!==null)){ui=u,e.cancelPendingCommit=Te(Wv.bind(null,e,t,u,l,r,o,y,w,k,Y,ee,fe,null,P,Z)),Sr(e,u,y,!Y);return}Wv(e,t,u,l,r,o,y,w,k,Y,ee,fe)}function yC(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var r=0;r<l.length;r++){var o=l[r],u=o.getSnapshot;o=o.value;try{if(!ml(u(),o))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Sr(e,t,l,r){t=Yn(e,t),t&=~tf,t&=~vs,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var o=t;0<o;){var u=31-Qe(o),y=1<<u;r[u]=-1,o&=~y}l!==0&&jo(e,l,t)}function af(){return(Et&6)===0?(au(0),!1):!0}function vm(){if(ht!==null){if(Ot===0)var e=ht.return;else e=ht,Ai=as=null,Oh(e),ba=null,Go=0,e=ht;for(;e!==null;)mv(e.alternate,e),e=e.return;ht=null}}function za(e,t){var l=e.timeoutHandle;return l!==-1&&(e.timeoutHandle=-1,BC(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ui=0,vm(),zt=e,ht=l=Oi(e.current,null),pt=t,Ot=0,yl=null,br=!1,Ta=rl(e,t),gm=!1,Oa=bl=tf=vs=vr=Wt=0,ul=ru=null,pm=!1,ki=Yn(e,t),mc(),l}function Qv(e,t){at=null,q.H=Ic,t===ya||t===Cc?(t=Wy(),Ot=3):t===mh?(t=Wy(),Ot=4):Ot=t===qh?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,yl=t,ht===null&&(Wt=1,Vc(e,Nl(t,e.current)))}function Kv(){var e=Nn.current;return e===null?!0:(pt&4194048)===pt?Bn===null:(pt&62914560)===pt||(pt&536870912)!==0?e===Bn:!1}function Fv(){var e=q.H;return q.H=Ic,e===null?Ic:e}function Xv(){var e=q.A;return q.A=gC,e}function of(){Wt=4,br||(pt&4194048)!==pt&&Nn.current!==null||(Ta=!0),(vr&134217727)===0&&(vs&134217727)===0||zt===null||Sr(zt,pt,bl,!1)}function xm(e,t,l){var r=Et;Et|=2;var o=Fv(),u=Xv();(zt!==e||pt!==t)&&(rf=null,za(e,t)),t=!1;var y=Wt;e:do try{if(Ot!==0&&ht!==null){var w=ht,k=yl;switch(Ot){case 8:vm(),y=6;break e;case 3:case 2:case 9:case 6:Nn.current===null&&(t=!0);var Y=Ot;if(Ot=0,yl=null,Da(e,w,k,Y),l&&Ta){y=0;break e}break;default:Y=Ot,Ot=0,yl=null,Da(e,w,k,Y)}}bC(),y=Wt;break}catch(ee){Qv(e,ee)}while(!0);return t&&e.shellSuspendCounter++,Ai=as=null,Et=r,q.H=o,q.A=u,ht===null&&(zt=null,pt=0,mc()),y}function bC(){for(;ht!==null;)Zv(ht)}function vC(e,t){var l=Et;Et|=2;var r=Fv(),o=Xv();zt!==e||pt!==t?(rf=null,lf=it()+500,za(e,t)):Ta=rl(e,t);e:do try{if(Ot!==0&&ht!==null){t=ht;var u=yl;t:switch(Ot){case 1:Ot=0,yl=null,Da(e,t,u,1);break;case 2:case 9:if(Jy(u)){Ot=0,yl=null,Jv(t);break}t=function(){Ot!==2&&Ot!==9||zt!==e||(Ot=7),ci(e)},u.then(t,t);break e;case 3:Ot=7;break e;case 4:Ot=5;break e;case 7:Jy(u)?(Ot=0,yl=null,Jv(t)):(Ot=0,yl=null,Da(e,t,u,7));break;case 5:var y=null;switch(ht.tag){case 26:y=ht.memoizedState;case 5:case 27:var w=ht;if(y?qx(y):w.stateNode.complete){Ot=0,yl=null;var k=w.sibling;if(k!==null)ht=k;else{var Y=w.return;Y!==null?(ht=Y,uf(Y)):ht=null}break t}}Ot=0,yl=null,Da(e,t,u,5);break;case 6:Ot=0,yl=null,Da(e,t,u,6);break;case 8:vm(),Wt=6;break e;default:throw Error(a(462))}}xC();break}catch(ee){Qv(e,ee)}while(!0);return Ai=as=null,q.H=r,q.A=o,Et=l,ht!==null?0:(zt=null,pt=0,mc(),Wt)}function xC(){for(;ht!==null&&!wl();)Zv(ht)}function Zv(e){var t=dv(e.alternate,e,ki);e.memoizedProps=e.pendingProps,t===null?uf(e):ht=t}function Jv(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=rv(l,t,t.pendingProps,t.type,void 0,pt);break;case 11:t=rv(l,t,t.pendingProps,t.type.render,t.ref,pt);break;case 5:Oh(t);var r=t;r===Rn&&(ct?(xc(r),r.tag===5&&r.stateNode!=null&&(_t=r.stateNode)):(xc(r),ct=!0));default:mv(l,t),t=ht=Vy(t,ki),t=dv(l,t,ki)}e.memoizedProps=e.pendingProps,t===null?uf(e):ht=t}function Da(e,t,l,r){Ai=as=null,Oh(t),ba=null,Go=0;var o=t.return;try{if(aC(e,o,t,l,pt)){Wt=1,Vc(e,Nl(l,e.current)),ht=null;return}}catch(u){if(o!==null)throw ht=o,u;Wt=1,Vc(e,Nl(l,e.current)),ht=null;return}t.flags&32768?(ct||r===1?e=!0:Ta||(pt&536870912)!==0?e=!1:(br=e=!0,(r===2||r===9||r===3||r===6)&&(r=Nn.current,r!==null&&r.tag===13&&(r.flags|=16384))),$v(t,e)):uf(t)}function uf(e){var t=e;do{if((t.flags&32768)!==0){$v(t,br);return}e=t.return;var l=fC(t.alternate,t,ki);if(l!==null){ht=l;return}if(t=t.sibling,t!==null){ht=t;return}ht=t=e}while(t!==null);Wt===0&&(Wt=5)}function $v(e,t){do{var l=dC(e.alternate,e);if(l!==null){l.flags&=32767,ht=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){ht=e;return}ht=e=l}while(e!==null);Wt=6,ht=null}function Wv(e,t,l,r,o,u,y,w,k,Y,ee,fe){e.cancelPendingCommit=null;do cf();while(Kt!==0);if((Et&6)!==0)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));e===zt&&(ht=zt=null,pt=0),xs=t,Fl=e,ui=l,bm=o,qv=r,SC(e,t,l,y,w,k,fe)}}function SC(e,t,l,r,o,u,y){var w=t.lanes|t.childLanes;if(ym=w,w|=th,Oo(e,l,w,r,o,u),Aa=null,(l&335544064)===l?(Na=Xw(e),r=10262):(Na=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,OC(tt,function(){return wm(),null})):(e.callbackNode=null,e.callbackPriority=0),Fc=!1,r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=q.T,q.T=null,o=le.p,le.p=2,u=Et,Et|=4;try{hC(e,t,l)}finally{Et=u,le.p=o,q.T=r}}Kt=1,Fc?ja=KC(y,e.containerInfo,Na,Sm,Em,RC,Rm,wm,EC):(Sm(),Em(),Rm())}function EC(e){if(Kt!==0){var t=Fl.onRecoverableError;t(e,{componentStack:null})}}function RC(){Kt===3&&(Kt=0,kv(xs,Fl),Kt=4)}function Sm(){if(Kt===1){Kt=0;var e=Fl,t=xs,l=ui,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=q.T,q.T=null;var o=le.p;le.p=2;var u=Et;Et|=4;try{nu=Jc=!1,Dv(t,e,l),l=Lm;var y=Ny(e.containerInfo),w=l.focusedElem,k=l.selectionRange;if(y!==w&&w&&w.ownerDocument&&Ay(w.ownerDocument.documentElement,w)){if(k!==null&&Zd(w)){var Y=k.start,ee=k.end;if(ee===void 0&&(ee=Y),"selectionStart"in w)w.selectionStart=Y,w.selectionEnd=Math.min(ee,w.value.length);else{var fe=w.ownerDocument||document,P=fe&&fe.defaultView||window;if(P.getSelection){var Z=P.getSelection(),Te=w.textContent.length,Ue=Math.min(k.start,Te),ot=k.end===void 0?Ue:Math.min(k.end,Te);!Z.extend&&Ue>ot&&(y=ot,ot=Ue,Ue=y);var G=jy(w,Ue),I=jy(w,ot);if(G&&I&&(Z.rangeCount!==1||Z.anchorNode!==G.node||Z.anchorOffset!==G.offset||Z.focusNode!==I.node||Z.focusOffset!==I.offset)){var X=fe.createRange();X.setStart(G.node,G.offset),Z.removeAllRanges(),Ue>ot?(Z.addRange(X),Z.extend(I.node,I.offset)):(X.setEnd(I.node,I.offset),Z.addRange(X))}}}}for(fe=[],Z=w;Z=Z.parentNode;)Z.nodeType===1&&fe.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<fe.length;w++){var ce=fe[w];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}Ba=!!km,Lm=km=null}finally{Et=u,le.p=o,q.T=r}}e.current=t,Kt=2}}function Em(){if(Kt===2){Kt=0;var e=Fl,t=xs,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=q.T,q.T=null;var r=le.p;le.p=2;var o=Et;Et|=4;try{Ov(e,t.alternate,t)}finally{Et=o,le.p=r,q.T=l}}Kt=3}}function Rm(){if(Kt===4||Kt===3){Kt=0;var e=ja;ja=null,tn();var t=Fl,l=xs,r=ui,o=qv,u=(r&335544064)===r?10262:10256;if((l.subtreeFlags&u)!==0||(l.flags&u)!==0?Kt=5:(Kt=0,xs=Fl=null,ex(t,t.pendingLanes)),u=t.pendingLanes,u===0&&(xr=null),Ao(r),l=l.stateNode,Yt&&typeof Yt.onCommitFiberRoot=="function")try{Yt.onCommitFiberRoot(pn,l,void 0,(l.current.flags&128)===128)}catch{}if(o!==null){l=q.T,u=le.p,le.p=2,q.T=null;try{for(var y=t.onRecoverableError,w=0;w<o.length;w++){var k=o[w];y(k.value,{componentStack:k.stack})}}finally{q.T=l,le.p=u}}if(o=Aa,y=Na,Na=null,o!==null&&(Aa=null,y===null&&(y=[]),e!==null))for(k=0;k<o.length;k++)l=(0,o[k])(y),l!==void 0&&e.finished.finally(l);(ui&3)!==0&&cf(),ci(t),u=t.pendingLanes,(r&261930)!==0&&(u&42)!==0?t===sf?su++:(su=0,sf=t):(su=0,sf=null),au(0)}}function ex(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Bo(t)))}function cf(){return ja!==null&&(ja.skipTransition(),ja=null),Sm(),Em(),Rm(),wm()}function wm(){if(Kt!==5)return!1;var e=Fl,t=ym;ym=0;var l=Ao(ui),r=q.T,o=le.p;try{le.p=32>l?32:l,q.T=null,l=bm,bm=null;var u=Fl,y=ui;if(Kt=0,xs=Fl=null,ui=0,(Et&6)!==0)throw Error(a(331));var w=Et;if(Et|=4,Iv(u.current),Lv(u,u.current,y,l),Et=w,au(0,!1),Yt&&typeof Yt.onPostCommitFiberRoot=="function")try{Yt.onPostCommitFiberRoot(pn,u)}catch{}return!0}finally{le.p=o,q.T=r,ex(e,t)}}function tx(e,t,l){t=Nl(l,t),t=Bh(e.stateNode,t,2),e=dr(e,t,2),e!==null&&(ts(e,2),ci(e))}function jt(e,t,l){if(e.tag===3)tx(e,e,l);else for(;t!==null;){if(t.tag===3){tx(t,e,l);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(xr===null||!xr.has(r))){e=Nl(l,e),l=Jb(2),r=dr(t,l,2),r!==null&&($b(l,r,t,e),ts(r,2),ci(r));break}}t=t.return}}function Cm(e,t,l){var r=e.pingCache;if(r===null){r=e.pingCache=new pC;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(l)||(gm=!0,o.add(l),e=wC.bind(null,e,t,l),t.then(e,e))}function wC(e,t,l){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,zt===e&&(pt&l)===l&&((Wt===4||Wt===3&&(pt&62914560)===pt&&300>it()-nf)&&(Et&2)===0?za(e,0):tf|=l,Oa===pt&&(Oa=0)),ci(e)}function nx(e,t){t===0&&(t=ec()),e=is(e,t),e!==null&&(ts(e,t),ci(e))}function CC(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),nx(e,l)}function TC(e,t){var l=0;switch(e.tag){case 31:case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(l=o.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),nx(e,l)}function OC(e,t){return mn(e,t)}var _a=null,ka=null,Tm=!1,ff=!1,Om=!1,Er=0;function ci(e){e!==ka&&e.next===null&&(ka===null?_a=ka=e:ka=ka.next=e),ff=!0,Tm||(Tm=!0,AC())}function au(e,t){if(!Om&&ff){Om=!0;do for(var l=!1,r=_a;r!==null;){if(e!==0){var o=r.pendingLanes;if(o===0)var u=0;else{var y=r.suspendedLanes,w=r.pingedLanes;u=(1<<31-Qe(42|e)+1)-1,u&=o&~(y&~w),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,sx(r,u))}else u=pt,u=il(r,r===zt?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(u&3)===0||rl(r,u)||(l=!0,sx(r,u));r=r.next}while(l);Om=!1}}function jC(){lx()}function lx(){ff=Tm=!1;var e=0;Er!==0&&VC()&&(e=Er);for(var t=it(),l=null,r=_a;r!==null;){var o=r.next,u=ix(r,t);u===0?(r.next=null,l===null?_a=o:l.next=o,o===null&&(ka=l)):(l=r,(e!==0||(u&3)!==0)&&(ff=!0)),r=o}Kt!==0&&Kt!==5||au(e),Er!==0&&(Er=0)}function ix(e,t){for(var l=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var y=31-Qe(u),w=1<<y,k=o[y];k===-1?((w&l)===0||(w&r)!==0)&&(o[y]=Tl(w,t)):k<=t&&(e.expiredLanes|=w),u&=~w}if(t=zt,l=pt,l=il(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,l===0||e===t&&(Ot===2||Ot===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Sn(r),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||rl(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(r!==null&&Sn(r),Ao(l)){case 2:case 8:l=Be;break;case 32:l=tt;break;case 268435456:l=Pt;break;default:l=tt}return r=rx.bind(null,e),l=mn(l,r),e.callbackPriority=t,e.callbackNode=l,t}return r!==null&&r!==null&&Sn(r),e.callbackPriority=2,e.callbackNode=null,2}function rx(e,t){if(Kt!==0&&Kt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(cf()&&e.callbackNode!==l)return null;var r=pt;return r=il(e,e===zt?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Gv(e,r,t),ix(e,it()),e.callbackNode!=null&&e.callbackNode===l?rx.bind(null,e):null)}function sx(e,t){if(cf())return null;Gv(e,t,!0)}function AC(){qC(function(){(Et&6)!==0?mn(gn,jC):lx()})}function jm(){if(Er===0){var e=cs;e===0&&(e=ql,ql<<=1,(ql&261888)===0&&(ql=256)),Er=e}return Er}function ax(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:sc(e)}function NC(e,t,l,r,o){if(t==="submit"&&l&&l.stateNode===o){var u=ax((o[In]||null).action),y=r.submitter;y&&(t=(t=y[In]||null)?ax(t.formAction):y.getAttribute("formAction"),t!==null&&(u=t,y=null));var w=new cc("action","action",null,r,o);e.push({event:w,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Er!==0){var k=new FormData(o,y);Lh(l,{pending:!0,data:k,method:o.method,action:u},null,k)}}else typeof u=="function"&&(w.preventDefault(),k=new FormData(o,y),Lh(l,{pending:!0,data:k,method:o.method,action:u},u,k))},currentTarget:o}]})}}for(var Am=0;Am<eh.length;Am++){var Nm=eh[Am],MC=Nm.toLowerCase(),zC=Nm[0].toUpperCase()+Nm.slice(1);Gl(MC,"on"+zC)}Gl(Dy,"onAnimationEnd"),Gl(_y,"onAnimationIteration"),Gl(ky,"onAnimationStart"),Gl("dblclick","onDoubleClick"),Gl("focusin","onFocus"),Gl("focusout","onBlur"),Gl(Bw,"onTransitionRun"),Gl(qw,"onTransitionStart"),Gl(Pw,"onTransitionCancel"),Gl(Ly,"onTransitionEnd"),nr("onMouseEnter",["mouseout","mouseover"]),nr("onMouseLeave",["mouseout","mouseover"]),nr("onPointerEnter",["pointerout","pointerover"]),nr("onPointerLeave",["pointerout","pointerover"]),Ri("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ri("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ri("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ri("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ri("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ri("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ou="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),DC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ou));function ox(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var r=e[l],o=r.event;r=r.listeners;e:{var u=void 0;if(t)for(var y=r.length-1;0<=y;y--){var w=r[y],k=w.instance,Y=w.currentTarget;if(w=w.listener,k!==u&&o.isPropagationStopped())break e;u=w,o.currentTarget=Y;try{u(o)}catch(ee){hc(ee)}o.currentTarget=null,u=k}else for(y=0;y<r.length;y++){if(w=r[y],k=w.instance,Y=w.currentTarget,w=w.listener,k!==u&&o.isPropagationStopped())break e;u=w,o.currentTarget=Y;try{u(o)}catch(ee){hc(ee)}o.currentTarget=null,u=k}}}}function mt(e,t){var l=t[Ws];l===void 0&&(l=t[Ws]=new Set);var r=e+"__bubble";l.has(r)||(ux(t,e,2,!1),l.add(r))}function Mm(e,t,l){var r=0;t&&(r|=4),ux(l,e,r,t)}var df="_reactListening"+Math.random().toString(36).slice(2);function zm(e){if(!e[df]){e[df]=!0,lc.forEach(function(l){l!=="selectionchange"&&(DC.has(l)||Mm(l,!1,e),Mm(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[df]||(t[df]=!0,Mm("selectionchange",!1,t))}}function ux(e,t,l,r){switch($x(t)){case 2:var o=CT;break;case 8:o=TT;break;default:o=$m}l=o.bind(null,t,l,e),o=void 0,!Vd||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,l,{capture:!0,passive:o}):e.addEventListener(t,l,!0):o!==void 0?e.addEventListener(t,l,{passive:o}):e.addEventListener(t,l,!1)}function Dm(e,t,l,r,o){var u=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var y=r.tag;if(y===3||y===4){var w=r.stateNode.containerInfo;if(w===o)break;if(y===4)for(y=r.return;y!==null;){var k=y.tag;if((k===3||k===4)&&y.stateNode.containerInfo===o)return;y=y.return}for(;w!==null;){if(y=Si(w),y===null)return;if(k=y.tag,k===5||k===6||k===26||k===27){r=u=y;continue e}w=w.parentNode}}r=r.return}uy(function(){var Y=u,ee=Hd(l),fe=[];e:{var P=Uy.get(e);if(P!==void 0){var Z=cc,Te=e;switch(e){case"keypress":if(oc(l)===0)break e;case"keydown":case"keyup":Z=yw;break;case"focusin":Te="focus",Z=Gd;break;case"focusout":Te="blur",Z=Gd;break;case"beforeblur":case"afterblur":Z=Gd;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=dy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=rw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=Ew;break;case Dy:case _y:case ky:Z=ow;break;case Ly:Z=ww;break;case"scroll":case"scrollend":Z=lw;break;case"wheel":Z=Tw;break;case"copy":case"cut":case"paste":Z=cw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=my;break;case"submit":Z=xw;break;case"toggle":case"beforetoggle":Z=jw}var Ue=(t&4)!==0,ot=!Ue&&(e==="scroll"||e==="scrollend"),G=Ue?P!==null?P+"Capture":null:P;Ue=[];for(var I=Y,X;I!==null;){var ce=I;if(X=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||X===null||G===null||(ce=No(I,G),ce!=null&&Ue.push(uu(I,ce,X))),ot)break;I=I.return}0<Ue.length&&(P=new Z(P,Te,null,l,ee),fe.push({event:P,listeners:Ue}))}}if((t&7)===0){e:{if(Z=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",Z&&l!==Ud&&(Te=l.relatedTarget||l.fromElement)&&(Si(Te)||Te[$l]))break e;(P||Z)&&(Te=ee.window===ee?ee:(Z=ee.ownerDocument)?Z.defaultView||Z.parentWindow:window,P?(Z=l.relatedTarget||l.toElement,P=Y,Z=Z?Si(Z):null,Z!==null&&(ot=f(Z),Ue=Z.tag,Z!==ot||Ue!==5&&Ue!==27&&Ue!==6)&&(Z=null)):(P=null,Z=Y),P!==Z&&(Ue=dy,ce="onMouseLeave",G="onMouseEnter",I="mouse",(e==="pointerout"||e==="pointerover")&&(Ue=my,ce="onPointerLeave",G="onPointerEnter",I="pointer"),ot=P==null?Te:Ei(P),X=Z==null?Te:Ei(Z),Te=new Ue(ce,I+"leave",P,l,ee),Te.target=ot,Te.relatedTarget=X,ce=null,Si(ee)===Y&&(Ue=new Ue(G,I+"enter",Z,l,ee),Ue.target=X,Ue.relatedTarget=ot,ce=Ue),ot=ce,Ue=P&&Z?D(P,Z,_C):null,P!==null&&cx(fe,Te,P,Ue,!1),Z!==null&&ot!==null&&cx(fe,ot,Z,Ue,!0)))}e:{if(P=Y?Ei(Y):window,Z=P.nodeName&&P.nodeName.toLowerCase(),Z==="select"||Z==="input"&&P.type==="file")var De=Ey;else if(xy(P))if(Ry)De=Hw;else{De=Lw;var yt=kw}else Z=P.nodeName,!Z||Z.toLowerCase()!=="input"||P.type!=="checkbox"&&P.type!=="radio"?Y&&Ld(Y.elementType)&&(De=Ey):De=Uw;if(De&&(De=De(e,Y))){Sy(fe,De,l,ee);break e}yt&&yt(e,P,Y)}switch(yt=Y?Ei(Y):window,e){case"focusin":(xy(yt)||yt.contentEditable==="true")&&(ua=yt,Jd=Y,Ho=null);break;case"focusout":Ho=Jd=ua=null;break;case"mousedown":$d=!0;break;case"contextmenu":case"mouseup":case"dragend":$d=!1,My(fe,l,ee);break;case"selectionchange":if(Vw)break;case"keydown":case"keyup":My(fe,l,ee)}var Pe;if(Qd)e:{switch(e){case"compositionstart":var Je="onCompositionStart";break e;case"compositionend":Je="onCompositionEnd";break e;case"compositionupdate":Je="onCompositionUpdate";break e}Je=void 0}else oa?by(e,l)&&(Je="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Je="onCompositionStart");Je&&(gy&&l.locale!=="ko"&&(oa||Je!=="onCompositionStart"?Je==="onCompositionEnd"&&oa&&(Pe=cy()):(lr=ee,Bd="value"in lr?lr.value:lr.textContent,oa=!0)),yt=hf(Y,Je),0<yt.length&&(Je=new hy(Je,e,null,l,ee),fe.push({event:Je,listeners:yt}),Pe?Je.data=Pe:(Pe=vy(l),Pe!==null&&(Je.data=Pe)))),(Pe=Nw?Mw(e,l):zw(e,l))&&(Je=hf(Y,"onBeforeInput"),0<Je.length&&(yt=new hy("onBeforeInput","beforeinput",null,l,ee),fe.push({event:yt,listeners:Je}),yt.data=Pe)),NC(fe,e,Y,l,ee)}ox(fe,t)})}function uu(e,t,l){return{instance:e,listener:t,currentTarget:l}}function hf(e,t){for(var l=t+"Capture",r=[];e!==null;){var o=e,u=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||u===null||(o=No(e,l),o!=null&&r.unshift(uu(e,o,u)),o=No(e,t),o!=null&&r.push(uu(e,o,u))),e.tag===3)return r;e=e.return}return[]}function _C(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function cx(e,t,l,r,o){for(var u=t._reactName,y=[];l!==null&&l!==r;){var w=l,k=w.alternate,Y=w.stateNode;if(w=w.tag,k!==null&&k===r)break;w!==5&&w!==26&&w!==27||Y===null||(k=Y,o?(Y=No(l,u),Y!=null&&y.unshift(uu(l,Y,k))):o||(Y=No(l,u),Y!=null&&y.push(uu(l,Y,k)))),l=l.return}y.length!==0&&e.push({event:t,listeners:y})}var kC=/\r\n?/g,LC=/\u0000|\uFFFD/g;function fx(e){return(typeof e=="string"?e:""+e).replace(kC,`
|
|
49
|
+
`).replace(LC,"")}function dx(e,t){return t=fx(t),fx(e)===t}function At(e,t,l,r,o,u){switch(l){case"children":if(typeof r=="string")t==="body"||t==="textarea"&&r===""||ra(e,r);else if(typeof r=="number"||typeof r=="bigint")t!=="body"&&ra(e,""+r);else return;break;case"className":Ol(e,"class",r);break;case"tabIndex":Ol(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Ol(e,l,r);break;case"style":ay(e,r,u);return;case"data":if(t!=="object"){Ol(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(l);break}r=sc(r),e.setAttribute(l,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(l==="formAction"?(t!=="input"&&At(e,t,"name",o.name,o,null),At(e,t,"formEncType",o.formEncType,o,null),At(e,t,"formMethod",o.formMethod,o,null),At(e,t,"formTarget",o.formTarget,o,null)):(At(e,t,"encType",o.encType,o,null),At(e,t,"method",o.method,o,null),At(e,t,"target",o.target,o,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(l);break}r=sc(r),e.setAttribute(l,r);break;case"onClick":r!=null&&(e.onclick=ei);return;case"onScroll":r!=null&&mt("scroll",e);return;case"onScrollEnd":r!=null&&mt("scrollend",e);return;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(a(61));if(l=r.__html,l!=null){if(o.children!=null)throw Error(a(60));(u!=null?u.__html:void 0)!==l&&(e.innerHTML=l)}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}l=sc(r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(l,r):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":r===!0?e.setAttribute(l,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(l,r):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(l,r):e.removeAttribute(l);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(l):e.setAttribute(l,r);break;case"popover":mt("beforetoggle",e),mt("toggle",e),nn(e,"popover",r);break;case"xlinkActuate":Vn(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Vn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Vn(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Vn(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Vn(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Vn(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Vn(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Vn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Vn(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":nn(e,"is",r);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=tw.get(l)||l,nn(e,l,r);else return}Ie=!0}function _m(e,t,l,r,o,u){switch(l){case"style":ay(e,r,u);return;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(a(61));if(l=r.__html,l!=null){if(o.children!=null)throw Error(a(60));(u!=null?u.__html:void 0)!==l&&(e.innerHTML=l)}}break;case"children":if(typeof r=="string")ra(e,r);else if(typeof r=="number"||typeof r=="bigint")ra(e,""+r);else return;break;case"onScroll":r!=null&&mt("scroll",e);return;case"onScrollEnd":r!=null&&mt("scrollend",e);return;case"onClick":r!=null&&(e.onclick=ei);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!ic.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(o=l.endsWith("Capture"),u=l.slice(2,o?l.length-7:void 0),t=e[In]||null,t=t!=null?t[l]:null,typeof t=="function"&&e.removeEventListener(u,t,o),typeof r=="function")){typeof t!="function"&&t!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(u,r,o);break e}Ie=!0,l in e?e[l]=r:r===!0?e.setAttribute(l,""):nn(e,l,r)}return}Ie=!0}function Dn(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":mt("error",e),mt("load",e);var r=!1,o=!1,u;for(u in l)if(l.hasOwnProperty(u)){var y=l[u];if(y!=null)switch(u){case"src":r=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,t));default:At(e,t,u,y,l,null)}}o&&At(e,t,"srcSet",l.srcSet,l,null),r&&At(e,t,"src",l.src,l,null);return;case"input":mt("invalid",e);var w=u=y=o=null,k=null,Y=null;for(r in l)if(l.hasOwnProperty(r)){var ee=l[r];if(ee!=null)switch(r){case"name":o=ee;break;case"type":y=ee;break;case"checked":k=ee;break;case"defaultChecked":Y=ee;break;case"value":u=ee;break;case"defaultValue":w=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(a(137,t));break;default:At(e,t,r,ee,l,null)}}ly(e,u,w,k,Y,y,o,!1);return;case"select":mt("invalid",e),r=y=u=null;for(o in l)if(l.hasOwnProperty(o)&&(w=l[o],w!=null))switch(o){case"value":u=w;break;case"defaultValue":y=w;break;case"multiple":r=w;default:At(e,t,o,w,l,null)}t=u,l=y,e.multiple=!!r,t!=null?ia(e,!!r,t,!1):l!=null&&ia(e,!!r,l,!0);return;case"textarea":mt("invalid",e),u=o=r=null;for(y in l)if(l.hasOwnProperty(y)&&(w=l[y],w!=null))switch(y){case"value":r=w;break;case"defaultValue":o=w;break;case"children":u=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(a(91));break;default:At(e,t,y,w,l,null)}ry(e,r,o,u);return;case"option":for(k in l)if(l.hasOwnProperty(k)&&(r=l[k],r!=null))switch(k){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:At(e,t,k,r,l,null)}return;case"dialog":mt("beforetoggle",e),mt("toggle",e),mt("cancel",e),mt("close",e);break;case"iframe":case"object":mt("load",e);break;case"video":case"audio":for(r=0;r<ou.length;r++)mt(ou[r],e);break;case"image":mt("error",e),mt("load",e);break;case"details":mt("toggle",e);break;case"embed":case"source":case"link":mt("error",e),mt("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Y in l)if(l.hasOwnProperty(Y)&&(r=l[Y],r!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,t));default:At(e,t,Y,r,l,null)}return;default:if(Ld(t)){for(ee in l)l.hasOwnProperty(ee)&&(r=l[ee],r!==void 0&&_m(e,t,ee,r,l,void 0));return}}for(w in l)l.hasOwnProperty(w)&&(r=l[w],r!=null&&At(e,t,w,r,l,null))}var UC={};function HC(e,t,l,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,u=null,y=null,w=null,k=null,Y=null,ee=null;for(Z in l){var fe=l[Z];if(l.hasOwnProperty(Z)&&fe!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":k=fe;default:r.hasOwnProperty(Z)||At(e,t,Z,null,r,fe)}}for(var P in r){var Z=r[P];if(fe=l[P],r.hasOwnProperty(P)&&(Z!=null||fe!=null))switch(P){case"type":Z!==fe&&(Ie=!0),u=Z;break;case"name":Z!==fe&&(Ie=!0),o=Z;break;case"checked":Z!==fe&&(Ie=!0),Y=Z;break;case"defaultChecked":Z!==fe&&(Ie=!0),ee=Z;break;case"value":Z!==fe&&(Ie=!0),y=Z;break;case"defaultValue":Z!==fe&&(Ie=!0),w=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(a(137,t));break;default:Z!==fe&&At(e,t,P,Z,r,fe)}}_d(e,y,w,k,Y,ee,u,o);return;case"select":Z=y=w=P=null;for(u in l)if(k=l[u],l.hasOwnProperty(u)&&k!=null)switch(u){case"value":break;case"multiple":Z=k;default:r.hasOwnProperty(u)||At(e,t,u,null,r,k)}for(o in r)if(u=r[o],k=l[o],r.hasOwnProperty(o)&&(u!=null||k!=null))switch(o){case"value":u!==k&&(Ie=!0),P=u;break;case"defaultValue":u!==k&&(Ie=!0),w=u;break;case"multiple":u!==k&&(Ie=!0),y=u;default:u!==k&&At(e,t,o,u,r,k)}t=w,l=y,r=Z,P!=null?ia(e,!!l,P,!1):!!r!=!!l&&(t!=null?ia(e,!!l,t,!0):ia(e,!!l,l?[]:"",!1));return;case"textarea":Z=P=null;for(w in l)if(o=l[w],l.hasOwnProperty(w)&&o!=null&&!r.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:At(e,t,w,null,r,o)}for(y in r)if(o=r[y],u=l[y],r.hasOwnProperty(y)&&(o!=null||u!=null))switch(y){case"value":o!==u&&(Ie=!0),P=o;break;case"defaultValue":o!==u&&(Ie=!0),Z=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(a(91));break;default:o!==u&&At(e,t,y,o,r,u)}iy(e,P,Z);return;case"option":for(var Te in l)if(P=l[Te],l.hasOwnProperty(Te)&&P!=null&&!r.hasOwnProperty(Te))switch(Te){case"selected":e.selected=!1;break;default:At(e,t,Te,null,r,P)}for(k in r)if(P=r[k],Z=l[k],r.hasOwnProperty(k)&&P!==Z&&(P!=null||Z!=null))switch(k){case"selected":P!==Z&&(Ie=!0),e.selected=P&&typeof P!="function"&&typeof P!="symbol";break;default:At(e,t,k,P,r,Z)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ue in l)P=l[Ue],l.hasOwnProperty(Ue)&&P!=null&&!r.hasOwnProperty(Ue)&&At(e,t,Ue,null,r,P);for(Y in r)if(P=r[Y],Z=l[Y],r.hasOwnProperty(Y)&&P!==Z&&(P!=null||Z!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(a(137,t));break;default:At(e,t,Y,P,r,Z)}return;default:if(Ld(t)){for(var ot in l)P=l[ot],l.hasOwnProperty(ot)&&P!==void 0&&!r.hasOwnProperty(ot)&&_m(e,t,ot,void 0,r,P);for(ee in r)P=r[ee],Z=l[ee],!r.hasOwnProperty(ee)||P===Z||P===void 0&&Z===void 0||_m(e,t,ee,P,r,Z);return}}for(var G in l)P=l[G],l.hasOwnProperty(G)&&P!=null&&!r.hasOwnProperty(G)&&At(e,t,G,null,r,P);for(fe in r)P=r[fe],Z=l[fe],!r.hasOwnProperty(fe)||P===Z||P==null&&Z==null||At(e,t,fe,P,r,Z)}function hx(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function IC(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),r=0;r<l.length;r++){var o=l[r],u=o.transferSize,y=o.initiatorType,w=o.duration;if(u&&w&&hx(y)){for(y=0,w=o.responseEnd,r+=1;r<l.length;r++){var k=l[r],Y=k.startTime;if(Y>w)break;var ee=k.transferSize,fe=k.initiatorType;ee&&hx(fe)&&(k=k.responseEnd,y+=ee*(k<w?1:(w-Y)/(k-Y)))}if(--r,t+=8*(u+y)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var km=null,Lm=null;function cu(e){return e.nodeType===9?e:e.ownerDocument}function mx(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function gx(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function px(e,t,l,r){return l=cu(l).createElement(e),l[Ut]=r,l[In]=t,Dn(l,e,t),Jt(l),l}function Um(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Hm=null;function VC(){var e=window.event;return e&&e.type==="popstate"?e===Hm?!1:(Hm=e,!0):(Hm=null,!1)}var Im=typeof setTimeout=="function"?setTimeout:void 0,BC=typeof clearTimeout=="function"?clearTimeout:void 0,yx=typeof Promise=="function"?Promise:void 0,bx=typeof requestAnimationFrame=="function"?requestAnimationFrame:Im,qC=typeof queueMicrotask=="function"?queueMicrotask:typeof yx<"u"?function(e){return yx.resolve(null).then(e).catch(PC)}:Im;function PC(e){setTimeout(function(){throw e})}function Rr(e){return e==="head"}function vx(e,t){var l=t,r=0;do{var o=l.nextSibling;if(e.removeChild(l),o&&o.nodeType===8)if(l=o.data,l==="/$"||l==="/&"){if(r===0){e.removeChild(o),qa(t);return}r--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")r++;else if(l==="html")Km(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Km(l);for(var u=l.firstChild;u;){var y=u.nextSibling,w=u.nodeName;u[xi]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&u.rel.toLowerCase()==="stylesheet"||l.removeChild(u),u=y}}else l==="body"&&Km(e.ownerDocument.body);l=o}while(l);qa(t)}function xx(e,t){var l=e;e=0;do{var r=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),r&&r.nodeType===8)if(l=r.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=r}while(l)}function Sx(e,t,l){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,l!=null&&(e.style.viewTransitionClass=l),l=getComputedStyle(e),l.display==="inline"){if(t=e.getClientRects(),t.length===1)var r=1;else for(var o=r=0;o<t.length;o++){var u=t[o];0<u.width&&0<u.height&&r++}r===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+l.paddingTop,e.marginBottom="-"+l.paddingBottom)}}function Ex(e,t){e=e.style,t=t.style;var l=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=l==null||typeof l=="boolean"?"":(""+l).trim(),l=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=l==null||typeof l=="boolean"?"":(""+l).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(l=t.display,e.display=l==null||typeof l=="boolean"?"":l,l=t.margin,l!=null?e.margin=l:(l=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=l==null||typeof l=="boolean"?"":l,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function GC(e,t,l){return l=l.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=l.innerHeight&&e.left<=l.innerWidth}}function Vm(e){var t=e.getBoundingClientRect(),l=getComputedStyle(e);return GC(t,l,e)}function YC(e){return e.documentElement.clientHeight}function QC(e){this.addEventListener("load",e),this.addEventListener("error",e)}function KC(e,t,l,r,o,u,y,w,k){var Y=t.nodeType===9?t:t.ownerDocument;try{var ee=Y.startViewTransition({update:function(){var P=Y.defaultView,Z=P.navigation&&P.navigation.transition,Te=Y.fonts.status;r();var Ue=[];if(Te==="loaded"&&(YC(Y),Y.fonts.status==="loading"&&Ue.push(Y.fonts.ready)),Te=Ue.length,e!==null)for(var ot=e.suspenseyImages,G=0,I=0;I<ot.length;I++){var X=ot[I];if(!X.complete){var ce=X.getBoundingClientRect();if(0<ce.bottom&&0<ce.right&&ce.top<P.innerHeight&&ce.left<P.innerWidth){if(G+=Px(X),G>pf){Ue.length=Te;break}X=new Promise(QC.bind(X)),Ue.push(X)}}}if(0<Ue.length)return P=Promise.race([Promise.all(Ue),new Promise(function(De){return setTimeout(De,500)})]).then(o,o),(Z?Promise.allSettled([Z.finished,P]):P).then(u,u);if(o(),Z)return Z.finished.then(u,u);u()},types:l});Y.__reactViewTransition=ee;var fe=[];return ee.ready.then(function(){for(var P=Y.documentElement.getAnimations({subtree:!0}),Z=0;Z<P.length;Z++){var Te=P[Z],Ue=Te.effect,ot=Ue.pseudoElement;if(ot!=null&&ot.startsWith("::view-transition")){fe.push(Te),Te=Ue.getKeyframes();for(var G=ot=void 0,I=!0,X=0;X<Te.length;X++){var ce=Te[X],De=ce.width;if(ot===void 0)ot=De;else if(ot!==De){I=!1;break}if(De=ce.height,G===void 0)G=De;else if(G!==De){I=!1;break}delete ce.width,delete ce.height,ce.transform==="none"&&delete ce.transform}I&&ot!==void 0&&G!==void 0&&(Ue.setKeyframes(Te),I=getComputedStyle(Ue.target,Ue.pseudoElement),I.width!==ot||I.height!==G)&&(I=Te[0],I.width=ot,I.height=G,I=Te[Te.length-1],I.width=ot,I.height=G,Ue.setKeyframes(Te))}}y()},function(P){Y.__reactViewTransition===ee&&(Y.__reactViewTransition=null);try{if(typeof P=="object"&&P!==null)switch(P.name){case"InvalidStateError":(P.message==="View transition was skipped because document visibility state is hidden."||P.message==="Skipping view transition because document visibility state has become hidden."||P.message==="Skipping view transition because viewport size changed."||P.message==="Transition was aborted because of invalid state")&&(P=null)}P!==null&&k(P)}finally{r(),o(),y()}}),ee.finished.finally(function(){for(var P=0;P<fe.length;P++)fe[P].cancel();Y.__reactViewTransition===ee&&(Y.__reactViewTransition=null),w()}),ee}catch{return r(),o(),y(),null}}function Ss(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}Ss.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:_({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Ss.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,l=e.getAnimations({subtree:!0}),r=[],o=0;o<l.length;o++){var u=l[o].effect;u!==null&&u.target===e&&u.pseudoElement===t&&r.push(l[o])}return r},Ss.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Rx(e){return{name:e,group:new Ss("group",e),imagePair:new Ss("image-pair",e),old:new Ss("old",e),new:new Ss("new",e)}}function xl(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}xl.prototype.addEventListener=function(e,t,l){var r=null,o=null;if(!(l!=null&&typeof l!="boolean"&&(r=l.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var u=this._eventListeners;if(Cx(u,e,t,l)===-1){var y=this,w=t;l!=null&&typeof l!="boolean"&&l.once===!0&&(w=function(k){y.removeEventListener(e,t,l),typeof t=="function"?t.call(this,k):t.handleEvent(k)}),r!==null&&(o=y.removeEventListener.bind(y,e,t,l),r.addEventListener("abort",o,{once:!0}),o=r.removeEventListener.bind(r,"abort",o)),r=La(l),u.push({type:e,listener:t,optionsOrUseCapture:l,attachedListener:w,cleanup:o}),b(this._fragmentFiber.child,!1,FC,e,w,r)}this._eventListeners=u}};function FC(e,t,l,r){return j(e).addEventListener(t,l,r),!1}xl.prototype.removeEventListener=function(e,t,l){var r=this._eventListeners;if(r!==null&&(t=Cx(r,e,t,l),t!==-1)){var o=r[t];l=o.attachedListener;var u=o.cleanup;o=La(o.optionsOrUseCapture),b(this._fragmentFiber.child,!1,XC,e,l,o),r.splice(t,1),u!==null&&u()}};function XC(e,t,l,r){return j(e).removeEventListener(t,l,r),!1}function La(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function wx(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function Cx(e,t,l,r){if(e.length===0)return-1;r=wx(r);for(var o=0;o<e.length;o++){var u=e[o];if(u.type===t&&u.listener===l&&wx(u.optionsOrUseCapture)===r)return o}return-1}xl.prototype.dispatchEvent=function(e){var t=S(this._fragmentFiber);if(t===null)return!0;t=j(t);var l=this._eventListeners;if(l!==null&&0<l.length||!e.bubbles){var r=t.nodeType===9?t.createComment(""):document.createTextNode("");if(l)for(var o=0;o<l.length;o++){var u=l[o];r.addEventListener(u.type,u.attachedListener,La(u.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),l)for(o=0;o<l.length;o++)u=l[o],r.removeEventListener(u.type,u.attachedListener,La(u.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},xl.prototype.focus=function(e){b(this._fragmentFiber.child,!0,Tx,e,void 0,void 0)};function Tx(e,t){return e.tag===6?!1:(e=j(e),aT(e,t))}xl.prototype.focusLast=function(e){var t=[];b(this._fragmentFiber.child,!0,Bm,t,void 0,void 0);for(var l=t.length-1;0<=l&&!Tx(t[l],e);l--);};function Bm(e,t){return t.push(e),!1}xl.prototype.blur=function(){var e=S(this._fragmentFiber);e!==null&&(e=j(e),e=cu(e).activeElement,e!==null&&b(this._fragmentFiber.child,!1,ZC,e,void 0,void 0))};function ZC(e,t){return e.tag===6?!1:(e=j(e),e===t||e.contains(t)?(t.blur(),!0):!1)}xl.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),b(this._fragmentFiber.child,!1,JC,e,void 0,void 0)};function JC(e,t){return e.tag===6||(e=j(e),t.observe(e)),!1}xl.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),b(this._fragmentFiber.child,!1,$C,e,void 0,void 0);for(var l=t=0;l<Xl.length;l++){var r=Xl[l];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Xl[t++]=r}Xl.length=t}};function $C(e,t){return e.tag===6||(e=j(e),t.unobserve(e)),!1}var Xl=[],qm=!1;function WC(e,t,l){Xl.push({fragmentInstance:e,observer:t,instance:l}),qm||(qm=!0,oT(function(){qm=!1;var r=Xl;Xl=[];for(var o=0;o<r.length;o++){var u=r[o];u.observer.unobserve(u.instance)}}))}xl.prototype.getClientRects=function(){var e=[];return b(this._fragmentFiber.child,!1,eT,e,void 0,void 0),e};function eT(e,t){if(e.tag===6){e=e.stateNode;var l=e.ownerDocument.createRange();l.selectNodeContents(e),t.push.apply(t,l.getClientRects())}else e=j(e),t.push.apply(t,e.getClientRects());return!1}xl.prototype.getRootNode=function(e){var t=S(this._fragmentFiber);return t===null?this:j(t).getRootNode(e)},xl.prototype.compareDocumentPosition=function(e){var t=S(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];b(this._fragmentFiber.child,!1,Bm,l,void 0,void 0);var r=j(t);if(l.length===0){if(l=r,C(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(l=t)}t=this._fragmentFiber;var o=r=l.compareDocumentPosition(e);return l===e?o=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=T(t)[1],l===null?o=Node.DOCUMENT_POSITION_PRECEDING:(e=j(l).compareDocumentPosition(e),o=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),o|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=j(l[0]),o=j(l[l.length-1]);var u=C(this._fragmentFiber)?t.parentElement:r;if(u==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=u.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,u=u.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY;var y=t.compareDocumentPosition(e),w=o.compareDocumentPosition(e),k=y&Node.DOCUMENT_POSITION_CONTAINED_BY||w&Node.DOCUMENT_POSITION_CONTAINED_BY;return w=r&&u&&y&Node.DOCUMENT_POSITION_FOLLOWING&&w&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||u&&o===e||k||w?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!u&&o===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:y,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||tT(t,this._fragmentFiber,l[0],l[l.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function tT(e,t,l,r,o){var u=Si(o);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!u)e:{for(;u!==null;){if(u.tag===7&&(u===t||u.alternate===t)){l=!0;break e}u=u.return}l=!1}return l}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(u===null)return u=o.ownerDocument,o===u||o===u.documentElement||o===u.body;e:{for(u=t,t=S(t);u!==null;){if(!(u.tag!==5&&u.tag!==3&&u.tag!==27||u!==t&&u.alternate!==t)){u=!0;break e}u=u.return}u=!1}return u}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!u)&&!(t=u===l)&&(t=D(l,u,L),t===null?t=!1:(b(t,!0,A,u,l),u=O,O=null,t=u!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!u)&&!(t=u===r)&&(t=D(r,u,L),t===null?t=!1:(b(t,!0,N,u,r),u=O,E=O=null,t=u!==null)),t):!1}function Ox(e,t){var l=e.ownerDocument.createRange();l.selectNodeContents(e),e=l.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}xl.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(a(566));var t=[];b(this._fragmentFiber.child,!1,Bm,t,void 0,void 0);var l=e!==!1;if(t.length===0){var r=T(this._fragmentFiber);if(r=l?r[1]||r[0]||S(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=j(r),Ox(e,l);return}if(r=j(r),r.nodeType!==9){if(r.nodeType===11){l="host"in r?r.host:null,l!==null&&l.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=l?t.length-1:0;r!==(l?-1:t.length);){var o=t[r];o.tag===6?(o=j(o),Ox(o,l)):j(o).scrollIntoView(e),r+=l?-1:1}};function nT(e,t){return e=j(e),jx(e,t),!1}function jx(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function Ax(e,t){var l=t._eventListeners;if(l!==null)for(var r=0;r<l.length;r++){var o=l[r];e.addEventListener(o.type,o.attachedListener,La(o.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(u){for(var y=0,w=0;w<Xl.length;w++){var k=Xl[w];(k.fragmentInstance!==t||k.observer!==u||k.instance!==e)&&(Xl[y++]=k)}Xl.length=y,u.observe(e)}),jx(e,t))}function lT(e,t){var l=t._eventListeners;if(l!==null)for(var r=0;r<l.length;r++){var o=l[r];e.removeEventListener(o.type,o.attachedListener,La(o.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(u){typeof u.rootMargin=="string"?WC(t,u,e):u.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function Pm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Pm(l),la(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function iT(e,t,l,r){for(;e.nodeType===1;){var o=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[xi])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=kl(e.nextSibling),e===null)break}return null}function rT(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=kl(e.nextSibling),e===null))return null;return e}function Nx(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=kl(e.nextSibling),e===null))return null;return e}function Gm(e){return e.data==="$?"||e.data==="$~"}function Ym(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function sT(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var r=function(){t(),l.removeEventListener("DOMContentLoaded",r)};l.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function kl(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Qm=null;function Mx(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return kl(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function zx(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function aT(e,t){function l(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener("focus",l,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",l,!0)}return r}function oT(e){bx(function(){bx(function(t){return e(t)})})}function Dx(e,t,l){switch(t=cu(l),e){case"html":if(e=t.documentElement,!e)throw Error(a(452));return e;case"head":if(e=t.head,!e)throw Error(a(453));return e;case"body":if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function _x(e,t,l){for(var r in l){var o=l[r];l.hasOwnProperty(r)&&o!=null&&At(e,t,r,null,UC,o)}l.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===ei&&(e.onclick=null),la(e)}function Km(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);la(e)}var Ll=new Map,kx=new Set;function fu(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Li=le.d;le.d={f:uT,r:cT,D:fT,C:dT,L:hT,m:mT,X:pT,S:gT,M:yT};function uT(){var e=Li.f(),t=af();return e||t}function cT(e){var t=tr(e);t!==null&&t.tag===5&&t.type==="form"?Ub(t):Li.r(e)}var Ua=typeof document>"u"?null:document;function Lx(e,t,l){var r=Ua;if(r&&typeof t=="string"&&t){var o=jl(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof l=="string"&&(o+='[crossorigin="'+l+'"]'),kx.has(o)||(kx.add(o),e={rel:e,crossOrigin:l,href:t},r.querySelector(o)===null&&(t=r.createElement("link"),Dn(t,"link",e),Jt(t),r.head.appendChild(t)))}}function fT(e){Li.D(e),Lx("dns-prefetch",e,null)}function dT(e,t){Li.C(e,t),Lx("preconnect",e,t)}function hT(e,t,l){Li.L(e,t,l);var r=Ua;if(r&&e&&t){var o='link[rel="preload"][as="'+jl(t)+'"]';t==="image"&&l&&l.imageSrcSet?(o+='[imagesrcset="'+jl(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(o+='[imagesizes="'+jl(l.imageSizes)+'"]')):o+='[href="'+jl(e)+'"]';var u=o;switch(t){case"style":u=Ha(e);break;case"script":u=Ia(e)}if(!(Ll.has(u)||(e=_({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Ll.set(u,e),r.querySelector(o)!==null||t==="style"&&r.querySelector(du(u))||t==="script"&&r.querySelector(hu(u))))){var y=r.createElement("link");Dn(y,"link",e),t==="style"&&(y[na]=!0,y.onload=y.onerror=function(){nc(y)}),Jt(y),r.head.appendChild(y)}}}function mT(e,t){Li.m(e,t);var l=Ua;if(l&&e){var r=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+jl(r)+'"][href="'+jl(e)+'"]',u=o;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Ia(e)}if(!Ll.has(u)&&(e=_({rel:"modulepreload",href:e},t),Ll.set(u,e),l.querySelector(o)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(hu(u)))return}r=l.createElement("link"),Dn(r,"link",e),Jt(r),l.head.appendChild(r)}}}function gT(e,t,l){Li.S(e,t,l);var r=Ua;if(r&&e){var o=Wl(r).hoistableStyles,u=Ha(e);t=t||"default";var y=o.get(u);if(!y){var w={loading:0,preload:null};if(y=r.querySelector(du(u)))w.loading=5;else{e=_({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Ll.get(u))&&Fm(e,l);var k=y=r.createElement("link");Jt(k),Dn(k,"link",e),k._p=new Promise(function(Y,ee){k.onload=Y,k.onerror=ee}),k.addEventListener("load",function(){w.loading|=1}),k.addEventListener("error",function(){w.loading|=2}),w.loading|=4,mf(y,t,r)}y={type:"stylesheet",instance:y,count:1,state:w},o.set(u,y)}}}function pT(e,t){Li.X(e,t);var l=Ua;if(l&&e){var r=Wl(l).hoistableScripts,o=Ia(e),u=r.get(o);u||(u=l.querySelector(hu(o)),u||(e=_({src:e,async:!0},t),(t=Ll.get(o))&&Xm(e,t),u=l.createElement("script"),Jt(u),Dn(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},r.set(o,u))}}function yT(e,t){Li.M(e,t);var l=Ua;if(l&&e){var r=Wl(l).hoistableScripts,o=Ia(e),u=r.get(o);u||(u=l.querySelector(hu(o)),u||(e=_({src:e,async:!0,type:"module"},t),(t=Ll.get(o))&&Xm(e,t),u=l.createElement("script"),Jt(u),Dn(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},r.set(o,u))}}function Ux(e,t,l,r){var o=(o=je.current)?fu(o):null;if(!o)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=Ha(l.href),t=Wl(o).hoistableStyles,r=t.get(l),r||(r={type:"style",instance:null,count:0,state:null},t.set(l,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Ha(l.href);var u=Wl(o).hoistableStyles,y=u.get(e);if(y||(o=o.ownerDocument||o,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,y),(u=o.querySelector(du(e)))?u._p||(y.instance=u,y.state.loading=5):(u=Ll.get(e),u||(u={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ll.set(e,u)),bT(o,e,u,y.state))),t&&r===null)throw Error(a(528,""));return y}if(t&&r!==null)throw Error(a(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(l=Ia(l),t=Wl(o).hoistableScripts,r=t.get(l),r||(r={type:"script",instance:null,count:0,state:null},t.set(l,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Ha(e){return'href="'+jl(e)+'"'}function du(e){return'link[rel="stylesheet"]['+e+"]"}function Hx(e){return _({},e,{"data-precedence":e.precedence,precedence:null})}function bT(e,t,l,r){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[na]!==!0){r.loading=1;return}}else t=e.createElement("link"),t[na]=!0,t.onload=t.onerror=nc.bind(null,t),Dn(t,"link",l),Jt(t),e.head.appendChild(t);r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2})}function Ia(e){return'[src="'+jl(e)+'"]'}function hu(e){return"script[async]"+e}function Ix(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+jl(l.href)+'"]');if(r)return t.instance=r,Jt(r),r;var o=_({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Jt(r),Dn(r,"style",o),mf(r,l.precedence,e),t.instance=r;case"stylesheet":o=Ha(l.href);var u=e.querySelector(du(o));if(u)return t.state.loading|=4,t.instance=u,Jt(u),u;r=Hx(l),(o=Ll.get(o))&&Fm(r,o),u=(e.ownerDocument||e).createElement("link"),Jt(u);var y=u;return y._p=new Promise(function(w,k){y.onload=w,y.onerror=k}),Dn(u,"link",r),t.state.loading|=4,mf(u,l.precedence,e),t.instance=u;case"script":return u=Ia(l.src),(o=e.querySelector(hu(u)))?(t.instance=o,Jt(o),o):(r=l,(o=Ll.get(u))&&(r=_({},l),Xm(r,o)),e=e.ownerDocument||e,o=e.createElement("script"),Jt(o),Dn(o,"link",r),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(a(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,mf(r,l.precedence,e));return t.instance}function mf(e,t,l){for(var r=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=r.length?r[r.length-1]:null,u=o,y=0;y<r.length;y++){var w=r[y];if(w.dataset.precedence===t)u=w;else if(u!==o)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Fm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Xm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var gf=null;function Vx(e,t,l){if(gf===null){var r=new Map,o=gf=new Map;o.set(l,r)}else o=gf,r=o.get(l),r||(r=new Map,o.set(l,r));if(r.has(e))return r;for(r.set(e,null),l=l.getElementsByTagName(e),o=0;o<l.length;o++){var u=l[o];if(!(u[xi]||u[Ut]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var y=u.getAttribute(t)||"";y=e+y;var w=r.get(y);w?w.push(u):r.set(y,[u])}}return r}function Zm(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function vT(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Bx(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function qx(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Px(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function Gx(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=Px(t),e.suspenseyImages.push(t)),e=ET.bind(e),t.decode().then(e,e))}function xT(e,t,l,r){if(l.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var o=Ha(r.href),u=t.querySelector(du(o));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=mu.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=u,Jt(u);return}u=t.ownerDocument||t,r=Hx(r),(o=Ll.get(o))&&Fm(r,o),u=u.createElement("link"),Jt(u);var y=u;y._p=new Promise(function(w,k){y.onload=w,y.onerror=k}),Dn(u,"link",r),l.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=mu.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var pf=0;function ST(e,t){return e.stylesheets&&e.count===0&&bf(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var r=setTimeout(function(){if(e.stylesheets&&bf(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&pf===0&&(pf=62500*IC());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&bf(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>pf?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(o)}}:null}function Yx(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)bf(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function mu(){this.count--,Yx(this)}function ET(){this.imgCount--,Yx(this)}var yf=null;function bf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,yf=new Map,t.forEach(RT,e),yf=null,mu.call(e))}function RT(e,t){if(!(t.state.loading&4)){var l=yf.get(e);if(l)var r=l.get(null);else{l=new Map,yf.set(e,l);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<o.length;u++){var y=o[u];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(l.set(y.dataset.precedence,y),r=y)}r&&l.set(null,r)}o=t.instance,y=o.getAttribute("data-precedence"),u=l.get(y)||r,u===r&&l.set(null,o),l.set(y,o),this.count++,r=mu.bind(this),o.addEventListener("load",r),o.addEventListener("error",r),u?u.parentNode.insertBefore(o,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var Va={$$typeof:V,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function wT(e,t,l,r,o,u,y,w,k){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Js(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Js(0),this.hiddenUpdates=Js(null),this.identifierPrefix=r,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.transitionTypes=null,this.incompleteTransitions=new Map}function Qx(e,t,l,r,o,u,y,w,k,Y,ee,fe){return e=new wT(e,t,l,y,k,Y,ee,fe,w),t=1,u===!0&&(t|=24),u=sl(3,null,null,t),e.current=u,u.stateNode=e,t=fh(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:r,isDehydrated:l,cache:t},gh(u),e}function Kx(e){return e?(e=da,e):da}function Fx(e,t,l,r,o,u){o=Kx(o),r.context===null?r.context=o:r.pendingContext=o,r=fr(t),r.payload={element:l},u=u===void 0?null:u,u!==null&&(r.callback=u),l=dr(e,r,t),l!==null&&(cl(l,e,t),Yo(l,e,t))}function Xx(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Jm(e,t){Xx(e,t),(e=e.alternate)&&Xx(e,t)}function Zx(e){if(e.tag===13||e.tag===31){var t=is(e,67108864);t!==null&&cl(t,e,67108864),Jm(e,67108864)}}function Jx(e){if(e.tag===13||e.tag===31){var t=vl();t=er(t);var l=is(e,t);l!==null&&cl(l,e,t),Jm(e,t)}}var Ba=!0;function CT(e,t,l,r){var o=q.T;q.T=null;var u=le.p;try{le.p=2,$m(e,t,l,r)}finally{le.p=u,q.T=o}}function TT(e,t,l,r){var o=q.T;q.T=null;var u=le.p;try{le.p=8,$m(e,t,l,r)}finally{le.p=u,q.T=o}}function $m(e,t,l,r){if(Ba){var o=Wm(r);if(o===null)Dm(e,t,r,vf,l),Wx(e,r);else if(jT(o,e,t,l,r))r.stopPropagation();else if(Wx(e,r),t&4&&-1<OT.indexOf(e)){for(;o!==null;){var u=tr(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var y=Hn(u.pendingLanes);if(y!==0){var w=u;for(w.pendingLanes|=2,w.entangledLanes|=2;y;){var k=1<<31-Qe(y);w.entanglements[1]|=k,y&=~k}ci(u),(Et&6)===0&&(lf=it()+500,au(0))}}break;case 31:case 13:w=is(u,2),w!==null&&cl(w,u,2),af(),Jm(u,2)}if(u=Wm(r),u===null&&Dm(e,t,r,vf,l),u===o)break;o=u}o!==null&&r.stopPropagation()}else Dm(e,t,r,null,l)}}function Wm(e){return e=Hd(e),eg(e)}var vf=null;function eg(e){if(vf=null,e=Si(e),e!==null){var t=f(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=d(t),e!==null)return e;e=null}else if(l===31){if(e=h(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return vf=e,null}function $x(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(rt()){case gn:return 2;case Be:return 8;case tt:case Tt:return 32;case Pt:return 268435456;default:return 32}default:return 32}}var tg=!1,wr=null,Cr=null,Tr=null,gu=new Map,pu=new Map,Or=[],OT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Wx(e,t){switch(e){case"focusin":case"focusout":wr=null;break;case"dragenter":case"dragleave":Cr=null;break;case"mouseover":case"mouseout":Tr=null;break;case"pointerover":case"pointerout":gu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":pu.delete(t.pointerId)}}function yu(e,t,l,r,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:l,eventSystemFlags:r,nativeEvent:u,targetContainers:[o]},t!==null&&(t=tr(t),t!==null&&Zx(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function jT(e,t,l,r,o){switch(t){case"focusin":return wr=yu(wr,e,t,l,r,o),!0;case"dragenter":return Cr=yu(Cr,e,t,l,r,o),!0;case"mouseover":return Tr=yu(Tr,e,t,l,r,o),!0;case"pointerover":var u=o.pointerId;return gu.set(u,yu(gu.get(u)||null,e,t,l,r,o)),!0;case"gotpointercapture":return u=o.pointerId,pu.set(u,yu(pu.get(u)||null,e,t,l,r,o)),!0}return!1}function e0(e){var t=Si(e.target);if(t!==null){var l=f(t);if(l!==null){if(t=l.tag,t===13){if(t=d(l),t!==null){e.blockedOn=t,Kn(e.priority,function(){Jx(l)});return}}else if(t===31){if(t=h(l),t!==null){e.blockedOn=t,Kn(e.priority,function(){Jx(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xf(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Wm(e.nativeEvent);if(l===null){l=e.nativeEvent;var r=new l.constructor(l.type,l);Ud=r,l.target.dispatchEvent(r),Ud=null}else return t=tr(l),t!==null&&Zx(t),e.blockedOn=l,!1;t.shift()}return!0}function t0(e,t,l){xf(e)&&l.delete(t)}function AT(){tg=!1,wr!==null&&xf(wr)&&(wr=null),Cr!==null&&xf(Cr)&&(Cr=null),Tr!==null&&xf(Tr)&&(Tr=null),gu.forEach(t0),pu.forEach(t0)}function Sf(e,t){e.blockedOn===t&&(e.blockedOn=null,tg||(tg=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,AT)))}var Ef=null;function n0(e){Ef!==e&&(Ef=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Ef===e&&(Ef=null);for(var t=0;t<e.length;t+=3){var l=e[t],r=e[t+1],o=e[t+2];if(typeof r!="function"){if(eg(r||l)===null)continue;break}var u=tr(l);u!==null&&(e.splice(t,3),t-=3,Lh(u,{pending:!0,data:o,method:l.method,action:r},r,o))}}))}function qa(e){function t(k){return Sf(k,e)}wr!==null&&Sf(wr,e),Cr!==null&&Sf(Cr,e),Tr!==null&&Sf(Tr,e),gu.forEach(t),pu.forEach(t);for(var l=0;l<Or.length;l++){var r=Or[l];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Or.length&&(l=Or[0],l.blockedOn===null);)e0(l),l.blockedOn===null&&Or.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(r=0;r<l.length;r+=3){var o=l[r],u=l[r+1],y=o[In]||null;if(typeof u=="function")y||n0(l);else if(y){var w=null;if(u&&u.hasAttribute("formAction")){if(o=u,y=u[In]||null)w=y.formAction;else if(eg(o)!==null)continue}else w=y.action;typeof w=="function"?l[r+1]=w:(l.splice(r,3),r-=3),n0(l)}}}function l0(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(y){return o=y})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),r||setTimeout(l,20)}function l(){if(!r&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function ng(e){this._internalRoot=e}Rf.prototype.render=ng.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var l=t.current,r=vl();Fx(l,r,e,t,null,null)},Rf.prototype.unmount=ng.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Fx(e.current,2,null,e,null,null),af(),t[$l]=null}};function Rf(e){this._internalRoot=e}Rf.prototype.unstable_scheduleHydration=function(e){if(e){var t=Qn();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Or.length&&t!==0&&t<Or[l].priority;l++);Or.splice(l,0,e),l===0&&e0(e)}};var i0=i.version;if(i0!=="19.3.1")throw Error(a(527,i0,"19.3.1"));le.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=g(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var NT={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wf.isDisabled&&wf.supportsFiber)try{pn=wf.inject(NT),Yt=wf}catch{}}return vu.createRoot=function(e,t){if(!c(e))throw Error(a(299));var l=!1,r="",o=Kb,u=Fb,y=Xb;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=Qx(e,1,!1,null,null,l,r,null,o,u,y,l0),e[$l]=t.current,zm(e),new ng(t)},vu.hydrateRoot=function(e,t,l){if(!c(e))throw Error(a(299));var r=!1,o="",u=Kb,y=Fb,w=Xb,k=null;return l!=null&&(l.unstable_strictMode===!0&&(r=!0),l.identifierPrefix!==void 0&&(o=l.identifierPrefix),l.onUncaughtError!==void 0&&(u=l.onUncaughtError),l.onCaughtError!==void 0&&(y=l.onCaughtError),l.onRecoverableError!==void 0&&(w=l.onRecoverableError),l.formState!==void 0&&(k=l.formState)),t=Qx(e,1,!0,t,l??null,r,o,k,u,y,w,l0),t.context=Kx(null),l=t.current,r=vl(),r=er(r),o=fr(r),o.callback=null,dr(l,o,r),l=r,t.current.lanes=l,ts(t,l),ci(t),e[$l]=t.current,zm(e),new Rf(t)},vu.version="19.3.1",vu}var g0;function PT(){if(g0)return sg.exports;g0=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),sg.exports=qT(),sg.exports}var GT=PT();const LS=x.createContext(!1),YT=()=>x.useContext(LS);LS.Provider;const US=x.createContext(void 0),sp=n=>{const i=x.useContext(US);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},QT=({client:n,children:i})=>(x.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),p.jsx(US.Provider,{value:n,children:i}));function KT(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}const FT=x.createContext(KT()),XT=()=>x.useContext(FT);var vo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ms,Dr,eo,wS,ZT=(wS=class extends vo{constructor(){super();Ge(this,Ms);Ge(this,Dr);Ge(this,eo);Ae(this,eo,i=>{if(typeof window<"u"&&window.addEventListener){const s=()=>i();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){U(this,Dr)||this.setEventListener(U(this,eo))}onUnsubscribe(){var i;this.hasListeners()||((i=U(this,Dr))==null||i.call(this),Ae(this,Dr,void 0))}setEventListener(i){var s;Ae(this,eo,i),(s=U(this,Dr))==null||s.call(this),Ae(this,Dr,i(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(i){U(this,Ms)!==i&&(Ae(this,Ms,i),this.onFocus())}onFocus(){const i=this.isFocused();this.listeners.forEach(s=>{s(i)})}isFocused(){var i;return typeof U(this,Ms)=="boolean"?U(this,Ms):((i=globalThis.document)==null?void 0:i.visibilityState)!=="hidden"}},Ms=new WeakMap,Dr=new WeakMap,eo=new WeakMap,wS);const ap=new ZT,JT={setTimeout:(n,i)=>setTimeout(n,i),clearTimeout:n=>clearTimeout(n),setInterval:(n,i)=>setInterval(n,i),clearInterval:n=>clearInterval(n)};var _r,ip,CS,$T=(CS=class{constructor(){Ge(this,_r,JT);Ge(this,ip,!1)}setTimeoutProvider(n){Ae(this,_r,n)}setTimeout(n,i){return U(this,_r).setTimeout(n,i)}clearTimeout(n){U(this,_r).clearTimeout(n)}setInterval(n,i){return U(this,_r).setInterval(n,i)}clearInterval(n){U(this,_r).clearInterval(n)}},_r=new WeakMap,ip=new WeakMap,CS);const Ts=new $T;function WT(n){setTimeout(n,0)}const eO=typeof window>"u"||"Deno"in globalThis;function tl(){}function tO(n,i){return typeof n=="function"?n(i):n}function HS(n){return typeof n=="number"&&n>=0&&n!==1/0}function IS(n,i){return Math.max(n+(i||0)-Date.now(),0)}function It(n,i){return typeof n=="function"?n(i):n}function p0(n,i){const{type:s="all",exact:a,fetchStatus:c,predicate:f,queryKey:d,stale:h}=n;if(d){if(a){if(i.queryHash!==op(d,i.options))return!1}else if(!mo(i.queryKey,d))return!1}if(s!=="all"){const m=i.isActive();if(s==="active"&&!m||s==="inactive"&&m)return!1}return!(typeof h=="boolean"&&i.isStale()!==h||c&&c!==i.state.fetchStatus||f&&!f(i))}function y0(n,i){const{exact:s,status:a,predicate:c,mutationKey:f}=n;if(f){if(!i.options.mutationKey)return!1;if(s){if(Ps(i.options.mutationKey)!==Ps(f))return!1}else if(!mo(i.options.mutationKey,f))return!1}return!(a&&i.state.status!==a||c&&!c(i))}function op(n,i){return((i==null?void 0:i.queryKeyHashFn)||Ps)(n)}function Ps(n){return JSON.stringify(n,(i,s)=>Tg(s)?Object.keys(s).sort().reduce((a,c)=>(a[c]=s[c],a),{}):s)}function mo(n,i){if(n===i)return!0;if(typeof n!=typeof i)return!1;if(n&&i&&typeof n=="object"&&typeof i=="object"){if(Array.isArray(n)!==Array.isArray(i))return!1;if(Array.isArray(n)&&Array.isArray(i)){if(i.length>n.length)return!1;for(let a=0;a<i.length;a++)if(!mo(n[a],i[a]))return!1;return!0}const s=Object.keys(i);for(const a of s)if(!mo(n[a],i[a]))return!1;return!0}return!1}const VS=Object.prototype.hasOwnProperty;function BS(n,i,s=0){if(n===i)return n;if(s>500)return i;const a=b0(n)&&b0(i);if(!a&&!(Tg(n)&&Tg(i)))return i;const c=(a?n:Object.keys(n)).length,f=a?i:Object.keys(i),d=f.length,h=a?new Array(d):{};let m=0;for(let g=0;g<d;g++){const v=a?g:f[g],b=n[v],S=i[v];if(b===S){h[v]=b,(a?g<c:VS.call(n,v))&&m++;continue}if(b===null||S===null||typeof b!="object"||typeof S!="object"){h[v]=S;continue}const C=BS(b,S,s+1);h[v]=C,C===b&&m++}return c===d&&m===c?n:h}function qf(n,i){if(!i||Object.keys(n).length!==Object.keys(i).length)return!1;for(const s of Object.keys(n))if(!VS.call(i,s)||n[s]!==i[s])return!1;return!0}function b0(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Tg(n){if(!v0(n))return!1;const i=Object.getPrototypeOf(n),s=i==null?void 0:i.constructor;if(s===void 0)return!0;if(typeof s!="function")return!1;const a=s.prototype;return!(!v0(a)||!a.hasOwnProperty("isPrototypeOf")||i!==Object.prototype)}function v0(n){return Object.prototype.toString.call(n)==="[object Object]"}function nO(n){return new Promise(i=>{Ts.setTimeout(i,n)})}function Og(n,i,s){return typeof s.structuralSharing=="function"?s.structuralSharing(n,i):s.structuralSharing!==!1?BS(n,i):i}function x0(n,i,s,a){const c=a?[i,...n]:[...n,i];return s&&c.length>s?a?c.slice(0,s):c.slice(-s):c}const up=Symbol();function qS(n,i){return!n.queryFn&&(i!=null&&i.initialPromise)?()=>i.initialPromise:!n.queryFn||n.queryFn===up?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function cp(n,i){return typeof n=="function"?n(...i):!!n}const fp=Symbol();function lO(n,i,s,a){let c=!1,f;return Object.defineProperties(n,{[fp]:{value:a},signal:{enumerable:!0,get:()=>(f??(f=i()),c||(c=!0,f.aborted?s():f.addEventListener("abort",s,{once:!0})),f)}}),n}let iO=()=>eO;const dp=()=>iO();function rO(n){return{onFetch:(i,s)=>{var v,b,S,C,T;const a=i.options,c=(S=(b=(v=i.fetchOptions)==null?void 0:v.meta)==null?void 0:b.fetchMore)==null?void 0:S.direction,f=((C=i.state.data)==null?void 0:C.pages)||[],d=((T=i.state.data)==null?void 0:T.pageParams)||[];let h={pages:[],pageParams:[]},m=0;const g=async()=>{let R=!1;const j=i,O=N=>{lO(N,()=>i.signal,()=>R=!0,j[fp])},E=qS(i.options,i.fetchOptions),A=async(N,L,D)=>{if(R)return Promise.reject(i.signal.reason);if(L==null&&N.pages.length)return Promise.resolve(N);const M=(()=>{const re={client:i.client,queryKey:i.queryKey,pageParam:L,direction:D?"backward":"forward",meta:i.options.meta};return O(re),re})(),Q=await E(M),{maxPages:J}=i.options;return{pages:x0(N.pages,Q,J,D),pageParams:x0(N.pageParams,L,J,D)}};if(c&&f.length){const N=c==="backward",L=N?PS:jg,D={pages:f,pageParams:d};h=await A(D,L(a,D),N)}else{const N=n??f.length;do{const L=m===0?d[0]===void 0?a.initialPageParam:d[0]:jg(a,h);if(m>0&&L==null)break;h=await A(h,L),m++}while(m<N)}return h};i.options.persister?i.fetchFn=()=>{var R,j;return(j=(R=i.options).persister)==null?void 0:j.call(R,g,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},s)}:i.fetchFn=g}}}function jg(n,{pages:i,pageParams:s}){const a=i.length-1;return i.length>0?n.getNextPageParam(i[a],i,s[a],s):void 0}function PS(n,{pages:i,pageParams:s}){var a;return i.length>0?(a=n.getPreviousPageParam)==null?void 0:a.call(n,i[0],i,s[0],s):void 0}function sO(n,i){return i?jg(n,i)!=null:!1}function aO(n,i){return!i||!n.getPreviousPageParam?!1:PS(n,i)!=null}const oO=WT;function uO(){let n=[],i=0,s=h=>{h()},a=h=>{h()},c=oO;const f=h=>{i?n.push(h):c(()=>{s(h)})},d=()=>{const h=n;n=[],h.length&&c(()=>{a(()=>{h.forEach(m=>{s(m)})})})};return{batch:h=>{let m;i++;try{m=h()}finally{i--,i||d()}return m},batchCalls:h=>(...m)=>{f(()=>{h(...m)})},schedule:f,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{a=h},setScheduler:h=>{c=h}}}const xn=uO();var zs,TS,GS=(TS=class{constructor(){Ge(this,zs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),HS(this.gcTime)&&Ae(this,zs,Ts.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(dp()?1/0:3e5))}clearGcTimeout(){U(this,zs)!==void 0&&(Ts.clearTimeout(U(this,zs)),Ae(this,zs,void 0))}},zs=new WeakMap,TS),to,kr,no,OS,cO=(OS=class extends vo{constructor(){super();Ge(this,to,!0);Ge(this,kr);Ge(this,no);Ae(this,no,i=>{if(typeof window<"u"&&window.addEventListener){const s=()=>i(!0),a=()=>i(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",a)}}})}onSubscribe(){U(this,kr)||this.setEventListener(U(this,no))}onUnsubscribe(){var i;this.hasListeners()||((i=U(this,kr))==null||i.call(this),Ae(this,kr,void 0))}setEventListener(i){var s;Ae(this,no,i),(s=U(this,kr))==null||s.call(this),Ae(this,kr,i(this.setOnline.bind(this)))}setOnline(i){U(this,to)!==i&&(Ae(this,to,i),this.listeners.forEach(s=>{s(i)}))}isOnline(){return U(this,to)}},to=new WeakMap,kr=new WeakMap,no=new WeakMap,OS);const Xf=new cO;function fO(n){return Math.min(1e3*2**n,3e4)}function YS(n){return(n??"online")==="online"?Xf.isOnline():!0}var Ag=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function QS(n){let i=!1,s=0,a,c="pending",f,d;const h=new Promise((E,A)=>{f=E,d=A});h.catch(tl);const m=()=>c!=="pending",g=E=>{var A;if(!m()){const N=new Ag(E);R(N),(A=n.onCancel)==null||A.call(n,N)}},v=()=>{i=!0},b=()=>{i=!1},S=()=>ap.isFocused()&&(n.networkMode==="always"||Xf.isOnline())&&n.canRun(),C=()=>YS(n.networkMode)&&n.canRun(),T=E=>{m()||(a==null||a(),c="resolved",f(E))},R=E=>{m()||(a==null||a(),c="rejected",d(E))},j=E=>new Promise(A=>{var N;a=L=>{(m()||E())&&A(L)},(N=n.onPause)==null||N.call(n)}).then(()=>{var A;a=void 0,m()||(A=n.onContinue)==null||A.call(n)}),O=()=>{if(m())return;let E;const A=s===0?n.initialPromise:void 0;try{E=A??n.fn()}catch(N){E=Promise.reject(N)}Promise.resolve(E).then(T).catch(N=>{var Q;if(m())return;const L=n.retry??(dp()?0:3),D=n.retryDelay??fO,_=typeof D=="function"?D(s,N):D,M=L===!0||typeof L=="number"&&s<L||typeof L=="function"&&L(s,N);if(i||!M){R(N);return}s++,(Q=n.onFail)==null||Q.call(n,s,N),nO(_).then(()=>m()||S()?void 0:j(S)).then(()=>{i?R(N):O()})})};return{promise:h,status:()=>c,cancel:g,continue:()=>(a==null||a(),h),cancelRetry:v,continueRetry:b,canStart:C,start:()=>(C()?O():j(C).then(O),h)}}var lo,Ds,io,Sl,_s,Tn,Ii,Uu,ks,fl,Ng,Hi,jS,dO=(jS=class extends GS{constructor(i){super();Ge(this,fl);Ge(this,lo);Ge(this,Ds);Ge(this,io);Ge(this,Sl);Ge(this,_s);Ge(this,Tn);Ge(this,Ii);Ge(this,Uu);Ge(this,ks);Ae(this,ks,!1),Ae(this,Uu,i.defaultOptions),this.setOptions(i.options),this.observers=[],Ae(this,_s,i.client),Ae(this,Sl,U(this,_s).getQueryCache()),this.queryKey=i.queryKey,this.queryHash=i.queryHash,Ae(this,Ds,E0(this.options)),this.state=i.state??U(this,Ds),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return U(this,lo)}get promise(){var i;return(i=U(this,Tn))==null?void 0:i.promise}setOptions(i){if(this.options={...U(this,Uu),...i},i!=null&&i._type&&Ae(this,lo,i._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=E0(this.options);s.data!==void 0&&(this.setState(S0(s.data,s.dataUpdatedAt)),Ae(this,Ds,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&U(this,Sl).remove(this)}setData(i,s){const a=Og(this.state.data,i,this.options);return st(this,fl,Hi).call(this,{data:a,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),a}setState(i){st(this,fl,Hi).call(this,{type:"setState",state:i})}cancel(i){var a,c;const s=(a=U(this,Tn))==null?void 0:a.promise;return(c=U(this,Tn))==null||c.cancel(i),s?s.then(tl).catch(tl):Promise.resolve()}destroy(){this.cancel({silent:!0}),super.destroy()}get resetState(){return U(this,Ds)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(i=>It(i.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===up||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.state.data===void 0?!1:this.getObserversCount()>0?this.observers.some(i=>It(i.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(i=>i.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(i=0){return this.state.data===void 0?!0:i==="static"?!1:this.state.isInvalidated?!0:!IS(this.state.dataUpdatedAt,i)}onFocus(){var i,s;(i=this.observers.find(a=>a.shouldFetchOnWindowFocus()))==null||i.refetch({cancelRefetch:!1}),(s=U(this,Tn))==null||s.continue()}onOnline(){var i,s;(i=this.observers.find(a=>a.shouldFetchOnReconnect()))==null||i.refetch({cancelRefetch:!1}),(s=U(this,Tn))==null||s.continue()}addObserver(i){this.observers.includes(i)||(this.observers.push(i),this.clearGcTimeout(),U(this,Sl).notify({type:"observerAdded",query:this,observer:i}))}removeObserver(i){const s=this.observers.indexOf(i);s!==-1&&(this.observers.splice(s,1),this.observers.length||(U(this,Tn)&&(U(this,ks)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?U(this,Tn).cancel({revert:!0}):U(this,Tn).cancelRetry()),st(this,fl,Ng).call(this)),U(this,Sl).notify({type:"observerRemoved",query:this,observer:i}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||st(this,fl,Hi).call(this,{type:"invalidate"})}async fetch(i,s){var v,b,S,C;if(this.state.fetchStatus!=="idle"&&((v=U(this,Tn))==null?void 0:v.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(U(this,Tn)&&U(this,Ii))return U(this,Tn).continueRetry(),U(this,Ii)}if(i&&this.setOptions(i),!this.options.queryFn){const T=this.observers.find(R=>R.options.queryFn);T&&this.setOptions(T.options)}const a=new AbortController,c=T=>{Object.defineProperties(T,{[fp]:{value:a.signal,enumerable:!0},signal:{enumerable:!0,get:()=>(Ae(this,ks,!0),a.signal)}})},f=()=>{const T=qS(this.options,s),j=(()=>{const O={client:U(this,_s),queryKey:this.queryKey,meta:this.meta};return c(O),O})();return Ae(this,ks,!1),this.options.persister?this.options.persister(T,j,this):T(j)},h=(()=>{const T={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:U(this,_s),state:this.state,fetchFn:f};return c(T),T})();(b=U(this,lo)==="infinite"?rO(this.options.pages):this.options.behavior)==null||b.onFetch(h,this),Ae(this,io,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((S=h.fetchOptions)==null?void 0:S.meta))&&st(this,fl,Hi).call(this,{type:"fetch",meta:(C=h.fetchOptions)==null?void 0:C.meta});const m=Ae(this,Tn,QS({initialPromise:s==null?void 0:s.initialPromise,fn:h.fetchFn,onCancel:T=>{T instanceof Ag&&T.revert&&this.setState({...U(this,io),fetchStatus:"idle"}),a.abort()},onFail:(T,R)=>{st(this,fl,Hi).call(this,{type:"failed",failureCount:T,error:R})},onPause:()=>{st(this,fl,Hi).call(this,{type:"pause"})},onContinue:()=>{st(this,fl,Hi).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0})),g=(async()=>{var T,R,j,O,E,A,N,L;try{const D=await m.promise;if(D===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(D),(R=(T=U(this,Sl).config).onSuccess)==null||R.call(T,D,this),(O=(j=U(this,Sl).config).onSettled)==null||O.call(j,D,this.state.error,this),D}catch(D){if(D instanceof Ag){if(D.silent){if(U(this,Tn)!==m&&U(this,Ii))return U(this,Ii);throw D}else if(D.revert){if(this.state.data===void 0)throw D;return this.state.data}}throw st(this,fl,Hi).call(this,{type:"error",error:D}),(A=(E=U(this,Sl).config).onError)==null||A.call(E,D,this),(L=(N=U(this,Sl).config).onSettled)==null||L.call(N,this.state.data,D,this),D}finally{U(this,Tn)===m&&(Ae(this,Tn,void 0),Ae(this,Ii,void 0)),st(this,fl,Ng).call(this)}})();return Ae(this,Ii,g),m.start(),g}},lo=new WeakMap,Ds=new WeakMap,io=new WeakMap,Sl=new WeakMap,_s=new WeakMap,Tn=new WeakMap,Ii=new WeakMap,Uu=new WeakMap,ks=new WeakMap,fl=new WeakSet,Ng=function(){U(this,Sl).get(this.queryHash)===this&&this.scheduleGc()},Hi=function(i){const s=a=>{switch(i.type){case"failed":return{...a,fetchFailureCount:i.failureCount,fetchFailureReason:i.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...KS(a.data,this.options),fetchMeta:i.meta??null};case"success":{const c={...a,...S0(i.data,i.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!i.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ae(this,io,i.manual?c:void 0),c}case"error":{const c=i.error;return{...a,error:c,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error",isInvalidated:!0}}case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...i.state}}};this.state=s(this.state),xn.batch(()=>{this.observers.slice().forEach(a=>{a.onQueryUpdate()}),U(this,Sl).notify({query:this,type:"updated",action:i})})},jS);function KS(n,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:YS(i.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function S0(n,i){return{data:n,dataUpdatedAt:i??Date.now(),error:null,isInvalidated:!1,status:"success"}}function E0(n){const i=typeof n.initialData=="function"?n.initialData():n.initialData,s=i!==void 0,a=s?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:s?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Wn,vt,Hu,el,ro,Vi,Iu,Ls,so,ao,Us,Hs,Lr,oo,wt,Ru,Mg,zg,Dg,_g,kg,Lg,Ug,Hg,AS,FS=(AS=class extends vo{constructor(i,s){super();Ge(this,wt);Ge(this,Wn);Ge(this,vt);Ge(this,Hu);Ge(this,el);Ge(this,ro);Ge(this,Vi);Ge(this,Iu);Ge(this,Ls);Ge(this,so);Ge(this,ao);Ge(this,Us);Ge(this,Hs);Ge(this,Lr);Ge(this,oo,new Set);this.options=s,Ae(this,Wn,i),Ae(this,Vi,null),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(U(this,vt).addObserver(this),R0(U(this,vt),this.options)?st(this,wt,Ru).call(this):this.updateResult(),st(this,wt,kg).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ig(U(this,vt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ig(U(this,vt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,st(this,wt,Lg).call(this),st(this,wt,Ug).call(this),U(this,vt).removeObserver(this)}setOptions(i){const s=this.options,a=U(this,vt);if(this.options=U(this,Wn).defaultQueryOptions(i),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof It(this.options.enabled,U(this,vt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");st(this,wt,Hg).call(this),U(this,vt).setOptions(this.options),s._defaulted&&!qf(this.options,s)&&U(this,Wn).getQueryCache().notify({type:"observerOptionsUpdated",query:U(this,vt),observer:this});const c=this.hasListeners();c&&w0(U(this,vt),a,this.options,s)&&st(this,wt,Ru).call(this),this.updateResult(),c&&(U(this,vt)!==a||It(this.options.enabled,U(this,vt))!==It(s.enabled,U(this,vt))||It(this.options.staleTime,U(this,vt))!==It(s.staleTime,U(this,vt)))&&st(this,wt,zg).call(this);const f=st(this,wt,Dg).call(this);c&&(U(this,vt)!==a||It(this.options.enabled,U(this,vt))!==It(s.enabled,U(this,vt))||f!==U(this,Lr))&&st(this,wt,_g).call(this,f)}getOptimisticResult(i){const s=U(this,Wn).getQueryCache().build(U(this,Wn),i),a=this.createResult(s,i);return qf(this.getCurrentResult(),a)||(Ae(this,el,a),Ae(this,ro,i)),a}getCurrentResult(){return U(this,el)}trackResult(i,s){return new Proxy(i,{get:(a,c)=>(this.trackProp(c),s==null||s(c),Reflect.get(a,c))})}trackProp(i){U(this,oo).add(i)}getCurrentQuery(){return U(this,vt)}refetch({...i}={}){return this.fetch({...i})}fetchOptimistic(i){const s=U(this,Wn).defaultQueryOptions(i),a=U(this,Wn).getQueryCache().build(U(this,Wn),s);let c=()=>{},f;const d=new Promise(h=>{f=h,c=U(this,Wn).getQueryCache().subscribe(m=>{m.type==="updated"&&m.query.queryHash===a.queryHash&&a.state.data!==void 0&&(c(),h(this.createResult(a,s)))})});return Promise.race([a.fetch(s).then(()=>{const h=this.createResult(a,s);return f==null||f(h),h}).finally(()=>{c()}),d])}fetch(i){return st(this,wt,Ru).call(this,{...i,cancelRefetch:i.cancelRefetch??!0}).then(()=>(this.updateResult(),U(this,el)))}createResult(i,s){var L;const a=U(this,vt),c=this.options,f=U(this,el),d=U(this,ro),h=i!==a?i.state:U(this,Hu),{state:m}=i;let g={...m},v=!1,b;if(s._optimisticResults){const D=this.hasListeners(),_=!D&&R0(i,s),M=D&&w0(i,a,s,c);(_||M)&&(g={...g,...KS(m.data,i.options)}),s._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:S,errorUpdatedAt:C,status:T}=g;b=g.data;let R=!1;if(s.placeholderData!==void 0&&b===void 0&&T==="pending"){let D;const _=(f==null?void 0:f.isPlaceholderData)&&s.placeholderData===(d==null?void 0:d.placeholderData);_?(D=f.data,R=!0):D=typeof s.placeholderData=="function"?s.placeholderData((L=U(this,ao))==null?void 0:L.state.data,U(this,ao)):s.placeholderData,(_||D!==void 0)&&(T="success",b=Og(s.select&&!R?U(this,Ls):f==null?void 0:f.data,D,s),v=!0)}if(s.select&&b!==void 0&&!R)if(b===U(this,Ls)&&s.select===U(this,Iu))b=U(this,so);else try{Ae(this,Iu,s.select),Ae(this,Ls,b),b=s.select(b),b=Og(f==null?void 0:f.data,b,s),Ae(this,so,b),Ae(this,Vi,null)}catch(D){Ae(this,Vi,D)}else b===void 0&&(Ae(this,Ls,void 0),Ae(this,Vi,null));U(this,Vi)&&(S=U(this,Vi),b=U(this,so),C=(f==null?void 0:f.error)===S?f.errorUpdatedAt:Date.now(),T="error",v=!1);const j=g.fetchStatus==="fetching",O=T==="pending",E=T==="error",A=O&&j,N=b!==void 0;return{status:T,fetchStatus:g.fetchStatus,isPending:O,isSuccess:T==="success",isError:E,isInitialLoading:A,isLoading:A,data:b,dataUpdatedAt:g.dataUpdatedAt,error:S,errorUpdatedAt:C,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:i.isFetched(),isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:j,isRefetching:j&&!O,isLoadingError:E&&!N,isPaused:g.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:E&&N,isStale:hp(i,s),refetch:this.refetch,isEnabled:It(s.enabled,i)!==!1}}updateResult(){const i=U(this,el),s=this.createResult(U(this,vt),this.options);if(Ae(this,ro,this.options),U(this,vt).state.data!==void 0&&Ae(this,ao,U(this,vt)),qf(s,i))return;Ae(this,el,s);const c=(()=>{if(!i)return!0;const{notifyOnChangeProps:f}=this.options,d=typeof f=="function"?f():f;if(d==="all"||!d&&!U(this,oo).size||this.options.throwOnError&&U(this,el).error!==i.error)return!0;for(const h of d??U(this,oo))if(U(this,el)[h]!==i[h])return!0;return!1})();xn.batch(()=>{c&&this.listeners.forEach(f=>{f(U(this,el))}),U(this,Wn).getQueryCache().notify({query:U(this,vt),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&st(this,wt,kg).call(this)}},Wn=new WeakMap,vt=new WeakMap,Hu=new WeakMap,el=new WeakMap,ro=new WeakMap,Vi=new WeakMap,Iu=new WeakMap,Ls=new WeakMap,so=new WeakMap,ao=new WeakMap,Us=new WeakMap,Hs=new WeakMap,Lr=new WeakMap,oo=new WeakMap,wt=new WeakSet,Ru=function(i){st(this,wt,Hg).call(this);let s=U(this,vt).fetch(this.options,i);return i!=null&&i.throwOnError||(s=s.catch(tl)),s},Mg=function(i){return!dp()&&It(this.options.enabled,U(this,vt))!==!1&&HS(i)},zg=function(){st(this,wt,Lg).call(this);const i=It(this.options.staleTime,U(this,vt));if(U(this,el).isStale||!st(this,wt,Mg).call(this,i))return;const s=IS(U(this,el).dataUpdatedAt,i)+1;Ae(this,Us,Ts.setTimeout(()=>{U(this,el).isStale||this.updateResult()},s))},Dg=function(){return It(this.options.refetchInterval,U(this,vt))??!1},_g=function(i){st(this,wt,Ug).call(this),Ae(this,Lr,i),!(U(this,Lr)===0||!st(this,wt,Mg).call(this,U(this,Lr)))&&Ae(this,Hs,Ts.setInterval(()=>{(this.options.refetchIntervalInBackground||ap.isFocused())&&st(this,wt,Ru).call(this)},U(this,Lr)))},kg=function(){st(this,wt,zg).call(this),st(this,wt,_g).call(this,st(this,wt,Dg).call(this))},Lg=function(){U(this,Us)!==void 0&&(Ts.clearTimeout(U(this,Us)),Ae(this,Us,void 0))},Ug=function(){U(this,Hs)!==void 0&&(Ts.clearInterval(U(this,Hs)),Ae(this,Hs,void 0))},Hg=function(){const i=U(this,Wn).getQueryCache().build(U(this,Wn),this.options);if(i===U(this,vt))return;const s=U(this,vt);Ae(this,vt,i),Ae(this,Hu,i.state),this.hasListeners()&&(s==null||s.removeObserver(this),i.addObserver(this))},AS);function hO(n,i){return It(i.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&It(i.retryOnMount,n)===!1)}function R0(n,i){return hO(n,i)||n.state.data!==void 0&&Ig(n,i,i.refetchOnMount)}function Ig(n,i,s){if(It(i.enabled,n)!==!1&&It(i.staleTime,n)!=="static"){const a=It(s,n);return a==="always"||a!==!1&&hp(n,i)}return!1}function w0(n,i,s,a){return(n!==i||It(a.enabled,n)===!1)&&(!s.suspense||n.state.status!=="error")&&hp(n,s)}function hp(n,i){return It(i.enabled,n)!==!1&&n.isStaleByTime(It(i.staleTime,n))}var mO=class extends FS{constructor(n,i){super(n,i)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(n){n._type="infinite",super.setOptions(n)}getOptimisticResult(n){return n._type="infinite",super.getOptimisticResult(n)}fetchNextPage(n){return this.fetch({...n,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(n){return this.fetch({...n,meta:{fetchMore:{direction:"backward"}}})}createResult(n,i){var C,T;const{state:s}=n,a=super.createResult(n,i),{isFetching:c,isRefetching:f,isError:d,isRefetchError:h}=a,m=(T=(C=s.fetchMeta)==null?void 0:C.fetchMore)==null?void 0:T.direction,g=d&&m==="forward",v=c&&m==="forward",b=d&&m==="backward",S=c&&m==="backward";return{...a,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:sO(i,s.data),hasPreviousPage:aO(i,s.data),isFetchNextPageError:g,isFetchingNextPage:v,isFetchPreviousPageError:b,isFetchingPreviousPage:S,isRefetchError:h&&!g&&!b,isRefetching:f&&!v&&!S}}},Vu,di,kn,Is,hi,Nr,NS,gO=(NS=class extends GS{constructor(i){super();Ge(this,hi);Ge(this,Vu);Ge(this,di);Ge(this,kn);Ge(this,Is);Ae(this,Vu,i.client),this.mutationId=i.mutationId,Ae(this,kn,i.mutationCache),Ae(this,di,[]),this.state=i.state||XS(),this.setOptions(i.options),this.scheduleGc()}setOptions(i){this.options=i,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(i){U(this,di).includes(i)||(U(this,di).push(i),this.clearGcTimeout(),U(this,kn).notify({type:"observerAdded",mutation:this,observer:i}))}removeObserver(i){Ae(this,di,U(this,di).filter(s=>s!==i)),U(this,kn).has(this)&&this.scheduleGc(),U(this,kn).notify({type:"observerRemoved",mutation:this,observer:i})}optionalRemove(){U(this,di).length||(this.state.status==="pending"?this.scheduleGc():U(this,kn).remove(this))}continue(){var i;return((i=U(this,Is))==null?void 0:i.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(i){var h,m,g,v,b,S,C,T,R,j,O,E,A,N,L,D,_,M;const s=()=>{st(this,hi,Nr).call(this,{type:"continue"})},a={client:U(this,Vu),meta:this.options.meta,mutationKey:this.options.mutationKey},c=Ae(this,Is,QS({fn:()=>this.options.mutationFn?this.options.mutationFn(i,a):Promise.reject(new Error("No mutationFn found")),onFail:(Q,J)=>{st(this,hi,Nr).call(this,{type:"failed",failureCount:Q,error:J})},onPause:()=>{st(this,hi,Nr).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>U(this,kn).canRun(this)})),f=this.state.status==="pending",d=!c.canStart();try{if(f)s();else{st(this,hi,Nr).call(this,{type:"pending",variables:i,isPaused:d}),U(this,kn).config.onMutate&&await U(this,kn).config.onMutate(i,this,a);const J=await((m=(h=this.options).onMutate)==null?void 0:m.call(h,i,a));J!==this.state.context&&st(this,hi,Nr).call(this,{type:"pending",context:J,variables:i,isPaused:d})}this.state.isPaused&&c.canStart()&&s();const Q=await c.start();return await((v=(g=U(this,kn).config).onSuccess)==null?void 0:v.call(g,Q,i,this.state.context,this,a)),await((S=(b=this.options).onSuccess)==null?void 0:S.call(b,Q,i,this.state.context,a)),await((T=(C=U(this,kn).config).onSettled)==null?void 0:T.call(C,Q,null,this.state.variables,this.state.context,this,a)),await((j=(R=this.options).onSettled)==null?void 0:j.call(R,Q,null,i,this.state.context,a)),st(this,hi,Nr).call(this,{type:"success",data:Q}),Q}catch(Q){try{await((E=(O=U(this,kn).config).onError)==null?void 0:E.call(O,Q,i,this.state.context,this,a))}catch(J){Promise.reject(J)}try{await((N=(A=this.options).onError)==null?void 0:N.call(A,Q,i,this.state.context,a))}catch(J){Promise.reject(J)}try{await((D=(L=U(this,kn).config).onSettled)==null?void 0:D.call(L,void 0,Q,this.state.variables,this.state.context,this,a))}catch(J){Promise.reject(J)}try{await((M=(_=this.options).onSettled)==null?void 0:M.call(_,void 0,Q,i,this.state.context,a))}catch(J){Promise.reject(J)}throw st(this,hi,Nr).call(this,{type:"error",error:Q}),Q}finally{U(this,Is)===c&&Ae(this,Is,void 0),U(this,kn).runNext(this)}}},Vu=new WeakMap,di=new WeakMap,kn=new WeakMap,Is=new WeakMap,hi=new WeakSet,Nr=function(i){const s=a=>{switch(i.type){case"failed":return{...a,failureCount:i.failureCount,failureReason:i.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:i.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:i.isPaused,status:"pending",variables:i.variables,submittedAt:Date.now()};case"success":return{...a,data:i.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:i.error,failureCount:a.failureCount+1,failureReason:i.error,isPaused:!1,status:"error"}}};this.state=s(this.state),xn.batch(()=>{U(this,di).forEach(a=>{a.onMutationUpdate(i)}),U(this,kn).notify({mutation:this,type:"updated",action:i})})},NS);function XS(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Bi,Jl,Bu,MS,pO=(MS=class extends vo{constructor(i={}){super();Ge(this,Bi);Ge(this,Jl);Ge(this,Bu);this.config=i,Ae(this,Bi,new Set),Ae(this,Jl,new Map),Ae(this,Bu,0)}build(i,s,a){const c=new gO({client:i,mutationCache:this,mutationId:++Cf(this,Bu)._,options:i.defaultMutationOptions(s),state:a});return this.add(c),c}add(i){U(this,Bi).add(i);const s=Tf(i);if(typeof s=="string"){const a=U(this,Jl).get(s);a?a.push(i):U(this,Jl).set(s,[i])}this.notify({type:"added",mutation:i})}remove(i){if(U(this,Bi).delete(i)){i.destroy();const s=Tf(i);if(typeof s=="string"){const a=U(this,Jl).get(s);if(a)if(a.length>1){const c=a.indexOf(i);c!==-1&&a.splice(c,1)}else a[0]===i&&U(this,Jl).delete(s)}}this.notify({type:"removed",mutation:i})}has(i){return U(this,Bi).has(i)}canRun(i){var a;const s=Tf(i);if(typeof s=="string"){const c=(a=U(this,Jl).get(s))==null?void 0:a.find(f=>f.state.status==="pending");return!c||c===i}else return!0}runNext(i){var a,c;const s=Tf(i);return typeof s=="string"?((c=(a=U(this,Jl).get(s))==null?void 0:a.find(f=>f!==i&&f.state.isPaused))==null?void 0:c.continue())??Promise.resolve():Promise.resolve()}clear(){xn.batch(()=>{const i=this.getAll();U(this,Bi).clear(),U(this,Jl).clear(),i.forEach(s=>s.destroy()),i.forEach(s=>{this.notify({type:"removed",mutation:s})})})}getAll(){return Array.from(U(this,Bi))}find(i){const s={exact:!0,...i};return this.getAll().find(a=>y0(s,a))}findAll(i={}){return this.getAll().filter(s=>y0(i,s))}notify(i){xn.batch(()=>{this.listeners.forEach(s=>{s(i)})})}resumePausedMutations(){const i=this.getAll().filter(s=>s.state.isPaused);return xn.batch(()=>Promise.all(i.map(s=>s.continue().catch(tl))))}},Bi=new WeakMap,Jl=new WeakMap,Bu=new WeakMap,MS);function Tf(n){var i;return(i=n.options.scope)==null?void 0:i.id}var qi,Ur,qn,qu,pi,wu,Vg,zS,yO=(zS=class extends vo{constructor(s,a){super();Ge(this,pi);Ge(this,qi);Ge(this,Ur);Ge(this,qn);Ge(this,qu);Ae(this,qi,s),this.setOptions(a),this.bindMethods(),st(this,pi,wu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(s){var c;const a=this.options;this.options=U(this,qi).defaultMutationOptions(s),qf(this.options,a)||U(this,qi).getMutationCache().notify({type:"observerOptionsUpdated",mutation:U(this,qn),observer:this}),a!=null&&a.mutationKey&&this.options.mutationKey&&Ps(a.mutationKey)!==Ps(this.options.mutationKey)?this.reset():((c=U(this,qn))==null?void 0:c.state.status)==="pending"&&U(this,qn).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&U(this,qn)&&(U(this,qn).addObserver(this),st(this,pi,wu).call(this))}onUnsubscribe(){var s;this.hasListeners()||(s=U(this,qn))==null||s.removeObserver(this)}onMutationUpdate(s){st(this,pi,wu).call(this),st(this,pi,Vg).call(this,s)}getCurrentResult(){return U(this,Ur)}reset(){var s;(s=U(this,qn))==null||s.removeObserver(this),Ae(this,qn,void 0),st(this,pi,wu).call(this),st(this,pi,Vg).call(this)}mutate(s,a){var c;return Ae(this,qu,a),(c=U(this,qn))==null||c.removeObserver(this),Ae(this,qn,U(this,qi).getMutationCache().build(U(this,qi),this.options)),U(this,qn).addObserver(this),U(this,qn).execute(s)}},qi=new WeakMap,Ur=new WeakMap,qn=new WeakMap,qu=new WeakMap,pi=new WeakSet,wu=function(){var a;const s=((a=U(this,qn))==null?void 0:a.state)??XS();Ae(this,Ur,{...s,isPending:s.status==="pending",isSuccess:s.status==="success",isError:s.status==="error",isIdle:s.status==="idle",mutate:this.mutate,reset:this.reset})},Vg=function(s){xn.batch(()=>{var c,f,d,h;const a=U(this,qu);if(a&&this.hasListeners()){const m=U(this,Ur).variables,g=U(this,Ur).context,v={client:U(this,qi),meta:this.options.meta,mutationKey:this.options.mutationKey};if((s==null?void 0:s.type)==="success"){try{(c=a.onSuccess)==null||c.call(a,s.data,m,g,v)}catch(b){Promise.reject(b)}try{(f=a.onSettled)==null||f.call(a,s.data,null,m,g,v)}catch(b){Promise.reject(b)}}else if((s==null?void 0:s.type)==="error"){try{(d=a.onError)==null||d.call(a,s.error,m,g,v)}catch(b){Promise.reject(b)}try{(h=a.onSettled)==null||h.call(a,void 0,s.error,m,g,v)}catch(b){Promise.reject(b)}}}this.listeners.forEach(m=>{m(U(this,Ur))})})},zS),mi,DS,bO=(DS=class extends vo{constructor(i={}){super();Ge(this,mi);this.config=i,Ae(this,mi,new Map)}build(i,s,a){const c=s.queryKey,f=s.queryHash??op(c,s);let d=this.get(f);return d||(d=new dO({client:i,queryKey:c,queryHash:f,options:i.defaultQueryOptions(s),state:a,defaultOptions:i.getQueryDefaults(c)}),this.add(d)),d}add(i){U(this,mi).has(i.queryHash)||(U(this,mi).set(i.queryHash,i),this.notify({type:"added",query:i}))}remove(i){U(this,mi).get(i.queryHash)===i&&(i.destroy(),U(this,mi).delete(i.queryHash),this.notify({type:"removed",query:i}))}clear(){xn.batch(()=>{this.getAll().forEach(i=>{this.remove(i)})})}get(i){return U(this,mi).get(i)}getAll(){return[...U(this,mi).values()]}find(i){const s={exact:!0,...i};return this.getAll().find(a=>p0(s,a))}findAll(i={}){const s=this.getAll();return Object.keys(i).length>0?s.filter(a=>p0(i,a)):s}notify(i){xn.batch(()=>{this.listeners.forEach(s=>{s(i)})})}onFocus(){xn.batch(()=>{this.getAll().forEach(i=>{i.onFocus()})})}onOnline(){xn.batch(()=>{this.getAll().forEach(i=>{i.onOnline()})})}},mi=new WeakMap,DS),Ft,Hr,Ir,uo,co,Vr,fo,ho,_S,vO=(_S=class{constructor(n={}){Ge(this,Ft);Ge(this,Hr);Ge(this,Ir);Ge(this,uo);Ge(this,co);Ge(this,Vr);Ge(this,fo);Ge(this,ho);Ae(this,Ft,n.queryCache||new bO),Ae(this,Hr,n.mutationCache||new pO),Ae(this,Ir,n.defaultOptions||{}),Ae(this,uo,new Map),Ae(this,co,new Map),Ae(this,Vr,0)}mount(){Cf(this,Vr)._++,U(this,Vr)===1&&(Ae(this,fo,ap.subscribe(async n=>{n&&(await this.resumePausedMutations(),U(this,Ft).onFocus())})),Ae(this,ho,Xf.subscribe(async n=>{n&&(await this.resumePausedMutations(),U(this,Ft).onOnline())})))}unmount(){var n,i;Cf(this,Vr)._--,U(this,Vr)===0&&((n=U(this,fo))==null||n.call(this),Ae(this,fo,void 0),(i=U(this,ho))==null||i.call(this),Ae(this,ho,void 0))}isFetching(n){return U(this,Ft).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return U(this,Hr).findAll({...n,status:"pending"}).length}getQueryData(n){var s;const i=this.defaultQueryOptions({queryKey:n});return(s=U(this,Ft).get(i.queryHash))==null?void 0:s.state.data}ensureQueryData(n){const i=this.defaultQueryOptions(n),s=U(this,Ft).build(this,i),a=s.state.data;return a===void 0?this.fetchQuery(n):(n.revalidateIfStale&&s.isStaleByTime(It(i.staleTime,s))&&this.prefetchQuery(i),Promise.resolve(a))}getQueriesData(n){return U(this,Ft).findAll(n).map(({queryKey:i,state:s})=>[i,s.data])}setQueryData(n,i,s){var d;const a=this.defaultQueryOptions({queryKey:n}),c=(d=U(this,Ft).get(a.queryHash))==null?void 0:d.state.data,f=tO(i,c);if(f!==void 0)return U(this,Ft).build(this,a).setData(f,{...s,manual:!0})}setQueriesData(n,i,s){return xn.batch(()=>U(this,Ft).findAll(n).map(({queryKey:a})=>[a,this.setQueryData(a,i,s)]))}getQueryState(n){var s;const i=this.defaultQueryOptions({queryKey:n});return(s=U(this,Ft).get(i.queryHash))==null?void 0:s.state}removeQueries(n){const i=U(this,Ft);xn.batch(()=>{i.findAll(n).forEach(s=>{i.remove(s)})})}resetQueries(n,i){const s=U(this,Ft);return xn.batch(()=>{const a=s.findAll(n),c=new Set(a);return a.forEach(f=>{f.reset()}),this.refetchQueries({type:"active",predicate:f=>c.has(f)},i)})}cancelQueries(n,i={}){const s={revert:!0,...i},a=xn.batch(()=>U(this,Ft).findAll(n).map(c=>c.cancel(s)));return Promise.all(a).then(tl).catch(tl)}invalidateQueries(n,i={}){return xn.batch(()=>(U(this,Ft).findAll(n).forEach(s=>{s.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},i)))}refetchQueries(n,i={}){const s={...i,cancelRefetch:i.cancelRefetch??!0},a=xn.batch(()=>U(this,Ft).findAll(n).filter(c=>!c.isDisabled()&&!c.isStatic()).map(c=>{let f=c.fetch(void 0,s);const d=c.state.fetchStatus==="paused";return(!s.throwOnError||d)&&(f=f.catch(tl)),d?Promise.resolve():f}));return Promise.all(a).then(tl)}async query(n){const i=this.defaultQueryOptions(n);i.retry===void 0&&(i.retry=!1);const s=U(this,Ft).build(this,i),a=s.isStaleByTime(It(i.staleTime,s))?await s.fetch(i):s.state.data,c=i.select;return c?c(a):a}fetchQuery(n){const i=this.defaultQueryOptions(n);i.retry===void 0&&(i.retry=!1);const s=U(this,Ft).build(this,i);return s.isStaleByTime(It(i.staleTime,s))?s.fetch(i):Promise.resolve(s.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(tl).catch(tl)}infiniteQuery(n){return n._type="infinite",this.query(n)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(tl).catch(tl)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return Xf.isOnline()?U(this,Hr).resumePausedMutations():Promise.resolve()}getQueryCache(){return U(this,Ft)}getMutationCache(){return U(this,Hr)}getDefaultOptions(){return U(this,Ir)}setDefaultOptions(n){Ae(this,Ir,n)}setQueryDefaults(n,i){U(this,uo).set(Ps(n),{queryKey:n,defaultOptions:i})}getQueryDefaults(n){const i=[...U(this,uo).values()],s={};return i.forEach(a=>{mo(n,a.queryKey)&&Object.assign(s,a.defaultOptions)}),s}setMutationDefaults(n,i){U(this,co).set(Ps(n),{mutationKey:n,defaultOptions:i})}getMutationDefaults(n){const i=[...U(this,co).values()],s={};return i.forEach(a=>{mo(n,a.mutationKey)&&Object.assign(s,a.defaultOptions)}),s}defaultQueryOptions(n){if(n._defaulted)return n;const i={...U(this,Ir).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return i.queryHash||(i.queryHash=op(i.queryKey,i)),i.refetchOnReconnect===void 0&&(i.refetchOnReconnect=i.networkMode!=="always"),i.throwOnError===void 0&&(i.throwOnError=!!i.suspense),!i.networkMode&&i.persister&&(i.networkMode="offlineFirst"),i.queryFn===up&&(i.enabled=!1),i}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...U(this,Ir).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){U(this,Ft).clear(),U(this,Hr).clear()}},Ft=new WeakMap,Hr=new WeakMap,Ir=new WeakMap,uo=new WeakMap,co=new WeakMap,Vr=new WeakMap,fo=new WeakMap,ho=new WeakMap,_S);const xO=(n,i,s)=>{const a=(s==null?void 0:s.state.status)==="error"&&typeof n.throwOnError=="function"?cp(n.throwOnError,[s.state.error,s]):n.throwOnError;(n.suspense||a)&&(i.isReset()||(n.retryOnMount=!1))},SO=n=>{x.useEffect(()=>{n.clearReset()},[n])},EO=({result:n,errorResetBoundary:i,throwOnError:s,query:a,suspense:c})=>n.isError&&!i.isReset()&&!n.isFetching&&a&&(c&&n.data===void 0||cp(s,[n.error,a])),RO=n=>{if(n.suspense){const s=c=>c==="static"?c:Math.max(c??1e3,1e3),a=n.staleTime;n.staleTime=typeof a=="function"?(...c)=>s(a(...c)):s(a),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},wO=(n,i)=>(n==null?void 0:n.suspense)&&i.isPending,CO=(n,i,s)=>i.fetchOptimistic(n).catch(()=>{s.clearReset()});function ZS(n,i,s){const a=YT(),c=XT(),f=sp(),d=f.defaultQueryOptions(n),h=f.getQueryCache().get(d.queryHash),m=n.subscribed!==!1;d._optimisticResults=a?"isRestoring":m?"optimistic":void 0,RO(d),xO(d,c,h),SO(c);const[g]=x.useState(()=>new i(f,d)),v=g.getOptimisticResult(d);x.useEffect(()=>{g.setOptions(d)},[d,g]);const b=!a&&m;if(x.useSyncExternalStore(x.useCallback(S=>{const C=b?g.subscribe(xn.batchCalls(S)):tl;return g.updateResult(),C},[g,b]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),wO(d,v))throw CO(d,g,c);if(EO({result:v,errorResetBoundary:c,throwOnError:d.throwOnError,query:h,suspense:d.suspense}))throw v.error;return d.notifyOnChangeProps?v:g.trackResult(v)}function Zi(n,i){return ZS(n,FS)}function Bg(n,i){const s=sp(),[a]=x.useState(()=>new yO(s,n));x.useEffect(()=>{a.setOptions(n)},[a,n]);const c=x.useSyncExternalStore(x.useCallback(d=>a.subscribe(xn.batchCalls(d)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),f=x.useCallback((...d)=>{a.mutate(d[0],d[1]).catch(tl)},[a]);if(c.error&&cp(a.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:f,mutateAsync:c.mutate}}function JS(n,i){return ZS(n,mO)}var cg={exports:{}},fg={};/**
|
|
50
|
+
* @license React
|
|
51
|
+
* use-sync-external-store-shim.production.js
|
|
52
|
+
*
|
|
53
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the MIT license found in the
|
|
56
|
+
* LICENSE file in the root directory of this source tree.
|
|
57
|
+
*/var C0;function TO(){if(C0)return fg;C0=1;var n=Pu();function i(b,S){return b===S&&(b!==0||1/b===1/S)||b!==b&&S!==S}var s=typeof Object.is=="function"?Object.is:i,a=n.useState,c=n.useEffect,f=n.useLayoutEffect,d=n.useDebugValue;function h(b,S){var C=S(),T=a({inst:{value:C,getSnapshot:S}}),R=T[0].inst,j=T[1];return f(function(){R.value=C,R.getSnapshot=S,m(R)&&j({inst:R})},[b,C,S]),c(function(){return m(R)&&j({inst:R}),b(function(){m(R)&&j({inst:R})})},[b]),d(C),C}function m(b){var S=b.getSnapshot;b=b.value;try{var C=S();return!s(b,C)}catch{return!0}}function g(b,S){return S()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:h;return fg.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:v,fg}var T0;function $S(){return T0||(T0=1,cg.exports=TO()),cg.exports}var mp=$S();const OO=rp.useInsertionEffect,jO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",AO=jO?x.useLayoutEffect:x.useEffect,NO=OO||AO,gp=n=>{const i=x.useRef([n,(...s)=>i[0](...s)]).current;return NO(()=>{i[0]=n}),i[1]},O0=["popstate","pushState","replaceState","hashchange"];let Cu=[];const j0=()=>Cu.forEach(n=>n()),MO=n=>(Cu.push(n)===1&&O0.forEach(i=>addEventListener(i,j0)),()=>{Cu=Cu.filter(i=>i!==n),Cu.length||O0.forEach(i=>removeEventListener(i,j0))}),WS=(n,i)=>mp.useSyncExternalStore(MO,n,i),A0=()=>location.search,zO=({ssrSearch:n}={})=>WS(A0,n!=null?()=>n:A0),N0=()=>location.pathname,DO=({ssrPath:n}={})=>WS(N0,n!=null?()=>n:N0),_O=(n,{replace:i=!1,state:s=null}={})=>history[i?"replaceState":"pushState"](s,"",n),e1=n=>[DO(n),_O],M0=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[M0]>"u"){for(const n of["pushState","replaceState"]){const i=history[n];history[n]=function(){const s=i.apply(this,arguments),a=new Event(n);return a.arguments=arguments,dispatchEvent(a),s}}Object.defineProperty(window,M0,{value:!0})}const kO=n=>(n.match(/\d+[xX]\d+|[A-Z]?[a-z]+|[A-Z]|\d+/g)??[]).join("-").toLowerCase();function LO(n,i,s=[]){if(i==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:kO(n),size:24,node:i,...s.length>0?{aliases:s}:{}}}const UO=n=>{let i="",s=!1;for(const a of n){if(a==="-"||a==="_"||a<=" "){s=i.length>0;continue}i.length===0?i+=a.toLowerCase():i+=s?a.toUpperCase():a,s=!1}return i},HO=n=>{const i=UO(n);return i.charAt(0).toUpperCase()+i.slice(1)},qg=(...n)=>{const i=new Set;for(const s of n)if(typeof s=="string")for(const a of s.split(/\s+/))a&&i.add(a);return[...i].join(" ")},Pa={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function dg(n){return n!=null}function IO(n,i={}){var S,C;const s=i.attributeNames??{},a=T=>s[T]??T,c=n.size??n.width??Pa.width,f=n.size??n.height??Pa.height,d=((S=n.aliases)==null?void 0:S.filter(T=>typeof T=="string"&&T.trim()!=="").map(T=>`lucide-${T}`))??[],h=[...n.name?[`lucide-${n.name}`]:[],...d],m=((C=i.className)==null?void 0:C.split(" ").filter(Boolean))??[],g=i.includeDefaultClasses===!1?qg(...m):qg("lucide",...h,...m);let v=i.strokeWidth??Pa["stroke-width"];if(i.absoluteStrokeWidth){const T=Number(v)*Number(n.size??n.width??Pa.width)/Number(i.size??i.width??Pa.width);Number.isFinite(T)&&(v=T)}return["svg",{...Object.entries(Pa).reduce((T,[R,j])=>(T[a(R)]=j,T),{}),..."color"in i&&i.color&&{[a("stroke")]:i.color},..."size"in i&&dg(i.size)&&{[a("width")]:i.size,[a("height")]:i.size},..."width"in i&&dg(i.width)&&{[a("width")]:i.width},..."height"in i&&dg(i.height)&&{[a("height")]:i.height},[a("stroke-width")]:v,...g&&{[a("class")]:g},[a("viewBox")]:`0 0 ${c} ${f}`,...i.hasA11yProp===!1?{[a("aria-hidden")]:"true"}:{},..."attributes"in i&&i.attributes},n.node.map(T=>{const[R,j,O]=T,E=i.nonScalingStroke?{[a("vector-effect")]:"non-scaling-stroke",...j}:j;return O?[R,E,O]:[R,E]})]}function VO(n,i={}){return IO(n,{...i,attributeNames:{...i.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}const BO=n=>{if(n==null||typeof n!="object")return!1;for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&(i.startsWith("aria-")||i==="role"||i==="title")&&n[i]!=null)return!0;return!1},qO=x.createContext({}),PO=()=>x.useContext(qO),GO=x.forwardRef(({color:n,size:i,width:s,height:a,strokeWidth:c,absoluteStrokeWidth:f,nonScalingStroke:d,className:h="",children:m,iconNode:g=[],icon:v={node:g,aliases:[],size:24},...b},S)=>{const{size:C=24,strokeWidth:T=2,absoluteStrokeWidth:R=!1,nonScalingStroke:j=!1,color:O="currentColor",className:E=""}=PO()??{},A=BO(b),[N,L,D=[]]=VO(v,{color:n??O,width:s??i??C,height:a??i??C,strokeWidth:c??T,absoluteStrokeWidth:f??R,nonScalingStroke:d??j,className:qg(E,h),hasA11yProp:A,attributes:b});return x.createElement(N,{ref:S,...L},[...D.map(([_,M])=>x.createElement(_,M)),...Array.isArray(m)?m:[m]])});function jn(n,i=[],s=[]){const a=typeof n=="string"?LO(n,i,s):n,c=x.forwardRef(({className:f,...d},h)=>x.createElement(GO,{ref:h,icon:a,className:f,...d}));return a.name&&(c.displayName=HO(a.name)),c}const t1={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};t1.node;const YO=jn(t1),n1={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};n1.node;const l1=jn(n1),i1={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]};i1.node;const r1=jn(i1),s1={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};s1.node;const a1=jn(s1),o1={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};o1.node;const u1=jn(o1),c1={name:"flask-conical",size:24,node:[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]]};c1.node;const QO=jn(c1),f1={name:"key-round",size:24,node:[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]};f1.node;const KO=jn(f1),d1={name:"link-horizontal",size:24,node:[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],aliases:["link-2"]};d1.node;const FO=jn(d1),h1={name:"lock",size:24,node:[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]};h1.node;const XO=jn(h1),m1={name:"monitor",size:24,node:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]};m1.node;const ZO=jn(m1),g1={name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]};g1.node;const JO=jn(g1),p1={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};p1.node;const $O=jn(p1),y1={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};y1.node;const b1=jn(y1),v1={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};v1.node;const x1=jn(v1),S1={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};S1.node;const WO=jn(S1),E1={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};E1.node;const ej=jn(E1),R1={name:"user-plus",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]};R1.node;const tj=jn(R1),w1={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};w1.node;const C1=jn(w1);function T1(n){var i,s,a="";if(typeof n=="string"||typeof n=="number")a+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(i=0;i<c;i++)n[i]&&(s=T1(n[i]))&&(a&&(a+=" "),a+=s)}else for(s in n)n[s]&&(a&&(a+=" "),a+=s);return a}function nj(){for(var n,i,s=0,a="",c=arguments.length;s<c;s++)(n=arguments[s])&&(i=T1(n))&&(a&&(a+=" "),a+=i);return a}const lj=(n,i)=>{const s=new Array(n.length+i.length);for(let a=0;a<n.length;a++)s[a]=n[a];for(let a=0;a<i.length;a++)s[n.length+a]=i[a];return s},ij=(n,i)=>({classGroupId:n,validator:i}),O1=(n=new Map,i=null,s)=>({nextPart:n,validators:i,classGroupId:s}),Zf="-",z0=[],rj="arbitrary..",sj=n=>{const i=oj(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:a}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return aj(d);const h=d.split(Zf),m=h[0]===""&&h.length>1?1:0;return j1(h,m,i)},getConflictingClassGroupIds:(d,h)=>{if(h){const m=a[d],g=s[d];return m?g?lj(g,m):m:g||z0}return s[d]||z0}}},j1=(n,i,s)=>{if(n.length-i===0)return s.classGroupId;const c=n[i],f=s.nextPart.get(c);if(f){const g=j1(n,i+1,f);if(g)return g}const d=s.validators;if(d===null)return;const h=i===0?n.join(Zf):n.slice(i).join(Zf),m=d.length;for(let g=0;g<m;g++){const v=d[g];if(v.validator(h))return v.classGroupId}},aj=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const i=n.slice(1,-1),s=i.indexOf(":"),a=i.slice(0,s);return a?rj+a:void 0})(),oj=n=>{const{theme:i,classGroups:s}=n;return uj(s,i)},uj=(n,i)=>{const s=O1();for(const a in n){const c=n[a];pp(c,s,a,i)}return s},pp=(n,i,s,a)=>{const c=n.length;for(let f=0;f<c;f++){const d=n[f];cj(d,i,s,a)}},cj=(n,i,s,a)=>{if(typeof n=="string"){fj(n,i,s);return}if(typeof n=="function"){dj(n,i,s,a);return}hj(n,i,s,a)},fj=(n,i,s)=>{const a=n===""?i:A1(i,n);a.classGroupId=s},dj=(n,i,s,a)=>{if(mj(n)){pp(n(a),i,s,a);return}i.validators===null&&(i.validators=[]),i.validators.push(ij(s,n))},hj=(n,i,s,a)=>{const c=Object.entries(n),f=c.length;for(let d=0;d<f;d++){const[h,m]=c[d];pp(m,A1(i,h),s,a)}},A1=(n,i)=>{let s=n;const a=i.split(Zf),c=a.length;for(let f=0;f<c;f++){const d=a[f];let h=s.nextPart.get(d);h||(h=O1(),s.nextPart.set(d,h)),s=h}return s},mj=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,gj=n=>{if(n<1)return{get:()=>{},set:()=>{}};let i=0,s=Object.create(null),a=Object.create(null);const c=(f,d)=>{s[f]=d,i++,i>n&&(i=0,a=s,s=Object.create(null))};return{get(f){let d=s[f];if(d!==void 0)return d;if((d=a[f])!==void 0)return c(f,d),d},set(f,d){f in s?s[f]=d:c(f,d)}}},Tu="!",D0=":",pj=[],_0=(n,i,s,a,c)=>({modifiers:n,hasImportantModifier:i,baseClassName:s,maybePostfixModifierPosition:a,isExternal:c}),yj=n=>{const{prefix:i,experimentalParseClassName:s}=n;let a=c=>{const f=[];let d=0,h=0,m=0,g;const v=c.length;for(let j=0;j<v;j++){const O=c[j];if(d===0&&h===0){if(O===D0){f.push(c.slice(m,j)),m=j+1;continue}if(O==="/"){g=j;continue}}if(O==="[")d++;else if(O==="]")d--;else if(O==="(")h++;else if(O===")")h--;else if(O==="\\")j++;else if(O==='"'||O==="'")for(;++j<v;){const E=c[j];if(E==="\\")j++;else if(E===O)break}}const b=f.length===0?c:c.slice(m);let S=b,C=!1;b.endsWith(Tu)?(S=b.slice(0,-1),C=!0):b.startsWith(Tu)&&(S=b.slice(1),C=!0);const T=C&&b.startsWith(Tu)?Tu.length:0,R=g&&g>m?g-m-T:void 0;return _0(f,C,S,R)};if(i){const c=i+D0,f=a;a=d=>d.startsWith(c)?f(d.slice(c.length)):_0(pj,!1,d,void 0,!0)}if(s){const c=a;a=f=>s({className:f,parseClassName:c})}return a},bj=n=>{const i=new Map;return n.orderSensitiveModifiers.forEach((s,a)=>{i.set(s,1e6+a)}),s=>{const a=[];let c=[];for(let f=0;f<s.length;f++){const d=s[f],h=d[0]==="[",m=i.has(d);h||m?(c.length>0&&(c.sort(),a.push(...c),c=[]),a.push(d)):c.push(d)}return c.length>0&&(c.sort(),a.push(...c)),a}},vj=n=>({cache:gj(n.cacheSize),parseClassName:yj(n),sortModifiers:bj(n),postfixLookupClassGroupIds:xj(n),...sj(n)}),xj=n=>{const i=Object.create(null),s=n.postfixLookupClassGroups;if(s)for(let a=0;a<s.length;a++)i[s[a]]=!0;return i},Sj=/\s+/,Ej=(n,i)=>{const{parseClassName:s,getClassGroupId:a,getConflictingClassGroupIds:c,sortModifiers:f,postfixLookupClassGroupIds:d}=i,h=[],m=n.trim().split(Sj);let g="";for(let v=m.length-1;v>=0;v-=1){const b=m[v],{isExternal:S,modifiers:C,hasImportantModifier:T,baseClassName:R,maybePostfixModifierPosition:j}=s(b);if(S){g=b+(g.length>0?" "+g:g);continue}let O=!!j,E;if(O){const _=R.substring(0,j);E=a(_);const M=E&&d[E]?a(R):void 0;M&&M!==E&&(E=M,O=!1)}else E=a(R);if(!E){if(!O){g=b+(g.length>0?" "+g:g);continue}if(E=a(R),!E){g=b+(g.length>0?" "+g:g);continue}O=!1}const A=C.length===0?"":C.length===1?C[0]:f(C).join(":"),N=T?A+Tu:A,L=N+E;if(h.indexOf(L)>-1)continue;h.push(L);const D=c(E,O);for(let _=0;_<D.length;++_){const M=D[_];h.push(N+M)}g=b+(g.length>0?" "+g:g)}return g},Rj=(...n)=>{let i=0,s,a,c="";for(;i<n.length;)(s=n[i++])&&(a=N1(s))&&(c&&(c+=" "),c+=a);return c},N1=n=>{if(typeof n=="string")return n;let i,s="";for(let a=0;a<n.length;a++)n[a]&&(i=N1(n[a]))&&(s&&(s+=" "),s+=i);return s},wj=(n,...i)=>{let s,a,c,f;const d=m=>{const g=i.reduce((v,b)=>b(v),n());return s=vj(g),a=s.cache.get,c=s.cache.set,f=h,h(m)},h=m=>{const g=a(m);if(g)return g;const v=Ej(m,s);return c(m,v),v};return f=d,(...m)=>f(Rj(...m))},Cj=[],bn=n=>{const i=s=>s[n]||Cj;return i.isThemeGetter=!0,i.themeKey=n,i},M1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,z1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Tj=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Oj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jj=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|Q|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^--spacing\(.+\)|^0$/,Aj=/^[+-]?(?:\d*\.)?\d+(?:[eE][+-]?\d+)?(?:r?ic|r(?:cap|ch|ex))$/,D1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark|contrast-color|device-cmyk|--alpha)\(.+\)$/i,Nj=/^(?:_*[+-]?(?:\d|\.\d)|[\w-]+\(|_*(?:inherit|initial|revert(?:-layer)?|unset)_*$)/i,Mj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ar=n=>Tj.test(n),ut=n=>!!n&&!Number.isNaN(Number(n)),fi=n=>!!n&&Number.isInteger(Number(n)),hg=n=>n.endsWith("%")&&ut(n.slice(0,-1)),Ui=n=>Oj.test(n),_1=()=>!0,Dj=n=>(jj.test(n)||Aj.test(n))&&!D1.test(n),_j=n=>Nj.test(n)&&!D1.test(n),yp=()=>!1,kj=n=>Mj.test(n),Lj=n=>zj.test(n),Uj=n=>!Me(n)&&!ze(n),Hj=n=>n.startsWith("@container")&&(n[10]==="/"&&n[11]!==void 0||n[11]==="s"&&n[16]!==void 0&&n.startsWith("-size/",10)||n[11]==="n"&&n[18]!==void 0&&n.startsWith("-normal/",10)),Ij=n=>Ji(n,U1,yp),Me=n=>M1.test(n),Es=n=>Ji(n,H1,Dj),Vj=n=>Ji(n,I1,_j),Bj=n=>Ji(n,Jj,ut),qj=n=>Ji(n,B1,_1),Pj=n=>Ji(n,V1,yp),Gj=n=>Ji(n,k1,yp),Yj=n=>Ji(n,L1,Lj),Of=n=>Ji(n,q1,kj),ze=n=>z1.test(n),Ga=n=>Zr(n,H1),Qj=n=>Zr(n,I1,!0),Kj=n=>Zr(n,V1),k0=n=>Zr(n,k1),Fj=n=>Zr(n,U1),Xj=n=>Zr(n,L1),jf=n=>Zr(n,q1,!0),Zj=n=>Zr(n,B1,!0),Ji=(n,i,s)=>{const a=M1.exec(n);return a?a[1]?i(a[1]):s(a[2]):!1},Zr=(n,i,s=!1)=>{const a=z1.exec(n);return a?a[1]?i(a[1]):s:!1},k1=n=>n==="position"||n==="percentage",L1=n=>n==="image"||n==="url",U1=n=>n==="length"||n==="size"||n==="bg-size",H1=n=>n==="length",I1=n=>n!=="color",Jj=n=>n==="number",V1=n=>n==="family-name",B1=n=>n==="number"||n==="weight",q1=n=>n==="shadow",$j=()=>{const n=bn("color"),i=bn("font"),s=bn("text"),a=bn("font-weight"),c=bn("tracking"),f=bn("leading"),d=bn("breakpoint"),h=bn("container"),m=bn("spacing"),g=bn("radius"),v=bn("shadow"),b=bn("inset-shadow"),S=bn("text-shadow"),C=bn("drop-shadow"),T=bn("blur"),R=bn("perspective"),j=bn("aspect"),O=bn("ease"),E=bn("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...N(),ze,Me],D=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],M=()=>[ze,Me,m],Q=()=>[Ar,"full","auto",...M()],J=()=>[fi,"none","subgrid",ze,Me],re=()=>["auto",{span:["full",fi,ze,Me]},fi,ze,Me],te=()=>[fi,"auto",ze,Me],$=()=>["auto","min","max","fr",ut,ze,Me],oe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...M()],ne=()=>[Ar,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],F=()=>[h,Ar,"screen","full","dvw","lvw","svw","min","max","fit",...M()],se=()=>[Ar,"screen","full","lh","dvh","lvh","svh","min","max","fit",...M()],K=()=>[n,ze,Me],Re=()=>[...N(),k0,Gj,{position:[ze,Me]}],Ye=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Oe=()=>["auto","cover","contain",Fj,Ij,{size:[ze,Me]}],z=()=>[hg,Ga,Es],B=()=>["","none","full",g,ze,Me],W=()=>["",ut,Ga,Es],ie=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],me=()=>[ut,hg,Qj,Vj],ae=()=>["","none",T,ze,Me],q=()=>["none",ut,ze,Me],le=()=>["none",ut,ze,Me],pe=()=>[ut,ze,Me],Ke=()=>[Ar,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ui],breakpoint:[Ui],color:[_1],container:[Ui],"drop-shadow":[Ui],ease:["in","out","in-out"],font:[Uj],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ui],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ui],shadow:[Ui],spacing:["px",ut],text:[Ui],"text-shadow":[Ui],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ar,Me,ze,j]}],container:["container"],"container-type":[{"@container":["","normal","size",ze,Me]}],"container-named":[Hj],columns:[{columns:[ut,"auto",Me,ze,h]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only"],"not-sr":["not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],contain:[{contain:["none","content","strict",ze,Me]}],"contain-size":[{contain:["size","inline-size"]}],"contain-layout":["contain-layout"],"contain-paint":["contain-paint"],"contain-style":["contain-style"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:L()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Q()}],"inset-x":[{"inset-x":Q()}],"inset-y":[{"inset-y":Q()}],start:[{"inset-s":Q(),start:Q()}],end:[{"inset-e":Q(),end:Q()}],"inset-bs":[{"inset-bs":Q()}],"inset-be":[{"inset-be":Q()}],top:[{top:Q()}],right:[{right:Q()}],bottom:[{bottom:Q()}],left:[{left:Q()}],visibility:["visible","invisible","collapse"],z:[{z:[fi,"auto",ze,Me]}],basis:[{basis:[Ar,"full","auto",h,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ut,Ar,"auto","initial","none",ze,Me]}],grow:[{grow:["",ut,ze,Me]}],shrink:[{shrink:["",ut,ze,Me]}],order:[{order:[fi,"first","last","none",ze,Me]}],"grid-cols":[{"grid-cols":J()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":J()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...oe(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...oe()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":oe()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pbs:[{pbs:M()}],pbe:[{pbe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mbs:[{mbs:H()}],mbe:[{mbe:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:ne()}],"inline-size":[{inline:["auto",...F()]}],"min-inline-size":[{"min-inline":["auto",...F()]}],"max-inline-size":[{"max-inline":["none",...F()]}],"block-size":[{block:["auto",...se()]}],"min-block-size":[{"min-block":["auto",...se()]}],"max-block-size":[{"max-block":["none",...se()]}],w:[{w:[h,"screen",...ne()]}],"min-w":[{"min-w":[h,"screen","none",...ne()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[d]},...ne()]}],h:[{h:["screen","lh",...ne()]}],"min-h":[{"min-h":["screen","lh","none",...ne()]}],"max-h":[{"max-h":["screen","lh","none",...ne()]}],"font-size":[{text:["base",s,Ga,Es]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,Zj,qj]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",hg,ze,Me]}],"font-family":[{font:[Kj,Pj,i]}],"font-features":[{"font-features":[ze,Me]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[c,ze,Me]}],"line-clamp":[{"line-clamp":[ut,"none",ze,Me]}],leading:[{leading:["none",f,...M()]}],"list-image":[{"list-image":["none",ze,Me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ze,Me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:[ut,"from-font","auto",Ga,k0,Es]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[ut,"auto",ze,Me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["text-ellipsis","text-clip"],truncate:["truncate"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"tab-size":[{tab:[fi,ze,Me]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ze,Me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ze,Me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Re()}],"bg-repeat":[{bg:Ye()}],"bg-size":[{bg:Oe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},fi,ze,Me],radial:["",ze,Me],conic:["",fi,ze,Me]},Xj,Yj]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-bs":[{"border-bs":W()}],"border-w-be":[{"border-be":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ie(),"hidden","none"]}],"divide-style":[{divide:[...ie(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-bs":[{"border-bs":K()}],"border-color-be":[{"border-be":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...ie(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ut,ze,Me]}],"outline-w":[{outline:["",ut,Ga,Es]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","inner","none",v,jf,Of]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",b,jf,Of]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[ut,Es]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",S,jf,Of]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[ut,ze,Me]}],"mix-blend":[{"mix-blend":[...ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ue()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ut,ze,Me]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[ze,Me]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"mask-image-radial-shape":[{mask:["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":L()}],"mask-image-conic-pos":[{"mask-conic":[ut,ze,Me]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Re()}],"mask-repeat":[{mask:Ye()}],"mask-size":[{mask:Oe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ze,Me]}],filter:[{filter:["","none",ze,Me]}],blur:[{blur:ae()}],brightness:[{brightness:[ut,ze,Me]}],contrast:[{contrast:[ut,ze,Me]}],"drop-shadow":[{"drop-shadow":["","none",C,jf,Of]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",ut,ze,Me]}],"hue-rotate":[{"hue-rotate":[ut,ze,Me]}],invert:[{invert:["",ut,ze,Me]}],saturate:[{saturate:[ut,ze,Me]}],sepia:[{sepia:["",ut,ze,Me]}],"backdrop-filter":[{"backdrop-filter":["","none",ze,Me]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[ut,ze,Me]}],"backdrop-contrast":[{"backdrop-contrast":[ut,ze,Me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ut,ze,Me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ut,ze,Me]}],"backdrop-invert":[{"backdrop-invert":["",ut,ze,Me]}],"backdrop-opacity":[{"backdrop-opacity":[ut,ze,Me]}],"backdrop-saturate":[{"backdrop-saturate":[ut,ze,Me]}],"backdrop-sepia":[{"backdrop-sepia":["",ut,ze,Me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ze,Me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ut,"initial",ze,Me]}],ease:[{ease:["linear","initial",O,ze,Me]}],delay:[{delay:[ut,ze,Me]}],animate:[{animate:["none",E,ze,Me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[R,ze,Me]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:q()}],"rotate-x":[{"rotate-x":q()}],"rotate-y":[{"rotate-y":q()}],"rotate-z":[{"rotate-z":q()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":["scale-3d"],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[ze,Me,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],"transform-box":[{transform:["content","border","fill","stroke","view"]}],translate:[{translate:Ke()}],"translate-x":[{"translate-x":Ke()}],"translate-y":[{"translate-y":Ke()}],"translate-z":[{"translate-z":Ke()}],"translate-none":["translate-none"],"translate-3d":["translate-3d"],zoom:[{zoom:[fi,ze,Me]}],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ze,Me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":K()}],"scrollbar-track-color":[{"scrollbar-track":K()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mbs":[{"scroll-mbs":M()}],"scroll-mbe":[{"scroll-mbe":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pbs":[{"scroll-pbs":M()}],"scroll-pbe":[{"scroll-pbe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ze,Me]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[ut,Ga,Es,Bj]}],stroke:[{stroke:["none",...K()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],"place-content":["align-content","justify-content"],"place-items":["align-items","justify-items"],"place-self":["align-self","justify-self"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],truncate:["text-overflow","overflow","overflow-x","overflow-y","whitespace"],sr:["not-sr","position","size","w","h","p","px","py","ps","pe","pbs","pbe","pt","pr","pb","pl","m","mx","my","ms","me","mbs","mbe","mt","mr","mb","ml","overflow","overflow-x","overflow-y","whitespace"],"not-sr":["sr"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],"mask-image-x-from-pos":["mask-image-r-from-pos","mask-image-l-from-pos"],"mask-image-x-to-pos":["mask-image-r-to-pos","mask-image-l-to-pos"],"mask-image-x-from-color":["mask-image-r-from-color","mask-image-l-from-color"],"mask-image-x-to-color":["mask-image-r-to-color","mask-image-l-to-color"],"mask-image-y-from-pos":["mask-image-t-from-pos","mask-image-b-from-pos"],"mask-image-y-to-pos":["mask-image-t-to-pos","mask-image-b-to-pos"],"mask-image-y-from-color":["mask-image-t-from-color","mask-image-b-from-color"],"mask-image-y-to-color":["mask-image-t-to-color","mask-image-b-to-color"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z","translate-3d"],"translate-x":["translate-none"],"translate-y":["translate-none"],"translate-z":["translate-none"],"translate-3d":["translate-none"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],contain:["contain-size","contain-layout","contain-paint","contain-style"],"contain-size":["contain"],"contain-layout":["contain"],"contain-paint":["contain"],"contain-style":["contain"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Wj=wj($j);function eA(n,i){if(n instanceof RegExp)return{keys:!1,pattern:n};var s,a,c,f,d=[],h="",m=n.split("/");for(m[0]||m.shift();c=m.shift();)s=c[0],s==="*"?(d.push(s),h+=c[1]==="?"?"(?:/(.*))?":"/(.*)"):s===":"?(a=c.indexOf("?",1),f=c.indexOf(".",1),d.push(c.substring(1,~a?a:~f?f:c.length)),h+=~a&&!~f?"(?:/([^/]+?))?":"/([^/]+?)",~f&&(h+=(~a?"?":"")+"\\"+c.substring(f))):h+="/"+c;return{keys:d,pattern:new RegExp("^"+h+(i?"(?=$|/)":"/?$"),"i")}}const P1=(n="")=>n==="/"?"":n,tA=(n,i)=>n[0]==="~"?n.slice(1):P1(i)+n,G1=(n,i)=>(n=Pg(P1(n)),i=Pg(i),!n||(i.toLowerCase()+"/").startsWith(n.toLowerCase()+"/")?i.slice(n.length)||"/":"~"+i),Pg=n=>{try{return n.includes("%")?decodeURI(n):n}catch{return n}},nA=n=>Pg(n[0]==="?"?n.slice(1):n),Y1={hook:e1,searchHook:zO,parser:eA,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:n=>n,aroundNav:(n,i,s)=>n(i,s)},Q1=x.createContext(Y1),xo=()=>x.useContext(Q1),K1={},F1=x.createContext(K1),lA=()=>x.useContext(F1),X1=(n,i=n.base)=>G1(i,n.hook(n)[0]),Z1=n=>{const[i,s]=n.hook(n);return[G1(n.base,i),gp((a,c)=>n.aroundNav(s,tA(a,n.base),c))]},bp=()=>Z1(xo()),iA=()=>{const n=xo();return nA(n.searchHook(n))},J1=(n,i,s,a)=>{const{pattern:c,keys:f}=i instanceof RegExp?{pattern:i}:n(i||"*",a),d=c.exec(s);if(!d)return[!1,null];const h={};for(let m=1;m<d.length;m++)h[m-1]=d[m];if(f)for(let m=0;m<f.length;m++)h[f[m]]=d[m+1];else Object.assign(h,d.groups);return a?[!0,h,d[0]]:[!0,h]},$1=({children:n,...i})=>{var m,g;const s=xo(),a=i.hook?Y1:s;let c=a;if(i.ssrPath){const[v,b=i.ssrSearch??""]=i.ssrPath.split("?");v&&(i.ssrSearch=b,i.ssrPath=v)}i.hrefs=i.hrefs??((m=i.hook)==null?void 0:m.hrefs),i.searchHook=i.searchHook??((g=i.hook)==null?void 0:g.searchHook);let f=x.useRef(a),d=f.current,h=d;for(let v in a){const b=v==="base"?a[v]+(i[v]??""):i[v]??a[v];b!==h[v]&&(d===h&&(f.current=h={...h}),h[v]=b),(b!==a[v]||b!==c[v])&&(c=h)}return x.createElement(Q1.Provider,{value:c},n)},rA=({children:n,component:i},s)=>i?x.createElement(i,{params:s}):typeof n=="function"?n(s):n,sA=n=>{let i=x.useRef(K1);const s=i.current,a=Object.keys(n);return i.current=a.length!==Object.keys(s).length||a.some(c=>n[c]!==s[c])?n:s};function fd(){const[n,i]=bp(),s=iA(),a=x.useMemo(()=>new URLSearchParams(s),[s]);let c=a;const f=gp((d,h)=>{c=new URLSearchParams(typeof d=="function"?d(c):d);const m=c.toString();i(n+(m?"?"+m:""),h)});return[a,f]}const Ya=({path:n,nest:i,match:s,...a})=>{const c=xo(),f=X1(c),[d,h,m]=s??J1(c.parser,n,f,i),g=sA({...lA(),...h});if(!d)return null;const v=rA(a,g);return x.createElement(F1.Provider,{value:g},m?x.createElement($1,{base:m},v):v)};x.forwardRef((n,i)=>{const s=xo(),[a,c]=Z1(s),{to:f="",href:d=f,onClick:h,asChild:m,children:g,className:v,replace:b,state:S,transition:C,...T}=n;return T.onClick=gp(R=>{R.ctrlKey||R.metaKey||R.altKey||R.shiftKey||R.button!==0||(h==null||h(R),R.defaultPrevented||(R.preventDefault(),c(d,n)))}),T.href=s.hrefs(d[0]==="~"?d.slice(1):s.base+d,s),v!==void 0&&(T.className=v!=null&&v.call?v(a===d):v),i&&(T.ref=i),m&&x.isValidElement(g)?x.cloneElement(g,T):x.createElement("a",T,g)});const W1=(n,i=[])=>{if(Array.isArray(n))for(const s of n)W1(s&&s.type===x.Fragment?s.props.children:s,i);else i.push(n);return i},aA=({children:n,location:i})=>{const s=xo(),a=X1(s);for(const c of W1(n)){let f=0;if(x.isValidElement(c)&&(f=J1(s.parser,c.props.path,i||a,c.props.nest))[0])return x.cloneElement(c,{match:f})}return null},oA="(prefers-color-scheme: dark)";function vp(){return typeof matchMedia<"u"?matchMedia(oA):void 0}function uA(){var n;return((n=vp())==null?void 0:n.matches)??!1}function xp(){return uA()?"dark":"light"}function eE(n){const i=vp();return i==null||i.addEventListener("change",n),()=>i==null?void 0:i.removeEventListener("change",n)}function cA(n){return n==="system"?xp():n}function tE(n){const i=new Set,s=()=>{try{const h=localStorage.getItem(n);if(h==="light"||h==="dark"||h==="system")return h}catch{}return"system"},a=h=>{try{localStorage.setItem(n,h)}catch{}for(const m of i)m()},c=()=>cA(s()),f=h=>{i.add(h);const m=vp(),g=()=>{s()==="system"&&h()};return m==null||m.addEventListener("change",g),()=>{i.delete(h),m==null||m.removeEventListener("change",g)}};return{storageKey:n,getThemePref:s,setThemePref:a,getResolvedTheme:c,subscribeThemePref:f,initTheme:()=>{if(typeof document>"u")return()=>{};const h=()=>{document.documentElement.dataset.theme=c()};return h(),f(h)}}}const nE=["data-theme","data-mode","data-color-scheme"];function L0(n){var s,a;if(!n)return;if(n.classList.contains("dark"))return"dark";if(n.classList.contains("light"))return"light";for(const c of nE){const f=n.getAttribute(c);if(f==="dark"||f==="light")return f}const i=(a=(s=n.style)==null?void 0:s.colorScheme)==null?void 0:a.trim();if(i==="dark"||i==="light")return i}function fA(n=typeof document<"u"?document.documentElement:void 0,i=typeof document<"u"?document.body:void 0){return L0(n)??L0(i)??xp()}function dA(n){const i=eE(n);if(typeof document>"u"||typeof MutationObserver>"u")return i;const s=new MutationObserver(n),a={attributes:!0,attributeFilter:["class","style",...nE]};return s.observe(document.documentElement,a),document.body&&s.observe(document.body,a),()=>{s.disconnect(),i()}}const lE=x.createContext(null),iE=()=>"light",Gg=()=>()=>{},hA=()=>fA();function mA(n,i){const s=U0(i==="auto"?n.subscribeThemePref:Gg,n.getResolvedTheme),a=U0(i==="inherit"?dA:Gg,hA);return i==="auto"?s:i==="inherit"?a:i}function U0(n,i){return x.useSyncExternalStore(n,i,iE)}function gA({store:n,mode:i="auto",children:s}){const a=mA(n,i),c=x.useMemo(()=>({resolved:a,showToggle:i==="auto",store:n}),[a,i,n]);return p.jsx(lE.Provider,{value:c,children:s(a)})}function Sp(){const n=x.useContext(lE),i=x.useSyncExternalStore(n?Gg:eE,xp,iE);return n??{resolved:i,showToggle:!1,store:void 0}}function pA(n,i){const s=n.hash.replace(/^#/,""),a=s.startsWith("/")?void 0:new URLSearchParams(s),c=new URLSearchParams(n.search),f=(a==null?void 0:a.get("token"))||c.get("token");if(!f)return null;let d=n.search.replace(/^\?/,"");c.has("token")&&(c.delete("token"),d=c.toString());let h=s;return a!=null&&a.has("token")&&(a.delete("token"),h=a.toString()),i(`${n.pathname}${d?`?${d}`:""}${h?`#${h}`:""}`),f}function xt(...n){return Wj(nj(n))}function yA(n,i){switch(i.type){case"add":return{toasts:[...n.toasts,i.toast]};case"remove":return{toasts:n.toasts.filter(s=>s.id!==i.id)};default:return n}}const rE=x.createContext(null);function bA(){const n=x.useContext(rE);if(!n)throw new Error("useToast must be used within ToastProvider");return n}const vA={success:"bg-success",error:"bg-destructive",warning:"bg-warning",info:"bg-accent"},xA={success:"border-l-[var(--success)]",error:"border-l-[var(--destructive)]",warning:"border-l-[var(--warning)]",info:"border-l-[var(--accent)]"};function SA({toast:n,onRemove:i}){return x.useEffect(()=>{const s=setTimeout(()=>i(n.id),4500);return()=>clearTimeout(s)},[n.id,i]),p.jsxs("div",{role:"alert",className:xt("flex min-w-[280px] max-w-sm items-start gap-2.5 rounded-lg border border-border bg-card px-3.5 py-3 shadow-lg","border-l-[3px]",xA[n.kind]),style:{animation:"toastIn 160ms ease-out"},children:[p.jsx("span",{className:xt("mt-1 size-2 shrink-0 rounded-full",vA[n.kind]),"aria-hidden":!0}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("p",{className:"m-0 text-[13px] font-medium text-foreground leading-snug",children:n.message}),n.detail&&p.jsx("p",{className:"mt-1 text-xs text-muted-foreground leading-snug",children:n.detail})]}),p.jsx("button",{"aria-label":"Dismiss",onClick:()=>i(n.id),className:"shrink-0 rounded-sm text-muted-foreground hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring outline-none",children:p.jsx(C1,{className:"size-3.5"})}),p.jsx("style",{children:`
|
|
58
|
+
@keyframes toastIn {
|
|
59
|
+
from { opacity: 0; transform: translateY(8px); }
|
|
60
|
+
to { opacity: 1; transform: translateY(0); }
|
|
61
|
+
}
|
|
62
|
+
`})]})}function EA({children:n}){const[i,s]=x.useReducer(yA,{toasts:[]}),a=x.useCallback((f,d,h)=>{s({type:"add",toast:{id:`${Date.now()}-${Math.random()}`,kind:f,message:d,detail:h}})},[]),c=x.useCallback(f=>{s({type:"remove",id:f})},[]);return p.jsxs(rE.Provider,{value:{add:a},children:[n,p.jsx("div",{"aria-live":"polite","aria-atomic":"false",className:"fixed bottom-6 right-6 z-[9999] flex flex-col gap-2",children:i.toasts.map(f=>p.jsx(SA,{toast:f,onRemove:c},f.id))})]})}const RA=[{value:"system",label:"System theme",Icon:ZO},{value:"light",label:"Light theme",Icon:WO},{value:"dark",label:"Dark theme",Icon:JO}];function wA({store:n}={}){const i=Sp(),s=n??i.store;if(!s)throw new Error("ThemeToggle needs a `store` prop or an enclosing <ThemeProvider>.");const[a,c]=x.useState(()=>s.getThemePref()),f=d=>{c(d),s.setThemePref(d)};return p.jsx("div",{role:"group","aria-label":"Theme",className:"inline-flex gap-0.5 rounded-md border border-border bg-secondary/50 p-0.5",children:RA.map(({value:d,label:h,Icon:m})=>{const g=a===d;return p.jsx("button",{type:"button",title:h,"aria-label":h,"aria-pressed":g,onClick:()=>f(d),className:xt("inline-flex h-6 w-7 items-center justify-center rounded-[5px] outline-none transition-colors","focus-visible:ring-2 focus-visible:ring-ring",g?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:p.jsx(m,{className:"size-3.5"})},d)})})}function sE(n){if(typeof window>"u")return{};const i=window[n];return i&&typeof i=="object"?i:{}}const CA=n=>n.portal===!0||n.mode==="portal";function TA(n){const i=n.bootstrap??{},s=Zi({queryKey:n.queryKey??["config"],queryFn:n.getConfig,staleTime:n.staleTime??6e4}),a=s.data??i,c=n.isPortal??CA,f=!!n.forcePortal||!!n.token||c(a),d=s.isSuccess,h=!!i.title;return{config:a,ready:d,loading:s.isLoading&&!h&&!n.forcePortal,failed:s.isError&&!h,portal:f,readonly:a.readonly??!1,adminReady:d&&!f,query:s}}function OA(n={}){const[,i]=bp(),[s]=fd(),a=n.stickyParams??[];return(c,f={})=>{const d=new URLSearchParams;for(const m of a){const g=s.get(m);g&&d.set(m,g)}for(const[m,g]of Object.entries(f))g?d.set(m,g):d.delete(m);const h=d.toString();i(h?`${c}?${h}`:c)}}const jA=n=>i=>n==="/"?i==="/":i===n||i.startsWith(`${n}/`);function AA({title:n,logoUrl:i,brandMark:s,onBrandClick:a,switcher:c,readonly:f,portal:d,portalLabel:h="Portal",headerExtra:m,showThemeToggle:g,tabs:v=[],onNavigate:b,fallback:S,children:C,className:T}){const[R]=bp(),j=Sp(),O=g??j.showToggle;if(S!=null&&S!==!1)return p.jsx("div",{className:"flex h-screen items-center justify-center bg-background px-4 text-center",children:S});const E=i?p.jsx("img",{src:i,alt:n,className:"h-7 max-w-[320px] object-contain"}):p.jsxs(p.Fragment,{children:[s,p.jsx("span",{className:"text-sm font-semibold tracking-tight",children:n})]});return p.jsxs("div",{className:xt("flex h-screen flex-col overflow-hidden bg-background text-foreground",T),children:[p.jsxs("header",{className:"sticky top-0 z-40 border-b border-border bg-background/80 backdrop-blur",children:[p.jsxs("div",{className:"mx-auto flex h-14 max-w-6xl items-center gap-3 px-4 sm:px-6",children:[a?p.jsx("a",{href:"#","data-testid":"shell-brand",onClick:A=>{A.preventDefault(),a()},className:"flex shrink-0 items-center gap-2 rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring",children:E}):p.jsx("div",{"data-testid":"shell-brand",className:"flex shrink-0 items-center gap-2",children:E}),c?p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"select-none text-border",children:"/"}),c]}):null,p.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[m,f&&p.jsxs("span",{className:"flex items-center gap-1 rounded-md border border-warning/30 bg-warning/10 px-2 py-0.5 text-xs font-medium text-warning",children:[p.jsx(XO,{className:"size-3"}),"Read-only"]}),d&&p.jsx("span",{className:"rounded-md border border-accent/30 bg-accent/10 px-2 py-0.5 text-xs font-medium text-accent",children:h}),O&&p.jsx(wA,{})]})]}),v.length>1&&p.jsx("nav",{className:"mx-auto flex max-w-6xl items-center gap-1 overflow-x-auto px-2 sm:px-4","aria-label":"Main navigation",children:v.map(({path:A,label:N,match:L})=>{const D=(L??jA(A))(R);return p.jsx("button",{type:"button",onClick:()=>b==null?void 0:b(A),"aria-current":D?"page":void 0,className:xt("whitespace-nowrap px-3 py-2.5 text-[13px] font-medium outline-none transition-colors focus-visible:text-foreground",D?"relative text-foreground after:absolute after:inset-x-3 after:-bottom-px after:h-0.5 after:rounded-full after:bg-accent":"text-muted-foreground hover:text-foreground"),children:N},A)})})]}),p.jsx("main",{className:"flex-1 overflow-y-auto overflow-x-hidden",children:C})]})}function NA(){return p.jsx("p",{className:"text-[13px] text-muted-foreground",children:"Could not load the panel configuration. Check that the API is reachable and that you are signed in."})}function MA(){return new vO({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}})}function zA(n){const i=typeof n.themeKey=="string"?tE(n.themeKey):n.themeKey;i.initTheme();let s=null;if(n.tokenFromUrl){if(!n.api)throw new Error("bootSpa: `tokenFromUrl` needs the product's `api` client.");s=pA(window.location,v=>window.history.replaceState(null,"",v)),s&&n.api.setApiToken(s)}const a=n.queryClient??MA(),c=typeof n.root=="object"?n.root:document.getElementById(n.root??"root");if(!c)throw new Error("Root element not found");const f=(sE(n.configGlobal).basePath??"").replace(/\/$/,""),{App:d}=n,h=n.appProps??{},m=p.jsx(QT,{client:a,children:p.jsx(gA,{store:i,mode:"auto",children:()=>p.jsx(EA,{children:p.jsx(d,{...h,locationHook:e1,base:f})})})}),g=GT.createRoot(c);return g.render(n.strictMode===!1?m:p.jsx(x.StrictMode,{children:m})),{root:g,queryClient:a,themeStore:i,token:s}}let DA;function Ep(){return DA}function Vs({controlled:n,default:i,name:s,state:a="value"}){const{current:c}=x.useRef(n!==void 0),[f,d]=x.useState(i),h=c?n:f,m=x.useCallback(g=>{c||d(g)},[]);return[h,m]}const H0={};function hl(n,i){const s=x.useRef(H0);return s.current===H0&&(s.current=n(i)),s}const mg=rp[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],_A=mg&&mg!==x.useLayoutEffect?mg:n=>n();function _e(n){const i=hl(kA).current;return i.next=n,_A(i.effect),i.trampoline}function kA(){const n={next:void 0,callback:LA,trampoline:(...i)=>{var s;return(s=n.callback)==null?void 0:s.call(n,...i)},effect:()=>{n.callback=n.next}};return n}function LA(){}function Yi(n,i,s,a){const c=hl(aE).current;return HA(c,n,i,s,a)&&oE(c,[n,i,s,a]),c.callback}function UA(n){const i=hl(aE).current;return IA(i,n)&&oE(i,n),i.callback}function aE(){return{callback:null,cleanup:null,refs:[]}}function HA(n,i,s,a,c){return n.refs[0]!==i||n.refs[1]!==s||n.refs[2]!==a||n.refs[3]!==c}function IA(n,i){return n.refs.length!==i.length||n.refs.some((s,a)=>s!==i[a])}function oE(n,i){if(n.refs=i,i.every(s=>s==null)){n.callback=null;return}n.callback=s=>{if(n.cleanup&&(n.cleanup(),n.cleanup=null),s!=null){const a=Array(i.length).fill(null);for(let c=0;c<i.length;c+=1){const f=i[c];if(f!=null)switch(typeof f){case"function":{const d=f(s);typeof d=="function"&&(a[c]=d);break}case"object":{f.current=s;break}}}n.cleanup=()=>{for(let c=0;c<i.length;c+=1){const f=i[c];if(f!=null)switch(typeof f){case"function":{const d=a[c];typeof d=="function"?d():f(null);break}case"object":{f.current=null;break}}}}}}}const VA=()=>{},ke=typeof document<"u"?x.useLayoutEffect:VA,dd={clip:"rect(0 0 0 0)",overflow:"hidden",whiteSpace:"nowrap",position:"fixed",top:0,left:0,border:0,padding:0,width:1,height:1,margin:-1};function Gn(n,...i){const s=new URL(`https://base-ui.com/production-error/${n}`);return i.forEach(a=>s.searchParams.append("args[]",a)),`Base UI error #${n}; visit ${s} for the full message.`}const BA=parseInt(x.version,10);function Rp(n){return BA>=n}function I0(n){if(!x.isValidElement(n))return null;const i=n,s=i.props;return(Rp(19)?s==null?void 0:s.ref:i.ref)??null}function Yg(n,i){if(n&&!i)return n;if(!n&&i)return i;if(n||i)return{...n,...i}}function qA(n,i){const s={};for(const a in n){const c=n[a];if(i!=null&&i.hasOwnProperty(a)){const f=i[a](c);f!=null&&Object.assign(s,f);continue}c===!0?s[`data-${a.toLowerCase()}`]="":c&&(s[`data-${a.toLowerCase()}`]=c.toString())}return s}function PA(n,i){return typeof n=="function"?n(i):n}function GA(n,i){return typeof n=="function"?n(i):n}const Nu={};function wp(n,i,s,a,c){let f={...Qg(n,Nu)};return i&&(f=Ou(f,i)),s&&(f=Ou(f,s)),a&&(f=Ou(f,a)),c&&(f=Ou(f,c)),f}function YA(n){if(n.length===0)return Nu;if(n.length===1)return Qg(n[0],Nu);let i={...Qg(n[0],Nu)};for(let s=1;s<n.length;s+=1)i=Ou(i,n[s]);return i}function Ou(n,i){return uE(i)?i(n):QA(n,i)}function QA(n,i){if(!i)return n;for(const s in i){const a=i[s];switch(s){case"style":{n[s]=Yg(n.style,a);break}case"className":{n[s]=cE(n.className,a);break}default:KA(s,a)?n[s]=FA(n[s],a):n[s]=a}}return n}function KA(n,i){const s=n.charCodeAt(0),a=n.charCodeAt(1),c=n.charCodeAt(2);return s===111&&a===110&&c>=65&&c<=90&&(typeof i=="function"||typeof i>"u")}function uE(n){return typeof n=="function"}function Qg(n,i){return uE(n)?n(i):n??Nu}function FA(n,i){return i?n?s=>{if(XA(s)){const c=s;Kg(c);const f=i(c);return c.baseUIHandlerPrevented||n==null||n(c),f}const a=i(s);return n==null||n(s),a}:i:n}function Kg(n){return n.preventBaseUIHandler=()=>{n.baseUIHandlerPrevented=!0},n}function cE(n,i){return i?n?i+" "+n:i:n}function XA(n){return n!=null&&typeof n=="object"&&"nativeEvent"in n}function en(){}const Ul=Object.freeze([]),fn=Object.freeze({}),ZA={style:{transition:"none"}},JA="data-base-ui-click-trigger",fE={fallbackAxisSide:"none"},$A={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Bt(n,i,s={}){const a=i.render,c=WA(i,s);if(s.enabled===!1)return null;const f=s.state??fn;return eN(n,a,c,f)}function WA(n,i={}){const{className:s,style:a,render:c}=n,{state:f=fn,ref:d,props:h,stateAttributesMapping:m,enabled:g=!0}=i,v=g?PA(s,f):void 0,b=g?GA(a,f):void 0,S=g?qA(f,m):fn,C=g?Yg(S,Array.isArray(h)?YA(h):h)??fn:fn;return typeof document<"u"&&(g?Array.isArray(d)?C.ref=UA([C.ref,I0(c),...d]):C.ref=Yi(C.ref,I0(c),d):Yi(null,null)),g?(v!==void 0&&(C.className=cE(C.className,v)),b!==void 0&&(C.style=Yg(C.style,b)),C):fn}function eN(n,i,s,a){if(i){if(typeof i=="function")return i(s,a);const c=wp(s,i.props);return c.ref=s.ref,x.cloneElement(i,c)}if(n&&typeof n=="string")return tN(n,s);throw new Error(Gn(8))}function tN(n,i){return n==="button"?x.createElement("button",{type:"button",...i,key:i.key}):n==="img"?x.createElement("img",{alt:"",...i,key:i.key}):x.createElement(n,i)}const nN={...rp};let V0=0;function lN(n,i="mui"){const[s,a]=x.useState(n),c=n||s;return x.useEffect(()=>{s==null&&(V0+=1,a(`${i}-${V0}`))},[s,i]),c}const B0=nN.useId;function Gu(n,i){if(B0!==void 0){const s=B0();return n??(i?`${i}-${s}`:s)}return lN(n,i)}function hd(n){return Gu(n,"base-ui")}function md(){return typeof window<"u"}function Jr(n){return Cp(n)?(n.nodeName||"").toLowerCase():"#document"}function hn(n){var i;return(n==null||(i=n.ownerDocument)==null?void 0:i.defaultView)||window}function $i(n){var i;return(i=(Cp(n)?n.ownerDocument:n.document)||window.document)==null?void 0:i.documentElement}function Cp(n){return md()?n instanceof Node||n instanceof hn(n).Node:!1}function Vt(n){return md()?n instanceof Element||n instanceof hn(n).Element:!1}function dn(n){return md()?n instanceof HTMLElement||n instanceof hn(n).HTMLElement:!1}function Fg(n){return!md()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof hn(n).ShadowRoot}function So(n){const{overflow:i,overflowX:s,overflowY:a,display:c}=Vl(n);return/auto|scroll|overlay|hidden|clip/.test(i+a+s)&&c!=="inline"&&c!=="contents"}function iN(n){return/^(table|td|th)$/.test(Jr(n))}function gd(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const rN=/transform|translate|scale|rotate|perspective|filter/,sN=/paint|layout|strict|content/,Rs=n=>!!n&&n!=="none";let gg;function Tp(n){const i=Vt(n)?Vl(n):n;return Rs(i.transform)||Rs(i.translate)||Rs(i.scale)||Rs(i.rotate)||Rs(i.perspective)||!pd()&&(Rs(i.backdropFilter)||Rs(i.filter))||rN.test(i.willChange||"")||sN.test(i.contain||"")}function aN(n){let i=Fr(n);for(;dn(i)&&!qr(i);){if(Tp(i))return i;if(gd(i))return null;i=Fr(i)}return null}function pd(){return gg==null&&(gg=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),gg}function qr(n){return/^(html|body|#document)$/.test(Jr(n))}function Vl(n){return hn(n).getComputedStyle(n)}function yd(n){return Vt(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Fr(n){if(Jr(n)==="html")return n;const i=n.assignedSlot||n.parentNode||Fg(n)&&n.host||$i(n);return Fg(i)?i.host:i}function dE(n){const i=Fr(n);return qr(i)?(n.ownerDocument||n).body:dn(i)&&So(i)?i:dE(i)}function Pr(n,i,s){var a;i===void 0&&(i=[]),s===void 0&&(s=!0);const c=dE(n),f=c===((a=n.ownerDocument)==null?void 0:a.body),d=hn(c);if(f){const h=Xg(d);return i.concat(d,d.visualViewport||[],So(c)?c:[],h&&s?Pr(h):[])}else return i.concat(c,Pr(c,[],s))}function Xg(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}const hE=x.createContext(void 0);function mE(n=!1){const i=x.useContext(hE);if(i===void 0&&!n)throw new Error(Gn(16));return i}function oN(n){const{focusableWhenDisabled:i,disabled:s,composite:a=!1,tabIndex:c=0,isNativeButton:f}=n,d=a&&i!==!1,h=a&&i===!1;return{props:x.useMemo(()=>{const g={onKeyDown(v){s&&i&&v.key!=="Tab"&&v.preventDefault()}};return a||(g.tabIndex=c,!f&&s&&(g.tabIndex=i?c:-1)),(f&&(i||d)||!f&&s)&&(g["aria-disabled"]=s),f&&(!i||h)&&(g.disabled=s),g},[a,s,i,d,h,f,c])}}function Yu(n={}){const{disabled:i=!1,focusableWhenDisabled:s,tabIndex:a=0,native:c=!0}=n,f=x.useRef(null),d=mE(!0)!==void 0,h=_e(()=>{const S=f.current;return!!((S==null?void 0:S.tagName)==="A"&&(S!=null&&S.href))}),{props:m}=oN({focusableWhenDisabled:s,disabled:i,composite:d,tabIndex:a,isNativeButton:c}),g=x.useCallback(()=>{const S=f.current;uN(S)&&d&&i&&m.disabled===void 0&&S.disabled&&(S.disabled=!1)},[i,m.disabled,d]);ke(g,[g]);const v=x.useCallback((S={})=>{const{onClick:C,onMouseDown:T,onKeyUp:R,onKeyDown:j,onPointerDown:O,...E}=S;return wp({type:c?"button":void 0,onClick(N){if(i){N.preventDefault();return}C==null||C(N)},onMouseDown(N){i||T==null||T(N)},onKeyDown(N){if(i||(Kg(N),j==null||j(N)),N.baseUIHandlerPrevented)return;const L=N.target===N.currentTarget&&!c&&!h()&&!i,D=N.key==="Enter",_=N.key===" ";L&&((_||D)&&N.preventDefault(),D&&(C==null||C(N)))},onKeyUp(N){i||(Kg(N),R==null||R(N)),!N.baseUIHandlerPrevented&&N.target===N.currentTarget&&!c&&!i&&N.key===" "&&(C==null||C(N))},onPointerDown(N){if(i){N.preventDefault();return}O==null||O(N)}},c?void 0:{role:"button"},m,E)},[i,m,c,h]),b=_e(S=>{f.current=S,g()});return{getButtonProps:v,buttonRef:b}}function uN(n){return dn(n)&&n.tagName==="BUTTON"}let q0=(function(n){return n.disabled="data-disabled",n.valid="data-valid",n.invalid="data-invalid",n.touched="data-touched",n.dirty="data-dirty",n.filled="data-filled",n.focused="data-focused",n})({});const cN={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Op={valid(n){return n===null?null:n?{[q0.valid]:""}:{[q0.invalid]:""}}};var Qi=kS();function fN(n,i){return{...n,state:{...n.state,valid:!i&&n.state.valid}}}const dN=x.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:en,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function jp(){return x.useContext(dN)}const hN=x.createContext({invalid:void 0,name:void 0,validityData:{state:cN,errors:[],error:"",value:"",initialValue:null},setValidityData:en,disabled:void 0,touched:!1,setTouched:en,dirty:!1,setDirty:en,filled:!1,setFilled:en,focused:!1,setFocused:en,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(n=fn)=>n,getInputValidationProps:(n=fn)=>n,inputRef:{current:null},commit:async()=>{}}});function Eo(n=!0){const i=x.useContext(hN);if(i.setValidityData===en&&!n)throw new Error(Gn(28));return i}function gE(n){const{enabled:i=!0,value:s,id:a,name:c,controlRef:f,commit:d}=n,{formRef:h}=jp(),{invalid:m,markedDirtyRef:g,validityData:v,setValidityData:b}=Eo(),S=_e(n.getValue);ke(()=>{if(!i)return;let C=s;C===void 0&&(C=S()),v.initialValue===null&&C!==null&&b(T=>({...T,initialValue:C}))},[i,b,s,v.initialValue,S]),ke(()=>{!i||!a||h.current.fields.set(a,{getValue:S,name:c,controlRef:f,validityData:fN(v,m),validate(){let C=s;C===void 0&&(C=S()),g.current=!0,Qi.flushSync(()=>d(C))}})},[d,f,i,h,S,a,m,g,c,v,s]),ke(()=>{const C=h.current.fields;return()=>{a&&C.delete(a)}},[h,a])}const mN=x.createContext({controlId:void 0,setControlId:en,labelId:void 0,setLabelId:en,messageIds:[],setMessageIds:en,getDescriptionProps:n=>n});function Qu(){return x.useContext(mN)}function pE(n={}){const{id:i,implicit:s=!1,controlRef:a}=n,{controlId:c,setControlId:f}=Qu(),d=hd(i);return ke(()=>{if(!(!s&&!i||f===en)){if(s){const h=a==null?void 0:a.current;Vt(h)&&h.closest("label")!=null?f(i??null):f(c??d)}else i&&f(i);return()=>{i&&f(void 0)}}},[i,a,c,f,s,d]),c??d}const dl="none",Mu="trigger-press",gN="trigger-hover",yE="outside-press",Pf="item-press",Os="input-change",Mr="input-clear",bd="focus-out",bE="escape-key",Gf="list-navigation",pN="cancel-open",yN="imperative-action",bN="window-resize";function We(n,i,s,a){let c=!1,f=!1;const d=fn;return{reason:n,event:i??new Event("base-ui"),cancel(){c=!0},allowPropagation(){f=!0},get isCanceled(){return c},get isPropagationAllowed(){return f},trigger:s,...d}}function xu(n,i,s){const a=s??fn;return{reason:n,event:i??new Event("base-ui"),...a}}function ju(n,i){const s=x.useRef(n),a=_e(i);ke(()=>{s.current!==n&&a(s.current)},[n,a]),ke(()=>{s.current=n},[n])}function vE(n){const i=x.useRef(!0);i.current&&(i.current=!1,n())}function On(n){const i=hl(vN,n).current;return i.next=n,ke(i.effect),i}function vN(n){const i={current:n,next:n,effect:()=>{i.current=i.next}};return i}var xN=class{constructor(n){this.value=n}deref(){return this.value}},SN=()=>typeof WeakRef>"u"?xN:WeakRef,xE=SN(),EN=0,Af=1;function Su(){return{s:EN,v:void 0,o:null,p:null}}function RN(n){return n instanceof xE?n.deref():n}function wN(n,i={}){let s=Su();const{resultEqualityCheck:a,maxSize:c}=i,f=c!==void 0;if(f&&(!Number.isInteger(c)||c<1))throw new TypeError(`maxSize must be a positive integer, received: ${c}`);let d=null,h=0,m,g=0;function v(){h>=c&&(d=s,s=Su(),h=0)}function b(){let S=s;const{length:C}=arguments;for(let j=0,O=C;j<O;j++){const E=arguments[j];if(typeof E=="function"||typeof E=="object"&&E!==null){let A=S.o;A===null&&(S.o=A=new WeakMap);const N=A.get(E);N===void 0?(S=Su(),A.set(E,S)):S=N}else{let A=S.p;A===null&&(S.p=A=new Map);const N=A.get(E);N===void 0?(S=Su(),A.set(E,S),h++):S=N}}if(S.s===Af)return S.v;if(d!==null){let j=d;for(let O=0,E=C;O<E;O++){const A=arguments[O];let N;if(typeof A=="function"||typeof A=="object"&&A!==null){const L=j.o;N=L!==null?L.get(A):void 0}else{const L=j.p;N=L!==null?L.get(A):void 0}if(N===void 0){j=null;break}j=N}if(j!==null&&j.s===Af){const O=S;return O.s=Af,O.v=j.v,v(),j.v}}const T=S;let R=n.apply(null,arguments);if(g++,a){const j=RN(m);j!=null&&a(j,R)&&(R=j,g!==0&&g--),m=typeof R=="object"&&R!==null||typeof R=="function"?new xE(R):R}return T.s=Af,T.v=R,f&&v(),R}return b.clearCache=()=>{s=Su(),d=null,h=0,b.resetResultsCount()},b.resultsCount=()=>g,b.resetResultsCount=()=>{g=0},b}var Ap=Symbol("NOT_FOUND");function CN(n,i=`expected a function, instead received ${typeof n}`){if(typeof n!="function")throw new TypeError(i)}function TN(n,i="expected all items to be functions, instead received the following types: "){if(!n.every(s=>typeof s=="function")){const s=n.map(a=>typeof a=="function"?`function ${a.name||"unnamed"}()`:typeof a).join(", ");throw new TypeError(`${i}[${s}]`)}}var P0=n=>Array.isArray(n)?n:[n];function ON(n){const i=Array.isArray(n[0])?n[0]:n;return TN(i,"createSelector expects all input-selectors to be functions, but received the following types: "),i}function jN(n,...i){const s=typeof n=="function"?{memoize:n,memoizeOptions:i}:n,a=(...c)=>{let f=0,d=0,h,m={},g=c.pop();typeof g=="object"&&(m=g,g=c.pop()),CN(g,`createSelector expects an output function after the inputs, but received: [${typeof g}]`);const v={...s,...m},{memoize:b,memoizeOptions:S=[],argsMemoize:C=wN,argsMemoizeOptions:T=[]}=v,R=P0(S),j=P0(T),O=ON(c),E=b(function(){return f++,g.apply(null,arguments)},...R),A=C(function(){d++;const{length:L}=O,D=new Array(L);for(let _=0;_<L;_++)D[_]=O[_].apply(null,arguments);return h=E.apply(null,D),h},...j);return Object.assign(A,{resultFunc:g,memoizedResultFunc:E,dependencies:O,dependencyRecomputations:()=>d,resetDependencyRecomputations:()=>{d=0},lastResult:()=>h,recomputations:()=>f,resetRecomputations:()=>{f=0},memoize:b,argsMemoize:C})};return Object.assign(a,{withTypes:()=>a}),a}function AN(n){let i;return{get(s){return i&&n(i.key,s)?i.value:Ap},put(s,a){i={key:s,value:a}},findMatchingEntry(s,a){const c=i;return c!==void 0&&a(c.value,s)?c:void 0},clear(){i=void 0}}}function NN(n,i){let s=[];function a(h){const m=s.findIndex(g=>i(g.key,h));if(m>-1){const g=s[m];return m>0&&(s.splice(m,1),s.unshift(g)),g.value}return Ap}function c(h,m){s.unshift({key:h,value:m}),s.length>n&&s.pop()}function f(h,m){const g=s,{length:v}=g;for(let b=0;b<v;b++){const S=g[b];if(m(S.value,h))return S}}function d(){s=[]}return{get:a,put:c,findMatchingEntry:f,clear:d}}var MN=(n,i)=>n===i;function zN(n){return function(s,a){if(s===null||a===null||s.length!==a.length)return!1;const{length:c}=s;for(let f=0;f<c;f++)if(!n(s[f],a[f]))return!1;return!0}}function DN(n,i){const s=typeof i=="object"?i:{equalityCheck:i},{equalityCheck:a=MN,maxSize:c=1,resultEqualityCheck:f}=s,d=zN(a);let h=0;const m=c<=1?AN(d):NN(c,d);function g(){let v=m.get(arguments);if(v===Ap){if(v=n.apply(null,arguments),h++,f){const b=m.findMatchingEntry(v,f);b&&(v=b.value,h!==0&&h--)}m.put(arguments,v)}return v}return g.clearCache=()=>{m.clear(),g.resetResultsCount()},g.resultsCount=()=>h,g.resetResultsCount=()=>{h=0},g}jN({memoize:DN,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const ge=(n,i,s,a,c,f,...d)=>{if(d.length>0)throw new Error(Gn(1));let h;if(n)h=n;else throw new Error("Missing arguments");return h};var pg={exports:{}},yg={};/**
|
|
63
|
+
* @license React
|
|
64
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
65
|
+
*
|
|
66
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the MIT license found in the
|
|
69
|
+
* LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/var G0;function _N(){if(G0)return yg;G0=1;var n=Pu(),i=$S();function s(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var a=typeof Object.is=="function"?Object.is:s,c=i.useSyncExternalStore,f=n.useRef,d=n.useEffect,h=n.useMemo,m=n.useDebugValue;return yg.useSyncExternalStoreWithSelector=function(g,v,b,S,C){var T=f(null);if(T.current===null){var R={hasValue:!1,value:null};T.current=R}else R=T.current;T=h(function(){function O(D){if(!E){if(E=!0,A=D,D=S(D),C!==void 0&&R.hasValue){var _=R.value;if(C(_,D))return N=_}return N=D}if(_=N,a(A,D))return _;var M=S(D);return C!==void 0&&C(_,M)?(A=D,_):(A=D,N=M)}var E=!1,A,N,L=b===void 0?null:b;return[function(){return O(v())},L===null?void 0:function(){return O(L())}]},[v,b,S,C]);var j=c(g,T[0],T[1]);return d(function(){R.hasValue=!0,R.value=j},[j]),m(j),j},yg}var Y0;function kN(){return Y0||(Y0=1,pg.exports=_N()),pg.exports}var LN=kN();const UN=Rp(19),HN=UN?IN:VN;function be(n,i,s,a,c){return HN(n,i,s,a,c)}function IN(n,i,s,a,c){const f=x.useCallback(()=>i(n.getSnapshot(),s,a,c),[n,i,s,a,c]);return mp.useSyncExternalStore(n.subscribe,f,f)}function VN(n,i,s,a,c){return LN.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getSnapshot,f=>i(f,s,a,c))}class Bs{constructor(i){Nt(this,"subscribe",i=>(this.listeners.add(i),()=>{this.listeners.delete(i)}));Nt(this,"getSnapshot",()=>this.state);this.state=i,this.listeners=new Set,this.updateTick=0}setState(i){if(this.state===i)return;this.state=i,this.updateTick+=1;const s=this.updateTick;for(const a of this.listeners){if(s!==this.updateTick)return;a(i)}}update(i){for(const s in i)if(!Object.is(this.state[s],i[s])){Bs.prototype.setState.call(this,{...this.state,...i});return}}set(i,s){Object.is(this.state[i],s)||Bs.prototype.setState.call(this,{...this.state,[i]:s})}notifyAll(){const i={...this.state};Bs.prototype.setState.call(this,i)}}class SE extends Bs{constructor(s,a={},c){super(s);Nt(this,"controlledValues",new Map);Nt(this,"select",(s,a,c,f)=>{const d=this.selectors[s];return d(this.state,a,c,f)});Nt(this,"useState",(s,a,c,f)=>{x.useDebugValue(s);const d=this.selectors[s];return be(this,d,a,c,f)});this.context=a,this.selectors=c}useSyncedValue(s,a){x.useDebugValue(s),ke(()=>{this.state[s]!==a&&this.set(s,a)},[s,a])}useSyncedValueWithCleanup(s,a){ke(()=>(this.state[s]!==a&&this.set(s,a),()=>{this.set(s,void 0)}),[s,a])}useSyncedValues(s){const a=Object.values(s);ke(()=>{this.update(s)},a)}useControlledProp(s,a,c){x.useDebugValue(s);const f=a!==void 0;this.controlledValues.has(s)||(this.controlledValues.set(s,f),!f&&!Object.is(this.state[s],c)&&super.setState({...this.state,[s]:c})),ke(()=>{f&&!Object.is(this.state[s],a)&&super.setState({...this.state,[s]:a})},[s,a,c,f])}set(s,a){this.controlledValues.get(s)!==!0&&super.set(s,a)}update(s){const a={...s};for(const c in a)if(Object.hasOwn(a,c)&&this.controlledValues.get(c)===!0){delete a[c];continue}super.update(a)}setState(s){const a={...s};for(const c in a)if(Object.hasOwn(a,c)&&this.controlledValues.get(c)===!0){delete a[c];continue}super.setState({...this.state,...a})}useContextCallback(s,a){x.useDebugValue(s);const c=_e(a??en);this.context[s]=c}useStateSetter(s){const a=x.useRef(void 0);return a.current===void 0&&(a.current=c=>{this.set(s,c)}),a.current}observe(s,a){let c;typeof s=="function"?c=s:c=this.selectors[s];let f=c(this.state);return a(f,f,this),this.subscribe(d=>{const h=c(d);if(!Object.is(f,h)){const m=f;f=h,a(h,m,this)}})}}const BN=[];function EE(n){x.useEffect(n,BN)}const Nf=null;class qN{constructor(){Nt(this,"callbacks",[]);Nt(this,"callbacksCount",0);Nt(this,"nextId",1);Nt(this,"startId",1);Nt(this,"isScheduled",!1);Nt(this,"tick",i=>{var c;this.isScheduled=!1;const s=this.callbacks,a=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,a>0)for(let f=0;f<s.length;f+=1)(c=s[f])==null||c.call(s,i)})}request(i){const s=this.nextId;return this.nextId+=1,this.callbacks.push(i),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),s}cancel(i){const s=i-this.startId;s<0||s>=this.callbacks.length||(this.callbacks[s]=null,this.callbacksCount-=1)}}const Mf=new qN;class gi{constructor(){Nt(this,"currentId",Nf);Nt(this,"cancel",()=>{this.currentId!==Nf&&(Mf.cancel(this.currentId),this.currentId=Nf)});Nt(this,"disposeEffect",()=>this.cancel)}static create(){return new gi}static request(i){return Mf.request(i)}static cancel(i){return Mf.cancel(i)}request(i){this.cancel(),this.currentId=Mf.request(()=>{this.currentId=Nf,i()})}}function vd(){const n=hl(gi.create).current;return EE(n.disposeEffect),n}const Eu=0;class go{constructor(){Nt(this,"currentId",Eu);Nt(this,"clear",()=>{this.currentId!==Eu&&(clearTimeout(this.currentId),this.currentId=Eu)});Nt(this,"disposeEffect",()=>this.clear)}static create(){return new go}start(i,s){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Eu,s()},i)}isStarted(){return this.currentId!==Eu}}function El(){const n=hl(go.create).current;return EE(n.disposeEffect),n}const Ks=typeof navigator<"u",bg=QN(),RE=FN(),Np=KN(),wE=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),PN=bg.platform==="MacIntel"&&bg.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(bg.platform),Q0=Ks&&/firefox/i.test(Np),GN=Ks&&/apple/i.test(navigator.vendor),Jf=Ks&&/android/i.test(RE)||/android/i.test(Np);Ks&&RE.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const YN=Np.includes("jsdom/");function QN(){if(!Ks)return{platform:"",maxTouchPoints:-1};const n=navigator.userAgentData;return n!=null&&n.platform?{platform:n.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function KN(){if(!Ks)return"";const n=navigator.userAgentData;return n&&Array.isArray(n.brands)?n.brands.map(({brand:i,version:s})=>`${i}/${s}`).join(" "):navigator.userAgent}function FN(){if(!Ks)return"";const n=navigator.userAgentData;return n!=null&&n.platform?n.platform:navigator.platform??""}const Zg="data-base-ui-focusable",CE="active",TE="selected",XN="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Gr="ArrowLeft",Yr="ArrowRight",Mp="ArrowUp",Ku="ArrowDown";function zr(n){var s;let i=n.activeElement;for(;((s=i==null?void 0:i.shadowRoot)==null?void 0:s.activeElement)!=null;)i=i.shadowRoot.activeElement;return i}function Rt(n,i){var a;if(!n||!i)return!1;const s=(a=i.getRootNode)==null?void 0:a.call(i);if(n.contains(i))return!0;if(s&&Fg(s)){let c=i;for(;c;){if(n===c)return!0;c=c.parentNode||c.host}}return!1}function Pn(n){return"composedPath"in n?n.composedPath()[0]:n.target}function Zl(n,i){if(i==null)return!1;if("composedPath"in n)return n.composedPath().includes(i);const s=n;return s.target!=null&&i.contains(s.target)}function ZN(n){return n.matches("html,body")}function nl(n){return(n==null?void 0:n.ownerDocument)||document}function OE(n){return dn(n)&&n.matches(XN)}function Jg(n){return n?n.getAttribute("role")==="combobox"&&OE(n):!1}function _u(n){return n?n.hasAttribute(Zg)?n:n.querySelector(`[${Zg}]`)||n:null}function Ka(n,i,s=!0){return n.filter(c=>{var f;return c.parentId===i&&(!s||((f=c.context)==null?void 0:f.open))}).flatMap(c=>[c,...Ka(n,c.id,s)])}function K0(n,i){var c;let s=[],a=(c=n.find(f=>f.id===i))==null?void 0:c.parentId;for(;a;){const f=n.find(d=>d.id===a);a=f==null?void 0:f.parentId,f&&(s=s.concat(f))}return s}function sn(n){n.preventDefault(),n.stopPropagation()}function JN(n){return"nativeEvent"in n}function jE(n){return n.mozInputSource===0&&n.isTrusted?!0:Jf&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}function AE(n){return YN?!1:!Jf&&n.width===0&&n.height===0||Jf&&n.width===1&&n.height===1&&n.pressure===0&&n.detail===0&&n.pointerType==="mouse"||n.width<1&&n.height<1&&n.pressure===0&&n.detail===0&&n.pointerType==="touch"}function F0(n,i){return["mouse","pen"].includes(n)}function NE(n){const i=n.type;return i==="click"||i==="mousedown"||i==="keydown"||i==="keyup"}const $N=["top","right","bottom","left"],po=Math.min,Pi=Math.max,$f=Math.round,Qa=Math.floor,Gi=n=>({x:n,y:n}),WN={left:"right",right:"left",bottom:"top",top:"bottom"};function ME(n,i,s){return Pi(n,po(i,s))}function Ki(n,i){return typeof n=="function"?n(i):n}function Il(n){return n.split("-")[0]}function $r(n){return n.split("-")[1]}function zp(n){return n==="x"?"y":"x"}function Dp(n){return n==="y"?"height":"width"}function Hl(n){const i=n[0];return i==="t"||i==="b"?"y":"x"}function _p(n){return zp(Hl(n))}function e2(n,i,s){s===void 0&&(s=!1);const a=$r(n),c=_p(n),f=Dp(c);let d=c==="x"?a===(s?"end":"start")?"right":"left":a==="start"?"bottom":"top";return i.reference[f]>i.floating[f]&&(d=Wf(d)),[d,Wf(d)]}function t2(n){const i=Wf(n);return[$g(n),i,$g(i)]}function $g(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const X0=["left","right"],Z0=["right","left"],n2=["top","bottom"],l2=["bottom","top"];function i2(n,i,s){switch(n){case"top":case"bottom":return s?i?Z0:X0:i?X0:Z0;case"left":case"right":return i?n2:l2;default:return[]}}function r2(n,i,s,a){const c=$r(n);let f=i2(Il(n),s==="start",a);return c&&(f=f.map(d=>d+"-"+c),i&&(f=f.concat(f.map($g)))),f}function Wf(n){const i=Il(n);return WN[i]+n.slice(i.length)}function s2(n){var i,s,a,c;return{top:(i=n.top)!=null?i:0,right:(s=n.right)!=null?s:0,bottom:(a=n.bottom)!=null?a:0,left:(c=n.left)!=null?c:0}}function zE(n){return typeof n!="number"?s2(n):{top:n,right:n,bottom:n,left:n}}function ed(n){const{x:i,y:s,width:a,height:c}=n;return{width:a,height:c,top:s,left:i,right:i+a,bottom:s+c,x:i,y:s}}function zf(n,i,s){return Math.floor(n/i)!==s}function Fa(n,i){return i<0||i>=n.current.length}function Yf(n,i){return Ln(n,{disabledIndices:i})}function Wg(n,i){return Ln(n,{decrement:!0,startingIndex:n.current.length,disabledIndices:i})}function Ln(n,{startingIndex:i=-1,decrement:s=!1,disabledIndices:a,amount:c=1}={}){let f=i;do f+=s?-c:c;while(f>=0&&f<=n.current.length-1&&Qr(n,f,a));return f}function DE(n,{event:i,orientation:s,loopFocus:a,rtl:c,cols:f,disabledIndices:d,minIndex:h,maxIndex:m,prevIndex:g,stopEvent:v=!1}){let b=g;const S=[],C={};let T=!1;{let O=null,E=-1;n.current.forEach((A,N)=>{if(A==null)return;const L=A.closest('[role="row"]');L&&(T=!0),(L!==O||E===-1)&&(O=L,E+=1,S[E]=[]),S[E].push(N),C[N]=E})}const R=T&&S.length>0&&S.some(O=>O.length!==f);function j(O){if(!R||g===-1)return;const E=C[g];if(E==null)return;const A=S[E].indexOf(g);let N=O==="up"?E-1:E+1;a&&(N<0?N=S.length-1:N>=S.length&&(N=0));const L=new Set;for(;N>=0&&N<S.length&&!L.has(N);){L.add(N);const D=S[N];if(D.length===0){N=O==="up"?N-1:N+1;continue}const _=Math.min(A,D.length-1);for(let M=_;M>=0;M-=1){const Q=D[M];if(!Qr(n,Q,d))return Q}N=O==="up"?N-1:N+1,a&&(N<0?N=S.length-1:N>=S.length&&(N=0))}}if(i.key===Mp){const O=j("up");if(O!==void 0)v&&sn(i),b=O;else{if(v&&sn(i),g===-1)b=m;else if(b=Ln(n,{startingIndex:b,amount:f,decrement:!0,disabledIndices:d}),a&&(g-f<h||b<0)){const E=g%f,A=m%f,N=m-(A-E);A===E?b=m:b=A>E?N:N-f}Fa(n,b)&&(b=g)}}if(i.key===Ku){const O=j("down");O!==void 0?(v&&sn(i),b=O):(v&&sn(i),g===-1?b=h:(b=Ln(n,{startingIndex:g,amount:f,disabledIndices:d}),a&&g+f>m&&(b=Ln(n,{startingIndex:g%f-f,amount:f,disabledIndices:d}))),Fa(n,b)&&(b=g))}if(s==="both"){const O=Qa(g/f);i.key===(c?Gr:Yr)&&(v&&sn(i),g%f!==f-1?(b=Ln(n,{startingIndex:g,disabledIndices:d}),a&&zf(b,f,O)&&(b=Ln(n,{startingIndex:g-g%f-1,disabledIndices:d}))):a&&(b=Ln(n,{startingIndex:g-g%f-1,disabledIndices:d})),zf(b,f,O)&&(b=g)),i.key===(c?Yr:Gr)&&(v&&sn(i),g%f!==0?(b=Ln(n,{startingIndex:g,decrement:!0,disabledIndices:d}),a&&zf(b,f,O)&&(b=Ln(n,{startingIndex:g+(f-g%f),decrement:!0,disabledIndices:d}))):a&&(b=Ln(n,{startingIndex:g+(f-g%f),decrement:!0,disabledIndices:d})),zf(b,f,O)&&(b=g));const E=Qa(m/f)===O;Fa(n,b)&&(a&&E?b=i.key===(c?Yr:Gr)?m:Ln(n,{startingIndex:g-g%f-1,disabledIndices:d}):b=g)}return b}function _E(n,i,s){const a=[];let c=0;return n.forEach(({width:f,height:d},h)=>{let m=!1;for(s&&(c=0);!m;){const g=[];for(let v=0;v<f;v+=1)for(let b=0;b<d;b+=1)g.push(c+v+b*i);c%i+f<=i&&g.every(v=>a[v]==null)?(g.forEach(v=>{a[v]=h}),m=!0):c+=1}}),[...a]}function kE(n,i,s,a,c){if(n===-1)return-1;const f=s.indexOf(n),d=i[n];switch(c){case"tl":return f;case"tr":return d?f+d.width-1:f;case"bl":return d?f+(d.height-1)*a:f;case"br":return s.lastIndexOf(n);default:return-1}}function LE(n,i){return i.flatMap((s,a)=>n.includes(s)?[a]:[])}function Qr(n,i,s){if(typeof s=="function")return s(i);if(s)return s.includes(i);const a=n.current[i];return a?a.hasAttribute("disabled")||a.getAttribute("aria-disabled")==="true":!1}/*!
|
|
71
|
+
* tabbable 6.5.2
|
|
72
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
73
|
+
*/var a2=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],td=a2.join(","),UE=typeof Element>"u",yo=UE?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,HE=!UE&&Element.prototype.getRootNode?function(n){return n==null||n.getRootNode==null?void 0:n.getRootNode()}:function(n){return n==null?void 0:n.ownerDocument},nd=function(i,s){s===void 0&&(s=!0);var a=i==null||i.getAttribute==null?void 0:i.getAttribute("inert"),c=a===""||a==="true",f=c||s&&i&&(typeof i.closest=="function"?i.closest("[inert]"):nd(i.parentNode));return f},o2=function(i){var s,a=i==null||i.getAttribute==null||(s=i.getAttribute("contenteditable"))==null?void 0:s.toLowerCase();return a===""||a==="true"||a==="plaintext-only"},IE=function(i,s,a){if(nd(i))return[];var c=Array.prototype.slice.apply(i.querySelectorAll(td));return s&&yo.call(i,td)&&c.unshift(i),c=c.filter(a),c},ld=function(i,s,a){for(var c=[],f=Array.from(i);f.length;){var d=f.shift();if(!nd(d,!1))if(d.tagName==="SLOT"){var h=d.assignedElements(),m=h.length?h:d.children,g=ld(m,!0,a);a.flatten?c.push.apply(c,g):c.push({scopeParent:d,candidates:g})}else{var v=yo.call(d,td);v&&a.filter(d)&&(s||!i.includes(d))&&c.push(d);var b=d.shadowRoot||typeof a.getShadowRoot=="function"&&a.getShadowRoot(d),S=!nd(b,!1)&&(!a.shadowRootFilter||a.shadowRootFilter(d));if(b&&S){var C=ld(b===!0?d.children:b.children,!0,a);a.flatten?c.push.apply(c,C):c.push({scopeParent:d,candidates:C})}else f.unshift.apply(f,d.children)}}return c},VE=function(i){return!isNaN(parseInt(i.getAttribute("tabindex"),10))},BE=function(i){if(!i)throw new Error("No node provided");return i.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(i.tagName)||o2(i))&&!VE(i)?0:i.tabIndex},u2=function(i,s){var a=BE(i);return a<0&&s&&!VE(i)?0:a},c2=function(i,s){return i.tabIndex===s.tabIndex?i.documentOrder-s.documentOrder:i.tabIndex-s.tabIndex},qE=function(i){return i.tagName==="INPUT"},f2=function(i){return qE(i)&&i.type==="hidden"},d2=function(i){var s=i.tagName==="DETAILS"&&Array.prototype.slice.apply(i.children).some(function(a){return a.tagName==="SUMMARY"});return s},h2=function(i,s){for(var a=0;a<i.length;a++)if(i[a].checked&&i[a].form===s)return i[a]},m2=function(i){if(!i.name)return!0;var s=i.form||HE(i),a=function(h){return s.querySelectorAll('input[type="radio"][name="'+h+'"]')},c;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")c=a(window.CSS.escape(i.name));else try{c=a(i.name)}catch(d){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",d.message),!1}var f=h2(c,i.form);return!f||f===i},g2=function(i){return qE(i)&&i.type==="radio"},p2=function(i){return g2(i)&&!m2(i)},J0=function(i){var s=i.getBoundingClientRect(),a=s.width,c=s.height;return a===0&&c===0},y2=function(i,s){var a=s.displayCheck,c=s.getShadowRoot;if(a==="full-native"&&"checkVisibility"in i){var f=i.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!f}var d=getComputedStyle(i),h=d.visibility;if(h==="hidden"||h==="collapse")return!0;var m=yo.call(i,"details>summary:first-of-type"),g=m?i.parentElement:i;if(yo.call(g,"details:not([open]) *"))return!0;if(!a||a==="full"||a==="full-native"||a==="legacy-full"){if(typeof c=="function"){for(var v=i;i;){var b=i.parentElement,S=HE(i);if(b&&!b.shadowRoot&&c(b)===!0)return J0(i);i.assignedSlot?i=i.assignedSlot:!b&&S!==i.ownerDocument?i=S.host:i=b}i=v}if(i.isConnected)return!i.getClientRects().length;if(a!=="legacy-full")return!0}else if(a==="non-zero-area")return J0(i);return!1},b2=function(i){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(i.tagName))for(var s=i.parentElement;s;){if(s.tagName==="FIELDSET"&&s.disabled){for(var a=0;a<s.children.length;a++){var c=s.children.item(a);if(c.tagName==="LEGEND")return yo.call(s,"fieldset[disabled] *")?!0:!c.contains(i)}return!0}s=s.parentElement}return!1},ep=function(i,s){return!(s.disabled||f2(s)||y2(s,i)||d2(s)||b2(s))},tp=function(i,s){return!(p2(s)||BE(s)<0||!ep(i,s))},v2=function(i){var s=parseInt(i.getAttribute("tabindex"),10);return!!(isNaN(s)||s>=0)},PE=function(i){var s=[],a=[];return i.forEach(function(c,f){var d=!!c.scopeParent,h=d?c.scopeParent:c,m=u2(h,d),g=d?PE(c.candidates):h;m===0?d?s.push.apply(s,g):s.push(h):a.push({documentOrder:f,tabIndex:m,item:c,isScope:d,content:g})}),a.sort(c2).reduce(function(c,f){return f.isScope?c.push.apply(c,f.content):c.push(f.content),c},[]).concat(s)},xd=function(i,s){s=s||{};var a;return s.getShadowRoot?a=ld([i],s.includeContainer,{filter:tp.bind(null,s),flatten:!1,getShadowRoot:s.getShadowRoot,shadowRootFilter:v2}):a=IE(i,s.includeContainer,tp.bind(null,s)),PE(a)},x2=function(i,s){s=s||{};var a;return s.getShadowRoot?a=ld([i],s.includeContainer,{filter:ep.bind(null,s),flatten:!0,getShadowRoot:s.getShadowRoot}):a=IE(i,s.includeContainer,ep.bind(null,s)),a},GE=function(i,s){if(s=s||{},!i)throw new Error("No node provided");return yo.call(i,td)===!1?!1:tp(s,i)};const Fu=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function YE(n,i){const s=xd(n,Fu()),a=s.length;if(a===0)return;const c=zr(nl(n)),f=s.indexOf(c),d=f===-1?i===1?0:a-1:f+i;return s[d]}function QE(n){return YE(nl(n).body,1)||n}function KE(n){return YE(nl(n).body,-1)||n}function zu(n,i){const s=i||n.currentTarget,a=n.relatedTarget;return!a||!Rt(s,a)}function S2(n){xd(n,Fu()).forEach(s=>{s.dataset.tabindex=s.getAttribute("tabindex")||"",s.setAttribute("tabindex","-1")})}function $0(n){n.querySelectorAll("[data-tabindex]").forEach(s=>{const a=s.dataset.tabindex;delete s.dataset.tabindex,a?s.setAttribute("tabindex",a):s.removeAttribute("tabindex")})}function E2(){const n=new Map;return{emit(i,s){var a;(a=n.get(i))==null||a.forEach(c=>c(s))},on(i,s){n.has(i)||n.set(i,new Set),n.get(i).add(s)},off(i,s){var a;(a=n.get(i))==null||a.delete(s)}}}const R2=x.createContext(null),w2=x.createContext(null),Sd=()=>{var n;return((n=x.useContext(R2))==null?void 0:n.id)||null},Ed=n=>{const i=x.useContext(w2);return n??i};function id(n){return`data-base-ui-${n}`}function Fi(n){return(n==null?void 0:n.ownerDocument)||document}const rd=x.forwardRef(function(i,s){const[a,c]=x.useState();ke(()=>{GN&&c("button")},[]);const f={tabIndex:0,role:a};return p.jsx("span",{...i,ref:s,style:dd,"aria-hidden":a?void 0:!0,...f,"data-base-ui-focus-guard":""})});let W0=0;function Qf(n,i={}){const{preventScroll:s=!1,cancelPrevious:a=!0,sync:c=!1}=i;a&&cancelAnimationFrame(W0);const f=()=>n==null?void 0:n.focus({preventScroll:s});c?f():W0=requestAnimationFrame(f)}const Xa={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function eS(n){return n==="inert"?Xa.inert:n==="aria-hidden"?Xa["aria-hidden"]:Xa.none}let Df=new WeakSet,_f={},vg=0;const FE=n=>n&&(n.host||FE(n.parentNode)),C2=(n,i)=>i.map(s=>{if(n.contains(s))return s;const a=FE(s);return n.contains(a)?a:null}).filter(s=>s!=null);function T2(n,i,s,a){const c="data-base-ui-inert",f=a?"inert":s?"aria-hidden":null,d=C2(i,n),h=new Set,m=new Set(d),g=[];_f[c]||(_f[c]=new WeakMap);const v=_f[c];d.forEach(b),S(i),h.clear();function b(C){!C||h.has(C)||(h.add(C),C.parentNode&&b(C.parentNode))}function S(C){!C||m.has(C)||[].forEach.call(C.children,T=>{if(Jr(T)!=="script")if(h.has(T))S(T);else{const R=f?T.getAttribute(f):null,j=R!==null&&R!=="false",O=eS(f),E=(O.get(T)||0)+1,A=(v.get(T)||0)+1;O.set(T,E),v.set(T,A),g.push(T),E===1&&j&&Df.add(T),A===1&&T.setAttribute(c,""),!j&&f&&T.setAttribute(f,f==="inert"?"":"true")}})}return vg+=1,()=>{g.forEach(C=>{const T=eS(f),j=(T.get(C)||0)-1,O=(v.get(C)||0)-1;T.set(C,j),v.set(C,O),j||(!Df.has(C)&&f&&C.removeAttribute(f),Df.delete(C)),O||C.removeAttribute(c)}),vg-=1,vg||(Xa.inert=new WeakMap,Xa["aria-hidden"]=new WeakMap,Xa.none=new WeakMap,Df=new WeakSet,_f={})}}function O2(n,i=!1,s=!1){const a=nl(n[0]).body;return T2(n.concat(Array.from(a.querySelectorAll("[aria-live]"))),a,i,s)}const XE=x.createContext(null),ZE=()=>x.useContext(XE),j2=id("portal");function A2(n={}){const{ref:i,container:s,componentProps:a=fn,elementProps:c,elementState:f}=n,d=Gu(),h=ZE(),m=h==null?void 0:h.portalNode,[g,v]=x.useState(null),[b,S]=x.useState(null),C=x.useRef(null);ke(()=>{if(s===null){C.current&&(C.current=null,S(null),v(null));return}if(d==null)return;const j=(s&&(Cp(s)?s:s.current))??m??document.body;if(j==null){C.current&&(C.current=null,S(null),v(null));return}C.current!==j&&(C.current=j,S(null),v(j))},[s,m,d]);const T=Bt("div",a,{ref:[i,S],state:f,props:[{id:d,[j2]:""},c]});return{portalNode:b,portalSubtree:g&&T?Qi.createPortal(T,g):null}}const kp=x.forwardRef(function(i,s){const{children:a,container:c,className:f,render:d,renderGuards:h,...m}=i,{portalNode:g,portalSubtree:v}=A2({container:c,ref:s,componentProps:i,elementProps:m}),b=x.useRef(null),S=x.useRef(null),C=x.useRef(null),T=x.useRef(null),[R,j]=x.useState(null),O=R==null?void 0:R.modal,E=R==null?void 0:R.open,A=typeof h=="boolean"?h:!!R&&!R.modal&&R.open&&!!g;x.useEffect(()=>{if(!g||O)return;function L(D){g&&zu(D)&&(D.type==="focusin"?$0:S2)(g)}return g.addEventListener("focusin",L,!0),g.addEventListener("focusout",L,!0),()=>{g.removeEventListener("focusin",L,!0),g.removeEventListener("focusout",L,!0)}},[g,O]),x.useEffect(()=>{!g||E||$0(g)},[E,g]);const N=x.useMemo(()=>({beforeOutsideRef:b,afterOutsideRef:S,beforeInsideRef:C,afterInsideRef:T,portalNode:g,setFocusManagerState:j}),[g]);return p.jsxs(x.Fragment,{children:[v,p.jsxs(XE.Provider,{value:N,children:[A&&g&&p.jsx(rd,{"data-type":"outside",ref:b,onFocus:L=>{var D;if(zu(L,g))(D=C.current)==null||D.focus();else{const _=R?R.domReference:null,M=KE(_);M==null||M.focus()}}}),A&&g&&p.jsx("span",{"aria-owns":g.id,style:$A}),g&&Qi.createPortal(a,g),A&&g&&p.jsx(rd,{"data-type":"outside",ref:S,onFocus:L=>{var D;if(zu(L,g))(D=T.current)==null||D.focus();else{const _=R?R.domReference:null,M=QE(_);M==null||M.focus(),R!=null&&R.closeOnFocusOut&&(R==null||R.onOpenChange(!1,We(bd,L.nativeEvent)))}}})]})]})});function Cs(n){return n==null?n:"current"in n?n.current:n}function N2(n,i){const s=hn(n.target);return n instanceof s.KeyboardEvent?"keyboard":n instanceof s.FocusEvent?i||"keyboard":"pointerType"in n?n.pointerType||"keyboard":"touches"in n?"touch":n instanceof s.MouseEvent?i||(n.detail===0?"keyboard":"mouse"):""}const tS=20;let Br=[];function Lp(){Br=Br.filter(n=>n.isConnected)}function M2(n){Lp(),n&&Jr(n)!=="body"&&(Br.push(n),Br.length>tS&&(Br=Br.slice(-tS)))}function xg(){return Lp(),Br[Br.length-1]}function z2(n){if(!n)return null;const i=Fu();return GE(n,i)?n:xd(n,i)[0]||n}function D2(n){return!n||!n.isConnected?!1:typeof n.checkVisibility=="function"?n.checkVisibility():Vl(n).display!=="none"}function nS(n,i){var d;if(!i.current.includes("floating")&&!((d=n.getAttribute("role"))!=null&&d.includes("dialog")))return;const s=Fu(),c=x2(n,s).filter(h=>{const m=h.getAttribute("data-tabindex")||"";return GE(h,s)||h.hasAttribute("data-tabindex")&&!m.startsWith("-")}),f=n.getAttribute("tabindex");i.current.includes("floating")||c.length===0?f!=="0"&&n.setAttribute("tabindex","0"):(f!=="-1"||n.hasAttribute("data-tabindex")&&n.getAttribute("data-tabindex")!=="-1")&&(n.setAttribute("tabindex","-1"),n.setAttribute("data-tabindex","-1"))}function Up(n){const{context:i,children:s,disabled:a=!1,order:c=["content"],initialFocus:f=!0,returnFocus:d=!0,restoreFocus:h=!1,modal:m=!0,closeOnFocusOut:g=!0,openInteractionType:v="",getInsideElements:b=()=>[],nextFocusableElement:S,previousFocusableElement:C,beforeContentFocusGuardRef:T,externalTree:R}=n,j="rootStore"in i?i.rootStore:i,O=j.useState("open"),E=j.useState("domReferenceElement"),A=j.useState("floatingElement"),{events:N,dataRef:L}=j.context,D=_e(()=>{var he;return(he=L.current.floatingContext)==null?void 0:he.nodeId}),_=_e(b),M=f===!1,Q=Jg(E)&&M,J=On(c),re=On(f),te=On(d),$=On(v),oe=Ed(R),V=ZE(),H=x.useRef(null),ne=x.useRef(null),F=x.useRef(!1),se=x.useRef(!1),K=x.useRef(!1),Re=x.useRef(-1),Ye=x.useRef(""),Oe=x.useRef(""),z=El(),B=El(),W=vd(),ie=V!=null,ue=_u(A),me=_e((he=ue)=>he?xd(he,Fu()):[]),ae=_e(he=>{const ye=me(he);return J.current.map(()=>ye).filter(Boolean).flat()});x.useEffect(()=>{if(a||!m)return;function he(de){de.key==="Tab"&&Rt(ue,zr(nl(ue)))&&me().length===0&&!Q&&sn(de)}const ye=nl(ue);return ye.addEventListener("keydown",he),()=>{ye.removeEventListener("keydown",he)}},[a,E,ue,m,J,Q,me,ae]),x.useEffect(()=>{if(a||!A)return;function he(ye){const de=Pn(ye),He=me().indexOf(de);He!==-1&&(Re.current=He)}return A.addEventListener("focusin",he),()=>{A.removeEventListener("focusin",he)}},[a,A,me]),x.useEffect(()=>{if(a||!O)return;const he=nl(ue);function ye(){K.current=!1}function de(He){const je=Pn(He),Ee=Rt(A,je)||Rt(E,je)||Rt(V==null?void 0:V.portalNode,je);K.current=!Ee,Oe.current=He.pointerType||"keyboard"}function Ce(){Oe.current="keyboard"}return he.addEventListener("pointerdown",de,!0),he.addEventListener("pointerup",ye,!0),he.addEventListener("pointercancel",ye,!0),he.addEventListener("keydown",Ce,!0),()=>{he.removeEventListener("pointerdown",de,!0),he.removeEventListener("pointerup",ye,!0),he.removeEventListener("pointercancel",ye,!0),he.removeEventListener("keydown",Ce,!0)}},[a,A,E,ue,O,V]),x.useEffect(()=>{if(a||!g)return;function he(){se.current=!0,B.start(0,()=>{se.current=!1})}function ye(je){const Ee=je.relatedTarget,ve=je.currentTarget,we=Pn(je);queueMicrotask(()=>{const xe=D(),Xe=j.context.triggerElements,$e=!(Rt(E,Ee)||Rt(A,Ee)||Rt(Ee,A)||Rt(V==null?void 0:V.portalNode,Ee)||Ee!=null&&Xe.hasElement(Ee)||Xe.hasMatchingElement(Ve=>Rt(Ve,Ee))||Ee!=null&&Ee.hasAttribute(id("focus-guard"))||oe&&(Ka(oe.nodesRef.current,xe).find(Ve=>{var Ze,lt;return Rt((Ze=Ve.context)==null?void 0:Ze.elements.floating,Ee)||Rt((lt=Ve.context)==null?void 0:lt.elements.domReference,Ee)})||K0(oe.nodesRef.current,xe).find(Ve=>{var Ze,lt,St;return[(Ze=Ve.context)==null?void 0:Ze.elements.floating,_u((lt=Ve.context)==null?void 0:lt.elements.floating)].includes(Ee)||((St=Ve.context)==null?void 0:St.elements.domReference)===Ee})));if(ve===E&&ue&&nS(ue,J),h&&ve!==E&&!D2(we)&&zr(nl(ue))===nl(ue).body){if(dn(ue)&&(ue.focus(),h==="popup")){W.request(()=>{ue.focus()});return}const Ve=Re.current,Ze=me(),lt=Ze[Ve]||Ze[Ze.length-1]||ue;dn(lt)&<.focus()}if(L.current.insideReactTree){L.current.insideReactTree=!1;return}(Q||!m)&&Ee&&$e&&!se.current&&(Q||Ee!==xg())&&(F.current=!0,j.setOpen(!1,We(bd,je)))})}function de(){K.current||(L.current.insideReactTree=!0,z.start(0,()=>{L.current.insideReactTree=!1}))}const Ce=dn(E)?E:null,He=[];if(!(!A&&!Ce))return Ce&&(Ce.addEventListener("focusout",ye),Ce.addEventListener("pointerdown",he),He.push(()=>{Ce.removeEventListener("focusout",ye),Ce.removeEventListener("pointerdown",he)})),A&&(A.addEventListener("focusout",ye),V&&(A.addEventListener("focusout",de,!0),He.push(()=>{A.removeEventListener("focusout",de,!0)})),He.push(()=>{A.removeEventListener("focusout",ye)})),()=>{He.forEach(je=>{je()})}},[a,E,A,ue,m,oe,V,j,g,h,me,Q,D,J,L,z,B,W]);const q=x.useRef(null),le=x.useRef(null),pe=Yi(q,T,V==null?void 0:V.beforeInsideRef),Ke=Yi(le,V==null?void 0:V.afterInsideRef);x.useEffect(()=>{var je,Ee,ve;if(a||!A||!O)return;const he=Array.from(((je=V==null?void 0:V.portalNode)==null?void 0:je.querySelectorAll(`[${id("portal")}]`))||[]),de=(ve=(Ee=(oe?K0(oe.nodesRef.current,D()):[]).find(we=>{var xe;return Jg(((xe=we.context)==null?void 0:xe.elements.domReference)||null)}))==null?void 0:Ee.context)==null?void 0:ve.elements.domReference,Ce=[A,de,...he,..._(),H.current,ne.current,q.current,le.current,V==null?void 0:V.beforeOutsideRef.current,V==null?void 0:V.afterOutsideRef.current,Cs(C),Cs(S),Q?E:null].filter(we=>we!=null),He=O2(Ce,m||Q);return()=>{He()}},[O,a,E,A,m,J,V,Q,oe,D,_,S,C]),ke(()=>{if(!O||a||!dn(ue))return;const he=nl(ue),ye=zr(he);queueMicrotask(()=>{const de=ae(ue),Ce=re.current,He=typeof Ce=="function"?Ce($.current||""):Ce;if(He===void 0||He===!1)return;let je;He===!0||He===null?je=de[0]||ue:je=Cs(He),je=je||de[0]||ue,!Rt(ue,ye)&&Qf(je,{preventScroll:je===ue})})},[a,O,ue,M,ae,re,$]),ke(()=>{if(a||!ue)return;const he=nl(ue),ye=zr(he);M2(ye);function de(je){if(je.open||(Ye.current=N2(je.nativeEvent,Oe.current)),je.reason===gN&&je.nativeEvent.type==="mouseleave"&&(F.current=!0),je.reason===yE)if(je.nested)F.current=!1;else if(jE(je.nativeEvent)||AE(je.nativeEvent))F.current=!1;else{let Ee=!1;document.createElement("div").focus({get preventScroll(){return Ee=!0,!1}}),Ee?F.current=!1:F.current=!0}}N.on("openchange",de);const Ce=he.createElement("span");Ce.setAttribute("tabindex","-1"),Ce.setAttribute("aria-hidden","true"),Object.assign(Ce.style,dd),ie&&E&&E.insertAdjacentElement("afterend",Ce);function He(){const je=te.current;let Ee=typeof je=="function"?je(Ye.current):je;if(Ee===void 0||Ee===!1)return null;if(Ee===null&&(Ee=!0),typeof Ee=="boolean"){const we=E||xg();return we&&we.isConnected?we:Ce}const ve=E||xg()||Ce;return Cs(Ee)||ve}return()=>{N.off("openchange",de);const je=zr(he),Ee=Rt(A,je)||oe&&Ka(oe.nodesRef.current,D(),!1).some(we=>{var xe;return Rt((xe=we.context)==null?void 0:xe.elements.floating,je)}),ve=He();queueMicrotask(()=>{const we=z2(ve),xe=typeof te.current!="boolean";te.current&&!F.current&&dn(we)&&(!(!xe&&we!==je&&je!==he.body)||Ee)&&we.focus({preventScroll:!0}),Ce.remove()})}},[a,A,ue,te,L,N,oe,ie,E,D]),x.useEffect(()=>{queueMicrotask(()=>{F.current=!1})},[a]),x.useEffect(()=>{if(a||!O)return;function he(de){const Ce=Pn(de);Ce!=null&&Ce.closest(`[${JA}]`)&&(se.current=!0)}const ye=nl(ue);return ye.addEventListener("pointerdown",he,!0),()=>{ye.removeEventListener("pointerdown",he,!0)}},[a,O,ue]),ke(()=>{if(!a&&V)return V.setFocusManagerState({modal:m,closeOnFocusOut:g,open:O,onOpenChange:j.setOpen,domReference:E}),()=>{V.setFocusManagerState(null)}},[a,V,m,O,j,g,E]),ke(()=>{if(!(a||!ue))return nS(ue,J),()=>{queueMicrotask(Lp)}},[a,ue,J]);const Se=!a&&(m?!Q:!0)&&(ie||m);return p.jsxs(x.Fragment,{children:[Se&&p.jsx(rd,{"data-type":"inside",ref:pe,onFocus:he=>{var ye;if(m){const de=ae();Qf(de[de.length-1])}else if(V!=null&&V.portalNode)if(F.current=!1,zu(he,V.portalNode)){const de=QE(E);de==null||de.focus()}else(ye=Cs(C??V.beforeOutsideRef))==null||ye.focus()}}),s,Se&&p.jsx(rd,{"data-type":"inside",ref:Ke,onFocus:he=>{var ye;if(m)Qf(ae()[0]);else if(V!=null&&V.portalNode)if(g&&(F.current=!0),zu(he,V.portalNode)){const de=KE(E);de==null||de.focus()}else(ye=Cs(S??V.afterOutsideRef))==null||ye.focus()}})]})}function Hp(n,i={}){const s="rootStore"in n?n.rootStore:n,a=s.context.dataRef,{enabled:c=!0,event:f="click",toggle:d=!0,ignoreMouse:h=!1,stickIfOpen:m=!0,touchOpenDelay:g=0}=i,v=x.useRef(void 0),b=vd(),S=El(),C=x.useMemo(()=>({onPointerDown(T){v.current=T.pointerType},onMouseDown(T){const R=v.current,j=T.nativeEvent,O=s.select("open");if(T.button!==0||f==="click"||F0(R)&&h)return;const E=a.current.openEvent,A=E==null?void 0:E.type,N=s.select("domReferenceElement")!==T.currentTarget,L=O&&N||!(O&&d&&(!(E&&m)||A==="click"||A==="mousedown"));if(OE(j.target)){const _=We(Mu,j,j.target);L&&R==="touch"&&g>0?S.start(g,()=>{s.setOpen(!0,_)}):s.setOpen(L,_);return}const D=T.currentTarget;b.request(()=>{const _=We(Mu,j,D);L&&R==="touch"&&g>0?S.start(g,()=>{s.setOpen(!0,_)}):s.setOpen(L,_)})},onClick(T){if(f==="mousedown-only")return;const R=v.current;if(f==="mousedown"&&R){v.current=void 0;return}if(F0(R)&&h)return;const j=s.select("open"),O=a.current.openEvent,E=s.select("domReferenceElement")!==T.currentTarget,A=j&&E||!(j&&d&&(!(O&&m)||NE(O))),N=We(Mu,T.nativeEvent,T.currentTarget);A&&R==="touch"&&g>0?S.start(g,()=>{s.setOpen(!0,N)}):s.setOpen(A,N)},onKeyDown(){v.current=void 0}}),[a,f,h,s,m,d,b,S,g]);return x.useMemo(()=>c?{reference:C}:fn,[c,C])}function lS(n,i,s){let{reference:a,floating:c}=n;const f=Hl(i),d=_p(i),h=Dp(d),m=Il(i),g=f==="y",v=a.x+a.width/2-c.width/2,b=a.y+a.height/2-c.height/2,S=a[h]/2-c[h]/2;let C;switch(m){case"top":C={x:v,y:a.y-c.height};break;case"bottom":C={x:v,y:a.y+a.height};break;case"right":C={x:a.x+a.width,y:b};break;case"left":C={x:a.x-c.width,y:b};break;default:C={x:a.x,y:a.y}}const T=$r(i);return T&&(C[d]+=S*(T==="end"?1:-1)*(s&&g?-1:1)),C}async function _2(n,i){var s;i===void 0&&(i={});const{x:a,y:c,platform:f,rects:d,elements:h,strategy:m}=n,{boundary:g="clippingAncestors",rootBoundary:v="viewport",elementContext:b="floating",altBoundary:S=!1,padding:C=0}=Ki(i,n),T=zE(C),j=h[S?b==="floating"?"reference":"floating":b],O=ed(await f.getClippingRect({element:(s=await(f.isElement==null?void 0:f.isElement(j)))==null||s?j:j.contextElement||await(f.getDocumentElement==null?void 0:f.getDocumentElement(h.floating)),boundary:g,rootBoundary:v,strategy:m})),E=b==="floating"?{x:a,y:c,width:d.floating.width,height:d.floating.height}:d.reference,A=await(f.getOffsetParent==null?void 0:f.getOffsetParent(h.floating)),N=await(f.isElement==null?void 0:f.isElement(A))&&await(f.getScale==null?void 0:f.getScale(A))||{x:1,y:1},L=ed(f.convertOffsetParentRelativeRectToViewportRelativeRect?await f.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:E,offsetParent:A,strategy:m}):E);return{top:(O.top-L.top+T.top)/N.y,bottom:(L.bottom-O.bottom+T.bottom)/N.y,left:(O.left-L.left+T.left)/N.x,right:(L.right-O.right+T.right)/N.x}}const k2=50,L2=async(n,i,s)=>{const{placement:a="bottom",strategy:c="absolute",middleware:f=[],platform:d}=s,h=d.detectOverflow?d:{...d,detectOverflow:_2},m=await(d.isRTL==null?void 0:d.isRTL(i));let g=await d.getElementRects({reference:n,floating:i,strategy:c}),{x:v,y:b}=lS(g,a,m),S=a,C=0;const T={};for(let R=0;R<f.length;R++){const j=f[R];if(!j)continue;const{name:O,fn:E}=j,{x:A,y:N,data:L,reset:D}=await E({x:v,y:b,initialPlacement:a,placement:S,strategy:c,middlewareData:T,rects:g,platform:h,elements:{reference:n,floating:i}});v=A??v,b=N??b,T[O]={...T[O],...L},D&&C<k2&&(C++,typeof D=="object"&&(D.placement&&(S=D.placement),D.rects&&(g=D.rects===!0?await d.getElementRects({reference:n,floating:i,strategy:c}):D.rects),{x:v,y:b}=lS(g,S,m)),R=-1)}return{x:v,y:b,placement:S,strategy:c,middlewareData:T}},U2=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(i){var s,a;const{placement:c,middlewareData:f,rects:d,initialPlacement:h,platform:m,elements:g}=i,{mainAxis:v=!0,crossAxis:b=!0,fallbackPlacements:S,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:R=!0,...j}=Ki(n,i);if((s=f.arrow)!=null&&s.alignmentOffset)return{};const O=Il(c),E=Hl(h),A=Il(h)===h,N=await(m.isRTL==null?void 0:m.isRTL(g.floating)),L=S||(A||!R?[Wf(h)]:t2(h)),D=T!=="none";!S&&D&&L.push(...r2(h,R,T,N));const _=[h,...L],M=await m.detectOverflow(i,j),Q=[];let J=((a=f.flip)==null?void 0:a.overflows)||[];if(v&&Q.push(M[O]),b){const oe=e2(c,d,N);Q.push(M[oe[0]],M[oe[1]])}if(J=[...J,{placement:c,overflows:Q}],!Q.every(oe=>oe<=0)){var re,te;const oe=(((re=f.flip)==null?void 0:re.index)||0)+1,V=_[oe];if(V&&(!(b==="alignment"?E!==Hl(V):!1)||J.every(F=>Hl(F.placement)===E?F.overflows[0]>0:!0)))return{data:{index:oe,overflows:J},reset:{placement:V}};let H=(te=J.filter(ne=>ne.overflows[0]<=0).sort((ne,F)=>ne.overflows[1]-F.overflows[1])[0])==null?void 0:te.placement;if(!H)switch(C){case"bestFit":{var $;const ne=($=J.filter(F=>{if(D){const se=Hl(F.placement);return se===E||se==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(se=>se>0).reduce((se,K)=>se+K,0)]).sort((F,se)=>F[1]-se[1])[0])==null?void 0:$[0];ne&&(H=ne);break}case"initialPlacement":H=h;break}if(c!==H)return{reset:{placement:H}}}return{}}}};function iS(n,i){return{top:n.top-i.height,right:n.right-i.width,bottom:n.bottom-i.height,left:n.left-i.width}}function rS(n){return $N.some(i=>n[i]>=0)}const H2=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(i){const{rects:s,platform:a}=i,{strategy:c="referenceHidden",...f}=Ki(n,i);switch(c){case"referenceHidden":{const d=await a.detectOverflow(i,{...f,elementContext:"reference"}),h=iS(d,s.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:rS(h)}}}case"escaped":{const d=await a.detectOverflow(i,{...f,altBoundary:!0}),h=iS(d,s.floating);return{data:{escapedOffsets:h,escaped:rS(h)}}}default:return{}}}}},JE=new Set(["left","top"]);async function I2(n,i){const{placement:s,platform:a,elements:c}=n,f=await(a.isRTL==null?void 0:a.isRTL(c.floating)),d=Il(s),h=$r(s),m=Hl(s)==="y",g=JE.has(d)?-1:1,v=f&&m?-1:1,b=Ki(i,n);let{mainAxis:S,crossAxis:C,alignmentAxis:T}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return h&&typeof T=="number"&&(C=h==="end"?T*-1:T),m?{x:C*v,y:S*g}:{x:S*g,y:C*v}}const V2=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(i){var s,a;const{x:c,y:f,placement:d,middlewareData:h}=i,m=await I2(i,n);return d===((s=h.offset)==null?void 0:s.placement)&&(a=h.arrow)!=null&&a.alignmentOffset?{}:{x:c+m.x,y:f+m.y,data:{...m,placement:d}}}}},B2=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(i){const{x:s,y:a,placement:c,platform:f}=i,{mainAxis:d=!0,crossAxis:h=!1,limiter:m={fn:E=>{let{x:A,y:N}=E;return{x:A,y:N}}},...g}=Ki(n,i),v={x:s,y:a},b=await f.detectOverflow(i,g),S=Hl(c),C=zp(S);let T=v[C],R=v[S];const j=(E,A)=>ME(A+b[E==="y"?"top":"left"],A,A-b[E==="y"?"bottom":"right"]);d&&(T=j(C,T)),h&&(R=j(S,R));const O=m.fn({...i,[C]:T,[S]:R});return{...O,data:{x:O.x-s,y:O.y-a,enabled:{[C]:d,[S]:h}}}}}},q2=function(n){return n===void 0&&(n={}),{options:n,fn(i){var s,a;const{x:c,y:f,placement:d,rects:h,middlewareData:m}=i,{offset:g=0,mainAxis:v=!0,crossAxis:b=!0}=Ki(n,i),S={x:c,y:f},C=Hl(d),T=zp(C);let R=S[T],j=S[C];const O=Ki(g,i),E=typeof O=="number"?{mainAxis:O,crossAxis:0}:{mainAxis:(s=O.mainAxis)!=null?s:0,crossAxis:(a=O.crossAxis)!=null?a:0};if(v){const L=T==="y"?"height":"width",D=h.reference[T]-h.floating[L]+E.mainAxis,_=h.reference[T]+h.reference[L]-E.mainAxis;R<D?R=D:R>_&&(R=_)}if(b){var A,N;const L=T==="y"?"width":"height",D=JE.has(Il(d)),_=h.reference[C]-h.floating[L]+(D&&((A=m.offset)==null?void 0:A[C])||0)+(D?0:E.crossAxis),M=h.reference[C]+h.reference[L]+(D?0:((N=m.offset)==null?void 0:N[C])||0)-(D?E.crossAxis:0);j<_?j=_:j>M&&(j=M)}return{[T]:R,[C]:j}}}},P2=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(i){const{placement:s,rects:a,platform:c,elements:f}=i,{apply:d=()=>{},...h}=Ki(n,i),m=await c.detectOverflow(i,h),g=Il(s),v=$r(s),b=Hl(s)==="y",{width:S,height:C}=a.floating;let T,R;g==="top"||g==="bottom"?(T=g,R=v===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(R=g,T=v==="end"?"top":"bottom");const j=C-m.top-m.bottom,O=S-m.left-m.right,E=po(C-m[T],j),A=po(S-m[R],O),N=i.middlewareData.shift,L=!N;let D=E,_=A;N!=null&&N.enabled.x&&(_=O),N!=null&&N.enabled.y&&(D=j),L&&!v&&(b?_=S-2*Pi(m.left,m.right):D=C-2*Pi(m.top,m.bottom)),await d({...i,availableWidth:_,availableHeight:D});const M=await c.getDimensions(f.floating);return S!==M.width||C!==M.height?{reset:{rects:!0}}:{}}}};function $E(n){const i=Vl(n);let s=parseFloat(i.width)||0,a=parseFloat(i.height)||0;const c=dn(n),f=c?n.offsetWidth:s,d=c?n.offsetHeight:a,h=$f(s)!==f||$f(a)!==d;return h&&(s=f,a=d),{width:s,height:a,$:h}}function Ip(n){return Vt(n)?n:n.contextElement}function Za(n){const i=Ip(n);if(!dn(i))return Gi(1);const s=i.getBoundingClientRect(),{width:a,height:c,$:f}=$E(i);let d=(f?$f(s.width):s.width)/a,h=(f?$f(s.height):s.height)/c;return(!d||!Number.isFinite(d))&&(d=1),(!h||!Number.isFinite(h))&&(h=1),{x:d,y:h}}const G2=Gi(0);function WE(n){const i=hn(n);return!pd()||!i.visualViewport?G2:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function Y2(n,i,s){return i===void 0&&(i=!1),!!s&&i&&s===hn(n)}function Gs(n,i,s,a){i===void 0&&(i=!1),s===void 0&&(s=!1);const c=n.getBoundingClientRect(),f=Ip(n);let d=Gi(1);i&&(a?Vt(a)&&(d=Za(a)):d=Za(n));const h=Y2(f,s,a)?WE(f):Gi(0);let m=(c.left+h.x)/d.x,g=(c.top+h.y)/d.y,v=c.width/d.x,b=c.height/d.y;if(f&&a){const S=hn(f),C=Vt(a)?hn(a):a;let T=S,R=Xg(T);for(;R&&C!==T;){const j=Za(R),O=R.getBoundingClientRect(),E=Vl(R),A=O.left+(R.clientLeft+parseFloat(E.paddingLeft))*j.x,N=O.top+(R.clientTop+parseFloat(E.paddingTop))*j.y;m*=j.x,g*=j.y,v*=j.x,b*=j.y,m+=A,g+=N,T=hn(R),R=Xg(T)}}return ed({width:v,height:b,x:m,y:g})}function Rd(n,i){const s=yd(n).scrollLeft;return i?i.left+s:Gs($i(n)).left+s}function eR(n,i){const s=n.getBoundingClientRect(),a=s.left+i.scrollLeft-Rd(n,s),c=s.top+i.scrollTop;return{x:a,y:c}}function Q2(n){let{elements:i,rect:s,offsetParent:a,strategy:c}=n;const f=c==="fixed",d=$i(a),h=i?gd(i.floating):!1;if(a===d||h&&f)return s;let m={scrollLeft:0,scrollTop:0},g=Gi(1);const v=Gi(0),b=dn(a);if((b||!f)&&((Jr(a)!=="body"||So(d))&&(m=yd(a)),b)){const C=Gs(a);g=Za(a),v.x=C.x+a.clientLeft,v.y=C.y+a.clientTop}const S=d&&!b&&!f?eR(d,m):Gi(0);return{width:s.width*g.x,height:s.height*g.y,x:s.x*g.x-m.scrollLeft*g.x+v.x+S.x,y:s.y*g.y-m.scrollTop*g.y+v.y+S.y}}function K2(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function F2(n){const i=yd(n),s=n.ownerDocument.body,a=Pi(n.scrollWidth,n.clientWidth,s.scrollWidth,s.clientWidth),c=Pi(n.scrollHeight,n.clientHeight,s.scrollHeight,s.clientHeight);let f=-i.scrollLeft+Rd(n);const d=-i.scrollTop;return Vl(s).direction==="rtl"&&(f+=Pi(n.clientWidth,s.clientWidth)-a),{width:a,height:c,x:f,y:d}}const X2=25;function Z2(n,i,s){s===void 0&&(s="viewport");const a=s==="layoutViewport",c=hn(n),f=$i(n),d=c.visualViewport;let h=f.clientWidth,m=f.clientHeight,g=0,v=0;if(d){const S=!pd()||i==="fixed";a?S||(g=-d.offsetLeft,v=-d.offsetTop):(h=d.width,m=d.height,S&&(g=d.offsetLeft,v=d.offsetTop))}if(Rd(f)<=0){const S=f.ownerDocument,C=S.body,T=getComputedStyle(C),R=S.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,j=Math.abs(f.clientWidth-C.clientWidth-R),O=getComputedStyle(f).scrollbarGutter==="stable both-edges"?j/2:j;O<=X2&&(h-=O)}return{width:h,height:m,x:g,y:v}}function J2(n,i){const s=Gs(n,!0,i==="fixed"),a=s.top+n.clientTop,c=s.left+n.clientLeft,f=Za(n),d=n.clientWidth*f.x,h=n.clientHeight*f.y,m=c*f.x,g=a*f.y;return{width:d,height:h,x:m,y:g}}function sS(n,i,s){let a;if(i==="viewport"||i==="layoutViewport")a=Z2(n,s,i);else if(i==="document")a=F2($i(n));else if(Vt(i))a=J2(i,s);else{const c=WE(n);a={x:i.x-c.x,y:i.y-c.y,width:i.width,height:i.height}}return ed(a)}function $2(n,i){const s=i.get(n);if(s)return s;let a=Pr(n,[],!1).filter(h=>Vt(h)&&Jr(h)!=="body"),c=null;const f=Vl(n).position==="fixed";let d=f?Fr(n):n;for(;Vt(d)&&!qr(d);){const h=Vl(d),m=Tp(d),g=c?c.position:f?"fixed":"";!m&&(g==="fixed"||g==="absolute"&&h.position==="static")?a=a.filter(b=>b!==d):c=h,d=Fr(d)}return i.set(n,a),a}function W2(n){let{element:i,boundary:s,rootBoundary:a,strategy:c}=n;const d=[...s==="clippingAncestors"?gd(i)?[]:$2(i,this._c):[].concat(s),a],h=sS(i,d[0],c);let m=h.top,g=h.right,v=h.bottom,b=h.left;for(let S=1;S<d.length;S++){const C=sS(i,d[S],c);m=Pi(C.top,m),g=po(C.right,g),v=po(C.bottom,v),b=Pi(C.left,b)}return{width:g-b,height:v-m,x:b,y:m}}function eM(n){const{width:i,height:s}=$E(n);return{width:i,height:s}}function tM(n,i,s){const a=dn(i),c=$i(i),f=s==="fixed",d=Gs(n,!0,f,i);let h={scrollLeft:0,scrollTop:0};const m=Gi(0);if((a||!f)&&((Jr(i)!=="body"||So(c))&&(h=yd(i)),a)){const S=Gs(i,!0,f,i);m.x=S.x+i.clientLeft,m.y=S.y+i.clientTop}!a&&c&&(m.x=Rd(c));const g=c&&!a&&!f?eR(c,h):Gi(0),v=d.left+h.scrollLeft-m.x-g.x,b=d.top+h.scrollTop-m.y-g.y;return{x:v,y:b,width:d.width,height:d.height}}function Sg(n){return Vl(n).position==="static"}function aS(n,i){if(!dn(n)||Vl(n).position==="fixed")return null;if(i)return i(n);let s=n.offsetParent;return $i(n)===s&&(s=s.ownerDocument.body),s}function tR(n,i){const s=hn(n);if(gd(n))return s;if(!dn(n)){let c=Fr(n);for(;c&&!qr(c);){if(Vt(c)&&!Sg(c))return c;c=Fr(c)}return s}let a=aS(n,i);for(;a&&iN(a)&&Sg(a);)a=aS(a,i);return a&&qr(a)&&Sg(a)&&!Tp(a)?s:a||aN(n)||s}const nM=async function(n){const i=this.getOffsetParent||tR,s=this.getDimensions,a=await s(n.floating);return{reference:tM(n.reference,await i(n.floating),n.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function lM(n){return Vl(n).direction==="rtl"}const iM={convertOffsetParentRelativeRectToViewportRelativeRect:Q2,getDocumentElement:$i,getClippingRect:W2,getOffsetParent:tR,getElementRects:nM,getClientRects:K2,getDimensions:eM,getScale:Za,isElement:Vt,isRTL:lM};function nR(n,i){return n.x===i.x&&n.y===i.y&&n.width===i.width&&n.height===i.height}function rM(n,i,s){let a=null,c;const f=$i(n);function d(){var v;clearTimeout(c),(v=a)==null||v.disconnect(),a=null}function h(v,b){v===void 0&&(v=!1),b===void 0&&(b=1),d();const S=n.getBoundingClientRect(),{left:C,top:T,width:R,height:j}=S;if(v||i(),!R||!j)return;const O=Qa(T),E=Qa(f.clientWidth-(C+R)),A=Qa(f.clientHeight-(T+j)),N=Qa(C),D={rootMargin:-O+"px "+-E+"px "+-A+"px "+-N+"px",threshold:Pi(0,po(1,b))||1};let _=!0;function M(Q){const J=Q[0].intersectionRatio;if(!nR(S,n.getBoundingClientRect()))return h();if(J!==b){if(!_)return h();J?h(!1,J):c=setTimeout(()=>{h(!1,1e-7)},1e3)}_=!1}try{a=new IntersectionObserver(M,{...D,root:f.ownerDocument})}catch{a=new IntersectionObserver(M,D)}a.observe(n)}const m=hn(n),g=()=>h(s);return m.addEventListener("resize",g),h(!0),()=>{m.removeEventListener("resize",g),d()}}function oS(n,i,s,a){a===void 0&&(a={});const{ancestorScroll:c=!0,ancestorResize:f=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:m=!1}=a,g=Ip(n),v=c||f?[...g?Pr(g):[],...i?Pr(i):[]]:[];v.forEach(O=>{c&&O.addEventListener("scroll",s),f&&O.addEventListener("resize",s)});const b=g&&h?rM(g,s,f):null;let S=-1,C=null;d&&(C=new ResizeObserver(O=>{let[E]=O;E&&E.target===g&&C&&i&&(C.unobserve(i),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var A;(A=C)==null||A.observe(i)})),s()}),g&&!m&&C.observe(g),i&&C.observe(i));let T,R=m?Gs(n):null;m&&j();function j(){const O=Gs(n);R&&!nR(R,O)&&s(),R=O,T=requestAnimationFrame(j)}return s(),()=>{var O;v.forEach(E=>{c&&E.removeEventListener("scroll",s),f&&E.removeEventListener("resize",s)}),b==null||b(),(O=C)==null||O.disconnect(),C=null,m&&cancelAnimationFrame(T)}}const sM=V2,aM=B2,oM=U2,uM=P2,cM=H2,fM=q2,dM=(n,i,s)=>{const a=new Map,c=s??{},f={...iM,...c.platform,_c:a};return L2(n,i,{...c,platform:f})};var hM=typeof document<"u",mM=function(){},Kf=hM?x.useLayoutEffect:mM;function sd(n,i){if(n===i)return!0;if(typeof n!=typeof i)return!1;if(typeof n=="function"&&n.toString()===i.toString())return!0;let s,a,c;if(n&&i&&typeof n=="object"){if(Array.isArray(n)){if(s=n.length,s!==i.length)return!1;for(a=s;a--!==0;)if(!sd(n[a],i[a]))return!1;return!0}if(c=Object.keys(n),s=c.length,s!==Object.keys(i).length)return!1;for(a=s;a--!==0;)if(!{}.hasOwnProperty.call(i,c[a]))return!1;for(a=s;a--!==0;){const f=c[a];if(!(f==="_owner"&&n.$$typeof)&&!sd(n[f],i[f]))return!1}return!0}return n!==n&&i!==i}function lR(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function uS(n,i){const s=lR(n);return Math.round(i*s)/s}function Eg(n){const i=x.useRef(n);return Kf(()=>{i.current=n}),i}function gM(n){n===void 0&&(n={});const{placement:i="bottom",strategy:s="absolute",middleware:a=[],platform:c,elements:{reference:f,floating:d}={},transform:h=!0,whileElementsMounted:m,open:g}=n,[v,b]=x.useState({x:0,y:0,strategy:s,placement:i,middlewareData:{},isPositioned:!1}),[S,C]=x.useState(a);sd(S,a)||C(a);const[T,R]=x.useState(null),[j,O]=x.useState(null),E=x.useCallback(F=>{F!==D.current&&(D.current=F,R(F))},[]),A=x.useCallback(F=>{F!==_.current&&(_.current=F,O(F))},[]),N=f||T,L=d||j,D=x.useRef(null),_=x.useRef(null),M=x.useRef(v),Q=m!=null,J=Eg(m),re=Eg(c),te=Eg(g),$=x.useCallback(()=>{if(!D.current||!_.current)return;const F={placement:i,strategy:s,middleware:S};re.current&&(F.platform=re.current),dM(D.current,_.current,F).then(se=>{const K={...se,isPositioned:te.current!==!1};oe.current&&!sd(M.current,K)&&(M.current=K,Qi.flushSync(()=>{b(K)}))})},[S,i,s,re,te]);Kf(()=>{g===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,b(F=>({...F,isPositioned:!1})))},[g]);const oe=x.useRef(!1);Kf(()=>(oe.current=!0,()=>{oe.current=!1}),[]),Kf(()=>{if(N&&(D.current=N),L&&(_.current=L),N&&L){if(J.current)return J.current(N,L,$);$()}},[N,L,$,J,Q]);const V=x.useMemo(()=>({reference:D,floating:_,setReference:E,setFloating:A}),[E,A]),H=x.useMemo(()=>({reference:N,floating:L}),[N,L]),ne=x.useMemo(()=>{const F={position:s,left:0,top:0};if(!H.floating)return F;const se=uS(H.floating,v.x),K=uS(H.floating,v.y);return h?{...F,transform:"translate("+se+"px, "+K+"px)",...lR(H.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:se,top:K}},[s,h,H.floating,v.x,v.y]);return x.useMemo(()=>({...v,update:$,refs:V,elements:H,floatingStyles:ne}),[v,$,V,H,ne])}const pM=(n,i)=>{const s=sM(n);return{name:s.name,fn:s.fn,options:[n,i]}},yM=(n,i)=>{const s=aM(n);return{name:s.name,fn:s.fn,options:[n,i]}},bM=(n,i)=>({fn:fM(n).fn,options:[n,i]}),vM=(n,i)=>{const s=oM(n);return{name:s.name,fn:s.fn,options:[n,i]}},xM=(n,i)=>{const s=uM(n);return{name:s.name,fn:s.fn,options:[n,i]}},SM=(n,i)=>{const s=cM(n);return{name:s.name,fn:s.fn,options:[n,i]}},EM={intentional:"onClick",sloppy:"onPointerDown"};function RM(n){return{escapeKey:typeof n=="boolean"?n:(n==null?void 0:n.escapeKey)??!1,outsidePress:typeof n=="boolean"?n:(n==null?void 0:n.outsidePress)??!0}}function Vp(n,i={}){const s="rootStore"in n?n.rootStore:n,a=s.useState("open"),c=s.useState("floatingElement"),f=s.useState("referenceElement"),d=s.useState("domReferenceElement"),{onOpenChange:h,dataRef:m}=s.context,{enabled:g=!0,escapeKey:v=!0,outsidePress:b=!0,outsidePressEvent:S="sloppy",referencePress:C=!1,referencePressEvent:T="sloppy",ancestorScroll:R=!1,bubbles:j,externalTree:O}=i,E=Ed(O),A=_e(typeof b=="function"?b:()=>!1),N=typeof b=="function"?A:b,L=x.useRef(!1),{escapeKey:D,outsidePress:_}=RM(j),M=x.useRef(null),Q=El(),J=El(),re=_e(()=>{J.clear(),m.current.insideReactTree=!1}),te=x.useRef(!1),$=x.useRef(""),oe=_e(q=>{$.current=q.pointerType}),V=_e(()=>{const q=$.current,le=q==="pen"||!q?"mouse":q,pe=typeof S=="function"?S():S;return typeof pe=="string"?pe:pe[le]}),H=_e(q=>{var he;if(!a||!g||!v||q.key!=="Escape"||te.current)return;const le=(he=m.current.floatingContext)==null?void 0:he.nodeId,pe=E?Ka(E.nodesRef.current,le):[];if(!D&&pe.length>0){let ye=!0;if(pe.forEach(de=>{var Ce;(Ce=de.context)!=null&&Ce.open&&!de.context.dataRef.current.__escapeKeyBubbles&&(ye=!1)}),!ye)return}const Ke=JN(q)?q.nativeEvent:q,Se=We(bE,Ke);s.setOpen(!1,Se),!D&&!Se.isPropagationAllowed&&q.stopPropagation()}),ne=_e(q=>{const le=V();return le==="intentional"&&q.type!=="click"||le==="sloppy"&&q.type==="click"}),F=_e(()=>{m.current.insideReactTree=!0,J.start(0,re)}),se=_e((q,le=!1)=>{var je;if(ne(q)){re();return}if(m.current.insideReactTree){re();return}if(V()==="intentional"&&le||typeof N=="function"&&!N(q))return;const pe=Pn(q),Ke=`[${id("inert")}]`,Se=nl(s.select("floatingElement")).querySelectorAll(Ke),he=s.context.triggerElements;if(pe&&(he.hasElement(pe)||he.hasMatchingElement(Ee=>Rt(Ee,pe))))return;let ye=Vt(pe)?pe:null;for(;ye&&!qr(ye);){const Ee=Fr(ye);if(qr(Ee)||!Vt(Ee))break;ye=Ee}if(Se.length&&Vt(pe)&&!ZN(pe)&&!Rt(pe,s.select("floatingElement"))&&Array.from(Se).every(Ee=>!Rt(ye,Ee)))return;if(dn(pe)&&!("touches"in q)){const Ee=qr(pe),ve=Vl(pe),we=/auto|scroll/,xe=Ee||we.test(ve.overflowX),Xe=Ee||we.test(ve.overflowY),$e=xe&&pe.clientWidth>0&&pe.scrollWidth>pe.clientWidth,Ve=Xe&&pe.clientHeight>0&&pe.scrollHeight>pe.clientHeight,Ze=ve.direction==="rtl",lt=Ve&&(Ze?q.offsetX<=pe.offsetWidth-pe.clientWidth:q.offsetX>pe.clientWidth),St=$e&&q.offsetY>pe.clientHeight;if(lt||St)return}const de=(je=m.current.floatingContext)==null?void 0:je.nodeId,Ce=E&&Ka(E.nodesRef.current,de).some(Ee=>{var ve;return Zl(q,(ve=Ee.context)==null?void 0:ve.elements.floating)});if(Zl(q,s.select("floatingElement"))||Zl(q,s.select("domReferenceElement"))||Ce)return;const He=E?Ka(E.nodesRef.current,de):[];if(He.length>0){let Ee=!0;if(He.forEach(ve=>{var we;(we=ve.context)!=null&&we.open&&!ve.context.dataRef.current.__outsidePressBubbles&&(Ee=!1)}),!Ee)return}s.setOpen(!1,We(yE,q)),re()}),K=_e(q=>{V()!=="sloppy"||q.pointerType==="touch"||!s.select("open")||!g||Zl(q,s.select("floatingElement"))||Zl(q,s.select("domReferenceElement"))||se(q)}),Re=_e(q=>{if(V()!=="sloppy"||!s.select("open")||!g||Zl(q,s.select("floatingElement"))||Zl(q,s.select("domReferenceElement")))return;const le=q.touches[0];le&&(M.current={startTime:Date.now(),startX:le.clientX,startY:le.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},Q.start(1e3,()=>{M.current&&(M.current.dismissOnTouchEnd=!1,M.current.dismissOnMouseDown=!1)}))}),Ye=_e(q=>{const le=Pn(q);function pe(){Re(q),le==null||le.removeEventListener(q.type,pe)}le==null||le.addEventListener(q.type,pe)}),Oe=_e(q=>{const le=L.current;if(L.current=!1,Q.clear(),q.type==="mousedown"&&M.current&&!M.current.dismissOnMouseDown)return;const pe=Pn(q);function Ke(){q.type==="pointerdown"?K(q):se(q,le),pe==null||pe.removeEventListener(q.type,Ke)}pe==null||pe.addEventListener(q.type,Ke)}),z=_e(q=>{if(V()!=="sloppy"||!M.current||Zl(q,s.select("floatingElement"))||Zl(q,s.select("domReferenceElement")))return;const le=q.touches[0];if(!le)return;const pe=Math.abs(le.clientX-M.current.startX),Ke=Math.abs(le.clientY-M.current.startY),Se=Math.sqrt(pe*pe+Ke*Ke);Se>5&&(M.current.dismissOnTouchEnd=!0),Se>10&&(se(q),Q.clear(),M.current=null)}),B=_e(q=>{const le=Pn(q);function pe(){z(q),le==null||le.removeEventListener(q.type,pe)}le==null||le.addEventListener(q.type,pe)}),W=_e(q=>{V()!=="sloppy"||!M.current||Zl(q,s.select("floatingElement"))||Zl(q,s.select("domReferenceElement"))||(M.current.dismissOnTouchEnd&&se(q),Q.clear(),M.current=null)}),ie=_e(q=>{const le=Pn(q);function pe(){W(q),le==null||le.removeEventListener(q.type,pe)}le==null||le.addEventListener(q.type,pe)});x.useEffect(()=>{if(!a||!g)return;m.current.__escapeKeyBubbles=D,m.current.__outsidePressBubbles=_;const q=new go;function le(ye){s.setOpen(!1,We(dl,ye))}function pe(){q.clear(),te.current=!0}function Ke(){q.start(pd()?5:0,()=>{te.current=!1})}const Se=nl(c);Se.addEventListener("pointerdown",oe,!0),v&&(Se.addEventListener("keydown",H),Se.addEventListener("compositionstart",pe),Se.addEventListener("compositionend",Ke)),N&&(Se.addEventListener("click",Oe,!0),Se.addEventListener("pointerdown",Oe,!0),Se.addEventListener("touchstart",Ye,!0),Se.addEventListener("touchmove",B,!0),Se.addEventListener("touchend",ie,!0),Se.addEventListener("mousedown",Oe,!0));let he=[];return R&&(Vt(d)&&(he=Pr(d)),Vt(c)&&(he=he.concat(Pr(c))),!Vt(f)&&f&&f.contextElement&&(he=he.concat(Pr(f.contextElement)))),he=he.filter(ye=>{var de;return ye!==((de=Se.defaultView)==null?void 0:de.visualViewport)}),he.forEach(ye=>{ye.addEventListener("scroll",le,{passive:!0})}),()=>{Se.removeEventListener("pointerdown",oe,!0),v&&(Se.removeEventListener("keydown",H),Se.removeEventListener("compositionstart",pe),Se.removeEventListener("compositionend",Ke)),N&&(Se.removeEventListener("click",Oe,!0),Se.removeEventListener("pointerdown",Oe,!0),Se.removeEventListener("touchstart",Ye,!0),Se.removeEventListener("touchmove",B,!0),Se.removeEventListener("touchend",ie,!0),Se.removeEventListener("mousedown",Oe,!0)),he.forEach(ye=>{ye.removeEventListener("scroll",le)}),q.clear()}},[m,c,f,d,v,N,a,h,R,g,D,_,H,se,Oe,K,Ye,B,ie,oe,s]),x.useEffect(re,[N,re]);const ue=x.useMemo(()=>({onKeyDown:H,...C&&{[EM[T]]:q=>{s.setOpen(!1,We(Mu,q.nativeEvent))},...T!=="intentional"&&{onClick(q){s.setOpen(!1,We(Mu,q.nativeEvent))}}}}),[H,s,C,T]),me=_e(q=>{const le=Pn(q.nativeEvent);!Rt(s.select("floatingElement"),le)||q.button!==0||(L.current=!0)}),ae=x.useMemo(()=>({onKeyDown:H,onPointerDown:me,onMouseDown:me,onMouseUp:me,onClickCapture:F,onMouseDownCapture:F,onPointerDownCapture:F,onMouseUpCapture:F,onTouchEndCapture:F,onTouchMoveCapture:F}),[H,me,F]);return x.useMemo(()=>g?{reference:ue,floating:ae,trigger:ue}:{},[g,ue,ae])}const wM={open:ge(n=>n.open),domReferenceElement:ge(n=>n.domReferenceElement),referenceElement:ge(n=>n.positionReference??n.referenceElement),floatingElement:ge(n=>n.floatingElement),floatingId:ge(n=>n.floatingId)};class Bp extends SE{constructor(s){const{nested:a,noEmit:c,onOpenChange:f,triggerElements:d,...h}=s;super({...h,positionReference:h.referenceElement,domReferenceElement:h.referenceElement},{onOpenChange:f,dataRef:{current:{}},events:E2(),nested:a,noEmit:c,triggerElements:d},wM);Nt(this,"setOpen",(s,a)=>{var c,f;if((!s||!this.state.open||NE(a.event))&&(this.context.dataRef.current.openEvent=s?a.event:void 0),!this.context.noEmit){const d={open:s,reason:a.reason,nativeEvent:a.event,nested:this.context.nested,triggerElement:a.trigger};this.context.events.emit("openchange",d)}(f=(c=this.context).onOpenChange)==null||f.call(c,s,a)})}}function wd(n,i=!1,s=!1){const[a,c]=x.useState(n&&i?"idle":void 0),[f,d]=x.useState(n);return n&&!f&&(d(!0),c("starting")),!n&&f&&a!=="ending"&&!s&&c("ending"),!n&&!f&&a==="ending"&&c(void 0),ke(()=>{if(!n&&f&&a!=="ending"&&s){const h=gi.request(()=>{c("ending")});return()=>{gi.cancel(h)}}},[n,f,a,s]),ke(()=>{if(!n||i)return;const h=gi.request(()=>{Qi.flushSync(()=>{c(void 0)})});return()=>{gi.cancel(h)}},[i,n]),ke(()=>{if(!n||!i)return;n&&f&&a!=="idle"&&c("starting");const h=gi.request(()=>{c("idle")});return()=>{gi.cancel(h)}},[i,n,f,c,a]),x.useMemo(()=>({mounted:f,setMounted:d,transitionStatus:a}),[f,a])}function CM(n,i=!1,s=!0){const a=vd();return _e((c,f=null)=>{a.cancel();const d=Cs(n);d!=null&&(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED?c():a.request(()=>{function h(){d&&Promise.all(d.getAnimations().map(m=>m.finished)).then(()=>{f!=null&&f.aborted||Qi.flushSync(c)}).catch(()=>{if(s){if(f!=null&&f.aborted)return;Qi.flushSync(c)}else d.getAnimations().length>0&&d.getAnimations().some(m=>m.pending||m.playState!=="finished")&&h()})}i?a.request(h):h()}))})}function Fs(n){const{enabled:i=!0,open:s,ref:a,onComplete:c}=n,f=On(s),d=_e(c),h=CM(a,s);x.useEffect(()=>{i&&h(()=>{s===f.current&&d()})},[i,s,d,h,f])}function TM(n){const i=n.useState("open");ke(()=>{if(i&&!n.select("activeTriggerId")&&n.context.triggerElements.size===1){const s=n.context.triggerElements.entries().next();if(!s.done){const[a,c]=s.value;n.update({activeTriggerId:a,activeTriggerElement:c})}}},[i,n])}function OM(n,i,s){const{mounted:a,setMounted:c,transitionStatus:f}=wd(n);i.useSyncedValues({mounted:a,transitionStatus:f});const d=_e(()=>{var m,g;c(!1),i.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),s==null||s(),(g=(m=i.context).onOpenChangeComplete)==null||g.call(m,!1)}),h=i.useState("preventUnmountingOnClose");return Fs({enabled:!h,open:n,ref:i.context.popupRef,onComplete(){n||d()}}),{forceUnmount:d,transitionStatus:f}}class qp{constructor(){this.elements=new Set,this.idMap=new Map}add(i,s){const a=this.idMap.get(i);a!==s&&(a!==void 0&&this.elements.delete(a),this.elements.add(s),this.idMap.set(i,s))}delete(i){const s=this.idMap.get(i);s&&(this.elements.delete(s),this.idMap.delete(i))}hasElement(i){return this.elements.has(i)}hasMatchingElement(i){for(const s of this.elements)if(i(s))return!0;return!1}getById(i){return this.idMap.get(i)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function jM(){return new Bp({open:!1,floatingElement:null,referenceElement:null,triggerElements:new qp,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function AM(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:jM(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:fn,inactiveTriggerProps:fn,popupProps:fn}}const NM={open:ge(n=>n.open),mounted:ge(n=>n.mounted),transitionStatus:ge(n=>n.transitionStatus),floatingRootContext:ge(n=>n.floatingRootContext),preventUnmountingOnClose:ge(n=>n.preventUnmountingOnClose),payload:ge(n=>n.payload),activeTriggerId:ge(n=>n.activeTriggerId),activeTriggerElement:ge(n=>n.mounted?n.activeTriggerElement:null),isTriggerActive:ge((n,i)=>i!==void 0&&n.activeTriggerId===i),isOpenedByTrigger:ge((n,i)=>i!==void 0&&n.activeTriggerId===i&&n.open),isMountedByTrigger:ge((n,i)=>i!==void 0&&n.activeTriggerId===i&&n.mounted),triggerProps:ge((n,i)=>i?n.activeTriggerProps:n.inactiveTriggerProps),popupProps:ge(n=>n.popupProps),popupElement:ge(n=>n.popupElement),positionerElement:ge(n=>n.positionerElement)};function Pp(n){const{open:i=!1,onOpenChange:s,elements:a={}}=n,c=Gu(),f=Sd()!=null,d=hl(()=>new Bp({open:i,onOpenChange:s,referenceElement:a.reference??null,floatingElement:a.floating??null,triggerElements:a.triggers??new qp,floatingId:c,nested:f,noEmit:n.noEmit||!1})).current;return ke(()=>{const h={open:i,floatingId:c};a.reference!==void 0&&(h.referenceElement=a.reference,h.domReferenceElement=Vt(a.reference)?a.reference:null),a.floating!==void 0&&(h.floatingElement=a.floating),d.update(h)},[i,c,a.reference,a.floating,d]),d.context.onOpenChange=s,d.context.nested=f,d.context.noEmit=n.noEmit||!1,d}function MM(n={}){const{nodeId:i,externalTree:s}=n,a=Pp(n),c=n.rootContext||a,f={reference:c.useState("referenceElement"),floating:c.useState("floatingElement"),domReference:c.useState("domReferenceElement")},[d,h]=x.useState(null),m=x.useRef(null),g=Ed(s);ke(()=>{f.domReference&&(m.current=f.domReference)},[f.domReference]);const v=gM({...n,elements:{...f,...d&&{reference:d}}}),b=x.useCallback(_=>{const M=Vt(_)?{getBoundingClientRect:()=>_.getBoundingClientRect(),getClientRects:()=>_.getClientRects(),contextElement:_}:_;h(M),v.refs.setReference(M)},[v.refs]),[S,C]=x.useState(null),[T,R]=x.useState(null);c.useSyncedValue("referenceElement",S),c.useSyncedValue("domReferenceElement",Vt(S)?S:null),c.useSyncedValue("floatingElement",T);const j=x.useCallback(_=>{(Vt(_)||_===null)&&(m.current=_,C(_)),(Vt(v.refs.reference.current)||v.refs.reference.current===null||_!==null&&!Vt(_))&&v.refs.setReference(_)},[v.refs,C]),O=x.useCallback(_=>{R(_),v.refs.setFloating(_)},[v.refs]),E=x.useMemo(()=>({...v.refs,setReference:j,setFloating:O,setPositionReference:b,domReference:m}),[v.refs,j,O,b]),A=x.useMemo(()=>({...v.elements,domReference:f.domReference}),[v.elements,f.domReference]),N=c.useState("open"),L=c.useState("floatingId"),D=x.useMemo(()=>({...v,dataRef:c.context.dataRef,open:N,onOpenChange:c.setOpen,events:c.context.events,floatingId:L,refs:E,elements:A,nodeId:i,rootStore:c}),[v,E,A,i,c,N,L]);return ke(()=>{c.context.dataRef.current.floatingContext=D;const _=g==null?void 0:g.nodesRef.current.find(M=>M.id===i);_&&(_.context=D)}),x.useMemo(()=>({...v,context:D,refs:E,elements:A,rootStore:c}),[v,E,A,D,c])}function zM(n){const{popupStore:i,noEmit:s=!1,treatPopupAsFloatingElement:a=!1,onOpenChange:c}=n,f=Gu(),d=Sd()!=null,h=i.useState("open"),m=i.useState("activeTriggerElement"),g=i.useState(a?"popupElement":"positionerElement"),v=i.context.triggerElements,b=hl(()=>new Bp({open:h,referenceElement:m,floatingElement:g,triggerElements:v,onOpenChange:c,floatingId:f,nested:d,noEmit:s})).current;return ke(()=>{const S={open:h,floatingId:f,referenceElement:m,floatingElement:g};Vt(m)&&(S.domReferenceElement=m),b.update(S)},[h,f,m,g,b]),b.context.onOpenChange=c,b.context.nested=d,b.context.noEmit=s,b}function Gp(n=[]){const i=n.map(g=>g==null?void 0:g.reference),s=n.map(g=>g==null?void 0:g.floating),a=n.map(g=>g==null?void 0:g.item),c=n.map(g=>g==null?void 0:g.trigger),f=x.useCallback(g=>kf(g,n,"reference"),i),d=x.useCallback(g=>kf(g,n,"floating"),s),h=x.useCallback(g=>kf(g,n,"item"),a),m=x.useCallback(g=>kf(g,n,"trigger"),c);return x.useMemo(()=>({getReferenceProps:f,getFloatingProps:d,getItemProps:h,getTriggerProps:m}),[f,d,h,m])}function kf(n,i,s){var d;const a=new Map,c=s==="item",f={};s==="floating"&&(f.tabIndex=-1,f[Zg]="");for(const h in n)c&&n&&(h===CE||h===TE)||(f[h]=n[h]);for(let h=0;h<i.length;h+=1){let m;const g=(d=i[h])==null?void 0:d[s];typeof g=="function"?m=n?g(n):null:m=g,m&&cS(f,m,c,a)}return cS(f,n,c,a),f}function cS(n,i,s,a){var c;for(const f in i){const d=i[f];s&&(f===CE||f===TE)||(f.startsWith("on")?(a.has(f)||a.set(f,[]),typeof d=="function"&&((c=a.get(f))==null||c.push(d),n[f]=(...h)=>{var m;return(m=a.get(f))==null?void 0:m.map(g=>g(...h)).find(g=>g!==void 0)})):n[f]=d)}}const DM="Escape";function Cd(n,i,s){switch(n){case"vertical":return i;case"horizontal":return s;default:return i||s}}function Lf(n,i){return Cd(i,n===Mp||n===Ku,n===Gr||n===Yr)}function Rg(n,i,s){return Cd(i,n===Ku,s?n===Gr:n===Yr)||n==="Enter"||n===" "||n===""}function _M(n,i,s){return Cd(i,s?n===Gr:n===Yr,n===Ku)}function kM(n,i,s,a){const c=s?n===Yr:n===Gr,f=n===Mp;return i==="both"||i==="horizontal"&&a&&a>1?n===DM:Cd(i,c,f)}function iR(n,i){const s="rootStore"in n?n.rootStore:n,a=s.useState("open"),c=s.useState("floatingElement"),f=s.useState("domReferenceElement"),d=s.context.dataRef,{listRef:h,activeIndex:m,onNavigate:g=()=>{},enabled:v=!0,selectedIndex:b=null,allowEscape:S=!1,loopFocus:C=!1,nested:T=!1,rtl:R=!1,virtual:j=!1,focusItemOnOpen:O="auto",focusItemOnHover:E=!0,openOnArrowKeyDown:A=!0,disabledIndices:N=void 0,orientation:L="vertical",parentOrientation:D,cols:_=1,scrollItemIntoView:M=!0,itemSizes:Q,dense:J=!1,id:re,resetOnPointerLeave:te=!0,externalTree:$}=i,oe=_u(c),V=On(oe),H=Sd(),ne=Ed($);ke(()=>{d.current.orientation=L},[d,L]);const F=Jg(f),se=x.useRef(O),K=x.useRef(b??-1),Re=x.useRef(null),Ye=x.useRef(!0),Oe=_e(ve=>{g(K.current===-1?null:K.current,ve)}),z=x.useRef(Oe),B=x.useRef(!!c),W=x.useRef(a),ie=x.useRef(!1),ue=x.useRef(!1),me=On(N),ae=On(a),q=On(M),le=On(b),pe=On(te),Ke=_e(()=>{function ve($e){j?ne==null||ne.events.emit("virtualfocus",$e):Qf($e,{sync:ie.current,preventScroll:!0})}const we=h.current[K.current],xe=ue.current;we&&ve(we),(ie.current?$e=>$e():requestAnimationFrame)(()=>{var lt;const $e=h.current[K.current]||we;if(!$e)return;we||ve($e);const Ve=q.current;Ve&&he&&(xe||!Ye.current)&&((lt=$e.scrollIntoView)==null||lt.call($e,typeof Ve=="boolean"?{block:"nearest",inline:"nearest"}:Ve))})});ke(()=>{v&&(a&&c?(K.current=b??-1,se.current&&b!=null&&(ue.current=!0,Oe())):B.current&&(K.current=-1,z.current()))},[v,a,c,b,Oe]),ke(()=>{if(v){if(!a){ie.current=!1;return}if(c)if(m==null){if(ie.current=!1,le.current!=null)return;if(B.current&&(K.current=-1,Ke()),(!W.current||!B.current)&&se.current&&(Re.current!=null||se.current===!0&&Re.current==null)){let ve=0;const we=()=>{h.current[0]==null?(ve<2&&(ve?requestAnimationFrame:queueMicrotask)(we),ve+=1):(K.current=Re.current==null||Rg(Re.current,L,R)||T?Yf(h):Wg(h),Re.current=null,Oe())};we()}}else Fa(h,m)||(K.current=m,Ke(),ue.current=!1)}},[v,a,c,m,le,T,h,L,R,Oe,Ke,me]),ke(()=>{var $e,Ve;if(!v||c||!ne||j||!B.current)return;const ve=ne.nodesRef.current,we=(Ve=($e=ve.find(Ze=>Ze.id===H))==null?void 0:$e.context)==null?void 0:Ve.elements.floating,xe=zr(nl(c)),Xe=ve.some(Ze=>Ze.context&&Rt(Ze.context.elements.floating,xe));we&&!Xe&&Ye.current&&we.focus({preventScroll:!0})},[v,c,ne,H,j]),ke(()=>{z.current=Oe,W.current=a,B.current=!!c}),ke(()=>{a||(Re.current=null,se.current=O)},[a,O]);const Se=m!=null,he=x.useMemo(()=>{function ve(xe){if(!ae.current)return;const Xe=h.current.indexOf(xe.currentTarget);Xe!==-1&&K.current!==Xe&&(K.current=Xe,Oe(xe))}return{onFocus(xe){ie.current=!0,ve(xe)},onClick:({currentTarget:xe})=>xe.focus({preventScroll:!0}),onMouseMove(xe){ie.current=!0,ue.current=!1,E&&ve(xe)},onPointerLeave(xe){var $e;if(!ae.current||!Ye.current||xe.pointerType==="touch")return;ie.current=!0;const Xe=xe.relatedTarget;!E||h.current.includes(Xe)||pe.current&&(K.current=-1,Oe(xe),j||($e=V.current)==null||$e.focus({preventScroll:!0}))}}},[ae,V,E,h,Oe,pe,j]),ye=x.useCallback(()=>{var ve,we,xe;return D??((xe=(we=(ve=ne==null?void 0:ne.nodesRef.current.find(Xe=>Xe.id===H))==null?void 0:ve.context)==null?void 0:we.dataRef)==null?void 0:xe.current.orientation)},[H,ne,D]),de=_e(ve=>{if(Ye.current=!1,ie.current=!0,ve.which===229||!ae.current&&ve.currentTarget===V.current)return;if(T&&kM(ve.key,L,R,_)){Lf(ve.key,ye())||sn(ve),s.setOpen(!1,We(Gf,ve.nativeEvent)),dn(f)&&(j?ne==null||ne.events.emit("virtualfocus",f):f.focus());return}const we=K.current,xe=Yf(h,N),Xe=Wg(h,N);if(F||(ve.key==="Home"&&(sn(ve),K.current=xe,Oe(ve)),ve.key==="End"&&(sn(ve),K.current=Xe,Oe(ve))),_>1){const $e=Q||Array.from({length:h.current.length},()=>({width:1,height:1})),Ve=_E($e,_,J),Ze=Ve.findIndex(qt=>qt!=null&&!Qr(h,qt,N)),lt=Ve.reduce((qt,gt,Fe)=>gt!=null&&!Qr(h,gt,N)?Fe:qt,-1),St=Ve[DE({current:Ve.map(qt=>qt!=null?h.current[qt]:null)},{event:ve,orientation:L,loopFocus:C,rtl:R,cols:_,disabledIndices:LE([...(typeof N!="function"?N:null)||h.current.map((qt,gt)=>Qr(h,gt,N)?gt:void 0),void 0],Ve),minIndex:Ze,maxIndex:lt,prevIndex:kE(K.current>Xe?xe:K.current,$e,Ve,_,ve.key===Ku?"bl":ve.key===(R?Gr:Yr)?"tr":"tl"),stopEvent:!0})];if(St!=null&&(K.current=St,Oe(ve)),L==="both")return}if(Lf(ve.key,L)){if(sn(ve),a&&!j&&zr(ve.currentTarget.ownerDocument)===ve.currentTarget){K.current=Rg(ve.key,L,R)?xe:Xe,Oe(ve);return}Rg(ve.key,L,R)?C?we>=Xe?S&&we!==h.current.length?K.current=-1:(ie.current=!1,K.current=xe):K.current=Ln(h,{startingIndex:we,disabledIndices:N}):K.current=Math.min(Xe,Ln(h,{startingIndex:we,disabledIndices:N})):C?we<=xe?S&&we!==-1?K.current=h.current.length:(ie.current=!1,K.current=Xe):K.current=Ln(h,{startingIndex:we,decrement:!0,disabledIndices:N}):K.current=Math.max(xe,Ln(h,{startingIndex:we,decrement:!0,disabledIndices:N})),Fa(h,K.current)&&(K.current=-1),Oe(ve)}}),Ce=x.useMemo(()=>j&&a&&Se&&{"aria-activedescendant":`${re}-${m}`},[j,a,Se,re,m]),He=x.useMemo(()=>({"aria-orientation":L==="both"?void 0:L,...F?{}:Ce,onKeyDown(ve){if(ve.key==="Tab"&&ve.shiftKey&&a&&!j){const we=Pn(ve.nativeEvent);if(we&&!Rt(V.current,we))return;sn(ve),s.setOpen(!1,We(bd,ve.nativeEvent)),dn(f)&&f.focus();return}de(ve)},onPointerMove(){Ye.current=!0}}),[Ce,de,V,L,F,s,a,j,f]),je=x.useMemo(()=>{function ve(xe){O==="auto"&&jE(xe.nativeEvent)&&(se.current=!j)}function we(xe){se.current=O,O==="auto"&&AE(xe.nativeEvent)&&(se.current=!0)}return{onKeyDown(xe){const Xe=s.select("open");Ye.current=!1;const $e=xe.key.startsWith("Arrow"),Ve=_M(xe.key,ye(),R),Ze=Lf(xe.key,L),lt=(T?Ve:Ze)||xe.key==="Enter"||xe.key.trim()==="";if(j&&Xe)return de(xe);if(!(!Xe&&!A&&$e)){if(lt){const St=Lf(xe.key,ye());Re.current=T&&St?null:xe.key}if(T){Ve&&(sn(xe),Xe?(K.current=Yf(h,me.current),Oe(xe)):s.setOpen(!0,We(Gf,xe.nativeEvent,xe.currentTarget)));return}Ze&&(le.current!=null&&(K.current=le.current),sn(xe),!Xe&&A?s.setOpen(!0,We(Gf,xe.nativeEvent,xe.currentTarget)):de(xe),Xe&&Oe(xe))}},onFocus(xe){s.select("open")&&!j&&(K.current=-1,Oe(xe))},onPointerDown:we,onPointerEnter:we,onMouseDown:ve,onClick:ve}},[de,me,O,h,T,Oe,s,A,L,ye,R,le,j]),Ee=x.useMemo(()=>({...Ce,...je}),[Ce,je]);return x.useMemo(()=>v?{reference:Ee,floating:He,item:he,trigger:je}:{},[v,Ee,He,je,he])}const LM=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function UM(n,i={}){const s="rootStore"in n?n.rootStore:n,a=s.useState("open"),c=s.useState("floatingId"),f=s.useState("domReferenceElement"),d=s.useState("floatingElement"),{enabled:h=!0,role:m="dialog"}=i,g=Gu(),v=(f==null?void 0:f.id)||g,b=x.useMemo(()=>{var A;return((A=_u(d))==null?void 0:A.id)||c},[d,c]),S=LM.get(m)??m,T=Sd()!=null,R=x.useMemo(()=>S==="tooltip"||m==="label"?fn:{"aria-haspopup":S==="alertdialog"?"dialog":S,"aria-expanded":"false",...S==="listbox"&&{role:"combobox"},...S==="menu"&&T&&{role:"menuitem"},...m==="select"&&{"aria-autocomplete":"none"},...m==="combobox"&&{"aria-autocomplete":"list"}},[S,T,m]),j=x.useMemo(()=>S==="tooltip"||m==="label"?{[`aria-${m==="label"?"labelledby":"describedby"}`]:a?b:void 0}:{...R,"aria-expanded":a?"true":"false","aria-controls":a?b:void 0,...S==="menu"&&{id:v}},[S,b,a,v,m,R]),O=x.useMemo(()=>{const A={id:b,...S&&{role:S}};return S==="tooltip"||m==="label"?A:{...A,...S==="menu"&&{"aria-labelledby":v}}},[S,b,v,m]),E=x.useCallback(({active:A,selected:N})=>{const L={role:"option",...A&&{id:`${b}-fui-option`}};switch(m){case"select":case"combobox":return{...L,"aria-selected":N}}return{}},[b,m]);return x.useMemo(()=>h?{reference:j,floating:O,item:E,trigger:R}:{},[h,j,O,R,E])}function rR(n,i){const s="rootStore"in n?n.rootStore:n,a=s.useState("open"),c=s.context.dataRef,{listRef:f,activeIndex:d,onMatch:h,onTypingChange:m,enabled:g=!0,findMatch:v=null,resetMs:b=750,ignoreKeys:S=Ul,selectedIndex:C=null}=i,T=El(),R=x.useRef(""),j=x.useRef(C??d??-1),O=x.useRef(null);ke(()=>{a&&(T.clear(),O.current=null,R.current="")},[a,T]),ke(()=>{a&&R.current===""&&(j.current=C??d??-1)},[a,C,d]);const E=_e(D=>{D?c.current.typing||(c.current.typing=D,m==null||m(D)):c.current.typing&&(c.current.typing=D,m==null||m(D))}),A=_e(D=>{function _(te,$,oe){const V=v?v($,oe):$.find(H=>(H==null?void 0:H.toLocaleLowerCase().indexOf(oe.toLocaleLowerCase()))===0);return V?te.indexOf(V):-1}const M=f.current;if(R.current.length>0&&R.current[0]!==" "&&(_(M,M,R.current)===-1?E(!1):D.key===" "&&sn(D)),M==null||S.includes(D.key)||D.key.length!==1||D.ctrlKey||D.metaKey||D.altKey)return;a&&D.key!==" "&&(sn(D),E(!0)),M.every(te=>{var $,oe;return te?(($=te[0])==null?void 0:$.toLocaleLowerCase())!==((oe=te[1])==null?void 0:oe.toLocaleLowerCase()):!0})&&R.current===D.key&&(R.current="",j.current=O.current),R.current+=D.key,T.start(b,()=>{R.current="",j.current=O.current,E(!1)});const J=j.current,re=_(M,[...M.slice((J||0)+1),...M.slice(0,(J||0)+1)],R.current);re!==-1?(h==null||h(re),O.current=re):D.key!==" "&&(R.current="",E(!1))}),N=x.useMemo(()=>({onKeyDown:A}),[A]),L=x.useMemo(()=>({onKeyDown:A,onKeyUp(D){D.key===" "&&E(!1)}}),[A,E]);return x.useMemo(()=>g?{reference:N,floating:L}:{},[g,N,L])}const sR=x.createContext(null),aR=x.createContext(null);function Wr(){const n=x.useContext(sR);if(n===null)throw new Error(Gn(60));return n}function oR(){const n=x.useContext(aR);if(n===null)throw new Error(Gn(61));return n}const uR=(n,i)=>Object.is(n,i);function Xi(n,i,s){return n==null||i==null?Object.is(n,i):s(n,i)}function js(n,i,s){return!n||n.length===0?!1:n.some(a=>a===void 0?!1:Xi(a,i,s))}function bo(n,i,s){return!n||n.length===0?-1:n.findIndex(a=>a===void 0?!1:Xi(a,i,s))}function cR(n,i,s){return n.filter(a=>!Xi(a,i,s))}function np(n){if(n==null)return"";if(typeof n=="string")return n;try{return JSON.stringify(n)}catch{return String(n)}}function fR(n){return n!=null&&n.length>0&&typeof n[0]=="object"&&n[0]!=null&&"items"in n[0]}function vn(n,i){if(i&&n!=null)return i(n)??"";if(n&&typeof n=="object"){if("label"in n&&n.label!=null)return String(n.label);if("value"in n)return String(n.value)}return np(n)}function qs(n,i){return i&&n!=null?i(n)??"":n&&typeof n=="object"&&"value"in n&&"label"in n?np(n.value):np(n)}function HM(n,i,s){if(s&&n!=null)return s(n);if(n&&typeof n=="object"&&"label"in n&&n.label!=null)return n.label;if(i&&!Array.isArray(i))return i[n]??vn(n,s);if(Array.isArray(i)){const a=fR(i)?i.flatMap(c=>c.items):i;if(n==null){const c=a.find(f=>f.value==null);return c&&c.label!=null?c.label:vn(n,s)}if(typeof n!="object"){const c=a.find(f=>f&&f.value===n);return c&&c.label!=null?c.label:vn(n,s)}if("value"in n){const c=a.find(f=>f&&f.value===n.value);if(c&&c.label!=null)return c.label}}return vn(n,s)}function IM(n,i){return!Array.isArray(n)||n.length===0?"":n.map(s=>vn(s,i)).join(", ")}const ft={id:ge(n=>n.id),modal:ge(n=>n.modal),multiple:ge(n=>n.multiple),items:ge(n=>n.items),itemToStringLabel:ge(n=>n.itemToStringLabel),itemToStringValue:ge(n=>n.itemToStringValue),isItemEqualToValue:ge(n=>n.isItemEqualToValue),value:ge(n=>n.value),open:ge(n=>n.open),mounted:ge(n=>n.mounted),forceMount:ge(n=>n.forceMount),transitionStatus:ge(n=>n.transitionStatus),touchModality:ge(n=>n.touchModality),activeIndex:ge(n=>n.activeIndex),selectedIndex:ge(n=>n.selectedIndex),isActive:ge((n,i)=>n.activeIndex===i),isSelected:ge((n,i,s)=>{const a=n.isItemEqualToValue,c=n.value;return n.multiple?Array.isArray(c)&&c.some(f=>Xi(f,s,a)):n.selectedIndex===i&&n.selectedIndex!==null?!0:Xi(c,s,a)}),isSelectedByFocus:ge((n,i)=>n.selectedIndex===i),popupProps:ge(n=>n.popupProps),triggerProps:ge(n=>n.triggerProps),triggerElement:ge(n=>n.triggerElement),positionerElement:ge(n=>n.positionerElement),listElement:ge(n=>n.listElement),scrollUpArrowVisible:ge(n=>n.scrollUpArrowVisible),scrollDownArrowVisible:ge(n=>n.scrollDownArrowVisible),hasScrollArrows:ge(n=>n.hasScrollArrows),serializedValue:ge(n=>{const{multiple:i,value:s,itemToStringValue:a}=n;return i&&Array.isArray(s)&&s.length===0?"":qs(s,a)})};function VM(n){const{id:i,value:s,defaultValue:a=null,onValueChange:c,open:f,defaultOpen:d=!1,onOpenChange:h,name:m,disabled:g=!1,readOnly:v=!1,required:b=!1,modal:S=!0,actionsRef:C,inputRef:T,onOpenChangeComplete:R,items:j,multiple:O=!1,itemToStringLabel:E,itemToStringValue:A,isItemEqualToValue:N=uR,highlightItemOnHover:L=!0,children:D}=n,{clearErrors:_}=jp(),{setDirty:M,shouldValidateOnChange:Q,validityData:J,setFilled:re,name:te,disabled:$,validation:oe}=Eo(),{controlId:V}=Qu(),H=pE({id:i}),ne=$||g,F=te??m,[se,K]=Vs({controlled:s,default:O?a??Ul:a,name:"Select",state:"value"}),[Re,Ye]=Vs({controlled:f,default:d,name:"Select",state:"open"}),Oe=x.useRef([]),z=x.useRef([]),B=x.useRef(null),W=x.useRef(null),ie=x.useRef(0),ue=x.useRef(null),me=x.useRef([]),ae=x.useRef(!1),q=x.useRef(!1),le=x.useRef(null),pe=x.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),Ke=x.useRef(!1),{mounted:Se,setMounted:he,transitionStatus:ye}=wd(Re),de=hl(()=>new Bs({id:H,modal:S,multiple:O,itemToStringLabel:E,itemToStringValue:A,isItemEqualToValue:N,value:se,open:Re,mounted:Se,transitionStatus:ye,items:j,forceMount:!1,touchModality:!1,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Ce=be(de,ft.activeIndex),He=be(de,ft.selectedIndex),je=be(de,ft.triggerElement),Ee=be(de,ft.positionerElement),ve=x.useMemo(()=>O&&Array.isArray(se)&&se.length===0?"":qs(se,A),[O,se,A]),we=On(de.state.triggerElement);gE({id:H,commit:oe.commit,value:se,controlRef:we,name:F,getValue:()=>se});const xe=x.useRef(se);ke(()=>{se!==xe.current&&de.set("forceMount",!0)},[de,se]),ke(()=>{re(se!==null)},[se,re]),ke(function(){if(Re)return;const tt=me.current;if(O){const Pt=Array.isArray(se)?se:[];if(Pt.length===0){de.set("selectedIndex",null);return}const Gt=Pt[Pt.length-1],En=bo(tt,Gt,N);de.set("selectedIndex",En===-1?null:En);return}const Tt=bo(tt,se,N);de.set("selectedIndex",Tt===-1?null:Tt)},[O,Re,se,me,N,de]),ju(se,()=>{_(F),M(se!==J.initialValue),Q()?oe.commit(se):oe.commit(se,!0)});const Xe=_e((Be,tt)=>{if(h==null||h(Be,tt),!tt.isCanceled&&(Ye(Be),!Be&&de.state.activeIndex!==null)){const Tt=Oe.current[de.state.activeIndex];queueMicrotask(()=>{Tt==null||Tt.setAttribute("tabindex","-1")})}}),$e=_e(()=>{he(!1),de.set("activeIndex",null),R==null||R(!1)});Fs({enabled:!C,open:Re,ref:B,onComplete(){Re||$e()}}),x.useImperativeHandle(C,()=>({unmount:$e}),[$e]);const Ve=_e((Be,tt)=>{c==null||c(Be,tt),!tt.isCanceled&&K(Be)}),Ze=_e(()=>{const Be=de.state.listElement||B.current;if(!Be)return;const tt=Be.scrollTop,Tt=Be.scrollTop+Be.clientHeight,Pt=tt>1,Gt=Tt<Be.scrollHeight-1;de.state.scrollUpArrowVisible!==Pt&&de.set("scrollUpArrowVisible",Pt),de.state.scrollDownArrowVisible!==Gt&&de.set("scrollDownArrowVisible",Gt)}),lt=Pp({open:Re,onOpenChange:Xe,elements:{reference:je,floating:Ee}}),St=Hp(lt,{enabled:!v&&!ne,event:"mousedown"}),qt=Vp(lt,{bubbles:!1}),gt=iR(lt,{enabled:!v&&!ne,listRef:Oe,activeIndex:Ce,selectedIndex:He,disabledIndices:Ul,onNavigate(Be){Be===null&&!Re||de.set("activeIndex",Be)},focusItemOnHover:!1}),Fe=rR(lt,{enabled:!v&&!ne&&(Re||!O),listRef:z,activeIndex:Ce,selectedIndex:He,onMatch(Be){Re?de.set("activeIndex",Be):Ve(me.current[Be],We("none"))},onTypingChange(Be){ae.current=Be}}),{getReferenceProps:mn,getFloatingProps:Sn,getItemProps:wl}=Gp([St,qt,gt,Fe]);vE(()=>{de.update({popupProps:Sn(),triggerProps:mn()})}),ke(()=>{de.update({id:H,modal:S,multiple:O,value:se,open:Re,mounted:Se,transitionStatus:ye,popupProps:Sn(),triggerProps:mn(),items:j,itemToStringLabel:E,itemToStringValue:A,isItemEqualToValue:N})},[de,H,S,O,se,Re,Se,ye,Sn,mn,j,E,A,N]);const tn=x.useMemo(()=>({store:de,name:F,required:b,disabled:ne,readOnly:v,multiple:O,itemToStringLabel:E,itemToStringValue:A,highlightItemOnHover:L,setValue:Ve,setOpen:Xe,listRef:Oe,popupRef:B,scrollHandlerRef:W,handleScrollArrowVisibility:Ze,scrollArrowsMountedCountRef:ie,getItemProps:wl,events:lt.context.events,valueRef:ue,valuesRef:me,labelsRef:z,typingRef:ae,selectionRef:pe,selectedItemTextRef:le,validation:oe,onOpenChangeComplete:R,keyboardActiveRef:q,alignItemWithTriggerActiveRef:Ke,initialValueRef:xe}),[de,F,b,ne,v,O,E,A,L,Ve,Xe,wl,lt.context.events,oe,R,Ze]),it=Yi(T,oe.inputRef),rt=O&&Array.isArray(se)&&se.length>0,gn=x.useMemo(()=>!O||!Array.isArray(se)||!F?null:se.map(Be=>{const tt=qs(Be,A);return p.jsx("input",{type:"hidden",name:F,value:tt},tt)}),[O,se,F,A]);return p.jsx(sR.Provider,{value:tn,children:p.jsxs(aR.Provider,{value:lt,children:[D,p.jsx("input",{...oe.getInputValidationProps({onFocus(){var Be;(Be=de.state.triggerElement)==null||Be.focus()},onChange(Be){if(Be.nativeEvent.defaultPrevented)return;const tt=Be.target.value,Tt=We(dl,Be.nativeEvent);function Pt(){if(O)return;const Gt=me.current.find(En=>qs(En,A).toLowerCase()===tt.toLowerCase());Gt!=null&&(M(Gt!==J.initialValue),Ve(Gt,Tt),Q()&&oe.commit(Gt))}de.set("forceMount",!0),queueMicrotask(Pt)}}),id:i||V||void 0,name:O?void 0:F,value:ve,disabled:ne,required:b&&!rt,readOnly:v,ref:it,style:dd,tabIndex:-1,"aria-hidden":!0}),gn]})})}let ad=(function(n){return n.startingStyle="data-starting-style",n.endingStyle="data-ending-style",n})({});const BM={[ad.startingStyle]:""},qM={[ad.endingStyle]:""},Xu={transitionStatus(n){return n==="starting"?BM:n==="ending"?qM:null}};let As=(function(n){return n.open="data-open",n.closed="data-closed",n[n.startingStyle=ad.startingStyle]="startingStyle",n[n.endingStyle=ad.endingStyle]="endingStyle",n.anchorHidden="data-anchor-hidden",n})({}),lp=(function(n){return n.popupOpen="data-popup-open",n.pressed="data-pressed",n})({});const PM={[lp.popupOpen]:""},GM={[lp.popupOpen]:"",[lp.pressed]:""},YM={[As.open]:""},QM={[As.closed]:""},KM={[As.anchorHidden]:""},FM={open(n){return n?PM:null}},Yp={open(n){return n?GM:null}},Ro={open(n){return n?YM:QM},anchorHidden(n){return n?KM:null}};function dR(n){const i=n.getBoundingClientRect(),s=window.getComputedStyle(n,"::before"),a=window.getComputedStyle(n,"::after");if(!(s.content!=="none"||a.content!=="none"))return i;const f=parseFloat(s.width)||0,d=parseFloat(s.height)||0,h=parseFloat(a.width)||0,m=parseFloat(a.height)||0,g=Math.max(i.width,f,h),v=Math.max(i.height,d,m),b=g-i.width,S=v-i.height;return{left:i.left-b/2,right:i.right+b/2,top:i.top-S/2,bottom:i.bottom+S/2}}const Uf=2,XM={...Yp,...Op,value:()=>null},ZM=x.forwardRef(function(i,s){const{render:a,className:c,disabled:f=!1,nativeButton:d=!0,...h}=i,{setTouched:m,setFocused:g,validationMode:v,state:b,disabled:S}=Eo(),{labelId:C}=Qu(),{store:T,setOpen:R,selectionRef:j,validation:O,readOnly:E,alignItemWithTriggerActiveRef:A,disabled:N,keyboardActiveRef:L}=Wr(),D=S||N||f,_=be(T,ft.open),M=be(T,ft.value),Q=be(T,ft.triggerProps),J=be(T,ft.positionerElement),re=be(T,ft.listElement),te=be(T,ft.serializedValue),$=On(J),oe=x.useRef(null),V=El(),H=El(),{getButtonProps:ne,buttonRef:F}=Yu({disabled:D,native:d}),se=_e(W=>{T.set("triggerElement",W)}),K=Yi(s,oe,F,se),Re=El(),Ye=El();x.useEffect(()=>{if(_)return Ye.start(200,()=>{j.current.allowUnselectedMouseUp=!0,Re.start(200,()=>{j.current.allowSelectedMouseUp=!0})}),()=>{Re.clear(),Ye.clear()};j.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},H.clear()},[_,j,H,Re,Ye]);const Oe=x.useMemo(()=>{var W;return(re==null?void 0:re.id)??((W=_u(J))==null?void 0:W.id)},[re,J]),z=wp(Q,{role:"combobox","aria-expanded":_?"true":"false","aria-haspopup":"listbox","aria-controls":_?Oe:void 0,"aria-labelledby":C,"aria-readonly":E||void 0,tabIndex:D?-1:0,ref:K,onFocus(W){g(!0),_&&A.current&&R(!1,We(bd,W.nativeEvent)),V.start(0,()=>{T.set("forceMount",!0)})},onBlur(){m(!0),g(!1),v==="onBlur"&&O.commit(M)},onPointerMove({pointerType:W}){L.current=!1,T.set("touchModality",W==="touch")},onPointerDown({pointerType:W}){T.set("touchModality",W==="touch")},onKeyDown(){L.current=!0},onMouseDown(W){if(_)return;const ie=Fi(W.currentTarget);function ue(me){if(!oe.current)return;const ae=me.target;if(Rt(oe.current,ae)||Rt($.current,ae)||ae===oe.current)return;const q=dR(oe.current);me.clientX>=q.left-Uf&&me.clientX<=q.right+Uf&&me.clientY>=q.top-Uf&&me.clientY<=q.bottom+Uf||R(!1,We(pN,me))}H.start(0,()=>{ie.addEventListener("mouseup",ue,{once:!0})})}},O.getValidationProps,h,ne);z.role="combobox";const B=x.useMemo(()=>({...b,open:_,disabled:D,value:M,readOnly:E,placeholder:!te}),[b,_,D,M,E,te]);return Bt("button",i,{ref:[s,oe],state:B,stateAttributesMapping:XM,props:z})}),JM={value:()=>null},$M=x.forwardRef(function(i,s){const{className:a,render:c,children:f,...d}=i,{store:h,valueRef:m}=Wr(),g=be(h,ft.value),v=be(h,ft.items),b=be(h,ft.itemToStringLabel),S=be(h,ft.serializedValue),C=x.useMemo(()=>({value:g,placeholder:!S}),[g,S]),T=typeof f=="function"?f(g):f??(Array.isArray(g)?IM(g,b):HM(g,v,b));return Bt("span",i,{state:C,ref:[s,m],props:[{children:T},d],stateAttributesMapping:JM})}),WM=x.forwardRef(function(i,s){const{className:a,render:c,...f}=i,{store:d}=Wr(),h=be(d,ft.open),m=x.useMemo(()=>({open:h}),[h]);return Bt("span",i,{state:m,ref:s,props:[{"aria-hidden":!0,children:"▼"},f],stateAttributesMapping:FM})}),e3=x.createContext(void 0),t3=x.forwardRef(function(i,s){const{store:a}=Wr(),c=be(a,ft.mounted),f=be(a,ft.forceMount);return c||f?p.jsx(e3.Provider,{value:!0,children:p.jsx(kp,{ref:s,...i})}):null});function Qp(n){return Rp(19)?n:n?"true":void 0}let fS={},dS={},hS="";function n3(n){if(typeof document>"u")return!1;const i=Fi(n);return hn(i).innerWidth-i.documentElement.clientWidth>0}function l3(n){const i=Fi(n),s=i.documentElement,a=i.body,c=So(s)?s:a,f=c.style.overflow;return c.style.overflow="hidden",()=>{c.style.overflow=f}}function i3(n){var S,C;const i=Fi(n),s=i.documentElement,a=i.body,c=hn(s);let f=0,d=0;const h=gi.create(),m=typeof CSS<"u"&&((S=CSS.supports)==null?void 0:S.call(CSS,"scrollbar-gutter","stable"));if(wE&&(((C=c.visualViewport)==null?void 0:C.scale)??1)!==1)return()=>{};function g(){const T=c.getComputedStyle(s),R=c.getComputedStyle(a),E=(T.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";f=s.scrollTop,d=s.scrollLeft,fS={scrollbarGutter:s.style.scrollbarGutter,overflowY:s.style.overflowY,overflowX:s.style.overflowX},hS=s.style.scrollBehavior,dS={position:a.style.position,height:a.style.height,width:a.style.width,boxSizing:a.style.boxSizing,overflowY:a.style.overflowY,overflowX:a.style.overflowX,scrollBehavior:a.style.scrollBehavior};const A=s.scrollHeight>s.clientHeight,N=s.scrollWidth>s.clientWidth,L=T.overflowY==="scroll"||R.overflowY==="scroll",D=T.overflowX==="scroll"||R.overflowX==="scroll",_=Math.max(0,c.innerWidth-s.clientWidth),M=Math.max(0,c.innerHeight-s.clientHeight),Q=parseFloat(R.marginTop)+parseFloat(R.marginBottom),J=parseFloat(R.marginLeft)+parseFloat(R.marginRight),re=So(s)?s:a;if(m){s.style.scrollbarGutter=E,re.style.overflowY="hidden",re.style.overflowX="hidden";return}Object.assign(s.style,{scrollbarGutter:E,overflowY:"hidden",overflowX:"hidden"}),(A||L)&&(s.style.overflowY="scroll"),(N||D)&&(s.style.overflowX="scroll"),Object.assign(a.style,{position:"relative",height:Q||M?`calc(100dvh - ${Q+M}px)`:"100dvh",width:J||_?`calc(100vw - ${J+_}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),a.scrollTop=f,a.scrollLeft=d,s.setAttribute("data-base-ui-scroll-locked",""),s.style.scrollBehavior="unset"}function v(){Object.assign(s.style,fS),Object.assign(a.style,dS),m||(s.scrollTop=f,s.scrollLeft=d,s.removeAttribute("data-base-ui-scroll-locked"),s.style.scrollBehavior=hS)}function b(){v(),h.request(g)}return g(),c.addEventListener("resize",b),()=>{h.cancel(),v(),typeof c.removeEventListener=="function"&&c.removeEventListener("resize",b)}}class r3{constructor(){Nt(this,"lockCount",0);Nt(this,"restore",null);Nt(this,"timeoutLock",go.create());Nt(this,"timeoutUnlock",go.create());Nt(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});Nt(this,"unlock",()=>{var i;this.lockCount===0&&this.restore&&((i=this.restore)==null||i.call(this),this.restore=null)})}acquire(i){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(i)),this.release}lock(i){if(this.lockCount===0||this.restore!==null)return;const a=Fi(i).documentElement,c=hn(a).getComputedStyle(a).overflowY;if(c==="hidden"||c==="clip"){this.restore=en;return}const f=PN||!n3(i);this.restore=f?l3(i):i3(i)}}const s3=new r3;function Kp(n=!0,i=null){ke(()=>{if(n)return s3.acquire(i)},[n,i])}const hR=x.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function a3(){return x.useContext(hR)}function Fp(n){const{children:i,elementsRef:s,labelsRef:a,onMapChange:c}=n,f=_e(c),d=x.useRef(0),h=hl(u3).current,m=hl(o3).current,[g,v]=x.useState(0),b=x.useRef(g),S=_e((O,E)=>{m.set(O,E??null),b.current+=1,v(b.current)}),C=_e(O=>{m.delete(O),b.current+=1,v(b.current)}),T=x.useMemo(()=>{const O=new Map;return Array.from(m.keys()).filter(A=>A.isConnected).sort(c3).forEach((A,N)=>{const L=m.get(A)??{};O.set(A,{...L,index:N})}),O},[m,g]);ke(()=>{if(typeof MutationObserver!="function"||T.size===0)return;const O=new MutationObserver(E=>{const A=new Set,N=L=>A.has(L)?A.delete(L):A.add(L);E.forEach(L=>{L.removedNodes.forEach(N),L.addedNodes.forEach(N)}),A.size===0&&(b.current+=1,v(b.current))});return T.forEach((E,A)=>{A.parentElement&&O.observe(A.parentElement,{childList:!0})}),()=>{O.disconnect()}},[T]),ke(()=>{b.current===g&&(s.current.length!==T.size&&(s.current.length=T.size),a&&a.current.length!==T.size&&(a.current.length=T.size),d.current=T.size),f(T)},[f,T,s,a,g]),ke(()=>()=>{s.current=[]},[s]),ke(()=>()=>{a&&(a.current=[])},[a]);const R=_e(O=>(h.add(O),()=>{h.delete(O)}));ke(()=>{h.forEach(O=>O(T))},[h,T]);const j=x.useMemo(()=>({register:S,unregister:C,subscribeMapChange:R,elementsRef:s,labelsRef:a,nextIndexRef:d}),[S,C,R,s,a,d]);return p.jsx(hR.Provider,{value:j,children:i})}function o3(){return new Map}function u3(){return new Set}function c3(n,i){const s=n.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING||s&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:s&Node.DOCUMENT_POSITION_PRECEDING||s&Node.DOCUMENT_POSITION_CONTAINS?1:0}const f3=x.createContext(void 0);function Xp(){const n=x.useContext(f3);return(n==null?void 0:n.direction)??"ltr"}const d3=n=>({name:"arrow",options:n,async fn(i){var se,K;const{x:s,y:a,placement:c,rects:f,platform:d,elements:h,middlewareData:m}=i,{element:g,padding:v=0,offsetParent:b="real"}=Ki(n,i)||{};if(g==null)return{};const S=zE(v),C={x:s,y:a},T=_p(c),R=Dp(T),j=await d.getDimensions(g),O=T==="y",E=O?"top":"left",A=O?"bottom":"right",N=O?"clientHeight":"clientWidth",L=f.reference[R]+f.reference[T]-C[T]-f.floating[R],D=C[T]-f.reference[T],_=b==="real"?await((se=d.getOffsetParent)==null?void 0:se.call(d,g)):h.floating;let M=h.floating[N]||f.floating[R];(!M||!await((K=d.isElement)==null?void 0:K.call(d,_)))&&(M=h.floating[N]||f.floating[R]);const Q=L/2-D/2,J=M/2-j[R]/2-1,re=Math.min(S[E],J),te=Math.min(S[A],J),$=re,oe=M-j[R]-te,V=M/2-j[R]/2+Q,H=ME($,V,oe),ne=!m.arrow&&$r(c)!=null&&V!==H&&f.reference[R]/2-(V<$?re:te)-j[R]/2<0,F=ne?V<$?V-$:V-oe:0;return{[T]:C[T]+F,data:{[T]:H,centerOffset:V-H-F,...ne&&{alignmentOffset:F}},reset:ne}}}),h3=(n,i)=>({...d3(n),options:[n,i]}),m3={name:"hide",async fn(n){var h;const{width:i,height:s,x:a,y:c}=n.rects.reference,f=i===0&&s===0&&a===0&&c===0;return{data:{referenceHidden:((h=(await SM().fn(n)).data)==null?void 0:h.referenceHidden)||f}}}},g3={sideX:"left",sideY:"top"};function mR(n,i,s){const a=n==="inline-start"||n==="inline-end";return{top:"top",right:a?s?"inline-start":"inline-end":"right",bottom:"bottom",left:a?s?"inline-end":"inline-start":"left"}[i]}function mS(n,i,s){const{rects:a,placement:c}=n;return{side:mR(i,Il(c),s),align:$r(c)||"center",anchor:{width:a.reference.width,height:a.reference.height},positioner:{width:a.floating.width,height:a.floating.height}}}function gR(n){var wl,tn;const{anchor:i,positionMethod:s="absolute",side:a="bottom",sideOffset:c=0,align:f="center",alignOffset:d=0,collisionBoundary:h,collisionPadding:m=5,sticky:g=!1,arrowPadding:v=5,disableAnchorTracking:b=!1,keepMounted:S=!1,floatingRootContext:C,mounted:T,collisionAvoidance:R,shiftCrossAxis:j=!1,nodeId:O,adaptiveOrigin:E,lazyFlip:A=!1,externalTree:N}=n,[L,D]=x.useState(null);!T&&L!==null&&D(null);const _=R.side||"flip",M=R.align||"flip",Q=R.fallbackAxisSide||"end",J=typeof i=="function"?i:void 0,re=_e(J),te=J?re:i,$=On(i),V=Xp()==="rtl",H=L||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":V?"left":"right","inline-start":V?"right":"left"}[a],ne=f==="center"?H:`${H}-${f}`;let F=m;const se=1,K=a==="bottom"?se:0,Re=a==="top"?se:0,Ye=a==="right"?se:0,Oe=a==="left"?se:0;typeof F=="number"?F={top:F+K,right:F+Oe,bottom:F+Re,left:F+Ye}:F&&(F={top:(F.top||0)+K,right:(F.right||0)+Oe,bottom:(F.bottom||0)+Re,left:(F.left||0)+Ye});const z={boundary:h==="clipping-ancestors"?"clippingAncestors":h,padding:F},B=x.useRef(null),W=On(c),ie=On(d),ae=[pM(it=>{const rt=mS(it,a,V),gn=typeof W.current=="function"?W.current(rt):W.current,Be=typeof ie.current=="function"?ie.current(rt):ie.current;return{mainAxis:gn,crossAxis:Be,alignmentAxis:Be}},[typeof c!="function"?c:0,typeof d!="function"?d:0,V,a])],q=M==="none"&&_!=="shift",le=!q&&(g||j||_==="shift"),pe=_==="none"?null:vM({...z,padding:{top:F.top+se,right:F.right+se,bottom:F.bottom+se,left:F.left+se},mainAxis:!j&&_==="flip",crossAxis:M==="flip"?"alignment":!1,fallbackAxisSideDirection:Q}),Ke=q?null:yM(it=>{const rt=Fi(it.elements.floating).documentElement;return{...z,rootBoundary:j?{x:0,y:0,width:rt.clientWidth,height:rt.clientHeight}:void 0,mainAxis:M!=="none",crossAxis:le,limiter:g||j?void 0:bM(gn=>{if(!B.current)return{};const{width:Be,height:tt}=B.current.getBoundingClientRect(),Tt=Hl(Il(gn.placement)),Pt=Tt==="y"?Be:tt,Gt=Tt==="y"?F.left+F.right:F.top+F.bottom;return{offset:Pt/2+Gt/2}})}},[z,g,j,F,M]);_==="shift"||M==="shift"||f==="center"?ae.push(Ke,pe):ae.push(pe,Ke),ae.push(xM({...z,apply({elements:{floating:it},rects:{reference:rt},availableWidth:gn,availableHeight:Be}){Object.entries({"--available-width":`${gn}px`,"--available-height":`${Be}px`,"--anchor-width":`${rt.width}px`,"--anchor-height":`${rt.height}px`}).forEach(([tt,Tt])=>{it.style.setProperty(tt,Tt)})}}),h3(()=>({element:B.current||document.createElement("div"),padding:v,offsetParent:"floating"}),[v]),{name:"transformOrigin",fn(it){var rl,Yn,Tl;const{elements:rt,middlewareData:gn,placement:Be,rects:tt,y:Tt}=it,Pt=Il(Be),Gt=Hl(Pt),En=B.current,pn=((rl=gn.arrow)==null?void 0:rl.x)||0,Yt=((Yn=gn.arrow)==null?void 0:Yn.y)||0,Zt=(En==null?void 0:En.clientWidth)||0,Qe=(En==null?void 0:En.clientHeight)||0,Bl=pn+Zt/2,Wi=Yt+Qe/2,vi=Math.abs(((Tl=gn.shift)==null?void 0:Tl.y)||0),ql=tt.reference.height/2,Cl=typeof c=="function"?c(mS(it,a,V)):c,Pl=vi>Cl,Hn={top:`${Bl}px calc(100% + ${Cl}px)`,bottom:`${Bl}px ${-Cl}px`,left:`calc(100% + ${Cl}px) ${Wi}px`,right:`${-Cl}px ${Wi}px`}[Pt],il=`${Bl}px ${tt.reference.y+ql-Tt}px`;return rt.floating.style.setProperty("--transform-origin",le&&Gt==="y"&&Pl?il:Hn),{}}},m3,E),ke(()=>{!T&&C&&C.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[T,C]);const Se=x.useMemo(()=>({elementResize:!b&&typeof ResizeObserver<"u",layoutShift:!b&&typeof IntersectionObserver<"u"}),[b]),{refs:he,elements:ye,x:de,y:Ce,middlewareData:He,update:je,placement:Ee,context:ve,isPositioned:we,floatingStyles:xe}=MM({rootContext:C,placement:ne,middleware:ae,strategy:s,whileElementsMounted:S?void 0:(...it)=>oS(...it,Se),nodeId:O,externalTree:N}),{sideX:Xe,sideY:$e}=He.adaptiveOrigin||g3,Ve=we?s:"fixed",Ze=x.useMemo(()=>E?{position:Ve,[Xe]:de,[$e]:Ce}:{position:Ve,...xe},[E,Ve,Xe,de,$e,Ce,xe]),lt=x.useRef(null);ke(()=>{if(!T)return;const it=$.current,rt=typeof it=="function"?it():it,Be=(gS(rt)?rt.current:rt)||null||null;Be!==lt.current&&(he.setPositionReference(Be),lt.current=Be)},[T,he,te,$]),x.useEffect(()=>{if(!T)return;const it=$.current;typeof it!="function"&&gS(it)&&it.current!==lt.current&&(he.setPositionReference(it.current),lt.current=it.current)},[T,he,te,$]),x.useEffect(()=>{if(S&&T&&ye.domReference&&ye.floating)return oS(ye.domReference,ye.floating,je,Se)},[S,T,ye,je,Se]);const St=Il(Ee),qt=mR(a,St,V),gt=$r(Ee)||"center",Fe=!!((wl=He.hide)!=null&&wl.referenceHidden);ke(()=>{A&&T&&we&&D(St)},[A,T,we,St]);const mn=x.useMemo(()=>{var it,rt;return{position:"absolute",top:(it=He.arrow)==null?void 0:it.y,left:(rt=He.arrow)==null?void 0:rt.x}},[He.arrow]),Sn=((tn=He.arrow)==null?void 0:tn.centerOffset)!==0;return x.useMemo(()=>({positionerStyles:Ze,arrowStyles:mn,arrowRef:B,arrowUncentered:Sn,side:qt,align:gt,physicalSide:St,anchorHidden:Fe,refs:he,context:ve,isPositioned:we,update:je}),[Ze,mn,B,Sn,qt,gt,St,Fe,he,ve,we,je])}function gS(n){return n!=null&&"current"in n}const pR=x.createContext(void 0);function p3(){const n=x.useContext(pR);if(!n)throw new Error(Gn(59));return n}const Zp=x.forwardRef(function(i,s){const{cutout:a,...c}=i;let f;if(a){const d=a==null?void 0:a.getBoundingClientRect();f=`polygon(
|
|
74
|
+
0% 0%,
|
|
75
|
+
100% 0%,
|
|
76
|
+
100% 100%,
|
|
77
|
+
0% 100%,
|
|
78
|
+
0% 0%,
|
|
79
|
+
${d.left}px ${d.top}px,
|
|
80
|
+
${d.left}px ${d.bottom}px,
|
|
81
|
+
${d.right}px ${d.bottom}px,
|
|
82
|
+
${d.right}px ${d.top}px,
|
|
83
|
+
${d.left}px ${d.top}px
|
|
84
|
+
)`}return p.jsx("div",{ref:s,role:"presentation","data-base-ui-inert":"",...c,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:f}})});function od(n,i){n&&Object.assign(n.style,i)}const y3={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},b3={position:"fixed"},v3=x.forwardRef(function(i,s){const{anchor:a,positionMethod:c="absolute",className:f,render:d,side:h="bottom",align:m="center",sideOffset:g=0,alignOffset:v=0,collisionBoundary:b="clipping-ancestors",collisionPadding:S,arrowPadding:C=5,sticky:T=!1,disableAnchorTracking:R,alignItemWithTrigger:j=!0,collisionAvoidance:O=fE,...E}=i,{store:A,listRef:N,labelsRef:L,alignItemWithTriggerActiveRef:D,selectedItemTextRef:_,valuesRef:M,initialValueRef:Q,popupRef:J,setValue:re}=Wr(),te=oR(),$=be(A,ft.open),oe=be(A,ft.mounted),V=be(A,ft.modal),H=be(A,ft.value),ne=be(A,ft.touchModality),F=be(A,ft.positionerElement),se=be(A,ft.triggerElement),K=be(A,ft.isItemEqualToValue),Re=x.useRef(null),Ye=x.useRef(null),[Oe,z]=x.useState(j),B=oe&&Oe&&!ne;!oe&&Oe!==j&&z(j),ke(()=>{oe||(ft.scrollUpArrowVisible(A.state)&&A.set("scrollUpArrowVisible",!1),ft.scrollDownArrowVisible(A.state)&&A.set("scrollDownArrowVisible",!1))},[A,oe]),x.useImperativeHandle(D,()=>B),Kp((B||V)&&$&&!ne,se);const W=gR({anchor:a,floatingRootContext:te,positionMethod:c,mounted:oe,side:h,sideOffset:g,align:m,alignOffset:v,arrowPadding:C,collisionBoundary:b,collisionPadding:S,sticky:T,disableAnchorTracking:R??B,collisionAvoidance:O,keepMounted:!0}),ie=B?"none":W.side,ue=B?b3:W.positionerStyles,me=x.useMemo(()=>{const he={};return $||(he.pointerEvents="none"),{role:"presentation",hidden:!oe,style:{...ue,...he}}},[$,oe,ue]),ae=x.useMemo(()=>({open:$,side:ie,align:W.align,anchorHidden:W.anchorHidden}),[$,ie,W.align,W.anchorHidden]),q=_e(he=>{A.set("positionerElement",he)}),le=Bt("div",i,{ref:[s,q],state:ae,stateAttributesMapping:Ro,props:[me,E]}),pe=x.useRef(0),Ke=_e(he=>{if(he.size===0&&pe.current===0||M.current.length===0)return;const ye=pe.current;if(pe.current=he.size,he.size===ye)return;const de=We(dl);if(ye!==0&&!A.state.multiple&&H!==null&&bo(M.current,H,K)===-1){const He=Q.current,Ee=He!=null&&js(M.current,He,K)?He:null;re(Ee,de),Ee===null&&(A.set("selectedIndex",null),_.current=null)}if(ye!==0&&A.state.multiple&&Array.isArray(H)){const Ce=H.filter(He=>js(M.current,He,K));(Ce.length!==H.length||Ce.some(He=>!js(H,He,K)))&&(re(Ce,de),Ce.length===0&&(A.set("selectedIndex",null),_.current=null))}if($&&B){A.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const Ce={height:""};od(F,Ce),od(J.current,Ce)}}),Se=x.useMemo(()=>({...W,side:ie,alignItemWithTriggerActive:B,setControlledAlignItemWithTrigger:z,scrollUpArrowRef:Re,scrollDownArrowRef:Ye}),[W,ie,B,z]);return p.jsx(Fp,{elementsRef:N,labelsRef:L,onMapChange:Ke,children:p.jsxs(pR.Provider,{value:Se,children:[oe&&V&&p.jsx(Zp,{inert:Qp(!$),cutout:se}),le]})})});function yR(n){const i=n.currentTarget.getBoundingClientRect();return i.top+1<=n.clientY&&n.clientY<=i.bottom-1&&i.left+1<=n.clientX&&n.clientX<=i.right-1}const Hf="base-ui-disable-scrollbar",pS={className:Hf,element:p.jsx("style",{href:Hf,precedence:"base-ui:low",children:`.${Hf}{scrollbar-width:none}.${Hf}::-webkit-scrollbar{display:none}`})},x3=x.createContext(void 0);function bR(n){return x.useContext(x3)}const Ja="ArrowUp",Ns="ArrowDown",ku="ArrowLeft",$a="ArrowRight",Zu="Home",Ju="End",vR=new Set([ku,$a]),S3=new Set([ku,$a,Zu,Ju]),xR=new Set([Ja,Ns]),E3=new Set([Ja,Ns,Zu,Ju]),SR=new Set([...vR,...xR]),R3=new Set([...SR,Zu,Ju]),ER=new Set([Ja,Ns,ku,$a,Zu,Ju]),w3="Shift",C3="Control",T3="Alt",O3="Meta",j3=new Set([w3,C3,T3,O3]);function A3(n){return dn(n)&&n.tagName==="INPUT"}function yS(n){return!!(A3(n)&&n.selectionStart!=null||dn(n)&&n.tagName==="TEXTAREA")}function bS(n,i,s,a){if(!n||!i||!i.scrollTo)return;let c=n.scrollLeft,f=n.scrollTop;const d=n.clientWidth<n.scrollWidth,h=n.clientHeight<n.scrollHeight;if(d&&a!=="vertical"){const m=vS(n,i,"left"),g=If(n),v=If(i);s==="ltr"&&(m+i.offsetWidth+v.scrollMarginRight>n.scrollLeft+n.clientWidth-g.scrollPaddingRight?c=m+i.offsetWidth+v.scrollMarginRight-n.clientWidth+g.scrollPaddingRight:m-v.scrollMarginLeft<n.scrollLeft+g.scrollPaddingLeft&&(c=m-v.scrollMarginLeft-g.scrollPaddingLeft)),s==="rtl"&&(m-v.scrollMarginRight<n.scrollLeft+g.scrollPaddingLeft?c=m-v.scrollMarginLeft-g.scrollPaddingLeft:m+i.offsetWidth+v.scrollMarginRight>n.scrollLeft+n.clientWidth-g.scrollPaddingRight&&(c=m+i.offsetWidth+v.scrollMarginRight-n.clientWidth+g.scrollPaddingRight))}if(h&&a!=="horizontal"){const m=vS(n,i,"top"),g=If(n),v=If(i);m-v.scrollMarginTop<n.scrollTop+g.scrollPaddingTop?f=m-v.scrollMarginTop-g.scrollPaddingTop:m+i.offsetHeight+v.scrollMarginBottom>n.scrollTop+n.clientHeight-g.scrollPaddingBottom&&(f=m+i.offsetHeight+v.scrollMarginBottom-n.clientHeight+g.scrollPaddingBottom)}n.scrollTo({left:c,top:f,behavior:"auto"})}function vS(n,i,s){const a=s==="left"?"offsetLeft":"offsetTop";let c=0;for(;i.offsetParent&&(c+=i[a],i.offsetParent!==n);)i=i.offsetParent;return c}function If(n){const i=getComputedStyle(n);return{scrollMarginTop:parseFloat(i.scrollMarginTop)||0,scrollMarginRight:parseFloat(i.scrollMarginRight)||0,scrollMarginBottom:parseFloat(i.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(i.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(i.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(i.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(i.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(i.scrollPaddingLeft)||0}}function RR(n){return n==="starting"?ZA:fn}const N3={...Ro,...Xu},M3=x.forwardRef(function(i,s){const{render:a,className:c,...f}=i,{store:d,popupRef:h,onOpenChangeComplete:m,setOpen:g,valueRef:v,selectedItemTextRef:b,keyboardActiveRef:S,multiple:C,handleScrollArrowVisibility:T,scrollHandlerRef:R}=Wr(),{side:j,align:O,alignItemWithTriggerActive:E,setControlledAlignItemWithTrigger:A,scrollDownArrowRef:N,scrollUpArrowRef:L}=p3(),D=bR()!=null,_=oR(),M=El(),Q=be(d,ft.id),J=be(d,ft.open),re=be(d,ft.mounted),te=be(d,ft.popupProps),$=be(d,ft.transitionStatus),oe=be(d,ft.triggerElement),V=be(d,ft.positionerElement),H=be(d,ft.listElement),ne=x.useRef(0),F=x.useRef(!1),se=x.useRef(0),K=x.useRef(!1),Re=x.useRef({}),Ye=vd(),Oe=_e(ie=>{if(!V||!h.current||!K.current)return;if(F.current||!E){T();return}const ue=V.style.top==="0px",me=V.style.bottom==="0px",ae=V.getBoundingClientRect().height,q=Fi(V),le=getComputedStyle(V),pe=parseFloat(le.marginTop),Ke=parseFloat(le.marginBottom),Se=q.documentElement.clientHeight-pe-Ke,he=ie.scrollTop,ye=ie.scrollHeight,de=ie.clientHeight,Ce=ye-de;let He=null,je=null,Ee=!1;if(ue){const ve=Ce-he,we=ae+ve,xe=Math.min(we,Se);He=xe,xe!==Se?je=Ce:Ee=!0}else if(me){const ve=he-0,we=ae+ve,xe=Math.min(we,Se),Xe=we-Se;He=xe,xe!==Se?je=0:(Ee=!0,he<Ce&&(je=he-(ve-Xe)))}He!=null&&(V.style.height=`${He}px`),je!=null&&(ie.scrollTop=je),Ee&&(F.current=!0),T()});x.useImperativeHandle(R,()=>Oe,[Oe]),Fs({open:J,ref:h,onComplete(){J&&(m==null||m(!0))}});const z=x.useMemo(()=>({open:J,transitionStatus:$,side:j,align:O}),[J,$,j,O]);ke(()=>{!V||!h.current||Object.keys(Re.current).length||(Re.current={top:V.style.top||"0",left:V.style.left||"0",right:V.style.right,height:V.style.height,bottom:V.style.bottom,minHeight:V.style.minHeight,maxHeight:V.style.maxHeight,marginTop:V.style.marginTop,marginBottom:V.style.marginBottom})},[h,V]),ke(()=>{re||E||(K.current=!1,F.current=!1,ne.current=0,se.current=0,od(V,Re.current))},[re,E,V,h]),ke(()=>{const ie=h.current;if(!(!re||!oe||!V||!ie)){if(!E){K.current=!0,Ye.request(T);return}queueMicrotask(()=>{var tt;const ue=getComputedStyle(V),me=getComputedStyle(ie),ae=Fi(oe),q=hn(V),le=oe.getBoundingClientRect(),pe=V.getBoundingClientRect(),Ke=le.left,Se=le.height,he=H||ie,ye=he.scrollHeight,de=parseFloat(me.borderBottomWidth),Ce=parseFloat(ue.marginTop)||10,He=parseFloat(ue.marginBottom)||10,je=parseFloat(ue.minHeight)||100,Ee=5,ve=5,we=20,xe=ae.documentElement.clientHeight-Ce-He,Xe=ae.documentElement.clientWidth,$e=xe-le.bottom+Se,Ve=b.current,Ze=v.current;let lt=0,St=0;if(Ve&&Ze){const Tt=Ze.getBoundingClientRect(),Pt=Ve.getBoundingClientRect(),Gt=Tt.left-Ke,En=Pt.left-pe.left,pn=Tt.top-le.top+Tt.height/2,Yt=Pt.top-pe.top+Pt.height/2;lt=Gt-En,St=Yt-pn}const qt=$e+St+He+de;let gt=Math.min(xe,qt);const Fe=xe-Ce-He,mn=qt-gt,Sn=Math.max(Ee,Ke+lt),wl=Xe-ve,tn=Math.max(0,Sn+pe.width-wl);V.style.left=`${Sn-tn}px`,V.style.height=`${gt}px`,V.style.maxHeight="auto",V.style.marginTop=`${Ce}px`,V.style.marginBottom=`${He}px`,ie.style.height="100%";const it=he.scrollHeight-he.clientHeight,rt=mn>=it;rt&&(gt=Math.min(xe,pe.height)-(mn-it));const gn=le.top<we||le.bottom>xe-we||gt<Math.min(ye,je),Be=(((tt=q.visualViewport)==null?void 0:tt.scale)??1)!==1&&wE;if(gn||Be){K.current=!0,od(V,Re.current),Qi.flushSync(()=>A(!1));return}if(rt){const Tt=Math.max(0,xe-qt);V.style.top=pe.height>=Fe?"0":`${Tt}px`,V.style.height=`${gt}px`,he.scrollTop=he.scrollHeight-he.clientHeight,ne.current=Math.max(je,gt)}else V.style.bottom="0",ne.current=Math.max(je,gt),he.scrollTop=mn;ne.current===xe&&(F.current=!0),T(),setTimeout(()=>{K.current=!0})})}},[d,re,V,oe,v,b,h,T,E,A,Ye,N,L,H]),x.useEffect(()=>{if(!E||!V||!re)return;const ie=hn(V);function ue(me){g(!1,We(bN,me))}return ie.addEventListener("resize",ue),()=>{ie.removeEventListener("resize",ue)}},[g,E,V,re]);const B={...H?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":C||void 0,id:`${Q}-list`},onKeyDown(ie){S.current=!0,D&&ER.has(ie.key)&&ie.stopPropagation()},onMouseMove(){S.current=!1},onPointerLeave(ie){if(yR(ie)||ie.pointerType==="touch")return;const ue=ie.currentTarget;M.start(0,()=>{d.set("activeIndex",null),ue.focus({preventScroll:!0})})},onScroll(ie){var ue;H||(ue=R.current)==null||ue.call(R,ie.currentTarget)},...E&&{style:H?{height:"100%"}:y3}},W=Bt("div",i,{ref:[s,h],state:z,stateAttributesMapping:N3,props:[te,B,RR($),{className:!H&&E?pS.className:void 0},f]});return p.jsxs(x.Fragment,{children:[pS.element,p.jsx(Up,{context:_,modal:!1,disabled:!re,restoreFocus:!0,children:W})]})});let Jp=(function(n){return n[n.None=0]="None",n[n.GuessFromOrder=1]="GuessFromOrder",n})({});function $p(n={}){const{label:i,metadata:s,textRef:a,indexGuessBehavior:c,index:f}=n,{register:d,unregister:h,subscribeMapChange:m,elementsRef:g,labelsRef:v,nextIndexRef:b}=a3(),S=x.useRef(-1),[C,T]=x.useState(f??(c===Jp.GuessFromOrder?()=>{if(S.current===-1){const O=b.current;b.current+=1,S.current=O}return S.current}:-1)),R=x.useRef(null),j=x.useCallback(O=>{var E;if(R.current=O,C!==-1&&O!==null&&(g.current[C]=O,v)){const A=i!==void 0;v.current[C]=A?i:((E=a==null?void 0:a.current)==null?void 0:E.textContent)??O.textContent}},[C,g,v,i,a]);return ke(()=>{if(f!=null)return;const O=R.current;if(O)return d(O,s),()=>{h(O)}},[f,d,h,s]),ke(()=>{if(f==null)return m(O=>{var A;const E=R.current?(A=O.get(R.current))==null?void 0:A.index:null;E!=null&&T(E)})},[f,m,T]),x.useMemo(()=>({ref:j,index:C}),[C,j])}const wR=x.createContext(void 0);function Wp(){const n=x.useContext(wR);if(!n)throw new Error(Gn(57));return n}const z3=x.memo(x.forwardRef(function(i,s){const{render:a,className:c,value:f=null,label:d,disabled:h=!1,nativeButton:m=!1,...g}=i,v=x.useRef(null),b=$p({label:d,textRef:v,indexGuessBehavior:Jp.GuessFromOrder}),{store:S,getItemProps:C,setOpen:T,setValue:R,selectionRef:j,typingRef:O,valuesRef:E,keyboardActiveRef:A,multiple:N,highlightItemOnHover:L}=Wr(),D=El(),_=be(S,ft.isActive,b.index),M=be(S,ft.isSelected,b.index,f),Q=be(S,ft.isSelectedByFocus,b.index),J=be(S,ft.isItemEqualToValue),re=b.index,te=re!==-1,$=x.useRef(null),oe=On(re);ke(()=>{if(!te)return;const W=E.current;return W[re]=f,()=>{delete W[re]}},[te,re,f,E]),ke(()=>{if(!te)return;const W=S.state.value;let ie=W;N&&Array.isArray(W)&&W.length>0&&(ie=W[W.length-1]),ie!==void 0&&Xi(ie,f,J)&&S.set("selectedIndex",re)},[te,re,N,J,S,f]);const V=x.useMemo(()=>({disabled:h,selected:M,highlighted:_}),[h,M,_]),H=C({active:_,selected:M});H.onFocus=void 0,H.id=void 0;const ne=x.useRef(null),F=x.useRef("mouse"),se=x.useRef(!1),{getButtonProps:K,buttonRef:Re}=Yu({disabled:h,focusableWhenDisabled:!0,native:m});function Ye(W){const ie=S.state.value;if(N){const ue=Array.isArray(ie)?ie:[],me=M?cR(ue,f,J):[...ue,f];R(me,We(Pf,W))}else R(f,We(Pf,W)),T(!1,We(Pf,W))}const Oe={role:"option","aria-selected":M,"aria-disabled":h||void 0,tabIndex:_?0:-1,onFocus(){S.set("activeIndex",re)},onMouseEnter(){!A.current&&S.state.selectedIndex===null&&S.set("activeIndex",re)},onMouseMove(){L&&S.set("activeIndex",re)},onMouseLeave(W){!L||A.current||yR(W)||D.start(0,()=>{S.state.activeIndex===re&&S.set("activeIndex",null)})},onTouchStart(){j.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(W){ne.current=W.key,S.set("activeIndex",re)},onClick(W){se.current=!1,!(W.type==="keydown"&&ne.current===null)&&(h||ne.current===" "&&O.current||F.current!=="touch"&&!_||(ne.current=null,Ye(W.nativeEvent)))},onPointerEnter(W){F.current=W.pointerType},onPointerDown(W){F.current=W.pointerType,se.current=!0},onMouseUp(W){if(h)return;if(se.current){se.current=!1;return}const ie=!j.current.allowSelectedMouseUp&&M,ue=!j.current.allowUnselectedMouseUp&&!M;ie||ue||F.current!=="touch"&&!_||Ye(W.nativeEvent)}},z=Bt("div",i,{ref:[Re,s,b.ref,$],state:V,props:[H,Oe,g,K]}),B=x.useMemo(()=>({selected:M,indexRef:oe,textRef:v,selectedByFocus:Q,hasRegistered:te}),[M,oe,v,Q,te]);return p.jsx(wR.Provider,{value:B,children:z})})),D3=x.forwardRef(function(i,s){const a=i.keepMounted??!1,{selected:c}=Wp();return a||c?p.jsx(_3,{...i,ref:s}):null}),_3=x.memo(x.forwardRef((n,i)=>{const{render:s,className:a,keepMounted:c,...f}=n,{selected:d}=Wp(),h=x.useRef(null),{transitionStatus:m,setMounted:g}=wd(d),v=x.useMemo(()=>({selected:d,transitionStatus:m}),[d,m]),b=Bt("span",n,{ref:[i,h],state:v,props:[{"aria-hidden":!0,children:"✔️"},f],stateAttributesMapping:Xu});return Fs({open:d,ref:h,onComplete(){d||g(!1)}}),b})),k3=x.memo(x.forwardRef(function(i,s){const{indexRef:a,textRef:c,selectedByFocus:f,hasRegistered:d}=Wp(),{selectedItemTextRef:h}=Wr(),{className:m,render:g,...v}=i,b=x.useCallback(C=>{if(!C||!d)return;const T=h.current===null||!h.current.isConnected;(f||T&&a.current===0)&&(h.current=C)},[h,a,f,d]);return Bt("div",i,{ref:[b,s,c],props:v})})),CR=x.createContext(void 0),TR=x.createContext(void 0),OR=x.createContext(void 0),jR=x.createContext("");function es(){const n=x.useContext(CR);if(!n)throw new Error(Gn(22));return n}function Td(){const n=x.useContext(TR);if(!n)throw new Error(Gn(23));return n}function Xs(){const n=x.useContext(OR);if(!n)throw new Error(Gn(24));return n}function AR(){return x.useContext(jR)}const Le={id:ge(n=>n.id),query:ge(n=>n.query),items:ge(n=>n.items),selectedValue:ge(n=>n.selectedValue),open:ge(n=>n.open),mounted:ge(n=>n.mounted),forceMounted:ge(n=>n.forceMounted),inline:ge(n=>n.inline),activeIndex:ge(n=>n.activeIndex),selectedIndex:ge(n=>n.selectedIndex),isActive:ge((n,i)=>n.activeIndex===i),isSelected:ge((n,i)=>{const s=n.isItemEqualToValue,a=n.selectedValue;return Array.isArray(a)?a.some(c=>Xi(c,i,s)):Xi(a,i,s)}),transitionStatus:ge(n=>n.transitionStatus),popupProps:ge(n=>n.popupProps),inputProps:ge(n=>n.inputProps),triggerProps:ge(n=>n.triggerProps),getItemProps:ge(n=>n.getItemProps),positionerElement:ge(n=>n.positionerElement),listElement:ge(n=>n.listElement),triggerElement:ge(n=>n.triggerElement),inputElement:ge(n=>n.inputElement),popupSide:ge(n=>n.popupSide),openMethod:ge(n=>n.openMethod),inputInsidePopup:ge(n=>n.inputInsidePopup),selectionMode:ge(n=>n.selectionMode),listRef:ge(n=>n.listRef),labelsRef:ge(n=>n.labelsRef),popupRef:ge(n=>n.popupRef),emptyRef:ge(n=>n.emptyRef),inputRef:ge(n=>n.inputRef),keyboardActiveRef:ge(n=>n.keyboardActiveRef),chipsContainerRef:ge(n=>n.chipsContainerRef),clearRef:ge(n=>n.clearRef),valuesRef:ge(n=>n.valuesRef),allValuesRef:ge(n=>n.allValuesRef),name:ge(n=>n.name),disabled:ge(n=>n.disabled),readOnly:ge(n=>n.readOnly),required:ge(n=>n.required),grid:ge(n=>n.grid),isGrouped:ge(n=>n.isGrouped),virtualized:ge(n=>n.virtualized),onOpenChangeComplete:ge(n=>n.onOpenChangeComplete),openOnInputClick:ge(n=>n.openOnInputClick),itemToStringLabel:ge(n=>n.itemToStringLabel),isItemEqualToValue:ge(n=>n.isItemEqualToValue),modal:ge(n=>n.modal),autoHighlight:ge(n=>n.autoHighlight),submitOnItemClick:ge(n=>n.submitOnItemClick)};function L3(n,i){return(s,a)=>{if(s==null)return!1;const c=vn(s,i);return n.contains(c,a)}}function U3(n,i,s){return(a,c)=>{if(a==null)return!1;if(!c)return!0;const f=vn(a,i),d=s!=null?vn(s,i):"";return d&&n.contains(d,c)&&d.length===c.length?!0:n.contains(f,c)}}const xS=new Map;function NR(n){return Array.isArray(n)?n.map(i=>NR(i)).join(","):n==null?"":String(n)}function H3(n={}){const i={usage:"search",sensitivity:"base",ignorePunctuation:!0,...n},s=`${NR(n.locale)}|${JSON.stringify(i)}`,a=xS.get(s);if(a)return a;const c=new Intl.Collator(n.locale,i),f={contains(d,h,m){if(!h)return!0;const g=vn(d,m);for(let v=0;v<=g.length-h.length;v+=1)if(c.compare(g.slice(v,v+h.length),h)===0)return!0;return!1},startsWith(d,h,m){if(!h)return!0;const g=vn(d,m);return c.compare(g.slice(0,h.length),h)===0},endsWith(d,h,m){if(!h)return!0;const g=vn(d,m),v=h.length;return g.length>=v&&c.compare(g.slice(g.length-v),h)===0}};return xS.set(s,f),f}const I3=H3;function V3(n){const i=x.useRef(""),s=x.useCallback(c=>{c.defaultPrevented||(i.current=c.pointerType,n(c,c.pointerType))},[n]);return{onClick:x.useCallback(c=>{if(c.detail===0){n(c,"keyboard");return}"pointerType"in c&&n(c,c.pointerType),n(c,i.current),i.current=""},[n]),onPointerDown:s}}function MR(n){const[i,s]=x.useState(null),a=_e((h,m)=>{n||s(m)}),c=x.useCallback(()=>{s(null)},[]),{onClick:f,onPointerDown:d}=V3(a);return x.useMemo(()=>({openMethod:i,reset:c,triggerProps:{onClick:f,onPointerDown:d}}),[i,c,f,d])}const zR=Symbol("none"),ws={value:zR,index:-1};function B3(n){const{id:i,onOpenChangeComplete:s,defaultSelectedValue:a=null,selectedValue:c,onSelectedValueChange:f,defaultInputValue:d,inputValue:h,selectionMode:m="none",onItemHighlighted:g,name:v,disabled:b=!1,readOnly:S=!1,required:C=!1,inputRef:T,grid:R=!1,items:j,filteredItems:O,filter:E,openOnInputClick:A=!0,autoHighlight:N=!1,keepHighlight:L=!1,highlightItemOnHover:D=!0,itemToStringLabel:_,itemToStringValue:M,isItemEqualToValue:Q=uR,virtualized:J=!1,inline:re=!1,fillInputOnItemPress:te=!0,modal:$=!1,limit:oe=-1,autoComplete:V="list",locale:H,submitOnItemClick:ne=!1}=n,{clearErrors:F}=jp(),{setDirty:se,validityData:K,shouldValidateOnChange:Re,setFilled:Ye,name:Oe,disabled:z,validation:B}=Eo(),W=pE({id:i}),ie=I3({locale:H}),[ue,me]=x.useState(!1),[ae,q]=x.useState(null),le=x.useRef([]),pe=x.useRef([]),Ke=x.useRef(null),Se=x.useRef(null),he=x.useRef(null),ye=x.useRef(!0),de=x.useRef(!1),Ce=x.useRef(null),He=x.useRef(null),je=x.useRef(null),Ee=x.useRef(ws),ve=x.useRef(null),we=x.useRef([]),xe=x.useRef([]),Xe=z||b,$e=Oe??v,Ve=m==="multiple",Ze=m==="single",lt=h!==void 0||d!==void 0,St=j!==void 0,qt=O!==void 0;let gt;N==="always"?gt="always":gt=N?"input-change":!1;const[Fe,mn]=Vs({controlled:c,default:Ve?a??Ul:a,name:"Combobox",state:"selectedValue"}),Sn=x.useMemo(()=>E===null?()=>!0:E!==void 0?E:Ze&&!ue?U3(ie,_,Fe):L3(ie,_),[E,Ze,Fe,ue,ie,_]),wl=hl(()=>lt?d??"":Ze?vn(Fe,_):"").current,[tn,it]=Vs({controlled:h,default:wl,name:"Combobox",state:"inputValue"}),[rt,gn]=Vs({controlled:n.open,default:n.defaultOpen,name:"Combobox",state:"open"}),Be=fR(j),tt=ae??(tn===""?"":String(tn).trim()),Tt=Ze?vn(Fe,_):"",Pt=Ze&&!ue&&tt!==""&&Tt!==""&&Tt.length===tt.length&&ie.contains(Tt,tt),Gt=Pt?"":tt,En=St&&qt&&Pt,pn=x.useMemo(()=>j?Be?j.flatMap(Ne=>Ne.items):j:Ul,[j,Be]),Yt=x.useMemo(()=>{if(O&&!En)return O;if(!j)return Ul;if(Be){const qe=j,nt=[];let Ie=0;for(const Qt of qe){if(oe>-1&&Ie>=oe)break;const nn=Gt===""?Qt.items:Qt.items.filter(ln=>Sn(ln,Gt,_));if(nn.length===0)continue;const Ol=oe>-1?oe-Ie:1/0,Vn=nn.slice(0,Ol);if(Vn.length>0){const ln={...Qt,items:Vn};nt.push(ln),Ie+=Vn.length}}return nt}if(Gt==="")return oe>-1?pn.slice(0,oe):pn;const Ne=[];for(const qe of pn){if(oe>-1&&Ne.length>=oe)break;Sn(qe,Gt,_)&&Ne.push(qe)}return Ne},[O,En,j,Be,Gt,oe,Sn,_,pn]),Zt=x.useMemo(()=>Be?Yt.flatMap(qe=>qe.items):Yt,[Yt,Be]),Qe=hl(()=>new Bs({id:W,selectedValue:Fe,open:rt,filter:Sn,query:tt,items:j,selectionMode:m,listRef:le,labelsRef:pe,popupRef:Ke,emptyRef:he,inputRef:Se,keyboardActiveRef:ye,chipsContainerRef:Ce,clearRef:He,valuesRef:we,allValuesRef:xe,selectionEventRef:je,name:$e,disabled:Xe,readOnly:S,required:C,grid:R,isGrouped:Be,virtualized:J,openOnInputClick:A,itemToStringLabel:_,isItemEqualToValue:Q,modal:$,autoHighlight:gt,submitOnItemClick:ne,hasInputValue:lt,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:re,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},positionerElement:null,listElement:null,triggerElement:null,inputElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,onOpenChangeComplete:s||en,setOpen:en,setInputValue:en,setSelectedValue:en,setIndices:en,onItemHighlighted:en,handleSelection:en,getItemProps:()=>fn,forceMount:en,requestSubmit:en})).current,Bl=m==="none"?tn:Fe,Wi=_e(g),vi=_e(s),ql=be(Qe,Le.activeIndex),Cl=be(Qe,Le.selectedIndex),Pl=be(Qe,Le.positionerElement),Hn=be(Qe,Le.listElement),il=be(Qe,Le.triggerElement),rl=be(Qe,Le.inputElement),Yn=be(Qe,Le.inline),Tl=be(Qe,Le.inputInsidePopup),ec=On(il),{mounted:Js,setMounted:ts,transitionStatus:Oo}=wd(rt),{openMethod:jo,triggerProps:$s,reset:tc}=MR(rt);gE({id:W,name:$e,commit:B.commit,value:Bl,controlRef:Tl?ec:Se,getValue:()=>Bl});const er=_e(()=>{j?pe.current=Zt.map(Ne=>vn(Ne,_)):Qe.set("forceMounted",!0)}),Ao=x.useRef(Fe);ke(()=>{Fe!==Ao.current&&er()},[er,Fe]);const Qn=_e(Ne=>{Qe.update(Ne);const qe=Ne.type||"none";if(Ne.activeIndex!==void 0)if(Ne.activeIndex===null)Ee.current!==ws&&(Ee.current=ws,Wi(void 0,xu(qe,void 0,{index:-1})));else{const nt=we.current[Ne.activeIndex];Ee.current={value:nt,index:Ne.activeIndex},Wi(nt,xu(qe,void 0,{index:Ne.activeIndex}))}}),Kn=_e((Ne,qe)=>{var nt;if(de.current=qe.reason===Mr,(nt=n.onInputValueChange)==null||nt.call(n,Ne,qe),!qe.isCanceled){if(qe.reason===Os){const Ie=Ne.trim()!=="";Ie&&me(!0),ve.current={hasQuery:Ie},Ie&>&&Qe.state.activeIndex==null&&Qe.set("activeIndex",0)}it(Ne)}}),Fn=_e((Ne,qe)=>{var nt;rt!==Ne&&(qe.reason==="escape-key"&&St&&Zt.length===0&&!Qe.state.emptyRef.current&&qe.allowPropagation(),(nt=n.onOpenChange)==null||nt.call(n,Ne,qe),!qe.isCanceled&&(!Ne&&ue&&(Ze?(q(tt),tt===""&&me(!1)):Ve&&(Yn||Tl?Qn({activeIndex:null}):q(tt),Kn("",We(Mr,qe.event)))),gn(Ne)))}),Ut=_e((Ne,qe)=>{if(f==null||f(Ne,qe),qe.isCanceled)return;mn(Ne),(m==="none"&&Ke.current&&te||Ze&&!Qe.state.inputInsidePopup)&&Kn(vn(Ne,_),We(qe.reason,qe.event)),Ze&&Ne!=null&&qe.reason!==Os&&ue&&q(tt)}),In=_e((Ne,qe)=>{var Vn;let nt=qe;if(nt===void 0){if(ql===null)return;nt=we.current[ql]}const Ie=Pn(Ne),Qt=je.current??Ne;je.current=null;const nn=We(Pf,Qt),Ol=(Vn=Ie==null?void 0:Ie.closest("a"))==null?void 0:Vn.getAttribute("href");if(Ol){Ol.startsWith("#")&&Fn(!1,nn);return}if(Ve){const ln=Array.isArray(Fe)?Fe:[],Dd=js(ln,nt,Qe.state.isItemEqualToValue)?cR(ln,nt,Qe.state.isItemEqualToValue):[...ln,nt];if(Ut(Dd,nn),!(Se.current?Se.current.value.trim()!=="":!1))return;Qe.state.inputInsidePopup?Kn("",We(Mr,nn.event)):Fn(!1,nn)}else Ut(nt,nn),Fn(!1,nn)}),$l=_e(()=>{var qe;if(!Qe.state.submitOnItemClick)return;const Ne=(qe=Qe.state.inputElement)==null?void 0:qe.form;Ne&&typeof Ne.requestSubmit=="function"&&Ne.requestSubmit()}),Ws=_e(()=>{if(ts(!1),vi==null||vi(!1),me(!1),tc(),q(null),Qn(m==="none"?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Ve&&Se.current&&Se.current.value!==""&&!de.current&&Kn("",We(Mr)),Ze)if(Qe.state.inputInsidePopup)Se.current&&Se.current.value!==""&&Kn("",We(Mr));else{const Ne=vn(Fe,_);Se.current&&Se.current.value!==Ne&&Kn(Ne,We(Ne===""?Mr:dl))}}),Nd=x.useMemo(()=>Yn&&Pl?{current:Pl.closest('[role="dialog"]')}:Ke,[Yn,Pl]);Fs({enabled:!n.actionsRef,open:rt,ref:Nd,onComplete(){rt||Ws()}}),x.useImperativeHandle(n.actionsRef,()=>({unmount:Ws}),[Ws]),ke(function(){if(rt||m==="none")return;const qe=j?pn:xe.current;if(Ve){const nt=Array.isArray(Fe)?Fe:[],Ie=nt[nt.length-1],Qt=bo(qe,Ie,Q);Qn({selectedIndex:Qt===-1?null:Qt})}else{const nt=bo(qe,Fe,Q);Qn({selectedIndex:nt===-1?null:nt})}},[rt,Fe,j,m,pn,Ve,Q,Qn]),ke(()=>{j&&(we.current=Zt,le.current.length=Zt.length)},[j,Zt]),ke(()=>{const Ne=ve.current;if(Ne&&(Ne.hasQuery?gt&&Qe.set("activeIndex",0):gt==="always"&&Qe.set("activeIndex",0),ve.current=null),!rt&&!Yn)return;const nt=St||qt?Zt:we.current,Ie=Qe.state.activeIndex;if(Ie==null){if(gt==="always"&&nt.length>0){Qe.set("activeIndex",0);return}Ee.current!==ws&&(Ee.current=ws,Qe.state.onItemHighlighted(void 0,xu(dl,void 0,{index:-1})));return}if(Ie>=nt.length){Ee.current!==ws&&(Ee.current=ws,Qe.state.onItemHighlighted(void 0,xu(dl,void 0,{index:-1}))),Qe.set("activeIndex",null);return}const Qt=nt[Ie],nn=Ee.current.value,Ol=nn!==zR&&Qe.state.isItemEqualToValue(Qt,nn);(Ee.current.index!==Ie||!Ol)&&(Ee.current={value:Qt,index:Ie},Qe.state.onItemHighlighted(Qt,xu(dl,void 0,{index:Ie})))},[ql,gt,qt,St,Zt,Yn,rt,Qe]),ke(()=>{if(!j||m==="none")return;const Ne=pn;if(Ve){const Ie=Array.isArray(Fe)?Fe:Ul,Qt=Ie.filter(nn=>js(Ne,nn,Qe.state.isItemEqualToValue));Qt.length!==Ie.length&&mn(Qt);return}if(Fe==null?!0:js(Ne,Fe,Qe.state.isItemEqualToValue))return;let nt=null;if(a!=null&&js(Ne,a,Qe.state.isItemEqualToValue)&&(nt=a),mn(nt),!Qe.state.inputInsidePopup){const Ie=vn(nt,_);Se.current&&Se.current.value!==Ie&&Kn(Ie,We(dl))}},[j,pn,Ve,m,Fe,a,mn,_,Qe,Kn]),ke(()=>{if(m==="none"){Ye(String(tn)!=="");return}Ye(Ve?Array.isArray(Fe)&&Fe.length>0:Fe!=null)},[Ye,m,tn,Fe,Ve]),x.useEffect(()=>{St&>&&Zt.length===0&&Qn({activeIndex:null})},[St,gt,Zt.length,Qn]),ju(tt,()=>{!rt||tt===""||tt===String(wl)||me(!0)}),ju(Fe,()=>{if(m!=="none"&&(F($e),se(Fe!==K.initialValue),Re()?B.commit(Fe):B.commit(Fe,!0),Ve&&Qe.state.selectedIndex!==null&&(!Array.isArray(Fe)||Fe.length===0)&&Qn({activeIndex:null,selectedIndex:null}),Ze&&!lt&&!Tl)){const Ne=vn(Fe,_);tn!==Ne&&Kn(Ne,We(dl))}}),ju(tn,()=>{m==="none"&&(F($e),se(tn!==K.initialValue),Re()?B.commit(tn):B.commit(tn,!0))}),ju(j,()=>{if(!Ze||lt||Tl||ue)return;const Ne=vn(Fe,_);tn!==Ne&&Kn(Ne,We(dl))});const ea=Pp({open:Yn?!0:rt,onOpenChange:Fn,elements:{reference:Tl?il:rl,floating:Pl}});let ta,xi;Yn||(ta=R?"grid":"listbox",xi=rt?"true":"false");const na=x.useMemo(()=>{const Ne=(rl==null?void 0:rl.tagName)==="INPUT",qe=Ne||rt,nt=Ne?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return qe&&(nt.role="combobox",nt["aria-expanded"]=xi,nt["aria-haspopup"]=ta,nt["aria-controls"]=rt?Hn==null?void 0:Hn.id:void 0,nt["aria-autocomplete"]=V),{reference:nt,floating:{role:"presentation"}}},[rl,rt,xi,ta,Hn==null?void 0:Hn.id,V]),la=Hp(ea,{enabled:!S&&!Xe&&A,event:"mousedown-only",toggle:!1,touchOpenDelay:Tl?0:50}),Si=Vp(ea,{enabled:!S&&!Xe&&!Yn,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:Yn?!0:void 0,outsidePress(Ne){const qe=Pn(Ne);return!Rt(il,qe)&&!Rt(He.current,qe)&&!Rt(Ce.current,qe)}}),tr=iR(ea,{enabled:!S&&!Xe,id:W,listRef:le,activeIndex:ql,selectedIndex:Cl,virtual:!0,loopFocus:!0,allowEscape:!gt,focusItemOnOpen:ue||m==="none"&&!gt?!1:"auto",focusItemOnHover:D,resetOnPointerLeave:!L,cols:R?2:1,orientation:R?"horizontal":void 0,disabledIndices:Ul,onNavigate(Ne,qe){!qe&&!rt||Oo==="ending"||Qn(qe?{activeIndex:Ne,type:ye.current?"keyboard":"pointer"}:{activeIndex:Ne})}}),{getReferenceProps:Ei,getFloatingProps:Wl,getItemProps:Jt}=Gp([na,la,Si,tr]);vE(()=>{Qe.update({inline:re,popupProps:Wl(),inputProps:Ei(),triggerProps:$s,getItemProps:Jt,setOpen:Fn,setInputValue:Kn,setSelectedValue:Ut,setIndices:Qn,onItemHighlighted:Wi,handleSelection:In,forceMount:er,requestSubmit:$l})}),ke(()=>{Qe.update({id:W,selectedValue:Fe,open:rt,mounted:Js,transitionStatus:Oo,items:j,inline:re,popupProps:Wl(),inputProps:Ei(),triggerProps:$s,openMethod:jo,getItemProps:Jt,selectionMode:m,name:$e,disabled:Xe,readOnly:S,required:C,grid:R,isGrouped:Be,virtualized:J,onOpenChangeComplete:vi,openOnInputClick:A,itemToStringLabel:_,modal:$,autoHighlight:gt,isItemEqualToValue:Q,submitOnItemClick:ne,hasInputValue:lt,requestSubmit:$l})},[Qe,W,Fe,rt,Js,Oo,j,Wl,Ei,Jt,jo,$s,m,$e,Xe,S,C,B,R,Be,J,vi,A,_,$,Q,ne,lt,re,$l,gt]);const nc=Yi(T,B.inputRef),lc=x.useMemo(()=>({query:tt,filteredItems:Yt,flatFilteredItems:Zt}),[tt,Yt,Zt]),ic=x.useMemo(()=>Array.isArray(Bl)?"":qs(Bl,M),[Bl,M]),Ri=Ve&&Array.isArray(Fe)&&Fe.length>0,nr=x.useMemo(()=>!Ve||!Array.isArray(Fe)||!$e?null:Fe.map(Ne=>{const qe=qs(Ne,M);return p.jsx("input",{type:"hidden",name:$e,value:qe},qe)}),[Ve,Fe,$e,M]),Md=p.jsxs(x.Fragment,{children:[n.children,p.jsx("input",{...B.getInputValidationProps({onFocus(){var Ne;if(Tl){il==null||il.focus();return}(Ne=Se.current||il)==null||Ne.focus()},onChange(Ne){if(Ne.nativeEvent.defaultPrevented)return;const qe=Ne.target.value,nt=We(Os,Ne.nativeEvent);function Ie(){if(Ve)return;if(m==="none"){se(qe!==K.initialValue),Kn(qe,nt),Re()&&B.commit(qe);return}const Qt=we.current.find(nn=>qs(nn,M).toLowerCase()===qe.toLowerCase());Qt!=null&&(se(Qt!==K.initialValue),Ut==null||Ut(Qt,nt),Re()&&B.commit(Qt))}j?Ie():(er(),queueMicrotask(Ie))}}),id:W,name:Ve||m==="none"?void 0:$e,disabled:Xe,required:C&&!Ri,readOnly:S,value:ic,ref:nc,style:dd,tabIndex:-1,"aria-hidden":!0}),nr]});return p.jsx(CR.Provider,{value:Qe,children:p.jsx(TR.Provider,{value:ea,children:p.jsx(OR.Provider,{value:lc,children:p.jsx(jR.Provider,{value:tn,children:Md})})})})}function q3(n){const{multiple:i=!1,defaultValue:s,value:a,onValueChange:c,...f}=n;return p.jsx(B3,{...f,selectionMode:i?"multiple":"single",selectedValue:a,defaultSelectedValue:s,onSelectedValueChange:c})}const P3=x.createContext(void 0);function G3(){return x.useContext(P3)}const DR=x.createContext(void 0);function ey(n){const i=x.useContext(DR);if(i===void 0&&!n)throw new Error(Gn(21));return i}const Y3={...Yp,...Op,popupSide:n=>n?{"data-popup-side":n}:null,listEmpty:n=>n?{"data-list-empty":""}:null},Q3=x.forwardRef(function(i,s){const{render:a,className:c,disabled:f=!1,id:d,...h}=i,{state:m,disabled:g,setTouched:v,setFocused:b,validationMode:S,validation:C}=Eo(),{labelId:T}=Qu(),R=G3(),O=!!ey(!0),E=es(),{filteredItems:A}=Xs(),N=AR(),L=hd(d),D=Xp(),_=be(E,Le.disabled),M=be(E,Le.readOnly),Q=be(E,Le.name),J=be(E,Le.selectionMode),re=be(E,Le.autoHighlight),te=be(E,Le.inputProps),$=be(E,Le.triggerProps),oe=be(E,Le.open),V=be(E,Le.mounted),H=be(E,Le.selectedValue),ne=be(E,Le.popupSide),F=be(E,Le.positionerElement),se=!!re,K=V&&F?ne:null,Re=g||_||f,Ye=A.length===0,[Oe,z]=x.useState(null),B=x.useRef(!1),W=_e(ae=>{const q=O||E.state.inline;q&&!E.state.hasInputValue&&E.state.setInputValue("",We(dl)),E.update({inputElement:ae,inputInsidePopup:q})}),ie=x.useMemo(()=>({...m,open:oe,disabled:Re,readOnly:M,popupSide:K,listEmpty:Ye}),[m,oe,Re,M,K,Ye]);function ue(ae){if(!R)return;let q;const{highlightedChipIndex:le}=R;if(le!==void 0){if(ae.key==="ArrowLeft")ae.preventDefault(),le>0?q=le-1:q=void 0;else if(ae.key==="ArrowRight")ae.preventDefault(),le<H.length-1?q=le+1:q=void 0;else if(ae.key==="Backspace"||ae.key==="Delete"){ae.preventDefault();const pe=le>=H.length-1?H.length-2:le;q=pe>=0?pe:void 0,E.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"})}return q}return ae.key==="ArrowLeft"&&(ae.currentTarget.selectionStart??0)===0&&H.length>0?(ae.preventDefault(),q=Math.max(H.length-1,0)):ae.key==="Backspace"&&ae.currentTarget.value===""&&H.length>0&&(E.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),ae.preventDefault()),q}return Bt("input",i,{state:ie,ref:[s,E.state.inputRef,W],props:[te,$,{type:"text",value:i.value??Oe??N,"aria-readonly":M||void 0,"aria-labelledby":T,disabled:Re,readOnly:M,...J==="none"&&Q&&{name:Q},id:L,onFocus(){b(!0)},onBlur(){if(v(!0),b(!1),S==="onBlur"){const ae=J==="none"?N:H;C.commit(ae)}},onCompositionStart(ae){Jf||(B.current=!0,z(ae.currentTarget.value))},onCompositionEnd(ae){B.current=!1;const q=ae.currentTarget.value;z(null),E.state.setInputValue(q,We(Os,ae.nativeEvent))},onChange(ae){if(B.current){const Ke=ae.currentTarget.value;z(Ke),Ke===""&&!E.state.openOnInputClick&&!E.state.inputInsidePopup&&E.state.setOpen(!1,We(Mr,ae.nativeEvent));const Se=Ke.trim(),he=se&&Se!=="";!M&&!Re&&Se!==""&&(E.state.setOpen(!0,We(Os,ae.nativeEvent)),se||E.state.setIndices({activeIndex:null,selectedIndex:null,type:E.state.keyboardActiveRef.current?"keyboard":"pointer"})),oe&&E.state.activeIndex!==null&&!he&&E.state.setIndices({activeIndex:null,selectedIndex:null,type:E.state.keyboardActiveRef.current?"keyboard":"pointer"});return}E.state.setInputValue(ae.currentTarget.value,We(Os,ae.nativeEvent));const q=ae.currentTarget.value==="",le=We(Mr,ae.nativeEvent);q&&!E.state.inputInsidePopup&&(J==="single"&&E.state.setSelectedValue(null,le),E.state.openOnInputClick||E.state.setOpen(!1,le));const pe=ae.currentTarget.value.trim();!M&&!Re&&pe!==""&&(E.state.setOpen(!0,We(Os,ae.nativeEvent)),se||E.state.setIndices({activeIndex:null,selectedIndex:null,type:E.state.keyboardActiveRef.current?"keyboard":"pointer"})),oe&&E.state.activeIndex!==null&&!se&&E.state.setIndices({activeIndex:null,selectedIndex:null,type:E.state.keyboardActiveRef.current?"keyboard":"pointer"})},onKeyDown(ae){var Se,he;if(Re||M||ae.ctrlKey||ae.shiftKey||ae.altKey||ae.metaKey)return;E.state.keyboardActiveRef.current=!0;const q=ae.currentTarget,le=q.scrollWidth-q.clientWidth,pe=D==="rtl";if(ae.key==="Home"){sn(ae);const ye=Q0&&pe?q.value.length:0;q.setSelectionRange(ye,ye),q.scrollLeft=0;return}if(ae.key==="End"){sn(ae);const ye=Q0&&pe?0:q.value.length;q.setSelectionRange(ye,ye),q.scrollLeft=pe?-le:le;return}if(!V&&ae.key==="Escape"){const ye=J==="multiple"&&Array.isArray(H)?H.length===0:H===null,de=We(bE,ae.nativeEvent),Ce=J==="multiple"?[]:null;E.state.setInputValue("",de),E.state.setSelectedValue(Ce,de),!ye&&!E.state.inline&&!de.isPropagationAllowed&&ae.stopPropagation();return}if(R&&ae.key==="Backspace"&&q.value===""&&R.highlightedChipIndex===void 0&&Array.isArray(H)&&H.length>0){const ye=H.slice(0,-1);E.state.setIndices({activeIndex:null,selectedIndex:null,type:E.state.keyboardActiveRef.current?"keyboard":"pointer"}),E.state.setSelectedValue(ye,We(dl,ae.nativeEvent));return}const Ke=ue(ae);if(R==null||R.setHighlightedChipIndex(Ke),Ke!==void 0?(Se=R==null?void 0:R.chipsRef.current[Ke])==null||Se.focus():(he=E.state.inputRef.current)==null||he.focus(),ae.which!==229&&ae.key==="Enter"&&oe){const ye=E.state.activeIndex,de=ae.nativeEvent;if(ye===null){E.state.setOpen(!1,We(dl,de));return}sn(ae);const Ce=E.state.listRef.current[ye];Ce&&(E.state.selectionEventRef.current=de,Ce.click(),E.state.selectionEventRef.current=null)}},onPointerMove(){E.state.keyboardActiveRef.current=!1},onPointerDown(){E.state.keyboardActiveRef.current=!1}},C?C.getValidationProps(h):h],stateAttributesMapping:Y3})}),Vf=2,K3={...Yp,...Op},F3=x.forwardRef(function(i,s){const{render:a,className:c,nativeButton:f=!0,disabled:d=!1,...h}=i,{state:m,disabled:g,setTouched:v,setFocused:b,validationMode:S,validation:C}=Eo(),{labelId:T}=Qu(),R=es(),j=be(R,Le.selectionMode),O=be(R,Le.disabled),E=be(R,Le.readOnly),A=be(R,Le.listElement),N=be(R,Le.triggerProps),L=be(R,Le.triggerElement),D=be(R,Le.inputInsidePopup),_=be(R,Le.open),M=be(R,Le.selectedValue),Q=be(R,Le.activeIndex),J=be(R,Le.selectedIndex),re=Td(),te=AR(),$=El(),oe=g||O||d,V=x.useRef("");function H(B){V.current=B.pointerType}const ne=re.select("domReferenceElement");x.useEffect(()=>{D&&L&&L!==ne&&re.set("domReferenceElement",L)},[L,ne,re,D]);const{reference:F}=rR(re,{enabled:!_&&!E&&!O&&j==="single",listRef:R.state.labelsRef,activeIndex:Q,selectedIndex:J,onMatch(B){const W=R.state.valuesRef.current[B];W!==void 0&&R.state.setSelectedValue(W,We("none"))}}),{reference:se}=Hp(re,{enabled:!E&&!O,event:"mousedown"}),{buttonRef:K,getButtonProps:Re}=Yu({native:f,disabled:oe}),Ye=x.useMemo(()=>({...m,open:_,disabled:oe}),[m,_,oe]),Oe=_e(B=>{R.set("triggerElement",B)});return Bt("button",i,{ref:[s,K,Oe],state:Ye,props:[N,se,F,{tabIndex:D?0:-1,disabled:oe,role:D?"combobox":void 0,"aria-expanded":_?"true":"false","aria-haspopup":D?"dialog":"listbox","aria-controls":_?A==null?void 0:A.id:void 0,"aria-readonly":E||void 0,"aria-labelledby":T,onPointerDown:H,onPointerEnter:H,onFocus(){b(!0),!(oe||E)&&$.start(0,R.state.forceMount)},onBlur(){if(v(!0),b(!1),S==="onBlur"){const B=j==="none"?te:M;C.commit(B)}},onMouseDown(B){var ue;if(oe||E||(D||re.set("domReferenceElement",B.currentTarget),R.state.forceMount(),V.current!=="touch"&&((ue=R.state.inputRef.current)==null||ue.focus(),D||B.preventDefault()),_))return;const W=Fi(B.currentTarget);function ie(me){if(!L)return;const ae=Pn(me),q=R.state.positionerElement,le=R.state.listElement;if(Rt(L,ae)||Rt(q,ae)||Rt(le,ae)||ae===L)return;const pe=dR(L),Ke=me.clientX>=pe.left-Vf&&me.clientX<=pe.right+Vf,Se=me.clientY>=pe.top-Vf&&me.clientY<=pe.bottom+Vf;Ke&&Se||R.state.setOpen(!1,We("cancel-open",me))}D&&W.addEventListener("mouseup",ie,{once:!0})},onKeyDown(B){var W;oe||E||(B.key==="ArrowDown"||B.key==="ArrowUp")&&(sn(B),R.state.setOpen(!0,We(Gf,B.nativeEvent)),(W=R.state.inputRef.current)==null||W.focus())}},C?C.getValidationProps(h):h,Re],stateAttributesMapping:K3})}),X3=x.createContext(null);function Z3(){return x.useContext(X3)}function J3(n){const{children:i}=n,{filteredItems:s}=Xs(),a=Z3(),c=a?a.items:s;return c?p.jsx(x.Fragment,{children:c.map(i)}):null}const $3=x.forwardRef(function(i,s){var a;const{render:c,className:f,children:d,...h}=i,m=es(),g=Td(),v=!!ey(!0),{filteredItems:b}=Xs(),S=be(m,Le.items),C=be(m,Le.labelsRef),T=be(m,Le.listRef),R=be(m,Le.selectionMode),j=be(m,Le.grid),O=be(m,Le.popupProps),E=be(m,Le.disabled),A=be(m,Le.readOnly),N=be(m,Le.virtualized),L=R==="multiple",D=b.length===0,_=_e($=>{m.set("positionerElement",$)}),M=_e($=>{m.set("listElement",$)}),Q=x.useMemo(()=>typeof d=="function"?a||(a=p.jsx(J3,{children:d})):d,[d]),J=x.useMemo(()=>({empty:D}),[D]),re=g.useState("floatingId"),te=Bt("div",i,{state:J,ref:[s,M,v?null:_],props:[O,{children:Q,tabIndex:-1,id:re,role:j?"grid":"listbox","aria-multiselectable":L?"true":void 0,onKeyDown($){if(!(E||A)&&$.key==="Enter"){const oe=m.state.activeIndex;if(oe==null)return;sn($);const V=$.nativeEvent,H=m.state.listRef.current[oe];H&&(m.state.selectionEventRef.current=V,H.click(),m.state.selectionEventRef.current=null)}},onKeyDownCapture(){m.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){m.state.keyboardActiveRef.current=!1}},h]});return N?te:p.jsx(Fp,{elementsRef:T,labelsRef:S?void 0:C,children:te})}),_R=x.createContext(void 0);function W3(){const n=x.useContext(_R);if(n===void 0)throw new Error(Gn(20));return n}const e4=x.forwardRef(function(i,s){const{keepMounted:a=!1,...c}=i,f=es(),d=be(f,Le.mounted),h=be(f,Le.forceMounted);return d||a||h?p.jsx(_R.Provider,{value:a,children:p.jsx(kp,{ref:s,...c})}):null}),t4=x.forwardRef(function(i,s){const{render:a,className:c,anchor:f,positionMethod:d="absolute",side:h="bottom",align:m="center",sideOffset:g=0,alignOffset:v=0,collisionBoundary:b="clipping-ancestors",collisionPadding:S=5,arrowPadding:C=5,sticky:T=!1,disableAnchorTracking:R=!1,collisionAvoidance:j=fE,...O}=i,E=es(),{filteredItems:A}=Xs(),N=Td(),L=W3(),D=be(E,Le.modal),_=be(E,Le.open),M=be(E,Le.mounted),Q=be(E,Le.openMethod),J=be(E,Le.triggerElement),re=be(E,Le.inputElement),te=be(E,Le.inputInsidePopup),$=A.length===0,V=gR({anchor:f??(te?J:re),floatingRootContext:N,positionMethod:d,mounted:M,side:h,sideOffset:g,align:m,alignOffset:v,arrowPadding:C,collisionBoundary:b,collisionPadding:S,sticky:T,disableAnchorTracking:R,keepMounted:L,collisionAvoidance:j,lazyFlip:!0});Kp(_&&D&&Q!=="touch",J);const H=x.useMemo(()=>{const Re={...V.positionerStyles};return _||(Re.pointerEvents="none"),{role:"presentation",hidden:!M,style:Re}},[_,M,V.positionerStyles]),ne=x.useMemo(()=>({open:_,side:V.side,align:V.align,anchorHidden:V.anchorHidden,empty:$}),[_,V.side,V.align,V.anchorHidden,$]);ke(()=>{E.set("popupSide",V.side)},[E,V.side]);const F=x.useMemo(()=>({side:V.side,align:V.align,arrowRef:V.arrowRef,arrowUncentered:V.arrowUncentered,arrowStyles:V.arrowStyles,anchorHidden:V.anchorHidden,isPositioned:V.isPositioned}),[V.side,V.align,V.arrowRef,V.arrowUncentered,V.arrowStyles,V.anchorHidden,V.isPositioned]),se=_e(Re=>{E.set("positionerElement",Re)}),K=Bt("div",i,{state:ne,ref:[s,se],props:[H,O],stateAttributesMapping:Ro});return p.jsxs(DR.Provider,{value:F,children:[M&&D&&p.jsx(Zp,{inert:Qp(!_),cutout:re??J}),K]})}),n4={...Ro,...Xu},l4=x.forwardRef(function(i,s){const{render:a,className:c,initialFocus:f,finalFocus:d,...h}=i,m=es(),g=ey(),v=Td(),{filteredItems:b}=Xs(),S=be(m,Le.mounted),C=be(m,Le.open),T=be(m,Le.openMethod),R=be(m,Le.transitionStatus),j=be(m,Le.inputInsidePopup),O=be(m,Le.inputElement),E=b.length===0;Fs({open:C,ref:m.state.popupRef,onComplete(){C&&m.state.onOpenChangeComplete(!0)}});const A=x.useMemo(()=>({open:C,side:g.side,align:g.align,anchorHidden:g.anchorHidden,transitionStatus:R,empty:E}),[C,g.side,g.align,g.anchorHidden,R,E]),N=Bt("div",i,{state:A,ref:[s,m.state.popupRef],props:[{role:j?"dialog":"presentation",tabIndex:-1,onFocus(M){var J;const Q=Pn(M.nativeEvent);T!=="touch"&&(Rt(m.state.listElement,Q)||Q===M.currentTarget)&&((J=m.state.inputRef.current)==null||J.focus())}},RR(R),h],stateAttributesMapping:n4}),D=f===void 0?j?M=>M==="touch"?m.state.popupRef.current:O:!1:f;let _;return d!=null?_=d:_=j?void 0:!1,p.jsx(Up,{context:v,disabled:!S,modal:!j,openInteractionType:T,initialFocus:D,returnFocus:_,children:N})}),i4=x.createContext(void 0),r4=x.createContext(!1);function s4(){return x.useContext(r4)}const a4=x.memo(x.forwardRef(function(i,s){const{render:a,className:c,value:f=null,index:d,disabled:h=!1,nativeButton:m=!1,...g}=i,v=x.useRef(!1),b=x.useRef(null),S=$p({index:d,textRef:b,indexGuessBehavior:Jp.GuessFromOrder}),C=es(),T=s4(),{flatFilteredItems:R}=Xs(),j=be(C,Le.open),O=be(C,Le.selectionMode),E=be(C,Le.readOnly),A=be(C,Le.virtualized),N=be(C,Le.isItemEqualToValue),L=O!=="none",D=d??(A?bo(R,f,N):S.index),_=S.index!==-1,M=be(C,Le.id),Q=be(C,Le.isActive,D),J=be(C,Le.isSelected,f),re=be(C,Le.items),te=be(C,Le.getItemProps),$=x.useRef(null),oe=M!=null&&_?`${M}-${D}`:void 0,V=J&&L;ke(()=>{if(!(_&&(A||d!=null)))return;const B=C.state.listRef.current;return B[D]=$.current,()=>{delete B[D]}},[_,A,D,d,C]),ke(()=>{if(!_||re)return;const z=C.state.valuesRef.current;return z[D]=f,O!=="none"&&C.state.allValuesRef.current.push(f),()=>{delete z[D]}},[_,re,D,f,C,O]),ke(()=>{if(!j){v.current=!1;return}if(!_||re)return;const z=C.state.selectedValue,B=Array.isArray(z)?z[z.length-1]:z;Xi(B,f,N)&&C.set("selectedIndex",D)},[_,re,j,C,D,f,N]);const H=x.useMemo(()=>({disabled:h,selected:V,highlighted:Q}),[h,V,Q]),ne=te({active:Q,selected:V});ne.id=void 0,ne.onFocus=void 0;const{getButtonProps:F,buttonRef:se}=Yu({disabled:h,focusableWhenDisabled:!0,native:m});function K(z){function B(){C.state.handleSelection(z,f)}C.state.submitOnItemClick?(Qi.flushSync(B),C.state.requestSubmit()):B()}const Re={id:oe,role:T?"gridcell":"option","aria-disabled":h||void 0,"aria-selected":L?V:void 0,tabIndex:void 0,onPointerDownCapture(z){v.current=!0,z.preventDefault()},onClick(z){h||E||K(z.nativeEvent)},onMouseUp(z){const B=v.current;v.current=!1,!(h||E||z.button!==0||B||!Q)&&K(z.nativeEvent)}},Ye=Bt("div",i,{ref:[se,s,S.ref,$],state:H,props:[ne,Re,g,F]}),Oe=x.useMemo(()=>({selected:V,textRef:b}),[V,b]);return p.jsx(i4.Provider,{value:Oe,children:Ye})})),o4=x.forwardRef(function(i,s){const{render:a,className:c,children:f,...d}=i,{filteredItems:h}=Xs(),m=es(),g=h.length===0?f:null;return Bt("div",i,{ref:[s,m.state.emptyRef],props:[{children:g,role:"status","aria-live":"polite","aria-atomic":!0},d]})});function u4(n){return n==null||n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}const c4="data-composite-item-active",f4=[];function d4(n){const{itemSizes:i,cols:s=1,loopFocus:a=!0,dense:c=!1,orientation:f="both",direction:d,highlightedIndex:h,onHighlightedIndexChange:m,rootRef:g,enableHomeAndEndKeys:v=!1,stopEventPropagation:b=!1,disabledIndices:S,modifierKeys:C=f4}=n,[T,R]=x.useState(0),j=s>1,O=x.useRef(null),E=Yi(O,g),A=x.useRef([]),N=x.useRef(!1),L=h??T,D=_e((Q,J=!1)=>{if((m??R)(Q),J){const re=A.current[Q];bS(O.current,re,d,f)}}),_=_e(Q=>{if(Q.size===0||N.current)return;N.current=!0;const J=Array.from(Q.keys()),re=J.find($=>$==null?void 0:$.hasAttribute(c4))??null,te=re?J.indexOf(re):-1;te!==-1&&D(te),bS(O.current,re,d,f)}),M=x.useMemo(()=>({"aria-orientation":f==="both"?void 0:f,ref:E,onFocus(Q){!O.current||!yS(Q.target)||Q.target.setSelectionRange(0,Q.target.value.length??0)},onKeyDown(Q){const J=v?R3:SR;if(!J.has(Q.key)||h4(Q,C)||!O.current)return;const te=d==="rtl",$=te?ku:$a,oe={horizontal:$,vertical:Ns,both:$}[f],V=te?$a:ku,H={horizontal:V,vertical:Ja,both:V}[f];if(yS(Q.target)&&!u4(Q.target)){const Oe=Q.target.selectionStart,z=Q.target.selectionEnd,B=Q.target.value??"";if(Oe==null||Q.shiftKey||Oe!==z||Q.key!==H&&Oe<B.length||Q.key!==oe&&Oe>0)return}let ne=L;const F=Yf(A,S),se=Wg(A,S);if(j){const Oe=i||Array.from({length:A.current.length},()=>({width:1,height:1})),z=_E(Oe,s,c),B=z.findIndex(ie=>ie!=null&&!Qr(A,ie,S)),W=z.reduce((ie,ue,me)=>ue!=null&&!Qr(A,ue,S)?me:ie,-1);ne=z[DE({current:z.map(ie=>ie?A.current[ie]:null)},{event:Q,orientation:f,loopFocus:a,cols:s,disabledIndices:LE([...S||A.current.map((ie,ue)=>Qr(A,ue)?ue:void 0),void 0],z),minIndex:B,maxIndex:W,prevIndex:kE(L>se?F:L,Oe,z,s,Q.key===Ns?"bl":Q.key===$a?"tr":"tl"),rtl:te})]}const K={horizontal:[$],vertical:[Ns],both:[$,Ns]}[f],Re={horizontal:[V],vertical:[Ja],both:[V,Ja]}[f],Ye=j?J:{horizontal:v?S3:vR,vertical:v?E3:xR,both:J}[f];v&&(Q.key===Zu?ne=F:Q.key===Ju&&(ne=se)),ne===L&&(K.includes(Q.key)||Re.includes(Q.key))&&(a&&ne===se&&K.includes(Q.key)?ne=F:a&&ne===F&&Re.includes(Q.key)?ne=se:ne=Ln(A,{startingIndex:ne,decrement:Re.includes(Q.key),disabledIndices:S})),ne!==L&&!Fa(A,ne)&&(b&&Q.stopPropagation(),Ye.has(Q.key)&&Q.preventDefault(),D(ne,!0),queueMicrotask(()=>{var Oe;(Oe=A.current[ne])==null||Oe.focus()}))}}),[s,c,d,S,A,v,L,j,i,a,E,C,D,f,b]);return x.useMemo(()=>({props:M,highlightedIndex:L,onHighlightedIndexChange:D,elementsRef:A,disabledIndices:S,onMapChange:_,relayKeyboardEvent:M.onKeyDown}),[M,L,D,A,S,_])}function h4(n,i){for(const s of j3.values())if(!i.includes(s)&&n.getModifierState(s))return!0;return!1}function m4(n){const{render:i,className:s,refs:a=Ul,props:c=Ul,state:f=fn,stateAttributesMapping:d,highlightedIndex:h,onHighlightedIndexChange:m,orientation:g,dense:v,itemSizes:b,loopFocus:S,cols:C,enableHomeAndEndKeys:T,onMapChange:R,stopEventPropagation:j=!0,rootRef:O,disabledIndices:E,modifierKeys:A,highlightItemOnHover:N=!1,tag:L="div",...D}=n,_=Xp(),{props:M,highlightedIndex:Q,onHighlightedIndexChange:J,elementsRef:re,onMapChange:te,relayKeyboardEvent:$}=d4({itemSizes:b,cols:C,loopFocus:S,dense:v,orientation:g,highlightedIndex:h,onHighlightedIndexChange:m,rootRef:O,stopEventPropagation:j,enableHomeAndEndKeys:T,direction:_,disabledIndices:E,modifierKeys:A}),oe=Bt(L,n,{state:f,ref:a,props:[M,...c,D],stateAttributesMapping:d}),V=x.useMemo(()=>({highlightedIndex:Q,onHighlightedIndexChange:J,highlightItemOnHover:N,relayKeyboardEvent:$}),[Q,J,N,$]);return p.jsx(hE.Provider,{value:V,children:p.jsx(Fp,{elementsRef:re,onMapChange:H=>{R==null||R(H),te(H)},children:oe})})}const kR=x.createContext(void 0);function g4(n=!0){const i=x.useContext(kR);if(i===void 0&&!n)throw new Error(Gn(7));return i}let p4=(function(n){return n.disabled="data-disabled",n.orientation="data-orientation",n.multiple="data-multiple",n})({});const SS={multiple(n){return n?{[p4.multiple]:""}:null}},y4=x.forwardRef(function(i,s){const{defaultValue:a,disabled:c=!1,loopFocus:f=!0,onValueChange:d,orientation:h="horizontal",multiple:m=!1,value:g,className:v,render:b,...S}=i,C=bR(),T=x.useMemo(()=>{if(g===void 0)return a??[]},[g,a]),R=((C==null?void 0:C.disabled)??!1)||c,[j,O]=Vs({controlled:g,default:T,name:"ToggleGroup",state:"value"}),E=_e((_,M,Q)=>{let J;if(m?(J=j.slice(),M?J.push(_):J.splice(j.indexOf(_),1)):J=M?[_]:[],Array.isArray(J)){if(d==null||d(J,Q),Q.isCanceled)return;O(J)}}),A=x.useMemo(()=>({disabled:R,multiple:m,orientation:h}),[R,h,m]),N=x.useMemo(()=>({disabled:R,orientation:h,setGroupValue:E,value:j}),[R,h,E,j]),L={role:"group"},D=Bt("div",i,{enabled:!!C,state:A,ref:s,props:[L,S],stateAttributesMapping:SS});return p.jsx(kR.Provider,{value:N,children:C?D:p.jsx(m4,{render:b,className:v,state:A,refs:[s],props:[L,S],stateAttributesMapping:SS,loopFocus:f})})});function b4(n={}){const{highlightItemOnHover:i,highlightedIndex:s,onHighlightedIndexChange:a}=mE(),{ref:c,index:f}=$p(n),d=s===f,h=x.useRef(null),m=Yi(c,h);return{compositeProps:x.useMemo(()=>({tabIndex:d?0:-1,onFocus(){a(f)},onMouseMove(){const v=h.current;if(!i||!v)return;const b=v.hasAttribute("disabled")||v.ariaDisabled==="true";!d&&!b&&v.focus()}}),[d,a,f,i]),compositeRef:m,index:f}}function v4(n){const{render:i,className:s,state:a=fn,props:c=Ul,refs:f=Ul,metadata:d,stateAttributesMapping:h,tag:m="div",...g}=n,{compositeProps:v,compositeRef:b}=b4({metadata:d});return Bt(m,n,{state:a,ref:[...f,b],props:[v,...c,g],stateAttributesMapping:h})}const x4=x.forwardRef(function(i,s){const{className:a,defaultPressed:c=!1,disabled:f=!1,form:d,onPressedChange:h,pressed:m,render:g,type:v,value:b,nativeButton:S=!0,...C}=i,T=b??"",R=g4(),j=(R==null?void 0:R.value)??[],O=R?void 0:c,E=(f||(R==null?void 0:R.disabled))??!1,[A,N]=Vs({controlled:R&&T?(j==null?void 0:j.indexOf(T))>-1:m,default:O,name:"Toggle",state:"pressed"}),L=_e((te,$)=>{var oe;(oe=R==null?void 0:R.setGroupValue)==null||oe.call(R,T,te,$),h==null||h(te,$)}),{getButtonProps:D,buttonRef:_}=Yu({disabled:E,native:S}),M=x.useMemo(()=>({disabled:E,pressed:A}),[E,A]),Q=[_,s],J=[{"aria-pressed":A,onClick(te){const $=!A,oe=We(dl,te.nativeEvent);L($,oe),!oe.isCanceled&&N($)}},C,D],re=Bt("button",i,{enabled:!R,state:M,ref:Q,props:J});return R?p.jsx(v4,{tag:"button",render:g,className:a,state:M,refs:Q,props:J}):re}),LR=x.createContext(void 0);function wo(n){const i=x.useContext(LR);if(n===!1&&i===void 0)throw new Error(Gn(27));return i}const S4={...Ro,...Xu},E4=x.forwardRef(function(i,s){const{render:a,className:c,forceRender:f=!1,...d}=i,{store:h}=wo(),m=h.useState("open"),g=h.useState("nested"),v=h.useState("mounted"),b=h.useState("transitionStatus"),S=x.useMemo(()=>({open:m,transitionStatus:b}),[m,b]);return Bt("div",i,{state:S,ref:[h.context.backdropRef,s],stateAttributesMapping:S4,props:[{role:"presentation",hidden:!v,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:f||!g})}),R4=x.forwardRef(function(i,s){const{render:a,className:c,id:f,...d}=i,{store:h}=wo(),m=hd(f);return h.useSyncedValueWithCleanup("descriptionElementId",m),Bt("p",i,{ref:s,props:[{id:m},d]})});let w4=(function(n){return n.nestedDialogs="--nested-dialogs",n})({}),C4=(function(n){return n[n.open=As.open]="open",n[n.closed=As.closed]="closed",n[n.startingStyle=As.startingStyle]="startingStyle",n[n.endingStyle=As.endingStyle]="endingStyle",n.nested="data-nested",n.nestedDialogOpen="data-nested-dialog-open",n})({});const UR=x.createContext(void 0);function T4(){const n=x.useContext(UR);if(n===void 0)throw new Error(Gn(26));return n}const O4={...Ro,...Xu,nestedDialogOpen(n){return n?{[C4.nestedDialogOpen]:""}:null}},j4=x.forwardRef(function(i,s){const{className:a,finalFocus:c,initialFocus:f,render:d,...h}=i,{store:m}=wo(),g=m.useState("descriptionElementId"),v=m.useState("disablePointerDismissal"),b=m.useState("floatingRootContext"),S=m.useState("popupProps"),C=m.useState("modal"),T=m.useState("mounted"),R=m.useState("nested"),j=m.useState("nestedOpenDialogCount"),O=m.useState("open"),E=m.useState("openMethod"),A=m.useState("titleElementId"),N=m.useState("transitionStatus"),L=m.useState("role");T4(),Fs({open:O,ref:m.context.popupRef,onComplete(){var re,te;O&&((te=(re=m.context).onOpenChangeComplete)==null||te.call(re,!0))}});function D(re){return re==="touch"?m.context.popupRef.current:!0}const _=f===void 0?D:f,M=j>0,Q=x.useMemo(()=>({open:O,nested:R,transitionStatus:N,nestedDialogOpen:M}),[O,R,N,M]),J=Bt("div",i,{state:Q,props:[S,{"aria-labelledby":A??void 0,"aria-describedby":g??void 0,role:L,tabIndex:-1,hidden:!T,onKeyDown(re){ER.has(re.key)&&re.stopPropagation()},style:{[w4.nestedDialogs]:j}},h],ref:[s,m.context.popupRef,m.useStateSetter("popupElement")],stateAttributesMapping:O4});return p.jsx(Up,{context:b,openInteractionType:E,disabled:!T,closeOnFocusOut:!v,initialFocus:_,returnFocus:c,modal:C!==!1,restoreFocus:"popup",children:J})}),A4=x.forwardRef(function(i,s){const{keepMounted:a=!1,...c}=i,{store:f}=wo(),d=f.useState("mounted"),h=f.useState("modal");return d||a?p.jsx(UR.Provider,{value:a,children:p.jsxs(kp,{ref:s,...c,children:[d&&h===!0&&p.jsx(Zp,{ref:f.context.internalBackdropRef,inert:Qp(!open)}),i.children]})}):null});function N4(n){const{store:i,parentContext:s,actionsRef:a}=n,c=i.useState("open"),f=i.useState("disablePointerDismissal"),d=i.useState("modal"),h=i.useState("popupElement"),{openMethod:m,triggerProps:g,reset:v}=MR(c);TM(i);const{forceUnmount:b}=OM(c,i,()=>{v()}),S=_e(J=>{const re=We(J);return re.preventUnmountOnClose=()=>{i.set("preventUnmountingOnClose",!0)},re}),C=x.useCallback(()=>{i.setOpen(!1,S(yN))},[i,S]);x.useImperativeHandle(a,()=>({unmount:b,close:C}),[b,C]);const T=zM({popupStore:i,onOpenChange:i.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[R,j]=x.useState(0),O=R===0,E=UM(T),A=Vp(T,{outsidePressEvent(){return i.context.internalBackdropRef.current||i.context.backdropRef.current?"intentional":{mouse:d==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(J){if("button"in J&&J.button!==0||"touches"in J&&J.touches.length!==1)return!1;const re=Pn(J);if(O&&!f){const te=re;return d&&(i.context.internalBackdropRef.current||i.context.backdropRef.current)?i.context.internalBackdropRef.current===te||i.context.backdropRef.current===te||Rt(te,h)&&!(te!=null&&te.hasAttribute("data-base-ui-portal")):!0}return!1},escapeKey:O});Kp(c&&d===!0,h);const{getReferenceProps:N,getFloatingProps:L,getTriggerProps:D}=Gp([E,A]);i.useContextCallback("onNestedDialogOpen",J=>{j(J+1)}),i.useContextCallback("onNestedDialogClose",()=>{j(0)}),x.useEffect(()=>(s!=null&&s.onNestedDialogOpen&&c&&s.onNestedDialogOpen(R),s!=null&&s.onNestedDialogClose&&!c&&s.onNestedDialogClose(),()=>{s!=null&&s.onNestedDialogClose&&c&&s.onNestedDialogClose()}),[c,s,R]);const _=x.useMemo(()=>N(g),[N,g]),M=x.useMemo(()=>D(g),[D,g]),Q=x.useMemo(()=>L(),[L]);i.useSyncedValues({openMethod:m,activeTriggerProps:_,inactiveTriggerProps:M,popupProps:Q,floatingRootContext:T,nestedOpenDialogCount:R})}const M4={...NM,modal:ge(n=>n.modal),nested:ge(n=>n.nested),nestedOpenDialogCount:ge(n=>n.nestedOpenDialogCount),disablePointerDismissal:ge(n=>n.disablePointerDismissal),openMethod:ge(n=>n.openMethod),descriptionElementId:ge(n=>n.descriptionElementId),titleElementId:ge(n=>n.titleElementId),viewportElement:ge(n=>n.viewportElement),role:ge(n=>n.role)};class z4 extends SE{constructor(s){super(D4(s),{popupRef:x.createRef(),backdropRef:x.createRef(),internalBackdropRef:x.createRef(),triggerElements:new qp,onOpenChange:void 0,onOpenChangeComplete:void 0},M4);Nt(this,"setOpen",(s,a)=>{var h,m,g,v;if(a.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!s&&a.trigger==null&&this.state.activeTriggerId!=null&&(a.trigger=this.state.activeTriggerElement??void 0),(m=(h=this.context).onOpenChange)==null||m.call(h,s,a),a.isCanceled)return;const c={open:s,nativeEvent:a.event,reason:a.reason,nested:this.state.nested};(g=this.state.floatingRootContext.context.events)==null||g.emit("openchange",c);const f={open:s},d=((v=a.trigger)==null?void 0:v.id)??null;(d||s)&&(f.activeTriggerId=d,f.activeTriggerElement=a.trigger??null),this.update(f)})}}function D4(n={}){return{...AM(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...n}}function _4(n){const{children:i,open:s,defaultOpen:a=!1,onOpenChange:c,onOpenChangeComplete:f,disablePointerDismissal:d=!1,modal:h=!0,actionsRef:m,handle:g,triggerId:v,defaultTriggerId:b=null}=n,S=wo(!0),C=!!S,T=hl(()=>(g==null?void 0:g.store)??new z4({open:s??a,activeTriggerId:v!==void 0?v:b,modal:h,disablePointerDismissal:d,nested:C})).current;T.useControlledProp("open",s,a),T.useControlledProp("activeTriggerId",v,b),T.useSyncedValues({disablePointerDismissal:d,nested:C,modal:h}),T.useContextCallback("onOpenChange",c),T.useContextCallback("onOpenChangeComplete",f);const R=T.useState("payload");N4({store:T,actionsRef:m,parentContext:S==null?void 0:S.store.context});const j=x.useMemo(()=>({store:T}),[T]);return p.jsx(LR.Provider,{value:j,children:typeof i=="function"?i({payload:R}):i})}const k4=x.forwardRef(function(i,s){const{render:a,className:c,id:f,...d}=i,{store:h}=wo(),m=hd(f);return h.useSyncedValueWithCleanup("titleElementId",m),Bt("h2",i,{ref:s,props:[{id:m},d]})});var HR=class extends Error{constructor(i,s){super(s.error||`HTTP ${i}`);Nt(this,"status");Nt(this,"body");this.name="ApiError",this.status=i,this.body=s}};function L4(n){const i=new URLSearchParams;for(const[a,c]of Object.entries(n))c==null||c===""||(typeof c=="object"?c.length&&i.set(a,c.join(",")):i.set(a,String(c)));const s=i.toString();return s?`?${s}`:""}async function U4(n){const i=n.statusText||`HTTP ${n.status}`;let s;try{s=await n.json()}catch{return{error:i,status:n.status}}const a=s&&typeof s=="object"&&!Array.isArray(s)?s:{},c=typeof a.error=="string"&&a.error?a.error:i;return{...a,error:c,status:n.status}}function H4(n={}){const i=n.errorClass??HR;let s=(n.base??"").replace(/\/$/,""),a=n.credentials??"same-origin",c=n.fetch??((m,g)=>fetch(m,g)),f=null;const d=m=>s?`${s}/${m}`:m,h=async(m,g)=>{const v=new Headers;typeof(g==null?void 0:g.body)=="string"&&v.set("content-type","application/json"),f&&v.set("authorization",`Bearer ${f}`),new Headers(g==null?void 0:g.headers).forEach((S,C)=>v.set(C,S));const b=await c(d(m),{credentials:a,...g,headers:Object.fromEntries(v.entries())});if(!b.ok)throw new i(b.status,await U4(b));return b};return{setApiBase(m,g){s=m.replace(/\/$/,""),g!=null&&g.credentials&&(a=g.credentials),g!=null&&g.fetch&&(c=g.fetch)},setApiToken(m){f=m},getApiToken:()=>f,apiUrl:d,send:h,async req(m,g){const v=await(await h(m,g)).text();if(v)return JSON.parse(v)},query:L4}}function IR(n){if(n==null||n==="")return;const i=n instanceof Date?n:new Date(n);return Number.isNaN(i.getTime())?void 0:i}function Du(n,i={}){const s=IR(n);return s?new Intl.DateTimeFormat(i.locale,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",...i.seconds?{second:"2-digit"}:{},...i.timeZone?{timeZone:i.timeZone}:{}}).format(s):"—"}const I4=[[1e3,"s"],[6e4,"m"],[36e5,"h"],[864e5,"d"],[30*864e5,"mo"],[365*864e5,"y"]];function V4(n,i=Date.now()){const s=IR(n);if(!s)return"—";const a=i-s.getTime(),c=Math.abs(a);if(c<1e4)return"just now";let f=Math.floor(c/1e3),d="s";for(const[h,m]of I4)c>=h&&(f=Math.floor(c/h),d=m);return a>=0?`${f}${d} ago`:`in ${f}${d}`}function wg(n,i="en-US"){return n==null||!Number.isFinite(n)?"—":new Intl.NumberFormat(i).format(Math.round(n))}function VR({value:n,onValueChange:i,options:s,size:a="md"}){return p.jsx(y4,{value:[n],onValueChange:c=>{const f=c.find(d=>d!==n)??c[0];f&&i(f)},className:"inline-flex items-center gap-0.5 rounded-md border border-border bg-secondary/50 p-0.5",children:s.map(c=>p.jsx(x4,{value:c.value,"aria-label":c["aria-label"],className:xt("inline-flex items-center justify-center gap-1.5 rounded-[5px] font-medium text-muted-foreground outline-none transition-colors","hover:text-foreground","data-[pressed]:bg-card data-[pressed]:text-foreground data-[pressed]:shadow-sm","focus-visible:ring-2 focus-visible:ring-ring",a==="sm"?"h-6 px-2 text-xs":"h-7 px-2.5 text-[13px]"),children:c.label},c.value))})}function Kr({value:n,onValueChange:i,options:s,placeholder:a="Select…",disabled:c,className:f,"aria-label":d}){return p.jsxs(VM,{items:s,value:n,onValueChange:h=>i(h),disabled:c,children:[p.jsxs(ZM,{"aria-label":d,className:xt("inline-flex h-9 min-w-0 items-center justify-between gap-2 rounded-md border border-input bg-secondary/40 px-3 text-[13px] text-foreground outline-none transition-colors","hover:bg-secondary/70 focus-visible:ring-2 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50 data-[popup-open]:border-ring",f),children:[p.jsx($M,{className:"truncate",children:h=>{const m=s.find(g=>g.value===h);return m?m.label:p.jsx("span",{className:"text-muted-foreground",children:a})}}),p.jsx(WM,{children:p.jsx(r1,{className:"size-3.5 shrink-0 text-muted-foreground"})})]}),p.jsx(t3,{container:Ep(),children:p.jsx(v3,{sideOffset:6,className:"z-50 outline-none",alignItemWithTrigger:!1,children:p.jsx(M3,{className:xt("max-h-[min(20rem,var(--available-height))] min-w-[var(--anchor-width)] overflow-y-auto rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-xl outline-none","origin-[var(--transform-origin)] transition-[transform,opacity] data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0"),children:s.map(h=>p.jsxs(z3,{value:h.value,className:xt("flex cursor-pointer select-none items-start gap-2 rounded-md py-1.5 pl-2 pr-2 text-[13px] outline-none","data-[highlighted]:bg-accent/15 data-[highlighted]:text-foreground"),children:[p.jsx("span",{className:"flex w-4 shrink-0 items-center justify-center pt-0.5",children:p.jsx(D3,{children:p.jsx(l1,{className:"size-3.5 text-accent"})})}),p.jsxs("span",{className:"flex flex-col",children:[p.jsx(k3,{children:h.label}),h.description?p.jsx("span",{className:"text-xs text-muted-foreground",children:h.description}):null]})]},h.value))})})})]})}function B4({value:n,options:i,onSelect:s,onCreate:a,placeholder:c="Select…",createLabel:f=g=>`Create "${g}"`,disabled:d,className:h,"aria-label":m}){const[g,v]=x.useState(""),b=g.trim(),S=b.toLowerCase(),C=i.map(O=>({value:O,label:O})),T=b?C.filter(O=>O.label.toLowerCase().includes(S)):C,R=i.some(O=>O.toLowerCase()===S),j=b&&!R?[...T,{value:"\0create",label:f(b),create:!0}]:T;return p.jsxs(q3,{items:j,filter:null,inputValue:g,onInputValueChange:v,onOpenChange:O=>{O||v("")},onValueChange:O=>{O&&(O.create?a(b):s(O.value),v(""))},itemToStringLabel:O=>O.label,disabled:d,children:[p.jsxs(F3,{"aria-label":m,className:xt("inline-flex h-9 min-w-0 items-center justify-between gap-2 rounded-md border border-input bg-secondary/40 px-3 text-[13px] text-foreground outline-none transition-colors","hover:bg-secondary/70 focus-visible:ring-2 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50 data-[popup-open]:border-ring",h),children:[p.jsx("span",{className:xt("truncate",!n&&"text-muted-foreground"),children:n||c}),p.jsx(r1,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),p.jsx(e4,{container:Ep(),children:p.jsx(t4,{sideOffset:6,className:"z-50 outline-none",children:p.jsxs(l4,{className:xt("w-[max(var(--anchor-width),13rem)] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-xl outline-none","origin-[var(--transform-origin)] transition-[transform,opacity] data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0"),children:[p.jsx(Q3,{placeholder:"Search or create…",className:"mb-1 h-8 w-full rounded-md border border-input bg-secondary/40 px-2.5 text-[13px] text-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring"}),p.jsx(o4,{className:"px-2 py-2 text-[13px] text-muted-foreground",children:"No matches."}),p.jsx($3,{className:"max-h-64 overflow-y-auto",children:O=>p.jsxs(a4,{value:O,className:xt("flex cursor-pointer select-none items-center gap-2 rounded-md py-1.5 pl-2 pr-2 text-[13px] outline-none","data-[highlighted]:bg-accent/15 data-[highlighted]:text-foreground",O.create&&"text-accent"),children:[O.create?p.jsx(b1,{className:"size-3.5 shrink-0"}):p.jsx("span",{className:"flex w-4 shrink-0 items-center justify-center",children:O.value===n&&p.jsx(l1,{className:"size-3.5 text-accent"})}),p.jsx("span",{className:"truncate",children:O.label})]},O.value)})]})})})]})}const Un=x.forwardRef(function({className:i,...s},a){return p.jsx("input",{ref:a,className:xt("h-9 w-full rounded-md border border-input bg-secondary/40 px-3 text-[13px] text-foreground outline-none transition-colors placeholder:text-muted-foreground","hover:bg-secondary/60 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50",i),...s})}),q4=x.forwardRef(function({className:i,...s},a){return p.jsx("textarea",{ref:a,className:xt("w-full rounded-md border border-input bg-secondary/40 px-3 py-2 text-[13px] text-foreground outline-none transition-colors placeholder:text-muted-foreground","hover:bg-secondary/60 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50",i),...s})}),P4={primary:"bg-primary text-primary-foreground hover:bg-primary/90 border border-transparent",secondary:"bg-secondary/60 text-foreground border border-border hover:bg-secondary",ghost:"bg-transparent text-muted-foreground hover:bg-secondary/60 hover:text-foreground border border-transparent",danger:"bg-transparent text-destructive border border-destructive/30 hover:bg-destructive/10"},G4={sm:"h-7 px-2.5 text-xs gap-1.5",md:"h-9 px-3.5 text-[13px] gap-2",icon:"h-8 w-8 justify-center"},Lt=x.forwardRef(function({className:i,variant:s="secondary",size:a="md",loading:c=!1,icon:f,children:d,disabled:h,...m},g){return p.jsxs("button",{ref:g,disabled:h||c,className:xt("inline-flex shrink-0 items-center rounded-md font-medium outline-none transition-colors","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50",P4[s],G4[a],i),...m,children:[c?p.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",className:"animate-spin","aria-hidden":!0,children:p.jsx("circle",{cx:"7",cy:"7",r:"5",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"20",strokeDashoffset:"10",strokeLinecap:"round"})}):f,d]})});function Wa({className:n,children:i}){return p.jsx("span",{className:xt("inline-flex items-center gap-1 rounded-md border px-1.5 py-0.5 text-[11px] font-medium uppercase tracking-wide","border-border bg-secondary/60 text-muted-foreground",n),children:i})}function Y4(n){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(n)}`}const ES=n=>n.trimStart().startsWith("<")?Y4(n):n;function Q4({light:n,dark:i,className:s,alt:a=""}){const{store:c,resolved:f}=Sp(),d=x.useMemo(()=>ES(n),[n]),h=x.useMemo(()=>i?ES(i):d,[i,d]),m=a?void 0:!0;return c?p.jsx("img",{src:f==="dark"?h:d,alt:a,"aria-hidden":m,className:xt("shrink-0",s)}):p.jsxs(p.Fragment,{children:[p.jsx("img",{src:d,alt:a,"aria-hidden":m,className:xt("shrink-0 dark:hidden",s)}),p.jsx("img",{src:h,alt:"","aria-hidden":!0,className:xt("hidden shrink-0 dark:block",s)})]})}function K4({className:n}){return p.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:xt("animate-spin",n),"aria-hidden":!0,children:p.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"24",strokeDashoffset:"12",strokeLinecap:"round"})})}function Co({label:n}){return p.jsxs("div",{className:"mt-8 flex items-center justify-center gap-2 text-[13px] text-muted-foreground",children:[p.jsx(K4,{}),n]})}function Dt({className:n,children:i}){return p.jsx("span",{className:xt("font-mono text-[12px] text-foreground",n),children:i})}function Xr({children:n,wide:i,className:s}){return p.jsx("div",{className:xt("mx-auto px-4 py-8 sm:px-6",i?"max-w-7xl":"max-w-6xl",s),children:n})}function Ys({title:n,description:i,actions:s}){return p.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-4",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:n}),i?p.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:i}):null]}),s?p.jsx("div",{className:"flex flex-wrap items-center gap-2",children:s}):null]})}function yi({title:n,description:i,actions:s,children:a,className:c,bodyClassName:f,flush:d,id:h,"aria-label":m}){return p.jsxs("section",{id:h,"aria-label":m??(typeof n=="string"?n:void 0),className:xt("rounded-xl border border-border bg-card",c),children:[p.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-border px-4 py-3",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsx("h2",{className:"text-[13px] font-semibold text-foreground",children:n}),i?p.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:i}):null]}),s?p.jsx("div",{className:"flex items-center gap-2",children:s}):null]}),p.jsx("div",{className:xt(d?"":"px-4 py-4",f),children:a})]})}function $u({open:n,onClose:i,title:s,description:a,children:c,footer:f,wide:d}){return p.jsx(_4,{open:n,onOpenChange:h=>!h&&i(),children:p.jsxs(A4,{container:Ep(),children:[p.jsx(E4,{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm"}),p.jsxs(j4,{className:xt("fixed left-1/2 top-1/2 z-50 flex max-h-[85vh] w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col rounded-xl border border-border bg-card text-card-foreground shadow-2xl outline-none",d?"max-w-2xl":"max-w-md"),children:[p.jsxs("div",{className:"border-b border-border px-5 py-4",children:[p.jsx(k4,{className:"text-[15px] font-semibold text-foreground",children:s}),a?p.jsx(R4,{className:"mt-0.5 text-xs text-muted-foreground",children:a}):null]}),p.jsx("div",{className:"flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-5 py-5",children:c}),f?p.jsx("div",{className:"flex items-center justify-end gap-2 border-t border-border px-5 py-3",children:f}):null]})]})})}function BR({open:n,onClose:i,onConfirm:s,title:a,confirmLabel:c,danger:f,loading:d,children:h,confirmDisabled:m}){return p.jsx($u,{open:n,onClose:i,title:a,footer:p.jsxs(p.Fragment,{children:[p.jsx(Lt,{variant:"secondary",onClick:i,disabled:d,children:"Cancel"}),p.jsx(Lt,{variant:f?"danger":"primary",loading:d,disabled:m,onClick:s,children:c})]}),children:h})}function bi({children:n,icon:i,action:s,className:a}){return p.jsxs("div",{className:xt("mt-4 flex flex-col items-center gap-3 rounded-xl border border-dashed border-border bg-card px-4 py-14 text-center",a),children:[i?p.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-accent/10 text-accent",children:i}):null,p.jsx("div",{className:"max-w-sm text-[13px] text-muted-foreground",children:n}),s]})}let Au=[];const RS=()=>Au.forEach(n=>n()),F4=n=>(Au.push(n)===1&&addEventListener("hashchange",RS),()=>{Au=Au.filter(i=>i!==n),Au.length||removeEventListener("hashchange",RS)}),qR=/^#?\/?/,X4=()=>"/"+location.hash.replace(qR,""),Z4=(n,{state:i=null,replace:s=!1}={})=>{const a=location.href,[c,f]=n.replace(qR,"").split("?"),d=new URL(a);d.hash=`/${c}`,f!==void 0&&(d.search=f);const h=d.href;history[s?"replaceState":"pushState"](i,"",h);const m=typeof HashChangeEvent<"u"?new HashChangeEvent("hashchange",{oldURL:a,newURL:h}):new Event("hashchange",{detail:{oldURL:a,newURL:h}});dispatchEvent(m)},PR=({ssrPath:n="/"}={})=>[mp.useSyncExternalStore(F4,X4,()=>n),Z4];PR.hrefs=n=>"#"+n;class J4 extends HR{constructor(){super(...arguments);Nt(this,"name","PermissionsApiError")}}function ud(n){return n instanceof Error?n.message:typeof n=="string"?n:"Something went wrong"}const GR=H4({errorClass:J4}),ll=GR.req,Od=GR.query,cd=encodeURIComponent,Zs=(n,i)=>({method:n,headers:{"content-type":"application/json"},...i===void 0?{}:{body:JSON.stringify(i)}});function $4(){return ll("config")}function YR(){return ll("api/catalog")}async function QR(){return(await ll("api/subjects")).subjects}function W4(n){return ll(`api/subjects/${cd(n)}`)}function ez(n,i){return ll(`api/subjects/${cd(n)}`,Zs("PUT",i))}function tz(n){return ll("api/grants",Zs("POST",n))}function nz(n,i,s){return ll(`api/grants/${cd(n)}/${cd(i)}`,Zs("DELETE",s?{reason:s}:void 0))}function KR(n={}){return ll(`api/history${Od(n)}`)}function lz(n){return ll("api/check",Zs("POST",n))}function iz(n={}){return ll(`api/relationships${Od(n)}`)}function rz(n){return ll("api/relationships",Zs("POST",n))}function sz(n){return ll("api/relationships",Zs("DELETE",n))}function az(n){return ll("api/relationships/check",Zs("POST",n))}async function oz(n){return(await ll(`api/relationships/objects${Od(n)}`)).objects}async function uz(n){return(await ll(`api/relationships/subjects${Od(n)}`)).subjects}const Rl={config:["config"],catalog:["catalog"],subjects:["subjects"],subject:n=>["subject",n],history:["history"],relationships:["relationships"]};function cz(n){const i=new Map(n.roles.map(a=>[a.key,a])),s=new Map(n.assignable.map(a=>[a.key,a]));return{view:n,roleLabel:a=>{var c;return a?((c=i.get(a))==null?void 0:c.label)??a:""},permission:a=>s.get(a)??{key:a,label:a},effectiveRole:a=>a&&i.has(a)?{role:a,stored:!0}:{role:n.defaultRole,stored:!1},relations:n.relations??[]}}function To(){return Zi({queryKey:Rl.catalog,queryFn:YR,staleTime:5*6e4,select:cz})}function Wu(n,i){const s=sp(),a=bA();return Bg({mutationFn:n,onSuccess:async(c,f)=>{var d;await Promise.all([s.invalidateQueries({queryKey:["subject"]}),s.invalidateQueries({queryKey:Rl.subjects}),s.invalidateQueries({queryKey:Rl.history}),s.invalidateQueries({queryKey:Rl.relationships})]),a.add("success",typeof i.success=="function"?i.success(f,c):i.success),(d=i.onSuccess)==null||d.call(i,c,f)},onError:c=>a.add("error",i.error,ud(c))})}function Qs({head:n,children:i,label:s}){return p.jsx("div",{className:"overflow-x-auto",children:p.jsxs("table",{className:"w-full border-collapse","aria-label":s,children:[p.jsx("thead",{children:p.jsx("tr",{className:"border-b border-border",children:n.map((a,c)=>{const{label:f,className:d}=typeof a=="string"?{label:a}:a;return p.jsx("th",{className:xt("whitespace-nowrap px-4 py-2.5 text-left text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",d),children:f},f||c)})})}),p.jsx("tbody",{className:"divide-y divide-border",children:i})]})})}function ty({children:n,className:i}){return p.jsx("div",{className:xt("overflow-hidden rounded-xl border border-border bg-card",i),children:n})}function Lu({role:n,catalog:i,muted:s}){const a=(i==null?void 0:i.roleLabel(n))??n;return p.jsx("span",{title:n,"data-role":n,className:xt("inline-flex items-center rounded-md border px-1.5 py-0.5 text-xs font-medium",s?"border-dashed border-border text-muted-foreground":"border-accent/35 bg-accent/10 text-accent"),children:a})}const fz={stored:"stored",provider:"from auth provider",default:"default — provider role unknown"};function FR({source:n}){return p.jsx("span",{className:"text-xs text-muted-foreground","data-role-source":n,children:fz[n]})}function dz({permission:n,catalog:i}){const s=(i==null?void 0:i.permission(n))??{key:n,label:n};return p.jsxs("span",{className:"flex flex-col",children:[p.jsx("span",{className:"text-[13px] font-medium text-foreground",children:s.label}),s.label!==s.key?p.jsx(Dt,{className:"text-xs text-muted-foreground",children:s.key}):null]})}function Xt({label:n,hint:i,htmlFor:s,children:a}){return p.jsxs("div",{className:"flex flex-col gap-1.5",children:[p.jsx("label",{htmlFor:s,className:"text-[13px] font-medium text-foreground",children:n}),a,i?p.jsx("span",{className:"text-xs text-muted-foreground",children:i}):null]})}function jd({at:n}){return n?p.jsx("time",{dateTime:n,title:Du(n),className:"whitespace-nowrap tabular-nums",children:V4(n)}):p.jsx("span",{className:"text-muted-foreground",children:"—"})}const hz=(n,i=Date.now())=>!!n&&Date.parse(n)<=i;function mz({expiresAt:n}){return n?hz(n)?p.jsx("span",{className:"flex items-center gap-1.5",title:Du(n),children:p.jsx(Wa,{className:"border-destructive/30 bg-destructive/10 text-destructive",children:"Expired"})}):p.jsx("time",{dateTime:n,title:Du(n),className:"tabular-nums",children:Du(n)}):p.jsx("span",{className:"text-muted-foreground",children:"never"})}const gz={grant:"border-success/30 bg-success/10 text-success",revoke:"border-destructive/30 bg-destructive/10 text-destructive",role:"border-info/30 bg-info/10 text-info",relate:"border-success/30 bg-success/10 text-success",unrelate:"border-destructive/30 bg-destructive/10 text-destructive"};function XR({type:n}){return p.jsx(Wa,{className:gz[n],children:n})}function ZR({entry:n,catalog:i}){if(n.type==="relate"||n.type==="unrelate")return p.jsx("span",{className:"flex flex-col text-[13px]",children:p.jsxs(Dt,{className:"text-[13px]",children:[n.object,"#",n.relation]})});if(n.type==="role"){const a=n.previousRole??null,c=n.role??null;return p.jsxs("span",{className:"flex flex-wrap items-center gap-1.5 text-[13px]",children:[a?p.jsx(Lu,{role:a,catalog:i,muted:!0}):p.jsx("span",{className:"text-muted-foreground",children:"default"}),p.jsx("span",{"aria-hidden":!0,className:"text-muted-foreground",children:"→"}),c?p.jsx(Lu,{role:c,catalog:i}):p.jsx("span",{className:"text-muted-foreground",children:"cleared"})]})}const s=n.permission?(i==null?void 0:i.permission(n.permission).label)??n.permission:"";return p.jsxs("span",{className:"flex flex-col text-[13px]",children:[p.jsx("span",{className:"font-medium",children:s}),n.permission&&s!==n.permission?p.jsx(Dt,{className:"text-xs text-muted-foreground",children:n.permission}):null,n.type==="grant"&&n.expiresAt?p.jsxs("span",{className:"text-xs text-muted-foreground",children:["until ",Du(n.expiresAt)]}):null]})}function Ad({actor:n}){return n?p.jsx(Dt,{className:"text-[13px]",children:n}):p.jsx("span",{className:"text-muted-foreground",children:"system"})}function pz(n,i){if(n.effectiveRole)return{role:n.effectiveRole,source:n.roleSource??"default"};const s=(i==null?void 0:i.effectiveRole(n.role))??{role:n.role??"",stored:!!n.role};return{role:s.role,source:s.stored?"stored":"default"}}const yz=(n,i)=>!i||[n.id,n.name,n.email,n.role,n.effectiveRole].some(s=>typeof s=="string"&&s.toLowerCase().includes(i));function bz({ctx:n}){const i=To().data,s=Zi({queryKey:Rl.subjects,queryFn:QR,staleTime:1e4}),[a,c]=dt.useState(""),[f,d]=dt.useState(!1),h=a.trim().toLowerCase(),m=(s.data??[]).filter(g=>yz(g,h));return p.jsxs(Xr,{children:[p.jsx(Ys,{title:"Subjects",description:n.externalRoles?"Everyone with a grant or a stored record. Roles come from the auth provider, else the catalog's default role.":"Everyone with a stored role or a grant. A subject without a stored role gets the auth provider's role, else the catalog's default role.",actions:n.canWrite("grants:write")||n.canWrite("roles:write")?p.jsx(Lt,{icon:p.jsx(tj,{className:"size-4"}),onClick:()=>d(!0),children:"Add subject"}):null}),p.jsxs("div",{className:"mt-6 flex items-center gap-2",children:[p.jsxs("div",{className:"relative w-full max-w-sm",children:[p.jsx(x1,{className:"pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),p.jsx(Un,{"aria-label":"Search subjects",placeholder:"Search by id, name, email or role",value:a,onChange:g=>c(g.target.value),className:"pl-8"})]}),s.data?p.jsxs("span",{className:"text-[13px] text-muted-foreground",children:[wg(m.length)," of ",wg(s.data.length)]}):null]}),s.isLoading?p.jsx(Co,{label:"Loading subjects…"}):s.isError?p.jsx(bi,{className:"mt-4",children:"Failed to load subjects."}):m.length===0?p.jsx(bi,{className:"mt-4",children:h?"No subject matches.":"No subjects yet. Grant a permission or assign a role to add one."}):p.jsx(ty,{className:"mt-4",children:p.jsx(Qs,{label:"Subjects",head:["Subject","Role",{label:"Grants",className:"text-right"},""],children:m.map(g=>{const v=pz(g,i);return p.jsxs("tr",{className:"cursor-pointer hover:bg-secondary/40",onClick:()=>n.go(Ff(g.id)),children:[p.jsxs("td",{className:"px-4 py-3",children:[p.jsx(Dt,{className:"text-[13px] font-medium",children:g.id}),g.name||g.email?p.jsx("span",{className:"block text-xs text-muted-foreground",children:[g.name,g.email].filter(Boolean).join(" · ")}):null]}),p.jsx("td",{className:"px-4 py-3",children:v.role?p.jsxs("span",{className:"flex items-center gap-1.5",children:[p.jsx(Lu,{role:v.role,catalog:i,muted:v.source==="default"}),p.jsx(FR,{source:v.source})]}):null}),p.jsx("td",{className:"px-4 py-3 text-right text-[13px] tabular-nums",children:wg(g.grantCount)}),p.jsx("td",{className:"px-4 py-3 text-right",children:p.jsx(Lt,{size:"sm",variant:"ghost",onClick:b=>{b.stopPropagation(),n.go(Ff(g.id))},children:"Open"})})]},g.id)})})}),p.jsx(vz,{open:f,onClose:()=>d(!1),onOpen:g=>n.go(Ff(g))})]})}function vz({open:n,onClose:i,onOpen:s}){const[a,c]=dt.useState(""),f=d=>{d==null||d.preventDefault();const h=a.trim();h&&(c(""),i(),s(h))};return p.jsx($u,{open:n,onClose:i,title:"Add subject",description:"Subjects are your users' ids. Open one to grant a permission or assign a role.",footer:p.jsxs(p.Fragment,{children:[p.jsx(Lt,{variant:"secondary",onClick:i,children:"Cancel"}),p.jsx(Lt,{onClick:()=>f(),disabled:!a.trim(),children:"Open subject"})]}),children:p.jsx("form",{onSubmit:f,children:p.jsx(Xt,{label:"Subject id",htmlFor:"new-subject-id",children:p.jsx(Un,{id:"new-subject-id",autoFocus:!0,placeholder:"user_123",value:a,onChange:d=>c(d.target.value),className:"font-mono"})})})})}function xz({id:n,ctx:i}){var C,T;const s=To().data,a=Zi({queryKey:Rl.subject(n),queryFn:()=>W4(n),staleTime:5e3}),[c,f]=dt.useState(!1),[d,h]=dt.useState(!1),[m,g]=dt.useState(null),v=a.data,b=(C=v==null?void 0:v.record)==null?void 0:C.name,S=(T=v==null?void 0:v.record)==null?void 0:T.email;return p.jsxs(Xr,{children:[p.jsxs("button",{type:"button",onClick:()=>i.go("/"),className:"mb-3 inline-flex items-center gap-1 text-[13px] text-muted-foreground hover:text-foreground",children:[p.jsx(YO,{className:"size-3.5"})," Subjects"]}),p.jsx(Ys,{title:p.jsx(Dt,{className:"text-xl",children:n}),description:b||S?[b,S].filter(Boolean).join(" · "):void 0,actions:i.can("check:run")?p.jsx(Lt,{variant:"secondary",icon:p.jsx(QO,{className:"size-4"}),onClick:()=>i.go("/check",{subject:n}),children:"Check as subject"}):null}),a.isLoading?p.jsx(Co,{label:"Loading subject…"}):a.isError||!v?p.jsx(bi,{className:"mt-6",children:"Failed to load this subject."}):p.jsxs("div",{className:"mt-6 grid gap-6",children:[p.jsx(Ez,{subject:v,catalog:s,canWrite:i.canWrite("roles:write"),external:i.externalRoles,onChange:()=>h(!0)}),p.jsx(yi,{title:"Grants",description:"Assignable permissions granted to this subject. The role's rules decide what each one unlocks.",flush:!0,actions:i.canWrite("grants:write")?p.jsx(Lt,{size:"sm",icon:p.jsx(b1,{className:"size-4"}),onClick:()=>f(!0),children:"Grant permission"}):null,children:v.grants.length===0?p.jsx("p",{className:"px-5 py-6 text-[13px] text-muted-foreground",children:"No grants."}):p.jsx(Qs,{label:"Grants",head:["Permission","Granted by","Granted","Reason","Expires",""],children:v.grants.map(R=>p.jsxs("tr",{"data-permission":R.permission,children:[p.jsx("td",{className:"px-4 py-3",children:p.jsx(dz,{permission:R.permission,catalog:s})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx(Ad,{actor:R.grantedBy})}),p.jsx("td",{className:"px-4 py-3 text-[13px]",children:p.jsx(jd,{at:R.grantedAt})}),p.jsx("td",{className:"max-w-64 px-4 py-3 text-[13px] text-muted-foreground",children:R.reason??"—"}),p.jsx("td",{className:"px-4 py-3 text-[13px]",children:p.jsx(mz,{expiresAt:R.expiresAt})}),p.jsx("td",{className:"px-4 py-3 text-right",children:i.canWrite("grants:write")?p.jsx(Lt,{size:"sm",variant:"ghost",onClick:()=>g(R),children:"Revoke"}):null})]},R.permission))})}),i.can("history:read")?p.jsx(Oz,{id:n,ctx:i,catalog:s}):null]}),v&&s?p.jsxs(p.Fragment,{children:[p.jsx(wz,{open:c,onClose:()=>f(!1),subject:v,catalog:s}),p.jsx(Tz,{open:d,onClose:()=>h(!1),subject:v,catalog:s})]}):null,p.jsx(Cz,{grant:m,catalog:s,onClose:()=>g(null)})]})}function Sz(n,i){return i?n==="provider"?"Managed by the auth provider: change it there.":"Managed by the auth provider, which reports no known role for this subject: the catalog's default role applies.":n==="stored"?"Stored assignment: it overrides the auth provider's role.":n==="provider"?"No stored role: the auth provider's role applies.":"No stored role and no known provider role: the catalog's default role applies."}function Ez({subject:n,catalog:i,canWrite:s,external:a,onChange:c}){const f=n.roleSource??(n.role!==null?"stored":"default"),d={role:n.effectiveRole,source:f};return p.jsx(yi,{title:"Role",actions:s?p.jsx(Lt,{size:"sm",variant:"secondary",icon:p.jsx(KO,{className:"size-4"}),onClick:c,children:"Change role"}):null,children:p.jsxs("div",{className:"flex flex-wrap items-center gap-3","data-testid":"subject-role",children:[d.role?p.jsx(Lu,{role:d.role,catalog:i,muted:d.source==="default"}):null,p.jsx(FR,{source:d.source}),p.jsx("span",{className:"text-[13px] text-muted-foreground",children:Sz(d.source,a)})]})})}const Rz=n=>{if(!n)return null;const i=new Date(n).getTime();return Number.isNaN(i)?null:new Date(i).toISOString()};function wz({open:n,onClose:i,subject:s,catalog:a}){const c=new Set(s.grants.map(E=>E.permission)),f=a.view.assignable.filter(E=>!c.has(E.key)).map(E=>({value:E.key,label:E.label,...E.description?{description:E.description}:{}})),[d,h]=dt.useState(""),[m,g]=dt.useState(""),[v,b]=dt.useState(""),S=()=>{h(""),g(""),b("")},C=()=>{S(),i()},T=Wu(tz,{success:(E,A)=>A.created?`Granted ${a.permission(E.permission).label} to ${E.subject}`:`${E.subject} already had ${a.permission(E.permission).label}`,error:"Could not grant the permission",onSuccess:C}),R=Rz(v),j=R!==null&&Date.parse(R)<=Date.now(),O=()=>T.mutate({subject:s.id,permission:d,...m.trim()?{reason:m.trim()}:{},...R?{expiresAt:R}:{}});return p.jsx($u,{open:n,onClose:C,title:"Grant permission",description:p.jsxs(p.Fragment,{children:["To ",p.jsx(Dt,{children:s.id}),". Granting is idempotent: granting a held permission changes nothing."]}),footer:p.jsxs(p.Fragment,{children:[p.jsx(Lt,{variant:"secondary",onClick:C,disabled:T.isPending,children:"Cancel"}),p.jsx(Lt,{onClick:O,loading:T.isPending,disabled:!d||j,children:"Grant"})]}),children:p.jsxs("div",{className:"grid gap-4",children:[p.jsx(Xt,{label:"Permission",children:f.length===0?p.jsx("span",{className:"text-[13px] text-muted-foreground",children:"Every assignable permission is already granted."}):p.jsx(Kr,{"aria-label":"Permission",value:d,onValueChange:h,options:f,placeholder:"Choose a permission"})}),p.jsx(Xt,{label:"Reason",htmlFor:"grant-reason",hint:"Recorded with the grant and in the history.",children:p.jsx(Un,{id:"grant-reason",placeholder:"e.g. Support escalation #4521",value:m,maxLength:1e3,onChange:E=>g(E.target.value)})}),p.jsx(Xt,{label:"Expires",htmlFor:"grant-expires",hint:j?"Must be in the future.":"Optional: leave empty for a grant that never expires.",children:p.jsx(Un,{id:"grant-expires",type:"datetime-local",value:v,onChange:E=>b(E.target.value)})})]})})}function Cz({grant:n,catalog:i,onClose:s}){const[a,c]=dt.useState(""),f=()=>{c(""),s()},d=n?(i==null?void 0:i.permission(n.permission).label)??n.permission:"",h=Wu(m=>nz(m.subject,m.permission,m.reason),{success:m=>`Revoked ${d} from ${m.subject}`,error:"Could not revoke the permission",onSuccess:f});return p.jsx(BR,{open:n!==null,onClose:f,onConfirm:()=>n&&h.mutate({subject:n.subject,permission:n.permission,...a.trim()?{reason:a.trim()}:{}}),title:"Revoke permission",confirmLabel:"Revoke",danger:!0,loading:h.isPending,children:p.jsxs("div",{className:"grid gap-4",children:[p.jsxs("p",{className:"text-[13px] text-muted-foreground",children:["Revoke ",p.jsx("strong",{className:"text-foreground",children:d})," from"," ",p.jsx(Dt,{children:n==null?void 0:n.subject}),"? Checks stop counting it right away."]}),p.jsx(Xt,{label:"Reason",htmlFor:"revoke-reason",hint:"Recorded in the history.",children:p.jsx(Un,{id:"revoke-reason",placeholder:"e.g. Escalation closed",value:a,maxLength:1e3,onChange:m=>c(m.target.value)})})]})})}const Bf="__default__";function Tz({open:n,onClose:i,subject:s,catalog:a}){const[c,f]=dt.useState(s.role??Bf),[d,h]=dt.useState("");dt.useEffect(()=>{n&&f(s.role??Bf)},[n,s.role]);const m=()=>{h(""),i()},g=Wu(S=>ez(s.id,{role:S.role,...S.reason?{reason:S.reason}:{}}),{success:S=>S.role?`${s.id} is now ${a.roleLabel(S.role)}`:`Cleared the stored role of ${s.id}`,error:"Could not change the role",onSuccess:m}),v=[{value:Bf,label:"No stored role",description:`The auth provider's role, else ${a.roleLabel(a.view.defaultRole)}`},...a.view.roles.filter(S=>S.key!==a.view.guestRole).map(S=>({value:S.key,label:S.label,...S.description?{description:S.description}:{}}))],b=c===Bf?null:c;return p.jsx($u,{open:n,onClose:m,title:"Change role",description:p.jsxs(p.Fragment,{children:["The stored role of ",p.jsx(Dt,{children:s.id})," overrides the role the auth provider reports."]}),footer:p.jsxs(p.Fragment,{children:[p.jsx(Lt,{variant:"secondary",onClick:m,disabled:g.isPending,children:"Cancel"}),p.jsx(Lt,{onClick:()=>g.mutate({role:b,...d.trim()?{reason:d.trim()}:{}}),loading:g.isPending,disabled:b===(s.role??null),children:"Save role"})]}),children:p.jsxs("div",{className:"grid gap-4",children:[p.jsx(Xt,{label:"Role",children:p.jsx(Kr,{"aria-label":"Role",value:c,onValueChange:f,options:v})}),p.jsx(Xt,{label:"Reason",htmlFor:"role-reason",hint:"Recorded in the history.",children:p.jsx(Un,{id:"role-reason",placeholder:"e.g. Promoted to editor",value:d,maxLength:1e3,onChange:S=>h(S.target.value)})})]})})}function Oz({id:n,ctx:i,catalog:s}){var f;const a=Zi({queryKey:[...Rl.history,n,"recent"],queryFn:()=>KR({subject:n,limit:10}),staleTime:5e3}),c=((f=a.data)==null?void 0:f.entries)??[];return p.jsx(yi,{title:"Recent history",flush:!0,actions:p.jsx(Lt,{size:"sm",variant:"ghost",onClick:()=>i.go("/history",{subject:n}),children:"All history"}),children:a.isLoading?p.jsx("p",{className:"px-5 py-6 text-[13px] text-muted-foreground",children:"Loading…"}):c.length===0?p.jsx("p",{className:"px-5 py-6 text-[13px] text-muted-foreground",children:"No history yet."}):p.jsx(Qs,{label:"Recent history",head:["When","Change","Detail","By","Reason"],children:c.map(d=>p.jsxs("tr",{children:[p.jsx("td",{className:"px-4 py-3 text-[13px]",children:p.jsx(jd,{at:d.at})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx(XR,{type:d.type})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx(ZR,{entry:d,catalog:s})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx(Ad,{actor:d.actor})}),p.jsx("td",{className:"max-w-64 px-4 py-3 text-[13px] text-muted-foreground",children:d.reason??"—"})]},d.id))})})}function jz(){const n=To(),i=n.data;return p.jsxs(Xr,{children:[p.jsx(Ys,{title:"Catalog",description:"Declared in code with definePermissions() and shared by the server, the browser and this panel. Read-only here: change it in code."}),n.isLoading?p.jsx(Co,{label:"Loading catalog…"}):i?p.jsxs("div",{className:"mt-6 grid gap-6",children:[p.jsx(yi,{title:"Roles",description:"Ordered least → most privileged. A subject with several roles gets the most privileged one.",flush:!0,children:p.jsx(Qs,{label:"Roles",head:["#","Role","Description",""],children:i.view.roles.map((s,a)=>p.jsxs("tr",{"data-role":s.key,children:[p.jsx("td",{className:"w-10 px-4 py-3 text-[13px] tabular-nums text-muted-foreground",children:a+1}),p.jsxs("td",{className:"px-4 py-3",children:[p.jsx("span",{className:"block text-[13px] font-medium",children:s.label}),s.label!==s.key?p.jsx(Dt,{className:"text-xs text-muted-foreground",children:s.key}):null]}),p.jsx("td",{className:"px-4 py-3 text-[13px] text-muted-foreground",children:s.description??"—"}),p.jsx("td",{className:"px-4 py-3",children:p.jsxs("span",{className:"flex flex-wrap justify-end gap-1.5",children:[s.key===i.view.guestRole?p.jsx(Wa,{children:"Guest"}):null,s.key===i.view.defaultRole?p.jsx(Wa,{children:"Default"}):null,i.view.managerRoles.includes(s.key)?p.jsx(Wa,{className:"border-accent/35 bg-accent/10 text-accent",children:"Manager"}):null]})})]},s.key))})}),p.jsx(yi,{title:"Assignable permissions",description:i.view.directGrants?"Granted per subject. Direct grants are on: a grant named like a checked path allows it outright.":"Granted per subject; the role's rules decide what each one unlocks.",flush:!0,children:i.view.assignable.length===0?p.jsx("p",{className:"px-5 py-6 text-[13px] text-muted-foreground",children:"None: this catalog is roles only."}):p.jsx(Qs,{label:"Assignable permissions",head:["Permission","Description"],children:i.view.assignable.map(s=>p.jsxs("tr",{"data-permission":s.key,children:[p.jsxs("td",{className:"px-4 py-3",children:[p.jsx("span",{className:"block text-[13px] font-medium",children:s.label}),s.label!==s.key?p.jsx(Dt,{className:"text-xs text-muted-foreground",children:s.key}):null]}),p.jsx("td",{className:"px-4 py-3 text-[13px] text-muted-foreground",children:s.description??"—"})]},s.key))})}),i.view.paths&&i.view.paths.length>0?p.jsx(yi,{title:"Rule paths",description:"Every path the roles' rules define, as checked by can() and the playground.",children:p.jsx("div",{className:"flex flex-wrap gap-1.5",children:i.view.paths.map(s=>p.jsx(Dt,{className:"rounded-md border border-border bg-secondary/50 px-1.5 py-0.5 text-xs",children:s},s))})}):null]}):p.jsx(bi,{className:"mt-6",children:"Failed to load the catalog."})]})}function Az(n){if(!n.trim())return{ok:!0,value:void 0};try{return{ok:!0,value:JSON.parse(n)}}catch(i){return{ok:!1,error:ud(i)}}}const Nz={grant:()=>"A non-expired grant named like the path allowed it (direct grants are on).","role-rule":(n,i)=>`The ${(i==null?void 0:i.roleLabel(n.role))??n.role} role's rule allowed it.`,"denied-by-rule":(n,i)=>`The ${(i==null?void 0:i.roleLabel(n.role))??n.role} role's rule denied it.`,"rule-threw":()=>"The rule threw, so the check denied it.","unknown-path":(n,i)=>`The ${(i==null?void 0:i.roleLabel(n.role))??n.role} role has no rule at this path, so the check denied it.`},Mz={constant:"a constant (true / false)",predicate:"a predicate (a function of the data)",threw:"a predicate that threw",missing:"no rule (missing path)"},zz=n=>typeof n=="string"?n:n&&typeof n=="object"&&"message"in n?String(n.message):JSON.stringify(n);function Dz({ctx:n}){var V;const i=To().data,[s]=fd(),a=Zi({queryKey:Rl.subjects,queryFn:QR,staleTime:1e4,enabled:n.can("subjects:read")}),[c,f]=dt.useState(s.get("role")?"role":s.has("guest")?"guest":s.has("relation")?"relation":"subject"),[d,h]=dt.useState(s.get("subject")??""),[m,g]=dt.useState(s.get("role")??""),[v,b]=dt.useState(s.get("path")??""),[S,C]=dt.useState(""),T=Az(S),R=(i==null?void 0:i.view.roles)??[],j=m||(i?i.view.defaultRole:""),O=(i==null?void 0:i.view.paths)??[],E=Bg({mutationFn:H=>lz(H)}),A=(i==null?void 0:i.relations)??[],[N,L]=dt.useState(s.get("subject")??""),[D,_]=dt.useState(s.get("relation")??""),[M,Q]=dt.useState(s.get("object")??""),J=M.includes(":")?M.slice(0,M.indexOf(":")):"",re=(((V=A.find(H=>H.type===J))==null?void 0:V.relations)??A.flatMap(H=>H.relations)).map(H=>H.name).filter((H,ne,F)=>F.indexOf(H)===ne),te=Bg({mutationFn:H=>az(H)}),$=c==="relation"?N.trim()!==""&&D!==""&&M.trim()!=="":v.trim()!==""&&T.ok&&(c!=="subject"||d.trim()!==""),oe=H=>{if(H==null||H.preventDefault(),!!$){if(c==="relation"){te.mutate({subject:N.trim(),relation:D,object:M.trim()});return}T.ok&&E.mutate({path:v.trim(),...T.value!==void 0?{data:T.value}:{},...c==="subject"?{subject:d.trim()}:{},...c==="role"?{role:j}:{},...c==="guest"?{subject:null}:{}})}};return p.jsxs(Xr,{children:[p.jsx(Ys,{title:"Check playground",description:"Run a check the way the server does — same catalog, same rules — and see what decided it."}),p.jsxs("div",{className:"mt-6 grid gap-6 lg:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]",children:[p.jsx(yi,{title:"Check",children:p.jsxs("form",{onSubmit:oe,className:"grid gap-4",children:[p.jsx(Xt,{label:"As",children:p.jsx(VR,{value:c,onValueChange:f,options:[{value:"subject",label:"Subject"},{value:"role",label:"Role"},{value:"guest",label:"Guest"},...A.length>0?[{value:"relation",label:"Relation (ReBAC)"}]:[]]})}),c==="relation"?p.jsxs(p.Fragment,{children:[p.jsx(Xt,{label:"Subject",htmlFor:"rel-check-subject",hint:"user:ana, or a userset such as group:eng#member.",children:p.jsx(Un,{id:"rel-check-subject",placeholder:"user:ana",value:N,onChange:H=>L(H.target.value),className:"font-mono"})}),p.jsx(Xt,{label:"Object",htmlFor:"rel-check-object",hint:"type:id, e.g. doc:1.",children:p.jsx(Un,{id:"rel-check-object",placeholder:"doc:1",value:M,onChange:H=>Q(H.target.value),className:"font-mono"})}),p.jsx(Xt,{label:"Relation",children:p.jsx(Kr,{"aria-label":"Relation",value:D,onValueChange:_,placeholder:"Choose a relation",options:re.map(H=>({value:H,label:H}))})})]}):c==="subject"?p.jsxs(Xt,{label:"Subject id",htmlFor:"check-subject",hint:"Its stored role and grants apply; without a stored role, the default role.",children:[p.jsx(Un,{id:"check-subject",list:"check-subjects",placeholder:"user_123",value:d,onChange:H=>h(H.target.value),className:"font-mono"}),p.jsx("datalist",{id:"check-subjects",children:(a.data??[]).map(H=>p.jsx("option",{value:H.id,children:H.name??H.email??""},H.id))})]}):c==="role"?p.jsx(Xt,{label:"Role",hint:"A signed-in subject with this role and no grants.",children:p.jsx(Kr,{"aria-label":"Role",value:j,onValueChange:g,options:R.filter(H=>H.key!==(i==null?void 0:i.view.guestRole)).map(H=>({value:H.key,label:H.label}))})}):p.jsxs("p",{className:"text-[13px] text-muted-foreground",children:["No session: the ",(i==null?void 0:i.roleLabel(i.view.guestRole))??"guest"," role, no grants."]}),c==="relation"?null:p.jsxs(p.Fragment,{children:[p.jsx(Xt,{label:"Path",hint:"A permix path, e.g. post.publish.",children:O.length>0?p.jsx(B4,{"aria-label":"Path",value:v,options:O,onSelect:b,onCreate:b,placeholder:"Choose a path",createLabel:H=>`Check "${H}"`,className:"font-mono"}):p.jsx(Un,{"aria-label":"Path",placeholder:"post.publish",value:v,onChange:H=>b(H.target.value),className:"font-mono"})}),p.jsx(Xt,{label:"Data (JSON)",htmlFor:"check-data",hint:T.ok?"The checked resource, for rules that read it. Leave empty for none.":p.jsxs("span",{className:"text-destructive",children:["Invalid JSON: ",T.error]}),children:p.jsx(q4,{id:"check-data",rows:7,spellCheck:!1,placeholder:'{ "authorId": "user_123" }',value:S,onChange:H=>C(H.target.value),"aria-invalid":!T.ok,className:"font-mono text-xs"})})]}),p.jsx("div",{children:p.jsx(Lt,{type:"submit",icon:p.jsx($O,{className:"size-4"}),loading:E.isPending||te.isPending,disabled:!$,children:"Run check"})})]})}),p.jsx(yi,{title:"Result",children:c==="relation"?te.isError?p.jsx("p",{className:"text-[13px] text-destructive",role:"alert",children:ud(te.error)}):te.data?p.jsx(kz,{result:te.data,query:te.variables}):p.jsx("p",{className:"text-[13px] text-muted-foreground",children:"Run a check to see the decision and the path of relations."}):E.isError?p.jsx("p",{className:"text-[13px] text-destructive",role:"alert",children:ud(E.error)}):E.data?p.jsx(_z,{result:E.data,catalog:i}):p.jsx("p",{className:"text-[13px] text-muted-foreground",children:"Run a check to see the decision."})})]})]})}function _z({result:n,catalog:i}){const{explanation:s}=n,a=(s==null?void 0:s.permissions)??[];return p.jsxs("div",{className:"grid gap-4","data-testid":"check-result","data-allowed":String(n.allowed),children:[p.jsxs("div",{className:xt("flex items-center gap-3 rounded-lg border px-4 py-3",n.allowed?"border-success/30 bg-success/10 text-success":"border-destructive/30 bg-destructive/10 text-destructive"),children:[n.allowed?p.jsx(a1,{className:"size-6"}):p.jsx(u1,{className:"size-6"}),p.jsxs("div",{className:"flex flex-col",children:[p.jsx("span",{className:"text-lg font-semibold",children:n.allowed?"Allowed":"Denied"}),p.jsx(Dt,{className:"text-xs opacity-80",children:n.path})]}),p.jsx(Wa,{className:"ml-auto",children:n.reason})]}),p.jsx("p",{className:"text-[13px] text-foreground",children:(Nz[n.reason]??(()=>n.reason))(n,i)}),p.jsxs("dl",{className:"grid grid-cols-[max-content_1fr] gap-x-4 gap-y-2.5 text-[13px]",children:[p.jsx("dt",{className:"text-muted-foreground",children:"Subject"}),p.jsx("dd",{children:n.subject?p.jsx(Dt,{children:n.subject}):p.jsx("span",{className:"text-muted-foreground",children:"guest / none"})}),p.jsx("dt",{className:"text-muted-foreground",children:"Role"}),p.jsx("dd",{children:p.jsx(Lu,{role:n.role,catalog:i})}),p.jsx("dt",{className:"text-muted-foreground",children:"Decided by"}),p.jsx("dd",{children:Mz[s==null?void 0:s.decidedBy]??(s==null?void 0:s.decidedBy)??"—"}),p.jsx("dt",{className:"text-muted-foreground",children:"Permissions seen"}),p.jsx("dd",{className:"flex flex-wrap gap-1.5",children:a.length===0?p.jsx("span",{className:"text-muted-foreground",children:"none"}):a.map(c=>p.jsx(Dt,{className:"rounded-md border border-border bg-secondary/50 px-1.5 py-0.5 text-xs",children:c},c))}),(s==null?void 0:s.decidedBy)==="threw"&&s.error!==void 0?p.jsxs(p.Fragment,{children:[p.jsx("dt",{className:"text-muted-foreground",children:"Error"}),p.jsx("dd",{className:"font-mono text-xs text-destructive",children:zz(s.error)})]}):null]})]})}function kz({result:n,query:i}){return p.jsxs("div",{className:"grid gap-4","data-testid":"relation-result","data-allowed":String(n.allowed),children:[p.jsxs("div",{className:xt("flex items-center gap-3 rounded-lg border px-4 py-3",n.allowed?"border-success/30 bg-success/10 text-success":"border-destructive/30 bg-destructive/10 text-destructive"),children:[n.allowed?p.jsx(a1,{className:"size-6"}):p.jsx(u1,{className:"size-6"}),p.jsxs("div",{className:"flex flex-col",children:[p.jsx("span",{className:"text-lg font-semibold",children:n.allowed?"Allowed":"Denied"}),p.jsxs(Dt,{className:"text-xs opacity-80",children:[i.subject," → ",i.object,"#",i.relation]})]})]}),n.allowed?p.jsxs("div",{className:"grid gap-2",children:[p.jsx("span",{className:"text-[13px] text-muted-foreground",children:"Path (object → subject), each hop grants the one above it:"}),p.jsx("ol",{className:"grid gap-1.5","data-testid":"relation-path",children:n.path.map((s,a)=>p.jsxs("li",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"w-5 text-right text-xs tabular-nums text-muted-foreground",children:a+1}),p.jsx(Dt,{className:"rounded-md border border-border bg-secondary/50 px-1.5 py-0.5 text-xs",children:s})]},`${a}-${s}`))})]}):p.jsx("p",{className:"text-[13px] text-foreground",children:"No chain of relations connects the subject to this relation on the object (or an exclusion removed it)."})]})}const Lz=50;function Uz({ctx:n}){var g;const i=To().data,[s]=fd(),a=s.get("subject")??"",[c,f]=dt.useState(a);dt.useEffect(()=>f(a),[a]);const d=JS({queryKey:[...Rl.history,"page",a],queryFn:({pageParam:v})=>KR({limit:Lz,...a?{subject:a}:{},...v?{cursor:v}:{}}),initialPageParam:"",getNextPageParam:v=>v.nextCursor??void 0,staleTime:5e3}),h=((g=d.data)==null?void 0:g.pages.flatMap(v=>v.entries))??[],m=v=>{v==null||v.preventDefault(),n.go("/history",{subject:c.trim()})};return p.jsxs(Xr,{children:[p.jsx(Ys,{title:"History",description:"Every grant, revoke, role change and relationship, with who did it and why."}),p.jsxs("form",{onSubmit:m,className:"mt-6 flex items-center gap-2",children:[p.jsx(Un,{"aria-label":"Filter by subject",placeholder:"Filter by subject id",value:c,onChange:v=>f(v.target.value),className:"max-w-xs font-mono"}),p.jsx(Lt,{type:"submit",variant:"secondary",children:"Filter"}),a?p.jsx(Lt,{type:"button",variant:"ghost",icon:p.jsx(C1,{className:"size-4"}),onClick:()=>n.go("/history",{subject:""}),children:"Clear"}):null]}),d.isLoading?p.jsx(Co,{label:"Loading history…"}):d.isError?p.jsx(bi,{className:"mt-4",children:"Failed to load the history."}):h.length===0?p.jsx(bi,{className:"mt-4",children:a?p.jsxs(p.Fragment,{children:["No history for ",p.jsx(Dt,{children:a}),"."]}):"No history yet."}):p.jsxs(p.Fragment,{children:[p.jsx(ty,{className:"mt-4",children:p.jsx(Qs,{label:"History",head:["When","Change","Subject","Detail","By","Reason"],children:h.map(v=>p.jsxs("tr",{"data-type":v.type,children:[p.jsx("td",{className:"px-4 py-3 text-[13px]",children:p.jsx(jd,{at:v.at})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx(XR,{type:v.type})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx("button",{type:"button",className:"font-mono text-[13px] hover:underline",onClick:()=>v.type==="relate"||v.type==="unrelate"?n.go("/relationships",{subject:v.subject}):n.go(Ff(v.subject)),children:v.subject})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx(ZR,{entry:v,catalog:i})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx(Ad,{actor:v.actor})}),p.jsx("td",{className:"max-w-64 px-4 py-3 text-[13px] text-muted-foreground",children:v.reason??"—"})]},v.id))})}),d.hasNextPage?p.jsx("div",{className:"mt-4 flex justify-center",children:p.jsx(Lt,{variant:"secondary",loading:d.isFetchingNextPage,onClick:()=>void d.fetchNextPage(),children:"Load older"})}):null]})]})}const Hz=100,Cg="__any__",Iz=n=>{const i=n.indexOf(":");return i===-1?{type:n,id:""}:{type:n.slice(0,i),id:n.slice(i+1)}};function Vz({ctx:n}){var re,te;const i=To().data,s=(i==null?void 0:i.relations)??[],[a]=fd(),c=a.get("subject")??"",f=a.get("object")??"",d=a.get("relation")??"",h=c?"subject":"object",[m,g]=dt.useState(h),[v,b]=dt.useState(f),[S,C]=dt.useState(c),[T,R]=dt.useState(d);dt.useEffect(()=>{g(h),b(f),C(c),R(d)},[h,f,c,d]);const[j,O]=dt.useState(!1),[E,A]=dt.useState(null),N=n.canWrite("relationships:write"),L={...f?{object:f}:{},...c?{subject:c}:{},...d?{relation:d}:{}},D=JS({queryKey:[...Rl.relationships,"page",L],queryFn:({pageParam:$})=>iz({...L,limit:Hz,...$?{cursor:$}:{}}),initialPageParam:"",getNextPageParam:$=>$.nextCursor??void 0,staleTime:5e3}),_=((re=D.data)==null?void 0:re.pages.flatMap($=>$.relationships))??[],M=$=>{$==null||$.preventDefault(),n.go("/relationships",m==="object"?{object:v.trim(),relation:T,subject:""}:{subject:S.trim(),relation:T,object:""})},Q=Iz(v).type,J=(m==="object"?((te=s.find($=>$.type===Q))==null?void 0:te.relations)??[]:s.flatMap($=>$.relations)).map($=>$.name).filter(($,oe,V)=>V.indexOf($)===oe);return i&&s.length===0?p.jsxs(Xr,{children:[p.jsx(Ys,{title:"Relationships"}),p.jsxs(bi,{className:"mt-6",children:["This catalog declares no relations. Pass ",p.jsx(Dt,{children:"relations"})," (a"," ",p.jsx(Dt,{children:"defineRelations"})," schema) to ",p.jsx(Dt,{children:"definePermissions"})," to use relationship-based access control."]})]}):p.jsxs(Xr,{children:[p.jsx(Ys,{title:"Relationships",description:"Relationship tuples (ReBAC): who has which relation on which object, directly. Checks follow groups, parents and the schema's rules from here.",actions:N?p.jsx(Lt,{icon:p.jsx(FO,{className:"size-4"}),onClick:()=>O(!0),children:"Write relationship"}):null}),p.jsxs("form",{onSubmit:M,className:"mt-6 flex flex-wrap items-end gap-2",children:[p.jsx(VR,{value:m,onValueChange:g,options:[{value:"object",label:"By object"},{value:"subject",label:"By subject"}]}),m==="object"?p.jsx(Un,{"aria-label":"Object",placeholder:"doc:1, or a type: doc",value:v,onChange:$=>b($.target.value),className:"max-w-xs font-mono"}):p.jsx(Un,{"aria-label":"Subject",placeholder:"user:ana, group:eng#member",value:S,onChange:$=>C($.target.value),className:"max-w-xs font-mono"}),p.jsx(Kr,{"aria-label":"Relation",value:T||Cg,onValueChange:$=>R($===Cg?"":$),options:[{value:Cg,label:"Any relation"},...J.map($=>({value:$,label:$}))]}),p.jsx(Lt,{type:"submit",variant:"secondary",icon:p.jsx(x1,{className:"size-4"}),children:"Show"})]}),D.isLoading?p.jsx(Co,{label:"Loading relationships…"}):D.isError?p.jsx(bi,{className:"mt-4",children:"Failed to load relationships."}):_.length===0?p.jsx(bi,{className:"mt-4",children:"No relationships match."}):p.jsxs(p.Fragment,{children:[p.jsx(ty,{className:"mt-4",children:p.jsx(Qs,{label:"Relationships",head:["Object","Relation","Subject","By","When","Reason",""],children:_.map($=>p.jsxs("tr",{"data-testid":"relationship-row",children:[p.jsx("td",{className:"px-4 py-3",children:p.jsx("button",{type:"button",className:"font-mono text-[13px] hover:underline",onClick:()=>n.go("/relationships",{object:$.object,subject:""}),children:$.object})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx(Dt,{className:"text-[13px]",children:$.relation})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx("button",{type:"button",className:"font-mono text-[13px] hover:underline",onClick:()=>n.go("/relationships",{subject:$.subject,object:""}),children:$.subject})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx(Ad,{actor:$.createdBy})}),p.jsx("td",{className:"px-4 py-3 text-[13px]",children:p.jsx(jd,{at:$.createdAt})}),p.jsx("td",{className:"max-w-64 px-4 py-3 text-[13px] text-muted-foreground",children:$.reason??"—"}),p.jsx("td",{className:"px-4 py-3 text-right",children:N?p.jsx(Lt,{variant:"ghost",size:"sm","aria-label":`Delete ${$.object}#${$.relation}@${$.subject}`,icon:p.jsx(ej,{className:"size-4"}),onClick:()=>A($)}):null})]},`${$.object}#${$.relation}@${$.subject}`))})}),D.hasNextPage?p.jsx("div",{className:"mt-4 flex justify-center",children:p.jsx(Lt,{variant:"secondary",loading:D.isFetchingNextPage,onClick:()=>void D.fetchNextPage(),children:"Load more"})}):null]}),d&&f.includes(":")?p.jsx(Bz,{object:f,relation:d}):null,d&&c?p.jsx(qz,{subject:c,relation:d,types:s}):null,p.jsx(Pz,{open:j,onClose:()=>O(!1),types:s}),p.jsx(Gz,{relationship:E,onClose:()=>A(null)})]})}function Bz({object:n,relation:i}){const s=Zi({queryKey:[...Rl.relationships,"subjects",n,i],queryFn:()=>uz({object:n,relation:i}),staleTime:5e3});return p.jsx("div",{"data-testid":"effective-subjects",children:p.jsx(yi,{title:`Effective: who is ${i} of ${n}`,className:"mt-6",children:p.jsx(JR,{query:s,empty:"Nobody."})})})}function qz({subject:n,relation:i,types:s}){const a=s.filter(f=>f.relations.some(d=>d.name===i)),c=Zi({queryKey:[...Rl.relationships,"objects",n,i,a.map(f=>f.type)],enabled:a.length>0,queryFn:async()=>(await Promise.all(a.map(f=>oz({subject:n,relation:i,type:f.type})))).flat(),staleTime:5e3});return p.jsx("div",{"data-testid":"effective-objects",children:p.jsx(yi,{title:`Effective: where ${n} is ${i}`,className:"mt-6",children:p.jsx(JR,{query:{...c,isLoading:c.isPending},empty:"Nowhere."})})})}function JR({query:n,empty:i}){var a;if(n.isLoading)return p.jsx(Co,{label:"Expanding…"});if(n.isError)return p.jsx("p",{className:"text-[13px] text-destructive",children:String((a=n.error)==null?void 0:a.message)});const s=n.data??[];return s.length===0?p.jsx("p",{className:"text-[13px] text-muted-foreground",children:i}):p.jsx("ul",{className:"flex flex-wrap gap-1.5",children:s.map(c=>p.jsx("li",{children:p.jsx(Dt,{className:"rounded-md border border-border bg-secondary/50 px-1.5 py-0.5 text-xs",children:c})},c))})}function Pz({open:n,onClose:i,types:s}){var J,re;const a=s.filter(te=>te.relations.some($=>$.subjects.length>0)),[c,f]=dt.useState(""),[d,h]=dt.useState(""),[m,g]=dt.useState(""),[v,b]=dt.useState(""),[S,C]=dt.useState(""),[T,R]=dt.useState(""),j=c||((J=a[0])==null?void 0:J.type)||"",O=(((re=s.find(te=>te.type===j))==null?void 0:re.relations)??[]).filter(te=>te.subjects.length>0),E=O.find(te=>te.name===m)??O[0],A=(E!=null&&E.subjects.includes(v)?v:E==null?void 0:E.subjects[0])??"",N=A.endsWith(":*"),L=N?A:A.includes("#")?`${A.slice(0,A.indexOf("#"))}:${S.trim()}${A.slice(A.indexOf("#"))}`:`${A}:${S.trim()}`,D=()=>{f(""),h(""),g(""),b(""),C(""),R(""),i()},_=Wu(te=>rz(te),{success:(te,$)=>$.created?`Wrote ${te.object}#${te.relation}@${te.subject}`:"Already stored: nothing changed",error:"Could not write the relationship",onSuccess:D}),M=!!E&&d.trim()!==""&&(N||S.trim()!==""),Q=()=>M&&_.mutate({object:`${j}:${d.trim()}`,relation:E.name,subject:L,...T.trim()?{reason:T.trim()}:{}});return p.jsx($u,{open:n,onClose:D,title:"Write relationship",description:"Stores one tuple. Writing a stored tuple changes nothing.",footer:p.jsxs(p.Fragment,{children:[p.jsx(Lt,{variant:"secondary",onClick:D,disabled:_.isPending,children:"Cancel"}),p.jsx(Lt,{onClick:Q,loading:_.isPending,disabled:!M,children:"Write"})]}),children:p.jsxs("div",{className:"grid gap-4",children:[p.jsxs("div",{className:"grid grid-cols-[minmax(0,10rem)_minmax(0,1fr)] gap-2",children:[p.jsx(Xt,{label:"Object type",children:p.jsx(Kr,{"aria-label":"Object type",value:j,onValueChange:te=>{f(te),g(""),b("")},options:a.map(te=>({value:te.type,label:te.type}))})}),p.jsx(Xt,{label:"Object id",htmlFor:"rel-object-id",children:p.jsx(Un,{id:"rel-object-id",placeholder:"1",value:d,onChange:te=>h(te.target.value),className:"font-mono"})})]}),p.jsx(Xt,{label:"Relation",hint:E?p.jsx(Dt,{className:"text-xs",children:E.rule}):void 0,children:p.jsx(Kr,{"aria-label":"Relation",value:(E==null?void 0:E.name)??"",onValueChange:te=>{g(te),b("")},options:O.map(te=>({value:te.name,label:te.name}))})}),p.jsxs("div",{className:"grid grid-cols-[minmax(0,10rem)_minmax(0,1fr)] gap-2",children:[p.jsx(Xt,{label:"Subject kind",children:p.jsx(Kr,{"aria-label":"Subject kind",value:A,onValueChange:b,options:((E==null?void 0:E.subjects)??[]).map(te=>({value:te,label:te.endsWith(":*")?`every ${te.slice(0,-2)}`:te}))})}),N?p.jsx(Xt,{label:"Subject",children:p.jsx(Dt,{className:"py-2 text-[13px]",children:A})}):p.jsx(Xt,{label:"Subject id",htmlFor:"rel-subject-id",children:p.jsx(Un,{id:"rel-subject-id",placeholder:"ana",value:S,onChange:te=>C(te.target.value),className:"font-mono"})})]}),p.jsxs("p",{className:"text-xs text-muted-foreground",children:["Tuple: ",p.jsx(Dt,{children:`${j}:${d.trim()||"…"}#${(E==null?void 0:E.name)??"…"}@${L}`})]}),p.jsx(Xt,{label:"Reason",htmlFor:"rel-reason",hint:"Recorded with the tuple and in the history.",children:p.jsx(Un,{id:"rel-reason",placeholder:"e.g. Shared with the design team",value:T,maxLength:1e3,onChange:te=>R(te.target.value)})})]})})}function Gz({relationship:n,onClose:i}){const[s,a]=dt.useState(""),c=()=>{a(""),i()},f=Wu(d=>sz(d),{success:d=>`Deleted ${d.object}#${d.relation}@${d.subject}`,error:"Could not delete the relationship",onSuccess:c});return p.jsx(BR,{open:n!==null,onClose:c,onConfirm:()=>n&&f.mutate({object:n.object,relation:n.relation,subject:n.subject,...s.trim()?{reason:s.trim()}:{}}),title:"Delete relationship",confirmLabel:"Delete",danger:!0,loading:f.isPending,children:p.jsxs("div",{className:"grid gap-4",children:[p.jsxs("p",{className:"text-[13px] text-muted-foreground",children:["Delete"," ",p.jsxs(Dt,{children:[n==null?void 0:n.object,"#",n==null?void 0:n.relation,"@",n==null?void 0:n.subject]}),"? Checks stop following it right away."]}),p.jsx(Xt,{label:"Reason",htmlFor:"unrelate-reason",hint:"Recorded in the history.",children:p.jsx(Un,{id:"unrelate-reason",placeholder:"e.g. Left the project",value:s,maxLength:1e3,onChange:d=>a(d.target.value)})})]})})}const Yz=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="96 280.0 832 450.0" width="832" height="450.0" role="img" aria-label="xtandard-permissions">
|
|
85
|
+
<title>xtandard-permissions</title>
|
|
86
|
+
<defs><linearGradient id="lime" x1="250" y1="250" x2="760" y2="740" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#D9F99D"/><stop offset=".42" stop-color="#A3E635"/><stop offset="1" stop-color="#65A30D"/></linearGradient></defs>
|
|
87
|
+
<g fill="none" stroke="#5B6167" stroke-width="40" stroke-linecap="round" stroke-linejoin="round"><path d="M190 438L118 512L190 586"/><path d="M834 438L906 512L834 586"/></g>
|
|
88
|
+
<path d="M250 300L395 300L560 512L395 724L250 724L415 512Z" fill="url(#lime)"/>
|
|
89
|
+
<path d="M580.0 300L725.0 300L583.0 482.4L510.5 389.3Z" fill="url(#lime)"/>
|
|
90
|
+
<path d="M580.0 724L725.0 724L583.0 541.6L510.5 634.7Z" fill="url(#lime)"/>
|
|
91
|
+
<path d="M707.8 312.3L774.1 363.9L746.1 399.9L679.8 348.3Z" fill="url(#lime)" stroke="url(#lime)" stroke-width="8" stroke-linejoin="round"/>
|
|
92
|
+
<path d="M654.9 380.3L700.7 415.9L675.8 447.9L630.0 412.3Z" fill="url(#lime)" stroke="url(#lime)" stroke-width="8" stroke-linejoin="round"/>
|
|
93
|
+
</svg>
|
|
94
|
+
`,Qz=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="96 280.0 832 450.0" width="832" height="450.0" role="img" aria-label="xtandard-permissions">
|
|
95
|
+
<title>xtandard-permissions</title>
|
|
96
|
+
<defs><linearGradient id="lime" x1="250" y1="250" x2="760" y2="740" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#A3E635"/><stop offset=".42" stop-color="#84CC16"/><stop offset="1" stop-color="#4D7C0F"/></linearGradient></defs>
|
|
97
|
+
<g fill="none" stroke="#8B939C" stroke-width="40" stroke-linecap="round" stroke-linejoin="round"><path d="M190 438L118 512L190 586"/><path d="M834 438L906 512L834 586"/></g>
|
|
98
|
+
<path d="M250 300L395 300L560 512L395 724L250 724L415 512Z" fill="url(#lime)"/>
|
|
99
|
+
<path d="M580.0 300L725.0 300L583.0 482.4L510.5 389.3Z" fill="url(#lime)"/>
|
|
100
|
+
<path d="M580.0 724L725.0 724L583.0 541.6L510.5 634.7Z" fill="url(#lime)"/>
|
|
101
|
+
<path d="M707.8 312.3L774.1 363.9L746.1 399.9L679.8 348.3Z" fill="url(#lime)" stroke="url(#lime)" stroke-width="8" stroke-linejoin="round"/>
|
|
102
|
+
<path d="M654.9 380.3L700.7 415.9L675.8 447.9L630.0 412.3Z" fill="url(#lime)" stroke="url(#lime)" stroke-width="8" stroke-linejoin="round"/>
|
|
103
|
+
</svg>
|
|
104
|
+
`,Kz=[{path:"/",label:"Subjects",match:n=>n==="/"||n.startsWith("/subjects"),requires:"subjects:read"},{path:"/catalog",label:"Catalog",match:n=>n.startsWith("/catalog"),requires:"catalog:read"},{path:"/relationships",label:"Relationships",match:n=>n.startsWith("/relationships"),requires:"relationships:read"},{path:"/check",label:"Check",match:n=>n.startsWith("/check"),requires:"check:run"},{path:"/history",label:"History",match:n=>n.startsWith("/history"),requires:"history:read"}],Ff=n=>`/subjects/${encodeURIComponent(n)}`;function Fz({locationHook:n,searchHook:i,base:s="",logoUrl:a,showThemeToggle:c}){return p.jsx($1,{hook:n??PR,searchHook:i,base:s,children:p.jsx(Xz,{logoUrl:a,showThemeToggle:c})})}function Xz({logoUrl:n,showThemeToggle:i}){var T;const s=TA({getConfig:$4,bootstrap:sE("__PERMISSIONS_CONFIG__")}),a=s.config,{readonly:c}=s,f=R=>!a.allowed||a.allowed.includes(R),d=a.roleSource==="external",h=R=>!c&&f(R)&&!(R==="roles:write"&&d),m=OA(),g=Zi({queryKey:Rl.catalog,queryFn:YR,staleTime:5*6e4,enabled:s.ready&&a.authenticated!==!1&&f("catalog:read")}).data,v=(((T=g==null?void 0:g.relations)==null?void 0:T.length)??0)>0,b=Kz.filter(R=>f(R.requires)&&(R.path!=="/relationships"||v)).map(({path:R,label:j,match:O})=>({path:R,label:j,match:O})),S={config:a,readonly:c,go:m,can:f,canWrite:h,externalRoles:d},C=a.principal?p.jsx("span",{className:`hidden truncate text-[13px] text-muted-foreground sm:inline ${a.principal.name?"":"font-mono"}`,title:a.principal.id,children:a.principal.name??a.principal.id}):null;return p.jsx(AA,{title:a.title||"Permissions",logoUrl:n??a.logoUrl,brandMark:p.jsx(Q4,{light:Qz,dark:Yz,className:"h-6 w-auto"}),onBrandClick:()=>m("/"),headerExtra:C,readonly:c,showThemeToggle:i,tabs:b,onNavigate:R=>m(R),fallback:s.failed?p.jsx(NA,{}):null,children:s.loading?null:s.ready&&a.authenticated===!1?p.jsx(Xr,{children:p.jsx(bi,{className:"mt-6",children:"Sign in to manage permissions: this panel needs an authenticated principal."})}):p.jsxs(aA,{children:[p.jsx(Ya,{path:"/subjects/:id",children:R=>p.jsx(xz,{id:decodeURIComponent(R.id),ctx:S})}),p.jsx(Ya,{path:"/catalog",children:p.jsx(jz,{})}),p.jsx(Ya,{path:"/relationships",children:p.jsx(Vz,{ctx:S})}),p.jsx(Ya,{path:"/check",children:p.jsx(Dz,{ctx:S})}),p.jsx(Ya,{path:"/history",children:p.jsx(Uz,{ctx:S})}),p.jsx(Ya,{children:p.jsx(bz,{ctx:S})})]})})}const $R=tE("xtandard-permissions:theme"),{getThemePref:$z,setThemePref:Wz}=$R;zA({App:Fz,configGlobal:"__PERMISSIONS_CONFIG__",themeKey:$R});
|