@golocalinteractive/golocal-cloud-wrapper 1.0.13 → 1.0.15

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.
@@ -1,4 +1,4 @@
1
- (function(Fe,k){typeof exports=="object"&&typeof module<"u"?k(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],k):(Fe=typeof globalThis<"u"?globalThis:Fe||self,k(Fe.GoLocalCloudWrapper={},Fe.React,Fe.ReactDOM))})(this,function(Fe,k,Mr){"use strict";function Or(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const l=Or(k),Tr=Or(Mr);var Mt={exports:{}},mt={};/**
1
+ (function(Pe,K){typeof exports=="object"&&typeof module<"u"?K(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],K):(Pe=typeof globalThis<"u"?globalThis:Pe||self,K(Pe.GoLocalCloudWrapper={},Pe.React,Pe.ReactDOM))})(this,function(Pe,K,Mt){"use strict";var cS=Object.defineProperty;var uS=(Pe,K,Mt)=>K in Pe?cS(Pe,K,{enumerable:!0,configurable:!0,writable:!0,value:Mt}):Pe[K]=Mt;var Le=(Pe,K,Mt)=>uS(Pe,typeof K!="symbol"?K+"":K,Mt);var ro,eh,no,th;function hi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const S=hi(K),pi=hi(Mt);var Yr={exports:{}},Ar={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Pr;function ci(){if(Pr)return mt;Pr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var a=null;if(s!==void 0&&(a=""+s),o.key!==void 0&&(a=""+o.key),"key"in o){s={};for(var i in o)i!=="key"&&(s[i]=o[i])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:a,ref:o!==void 0?o:null,props:s}}return mt.Fragment=t,mt.jsx=n,mt.jsxs=n,mt}var ht={};/**
9
+ */var mi;function nh(){if(mi)return Ar;mi=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,o,s){var a=null;if(s!==void 0&&(a=""+s),o.key!==void 0&&(a=""+o.key),"key"in o){s={};for(var i in o)i!=="key"&&(s[i]=o[i])}else s=o;return o=s.ref,{$$typeof:e,type:n,key:a,ref:o!==void 0?o:null,props:s}}return Ar.Fragment=t,Ar.jsx=r,Ar.jsxs=r,Ar}var Rr={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,12 +14,12 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Nr;function li(){return Nr||(Nr=1,process.env.NODE_ENV!=="production"&&function(){function e(w){if(w==null)return null;if(typeof w=="function")return w.$$typeof===D?null:w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case h:return"Fragment";case v:return"Profiler";case x:return"StrictMode";case _:return"Suspense";case M:return"SuspenseList";case I:return"Activity"}if(typeof w=="object")switch(typeof w.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),w.$$typeof){case b:return"Portal";case E:return(w.displayName||"Context")+".Provider";case y:return(w._context.displayName||"Context")+".Consumer";case S:var N=w.render;return w=w.displayName,w||(w=N.displayName||N.name||"",w=w!==""?"ForwardRef("+w+")":"ForwardRef"),w;case A:return N=w.displayName||null,N!==null?N:e(w.type)||"Memo";case C:N=w._payload,w=w._init;try{return e(w(N))}catch{}}return null}function t(w){return""+w}function n(w){try{t(w);var N=!1}catch{N=!0}if(N){N=console;var j=N.error,$=typeof Symbol=="function"&&Symbol.toStringTag&&w[Symbol.toStringTag]||w.constructor.name||"Object";return j.call(N,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",$),t(w)}}function r(w){if(w===h)return"<>";if(typeof w=="object"&&w!==null&&w.$$typeof===C)return"<...>";try{var N=e(w);return N?"<"+N+">":"<...>"}catch{return"<...>"}}function o(){var w=G.A;return w===null?null:w.getOwner()}function s(){return Error("react-stack-top-frame")}function a(w){if(z.call(w,"key")){var N=Object.getOwnPropertyDescriptor(w,"key").get;if(N&&N.isReactWarning)return!1}return w.key!==void 0}function i(w,N){function j(){q||(q=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",N))}j.isReactWarning=!0,Object.defineProperty(w,"key",{get:j,configurable:!0})}function c(){var w=e(this.type);return F[w]||(F[w]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),w=this.props.ref,w!==void 0?w:null}function f(w,N,j,$,X,te,le,K){return j=te.ref,w={$$typeof:g,type:w,key:N,props:te,_owner:X},(j!==void 0?j:null)!==null?Object.defineProperty(w,"ref",{enumerable:!1,get:c}):Object.defineProperty(w,"ref",{enumerable:!1,value:null}),w._store={},Object.defineProperty(w._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(w,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(w,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:le}),Object.defineProperty(w,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:K}),Object.freeze&&(Object.freeze(w.props),Object.freeze(w)),w}function u(w,N,j,$,X,te,le,K){var Q=N.children;if(Q!==void 0)if($)if(V(Q)){for($=0;$<Q.length;$++)d(Q[$]);Object.freeze&&Object.freeze(Q)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(Q);if(z.call(N,"key")){Q=e(w);var ee=Object.keys(N).filter(function(Ee){return Ee!=="key"});$=0<ee.length?"{key: someKey, "+ee.join(": ..., ")+": ...}":"{key: someKey}",O[Q+$]||(ee=0<ee.length?"{"+ee.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var gi;function oh(){return gi||(gi=1,process.env.NODE_ENV!=="production"&&function(){function e(T){if(T==null)return null;if(typeof T=="function")return T.$$typeof===D?null:T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case b:return"Fragment";case p:return"Profiler";case m:return"StrictMode";case v:return"Suspense";case R:return"SuspenseList";case C:return"Activity"}if(typeof T=="object")switch(typeof T.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),T.$$typeof){case E:return"Portal";case f:return(T.displayName||"Context")+".Provider";case y:return(T._context.displayName||"Context")+".Consumer";case x:var j=T.render;return T=T.displayName,T||(T=j.displayName||j.name||"",T=T!==""?"ForwardRef("+T+")":"ForwardRef"),T;case w:return j=T.displayName||null,j!==null?j:e(T.type)||"Memo";case _:j=T._payload,T=T._init;try{return e(T(j))}catch{}}return null}function t(T){return""+T}function r(T){try{t(T);var j=!1}catch{j=!0}if(j){j=console;var z=j.error,V=typeof Symbol=="function"&&Symbol.toStringTag&&T[Symbol.toStringTag]||T.constructor.name||"Object";return z.call(j,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",V),t(T)}}function n(T){if(T===b)return"<>";if(typeof T=="object"&&T!==null&&T.$$typeof===_)return"<...>";try{var j=e(T);return j?"<"+j+">":"<...>"}catch{return"<...>"}}function o(){var T=I.A;return T===null?null:T.getOwner()}function s(){return Error("react-stack-top-frame")}function a(T){if(P.call(T,"key")){var j=Object.getOwnPropertyDescriptor(T,"key").get;if(j&&j.isReactWarning)return!1}return T.key!==void 0}function i(T,j){function z(){re||(re=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",j))}z.isReactWarning=!0,Object.defineProperty(T,"key",{get:z,configurable:!0})}function c(){var T=e(this.type);return B[T]||(B[T]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),T=this.props.ref,T!==void 0?T:null}function u(T,j,z,V,ne,de,be,Q){return z=de.ref,T={$$typeof:g,type:T,key:j,props:de,_owner:ne},(z!==void 0?z:null)!==null?Object.defineProperty(T,"ref",{enumerable:!1,get:c}):Object.defineProperty(T,"ref",{enumerable:!1,value:null}),T._store={},Object.defineProperty(T._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(T,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(T,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:be}),Object.defineProperty(T,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Q}),Object.freeze&&(Object.freeze(T.props),Object.freeze(T)),T}function l(T,j,z,V,ne,de,be,Q){var ue=j.children;if(ue!==void 0)if(V)if(H(ue)){for(V=0;V<ue.length;V++)d(ue[V]);Object.freeze&&Object.freeze(ue)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(ue);if(P.call(j,"key")){ue=e(T);var ce=Object.keys(j).filter(function(k){return k!=="key"});V=0<ce.length?"{key: someKey, "+ce.join(": ..., ")+": ...}":"{key: someKey}",L[ue+V]||(ce=0<ce.length?"{"+ce.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,$,Q,ee,Q),O[Q+$]=!0)}if(Q=null,j!==void 0&&(n(j),Q=""+j),a(N)&&(n(N.key),Q=""+N.key),"key"in N){j={};for(var se in N)se!=="key"&&(j[se]=N[se])}else j=N;return Q&&i(j,typeof w=="function"?w.displayName||w.name||"Unknown":w),f(w,Q,te,X,o(),j,le,K)}function d(w){typeof w=="object"&&w!==null&&w.$$typeof===g&&w._store&&(w._store.validated=1)}var m=k,g=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),E=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),D=Symbol.for("react.client.reference"),G=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=Object.prototype.hasOwnProperty,V=Array.isArray,H=console.createTask?console.createTask:function(){return null};m={"react-stack-bottom-frame":function(w){return w()}};var q,F={},U=m["react-stack-bottom-frame"].bind(m,s)(),R=H(r(s)),O={};ht.Fragment=h,ht.jsx=function(w,N,j,$,X){var te=1e4>G.recentlyCreatedOwnerStacks++;return u(w,N,j,!1,$,X,te?Error("react-stack-top-frame"):U,te?H(r(w)):R)},ht.jsxs=function(w,N,j,$,X){var te=1e4>G.recentlyCreatedOwnerStacks++;return u(w,N,j,!0,$,X,te?Error("react-stack-top-frame"):U,te?H(r(w)):R)}}()),ht}var kr;function ui(){return kr||(kr=1,process.env.NODE_ENV==="production"?Mt.exports=ci():Mt.exports=li()),Mt.exports}var p=ui(),Ot={exports:{}},fn={};/**
22
+ <%s key={someKey} {...props} />`,V,ue,ce,ue),L[ue+V]=!0)}if(ue=null,z!==void 0&&(r(z),ue=""+z),a(j)&&(r(j.key),ue=""+j.key),"key"in j){z={};for(var ye in j)ye!=="key"&&(z[ye]=j[ye])}else z=j;return ue&&i(z,typeof T=="function"?T.displayName||T.name||"Unknown":T),u(T,ue,de,ne,o(),z,be,Q)}function d(T){typeof T=="object"&&T!==null&&T.$$typeof===g&&T._store&&(T._store.validated=1)}var h=K,g=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),f=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),C=Symbol.for("react.activity"),D=Symbol.for("react.client.reference"),I=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=Object.prototype.hasOwnProperty,H=Array.isArray,q=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(T){return T()}};var re,B={},J=h["react-stack-bottom-frame"].bind(h,s)(),O=q(n(s)),L={};Rr.Fragment=b,Rr.jsx=function(T,j,z,V,ne){var de=1e4>I.recentlyCreatedOwnerStacks++;return l(T,j,z,!1,V,ne,de?Error("react-stack-top-frame"):J,de?q(n(T)):O)},Rr.jsxs=function(T,j,z,V,ne){var de=1e4>I.recentlyCreatedOwnerStacks++;return l(T,j,z,!0,V,ne,de?Error("react-stack-top-frame"):J,de?q(n(T)):O)}}()),Rr}var yi;function sh(){return yi||(yi=1,process.env.NODE_ENV==="production"?Yr.exports=nh():Yr.exports=oh()),Yr.exports}var A=sh(),Zr={exports:{}},so={};/**
23
23
  * @license React
24
24
  * use-sync-external-store-shim.production.js
25
25
  *
@@ -27,7 +27,7 @@ React keys must be passed directly to JSX without using spread:
27
27
  *
28
28
  * This source code is licensed under the MIT license found in the
29
29
  * LICENSE file in the root directory of this source tree.
30
- */var Ir;function di(){if(Ir)return fn;Ir=1;var e=k;function t(d,m){return d===m&&(d!==0||1/d===1/m)||d!==d&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,a=e.useDebugValue;function i(d,m){var g=m(),b=r({inst:{value:g,getSnapshot:m}}),h=b[0].inst,x=b[1];return s(function(){h.value=g,h.getSnapshot=m,c(h)&&x({inst:h})},[d,g,m]),o(function(){return c(h)&&x({inst:h}),d(function(){c(h)&&x({inst:h})})},[d]),a(g),g}function c(d){var m=d.getSnapshot;d=d.value;try{var g=m();return!n(d,g)}catch{return!0}}function f(d,m){return m()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:i;return fn.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,fn}var pn={};/**
30
+ */var bi;function ah(){if(bi)return so;bi=1;var e=K;function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,o=e.useEffect,s=e.useLayoutEffect,a=e.useDebugValue;function i(d,h){var g=h(),E=n({inst:{value:g,getSnapshot:h}}),b=E[0].inst,m=E[1];return s(function(){b.value=g,b.getSnapshot=h,c(b)&&m({inst:b})},[d,g,h]),o(function(){return c(b)&&m({inst:b}),d(function(){c(b)&&m({inst:b})})},[d]),a(g),g}function c(d){var h=d.getSnapshot;d=d.value;try{var g=h();return!r(d,g)}catch{return!0}}function u(d,h){return h()}var l=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:i;return so.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:l,so}var ao={};/**
31
31
  * @license React
32
32
  * use-sync-external-store-shim.development.js
33
33
  *
@@ -35,123 +35,138 @@ React keys must be passed directly to JSX without using spread:
35
35
  *
36
36
  * This source code is licensed under the MIT license found in the
37
37
  * LICENSE file in the root directory of this source tree.
38
- */var Dr;function fi(){return Dr||(Dr=1,process.env.NODE_ENV!=="production"&&function(){function e(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}function t(g,b){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var h=b();if(!d){var x=b();s(h,x)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}x=a({inst:{value:h,getSnapshot:b}});var v=x[0].inst,y=x[1];return c(function(){v.value=h,v.getSnapshot=b,n(v)&&y({inst:v})},[g,h,b]),i(function(){return n(v)&&y({inst:v}),g(function(){n(v)&&y({inst:v})})},[g]),f(h),h}function n(g){var b=g.getSnapshot;g=g.value;try{var h=b();return!s(g,h)}catch{return!0}}function r(g,b){return b()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=k,s=typeof Object.is=="function"?Object.is:e,a=o.useState,i=o.useEffect,c=o.useLayoutEffect,f=o.useDebugValue,u=!1,d=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;pn.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),pn}var jr;function pi(){return jr||(jr=1,process.env.NODE_ENV==="production"?Ot.exports=di():Ot.exports=fi()),Ot.exports}var mi=pi();const Lr=0,Fr=1,$r=2,Vr=3;var Hr=Object.prototype.hasOwnProperty;function mn(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&mn(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Hr.call(e,n)&&++r&&!Hr.call(t,n)||!(n in t)||!mn(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const Oe=new WeakMap,$e=()=>{},ue=$e(),Tt=Object,Y=e=>e===ue,be=e=>typeof e=="function",Te=(e,t)=>({...e,...t}),Wr=e=>be(e.then),hn={},Pt={},gn="undefined",gt=typeof window!=gn,vn=typeof document!=gn,hi=gt&&"Deno"in window,gi=()=>gt&&typeof window.requestAnimationFrame!=gn,zr=(e,t)=>{const n=Oe.get(e);return[()=>!Y(t)&&e.get(t)||hn,r=>{if(!Y(t)){const o=e.get(t);t in Pt||(Pt[t]=o),n[5](t,Te(o,r),o||hn)}},n[6],()=>!Y(t)&&t in Pt?Pt[t]:!Y(t)&&e.get(t)||hn]};let bn=!0;const vi=()=>bn,[xn,wn]=gt&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[$e,$e],bi=()=>{const e=vn&&document.visibilityState;return Y(e)||e!=="hidden"},xi=e=>(vn&&document.addEventListener("visibilitychange",e),xn("focus",e),()=>{vn&&document.removeEventListener("visibilitychange",e),wn("focus",e)}),wi=e=>{const t=()=>{bn=!0,e()},n=()=>{bn=!1};return xn("online",t),xn("offline",n),()=>{wn("online",t),wn("offline",n)}},yi={isOnline:vi,isVisible:bi},Ci={initFocus:xi,initReconnect:wi},Br=!k.useId,vt=!gt||hi,Ei=e=>gi()?window.requestAnimationFrame(e):setTimeout(e,1),Nt=vt?k.useEffect:k.useLayoutEffect,yn=typeof navigator<"u"&&navigator.connection,Gr=!vt&&yn&&(["slow-2g","2g"].includes(yn.effectiveType)||yn.saveData),kt=new WeakMap,Cn=(e,t)=>Tt.prototype.toString.call(e)===`[object ${t}]`;let Si=0;const En=e=>{const t=typeof e,n=Cn(e,"Date"),r=Cn(e,"RegExp"),o=Cn(e,"Object");let s,a;if(Tt(e)===e&&!n&&!r){if(s=kt.get(e),s)return s;if(s=++Si+"~",kt.set(e,s),Array.isArray(e)){for(s="@",a=0;a<e.length;a++)s+=En(e[a])+",";kt.set(e,s)}if(o){s="#";const i=Tt.keys(e).sort();for(;!Y(a=i.pop());)Y(e[a])||(s+=a+":"+En(e[a])+",");kt.set(e,s)}}else s=n?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return s},Sn=e=>{if(be(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?En(e):"",[e,t]};let Ri=0;const Rn=()=>++Ri;async function Ur(...e){const[t,n,r,o]=e,s=Te({populateCache:!0,throwOnError:!0},typeof o=="boolean"?{revalidate:o}:o||{});let a=s.populateCache;const i=s.rollbackOnError;let c=s.optimisticData;const f=m=>typeof i=="function"?i(m):i!==!1,u=s.throwOnError;if(be(n)){const m=n,g=[],b=t.keys();for(const h of b)!/^\$(inf|sub)\$/.test(h)&&m(t.get(h)._k)&&g.push(h);return Promise.all(g.map(d))}return d(n);async function d(m){const[g]=Sn(m);if(!g)return;const[b,h]=zr(t,g),[x,v,y,E]=Oe.get(t),S=()=>{const V=x[g];return(be(s.revalidate)?s.revalidate(b().data,m):s.revalidate!==!1)&&(delete y[g],delete E[g],V&&V[0])?V[0]($r).then(()=>b().data):b().data};if(e.length<3)return S();let _=r,M;const A=Rn();v[g]=[A,0];const C=!Y(c),I=b(),D=I.data,G=I._c,z=Y(G)?D:G;if(C&&(c=be(c)?c(z,D):c,h({data:c,_c:z})),be(_))try{_=_(z)}catch(V){M=V}if(_&&Wr(_))if(_=await _.catch(V=>{M=V}),A!==v[g][0]){if(M)throw M;return _}else M&&C&&f(M)&&(a=!0,h({data:z,_c:ue}));if(a&&!M)if(be(a)){const V=a(_,z);h({data:V,error:ue,_c:ue})}else h({data:_,error:ue,_c:ue});if(v[g][1]=Rn(),Promise.resolve(S()).then(()=>{h({_c:ue})}),M){if(u)throw M;return}return _}}const Kr=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Yr=(e,t)=>{if(!Oe.has(e)){const n=Te(Ci,t),r=Object.create(null),o=Ur.bind(ue,e);let s=$e;const a=Object.create(null),i=(u,d)=>{const m=a[u]||[];return a[u]=m,m.push(d),()=>m.splice(m.indexOf(d),1)},c=(u,d,m)=>{e.set(u,d);const g=a[u];if(g)for(const b of g)b(d,m)},f=()=>{if(!Oe.has(e)&&(Oe.set(e,[r,Object.create(null),Object.create(null),Object.create(null),o,c,i]),!vt)){const u=n.initFocus(setTimeout.bind(ue,Kr.bind(ue,r,Lr))),d=n.initReconnect(setTimeout.bind(ue,Kr.bind(ue,r,Fr)));s=()=>{u&&u(),d&&d(),Oe.delete(e)}}};return f(),[e,o,f,s]}return[e,Oe.get(e)[4]]},_i=(e,t,n,r,o)=>{const s=n.errorRetryCount,a=o.retryCount,i=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!Y(s)&&a>s||setTimeout(r,i,o)},Ai=mn,[_n,Mi]=Yr(new Map),qr=Te({onLoadingSlow:$e,onSuccess:$e,onError:$e,onErrorRetry:_i,onDiscarded:$e,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Gr?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Gr?5e3:3e3,compare:Ai,isPaused:()=>!1,cache:_n,mutate:Mi,fallback:{}},yi),Xr=(e,t)=>{const n=Te(e,t);if(t){const{use:r,fallback:o}=e,{use:s,fallback:a}=t;r&&s&&(n.use=r.concat(s)),o&&a&&(n.fallback=Te(o,a))}return n},An=k.createContext({}),Oi=e=>{const{value:t}=e,n=k.useContext(An),r=be(t),o=k.useMemo(()=>r?t(n):t,[r,n,t]),s=k.useMemo(()=>r?o:Xr(n,o),[r,n,o]),a=o&&o.provider,i=k.useRef(ue);a&&!i.current&&(i.current=Yr(a(s.cache||_n),o));const c=i.current;return c&&(s.cache=c[0],s.mutate=c[1]),Nt(()=>{if(c)return c[2]&&c[2](),c[3]},[]),k.createElement(An.Provider,Te(e,{value:s}))},Ti="$inf$",Zr=gt&&window.__SWR_DEVTOOLS_USE__,Pi=Zr?window.__SWR_DEVTOOLS_USE__:[],Ni=()=>{Zr&&(window.__SWR_DEVTOOLS_REACT__=k)},ki=e=>be(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],Ii=()=>Te(qr,k.useContext(An)),Di=e=>(t,n,r)=>e(t,n&&((...s)=>{const[a]=Sn(t),[,,,i]=Oe.get(_n);if(a.startsWith(Ti))return n(...s);const c=i[a];return Y(c)?n(...s):(delete i[a],c)}),r),ji=Pi.concat(Di),Li=e=>function(...n){const r=Ii(),[o,s,a]=ki(n),i=Xr(r,a);let c=e;const{use:f}=i,u=(f||[]).concat(ji);for(let d=u.length;d--;)c=u[d](c);return c(o,s||i.fetcher||null,i)},Fi=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const o=r.indexOf(n);o>=0&&(r[o]=r[r.length-1],r.pop())}};Ni();const Mn=k.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),On={dedupe:!0},$i=(e,t,n)=>{const{cache:r,compare:o,suspense:s,fallbackData:a,revalidateOnMount:i,revalidateIfStale:c,refreshInterval:f,refreshWhenHidden:u,refreshWhenOffline:d,keepPreviousData:m}=n,[g,b,h,x]=Oe.get(r),[v,y]=Sn(e),E=k.useRef(!1),S=k.useRef(!1),_=k.useRef(v),M=k.useRef(t),A=k.useRef(n),C=()=>A.current,I=()=>C().isVisible()&&C().isOnline(),[D,G,z,V]=zr(r,v),H=k.useRef({}).current,q=Y(a)?Y(n.fallback)?ue:n.fallback[v]:a,F=(Z,J)=>{for(const ce in H){const re=ce;if(re==="data"){if(!o(Z[re],J[re])&&(!Y(Z[re])||!o(te,J[re])))return!1}else if(J[re]!==Z[re])return!1}return!0},U=k.useMemo(()=>{const Z=!v||!t?!1:Y(i)?C().isPaused()||s?!1:c!==!1:i,J=fe=>{const je=Te(fe);return delete je._k,Z?{isValidating:!0,isLoading:!0,...je}:je},ce=D(),re=V(),he=J(ce),Ue=ce===re?he:J(re);let oe=he;return[()=>{const fe=J(D());return F(fe,oe)?(oe.data=fe.data,oe.isLoading=fe.isLoading,oe.isValidating=fe.isValidating,oe.error=fe.error,oe):(oe=fe,fe)},()=>Ue]},[r,v]),R=mi.useSyncExternalStore(k.useCallback(Z=>z(v,(J,ce)=>{F(ce,J)||Z()}),[r,v]),U[0],U[1]),O=!E.current,w=g[v]&&g[v].length>0,N=R.data,j=Y(N)?q&&Wr(q)?Mn(q):q:N,$=R.error,X=k.useRef(j),te=m?Y(N)?Y(X.current)?j:X.current:N:j,le=w&&!Y($)?!1:O&&!Y(i)?i:C().isPaused()?!1:s?Y(j)?!1:c:Y(j)||c,K=!!(v&&t&&O&&le),Q=Y(R.isValidating)?K:R.isValidating,ee=Y(R.isLoading)?K:R.isLoading,se=k.useCallback(async Z=>{const J=M.current;if(!v||!J||S.current||C().isPaused())return!1;let ce,re,he=!0;const Ue=Z||{},oe=!h[v]||!Ue.dedupe,fe=()=>Br?!S.current&&v===_.current&&E.current:v===_.current,je={isValidating:!1,isLoading:!1},si=()=>{G(je)},ai=()=>{const ve=h[v];ve&&ve[1]===re&&delete h[v]},ii={isValidating:!0};Y(D().data)&&(ii.isLoading=!0);try{if(oe&&(G(ii),n.loadingTimeout&&Y(D().data)&&setTimeout(()=>{he&&fe()&&C().onLoadingSlow(v,n)},n.loadingTimeout),h[v]=[J(y),Rn()]),[ce,re]=h[v],ce=await ce,oe&&setTimeout(ai,n.dedupingInterval),!h[v]||h[v][1]!==re)return oe&&fe()&&C().onDiscarded(v),!1;je.error=ue;const ve=b[v];if(!Y(ve)&&(re<=ve[0]||re<=ve[1]||ve[1]===0))return si(),oe&&fe()&&C().onDiscarded(v),!1;const Le=D().data;je.data=o(Le,ce)?Le:ce,oe&&fe()&&C().onSuccess(ce,v,n)}catch(ve){ai();const Le=C(),{shouldRetryOnError:_r}=Le;Le.isPaused()||(je.error=ve,oe&&fe()&&(Le.onError(ve,v,Le),(_r===!0||be(_r)&&_r(ve))&&(!C().revalidateOnFocus||!C().revalidateOnReconnect||I())&&Le.onErrorRetry(ve,v,Le,l0=>{const Ar=g[v];Ar&&Ar[0]&&Ar[0](Vr,l0)},{retryCount:(Ue.retryCount||0)+1,dedupe:!0})))}return he=!1,si(),!0},[v,r]),Ee=k.useCallback((...Z)=>Ur(r,_.current,...Z),[]);if(Nt(()=>{M.current=t,A.current=n,Y(N)||(X.current=N)}),Nt(()=>{if(!v)return;const Z=se.bind(ue,On);let J=0;C().revalidateOnFocus&&(J=Date.now()+C().focusThrottleInterval);const re=Fi(v,g,(he,Ue={})=>{if(he==Lr){const oe=Date.now();C().revalidateOnFocus&&oe>J&&I()&&(J=oe+C().focusThrottleInterval,Z())}else if(he==Fr)C().revalidateOnReconnect&&I()&&Z();else{if(he==$r)return se();if(he==Vr)return se(Ue)}});return S.current=!1,_.current=v,E.current=!0,G({_k:y}),le&&(Y(j)||vt?Z():Ei(Z)),()=>{S.current=!0,re()}},[v]),Nt(()=>{let Z;function J(){const re=be(f)?f(D().data):f;re&&Z!==-1&&(Z=setTimeout(ce,re))}function ce(){!D().error&&(u||C().isVisible())&&(d||C().isOnline())?se(On).then(J):J()}return J(),()=>{Z&&(clearTimeout(Z),Z=-1)}},[f,u,d,v]),k.useDebugValue(te),s&&Y(j)&&v){if(!Br&&vt)throw new Error("Fallback data is required when using Suspense in SSR.");M.current=t,A.current=n,S.current=!1;const Z=x[v];if(!Y(Z)){const J=Ee(Z);Mn(J)}if(Y($)){const J=se(On);Y(te)||(J.status="fulfilled",J.value=!0),Mn(J)}else throw $}return{mutate:Ee,get data(){return H.data=!0,te},get error(){return H.error=!0,$},get isValidating(){return H.isValidating=!0,Q},get isLoading(){return H.isLoading=!0,ee}}},Vi=Tt.defineProperty(Oi,"defaultValue",{value:qr}),Hi=Li($i);function Wi(e){return e&&!e.startsWith("/")?`/${e}`:e}function zi(e){return e&&!e.endsWith("/")?`${e}/`:e}function Bi(e){return e.startsWith("/")?e.substring(1,e.length):e}const Gi=e=>{const t=process.env.NEXT_PUBLIC_BASE_PATH;if(!t)return e;const n=Wi(t);return zi(n)+Bi(e)};function Ui(){const{data:e,error:t,isLoading:n,mutate:r}=Hi(Gi(process.env.NEXT_PUBLIC_PROFILE_ROUTE||"/auth/profile"),(...o)=>fetch(...o).then(s=>{if(!s.ok)throw new Error("Unauthorized");return s.status===204?null:s.json()}));return t?{user:null,isLoading:!1,error:t,invalidate:()=>r()}:e?{user:e,isLoading:!1,error:null,invalidate:()=>r()}:{user:e,isLoading:n,error:t,invalidate:()=>r()}}var Jr;(function(e){e.MISSING_SESSION="missing_session",e.MISSING_REFRESH_TOKEN="missing_refresh_token",e.FAILED_TO_REFRESH_TOKEN="failed_to_refresh_token"})(Jr||(Jr={}));var Qr;(function(e){e.MISSING_SESSION="missing_session",e.MISSING_REFRESH_TOKEN="missing_refresh_token",e.FAILED_TO_EXCHANGE="failed_to_exchange_refresh_token"})(Qr||(Qr={}));function Ki({user:e,children:t}){return k.createElement(Vi,{value:{fallback:{[process.env.NEXT_PUBLIC_PROFILE_ROUTE||"/auth/profile"]:e}}},t)}/**
38
+ */var wi;function ih(){return wi||(wi=1,process.env.NODE_ENV!=="production"&&function(){function e(g,E){return g===E&&(g!==0||1/g===1/E)||g!==g&&E!==E}function t(g,E){l||o.startTransition===void 0||(l=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var b=E();if(!d){var m=E();s(b,m)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}m=a({inst:{value:b,getSnapshot:E}});var p=m[0].inst,y=m[1];return c(function(){p.value=b,p.getSnapshot=E,r(p)&&y({inst:p})},[g,b,E]),i(function(){return r(p)&&y({inst:p}),g(function(){r(p)&&y({inst:p})})},[g]),u(b),b}function r(g){var E=g.getSnapshot;g=g.value;try{var b=E();return!s(g,b)}catch{return!0}}function n(g,E){return E()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=K,s=typeof Object.is=="function"?Object.is:e,a=o.useState,i=o.useEffect,c=o.useLayoutEffect,u=o.useDebugValue,l=!1,d=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:t;ao.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),ao}var vi;function ch(){return vi||(vi=1,process.env.NODE_ENV==="production"?Zr.exports=ah():Zr.exports=ih()),Zr.exports}var uh=ch();const Ei=0,_i=1,Si=2,xi=3;var Ai=Object.prototype.hasOwnProperty;function io(e,t){var r,n;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((n=e.length)===t.length)for(;n--&&io(e[n],t[n]););return n===-1}if(!r||typeof e=="object"){n=0;for(r in e)if(Ai.call(e,r)&&++n&&!Ai.call(t,r)||!(r in t)||!io(e[r],t[r]))return!1;return Object.keys(t).length===n}}return e!==e&&t!==t}const ht=new WeakMap,_t=()=>{},je=_t(),Qr=Object,le=e=>e===je,Qe=e=>typeof e=="function",pt=(e,t)=>({...e,...t}),Ri=e=>Qe(e.then),co={},en={},uo="undefined",Cr=typeof window!=uo,lo=typeof document!=uo,lh=Cr&&"Deno"in window,dh=()=>Cr&&typeof window.requestAnimationFrame!=uo,Ci=(e,t)=>{const r=ht.get(e);return[()=>!le(t)&&e.get(t)||co,n=>{if(!le(t)){const o=e.get(t);t in en||(en[t]=o),r[5](t,pt(o,n),o||co)}},r[6],()=>!le(t)&&t in en?en[t]:!le(t)&&e.get(t)||co]};let fo=!0;const fh=()=>fo,[ho,po]=Cr&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[_t,_t],hh=()=>{const e=lo&&document.visibilityState;return le(e)||e!=="hidden"},ph=e=>(lo&&document.addEventListener("visibilitychange",e),ho("focus",e),()=>{lo&&document.removeEventListener("visibilitychange",e),po("focus",e)}),mh=e=>{const t=()=>{fo=!0,e()},r=()=>{fo=!1};return ho("online",t),ho("offline",r),()=>{po("online",t),po("offline",r)}},gh={isOnline:fh,isVisible:hh},yh={initFocus:ph,initReconnect:mh},Ti=!K.useId,Tr=!Cr||lh,bh=e=>dh()?window.requestAnimationFrame(e):setTimeout(e,1),tn=Tr?K.useEffect:K.useLayoutEffect,mo=typeof navigator<"u"&&navigator.connection,Pi=!Tr&&mo&&(["slow-2g","2g"].includes(mo.effectiveType)||mo.saveData),rn=new WeakMap,go=(e,t)=>Qr.prototype.toString.call(e)===`[object ${t}]`;let wh=0;const yo=e=>{const t=typeof e,r=go(e,"Date"),n=go(e,"RegExp"),o=go(e,"Object");let s,a;if(Qr(e)===e&&!r&&!n){if(s=rn.get(e),s)return s;if(s=++wh+"~",rn.set(e,s),Array.isArray(e)){for(s="@",a=0;a<e.length;a++)s+=yo(e[a])+",";rn.set(e,s)}if(o){s="#";const i=Qr.keys(e).sort();for(;!le(a=i.pop());)le(e[a])||(s+=a+":"+yo(e[a])+",");rn.set(e,s)}}else s=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return s},bo=e=>{if(Qe(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?yo(e):"",[e,t]};let vh=0;const wo=()=>++vh;async function Oi(...e){const[t,r,n,o]=e,s=pt({populateCache:!0,throwOnError:!0},typeof o=="boolean"?{revalidate:o}:o||{});let a=s.populateCache;const i=s.rollbackOnError;let c=s.optimisticData;const u=h=>typeof i=="function"?i(h):i!==!1,l=s.throwOnError;if(Qe(r)){const h=r,g=[],E=t.keys();for(const b of E)!/^\$(inf|sub)\$/.test(b)&&h(t.get(b)._k)&&g.push(b);return Promise.all(g.map(d))}return d(r);async function d(h){const[g]=bo(h);if(!g)return;const[E,b]=Ci(t,g),[m,p,y,f]=ht.get(t),x=()=>{const H=m[g];return(Qe(s.revalidate)?s.revalidate(E().data,h):s.revalidate!==!1)&&(delete y[g],delete f[g],H&&H[0])?H[0](Si).then(()=>E().data):E().data};if(e.length<3)return x();let v=n,R;const w=wo();p[g]=[w,0];const _=!le(c),C=E(),D=C.data,I=C._c,P=le(I)?D:I;if(_&&(c=Qe(c)?c(P,D):c,b({data:c,_c:P})),Qe(v))try{v=v(P)}catch(H){R=H}if(v&&Ri(v))if(v=await v.catch(H=>{R=H}),w!==p[g][0]){if(R)throw R;return v}else R&&_&&u(R)&&(a=!0,b({data:P,_c:je}));if(a&&!R)if(Qe(a)){const H=a(v,P);b({data:H,error:je,_c:je})}else b({data:v,error:je,_c:je});if(p[g][1]=wo(),Promise.resolve(x()).then(()=>{b({_c:je})}),R){if(l)throw R;return}return v}}const ki=(e,t)=>{for(const r in e)e[r][0]&&e[r][0](t)},Ni=(e,t)=>{if(!ht.has(e)){const r=pt(yh,t),n=Object.create(null),o=Oi.bind(je,e);let s=_t;const a=Object.create(null),i=(l,d)=>{const h=a[l]||[];return a[l]=h,h.push(d),()=>h.splice(h.indexOf(d),1)},c=(l,d,h)=>{e.set(l,d);const g=a[l];if(g)for(const E of g)E(d,h)},u=()=>{if(!ht.has(e)&&(ht.set(e,[n,Object.create(null),Object.create(null),Object.create(null),o,c,i]),!Tr)){const l=r.initFocus(setTimeout.bind(je,ki.bind(je,n,Ei))),d=r.initReconnect(setTimeout.bind(je,ki.bind(je,n,_i)));s=()=>{l&&l(),d&&d(),ht.delete(e)}}};return u(),[e,o,u,s]}return[e,ht.get(e)[4]]},Eh=(e,t,r,n,o)=>{const s=r.errorRetryCount,a=o.retryCount,i=~~((Math.random()+.5)*(1<<(a<8?a:8)))*r.errorRetryInterval;!le(s)&&a>s||setTimeout(n,i,o)},_h=io,[vo,Sh]=Ni(new Map),Ii=pt({onLoadingSlow:_t,onSuccess:_t,onError:_t,onErrorRetry:Eh,onDiscarded:_t,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Pi?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Pi?5e3:3e3,compare:_h,isPaused:()=>!1,cache:vo,mutate:Sh,fallback:{}},gh),Di=(e,t)=>{const r=pt(e,t);if(t){const{use:n,fallback:o}=e,{use:s,fallback:a}=t;n&&s&&(r.use=n.concat(s)),o&&a&&(r.fallback=pt(o,a))}return r},Eo=K.createContext({}),xh=e=>{const{value:t}=e,r=K.useContext(Eo),n=Qe(t),o=K.useMemo(()=>n?t(r):t,[n,r,t]),s=K.useMemo(()=>n?o:Di(r,o),[n,r,o]),a=o&&o.provider,i=K.useRef(je);a&&!i.current&&(i.current=Ni(a(s.cache||vo),o));const c=i.current;return c&&(s.cache=c[0],s.mutate=c[1]),tn(()=>{if(c)return c[2]&&c[2](),c[3]},[]),K.createElement(Eo.Provider,pt(e,{value:s}))},Ah="$inf$",Mi=Cr&&window.__SWR_DEVTOOLS_USE__,Rh=Mi?window.__SWR_DEVTOOLS_USE__:[],Ch=()=>{Mi&&(window.__SWR_DEVTOOLS_REACT__=K)},Th=e=>Qe(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],Ph=()=>pt(Ii,K.useContext(Eo)),Oh=e=>(t,r,n)=>e(t,r&&((...s)=>{const[a]=bo(t),[,,,i]=ht.get(vo);if(a.startsWith(Ah))return r(...s);const c=i[a];return le(c)?r(...s):(delete i[a],c)}),n),kh=Rh.concat(Oh),Nh=e=>function(...r){const n=Ph(),[o,s,a]=Th(r),i=Di(n,a);let c=e;const{use:u}=i,l=(u||[]).concat(kh);for(let d=l.length;d--;)c=l[d](c);return c(o,s||i.fetcher||null,i)},Ih=(e,t,r)=>{const n=t[e]||(t[e]=[]);return n.push(r),()=>{const o=n.indexOf(r);o>=0&&(n[o]=n[n.length-1],n.pop())}};Ch();const _o=K.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),So={dedupe:!0},Dh=(e,t,r)=>{const{cache:n,compare:o,suspense:s,fallbackData:a,revalidateOnMount:i,revalidateIfStale:c,refreshInterval:u,refreshWhenHidden:l,refreshWhenOffline:d,keepPreviousData:h}=r,[g,E,b,m]=ht.get(n),[p,y]=bo(e),f=K.useRef(!1),x=K.useRef(!1),v=K.useRef(p),R=K.useRef(t),w=K.useRef(r),_=()=>w.current,C=()=>_().isVisible()&&_().isOnline(),[D,I,P,H]=Ci(n,p),q=K.useRef({}).current,re=le(a)?le(r.fallback)?je:r.fallback[p]:a,B=(M,F)=>{for(const ee in q){const U=ee;if(U==="data"){if(!o(M[U],F[U])&&(!le(M[U])||!o(de,F[U])))return!1}else if(F[U]!==M[U])return!1}return!0},J=K.useMemo(()=>{const M=!p||!t?!1:le(i)?_().isPaused()||s?!1:c!==!1:i,F=xe=>{const De=pt(xe);return delete De._k,M?{isValidating:!0,isLoading:!0,...De}:De},ee=D(),U=H(),Ee=F(ee),Re=ee===U?Ee:F(U);let he=Ee;return[()=>{const xe=F(D());return B(xe,he)?(he.data=xe.data,he.isLoading=xe.isLoading,he.isValidating=xe.isValidating,he.error=xe.error,he):(he=xe,xe)},()=>Re]},[n,p]),O=uh.useSyncExternalStore(K.useCallback(M=>P(p,(F,ee)=>{B(ee,F)||M()}),[n,p]),J[0],J[1]),L=!f.current,T=g[p]&&g[p].length>0,j=O.data,z=le(j)?re&&Ri(re)?_o(re):re:j,V=O.error,ne=K.useRef(z),de=h?le(j)?le(ne.current)?z:ne.current:j:z,be=T&&!le(V)?!1:L&&!le(i)?i:_().isPaused()?!1:s?le(z)?!1:c:le(z)||c,Q=!!(p&&t&&L&&be),ue=le(O.isValidating)?Q:O.isValidating,ce=le(O.isLoading)?Q:O.isLoading,ye=K.useCallback(async M=>{const F=R.current;if(!p||!F||x.current||_().isPaused())return!1;let ee,U,Ee=!0;const Re=M||{},he=!b[p]||!Re.dedupe,xe=()=>Ti?!x.current&&p===v.current&&f.current:p===v.current,De={isValidating:!1,isLoading:!1},Sr=()=>{I(De)},oo=()=>{const Fe=b[p];Fe&&Fe[1]===U&&delete b[p]},Xr={isValidating:!0};le(D().data)&&(Xr.isLoading=!0);try{if(he&&(I(Xr),r.loadingTimeout&&le(D().data)&&setTimeout(()=>{Ee&&xe()&&_().onLoadingSlow(p,r)},r.loadingTimeout),b[p]=[F(y),wo()]),[ee,U]=b[p],ee=await ee,he&&setTimeout(oo,r.dedupingInterval),!b[p]||b[p][1]!==U)return he&&xe()&&_().onDiscarded(p),!1;De.error=je;const Fe=E[p];if(!le(Fe)&&(U<=Fe[0]||U<=Fe[1]||Fe[1]===0))return Sr(),he&&xe()&&_().onDiscarded(p),!1;const Ae=D().data;De.data=o(Ae,ee)?Ae:ee,he&&xe()&&_().onSuccess(ee,p,r)}catch(Fe){oo();const Ae=_(),{shouldRetryOnError:lt}=Ae;Ae.isPaused()||(De.error=Fe,he&&xe()&&(Ae.onError(Fe,p,Ae),(lt===!0||Qe(lt)&&lt(Fe))&&(!_().revalidateOnFocus||!_().revalidateOnReconnect||C())&&Ae.onErrorRetry(Fe,p,Ae,xr=>{const se=g[p];se&&se[0]&&se[0](xi,xr)},{retryCount:(Re.retryCount||0)+1,dedupe:!0})))}return Ee=!1,Sr(),!0},[p,n]),k=K.useCallback((...M)=>Oi(n,v.current,...M),[]);if(tn(()=>{R.current=t,w.current=r,le(j)||(ne.current=j)}),tn(()=>{if(!p)return;const M=ye.bind(je,So);let F=0;_().revalidateOnFocus&&(F=Date.now()+_().focusThrottleInterval);const U=Ih(p,g,(Ee,Re={})=>{if(Ee==Ei){const he=Date.now();_().revalidateOnFocus&&he>F&&C()&&(F=he+_().focusThrottleInterval,M())}else if(Ee==_i)_().revalidateOnReconnect&&C()&&M();else{if(Ee==Si)return ye();if(Ee==xi)return ye(Re)}});return x.current=!1,v.current=p,f.current=!0,I({_k:y}),be&&(le(z)||Tr?M():bh(M)),()=>{x.current=!0,U()}},[p]),tn(()=>{let M;function F(){const U=Qe(u)?u(D().data):u;U&&M!==-1&&(M=setTimeout(ee,U))}function ee(){!D().error&&(l||_().isVisible())&&(d||_().isOnline())?ye(So).then(F):F()}return F(),()=>{M&&(clearTimeout(M),M=-1)}},[u,l,d,p]),K.useDebugValue(de),s&&le(z)&&p){if(!Ti&&Tr)throw new Error("Fallback data is required when using Suspense in SSR.");R.current=t,w.current=r,x.current=!1;const M=m[p];if(!le(M)){const F=k(M);_o(F)}if(le(V)){const F=ye(So);le(de)||(F.status="fulfilled",F.value=!0),_o(F)}else throw V}return{mutate:k,get data(){return q.data=!0,de},get error(){return q.error=!0,V},get isValidating(){return q.isValidating=!0,ue},get isLoading(){return q.isLoading=!0,ce}}},Mh=Qr.defineProperty(xh,"defaultValue",{value:Ii}),Lh=Nh(Dh);function jh(e){return e&&!e.startsWith("/")?`/${e}`:e}function Li(e){return e&&!e.endsWith("/")?`${e}/`:e}function ji(e){return e&&e.startsWith("/")?e.substring(1,e.length):e}const Hh=e=>e.endsWith("/")?e.slice(0,-1):e,Hi=e=>{const t=process.env.NEXT_PUBLIC_BASE_PATH;if(!t)return e;const r=jh(t);return Li(r)+ji(e)};function Uh(){const{data:e,error:t,isLoading:r,mutate:n}=Lh(Hi(process.env.NEXT_PUBLIC_PROFILE_ROUTE||"/auth/profile"),(...o)=>fetch(...o).then(s=>{if(!s.ok)throw new Error("Unauthorized");return s.status===204?null:s.json()}));return t?{user:null,isLoading:!1,error:t,invalidate:()=>n()}:e?{user:e,isLoading:!1,error:null,invalidate:()=>n()}:{user:e,isLoading:r,error:t,invalidate:()=>n()}}class ot extends Error{}class Pr extends ot{constructor({code:t,message:r}){super(r??"An error occured while interacting with the authorization server."),this.name="OAuth2Error",this.code=t}}class Wh extends ot{constructor(t){super(t??"Discovery failed for the OpenID Connect configuration."),this.code="discovery_error",this.name="DiscoveryError"}}class $h extends ot{constructor(t){super(t??"The state parameter is missing."),this.code="missing_state",this.name="MissingStateError"}}class Fh extends ot{constructor(t){super(t??"The state parameter is invalid."),this.code="invalid_state",this.name="InvalidStateError"}}class Ui extends ot{constructor({cause:t,message:r}){super(r??"An error occured during the authorization flow."),this.code="authorization_error",this.cause=t,this.name="AuthorizationError"}}class Kh extends ot{constructor(t){super(t??"An error occured while preparing or performing the authorization code grant request."),this.code="authorization_code_grant_request_error",this.name="AuthorizationCodeGrantRequestError"}}class qh extends ot{constructor({cause:t,message:r}){super(r??"An error occured while trying to exchange the authorization code."),this.code="authorization_code_grant_error",this.cause=t,this.name="AuthorizationCodeGrantError"}}class St extends ot{constructor(t){super(t??"An error occured while completing the backchannel logout request."),this.code="backchannel_logout_error",this.name="BackchannelLogoutError"}}var Qt;(function(e){e.MISSING_SESSION="missing_session",e.MISSING_REFRESH_TOKEN="missing_refresh_token",e.FAILED_TO_REFRESH_TOKEN="failed_to_refresh_token"})(Qt||(Qt={}));class xo extends ot{constructor(t,r,n){super(r),this.name="AccessTokenError",this.code=t,this.cause=n}}var Or;(function(e){e.MISSING_SESSION="missing_session",e.MISSING_REFRESH_TOKEN="missing_refresh_token",e.FAILED_TO_EXCHANGE="failed_to_exchange_refresh_token"})(Or||(Or={}));class Ao extends ot{constructor(t,r,n){super(r),this.name="AccessTokenForConnectionError",this.code=t,this.cause=n}}function Gh({user:e,children:t}){return K.createElement(Mh,{value:{fallback:{[process.env.NEXT_PUBLIC_PROFILE_ROUTE||"/auth/profile"]:e}}},t)}/**
39
39
  * @license lucide-react v0.522.0 - ISC
40
40
  *
41
41
  * This source code is licensed under the ISC license.
42
42
  * See the LICENSE file in the root directory of this source tree.
43
- */const Yi=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),qi=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),eo=e=>{const t=qi(e);return t.charAt(0).toUpperCase()+t.slice(1)},to=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Xi=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
43
+ */const Bh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),zh=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Wi=e=>{const t=zh(e);return t.charAt(0).toUpperCase()+t.slice(1)},$i=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Vh=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
44
44
  * @license lucide-react v0.522.0 - ISC
45
45
  *
46
46
  * This source code is licensed under the ISC license.
47
47
  * See the LICENSE file in the root directory of this source tree.
48
- */var Zi={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
48
+ */var Jh={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
49
49
  * @license lucide-react v0.522.0 - ISC
50
50
  *
51
51
  * This source code is licensed under the ISC license.
52
52
  * See the LICENSE file in the root directory of this source tree.
53
- */const Ji=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:a,...i},c)=>k.createElement("svg",{ref:c,...Zi,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:to("lucide",o),...!s&&!Xi(i)&&{"aria-hidden":"true"},...i},[...a.map(([f,u])=>k.createElement(f,u)),...Array.isArray(s)?s:[s]]));/**
53
+ */const Xh=K.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:s,iconNode:a,...i},c)=>K.createElement("svg",{ref:c,...Jh,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:$i("lucide",o),...!s&&!Vh(i)&&{"aria-hidden":"true"},...i},[...a.map(([u,l])=>K.createElement(u,l)),...Array.isArray(s)?s:[s]]));/**
54
54
  * @license lucide-react v0.522.0 - ISC
55
55
  *
56
56
  * This source code is licensed under the ISC license.
57
57
  * See the LICENSE file in the root directory of this source tree.
58
- */const xe=(e,t)=>{const n=k.forwardRef(({className:r,...o},s)=>k.createElement(Ji,{ref:s,iconNode:t,className:to(`lucide-${Yi(eo(e))}`,`lucide-${e}`,r),...o}));return n.displayName=eo(e),n};/**
58
+ */const et=(e,t)=>{const r=K.forwardRef(({className:n,...o},s)=>K.createElement(Xh,{ref:s,iconNode:t,className:$i(`lucide-${Bh(Wi(e))}`,`lucide-${e}`,n),...o}));return r.displayName=Wi(e),r};/**
59
59
  * @license lucide-react v0.522.0 - ISC
60
60
  *
61
61
  * This source code is licensed under the ISC license.
62
62
  * See the LICENSE file in the root directory of this source tree.
63
- */const Ke=xe("chart-area",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 11.207a.5.5 0 0 1 .146-.353l2-2a.5.5 0 0 1 .708 0l3.292 3.292a.5.5 0 0 0 .708 0l4.292-4.292a.5.5 0 0 1 .854.353V16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z",key:"q0gr47"}]]);/**
63
+ */const Lt=et("chart-area",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 11.207a.5.5 0 0 1 .146-.353l2-2a.5.5 0 0 1 .708 0l3.292 3.292a.5.5 0 0 0 .708 0l4.292-4.292a.5.5 0 0 1 .854.353V16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z",key:"q0gr47"}]]);/**
64
64
  * @license lucide-react v0.522.0 - ISC
65
65
  *
66
66
  * This source code is licensed under the ISC license.
67
67
  * See the LICENSE file in the root directory of this source tree.
68
- */const Qi=xe("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
68
+ */const Yh=et("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
69
69
  * @license lucide-react v0.522.0 - ISC
70
70
  *
71
71
  * This source code is licensed under the ISC license.
72
72
  * See the LICENSE file in the root directory of this source tree.
73
- */const no=xe("chart-line",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/**
73
+ */const Fi=et("chart-line",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/**
74
74
  * @license lucide-react v0.522.0 - ISC
75
75
  *
76
76
  * This source code is licensed under the ISC license.
77
77
  * See the LICENSE file in the root directory of this source tree.
78
- */const ec=xe("chart-pie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]);/**
78
+ */const Zh=et("chart-pie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]);/**
79
79
  * @license lucide-react v0.522.0 - ISC
80
80
  *
81
81
  * This source code is licensed under the ISC license.
82
82
  * See the LICENSE file in the root directory of this source tree.
83
- */const tc=xe("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
83
+ */const Qh=et("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
84
84
  * @license lucide-react v0.522.0 - ISC
85
85
  *
86
86
  * This source code is licensed under the ISC license.
87
87
  * See the LICENSE file in the root directory of this source tree.
88
- */const nc=xe("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
88
+ */const ep=et("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
89
89
  * @license lucide-react v0.522.0 - ISC
90
90
  *
91
91
  * This source code is licensed under the ISC license.
92
92
  * See the LICENSE file in the root directory of this source tree.
93
- */const ro=xe("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
93
+ */const Ki=et("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
94
94
  * @license lucide-react v0.522.0 - ISC
95
95
  *
96
96
  * This source code is licensed under the ISC license.
97
97
  * See the LICENSE file in the root directory of this source tree.
98
- */const rc=xe("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);/**
98
+ */const tp=et("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);/**
99
99
  * @license lucide-react v0.522.0 - ISC
100
100
  *
101
101
  * This source code is licensed under the ISC license.
102
102
  * See the LICENSE file in the root directory of this source tree.
103
- */const oc=xe("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
103
+ */const rp=et("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
104
104
  * @license lucide-react v0.522.0 - ISC
105
105
  *
106
106
  * This source code is licensed under the ISC license.
107
107
  * See the LICENSE file in the root directory of this source tree.
108
- */const oo=xe("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
108
+ */const qi=et("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
109
109
  * @license lucide-react v0.522.0 - ISC
110
110
  *
111
111
  * This source code is licensed under the ISC license.
112
112
  * See the LICENSE file in the root directory of this source tree.
113
- */const sc=xe("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function so(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function It(...e){return t=>{let n=!1;const r=e.map(o=>{const s=so(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():so(e[o],null)}}}}function ae(...e){return l.useCallback(It(...e),e)}function et(e){const t=ac(e),n=l.forwardRef((r,o)=>{const{children:s,...a}=r,i=l.Children.toArray(s),c=i.find(cc);if(c){const f=c.props.children,u=i.map(d=>d===c?l.Children.count(f)>1?l.Children.only(null):l.isValidElement(f)?f.props.children:null:d);return p.jsx(t,{...a,ref:o,children:l.isValidElement(f)?l.cloneElement(f,void 0,u):null})}return p.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var ao=et("Slot");function ac(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const a=uc(o),i=lc(s,o.props);return o.type!==l.Fragment&&(i.ref=r?It(r,a):a),l.cloneElement(o,i)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var io=Symbol("radix.slottable");function ic(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=io,t}function cc(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===io}function lc(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function uc(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function co(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=co(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function lo(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=co(e))&&(r&&(r+=" "),r+=t);return r}const uo=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,fo=lo,po=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return fo(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(f=>{const u=n==null?void 0:n[f],d=s==null?void 0:s[f];if(u===null)return null;const m=uo(u)||uo(d);return o[f][m]}),i=n&&Object.entries(n).reduce((f,u)=>{let[d,m]=u;return m===void 0||(f[d]=m),f},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,u)=>{let{class:d,className:m,...g}=u;return Object.entries(g).every(b=>{let[h,x]=b;return Array.isArray(x)?x.includes({...s,...i}[h]):{...s,...i}[h]===x})?[...f,d,m]:f},[]);return fo(e,a,c,n==null?void 0:n.class,n==null?void 0:n.className)};function dc(){const[e,t]=k.useState(!1);return k.useEffect(()=>{const n=()=>{t(window.innerWidth<768)};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e}const Tn="-",fc=e=>{const t=mc(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const i=a.split(Tn);return i[0]===""&&i.length!==1&&i.shift(),mo(i,t)||pc(a)},getConflictingClassGroupIds:(a,i)=>{const c=n[a]||[];return i&&r[a]?[...c,...r[a]]:c}}},mo=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?mo(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Tn);return(a=t.validators.find(({validator:i})=>i(s)))==null?void 0:a.classGroupId},ho=/^\[(.+)\]$/,pc=e=>{if(ho.test(e)){const t=ho.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},mc=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Pn(n[o],r,o,t);return r},Pn=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:go(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(hc(o)){Pn(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,a])=>{Pn(a,go(t,s),n,r)})})},go=(e,t)=>{let n=e;return t.split(Tn).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},hc=e=>e.isThemeGetter,gc=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return o(s,a),a},set(s,a){n.has(s)?n.set(s,a):o(s,a)}}},Nn="!",kn=":",vc=kn.length,bc=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let a=0,i=0,c=0,f;for(let b=0;b<o.length;b++){let h=o[b];if(a===0&&i===0){if(h===kn){s.push(o.slice(c,b)),c=b+vc;continue}if(h==="/"){f=b;continue}}h==="["?a++:h==="]"?a--:h==="("?i++:h===")"&&i--}const u=s.length===0?o:o.substring(c),d=xc(u),m=d!==u,g=f&&f>c?f-c:void 0;return{modifiers:s,hasImportantModifier:m,baseClassName:d,maybePostfixModifierPosition:g}};if(t){const o=t+kn,s=r;r=a=>a.startsWith(o)?s(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},xc=e=>e.endsWith(Nn)?e.substring(0,e.length-1):e.startsWith(Nn)?e.substring(1):e,wc=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let s=[];return r.forEach(a=>{a[0]==="["||t[a]?(o.push(...s.sort(),a),s=[]):s.push(a)}),o.push(...s.sort()),o}},yc=e=>({cache:gc(e.cacheSize),parseClassName:bc(e),sortModifiers:wc(e),...fc(e)}),Cc=/\s+/,Ec=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,a=[],i=e.trim().split(Cc);let c="";for(let f=i.length-1;f>=0;f-=1){const u=i[f],{isExternal:d,modifiers:m,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:h}=n(u);if(d){c=u+(c.length>0?" "+c:c);continue}let x=!!h,v=r(x?b.substring(0,h):b);if(!v){if(!x){c=u+(c.length>0?" "+c:c);continue}if(v=r(b),!v){c=u+(c.length>0?" "+c:c);continue}x=!1}const y=s(m).join(":"),E=g?y+Nn:y,S=E+v;if(a.includes(S))continue;a.push(S);const _=o(v,x);for(let M=0;M<_.length;++M){const A=_[M];a.push(E+A)}c=u+(c.length>0?" "+c:c)}return c};function Sc(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=vo(t))&&(r&&(r+=" "),r+=n);return r}const vo=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=vo(e[r]))&&(n&&(n+=" "),n+=t);return n};function Rc(e,...t){let n,r,o,s=a;function a(c){const f=t.reduce((u,d)=>d(u),e());return n=yc(f),r=n.cache.get,o=n.cache.set,s=i,i(c)}function i(c){const f=r(c);if(f)return f;const u=Ec(c,n);return o(c,u),u}return function(){return s(Sc.apply(null,arguments))}}const ie=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},bo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_c=/^\d+\/\d+$/,Ac=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Mc=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Oc=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Tc=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Pc=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,tt=e=>_c.test(e),W=e=>!!e&&!Number.isNaN(Number(e)),Ve=e=>!!e&&Number.isInteger(Number(e)),In=e=>e.endsWith("%")&&W(e.slice(0,-1)),Pe=e=>Ac.test(e),Nc=()=>!0,kc=e=>Mc.test(e)&&!Oc.test(e),wo=()=>!1,Ic=e=>Tc.test(e),Dc=e=>Pc.test(e),jc=e=>!T(e)&&!P(e),Lc=e=>nt(e,Ro,wo),T=e=>bo.test(e),Ye=e=>nt(e,_o,kc),Dn=e=>nt(e,Wc,W),yo=e=>nt(e,Eo,wo),Fc=e=>nt(e,So,Dc),Dt=e=>nt(e,Ao,Ic),P=e=>xo.test(e),bt=e=>rt(e,_o),$c=e=>rt(e,zc),Co=e=>rt(e,Eo),Vc=e=>rt(e,Ro),Hc=e=>rt(e,So),jt=e=>rt(e,Ao,!0),nt=(e,t,n)=>{const r=bo.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},rt=(e,t,n=!1)=>{const r=xo.exec(e);return r?r[1]?t(r[1]):n:!1},Eo=e=>e==="position"||e==="percentage",So=e=>e==="image"||e==="url",Ro=e=>e==="length"||e==="size"||e==="bg-size",_o=e=>e==="length",Wc=e=>e==="number",zc=e=>e==="family-name",Ao=e=>e==="shadow",Bc=Rc(()=>{const e=ie("color"),t=ie("font"),n=ie("text"),r=ie("font-weight"),o=ie("tracking"),s=ie("leading"),a=ie("breakpoint"),i=ie("container"),c=ie("spacing"),f=ie("radius"),u=ie("shadow"),d=ie("inset-shadow"),m=ie("text-shadow"),g=ie("drop-shadow"),b=ie("blur"),h=ie("perspective"),x=ie("aspect"),v=ie("ease"),y=ie("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...S(),P,T],M=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],C=()=>[P,T,c],I=()=>[tt,"full","auto",...C()],D=()=>[Ve,"none","subgrid",P,T],G=()=>["auto",{span:["full",Ve,P,T]},Ve,P,T],z=()=>[Ve,"auto",P,T],V=()=>["auto","min","max","fr",P,T],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],q=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...C()],U=()=>[tt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],R=()=>[e,P,T],O=()=>[...S(),Co,yo,{position:[P,T]}],w=()=>["no-repeat",{repeat:["","x","y","space","round"]}],N=()=>["auto","cover","contain",Vc,Lc,{size:[P,T]}],j=()=>[In,bt,Ye],$=()=>["","none","full",f,P,T],X=()=>["",W,bt,Ye],te=()=>["solid","dashed","dotted","double"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>[W,In,Co,yo],Q=()=>["","none",b,P,T],ee=()=>["none",W,P,T],se=()=>["none",W,P,T],Ee=()=>[W,P,T],Ge=()=>[tt,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Pe],breakpoint:[Pe],color:[Nc],container:[Pe],"drop-shadow":[Pe],ease:["in","out","in-out"],font:[jc],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Pe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Pe],shadow:[Pe],spacing:["px",W],text:[Pe],"text-shadow":[Pe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",tt,T,P,x]}],container:["container"],columns:[{columns:[W,T,P,i]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[Ve,"auto",P,T]}],basis:[{basis:[tt,"full","auto",i,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[W,tt,"auto","initial","none",T]}],grow:[{grow:["",W,P,T]}],shrink:[{shrink:["",W,P,T]}],order:[{order:[Ve,"first","last","none",P,T]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:G()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:G()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...q(),"normal"]}],"justify-self":[{"justify-self":["auto",...q()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...q(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...q(),"baseline"]}],"place-self":[{"place-self":["auto",...q()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[i,"screen",...U()]}],"min-w":[{"min-w":[i,"screen","none",...U()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",n,bt,Ye]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,P,Dn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",In,T]}],"font-family":[{font:[$c,T,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,P,T]}],"line-clamp":[{"line-clamp":[W,"none",P,Dn]}],leading:[{leading:[s,...C()]}],"list-image":[{"list-image":["none",P,T]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",P,T]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[W,"from-font","auto",P,Ye]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[W,"auto",P,T]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",P,T]}],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",P,T]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:w()}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ve,P,T],radial:["",P,T],conic:[Ve,P,T]},Hc,Fc]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:j()}],"gradient-via-pos":[{via:j()}],"gradient-to-pos":[{to:j()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:$()}],"rounded-s":[{"rounded-s":$()}],"rounded-e":[{"rounded-e":$()}],"rounded-t":[{"rounded-t":$()}],"rounded-r":[{"rounded-r":$()}],"rounded-b":[{"rounded-b":$()}],"rounded-l":[{"rounded-l":$()}],"rounded-ss":[{"rounded-ss":$()}],"rounded-se":[{"rounded-se":$()}],"rounded-ee":[{"rounded-ee":$()}],"rounded-es":[{"rounded-es":$()}],"rounded-tl":[{"rounded-tl":$()}],"rounded-tr":[{"rounded-tr":$()}],"rounded-br":[{"rounded-br":$()}],"rounded-bl":[{"rounded-bl":$()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[W,P,T]}],"outline-w":[{outline:["",W,bt,Ye]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",u,jt,Dt]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",d,jt,Dt]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[W,Ye]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",m,jt,Dt]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[W,P,T]}],"mix-blend":[{"mix-blend":[...le(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":le()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[W]}],"mask-image-linear-from-pos":[{"mask-linear-from":K()}],"mask-image-linear-to-pos":[{"mask-linear-to":K()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":K()}],"mask-image-t-to-pos":[{"mask-t-to":K()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":K()}],"mask-image-r-to-pos":[{"mask-r-to":K()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":K()}],"mask-image-b-to-pos":[{"mask-b-to":K()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":K()}],"mask-image-l-to-pos":[{"mask-l-to":K()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":K()}],"mask-image-x-to-pos":[{"mask-x-to":K()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":K()}],"mask-image-y-to-pos":[{"mask-y-to":K()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[P,T]}],"mask-image-radial-from-pos":[{"mask-radial-from":K()}],"mask-image-radial-to-pos":[{"mask-radial-to":K()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[W]}],"mask-image-conic-from-pos":[{"mask-conic-from":K()}],"mask-image-conic-to-pos":[{"mask-conic-to":K()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:w()}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",P,T]}],filter:[{filter:["","none",P,T]}],blur:[{blur:Q()}],brightness:[{brightness:[W,P,T]}],contrast:[{contrast:[W,P,T]}],"drop-shadow":[{"drop-shadow":["","none",g,jt,Dt]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",W,P,T]}],"hue-rotate":[{"hue-rotate":[W,P,T]}],invert:[{invert:["",W,P,T]}],saturate:[{saturate:[W,P,T]}],sepia:[{sepia:["",W,P,T]}],"backdrop-filter":[{"backdrop-filter":["","none",P,T]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[W,P,T]}],"backdrop-contrast":[{"backdrop-contrast":[W,P,T]}],"backdrop-grayscale":[{"backdrop-grayscale":["",W,P,T]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[W,P,T]}],"backdrop-invert":[{"backdrop-invert":["",W,P,T]}],"backdrop-opacity":[{"backdrop-opacity":[W,P,T]}],"backdrop-saturate":[{"backdrop-saturate":[W,P,T]}],"backdrop-sepia":[{"backdrop-sepia":["",W,P,T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",P,T]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[W,"initial",P,T]}],ease:[{ease:["linear","initial",v,P,T]}],delay:[{delay:[W,P,T]}],animate:[{animate:["none",y,P,T]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,P,T]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:Ee()}],"skew-x":[{"skew-x":Ee()}],"skew-y":[{"skew-y":Ee()}],transform:[{transform:[P,T,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ge()}],"translate-x":[{"translate-x":Ge()}],"translate-y":[{"translate-y":Ge()}],"translate-z":[{"translate-z":Ge()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"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",P,T]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",P,T]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[W,bt,Ye,Dn]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function B(...e){return Bc(lo(e))}const Gc=po("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),jn=l.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const a=r?ao:"button";return p.jsx(a,{className:B(Gc({variant:t,size:n,className:e})),ref:s,...o})});jn.displayName="Button";var Uc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ne=Uc.reduce((e,t)=>{const n=et(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:a,...i}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(c,{...i,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Mo(e,t){e&&Tr.flushSync(()=>e.dispatchEvent(t))}var Kc="Separator",Oo="horizontal",Yc=["horizontal","vertical"],To=l.forwardRef((e,t)=>{const{decorative:n,orientation:r=Oo,...o}=e,s=qc(r)?r:Oo,i=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return p.jsx(ne.div,{"data-orientation":s,...i,...o,ref:t})});To.displayName=Kc;function qc(e){return Yc.includes(e)}var Po=To;const No=l.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>p.jsx(Po,{ref:o,decorative:n,orientation:t,className:B("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));No.displayName=Po.displayName;function L(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Xc(e,t){const n=l.createContext(t),r=s=>{const{children:a,...i}=s,c=l.useMemo(()=>i,Object.values(i));return p.jsx(n.Provider,{value:c,children:a})};r.displayName=e+"Provider";function o(s){const a=l.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function qe(e,t=[]){let n=[];function r(s,a){const i=l.createContext(a),c=n.length;n=[...n,a];const f=d=>{var v;const{scope:m,children:g,...b}=d,h=((v=m==null?void 0:m[e])==null?void 0:v[c])||i,x=l.useMemo(()=>b,Object.values(b));return p.jsx(h.Provider,{value:x,children:g})};f.displayName=s+"Provider";function u(d,m){var h;const g=((h=m==null?void 0:m[e])==null?void 0:h[c])||i,b=l.useContext(g);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[f,u]}const o=()=>{const s=n.map(a=>l.createContext(a));return function(i){const c=(i==null?void 0:i[e])||s;return l.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[r,Zc(o,...t)]}function Zc(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((i,{useScope:c,scopeName:f})=>{const d=c(s)[`__scope${f}`];return{...i,...d}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var He=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},Jc=l[" useId ".trim().toString()]||(()=>{}),Qc=0;function ot(e){const[t,n]=l.useState(Jc());return He(()=>{n(r=>r??String(Qc++))},[e]),e||(t?`radix-${t}`:"")}var el=l[" useInsertionEffect ".trim().toString()]||He;function Ln({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,a]=tl({defaultProp:t,onChange:n}),i=e!==void 0,c=i?e:o;{const u=l.useRef(e!==void 0);l.useEffect(()=>{const d=u.current;d!==i&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=i},[i,r])}const f=l.useCallback(u=>{var d;if(i){const m=nl(u)?u(e):u;m!==e&&((d=a.current)==null||d.call(a,m))}else s(u)},[i,e,s,a]);return[c,f]}function tl({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),o=l.useRef(n),s=l.useRef(t);return el(()=>{s.current=t},[t]),l.useEffect(()=>{var a;o.current!==n&&((a=s.current)==null||a.call(s,n),o.current=n)},[n,o]),[n,r,s]}function nl(e){return typeof e=="function"}function Ne(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function rl(e,t=globalThis==null?void 0:globalThis.document){const n=Ne(e);l.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var ol="DismissableLayer",Fn="dismissableLayer.update",sl="dismissableLayer.pointerDownOutside",al="dismissableLayer.focusOutside",ko,Io=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Lt=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...c}=e,f=l.useContext(Io),[u,d]=l.useState(null),m=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=l.useState({}),b=ae(t,A=>d(A)),h=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(x),y=u?h.indexOf(u):-1,E=f.layersWithOutsidePointerEventsDisabled.size>0,S=y>=v,_=ll(A=>{const C=A.target,I=[...f.branches].some(D=>D.contains(C));!S||I||(o==null||o(A),a==null||a(A),A.defaultPrevented||i==null||i())},m),M=ul(A=>{const C=A.target;[...f.branches].some(D=>D.contains(C))||(s==null||s(A),a==null||a(A),A.defaultPrevented||i==null||i())},m);return rl(A=>{y===f.layers.size-1&&(r==null||r(A),!A.defaultPrevented&&i&&(A.preventDefault(),i()))},m),l.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(ko=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),Do(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=ko)}},[u,m,n,f]),l.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),Do())},[u,f]),l.useEffect(()=>{const A=()=>g({});return document.addEventListener(Fn,A),()=>document.removeEventListener(Fn,A)},[]),p.jsx(ne.div,{...c,ref:b,style:{pointerEvents:E?S?"auto":"none":void 0,...e.style},onFocusCapture:L(e.onFocusCapture,M.onFocusCapture),onBlurCapture:L(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:L(e.onPointerDownCapture,_.onPointerDownCapture)})});Lt.displayName=ol;var il="DismissableLayerBranch",cl=l.forwardRef((e,t)=>{const n=l.useContext(Io),r=l.useRef(null),o=ae(t,r);return l.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(ne.div,{...e,ref:o})});cl.displayName=il;function ll(e,t=globalThis==null?void 0:globalThis.document){const n=Ne(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let c=function(){jo(sl,n,f,{discrete:!0})};const f={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ul(e,t=globalThis==null?void 0:globalThis.document){const n=Ne(e),r=l.useRef(!1);return l.useEffect(()=>{const o=s=>{s.target&&!r.current&&jo(al,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Do(){const e=new CustomEvent(Fn);document.dispatchEvent(e)}function jo(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Mo(o,s):o.dispatchEvent(s)}var $n="focusScope.autoFocusOnMount",Vn="focusScope.autoFocusOnUnmount",Lo={bubbles:!1,cancelable:!0},dl="FocusScope",Hn=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,c]=l.useState(null),f=Ne(o),u=Ne(s),d=l.useRef(null),m=ae(t,h=>c(h)),g=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let h=function(E){if(g.paused||!i)return;const S=E.target;i.contains(S)?d.current=S:We(d.current,{select:!0})},x=function(E){if(g.paused||!i)return;const S=E.relatedTarget;S!==null&&(i.contains(S)||We(d.current,{select:!0}))},v=function(E){if(document.activeElement===document.body)for(const _ of E)_.removedNodes.length>0&&We(i)};document.addEventListener("focusin",h),document.addEventListener("focusout",x);const y=new MutationObserver(v);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",x),y.disconnect()}}},[r,i,g.paused]),l.useEffect(()=>{if(i){Vo.add(g);const h=document.activeElement;if(!i.contains(h)){const v=new CustomEvent($n,Lo);i.addEventListener($n,f),i.dispatchEvent(v),v.defaultPrevented||(fl(vl(Fo(i)),{select:!0}),document.activeElement===h&&We(i))}return()=>{i.removeEventListener($n,f),setTimeout(()=>{const v=new CustomEvent(Vn,Lo);i.addEventListener(Vn,u),i.dispatchEvent(v),v.defaultPrevented||We(h??document.body,{select:!0}),i.removeEventListener(Vn,u),Vo.remove(g)},0)}}},[i,f,u,g]);const b=l.useCallback(h=>{if(!n&&!r||g.paused)return;const x=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,v=document.activeElement;if(x&&v){const y=h.currentTarget,[E,S]=pl(y);E&&S?!h.shiftKey&&v===S?(h.preventDefault(),n&&We(E,{select:!0})):h.shiftKey&&v===E&&(h.preventDefault(),n&&We(S,{select:!0})):v===y&&h.preventDefault()}},[n,r,g.paused]);return p.jsx(ne.div,{tabIndex:-1,...a,ref:m,onKeyDown:b})});Hn.displayName=dl;function fl(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(We(r,{select:t}),document.activeElement!==n)return}function pl(e){const t=Fo(e),n=$o(t,e),r=$o(t.reverse(),e);return[n,r]}function Fo(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function $o(e,t){for(const n of e)if(!ml(n,{upTo:t}))return n}function ml(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function hl(e){return e instanceof HTMLInputElement&&"select"in e}function We(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&hl(e)&&t&&e.select()}}var Vo=gl();function gl(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ho(e,t),e.unshift(t)},remove(t){var n;e=Ho(e,t),(n=e[0])==null||n.resume()}}}function Ho(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function vl(e){return e.filter(t=>t.tagName!=="A")}var bl="Portal",Wn=l.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,s]=l.useState(!1);He(()=>s(!0),[]);const a=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?Mr.createPortal(p.jsx(ne.div,{...r,ref:t}),a):null});Wn.displayName=bl;function xl(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var ke=e=>{const{present:t,children:n}=e,r=wl(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),s=ae(r.ref,yl(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:s}):null};ke.displayName="Presence";function wl(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),s=l.useRef("none"),a=e?"mounted":"unmounted",[i,c]=xl(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const f=Ft(r.current);s.current=i==="mounted"?f:"none"},[i]),He(()=>{const f=r.current,u=o.current;if(u!==e){const m=s.current,g=Ft(f);e?c("MOUNT"):g==="none"||(f==null?void 0:f.display)==="none"?c("UNMOUNT"):c(u&&m!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),He(()=>{if(t){let f;const u=t.ownerDocument.defaultView??window,d=g=>{const h=Ft(r.current).includes(g.animationName);if(g.target===t&&h&&(c("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",f=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},m=g=>{g.target===t&&(s.current=Ft(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(f),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:l.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function Ft(e){return(e==null?void 0:e.animationName)||"none"}function yl(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var zn=0;function Wo(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??zo()),document.body.insertAdjacentElement("beforeend",e[1]??zo()),zn++,()=>{zn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),zn--}},[])}function zo(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Se=function(){return Se=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Se.apply(this,arguments)};function Bo(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Cl(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var $t="right-scroll-bar-position",Vt="width-before-scroll-bar",El="with-scroll-bars-hidden",Sl="--removed-body-scroll-bar-size";function Bn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Rl(e,t){var n=k.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var _l=typeof window<"u"?l.useLayoutEffect:l.useEffect,Go=new WeakMap;function Al(e,t){var n=Rl(null,function(r){return e.forEach(function(o){return Bn(o,r)})});return _l(function(){var r=Go.get(n);if(r){var o=new Set(r),s=new Set(e),a=n.current;o.forEach(function(i){s.has(i)||Bn(i,null)}),s.forEach(function(i){o.has(i)||Bn(i,a)})}Go.set(n,e)},[e]),n}function Ml(e){return e}function Ol(e,t){t===void 0&&(t=Ml);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,r);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(s),a=n}var c=function(){var u=a;a=[],u.forEach(s)},f=function(){return Promise.resolve().then(c)};f(),n={push:function(u){a.push(u),f()},filter:function(u){return a=a.filter(u),n}}}};return o}function Tl(e){e===void 0&&(e={});var t=Ol(null);return t.options=Se({async:!0,ssr:!1},e),t}var Uo=function(e){var t=e.sideCar,n=Bo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return l.createElement(r,Se({},n))};Uo.isSideCarExport=!0;function Pl(e,t){return e.useMedium(t),Uo}var Ko=Tl(),Gn=function(){},Ht=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:Gn,onWheelCapture:Gn,onTouchMoveCapture:Gn}),o=r[0],s=r[1],a=e.forwardProps,i=e.children,c=e.className,f=e.removeScrollBar,u=e.enabled,d=e.shards,m=e.sideCar,g=e.noRelative,b=e.noIsolation,h=e.inert,x=e.allowPinchZoom,v=e.as,y=v===void 0?"div":v,E=e.gapMode,S=Bo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=m,M=Al([n,t]),A=Se(Se({},S),o);return l.createElement(l.Fragment,null,u&&l.createElement(_,{sideCar:Ko,removeScrollBar:f,shards:d,noRelative:g,noIsolation:b,inert:h,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:E}),a?l.cloneElement(l.Children.only(i),Se(Se({},A),{ref:M})):l.createElement(y,Se({},A,{className:c,ref:M}),i))});Ht.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ht.classNames={fullWidth:Vt,zeroRight:$t};var Nl=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function kl(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Nl();return t&&e.setAttribute("nonce",t),e}function Il(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Dl(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var jl=function(){var e=0,t=null;return{add:function(n){e==0&&(t=kl())&&(Il(t,n),Dl(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ll=function(){var e=jl();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Yo=function(){var e=Ll(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Fl={left:0,top:0,right:0,gap:0},Un=function(e){return parseInt(e||"",10)||0},$l=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Un(n),Un(r),Un(o)]},Vl=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Fl;var t=$l(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Hl=Yo(),st="data-scroll-locked",Wl=function(e,t,n,r){var o=e.left,s=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
114
- .`.concat(El,` {
115
- overflow: hidden `).concat(r,`;
116
- padding-right: `).concat(i,"px ").concat(r,`;
113
+ */const np=et("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Gi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function nn(...e){return t=>{let r=!1;const n=e.map(o=>{const s=Gi(o,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():Gi(e[o],null)}}}}function Ce(...e){return S.useCallback(nn(...e),e)}function er(e){const t=op(e),r=S.forwardRef((n,o)=>{const{children:s,...a}=n,i=S.Children.toArray(s),c=i.find(ap);if(c){const u=c.props.children,l=i.map(d=>d===c?S.Children.count(u)>1?S.Children.only(null):S.isValidElement(u)?u.props.children:null:d);return A.jsx(t,{...a,ref:o,children:S.isValidElement(u)?S.cloneElement(u,void 0,l):null})}return A.jsx(t,{...a,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}var Bi=er("Slot");function op(e){const t=S.forwardRef((r,n)=>{const{children:o,...s}=r;if(S.isValidElement(o)){const a=cp(o),i=ip(s,o.props);return o.type!==S.Fragment&&(i.ref=n?nn(n,a):a),S.cloneElement(o,i)}return S.Children.count(o)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zi=Symbol("radix.slottable");function sp(e){const t=({children:r})=>A.jsx(A.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=zi,t}function ap(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zi}function ip(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function cp(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Vi(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Vi(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ji(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Vi(e))&&(n&&(n+=" "),n+=t);return n}const Xi=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Yi=Ji,Zi=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Yi(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(u=>{const l=r==null?void 0:r[u],d=s==null?void 0:s[u];if(l===null)return null;const h=Xi(l)||Xi(d);return o[u][h]}),i=r&&Object.entries(r).reduce((u,l)=>{let[d,h]=l;return h===void 0||(u[d]=h),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,l)=>{let{class:d,className:h,...g}=l;return Object.entries(g).every(E=>{let[b,m]=E;return Array.isArray(m)?m.includes({...s,...i}[b]):{...s,...i}[b]===m})?[...u,d,h]:u},[]);return Yi(e,a,c,r==null?void 0:r.class,r==null?void 0:r.className)};function up(){const[e,t]=K.useState(!1);return K.useEffect(()=>{const r=()=>{t(window.innerWidth<768)};return r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),e}const Ro="-",lp=e=>{const t=fp(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{const i=a.split(Ro);return i[0]===""&&i.length!==1&&i.shift(),Qi(i,t)||dp(a)},getConflictingClassGroupIds:(a,i)=>{const c=r[a]||[];return i&&n[a]?[...c,...n[a]]:c}}},Qi=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?Qi(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Ro);return(a=t.validators.find(({validator:i})=>i(s)))==null?void 0:a.classGroupId},ec=/^\[(.+)\]$/,dp=e=>{if(ec.test(e)){const t=ec.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},fp=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const o in r)Co(r[o],n,o,t);return n},Co=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:tc(t,o);s.classGroupId=r;return}if(typeof o=="function"){if(hp(o)){Co(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([s,a])=>{Co(a,tc(t,s),r,n)})})},tc=(e,t)=>{let r=e;return t.split(Ro).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},hp=e=>e.isThemeGetter,pp=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(s,a)=>{r.set(s,a),t++,t>e&&(t=0,n=r,r=new Map)};return{get(s){let a=r.get(s);if(a!==void 0)return a;if((a=n.get(s))!==void 0)return o(s,a),a},set(s,a){r.has(s)?r.set(s,a):o(s,a)}}},To="!",Po=":",mp=Po.length,gp=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const s=[];let a=0,i=0,c=0,u;for(let E=0;E<o.length;E++){let b=o[E];if(a===0&&i===0){if(b===Po){s.push(o.slice(c,E)),c=E+mp;continue}if(b==="/"){u=E;continue}}b==="["?a++:b==="]"?a--:b==="("?i++:b===")"&&i--}const l=s.length===0?o:o.substring(c),d=yp(l),h=d!==l,g=u&&u>c?u-c:void 0;return{modifiers:s,hasImportantModifier:h,baseClassName:d,maybePostfixModifierPosition:g}};if(t){const o=t+Po,s=n;n=a=>a.startsWith(o)?s(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(r){const o=n;n=s=>r({className:s,parseClassName:o})}return n},yp=e=>e.endsWith(To)?e.substring(0,e.length-1):e.startsWith(To)?e.substring(1):e,bp=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const o=[];let s=[];return n.forEach(a=>{a[0]==="["||t[a]?(o.push(...s.sort(),a),s=[]):s.push(a)}),o.push(...s.sort()),o}},wp=e=>({cache:pp(e.cacheSize),parseClassName:gp(e),sortModifiers:bp(e),...lp(e)}),vp=/\s+/,Ep=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=t,a=[],i=e.trim().split(vp);let c="";for(let u=i.length-1;u>=0;u-=1){const l=i[u],{isExternal:d,modifiers:h,hasImportantModifier:g,baseClassName:E,maybePostfixModifierPosition:b}=r(l);if(d){c=l+(c.length>0?" "+c:c);continue}let m=!!b,p=n(m?E.substring(0,b):E);if(!p){if(!m){c=l+(c.length>0?" "+c:c);continue}if(p=n(E),!p){c=l+(c.length>0?" "+c:c);continue}m=!1}const y=s(h).join(":"),f=g?y+To:y,x=f+p;if(a.includes(x))continue;a.push(x);const v=o(p,m);for(let R=0;R<v.length;++R){const w=v[R];a.push(f+w)}c=l+(c.length>0?" "+c:c)}return c};function _p(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=rc(t))&&(n&&(n+=" "),n+=r);return n}const rc=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=rc(e[n]))&&(r&&(r+=" "),r+=t);return r};function Sp(e,...t){let r,n,o,s=a;function a(c){const u=t.reduce((l,d)=>d(l),e());return r=wp(u),n=r.cache.get,o=r.cache.set,s=i,i(c)}function i(c){const u=n(c);if(u)return u;const l=Ep(c,r);return o(c,l),l}return function(){return s(_p.apply(null,arguments))}}const Te=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},nc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,oc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,xp=/^\d+\/\d+$/,Ap=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Rp=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Cp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Tp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Pp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,tr=e=>xp.test(e),oe=e=>!!e&&!Number.isNaN(Number(e)),xt=e=>!!e&&Number.isInteger(Number(e)),Oo=e=>e.endsWith("%")&&oe(e.slice(0,-1)),mt=e=>Ap.test(e),Op=()=>!0,kp=e=>Rp.test(e)&&!Cp.test(e),sc=()=>!1,Np=e=>Tp.test(e),Ip=e=>Pp.test(e),Dp=e=>!W(e)&&!$(e),Mp=e=>rr(e,lc,sc),W=e=>nc.test(e),jt=e=>rr(e,dc,kp),ko=e=>rr(e,Wp,oe),ac=e=>rr(e,cc,sc),Lp=e=>rr(e,uc,Ip),on=e=>rr(e,fc,Np),$=e=>oc.test(e),kr=e=>nr(e,dc),jp=e=>nr(e,$p),ic=e=>nr(e,cc),Hp=e=>nr(e,lc),Up=e=>nr(e,uc),sn=e=>nr(e,fc,!0),rr=(e,t,r)=>{const n=nc.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},nr=(e,t,r=!1)=>{const n=oc.exec(e);return n?n[1]?t(n[1]):r:!1},cc=e=>e==="position"||e==="percentage",uc=e=>e==="image"||e==="url",lc=e=>e==="length"||e==="size"||e==="bg-size",dc=e=>e==="length",Wp=e=>e==="number",$p=e=>e==="family-name",fc=e=>e==="shadow",Fp=Sp(()=>{const e=Te("color"),t=Te("font"),r=Te("text"),n=Te("font-weight"),o=Te("tracking"),s=Te("leading"),a=Te("breakpoint"),i=Te("container"),c=Te("spacing"),u=Te("radius"),l=Te("shadow"),d=Te("inset-shadow"),h=Te("text-shadow"),g=Te("drop-shadow"),E=Te("blur"),b=Te("perspective"),m=Te("aspect"),p=Te("ease"),y=Te("animate"),f=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...x(),$,W],R=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],_=()=>[$,W,c],C=()=>[tr,"full","auto",..._()],D=()=>[xt,"none","subgrid",$,W],I=()=>["auto",{span:["full",xt,$,W]},xt,$,W],P=()=>[xt,"auto",$,W],H=()=>["auto","min","max","fr",$,W],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],re=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",..._()],J=()=>[tr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],O=()=>[e,$,W],L=()=>[...x(),ic,ac,{position:[$,W]}],T=()=>["no-repeat",{repeat:["","x","y","space","round"]}],j=()=>["auto","cover","contain",Hp,Mp,{size:[$,W]}],z=()=>[Oo,kr,jt],V=()=>["","none","full",u,$,W],ne=()=>["",oe,kr,jt],de=()=>["solid","dashed","dotted","double"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>[oe,Oo,ic,ac],ue=()=>["","none",E,$,W],ce=()=>["none",oe,$,W],ye=()=>["none",oe,$,W],k=()=>[oe,$,W],N=()=>[tr,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[mt],breakpoint:[mt],color:[Op],container:[mt],"drop-shadow":[mt],ease:["in","out","in-out"],font:[Dp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[mt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[mt],shadow:[mt],spacing:["px",oe],text:[mt],"text-shadow":[mt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",tr,W,$,m]}],container:["container"],columns:[{columns:[oe,W,$,i]}],"break-after":[{"break-after":f()}],"break-before":[{"break-before":f()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[xt,"auto",$,W]}],basis:[{basis:[tr,"full","auto",i,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[oe,tr,"auto","initial","none",W]}],grow:[{grow:["",oe,$,W]}],shrink:[{shrink:["",oe,$,W]}],order:[{order:[xt,"first","last","none",$,W]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...re(),"normal"]}],"justify-self":[{"justify-self":["auto",...re()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...re(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...re(),"baseline"]}],"place-self":[{"place-self":["auto",...re()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],w:[{w:[i,"screen",...J()]}],"min-w":[{"min-w":[i,"screen","none",...J()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",r,kr,jt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,$,ko]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Oo,W]}],"font-family":[{font:[jp,W,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,$,W]}],"line-clamp":[{"line-clamp":[oe,"none",$,ko]}],leading:[{leading:[s,..._()]}],"list-image":[{"list-image":["none",$,W]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",$,W]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:[oe,"from-font","auto",$,jt]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[oe,"auto",$,W]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$,W]}],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",$,W]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:T()}],"bg-size":[{bg:j()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},xt,$,W],radial:["",$,W],conic:[xt,$,W]},Up,Lp]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...de(),"hidden","none"]}],"divide-style":[{divide:[...de(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...de(),"none","hidden"]}],"outline-offset":[{"outline-offset":[oe,$,W]}],"outline-w":[{outline:["",oe,kr,jt]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",l,sn,on]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",d,sn,on]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[oe,jt]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",h,sn,on]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[oe,$,W]}],"mix-blend":[{"mix-blend":[...be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":be()}],"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":[oe]}],"mask-image-linear-from-pos":[{"mask-linear-from":Q()}],"mask-image-linear-to-pos":[{"mask-linear-to":Q()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":Q()}],"mask-image-t-to-pos":[{"mask-t-to":Q()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":Q()}],"mask-image-r-to-pos":[{"mask-r-to":Q()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":Q()}],"mask-image-b-to-pos":[{"mask-b-to":Q()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":Q()}],"mask-image-l-to-pos":[{"mask-l-to":Q()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":Q()}],"mask-image-x-to-pos":[{"mask-x-to":Q()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":Q()}],"mask-image-y-to-pos":[{"mask-y-to":Q()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[$,W]}],"mask-image-radial-from-pos":[{"mask-radial-from":Q()}],"mask-image-radial-to-pos":[{"mask-radial-to":Q()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":x()}],"mask-image-conic-pos":[{"mask-conic":[oe]}],"mask-image-conic-from-pos":[{"mask-conic-from":Q()}],"mask-image-conic-to-pos":[{"mask-conic-to":Q()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:T()}],"mask-size":[{mask:j()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",$,W]}],filter:[{filter:["","none",$,W]}],blur:[{blur:ue()}],brightness:[{brightness:[oe,$,W]}],contrast:[{contrast:[oe,$,W]}],"drop-shadow":[{"drop-shadow":["","none",g,sn,on]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",oe,$,W]}],"hue-rotate":[{"hue-rotate":[oe,$,W]}],invert:[{invert:["",oe,$,W]}],saturate:[{saturate:[oe,$,W]}],sepia:[{sepia:["",oe,$,W]}],"backdrop-filter":[{"backdrop-filter":["","none",$,W]}],"backdrop-blur":[{"backdrop-blur":ue()}],"backdrop-brightness":[{"backdrop-brightness":[oe,$,W]}],"backdrop-contrast":[{"backdrop-contrast":[oe,$,W]}],"backdrop-grayscale":[{"backdrop-grayscale":["",oe,$,W]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[oe,$,W]}],"backdrop-invert":[{"backdrop-invert":["",oe,$,W]}],"backdrop-opacity":[{"backdrop-opacity":[oe,$,W]}],"backdrop-saturate":[{"backdrop-saturate":[oe,$,W]}],"backdrop-sepia":[{"backdrop-sepia":["",oe,$,W]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",$,W]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[oe,"initial",$,W]}],ease:[{ease:["linear","initial",p,$,W]}],delay:[{delay:[oe,$,W]}],animate:[{animate:["none",y,$,W]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,$,W]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:ye()}],"scale-x":[{"scale-x":ye()}],"scale-y":[{"scale-y":ye()}],"scale-z":[{"scale-z":ye()}],"scale-3d":["scale-3d"],skew:[{skew:k()}],"skew-x":[{"skew-x":k()}],"skew-y":[{"skew-y":k()}],transform:[{transform:[$,W,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:N()}],"translate-x":[{"translate-x":N()}],"translate-y":[{"translate-y":N()}],"translate-z":[{"translate-z":N()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"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",$,W]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$,W]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[oe,kr,jt,ko]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function ie(...e){return Fp(Ji(e))}const Kp=Zi("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),No=S.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const a=n?Bi:"button";return A.jsx(a,{className:ie(Kp({variant:t,size:r,className:e})),ref:s,...o})});No.displayName="Button";var qp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Se=qp.reduce((e,t)=>{const r=er(`Primitive.${t}`),n=S.forwardRef((o,s)=>{const{asChild:a,...i}=o,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),A.jsx(c,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function hc(e,t){e&&pi.flushSync(()=>e.dispatchEvent(t))}var Gp="Separator",pc="horizontal",Bp=["horizontal","vertical"],mc=S.forwardRef((e,t)=>{const{decorative:r,orientation:n=pc,...o}=e,s=zp(n)?n:pc,i=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return A.jsx(Se.div,{"data-orientation":s,...i,...o,ref:t})});mc.displayName=Gp;function zp(e){return Bp.includes(e)}var gc=mc;const yc=S.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},o)=>A.jsx(gc,{ref:o,decorative:r,orientation:t,className:ie("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));yc.displayName=gc.displayName;function X(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Vp(e,t){const r=S.createContext(t),n=s=>{const{children:a,...i}=s,c=S.useMemo(()=>i,Object.values(i));return A.jsx(r.Provider,{value:c,children:a})};n.displayName=e+"Provider";function o(s){const a=S.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,o]}function Ht(e,t=[]){let r=[];function n(s,a){const i=S.createContext(a),c=r.length;r=[...r,a];const u=d=>{var p;const{scope:h,children:g,...E}=d,b=((p=h==null?void 0:h[e])==null?void 0:p[c])||i,m=S.useMemo(()=>E,Object.values(E));return A.jsx(b.Provider,{value:m,children:g})};u.displayName=s+"Provider";function l(d,h){var b;const g=((b=h==null?void 0:h[e])==null?void 0:b[c])||i,E=S.useContext(g);if(E)return E;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,l]}const o=()=>{const s=r.map(a=>S.createContext(a));return function(i){const c=(i==null?void 0:i[e])||s;return S.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[n,Jp(o,...t)]}function Jp(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=n.reduce((i,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...i,...d}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}var At=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},Xp=S[" useId ".trim().toString()]||(()=>{}),Yp=0;function or(e){const[t,r]=S.useState(Xp());return At(()=>{r(n=>n??String(Yp++))},[e]),e||(t?`radix-${t}`:"")}var Zp=S[" useInsertionEffect ".trim().toString()]||At;function Io({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,s,a]=Qp({defaultProp:t,onChange:r}),i=e!==void 0,c=i?e:o;{const l=S.useRef(e!==void 0);S.useEffect(()=>{const d=l.current;d!==i&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),l.current=i},[i,n])}const u=S.useCallback(l=>{var d;if(i){const h=em(l)?l(e):l;h!==e&&((d=a.current)==null||d.call(a,h))}else s(l)},[i,e,s,a]);return[c,u]}function Qp({defaultProp:e,onChange:t}){const[r,n]=S.useState(e),o=S.useRef(r),s=S.useRef(t);return Zp(()=>{s.current=t},[t]),S.useEffect(()=>{var a;o.current!==r&&((a=s.current)==null||a.call(s,r),o.current=r)},[r,o]),[r,n,s]}function em(e){return typeof e=="function"}function gt(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function tm(e,t=globalThis==null?void 0:globalThis.document){const r=gt(e);S.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var rm="DismissableLayer",Do="dismissableLayer.update",nm="dismissableLayer.pointerDownOutside",om="dismissableLayer.focusOutside",bc,wc=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),an=S.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...c}=e,u=S.useContext(wc),[l,d]=S.useState(null),h=(l==null?void 0:l.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=S.useState({}),E=Ce(t,w=>d(w)),b=Array.from(u.layers),[m]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),p=b.indexOf(m),y=l?b.indexOf(l):-1,f=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=p,v=im(w=>{const _=w.target,C=[...u.branches].some(D=>D.contains(_));!x||C||(o==null||o(w),a==null||a(w),w.defaultPrevented||i==null||i())},h),R=cm(w=>{const _=w.target;[...u.branches].some(D=>D.contains(_))||(s==null||s(w),a==null||a(w),w.defaultPrevented||i==null||i())},h);return tm(w=>{y===u.layers.size-1&&(n==null||n(w),!w.defaultPrevented&&i&&(w.preventDefault(),i()))},h),S.useEffect(()=>{if(l)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(bc=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(l)),u.layers.add(l),vc(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=bc)}},[l,h,r,u]),S.useEffect(()=>()=>{l&&(u.layers.delete(l),u.layersWithOutsidePointerEventsDisabled.delete(l),vc())},[l,u]),S.useEffect(()=>{const w=()=>g({});return document.addEventListener(Do,w),()=>document.removeEventListener(Do,w)},[]),A.jsx(Se.div,{...c,ref:E,style:{pointerEvents:f?x?"auto":"none":void 0,...e.style},onFocusCapture:X(e.onFocusCapture,R.onFocusCapture),onBlurCapture:X(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,v.onPointerDownCapture)})});an.displayName=rm;var sm="DismissableLayerBranch",am=S.forwardRef((e,t)=>{const r=S.useContext(wc),n=S.useRef(null),o=Ce(t,n);return S.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),A.jsx(Se.div,{...e,ref:o})});am.displayName=sm;function im(e,t=globalThis==null?void 0:globalThis.document){const r=gt(e),n=S.useRef(!1),o=S.useRef(()=>{});return S.useEffect(()=>{const s=i=>{if(i.target&&!n.current){let c=function(){Ec(nm,r,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function cm(e,t=globalThis==null?void 0:globalThis.document){const r=gt(e),n=S.useRef(!1);return S.useEffect(()=>{const o=s=>{s.target&&!n.current&&Ec(om,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function vc(){const e=new CustomEvent(Do);document.dispatchEvent(e)}function Ec(e,t,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?hc(o,s):o.dispatchEvent(s)}var Mo="focusScope.autoFocusOnMount",Lo="focusScope.autoFocusOnUnmount",_c={bubbles:!1,cancelable:!0},um="FocusScope",jo=S.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,c]=S.useState(null),u=gt(o),l=gt(s),d=S.useRef(null),h=Ce(t,b=>c(b)),g=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(n){let b=function(f){if(g.paused||!i)return;const x=f.target;i.contains(x)?d.current=x:Rt(d.current,{select:!0})},m=function(f){if(g.paused||!i)return;const x=f.relatedTarget;x!==null&&(i.contains(x)||Rt(d.current,{select:!0}))},p=function(f){if(document.activeElement===document.body)for(const v of f)v.removedNodes.length>0&&Rt(i)};document.addEventListener("focusin",b),document.addEventListener("focusout",m);const y=new MutationObserver(p);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",m),y.disconnect()}}},[n,i,g.paused]),S.useEffect(()=>{if(i){Ac.add(g);const b=document.activeElement;if(!i.contains(b)){const p=new CustomEvent(Mo,_c);i.addEventListener(Mo,u),i.dispatchEvent(p),p.defaultPrevented||(lm(mm(Sc(i)),{select:!0}),document.activeElement===b&&Rt(i))}return()=>{i.removeEventListener(Mo,u),setTimeout(()=>{const p=new CustomEvent(Lo,_c);i.addEventListener(Lo,l),i.dispatchEvent(p),p.defaultPrevented||Rt(b??document.body,{select:!0}),i.removeEventListener(Lo,l),Ac.remove(g)},0)}}},[i,u,l,g]);const E=S.useCallback(b=>{if(!r&&!n||g.paused)return;const m=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,p=document.activeElement;if(m&&p){const y=b.currentTarget,[f,x]=dm(y);f&&x?!b.shiftKey&&p===x?(b.preventDefault(),r&&Rt(f,{select:!0})):b.shiftKey&&p===f&&(b.preventDefault(),r&&Rt(x,{select:!0})):p===y&&b.preventDefault()}},[r,n,g.paused]);return A.jsx(Se.div,{tabIndex:-1,...a,ref:h,onKeyDown:E})});jo.displayName=um;function lm(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Rt(n,{select:t}),document.activeElement!==r)return}function dm(e){const t=Sc(e),r=xc(t,e),n=xc(t.reverse(),e);return[r,n]}function Sc(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function xc(e,t){for(const r of e)if(!fm(r,{upTo:t}))return r}function fm(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function hm(e){return e instanceof HTMLInputElement&&"select"in e}function Rt(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&hm(e)&&t&&e.select()}}var Ac=pm();function pm(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Rc(e,t),e.unshift(t)},remove(t){var r;e=Rc(e,t),(r=e[0])==null||r.resume()}}}function Rc(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function mm(e){return e.filter(t=>t.tagName!=="A")}var gm="Portal",Ho=S.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[o,s]=S.useState(!1);At(()=>s(!0),[]);const a=r||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?Mt.createPortal(A.jsx(Se.div,{...n,ref:t}),a):null});Ho.displayName=gm;function ym(e,t){return S.useReducer((r,n)=>t[r][n]??r,e)}var yt=e=>{const{present:t,children:r}=e,n=bm(t),o=typeof r=="function"?r({present:n.isPresent}):S.Children.only(r),s=Ce(n.ref,wm(o));return typeof r=="function"||n.isPresent?S.cloneElement(o,{ref:s}):null};yt.displayName="Presence";function bm(e){const[t,r]=S.useState(),n=S.useRef(null),o=S.useRef(e),s=S.useRef("none"),a=e?"mounted":"unmounted",[i,c]=ym(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const u=cn(n.current);s.current=i==="mounted"?u:"none"},[i]),At(()=>{const u=n.current,l=o.current;if(l!==e){const h=s.current,g=cn(u);e?c("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(l&&h!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),At(()=>{if(t){let u;const l=t.ownerDocument.defaultView??window,d=g=>{const b=cn(n.current).includes(g.animationName);if(g.target===t&&b&&(c("ANIMATION_END"),!o.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",u=l.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},h=g=>{g.target===t&&(s.current=cn(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{l.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:S.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function cn(e){return(e==null?void 0:e.animationName)||"none"}function wm(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Uo=0;function Cc(){S.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Tc()),document.body.insertAdjacentElement("beforeend",e[1]??Tc()),Uo++,()=>{Uo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Uo--}},[])}function Tc(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var st=function(){return st=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},st.apply(this,arguments)};function Pc(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function vm(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var un="right-scroll-bar-position",ln="width-before-scroll-bar",Em="with-scroll-bars-hidden",_m="--removed-body-scroll-bar-size";function Wo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Sm(e,t){var r=K.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var xm=typeof window<"u"?S.useLayoutEffect:S.useEffect,Oc=new WeakMap;function Am(e,t){var r=Sm(null,function(n){return e.forEach(function(o){return Wo(o,n)})});return xm(function(){var n=Oc.get(r);if(n){var o=new Set(n),s=new Set(e),a=r.current;o.forEach(function(i){s.has(i)||Wo(i,null)}),s.forEach(function(i){o.has(i)||Wo(i,a)})}Oc.set(r,e)},[e]),r}function Rm(e){return e}function Cm(e,t){t===void 0&&(t=Rm);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var a=t(s,n);return r.push(a),function(){r=r.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(n=!0;r.length;){var a=r;r=[],a.forEach(s)}r={push:function(i){return s(i)},filter:function(){return r}}},assignMedium:function(s){n=!0;var a=[];if(r.length){var i=r;r=[],i.forEach(s),a=r}var c=function(){var l=a;a=[],l.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(l){a.push(l),u()},filter:function(l){return a=a.filter(l),r}}}};return o}function Tm(e){e===void 0&&(e={});var t=Cm(null);return t.options=st({async:!0,ssr:!1},e),t}var kc=function(e){var t=e.sideCar,r=Pc(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return S.createElement(n,st({},r))};kc.isSideCarExport=!0;function Pm(e,t){return e.useMedium(t),kc}var Nc=Tm(),$o=function(){},dn=S.forwardRef(function(e,t){var r=S.useRef(null),n=S.useState({onScrollCapture:$o,onWheelCapture:$o,onTouchMoveCapture:$o}),o=n[0],s=n[1],a=e.forwardProps,i=e.children,c=e.className,u=e.removeScrollBar,l=e.enabled,d=e.shards,h=e.sideCar,g=e.noRelative,E=e.noIsolation,b=e.inert,m=e.allowPinchZoom,p=e.as,y=p===void 0?"div":p,f=e.gapMode,x=Pc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),v=h,R=Am([r,t]),w=st(st({},x),o);return S.createElement(S.Fragment,null,l&&S.createElement(v,{sideCar:Nc,removeScrollBar:u,shards:d,noRelative:g,noIsolation:E,inert:b,setCallbacks:s,allowPinchZoom:!!m,lockRef:r,gapMode:f}),a?S.cloneElement(S.Children.only(i),st(st({},w),{ref:R})):S.createElement(y,st({},w,{className:c,ref:R}),i))});dn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},dn.classNames={fullWidth:ln,zeroRight:un};var Om=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function km(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Om();return t&&e.setAttribute("nonce",t),e}function Nm(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Im(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Dm=function(){var e=0,t=null;return{add:function(r){e==0&&(t=km())&&(Nm(t,r),Im(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Mm=function(){var e=Dm();return function(t,r){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Ic=function(){var e=Mm(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Lm={left:0,top:0,right:0,gap:0},Fo=function(e){return parseInt(e||"",10)||0},jm=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Fo(r),Fo(n),Fo(o)]},Hm=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Lm;var t=jm(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Um=Ic(),sr="data-scroll-locked",Wm=function(e,t,r,n){var o=e.left,s=e.top,a=e.right,i=e.gap;return r===void 0&&(r="margin"),`
114
+ .`.concat(Em,` {
115
+ overflow: hidden `).concat(n,`;
116
+ padding-right: `).concat(i,"px ").concat(n,`;
117
117
  }
118
- body[`).concat(st,`] {
119
- overflow: hidden `).concat(r,`;
118
+ body[`).concat(sr,`] {
119
+ overflow: hidden `).concat(n,`;
120
120
  overscroll-behavior: contain;
121
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
121
+ `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
122
122
  padding-left: `.concat(o,`px;
123
123
  padding-top: `).concat(s,`px;
124
124
  padding-right: `).concat(a,`px;
125
125
  margin-left:0;
126
126
  margin-top:0;
127
- margin-right: `).concat(i,"px ").concat(r,`;
128
- `),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
127
+ margin-right: `).concat(i,"px ").concat(n,`;
128
+ `),r==="padding"&&"padding-right: ".concat(i,"px ").concat(n,";")].filter(Boolean).join(""),`
129
129
  }
130
130
 
131
- .`).concat($t,` {
132
- right: `).concat(i,"px ").concat(r,`;
131
+ .`).concat(un,` {
132
+ right: `).concat(i,"px ").concat(n,`;
133
133
  }
134
134
 
135
- .`).concat(Vt,` {
136
- margin-right: `).concat(i,"px ").concat(r,`;
135
+ .`).concat(ln,` {
136
+ margin-right: `).concat(i,"px ").concat(n,`;
137
137
  }
138
138
 
139
- .`).concat($t," .").concat($t,` {
140
- right: 0 `).concat(r,`;
139
+ .`).concat(un," .").concat(un,` {
140
+ right: 0 `).concat(n,`;
141
141
  }
142
142
 
143
- .`).concat(Vt," .").concat(Vt,` {
144
- margin-right: 0 `).concat(r,`;
143
+ .`).concat(ln," .").concat(ln,` {
144
+ margin-right: 0 `).concat(n,`;
145
145
  }
146
146
 
147
- body[`).concat(st,`] {
148
- `).concat(Sl,": ").concat(i,`px;
147
+ body[`).concat(sr,`] {
148
+ `).concat(_m,": ").concat(i,`px;
149
149
  }
150
- `)},qo=function(){var e=parseInt(document.body.getAttribute(st)||"0",10);return isFinite(e)?e:0},zl=function(){l.useEffect(function(){return document.body.setAttribute(st,(qo()+1).toString()),function(){var e=qo()-1;e<=0?document.body.removeAttribute(st):document.body.setAttribute(st,e.toString())}},[])},Bl=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;zl();var s=l.useMemo(function(){return Vl(o)},[o]);return l.createElement(Hl,{styles:Wl(s,!t,o,n?"":"!important")})},Kn=!1;if(typeof window<"u")try{var Wt=Object.defineProperty({},"passive",{get:function(){return Kn=!0,!0}});window.addEventListener("test",Wt,Wt),window.removeEventListener("test",Wt,Wt)}catch{Kn=!1}var at=Kn?{passive:!1}:!1,Gl=function(e){return e.tagName==="TEXTAREA"},Xo=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Gl(e)&&n[t]==="visible")},Ul=function(e){return Xo(e,"overflowY")},Kl=function(e){return Xo(e,"overflowX")},Zo=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Jo(e,r);if(o){var s=Qo(e,r),a=s[1],i=s[2];if(a>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Yl=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ql=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Jo=function(e,t){return e==="v"?Ul(t):Kl(t)},Qo=function(e,t){return e==="v"?Yl(t):ql(t)},Xl=function(e,t){return e==="h"&&t==="rtl"?-1:1},Zl=function(e,t,n,r,o){var s=Xl(e,window.getComputedStyle(t).direction),a=s*r,i=n.target,c=t.contains(i),f=!1,u=a>0,d=0,m=0;do{if(!i)break;var g=Qo(e,i),b=g[0],h=g[1],x=g[2],v=h-x-s*b;(b||v)&&Jo(e,i)&&(d+=v,m+=b);var y=i.parentNode;i=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(u&&Math.abs(d)<1||!u&&Math.abs(m)<1)&&(f=!0),f},zt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},es=function(e){return[e.deltaX,e.deltaY]},ts=function(e){return e&&"current"in e?e.current:e},Jl=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ql=function(e){return`
150
+ `)},Dc=function(){var e=parseInt(document.body.getAttribute(sr)||"0",10);return isFinite(e)?e:0},$m=function(){S.useEffect(function(){return document.body.setAttribute(sr,(Dc()+1).toString()),function(){var e=Dc()-1;e<=0?document.body.removeAttribute(sr):document.body.setAttribute(sr,e.toString())}},[])},Fm=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;$m();var s=S.useMemo(function(){return Hm(o)},[o]);return S.createElement(Um,{styles:Wm(s,!t,o,r?"":"!important")})},Ko=!1;if(typeof window<"u")try{var fn=Object.defineProperty({},"passive",{get:function(){return Ko=!0,!0}});window.addEventListener("test",fn,fn),window.removeEventListener("test",fn,fn)}catch{Ko=!1}var ar=Ko?{passive:!1}:!1,Km=function(e){return e.tagName==="TEXTAREA"},Mc=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Km(e)&&r[t]==="visible")},qm=function(e){return Mc(e,"overflowY")},Gm=function(e){return Mc(e,"overflowX")},Lc=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=jc(e,n);if(o){var s=Hc(e,n),a=s[1],i=s[2];if(a>i)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Bm=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},zm=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},jc=function(e,t){return e==="v"?qm(t):Gm(t)},Hc=function(e,t){return e==="v"?Bm(t):zm(t)},Vm=function(e,t){return e==="h"&&t==="rtl"?-1:1},Jm=function(e,t,r,n,o){var s=Vm(e,window.getComputedStyle(t).direction),a=s*n,i=r.target,c=t.contains(i),u=!1,l=a>0,d=0,h=0;do{if(!i)break;var g=Hc(e,i),E=g[0],b=g[1],m=g[2],p=b-m-s*E;(E||p)&&jc(e,i)&&(d+=p,h+=E);var y=i.parentNode;i=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(l&&Math.abs(d)<1||!l&&Math.abs(h)<1)&&(u=!0),u},hn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Uc=function(e){return[e.deltaX,e.deltaY]},Wc=function(e){return e&&"current"in e?e.current:e},Xm=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ym=function(e){return`
151
151
  .block-interactivity-`.concat(e,` {pointer-events: none;}
152
152
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
153
- `)},eu=0,it=[];function tu(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState(eu++)[0],s=l.useState(Yo)[0],a=l.useRef(e);l.useEffect(function(){a.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Cl([e.lockRef.current],(e.shards||[]).map(ts),!0).filter(Boolean);return h.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=l.useCallback(function(h,x){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var v=zt(h),y=n.current,E="deltaX"in h?h.deltaX:y[0]-v[0],S="deltaY"in h?h.deltaY:y[1]-v[1],_,M=h.target,A=Math.abs(E)>Math.abs(S)?"h":"v";if("touches"in h&&A==="h"&&M.type==="range")return!1;var C=Zo(A,M);if(!C)return!0;if(C?_=A:(_=A==="v"?"h":"v",C=Zo(A,M)),!C)return!1;if(!r.current&&"changedTouches"in h&&(E||S)&&(r.current=_),!_)return!0;var I=r.current||_;return Zl(I,x,h,I==="h"?E:S)},[]),c=l.useCallback(function(h){var x=h;if(!(!it.length||it[it.length-1]!==s)){var v="deltaY"in x?es(x):zt(x),y=t.current.filter(function(_){return _.name===x.type&&(_.target===x.target||x.target===_.shadowParent)&&Jl(_.delta,v)})[0];if(y&&y.should){x.cancelable&&x.preventDefault();return}if(!y){var E=(a.current.shards||[]).map(ts).filter(Boolean).filter(function(_){return _.contains(x.target)}),S=E.length>0?i(x,E[0]):!a.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),f=l.useCallback(function(h,x,v,y){var E={name:h,delta:x,target:v,should:y,shadowParent:nu(v)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(S){return S!==E})},1)},[]),u=l.useCallback(function(h){n.current=zt(h),r.current=void 0},[]),d=l.useCallback(function(h){f(h.type,es(h),h.target,i(h,e.lockRef.current))},[]),m=l.useCallback(function(h){f(h.type,zt(h),h.target,i(h,e.lockRef.current))},[]);l.useEffect(function(){return it.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",c,at),document.addEventListener("touchmove",c,at),document.addEventListener("touchstart",u,at),function(){it=it.filter(function(h){return h!==s}),document.removeEventListener("wheel",c,at),document.removeEventListener("touchmove",c,at),document.removeEventListener("touchstart",u,at)}},[]);var g=e.removeScrollBar,b=e.inert;return l.createElement(l.Fragment,null,b?l.createElement(s,{styles:Ql(o)}):null,g?l.createElement(Bl,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function nu(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ru=Pl(Ko,tu);var Yn=l.forwardRef(function(e,t){return l.createElement(Ht,Se({},e,{ref:t,sideCar:ru}))});Yn.classNames=Ht.classNames;var ou=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ct=new WeakMap,Bt=new WeakMap,Gt={},qn=0,ns=function(e){return e&&(e.host||ns(e.parentNode))},su=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ns(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},au=function(e,t,n,r){var o=su(t,Array.isArray(e)?e:[e]);Gt[n]||(Gt[n]=new WeakMap);var s=Gt[n],a=[],i=new Set,c=new Set(o),f=function(d){!d||i.has(d)||(i.add(d),f(d.parentNode))};o.forEach(f);var u=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(m){if(i.has(m))u(m);else try{var g=m.getAttribute(r),b=g!==null&&g!=="false",h=(ct.get(m)||0)+1,x=(s.get(m)||0)+1;ct.set(m,h),s.set(m,x),a.push(m),h===1&&b&&Bt.set(m,!0),x===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",m,v)}})};return u(t),i.clear(),qn++,function(){a.forEach(function(d){var m=ct.get(d)-1,g=s.get(d)-1;ct.set(d,m),s.set(d,g),m||(Bt.has(d)||d.removeAttribute(r),Bt.delete(d)),g||d.removeAttribute(n)}),qn--,qn||(ct=new WeakMap,ct=new WeakMap,Bt=new WeakMap,Gt={})}},rs=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=ou(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),au(r,o,n,"aria-hidden")):function(){return null}},Ut="Dialog",[os,C0]=qe(Ut),[iu,we]=os(Ut),ss=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,i=l.useRef(null),c=l.useRef(null),[f,u]=Ln({prop:r,defaultProp:o??!1,onChange:s,caller:Ut});return p.jsx(iu,{scope:t,triggerRef:i,contentRef:c,contentId:ot(),titleId:ot(),descriptionId:ot(),open:f,onOpenChange:u,onOpenToggle:l.useCallback(()=>u(d=>!d),[u]),modal:a,children:n})};ss.displayName=Ut;var as="DialogTrigger",cu=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=we(as,n),s=ae(t,o.triggerRef);return p.jsx(ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Jn(o.open),...r,ref:s,onClick:L(e.onClick,o.onOpenToggle)})});cu.displayName=as;var Xn="DialogPortal",[lu,is]=os(Xn,{forceMount:void 0}),cs=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=we(Xn,t);return p.jsx(lu,{scope:t,forceMount:n,children:l.Children.map(r,a=>p.jsx(ke,{present:n||s.open,children:p.jsx(Wn,{asChild:!0,container:o,children:a})}))})};cs.displayName=Xn;var Kt="DialogOverlay",ls=l.forwardRef((e,t)=>{const n=is(Kt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=we(Kt,e.__scopeDialog);return s.modal?p.jsx(ke,{present:r||s.open,children:p.jsx(du,{...o,ref:t})}):null});ls.displayName=Kt;var uu=et("DialogOverlay.RemoveScroll"),du=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=we(Kt,n);return p.jsx(Yn,{as:uu,allowPinchZoom:!0,shards:[o.contentRef],children:p.jsx(ne.div,{"data-state":Jn(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Xe="DialogContent",us=l.forwardRef((e,t)=>{const n=is(Xe,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=we(Xe,e.__scopeDialog);return p.jsx(ke,{present:r||s.open,children:s.modal?p.jsx(fu,{...o,ref:t}):p.jsx(pu,{...o,ref:t})})});us.displayName=Xe;var fu=l.forwardRef((e,t)=>{const n=we(Xe,e.__scopeDialog),r=l.useRef(null),o=ae(t,n.contentRef,r);return l.useEffect(()=>{const s=r.current;if(s)return rs(s)},[]),p.jsx(ds,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:L(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:L(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&s.preventDefault()}),onFocusOutside:L(e.onFocusOutside,s=>s.preventDefault())})}),pu=l.forwardRef((e,t)=>{const n=we(Xe,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return p.jsx(ds,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,i;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var c,f;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;((f=n.triggerRef.current)==null?void 0:f.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),ds=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=e,i=we(Xe,n),c=l.useRef(null),f=ae(t,c);return Wo(),p.jsxs(p.Fragment,{children:[p.jsx(Hn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:p.jsx(Lt,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Jn(i.open),...a,ref:f,onDismiss:()=>i.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(mu,{titleId:i.titleId}),p.jsx(gu,{contentRef:c,descriptionId:i.descriptionId})]})]})}),Zn="DialogTitle",fs=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=we(Zn,n);return p.jsx(ne.h2,{id:o.titleId,...r,ref:t})});fs.displayName=Zn;var ps="DialogDescription",ms=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=we(ps,n);return p.jsx(ne.p,{id:o.descriptionId,...r,ref:t})});ms.displayName=ps;var hs="DialogClose",gs=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=we(hs,n);return p.jsx(ne.button,{type:"button",...r,ref:t,onClick:L(e.onClick,()=>o.onOpenChange(!1))})});gs.displayName=hs;function Jn(e){return e?"open":"closed"}var vs="DialogTitleWarning",[E0,bs]=Xc(vs,{contentName:Xe,titleName:Zn,docsSlug:"dialog"}),mu=({titleId:e})=>{const t=bs(vs),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
153
+ `)},Zm=0,ir=[];function Qm(e){var t=S.useRef([]),r=S.useRef([0,0]),n=S.useRef(),o=S.useState(Zm++)[0],s=S.useState(Ic)[0],a=S.useRef(e);S.useEffect(function(){a.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var b=vm([e.lockRef.current],(e.shards||[]).map(Wc),!0).filter(Boolean);return b.forEach(function(m){return m.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),b.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=S.useCallback(function(b,m){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!a.current.allowPinchZoom;var p=hn(b),y=r.current,f="deltaX"in b?b.deltaX:y[0]-p[0],x="deltaY"in b?b.deltaY:y[1]-p[1],v,R=b.target,w=Math.abs(f)>Math.abs(x)?"h":"v";if("touches"in b&&w==="h"&&R.type==="range")return!1;var _=Lc(w,R);if(!_)return!0;if(_?v=w:(v=w==="v"?"h":"v",_=Lc(w,R)),!_)return!1;if(!n.current&&"changedTouches"in b&&(f||x)&&(n.current=v),!v)return!0;var C=n.current||v;return Jm(C,m,b,C==="h"?f:x)},[]),c=S.useCallback(function(b){var m=b;if(!(!ir.length||ir[ir.length-1]!==s)){var p="deltaY"in m?Uc(m):hn(m),y=t.current.filter(function(v){return v.name===m.type&&(v.target===m.target||m.target===v.shadowParent)&&Xm(v.delta,p)})[0];if(y&&y.should){m.cancelable&&m.preventDefault();return}if(!y){var f=(a.current.shards||[]).map(Wc).filter(Boolean).filter(function(v){return v.contains(m.target)}),x=f.length>0?i(m,f[0]):!a.current.noIsolation;x&&m.cancelable&&m.preventDefault()}}},[]),u=S.useCallback(function(b,m,p,y){var f={name:b,delta:m,target:p,should:y,shadowParent:eg(p)};t.current.push(f),setTimeout(function(){t.current=t.current.filter(function(x){return x!==f})},1)},[]),l=S.useCallback(function(b){r.current=hn(b),n.current=void 0},[]),d=S.useCallback(function(b){u(b.type,Uc(b),b.target,i(b,e.lockRef.current))},[]),h=S.useCallback(function(b){u(b.type,hn(b),b.target,i(b,e.lockRef.current))},[]);S.useEffect(function(){return ir.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",c,ar),document.addEventListener("touchmove",c,ar),document.addEventListener("touchstart",l,ar),function(){ir=ir.filter(function(b){return b!==s}),document.removeEventListener("wheel",c,ar),document.removeEventListener("touchmove",c,ar),document.removeEventListener("touchstart",l,ar)}},[]);var g=e.removeScrollBar,E=e.inert;return S.createElement(S.Fragment,null,E?S.createElement(s,{styles:Ym(o)}):null,g?S.createElement(Fm,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function eg(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const tg=Pm(Nc,Qm);var qo=S.forwardRef(function(e,t){return S.createElement(dn,st({},e,{ref:t,sideCar:tg}))});qo.classNames=dn.classNames;var rg=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},cr=new WeakMap,pn=new WeakMap,mn={},Go=0,$c=function(e){return e&&(e.host||$c(e.parentNode))},ng=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=$c(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},og=function(e,t,r,n){var o=ng(t,Array.isArray(e)?e:[e]);mn[r]||(mn[r]=new WeakMap);var s=mn[r],a=[],i=new Set,c=new Set(o),u=function(d){!d||i.has(d)||(i.add(d),u(d.parentNode))};o.forEach(u);var l=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(h){if(i.has(h))l(h);else try{var g=h.getAttribute(n),E=g!==null&&g!=="false",b=(cr.get(h)||0)+1,m=(s.get(h)||0)+1;cr.set(h,b),s.set(h,m),a.push(h),b===1&&E&&pn.set(h,!0),m===1&&h.setAttribute(r,"true"),E||h.setAttribute(n,"true")}catch(p){console.error("aria-hidden: cannot operate on ",h,p)}})};return l(t),i.clear(),Go++,function(){a.forEach(function(d){var h=cr.get(d)-1,g=s.get(d)-1;cr.set(d,h),s.set(d,g),h||(pn.has(d)||d.removeAttribute(n),pn.delete(d)),g||d.removeAttribute(r)}),Go--,Go||(cr=new WeakMap,cr=new WeakMap,pn=new WeakMap,mn={})}},Fc=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=rg(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),og(n,o,r,"aria-hidden")):function(){return null}},gn="Dialog",[Kc,_S]=Ht(gn),[sg,tt]=Kc(gn),qc=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,i=S.useRef(null),c=S.useRef(null),[u,l]=Io({prop:n,defaultProp:o??!1,onChange:s,caller:gn});return A.jsx(sg,{scope:t,triggerRef:i,contentRef:c,contentId:or(),titleId:or(),descriptionId:or(),open:u,onOpenChange:l,onOpenToggle:S.useCallback(()=>l(d=>!d),[l]),modal:a,children:r})};qc.displayName=gn;var Gc="DialogTrigger",ag=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=tt(Gc,r),s=Ce(t,o.triggerRef);return A.jsx(Se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Vo(o.open),...n,ref:s,onClick:X(e.onClick,o.onOpenToggle)})});ag.displayName=Gc;var Bo="DialogPortal",[ig,Bc]=Kc(Bo,{forceMount:void 0}),zc=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,s=tt(Bo,t);return A.jsx(ig,{scope:t,forceMount:r,children:S.Children.map(n,a=>A.jsx(yt,{present:r||s.open,children:A.jsx(Ho,{asChild:!0,container:o,children:a})}))})};zc.displayName=Bo;var yn="DialogOverlay",Vc=S.forwardRef((e,t)=>{const r=Bc(yn,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,s=tt(yn,e.__scopeDialog);return s.modal?A.jsx(yt,{present:n||s.open,children:A.jsx(ug,{...o,ref:t})}):null});Vc.displayName=yn;var cg=er("DialogOverlay.RemoveScroll"),ug=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=tt(yn,r);return A.jsx(qo,{as:cg,allowPinchZoom:!0,shards:[o.contentRef],children:A.jsx(Se.div,{"data-state":Vo(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Ut="DialogContent",Jc=S.forwardRef((e,t)=>{const r=Bc(Ut,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,s=tt(Ut,e.__scopeDialog);return A.jsx(yt,{present:n||s.open,children:s.modal?A.jsx(lg,{...o,ref:t}):A.jsx(dg,{...o,ref:t})})});Jc.displayName=Ut;var lg=S.forwardRef((e,t)=>{const r=tt(Ut,e.__scopeDialog),n=S.useRef(null),o=Ce(t,r.contentRef,n);return S.useEffect(()=>{const s=n.current;if(s)return Fc(s)},[]),A.jsx(Xc,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:X(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:X(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&s.preventDefault()}),onFocusOutside:X(e.onFocusOutside,s=>s.preventDefault())})}),dg=S.forwardRef((e,t)=>{const r=tt(Ut,e.__scopeDialog),n=S.useRef(!1),o=S.useRef(!1);return A.jsx(Xc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,i;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;((u=r.triggerRef.current)==null?void 0:u.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Xc=S.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=e,i=tt(Ut,r),c=S.useRef(null),u=Ce(t,c);return Cc(),A.jsxs(A.Fragment,{children:[A.jsx(jo,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:A.jsx(an,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Vo(i.open),...a,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),A.jsxs(A.Fragment,{children:[A.jsx(fg,{titleId:i.titleId}),A.jsx(pg,{contentRef:c,descriptionId:i.descriptionId})]})]})}),zo="DialogTitle",Yc=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=tt(zo,r);return A.jsx(Se.h2,{id:o.titleId,...n,ref:t})});Yc.displayName=zo;var Zc="DialogDescription",Qc=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=tt(Zc,r);return A.jsx(Se.p,{id:o.descriptionId,...n,ref:t})});Qc.displayName=Zc;var eu="DialogClose",tu=S.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=tt(eu,r);return A.jsx(Se.button,{type:"button",...n,ref:t,onClick:X(e.onClick,()=>o.onOpenChange(!1))})});tu.displayName=eu;function Vo(e){return e?"open":"closed"}var ru="DialogTitleWarning",[SS,nu]=Vp(ru,{contentName:Ut,titleName:zo,docsSlug:"dialog"}),fg=({titleId:e})=>{const t=nu(ru),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
154
154
 
155
155
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
156
156
 
157
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},hu="DialogDescriptionWarning",gu=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${bs(hu).contentName}}.`;return l.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},vu=ss,bu=cs,xs=ls,ws=us,ys=fs,Cs=ms,xu=gs;const wu=vu,yu=bu,Es=l.forwardRef(({className:e,...t},n)=>p.jsx(xs,{className:B("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));Es.displayName=xs.displayName;const Cu=po("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Ss=l.forwardRef(({side:e="right",className:t,children:n,...r},o)=>p.jsxs(yu,{children:[p.jsx(Es,{}),p.jsxs(ws,{ref:o,className:B(Cu({side:e}),t),...r,children:[n,p.jsxs(xu,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[p.jsx(sc,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ss.displayName=ws.displayName;const Rs=({className:e,...t})=>p.jsx("div",{className:B("flex flex-col space-y-2 text-center sm:text-left",e),...t});Rs.displayName="SheetHeader";const _s=l.forwardRef(({className:e,...t},n)=>p.jsx(ys,{ref:n,className:B("text-lg font-semibold text-foreground",e),...t}));_s.displayName=ys.displayName;const As=l.forwardRef(({className:e,...t},n)=>p.jsx(Cs,{ref:n,className:B("text-sm text-muted-foreground",e),...t}));As.displayName=Cs.displayName;const Eu=["top","right","bottom","left"],ze=Math.min,pe=Math.max,Yt=Math.round,qt=Math.floor,Re=e=>({x:e,y:e}),Su={left:"right",right:"left",bottom:"top",top:"bottom"},Ru={start:"end",end:"start"};function Qn(e,t,n){return pe(e,ze(t,n))}function Ie(e,t){return typeof e=="function"?e(t):e}function De(e){return e.split("-")[0]}function lt(e){return e.split("-")[1]}function er(e){return e==="x"?"y":"x"}function tr(e){return e==="y"?"height":"width"}function _e(e){return["top","bottom"].includes(De(e))?"y":"x"}function nr(e){return er(_e(e))}function _u(e,t,n){n===void 0&&(n=!1);const r=lt(e),o=nr(e),s=tr(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Xt(a)),[a,Xt(a)]}function Au(e){const t=Xt(e);return[rr(e),t,rr(t)]}function rr(e){return e.replace(/start|end/g,t=>Ru[t])}function Mu(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:a;default:return[]}}function Ou(e,t,n,r){const o=lt(e);let s=Mu(De(e),n==="start",r);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(rr)))),s}function Xt(e){return e.replace(/left|right|bottom|top/g,t=>Su[t])}function Tu(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ms(e){return typeof e!="number"?Tu(e):{top:e,right:e,bottom:e,left:e}}function Zt(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Os(e,t,n){let{reference:r,floating:o}=e;const s=_e(t),a=nr(t),i=tr(a),c=De(t),f=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,m=r[i]/2-o[i]/2;let g;switch(c){case"top":g={x:u,y:r.y-o.height};break;case"bottom":g={x:u,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:d};break;case"left":g={x:r.x-o.width,y:d};break;default:g={x:r.x,y:r.y}}switch(lt(t)){case"start":g[a]-=m*(n&&f?-1:1);break;case"end":g[a]+=m*(n&&f?-1:1);break}return g}const Pu=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:a}=n,i=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let f=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Os(f,r,c),m=r,g={},b=0;for(let h=0;h<i.length;h++){const{name:x,fn:v}=i[h],{x:y,y:E,data:S,reset:_}=await v({x:u,y:d,initialPlacement:r,placement:m,strategy:o,middlewareData:g,rects:f,platform:a,elements:{reference:e,floating:t}});u=y??u,d=E??d,g={...g,[x]:{...g[x],...S}},_&&b<=50&&(b++,typeof _=="object"&&(_.placement&&(m=_.placement),_.rects&&(f=_.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:u,y:d}=Os(f,m,c)),h=-1)}return{x:u,y:d,placement:m,strategy:o,middlewareData:g}};async function xt(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:a,elements:i,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:m=!1,padding:g=0}=Ie(t,e),b=Ms(g),x=i[m?d==="floating"?"reference":"floating":d],v=Zt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:f,rootBoundary:u,strategy:c})),y=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),S=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},_=Zt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:E,strategy:c}):y);return{top:(v.top-_.top+b.top)/S.y,bottom:(_.bottom-v.bottom+b.bottom)/S.y,left:(v.left-_.left+b.left)/S.x,right:(_.right-v.right+b.right)/S.x}}const Nu=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:a,elements:i,middlewareData:c}=t,{element:f,padding:u=0}=Ie(e,t)||{};if(f==null)return{};const d=Ms(u),m={x:n,y:r},g=nr(o),b=tr(g),h=await a.getDimensions(f),x=g==="y",v=x?"top":"left",y=x?"bottom":"right",E=x?"clientHeight":"clientWidth",S=s.reference[b]+s.reference[g]-m[g]-s.floating[b],_=m[g]-s.reference[g],M=await(a.getOffsetParent==null?void 0:a.getOffsetParent(f));let A=M?M[E]:0;(!A||!await(a.isElement==null?void 0:a.isElement(M)))&&(A=i.floating[E]||s.floating[b]);const C=S/2-_/2,I=A/2-h[b]/2-1,D=ze(d[v],I),G=ze(d[y],I),z=D,V=A-h[b]-G,H=A/2-h[b]/2+C,q=Qn(z,H,V),F=!c.arrow&&lt(o)!=null&&H!==q&&s.reference[b]/2-(H<z?D:G)-h[b]/2<0,U=F?H<z?H-z:H-V:0;return{[g]:m[g]+U,data:{[g]:q,centerOffset:H-q-U,...F&&{alignmentOffset:U}},reset:F}}}),ku=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:c,elements:f}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:h=!0,...x}=Ie(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=De(o),y=_e(i),E=De(i)===i,S=await(c.isRTL==null?void 0:c.isRTL(f.floating)),_=m||(E||!h?[Xt(i)]:Au(i)),M=b!=="none";!m&&M&&_.push(...Ou(i,h,b,S));const A=[i,..._],C=await xt(t,x),I=[];let D=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&I.push(C[v]),d){const H=_u(o,a,S);I.push(C[H[0]],C[H[1]])}if(D=[...D,{placement:o,overflows:I}],!I.every(H=>H<=0)){var G,z;const H=(((G=s.flip)==null?void 0:G.index)||0)+1,q=A[H];if(q&&(!(d==="alignment"?y!==_e(q):!1)||D.every(R=>R.overflows[0]>0&&_e(R.placement)===y)))return{data:{index:H,overflows:D},reset:{placement:q}};let F=(z=D.filter(U=>U.overflows[0]<=0).sort((U,R)=>U.overflows[1]-R.overflows[1])[0])==null?void 0:z.placement;if(!F)switch(g){case"bestFit":{var V;const U=(V=D.filter(R=>{if(M){const O=_e(R.placement);return O===y||O==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(O=>O>0).reduce((O,w)=>O+w,0)]).sort((R,O)=>R[1]-O[1])[0])==null?void 0:V[0];U&&(F=U);break}case"initialPlacement":F=i;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function Ts(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ps(e){return Eu.some(t=>e[t]>=0)}const Iu=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Ie(e,t);switch(r){case"referenceHidden":{const s=await xt(t,{...o,elementContext:"reference"}),a=Ts(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Ps(a)}}}case"escaped":{const s=await xt(t,{...o,altBoundary:!0}),a=Ts(s,n.floating);return{data:{escapedOffsets:a,escaped:Ps(a)}}}default:return{}}}}};async function Du(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=De(n),i=lt(n),c=_e(n)==="y",f=["left","top"].includes(a)?-1:1,u=s&&c?-1:1,d=Ie(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof b=="number"&&(g=i==="end"?b*-1:b),c?{x:g*u,y:m*f}:{x:m*f,y:g*u}}const ju=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:a,middlewareData:i}=t,c=await Du(t,e);return a===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},Lu=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:x=>{let{x:v,y}=x;return{x:v,y}}},...c}=Ie(e,t),f={x:n,y:r},u=await xt(t,c),d=_e(De(o)),m=er(d);let g=f[m],b=f[d];if(s){const x=m==="y"?"top":"left",v=m==="y"?"bottom":"right",y=g+u[x],E=g-u[v];g=Qn(y,g,E)}if(a){const x=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=b+u[x],E=b-u[v];b=Qn(y,b,E)}const h=i.fn({...t,[m]:g,[d]:b});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[m]:s,[d]:a}}}}}},Fu=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:c=!0,crossAxis:f=!0}=Ie(e,t),u={x:n,y:r},d=_e(o),m=er(d);let g=u[m],b=u[d];const h=Ie(i,t),x=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const E=m==="y"?"height":"width",S=s.reference[m]-s.floating[E]+x.mainAxis,_=s.reference[m]+s.reference[E]-x.mainAxis;g<S?g=S:g>_&&(g=_)}if(f){var v,y;const E=m==="y"?"width":"height",S=["top","left"].includes(De(o)),_=s.reference[d]-s.floating[E]+(S&&((v=a.offset)==null?void 0:v[d])||0)+(S?0:x.crossAxis),M=s.reference[d]+s.reference[E]+(S?0:((y=a.offset)==null?void 0:y[d])||0)-(S?x.crossAxis:0);b<_?b=_:b>M&&(b=M)}return{[m]:g,[d]:b}}}},$u=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:a,elements:i}=t,{apply:c=()=>{},...f}=Ie(e,t),u=await xt(t,f),d=De(o),m=lt(o),g=_e(o)==="y",{width:b,height:h}=s.floating;let x,v;d==="top"||d==="bottom"?(x=d,v=m===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(v=d,x=m==="end"?"top":"bottom");const y=h-u.top-u.bottom,E=b-u.left-u.right,S=ze(h-u[x],y),_=ze(b-u[v],E),M=!t.middlewareData.shift;let A=S,C=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=E),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=y),M&&!m){const D=pe(u.left,0),G=pe(u.right,0),z=pe(u.top,0),V=pe(u.bottom,0);g?C=b-2*(D!==0||G!==0?D+G:pe(u.left,u.right)):A=h-2*(z!==0||V!==0?z+V:pe(u.top,u.bottom))}await c({...t,availableWidth:C,availableHeight:A});const I=await a.getDimensions(i.floating);return b!==I.width||h!==I.height?{reset:{rects:!0}}:{}}}};function Jt(){return typeof window<"u"}function ut(e){return Ns(e)?(e.nodeName||"").toLowerCase():"#document"}function me(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ae(e){var t;return(t=(Ns(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ns(e){return Jt()?e instanceof Node||e instanceof me(e).Node:!1}function ye(e){return Jt()?e instanceof Element||e instanceof me(e).Element:!1}function Me(e){return Jt()?e instanceof HTMLElement||e instanceof me(e).HTMLElement:!1}function ks(e){return!Jt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof me(e).ShadowRoot}function wt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ce(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Vu(e){return["table","td","th"].includes(ut(e))}function Qt(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function or(e){const t=sr(),n=ye(e)?Ce(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Hu(e){let t=Be(e);for(;Me(t)&&!dt(t);){if(or(t))return t;if(Qt(t))return null;t=Be(t)}return null}function sr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function dt(e){return["html","body","#document"].includes(ut(e))}function Ce(e){return me(e).getComputedStyle(e)}function en(e){return ye(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Be(e){if(ut(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ks(e)&&e.host||Ae(e);return ks(t)?t.host:t}function Is(e){const t=Be(e);return dt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Me(t)&&wt(t)?t:Is(t)}function yt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Is(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=me(o);if(s){const i=ar(a);return t.concat(a,a.visualViewport||[],wt(o)?o:[],i&&n?yt(i):[])}return t.concat(o,yt(o,[],n))}function ar(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ds(e){const t=Ce(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Me(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=Yt(n)!==s||Yt(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function ir(e){return ye(e)?e:e.contextElement}function ft(e){const t=ir(e);if(!Me(t))return Re(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Ds(t);let a=(s?Yt(n.width):n.width)/r,i=(s?Yt(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const Wu=Re(0);function js(e){const t=me(e);return!sr()||!t.visualViewport?Wu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function zu(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==me(e)?!1:t}function Ze(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=ir(e);let a=Re(1);t&&(r?ye(r)&&(a=ft(r)):a=ft(e));const i=zu(s,n,r)?js(s):Re(0);let c=(o.left+i.x)/a.x,f=(o.top+i.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(s){const m=me(s),g=r&&ye(r)?me(r):r;let b=m,h=ar(b);for(;h&&r&&g!==b;){const x=ft(h),v=h.getBoundingClientRect(),y=Ce(h),E=v.left+(h.clientLeft+parseFloat(y.paddingLeft))*x.x,S=v.top+(h.clientTop+parseFloat(y.paddingTop))*x.y;c*=x.x,f*=x.y,u*=x.x,d*=x.y,c+=E,f+=S,b=me(h),h=ar(b)}}return Zt({width:u,height:d,x:c,y:f})}function cr(e,t){const n=en(e).scrollLeft;return t?t.left+n:Ze(Ae(e)).left+n}function Ls(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:cr(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function Bu(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",a=Ae(r),i=t?Qt(t.floating):!1;if(r===a||i&&s)return n;let c={scrollLeft:0,scrollTop:0},f=Re(1);const u=Re(0),d=Me(r);if((d||!d&&!s)&&((ut(r)!=="body"||wt(a))&&(c=en(r)),Me(r))){const g=Ze(r);f=ft(r),u.x=g.x+r.clientLeft,u.y=g.y+r.clientTop}const m=a&&!d&&!s?Ls(a,c,!0):Re(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+u.x+m.x,y:n.y*f.y-c.scrollTop*f.y+u.y+m.y}}function Gu(e){return Array.from(e.getClientRects())}function Uu(e){const t=Ae(e),n=en(e),r=e.ownerDocument.body,o=pe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=pe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+cr(e);const i=-n.scrollTop;return Ce(r).direction==="rtl"&&(a+=pe(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:i}}function Ku(e,t){const n=me(e),r=Ae(e),o=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,i=0,c=0;if(o){s=o.width,a=o.height;const f=sr();(!f||f&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}return{width:s,height:a,x:i,y:c}}function Yu(e,t){const n=Ze(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Me(e)?ft(e):Re(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,c=o*s.x,f=r*s.y;return{width:a,height:i,x:c,y:f}}function Fs(e,t,n){let r;if(t==="viewport")r=Ku(e,n);else if(t==="document")r=Uu(Ae(e));else if(ye(t))r=Yu(t,n);else{const o=js(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Zt(r)}function $s(e,t){const n=Be(e);return n===t||!ye(n)||dt(n)?!1:Ce(n).position==="fixed"||$s(n,t)}function qu(e,t){const n=t.get(e);if(n)return n;let r=yt(e,[],!1).filter(i=>ye(i)&&ut(i)!=="body"),o=null;const s=Ce(e).position==="fixed";let a=s?Be(e):e;for(;ye(a)&&!dt(a);){const i=Ce(a),c=or(a);!c&&i.position==="fixed"&&(o=null),(s?!c&&!o:!c&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||wt(a)&&!c&&$s(e,a))?r=r.filter(u=>u!==a):o=i,a=Be(a)}return t.set(e,r),r}function Xu(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Qt(t)?[]:qu(t,this._c):[].concat(n),r],i=a[0],c=a.reduce((f,u)=>{const d=Fs(t,u,o);return f.top=pe(d.top,f.top),f.right=ze(d.right,f.right),f.bottom=ze(d.bottom,f.bottom),f.left=pe(d.left,f.left),f},Fs(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Zu(e){const{width:t,height:n}=Ds(e);return{width:t,height:n}}function Ju(e,t,n){const r=Me(t),o=Ae(t),s=n==="fixed",a=Ze(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const c=Re(0);function f(){c.x=cr(o)}if(r||!r&&!s)if((ut(t)!=="body"||wt(o))&&(i=en(t)),r){const g=Ze(t,!0,s,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else o&&f();s&&!r&&o&&f();const u=o&&!r&&!s?Ls(o,i):Re(0),d=a.left+i.scrollLeft-c.x-u.x,m=a.top+i.scrollTop-c.y-u.y;return{x:d,y:m,width:a.width,height:a.height}}function lr(e){return Ce(e).position==="static"}function Vs(e,t){if(!Me(e)||Ce(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ae(e)===n&&(n=n.ownerDocument.body),n}function Hs(e,t){const n=me(e);if(Qt(e))return n;if(!Me(e)){let o=Be(e);for(;o&&!dt(o);){if(ye(o)&&!lr(o))return o;o=Be(o)}return n}let r=Vs(e,t);for(;r&&Vu(r)&&lr(r);)r=Vs(r,t);return r&&dt(r)&&lr(r)&&!or(r)?n:r||Hu(e)||n}const Qu=async function(e){const t=this.getOffsetParent||Hs,n=this.getDimensions,r=await n(e.floating);return{reference:Ju(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ed(e){return Ce(e).direction==="rtl"}const td={convertOffsetParentRelativeRectToViewportRelativeRect:Bu,getDocumentElement:Ae,getClippingRect:Xu,getOffsetParent:Hs,getElementRects:Qu,getClientRects:Gu,getDimensions:Zu,getScale:ft,isElement:ye,isRTL:ed};function Ws(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function nd(e,t){let n=null,r;const o=Ae(e);function s(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const f=e.getBoundingClientRect(),{left:u,top:d,width:m,height:g}=f;if(i||t(),!m||!g)return;const b=qt(d),h=qt(o.clientWidth-(u+m)),x=qt(o.clientHeight-(d+g)),v=qt(u),E={rootMargin:-b+"px "+-h+"px "+-x+"px "+-v+"px",threshold:pe(0,ze(1,c))||1};let S=!0;function _(M){const A=M[0].intersectionRatio;if(A!==c){if(!S)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}A===1&&!Ws(f,e.getBoundingClientRect())&&a(),S=!1}try{n=new IntersectionObserver(_,{...E,root:o.ownerDocument})}catch{n=new IntersectionObserver(_,E)}n.observe(e)}return a(!0),s}function rd(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,f=ir(e),u=o||s?[...f?yt(f):[],...yt(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=f&&i?nd(f,n):null;let m=-1,g=null;a&&(g=new ResizeObserver(v=>{let[y]=v;y&&y.target===f&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var E;(E=g)==null||E.observe(t)})),n()}),f&&!c&&g.observe(f),g.observe(t));let b,h=c?Ze(e):null;c&&x();function x(){const v=Ze(e);h&&!Ws(h,v)&&n(),h=v,b=requestAnimationFrame(x)}return n(),()=>{var v;u.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),d==null||d(),(v=g)==null||v.disconnect(),g=null,c&&cancelAnimationFrame(b)}}const od=ju,sd=Lu,ad=ku,id=$u,cd=Iu,zs=Nu,ld=Fu,ud=(e,t,n)=>{const r=new Map,o={platform:td,...n},s={...o.platform,_c:r};return Pu(e,t,{...o,platform:s})};var dd=typeof document<"u",fd=function(){},tn=dd?k.useLayoutEffect:fd;function nn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!nn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!nn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Bs(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gs(e,t){const n=Bs(e);return Math.round(t*n)/n}function ur(e){const t=l.useRef(e);return tn(()=>{t.current=e}),t}function pd(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:c,open:f}=e,[u,d]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=l.useState(r);nn(m,r)||g(r);const[b,h]=l.useState(null),[x,v]=l.useState(null),y=l.useCallback(R=>{R!==M.current&&(M.current=R,h(R))},[]),E=l.useCallback(R=>{R!==A.current&&(A.current=R,v(R))},[]),S=s||b,_=a||x,M=l.useRef(null),A=l.useRef(null),C=l.useRef(u),I=c!=null,D=ur(c),G=ur(o),z=ur(f),V=l.useCallback(()=>{if(!M.current||!A.current)return;const R={placement:t,strategy:n,middleware:m};G.current&&(R.platform=G.current),ud(M.current,A.current,R).then(O=>{const w={...O,isPositioned:z.current!==!1};H.current&&!nn(C.current,w)&&(C.current=w,Tr.flushSync(()=>{d(w)}))})},[m,t,n,G,z]);tn(()=>{f===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(R=>({...R,isPositioned:!1})))},[f]);const H=l.useRef(!1);tn(()=>(H.current=!0,()=>{H.current=!1}),[]),tn(()=>{if(S&&(M.current=S),_&&(A.current=_),S&&_){if(D.current)return D.current(S,_,V);V()}},[S,_,V,D,I]);const q=l.useMemo(()=>({reference:M,floating:A,setReference:y,setFloating:E}),[y,E]),F=l.useMemo(()=>({reference:S,floating:_}),[S,_]),U=l.useMemo(()=>{const R={position:n,left:0,top:0};if(!F.floating)return R;const O=Gs(F.floating,u.x),w=Gs(F.floating,u.y);return i?{...R,transform:"translate("+O+"px, "+w+"px)",...Bs(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:w}},[n,i,F.floating,u.x,u.y]);return l.useMemo(()=>({...u,update:V,refs:q,elements:F,floatingStyles:U}),[u,V,q,F,U])}const md=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?zs({element:r.current,padding:o}).fn(n):{}:r?zs({element:r,padding:o}).fn(n):{}}}},hd=(e,t)=>({...od(e),options:[e,t]}),gd=(e,t)=>({...sd(e),options:[e,t]}),vd=(e,t)=>({...ld(e),options:[e,t]}),bd=(e,t)=>({...ad(e),options:[e,t]}),xd=(e,t)=>({...id(e),options:[e,t]}),wd=(e,t)=>({...cd(e),options:[e,t]}),yd=(e,t)=>({...md(e),options:[e,t]});var Cd="Arrow",Us=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return p.jsx(ne.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Us.displayName=Cd;var Ed=Us;function Sd(e){const[t,n]=l.useState(void 0);return He(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const c=s.borderBoxSize,f=Array.isArray(c)?c[0]:c;a=f.inlineSize,i=f.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var dr="Popper",[Ks,rn]=qe(dr),[Rd,Ys]=Ks(dr),qs=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return p.jsx(Rd,{scope:t,anchor:r,onAnchorChange:o,children:n})};qs.displayName=dr;var Xs="PopperAnchor",Zs=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Ys(Xs,n),a=l.useRef(null),i=ae(t,a);return l.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:p.jsx(ne.div,{...o,ref:i})});Zs.displayName=Xs;var fr="PopperContent",[_d,Ad]=Ks(fr),Js=l.forwardRef((e,t)=>{var K,Q,ee,se,Ee,Ge;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:f=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:b,...h}=e,x=Ys(fr,n),[v,y]=l.useState(null),E=ae(t,Z=>y(Z)),[S,_]=l.useState(null),M=Sd(S),A=(M==null?void 0:M.width)??0,C=(M==null?void 0:M.height)??0,I=r+(s!=="center"?"-"+s:""),D=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},G=Array.isArray(f)?f:[f],z=G.length>0,V={padding:D,boundary:G.filter(Od),altBoundary:z},{refs:H,floatingStyles:q,placement:F,isPositioned:U,middlewareData:R}=pd({strategy:"fixed",placement:I,whileElementsMounted:(...Z)=>rd(...Z,{animationFrame:g==="always"}),elements:{reference:x.anchor},middleware:[hd({mainAxis:o+C,alignmentAxis:a}),c&&gd({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?vd():void 0,...V}),c&&bd({...V}),xd({...V,apply:({elements:Z,rects:J,availableWidth:ce,availableHeight:re})=>{const{width:he,height:Ue}=J.reference,oe=Z.floating.style;oe.setProperty("--radix-popper-available-width",`${ce}px`),oe.setProperty("--radix-popper-available-height",`${re}px`),oe.setProperty("--radix-popper-anchor-width",`${he}px`),oe.setProperty("--radix-popper-anchor-height",`${Ue}px`)}}),S&&yd({element:S,padding:i}),Td({arrowWidth:A,arrowHeight:C}),m&&wd({strategy:"referenceHidden",...V})]}),[O,w]=ta(F),N=Ne(b);He(()=>{U&&(N==null||N())},[U,N]);const j=(K=R.arrow)==null?void 0:K.x,$=(Q=R.arrow)==null?void 0:Q.y,X=((ee=R.arrow)==null?void 0:ee.centerOffset)!==0,[te,le]=l.useState();return He(()=>{v&&le(window.getComputedStyle(v).zIndex)},[v]),p.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:U?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[(se=R.transformOrigin)==null?void 0:se.x,(Ee=R.transformOrigin)==null?void 0:Ee.y].join(" "),...((Ge=R.hide)==null?void 0:Ge.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(_d,{scope:n,placedSide:O,onArrowChange:_,arrowX:j,arrowY:$,shouldHideArrow:X,children:p.jsx(ne.div,{"data-side":O,"data-align":w,...h,ref:E,style:{...h.style,animation:U?void 0:"none"}})})})});Js.displayName=fr;var Qs="PopperArrow",Md={top:"bottom",right:"left",bottom:"top",left:"right"},ea=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Ad(Qs,r),a=Md[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(Ed,{...o,ref:n,style:{...o.style,display:"block"}})})});ea.displayName=Qs;function Od(e){return e!==null}var Td=e=>({name:"transformOrigin",options:e,fn(t){var x,v,y;const{placement:n,rects:r,middlewareData:o}=t,a=((x=o.arrow)==null?void 0:x.centerOffset)!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[f,u]=ta(n),d={start:"0%",center:"50%",end:"100%"}[u],m=(((v=o.arrow)==null?void 0:v.x)??0)+i/2,g=(((y=o.arrow)==null?void 0:y.y)??0)+c/2;let b="",h="";return f==="bottom"?(b=a?d:`${m}px`,h=`${-c}px`):f==="top"?(b=a?d:`${m}px`,h=`${r.floating.height+c}px`):f==="right"?(b=`${-c}px`,h=a?d:`${g}px`):f==="left"&&(b=`${r.floating.width+c}px`,h=a?d:`${g}px`),{data:{x:b,y:h}}}});function ta(e){const[t,n="center"]=e.split("-");return[t,n]}var Pd=qs,na=Zs,ra=Js,oa=ea,Nd=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),kd="VisuallyHidden",sa=l.forwardRef((e,t)=>p.jsx(ne.span,{...e,ref:t,style:{...Nd,...e.style}}));sa.displayName=kd;var Id=sa,[on,S0]=qe("Tooltip",[rn]),pr=rn(),aa="TooltipProvider",Dd=700,ia="tooltip.open",[jd,ca]=on(aa),la=e=>{const{__scopeTooltip:t,delayDuration:n=Dd,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,a=l.useRef(!0),i=l.useRef(!1),c=l.useRef(0);return l.useEffect(()=>{const f=c.current;return()=>window.clearTimeout(f)},[]),p.jsx(jd,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:l.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:l.useCallback(f=>{i.current=f},[]),disableHoverableContent:o,children:s})};la.displayName=aa;var ua="Tooltip",[R0,sn]=on(ua),mr="TooltipTrigger",Ld=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=sn(mr,n),s=ca(mr,n),a=pr(n),i=l.useRef(null),c=ae(t,i,o.onTriggerChange),f=l.useRef(!1),u=l.useRef(!1),d=l.useCallback(()=>f.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),p.jsx(na,{asChild:!0,...a,children:p.jsx(ne.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:L(e.onPointerMove,m=>{m.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:L(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:L(e.onPointerDown,()=>{o.open&&o.onClose(),f.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:L(e.onFocus,()=>{f.current||o.onOpen()}),onBlur:L(e.onBlur,o.onClose),onClick:L(e.onClick,o.onClose)})})});Ld.displayName=mr;var Fd="TooltipPortal",[_0,$d]=on(Fd,{forceMount:void 0}),pt="TooltipContent",da=l.forwardRef((e,t)=>{const n=$d(pt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,a=sn(pt,e.__scopeTooltip);return p.jsx(ke,{present:r||a.open,children:a.disableHoverableContent?p.jsx(fa,{side:o,...s,ref:t}):p.jsx(Vd,{side:o,...s,ref:t})})}),Vd=l.forwardRef((e,t)=>{const n=sn(pt,e.__scopeTooltip),r=ca(pt,e.__scopeTooltip),o=l.useRef(null),s=ae(t,o),[a,i]=l.useState(null),{trigger:c,onClose:f}=n,u=o.current,{onPointerInTransitChange:d}=r,m=l.useCallback(()=>{i(null),d(!1)},[d]),g=l.useCallback((b,h)=>{const x=b.currentTarget,v={x:b.clientX,y:b.clientY},y=Gd(v,x.getBoundingClientRect()),E=Ud(v,y),S=Kd(h.getBoundingClientRect()),_=qd([...E,...S]);i(_),d(!0)},[d]);return l.useEffect(()=>()=>m(),[m]),l.useEffect(()=>{if(c&&u){const b=x=>g(x,u),h=x=>g(x,c);return c.addEventListener("pointerleave",b),u.addEventListener("pointerleave",h),()=>{c.removeEventListener("pointerleave",b),u.removeEventListener("pointerleave",h)}}},[c,u,g,m]),l.useEffect(()=>{if(a){const b=h=>{const x=h.target,v={x:h.clientX,y:h.clientY},y=(c==null?void 0:c.contains(x))||(u==null?void 0:u.contains(x)),E=!Yd(v,a);y?m():E&&(m(),f())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,u,a,f,m]),p.jsx(fa,{...e,ref:s})}),[Hd,Wd]=on(ua,{isInside:!1}),zd=ic("TooltipContent"),fa=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...i}=e,c=sn(pt,n),f=pr(n),{onClose:u}=c;return l.useEffect(()=>(document.addEventListener(ia,u),()=>document.removeEventListener(ia,u)),[u]),l.useEffect(()=>{if(c.trigger){const d=m=>{const g=m.target;g!=null&&g.contains(c.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,u]),p.jsx(Lt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:p.jsxs(ra,{"data-state":c.stateAttribute,...f,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(zd,{children:r}),p.jsx(Hd,{scope:n,isInside:!0,children:p.jsx(Id,{id:c.contentId,role:"tooltip",children:o||r})})]})})});da.displayName=pt;var pa="TooltipArrow",Bd=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=pr(n);return Wd(pa,n).isInside?null:p.jsx(oa,{...o,...r,ref:t})});Bd.displayName=pa;function Gd(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Ud(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Kd(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Yd(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],c=t[a],f=i.x,u=i.y,d=c.x,m=c.y;u>r!=m>r&&n<(d-f)*(r-u)/(m-u)+f&&(o=!o)}return o}function qd(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Xd(t)}function Xd(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Zd=la,ma=da;const Jd=Zd,Qd=l.forwardRef(({className:e,sideOffset:t=4,...n},r)=>p.jsx(ma,{ref:r,sideOffset:t,className:B("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));Qd.displayName=ma.displayName;const ef="sidebar_state",tf=60*60*24*7,nf="16rem",rf="18rem",of="3rem",sf="b",ha=l.createContext(null);function hr(){const e=l.useContext(ha);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function af({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:s,...a}){const i=dc(),[c,f]=l.useState(!1),[u,d]=l.useState(e),m=t??u,g=l.useCallback(v=>{const y=typeof v=="function"?v(m):v;n?n(y):d(y),document.cookie=`${ef}=${y}; path=/; max-age=${tf}`},[n,m]),b=l.useCallback(()=>i?f(v=>!v):g(v=>!v),[i,g,f]);l.useEffect(()=>{const v=y=>{y.key===sf&&(y.metaKey||y.ctrlKey)&&(y.preventDefault(),b())};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[b]);const h=m?"expanded":"collapsed",x=l.useMemo(()=>({state:h,open:m,setOpen:g,isMobile:i,openMobile:c,setOpenMobile:f,toggleSidebar:b}),[h,m,g,i,c,f,b]);return p.jsx(ha.Provider,{value:x,children:p.jsx(Jd,{delayDuration:0,children:p.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":nf,"--sidebar-width-icon":of,...o},className:B("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",r),...a,children:s})})})}function cf({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...s}){const{isMobile:a,state:i,openMobile:c,setOpenMobile:f}=hr();return n==="none"?p.jsx("div",{"data-slot":"sidebar",className:B("bg-white text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),...s,children:o}):a?p.jsx(wu,{open:c,onOpenChange:f,...s,children:p.jsxs(Ss,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-white text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":rf},side:e,children:[p.jsxs(Rs,{className:"sr-only",children:[p.jsx(_s,{children:"Sidebar"}),p.jsx(As,{children:"Displays the mobile sidebar."})]}),p.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):p.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":i,"data-collapsible":i==="collapsed"?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[p.jsx("div",{"data-slot":"sidebar-gap",className:B("relative w-(--sidebar-width) bg-white transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),p.jsx("div",{"data-slot":"sidebar-container",className:B("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...s,children:p.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-white group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col px-1 py-2 group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:o})})]})}function lf({className:e,onClick:t,...n}){const{toggleSidebar:r}=hr();return p.jsxs(jn,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:B("size-7",e),onClick:o=>{t==null||t(o),r()},...n,children:[p.jsx(oc,{}),p.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function uf({className:e,...t}){const{toggleSidebar:n}=hr();return p.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:B("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}function df({className:e,...t}){return p.jsx("main",{"data-slot":"sidebar-inset",className:B("bg-white relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function ff({className:e,...t}){return p.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:B("flex flex-col gap-2 p-2",e),...t})}function pf({className:e,...t}){return p.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:B("flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function mf({className:e,...t}){return p.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:B("relative flex w-full min-w-0 flex-col px-2 py-1",e),...t})}function hf({className:e,...t}){return p.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:B("w-full text-sm",e),...t})}function gf({className:e,...t}){return p.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:B("border-sidebar-border mx-3 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t})}function vf({className:e,...t}){return p.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:B("group/menu-sub-item relative",e),...t})}function bf({asChild:e=!1,size:t="md",isActive:n=!1,className:r,...o}){const s=e?ao:"a";return p.jsx(s,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:B("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),...o})}function xf({title:e,url:t,children:n,defaultOpen:r=!1,icon:o,isActive:s=!1}){const[a,i]=l.useState(r);return l.useEffect(()=>{s&&i(!0)},[s]),p.jsx(mf,{children:p.jsxs("div",{className:"flex flex-col",children:[p.jsxs("div",{className:"flex flex-row items-center justify-between",children:[p.jsxs("a",{href:t,className:B("flex flex-1 cursor-pointer items-center gap-2 rounded-lg p-2 transition-colors hover:bg-gray-100",s&&"bg-blue-50 text-blue-700 font-medium"),children:[o&&p.jsx("span",{className:B(s?"text-blue-600":"text-gray-600"),children:o}),p.jsx("span",{className:B(s&&"text-blue-700 font-medium"),children:e})]}),p.jsx("button",{type:"button",className:"mr-3 rounded-lg p-2 text-gray-500 hover:bg-gray-100 hover:text-gray-700",onClick:c=>{c.preventDefault(),c.stopPropagation(),i(!a)},"aria-label":a?"Collapse section":"Expand section",children:a?p.jsx(tc,{className:"h-4 w-4"}):p.jsx(nc,{className:"h-4 w-4"})})]}),p.jsx("div",{className:B("overflow-hidden transition-all",a?"max-h-96":"max-h-0"),children:n})]})})}const wf="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20141%2060'%3e%3cpath%20d='M0.059%2019.711V59.673H19.509V49.95H9.779V19.711H0.059Z'%20fill='%2385B9D1'%3e%3c/path%3e%3cpath%20d='M0%200L0.056%204.915V19.715H9.776V9.715H19.5V59.673H29.22V0H0Z'%20fill='%23F68029'%3e%3c/path%3e%3cpath%20d='M23.49%2019.717H9.776V29.439H23.49V19.717Z'%20fill='%23F68029'%3e%3c/path%3e%3cpath%20d='M0.0580006%2019.718L9.785%2029.445V19.718H0.0580006Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M9.777%2049.953L19.504%2059.679V49.953H9.777Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M50.213%2021.331C50.1839%2019.244%2050.325%2017.1581%2050.635%2015.094C50.8293%2013.6891%2051.2694%2012.3294%2051.935%2011.077C52.4295%2010.1519%2053.1979%209.4023%2054.135%208.93101C55.1033%208.49691%2056.1561%208.28375%2057.217%208.307C58.2628%208.27673%2059.3024%208.47715%2060.262%208.894C61.1441%209.33605%2061.8541%2010.059%2062.28%2010.949C62.8725%2012.1976%2063.2507%2013.5369%2063.399%2014.911C63.6554%2016.9922%2063.7717%2019.0882%2063.747%2021.185C63.7759%2023.338%2063.6421%2025.4901%2063.347%2027.623C63.1657%2029.0675%2062.7378%2030.4702%2062.082%2031.77C61.6022%2032.7122%2060.8471%2033.4862%2059.917%2033.989C58.9503%2034.4507%2057.888%2034.6768%2056.817%2034.649C55.7687%2034.6771%2054.7258%2034.4896%2053.753%2034.098C52.8534%2033.6775%2052.1275%2032.9579%2051.699%2032.062C51.0884%2030.7803%2050.7037%2029.4027%2050.562%2027.99C50.3018%2025.7802%2050.1852%2023.5559%2050.213%2021.331ZM54.913%2022.248C54.913%2023.6913%2054.9377%2024.9267%2054.987%2025.954C55.0147%2026.8043%2055.1127%2027.6509%2055.28%2028.485C55.3666%2029.0149%2055.5877%2029.5138%2055.922%2029.934C56.0643%2030.0868%2056.238%2030.207%2056.4312%2030.2862C56.6244%2030.3655%2056.8324%2030.4019%2057.041%2030.393C57.25%2030.3964%2057.4571%2030.3533%2057.6473%2030.2668C57.8375%2030.1803%2058.0062%2030.0526%2058.141%2029.893C58.4964%2029.4241%2058.7297%2028.8744%2058.82%2028.293C59.0025%2027.3609%2059.1128%2026.4161%2059.15%2025.467C59.2107%2024.3177%2059.2414%2022.936%2059.242%2021.322C59.242%2019.732%2059.224%2018.3747%2059.188%2017.25C59.169%2016.3373%2059.0736%2015.4278%2058.903%2014.531C58.8198%2013.9744%2058.5923%2013.4493%2058.243%2013.008C58.0929%2012.8491%2057.9104%2012.7244%2057.7078%2012.6422C57.5053%2012.5601%2057.2874%2012.5225%2057.069%2012.532C56.8667%2012.5304%2056.6668%2012.576%2056.4852%2012.6652C56.3036%2012.7544%2056.1453%2012.8848%2056.023%2013.046C55.6766%2013.5389%2055.4446%2014.103%2055.344%2014.697C55.1442%2015.6885%2055.0277%2016.695%2054.996%2017.706C54.9347%2018.9533%2054.904%2020.4697%2054.904%2022.255'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M83.329%2021.331C83.2999%2019.244%2083.441%2017.1581%2083.751%2015.094C83.9453%2013.6891%2084.3854%2012.3294%2085.051%2011.077C85.5455%2010.1519%2086.3139%209.40235%2087.251%208.93105C89.2087%208.112%2091.4106%208.09871%2093.378%208.89405C94.2601%209.33609%2094.9701%2010.0591%2095.396%2010.949C95.9885%2012.1976%2096.3667%2013.537%2096.515%2014.911C96.7714%2016.9922%2096.8877%2019.0883%2096.863%2021.185C96.8919%2023.3381%2096.7581%2025.4902%2096.463%2027.6231C96.2817%2029.0676%2095.8538%2030.4703%2095.198%2031.77C94.7182%2032.7123%2093.9631%2033.4862%2093.033%2033.989C92.0663%2034.4507%2091.004%2034.6769%2089.933%2034.649C88.8847%2034.6772%2087.8418%2034.4896%2086.869%2034.098C85.9694%2033.6775%2085.2435%2032.9579%2084.815%2032.062C84.2044%2030.7803%2083.8197%2029.4027%2083.678%2027.99C83.4178%2025.7803%2083.3012%2023.5559%2083.329%2021.331ZM88.029%2022.2481C88.029%2023.6914%2088.0537%2024.9267%2088.103%2025.954C88.1307%2026.8044%2088.2287%2027.6509%2088.396%2028.4851C88.4826%2029.015%2088.7037%2029.5139%2089.038%2029.934C89.1803%2030.0869%2089.354%2030.207%2089.5472%2030.2863C89.7404%2030.3655%2089.9484%2030.4019%2090.157%2030.393C90.366%2030.3964%2090.573%2030.3533%2090.7633%2030.2669C90.9535%2030.1804%2091.1222%2030.0527%2091.257%2029.893C91.6124%2029.4242%2091.8458%2028.8744%2091.936%2028.2931C92.1185%2027.3609%2092.2288%2026.4161%2092.266%2025.467C92.3267%2024.3177%2092.3574%2022.936%2092.358%2021.322C92.358%2019.732%2092.34%2018.3747%2092.304%2017.2501C92.2887%2016.3329%2092.1964%2015.4187%2092.028%2014.517C91.9448%2013.9605%2091.7173%2013.4354%2091.368%2012.994C91.2162%2012.8368%2091.0323%2012.7141%2090.8289%2012.6343C90.6255%2012.5544%2090.4072%2012.5192%2090.189%2012.531C89.9867%2012.5294%2089.7868%2012.575%2089.6052%2012.6643C89.4236%2012.7535%2089.2653%2012.8839%2089.143%2013.045C88.7966%2013.5379%2088.5646%2014.102%2088.464%2014.6961C88.2642%2015.6876%2088.1477%2016.6941%2088.116%2017.705C88.0547%2018.9524%2088.024%2020.4687%2088.024%2022.254'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M131.349%2034.65V8.32202H135.458V30.797H140.631V34.649L131.349%2034.65Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M71.95%2034.65V8.33203H76.059V30.796H81.232V34.648L71.95%2034.65Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M104.833%2014.692C104.934%2014.098%20105.166%2013.534%20105.512%2013.041C105.634%2012.8798%20105.793%2012.7494%20105.974%2012.6602C106.156%2012.571%20106.356%2012.5253%20106.558%2012.527H110.103V8.30798H106.703C105.642%208.2848%20104.589%208.49794%20103.621%208.93197C102.684%209.40306%20101.915%2010.1527%20101.421%2011.078C100.756%2012.3304%20100.316%2013.6901%20100.121%2015.095C99.8114%2017.1591%2099.6706%2019.245%2099.7%2021.332C99.6722%2023.5568%2099.7885%2025.7811%20100.048%2027.991C100.19%2029.4037%20100.574%2030.7812%20101.185%2032.063C101.614%2032.9584%20102.34%2033.6778%20103.239%2034.099C104.212%2034.4899%20105.255%2034.6771%20106.303%2034.649L110.103%2034.613V30.393H106.522C106.313%2030.402%20106.105%2030.3657%20105.912%2030.2866C105.719%2030.2076%20105.545%2030.0876%20105.403%2029.935C105.069%2029.5144%20104.848%2029.0152%20104.761%2028.485C104.594%2027.6509%20104.496%2026.8043%20104.468%2025.954C104.419%2024.9266%20104.394%2023.6916%20104.394%2022.249C104.394%2020.4636%20104.425%2018.9473%20104.486%2017.7C104.518%2016.6894%20104.633%2015.6832%20104.833%2014.692Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M46.728%2019.247H42.878V30.395H41.828C41.6182%2030.4039%2041.409%2030.3669%2041.2149%2030.2868C41.0208%2030.2067%2040.8465%2030.0853%2040.704%2029.931C40.3695%2029.5106%2040.1485%2029.0113%2040.062%2028.481C39.894%2027.647%2039.7956%2026.8004%2039.768%2025.95C39.7187%2024.9227%2039.6944%2023.6877%2039.695%2022.245C39.695%2020.4597%2039.7257%2018.9434%2039.787%2017.696C39.8191%2016.6854%2039.9355%2015.6792%2040.135%2014.688C40.2357%2014.094%2040.4677%2013.53%2040.814%2013.037C40.9376%2012.8768%2041.0968%2012.7476%2041.2791%2012.6598C41.4614%2012.5719%2041.6617%2012.5278%2041.864%2012.531H45.904V8.31202H42.012C40.9511%208.28877%2039.8983%208.50191%2038.93%208.93601C37.9927%209.40699%2037.2241%2010.1567%2036.73%2011.082C36.0644%2012.3344%2035.6243%2013.6941%2035.43%2015.099C35.1189%2017.1613%2034.9764%2019.2456%2035.004%2021.331C34.9762%2023.5559%2035.0925%2025.7802%2035.352%2027.99C35.494%2029.4026%2035.8787%2030.7802%2036.489%2032.062C36.9179%2032.9579%2037.6442%2033.6775%2038.544%2034.098C39.517%2034.4891%2040.5598%2034.6763%2041.608%2034.648L43.587%2034.629H46.727L46.728%2019.247Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M123.653%2029.87H118L116.691%2034.65H112.797L120.939%208L128.793%2034.65H124.856L123.653%2029.87ZM122.587%2026.212L120.893%2019.982L119.085%2026.212H122.587Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M39.016%2041.436H37.059V54.507H39.016V41.436Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M44.559%2041.436H46.384L48.331%2046.651C48.919%2048.1937%2049.4198%2049.7682%2049.831%2051.367C49.6744%2050.357%2049.5584%2049.4427%2049.483%2048.624C49.4077%2047.8054%2049.37%2047.0347%2049.37%2046.312V41.436H51.336V54.511H49.495L47.303%2048.627C47.103%2048.0797%2046.9134%2047.518%2046.734%2046.942C46.5547%2046.366%2046.39%2045.762%2046.24%2045.13C46.2274%2045.0507%2046.207%2044.9547%2046.179%2044.842C46.151%2044.7293%2046.1177%2044.5997%2046.079%2044.453C46.098%2044.6%2046.114%2044.725%2046.126%2044.829C46.138%2044.933%2046.148%2045.022%2046.154%2045.095L46.254%2046.424L46.354%2048.041C46.36%2048.131%2046.365%2048.241%2046.368%2048.371C46.371%2048.501%2046.368%2048.648%2046.368%2048.811L46.468%2054.511H44.559V41.436Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M55.493%2041.436H61.861V42.977H59.67V54.511H57.751V42.977H55.493V41.436Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M65.828%2041.436H71.028V42.926H67.787V47.065H70.665V48.555H67.787V53.016H71.028V54.506H65.828V41.436Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M75.906%2041.436H78.483C79.3332%2041.3696%2080.1787%2041.6132%2080.863%2042.122C81.2131%2042.4774%2081.4826%2042.904%2081.6531%2043.3729C81.8236%2043.8417%2081.8911%2044.3418%2081.851%2044.839C81.8876%2045.6248%2081.7066%2046.4055%2081.328%2047.095C81.1685%2047.3665%2080.9531%2047.6008%2080.696%2047.7826C80.4389%2047.9643%2080.1461%2048.0892%2079.837%2048.149L82.509%2054.507H80.525L77.863%2048.107V54.507H75.906V41.436ZM77.863%2047.227C78.1485%2047.2893%2078.4451%2047.279%2078.7256%2047.1969C79.0061%2047.1148%2079.2615%2046.9637%2079.4684%2046.7573C79.6753%2046.5509%2079.8271%2046.2959%2079.9098%2046.0156C79.9926%2045.7353%2080.0036%2045.4387%2079.942%2045.153C79.9472%2044.8034%2079.9137%2044.4543%2079.842%2044.112C79.7909%2043.8589%2079.6851%2043.62%2079.532%2043.412C79.3909%2043.2304%2079.2018%2043.0918%2078.986%2043.012C78.7308%2042.9221%2078.4615%2042.8791%2078.191%2042.885H77.862L77.863%2047.227Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M90.046%2041.06L85.913%2054.514H87.745L88.45%2051.974H91.496L92.135%2054.531H94.028L90.046%2041.06ZM88.876%2050.403L90.013%2046.703L91.048%2050.415L88.876%2050.403Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M106.344%2041.436H112.712V42.977H110.52V54.511H108.602V42.977H106.344V41.436Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M118.865%2041.462H116.908V54.533H118.865V41.462Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M134.181%2041.462H139.381V42.952H136.136V47.093H139.014V48.583H136.136V53.044H139.381V54.534H134.181V41.462Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M99.749%2044.338C99.8046%2044.0109%2099.9338%2043.7008%20100.127%2043.431C100.202%2043.3322%20100.3%2043.2523%20100.411%2043.1976C100.523%2043.1429%20100.646%2043.115%20100.77%2043.116H102.464V41.207H100.846C100.318%2041.1955%2099.7949%2041.3011%2099.313%2041.516C98.8543%2041.748%2098.4782%2042.1157%2098.236%2042.569C97.9008%2043.2016%2097.6788%2043.888%2097.58%2044.597C97.4215%2045.6561%2097.3493%2046.7263%2097.364%2047.797C97.3503%2048.9393%2097.4101%2050.0814%2097.543%2051.216C97.6145%2051.9294%2097.808%2052.6252%2098.115%2053.273C98.3244%2053.7086%2098.6776%2054.0586%2099.115%2054.264C99.6001%2054.458%20100.12%2054.5509%20100.642%2054.537L102.469%2054.52V52.61H100.755C100.629%2052.6147%20100.503%2052.592%20100.386%2052.5435C100.269%2052.495%20100.164%2052.4218%20100.078%2052.329C99.8888%2052.0951%2099.7637%2051.816%2099.715%2051.519C99.6273%2051.081%2099.5758%2050.6365%2099.561%2050.19C99.536%2049.66%2099.523%2049.014%2099.523%2048.27C99.523%2047.349%2099.539%2046.557%2099.57%2045.916C99.5873%2045.3865%2099.6485%2044.8594%2099.753%2044.34'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M128.799%2041.466L126.671%2048.91L124.671%2041.466H122.679L126.654%2054.953L130.774%2041.466H128.799Z'%20fill='%230A3763'%3e%3c/path%3e%3c/svg%3e";function yf(){const[e,t]=k.useState("");return k.useEffect(()=>{t(window.location.pathname);const r=()=>{t(window.location.pathname)},o=()=>{t(window.location.pathname)};return window.addEventListener("popstate",r),window.addEventListener("pushstate",o),window.addEventListener("replacestate",o),()=>{window.removeEventListener("popstate",r),window.removeEventListener("pushstate",o),window.removeEventListener("replacestate",o)}},[]),{currentPath:e,isActiveRoute:r=>!!(e===r||r!=="/"&&e.startsWith(r))}}const Cf={navMain:[{title:"Essential Insights",url:"/essential-insights/overall-performance",icon:p.jsx(ec,{className:"h-5 w-5"}),items:[{title:"Overall Performance",url:"/essential-insights/overall-performance",icon:p.jsx(ro,{className:"h-4 w-4"})},{title:"Organic Performance",url:"/essential-insights/organic-performance",icon:p.jsx(no,{className:"h-4 w-4"})},{title:"Paid Performance",url:"/essential-insights/paid-performance",icon:p.jsx(Qi,{className:"h-4 w-4"})},{title:"Keyword Performance",url:"/essential-insights/keyword-performance",icon:p.jsx(no,{className:"h-4 w-4"})},{title:"More Components",url:"/essential-insights/more-components",icon:p.jsx(Ke,{className:"h-4 w-4"})}]},{title:"Price Monster",url:"/price-monster",icon:p.jsx(Ke,{className:"h-4 w-4"}),items:[{title:"Dashboard",url:"/price-monster/dashboard",icon:p.jsx(Ke,{className:"h-4 w-4"})}]},{title:"CMS",url:"/cms",icon:p.jsx(Ke,{className:"h-4 w-4"}),items:[{title:"Dashboard",url:"/cms/dashboard",icon:p.jsx(Ke,{className:"h-4 w-4"})}]},{title:"Storage Essentials",url:"/storage-essentials",icon:p.jsx(Ke,{className:"h-4 w-4"}),items:[{title:"Dashboard",url:"/storage-essentials/dashboard",icon:p.jsx(Ke,{className:"h-4 w-4"})}]}]};function Ef({...e}){const{isActiveRoute:t}=yf();return p.jsxs(cf,{...e,children:[p.jsx(ff,{children:p.jsx("div",{className:"relative h-12 w-32 overflow-hidden",children:p.jsx("img",{src:wf,alt:"GLI Logo",className:"h-full w-full object-contain"})})}),p.jsxs(pf,{children:[p.jsx("div",{className:"relative flex w-full min-w-0 flex-col px-2 py-1",children:p.jsx("div",{className:"flex flex-col",children:p.jsxs("a",{href:"/home",className:B("flex cursor-pointer items-center gap-2 rounded-lg px-2 py-2 transition-colors","hover:bg-gray-100",t("/home")&&"bg-blue-50 text-blue-700 font-medium"),children:[p.jsx(ro,{className:B("h-5 w-5",t("/home")?"text-blue-600":"text-gray-600")}),p.jsx("span",{children:"Home"})]})})}),Cf.navMain.map(n=>{const r=t(n.url)||n.items.some(o=>t(o.url));return p.jsx(xf,{title:n.title,url:n.url,icon:n.icon,isActive:r,children:p.jsx(hf,{children:p.jsx(gf,{children:n.items.map(o=>{const s=t(o.url);return p.jsx(vf,{children:p.jsx(bf,{asChild:!0,children:p.jsxs("a",{href:o.url,className:B("flex items-center gap-2 pl-4 transition-colors","text-muted-foreground hover:bg-muted hover:text-foreground",s&&"bg-blue-50 text-blue-700 font-medium"),children:[p.jsx("span",{className:B(s?"text-blue-600":"text-muted-foreground"),children:o.icon}),p.jsx("span",{className:B(s?"text-blue-700":"text-muted-foreground"),children:o.title})]})})},o.title)})})})},n.title)})]}),p.jsx(uf,{})]})}function ga(e){const t=e+"CollectionProvider",[n,r]=qe(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=h=>{const{scope:x,children:v}=h,y=k.useRef(null),E=k.useRef(new Map).current;return p.jsx(o,{scope:x,itemMap:E,collectionRef:y,children:v})};a.displayName=t;const i=e+"CollectionSlot",c=et(i),f=k.forwardRef((h,x)=>{const{scope:v,children:y}=h,E=s(i,v),S=ae(x,E.collectionRef);return p.jsx(c,{ref:S,children:y})});f.displayName=i;const u=e+"CollectionItemSlot",d="data-radix-collection-item",m=et(u),g=k.forwardRef((h,x)=>{const{scope:v,children:y,...E}=h,S=k.useRef(null),_=ae(x,S),M=s(u,v);return k.useEffect(()=>(M.itemMap.set(S,{ref:S,...E}),()=>void M.itemMap.delete(S))),p.jsx(m,{[d]:"",ref:_,children:y})});g.displayName=u;function b(h){const x=s(e+"CollectionConsumer",h);return k.useCallback(()=>{const y=x.collectionRef.current;if(!y)return[];const E=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((M,A)=>E.indexOf(M.ref.current)-E.indexOf(A.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:a,Slot:f,ItemSlot:g},b,r]}var Sf=l.createContext(void 0);function va(e){const t=l.useContext(Sf);return e||t||"ltr"}var gr="rovingFocusGroup.onEntryFocus",Rf={bubbles:!1,cancelable:!0},Ct="RovingFocusGroup",[vr,ba,_f]=ga(Ct),[Af,xa]=qe(Ct,[_f]),[Mf,Of]=Af(Ct),wa=l.forwardRef((e,t)=>p.jsx(vr.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(vr.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Tf,{...e,ref:t})})}));wa.displayName=Ct;var Tf=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:f,preventScrollOnEntryFocus:u=!1,...d}=e,m=l.useRef(null),g=ae(t,m),b=va(s),[h,x]=Ln({prop:a,defaultProp:i??null,onChange:c,caller:Ct}),[v,y]=l.useState(!1),E=Ne(f),S=ba(n),_=l.useRef(!1),[M,A]=l.useState(0);return l.useEffect(()=>{const C=m.current;if(C)return C.addEventListener(gr,E),()=>C.removeEventListener(gr,E)},[E]),p.jsx(Mf,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:h,onItemFocus:l.useCallback(C=>x(C),[x]),onItemShiftTab:l.useCallback(()=>y(!0),[]),onFocusableItemAdd:l.useCallback(()=>A(C=>C+1),[]),onFocusableItemRemove:l.useCallback(()=>A(C=>C-1),[]),children:p.jsx(ne.div,{tabIndex:v||M===0?-1:0,"data-orientation":r,...d,ref:g,style:{outline:"none",...e.style},onMouseDown:L(e.onMouseDown,()=>{_.current=!0}),onFocus:L(e.onFocus,C=>{const I=!_.current;if(C.target===C.currentTarget&&I&&!v){const D=new CustomEvent(gr,Rf);if(C.currentTarget.dispatchEvent(D),!D.defaultPrevented){const G=S().filter(F=>F.focusable),z=G.find(F=>F.active),V=G.find(F=>F.id===h),q=[z,V,...G].filter(Boolean).map(F=>F.ref.current);Ea(q,u)}}_.current=!1}),onBlur:L(e.onBlur,()=>y(!1))})})}),ya="RovingFocusGroupItem",Ca=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:a,...i}=e,c=ot(),f=s||c,u=Of(ya,n),d=u.currentTabStopId===f,m=ba(n),{onFocusableItemAdd:g,onFocusableItemRemove:b,currentTabStopId:h}=u;return l.useEffect(()=>{if(r)return g(),()=>b()},[r,g,b]),p.jsx(vr.ItemSlot,{scope:n,id:f,focusable:r,active:o,children:p.jsx(ne.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:L(e.onMouseDown,x=>{r?u.onItemFocus(f):x.preventDefault()}),onFocus:L(e.onFocus,()=>u.onItemFocus(f)),onKeyDown:L(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){u.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const v=kf(x,u.orientation,u.dir);if(v!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let E=m().filter(S=>S.focusable).map(S=>S.ref.current);if(v==="last")E.reverse();else if(v==="prev"||v==="next"){v==="prev"&&E.reverse();const S=E.indexOf(x.currentTarget);E=u.loop?If(E,S+1):E.slice(S+1)}setTimeout(()=>Ea(E))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:h!=null}):a})})});Ca.displayName=ya;var Pf={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Nf(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function kf(e,t,n){const r=Nf(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Pf[r]}function Ea(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function If(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Df=wa,jf=Ca,br=["Enter"," "],Lf=["ArrowDown","PageUp","Home"],Sa=["ArrowUp","PageDown","End"],Ff=[...Lf,...Sa],$f={ltr:[...br,"ArrowRight"],rtl:[...br,"ArrowLeft"]},Vf={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Et="Menu",[St,Hf,Wf]=ga(Et),[Je,Ra]=qe(Et,[Wf,rn,xa]),an=rn(),_a=xa(),[zf,Qe]=Je(Et),[Bf,Rt]=Je(Et),Aa=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:a=!0}=e,i=an(t),[c,f]=l.useState(null),u=l.useRef(!1),d=Ne(s),m=va(o);return l.useEffect(()=>{const g=()=>{u.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>u.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),p.jsx(Pd,{...i,children:p.jsx(zf,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:f,children:p.jsx(Bf,{scope:t,onClose:l.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:m,modal:a,children:r})})})};Aa.displayName=Et;var Gf="MenuAnchor",xr=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=an(n);return p.jsx(na,{...o,...r,ref:t})});xr.displayName=Gf;var wr="MenuPortal",[Uf,Ma]=Je(wr,{forceMount:void 0}),Oa=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Qe(wr,t);return p.jsx(Uf,{scope:t,forceMount:n,children:p.jsx(ke,{present:n||s.open,children:p.jsx(Wn,{asChild:!0,container:o,children:r})})})};Oa.displayName=wr;var ge="MenuContent",[Kf,yr]=Je(ge),Ta=l.forwardRef((e,t)=>{const n=Ma(ge,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Qe(ge,e.__scopeMenu),a=Rt(ge,e.__scopeMenu);return p.jsx(St.Provider,{scope:e.__scopeMenu,children:p.jsx(ke,{present:r||s.open,children:p.jsx(St.Slot,{scope:e.__scopeMenu,children:a.modal?p.jsx(Yf,{...o,ref:t}):p.jsx(qf,{...o,ref:t})})})})}),Yf=l.forwardRef((e,t)=>{const n=Qe(ge,e.__scopeMenu),r=l.useRef(null),o=ae(t,r);return l.useEffect(()=>{const s=r.current;if(s)return rs(s)},[]),p.jsx(Cr,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:L(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),qf=l.forwardRef((e,t)=>{const n=Qe(ge,e.__scopeMenu);return p.jsx(Cr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Xf=et("MenuContent.ScrollLock"),Cr=l.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEntryFocus:c,onEscapeKeyDown:f,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:m,onDismiss:g,disableOutsideScroll:b,...h}=e,x=Qe(ge,n),v=Rt(ge,n),y=an(n),E=_a(n),S=Hf(n),[_,M]=l.useState(null),A=l.useRef(null),C=ae(t,A,x.onContentChange),I=l.useRef(0),D=l.useRef(""),G=l.useRef(0),z=l.useRef(null),V=l.useRef("right"),H=l.useRef(0),q=b?Yn:l.Fragment,F=b?{as:Xf,allowPinchZoom:!0}:void 0,U=O=>{var K,Q;const w=D.current+O,N=S().filter(ee=>!ee.disabled),j=document.activeElement,$=(K=N.find(ee=>ee.ref.current===j))==null?void 0:K.textValue,X=N.map(ee=>ee.textValue),te=cp(X,w,$),le=(Q=N.find(ee=>ee.textValue===te))==null?void 0:Q.ref.current;(function ee(se){D.current=se,window.clearTimeout(I.current),se!==""&&(I.current=window.setTimeout(()=>ee(""),1e3))})(w),le&&setTimeout(()=>le.focus())};l.useEffect(()=>()=>window.clearTimeout(I.current),[]),Wo();const R=l.useCallback(O=>{var N,j;return V.current===((N=z.current)==null?void 0:N.side)&&up(O,(j=z.current)==null?void 0:j.area)},[]);return p.jsx(Kf,{scope:n,searchRef:D,onItemEnter:l.useCallback(O=>{R(O)&&O.preventDefault()},[R]),onItemLeave:l.useCallback(O=>{var w;R(O)||((w=A.current)==null||w.focus(),M(null))},[R]),onTriggerLeave:l.useCallback(O=>{R(O)&&O.preventDefault()},[R]),pointerGraceTimerRef:G,onPointerGraceIntentChange:l.useCallback(O=>{z.current=O},[]),children:p.jsx(q,{...F,children:p.jsx(Hn,{asChild:!0,trapped:o,onMountAutoFocus:L(s,O=>{var w;O.preventDefault(),(w=A.current)==null||w.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:p.jsx(Lt,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:f,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:m,onDismiss:g,children:p.jsx(Df,{asChild:!0,...E,dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:_,onCurrentTabStopIdChange:M,onEntryFocus:L(c,O=>{v.isUsingKeyboardRef.current||O.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(ra,{role:"menu","aria-orientation":"vertical","data-state":Ka(x.open),"data-radix-menu-content":"",dir:v.dir,...y,...h,ref:C,style:{outline:"none",...h.style},onKeyDown:L(h.onKeyDown,O=>{const N=O.target.closest("[data-radix-menu-content]")===O.currentTarget,j=O.ctrlKey||O.altKey||O.metaKey,$=O.key.length===1;N&&(O.key==="Tab"&&O.preventDefault(),!j&&$&&U(O.key));const X=A.current;if(O.target!==X||!Ff.includes(O.key))return;O.preventDefault();const le=S().filter(K=>!K.disabled).map(K=>K.ref.current);Sa.includes(O.key)&&le.reverse(),ap(le)}),onBlur:L(e.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(I.current),D.current="")}),onPointerMove:L(e.onPointerMove,At(O=>{const w=O.target,N=H.current!==O.clientX;if(O.currentTarget.contains(w)&&N){const j=O.clientX>H.current?"right":"left";V.current=j,H.current=O.clientX}}))})})})})})})});Ta.displayName=ge;var Zf="MenuGroup",Er=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(ne.div,{role:"group",...r,ref:t})});Er.displayName=Zf;var Jf="MenuLabel",Pa=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(ne.div,{...r,ref:t})});Pa.displayName=Jf;var cn="MenuItem",Na="menu.itemSelect",ln=l.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=l.useRef(null),a=Rt(cn,e.__scopeMenu),i=yr(cn,e.__scopeMenu),c=ae(t,s),f=l.useRef(!1),u=()=>{const d=s.current;if(!n&&d){const m=new CustomEvent(Na,{bubbles:!0,cancelable:!0});d.addEventListener(Na,g=>r==null?void 0:r(g),{once:!0}),Mo(d,m),m.defaultPrevented?f.current=!1:a.onClose()}};return p.jsx(ka,{...o,ref:c,disabled:n,onClick:L(e.onClick,u),onPointerDown:d=>{var m;(m=e.onPointerDown)==null||m.call(e,d),f.current=!0},onPointerUp:L(e.onPointerUp,d=>{var m;f.current||(m=d.currentTarget)==null||m.click()}),onKeyDown:L(e.onKeyDown,d=>{const m=i.searchRef.current!=="";n||m&&d.key===" "||br.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});ln.displayName=cn;var ka=l.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,a=yr(cn,n),i=_a(n),c=l.useRef(null),f=ae(t,c),[u,d]=l.useState(!1),[m,g]=l.useState("");return l.useEffect(()=>{const b=c.current;b&&g((b.textContent??"").trim())},[s.children]),p.jsx(St.ItemSlot,{scope:n,disabled:r,textValue:o??m,children:p.jsx(jf,{asChild:!0,...i,focusable:!r,children:p.jsx(ne.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:f,onPointerMove:L(e.onPointerMove,At(b=>{r?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:L(e.onPointerLeave,At(b=>a.onItemLeave(b))),onFocus:L(e.onFocus,()=>d(!0)),onBlur:L(e.onBlur,()=>d(!1))})})})}),Qf="MenuCheckboxItem",Ia=l.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return p.jsx($a,{scope:e.__scopeMenu,checked:n,children:p.jsx(ln,{role:"menuitemcheckbox","aria-checked":un(n)?"mixed":n,...o,ref:t,"data-state":Rr(n),onSelect:L(o.onSelect,()=>r==null?void 0:r(un(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ia.displayName=Qf;var Da="MenuRadioGroup",[ep,tp]=Je(Da,{value:void 0,onValueChange:()=>{}}),ja=l.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=Ne(r);return p.jsx(ep,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(Er,{...o,ref:t})})});ja.displayName=Da;var La="MenuRadioItem",Fa=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=tp(La,e.__scopeMenu),s=n===o.value;return p.jsx($a,{scope:e.__scopeMenu,checked:s,children:p.jsx(ln,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Rr(s),onSelect:L(r.onSelect,()=>{var a;return(a=o.onValueChange)==null?void 0:a.call(o,n)},{checkForDefaultPrevented:!1})})})});Fa.displayName=La;var Sr="MenuItemIndicator",[$a,np]=Je(Sr,{checked:!1}),Va=l.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=np(Sr,n);return p.jsx(ke,{present:r||un(s.checked)||s.checked===!0,children:p.jsx(ne.span,{...o,ref:t,"data-state":Rr(s.checked)})})});Va.displayName=Sr;var rp="MenuSeparator",Ha=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(ne.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Ha.displayName=rp;var op="MenuArrow",Wa=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=an(n);return p.jsx(oa,{...o,...r,ref:t})});Wa.displayName=op;var sp="MenuSub",[A0,za]=Je(sp),_t="MenuSubTrigger",Ba=l.forwardRef((e,t)=>{const n=Qe(_t,e.__scopeMenu),r=Rt(_t,e.__scopeMenu),o=za(_t,e.__scopeMenu),s=yr(_t,e.__scopeMenu),a=l.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:c}=s,f={__scopeMenu:e.__scopeMenu},u=l.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return l.useEffect(()=>u,[u]),l.useEffect(()=>{const d=i.current;return()=>{window.clearTimeout(d),c(null)}},[i,c]),p.jsx(xr,{asChild:!0,...f,children:p.jsx(ka,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Ka(n.open),...e,ref:It(t,o.onTriggerChange),onClick:d=>{var m;(m=e.onClick)==null||m.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:L(e.onPointerMove,At(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:L(e.onPointerLeave,At(d=>{var g,b;u();const m=(g=n.content)==null?void 0:g.getBoundingClientRect();if(m){const h=(b=n.content)==null?void 0:b.dataset.side,x=h==="right",v=x?-5:5,y=m[x?"left":"right"],E=m[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+v,y:d.clientY},{x:y,y:m.top},{x:E,y:m.top},{x:E,y:m.bottom},{x:y,y:m.bottom}],side:h}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:L(e.onKeyDown,d=>{var g;const m=s.searchRef.current!=="";e.disabled||m&&d.key===" "||$f[r.dir].includes(d.key)&&(n.onOpenChange(!0),(g=n.content)==null||g.focus(),d.preventDefault())})})})});Ba.displayName=_t;var Ga="MenuSubContent",Ua=l.forwardRef((e,t)=>{const n=Ma(ge,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Qe(ge,e.__scopeMenu),a=Rt(ge,e.__scopeMenu),i=za(Ga,e.__scopeMenu),c=l.useRef(null),f=ae(t,c);return p.jsx(St.Provider,{scope:e.__scopeMenu,children:p.jsx(ke,{present:r||s.open,children:p.jsx(St.Slot,{scope:e.__scopeMenu,children:p.jsx(Cr,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:f,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var d;a.isUsingKeyboardRef.current&&((d=c.current)==null||d.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:L(e.onFocusOutside,u=>{u.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:L(e.onEscapeKeyDown,u=>{a.onClose(),u.preventDefault()}),onKeyDown:L(e.onKeyDown,u=>{var g;const d=u.currentTarget.contains(u.target),m=Vf[a.dir].includes(u.key);d&&m&&(s.onOpenChange(!1),(g=i.trigger)==null||g.focus(),u.preventDefault())})})})})})});Ua.displayName=Ga;function Ka(e){return e?"open":"closed"}function un(e){return e==="indeterminate"}function Rr(e){return un(e)?"indeterminate":e?"checked":"unchecked"}function ap(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function ip(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function cp(e,t,n){const o=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=ip(e,Math.max(s,0));o.length===1&&(a=a.filter(f=>f!==n));const c=a.find(f=>f.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function lp(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],c=t[a],f=i.x,u=i.y,d=c.x,m=c.y;u>r!=m>r&&n<(d-f)*(r-u)/(m-u)+f&&(o=!o)}return o}function up(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return lp(n,t)}function At(e){return t=>t.pointerType==="mouse"?e(t):void 0}var dp=Aa,fp=xr,pp=Oa,mp=Ta,hp=Er,gp=Pa,vp=ln,bp=Ia,xp=ja,wp=Fa,yp=Va,Cp=Ha,Ep=Wa,Sp=Ba,Rp=Ua,dn="DropdownMenu",[_p,M0]=qe(dn,[Ra]),de=Ra(),[Ap,Ya]=_p(dn),qa=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:a,modal:i=!0}=e,c=de(t),f=l.useRef(null),[u,d]=Ln({prop:o,defaultProp:s??!1,onChange:a,caller:dn});return p.jsx(Ap,{scope:t,triggerId:ot(),triggerRef:f,contentId:ot(),open:u,onOpenChange:d,onOpenToggle:l.useCallback(()=>d(m=>!m),[d]),modal:i,children:p.jsx(dp,{...c,open:u,onOpenChange:d,dir:r,modal:i,children:n})})};qa.displayName=dn;var Xa="DropdownMenuTrigger",Za=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Ya(Xa,n),a=de(n);return p.jsx(fp,{asChild:!0,...a,children:p.jsx(ne.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:It(t,s.triggerRef),onPointerDown:L(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(s.onOpenToggle(),s.open||i.preventDefault())}),onKeyDown:L(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&s.onOpenToggle(),i.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});Za.displayName=Xa;var Mp="DropdownMenuPortal",Ja=e=>{const{__scopeDropdownMenu:t,...n}=e,r=de(t);return p.jsx(pp,{...r,...n})};Ja.displayName=Mp;var Qa="DropdownMenuContent",ei=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ya(Qa,n),s=de(n),a=l.useRef(!1);return p.jsx(mp,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:L(e.onCloseAutoFocus,i=>{var c;a.current||(c=o.triggerRef.current)==null||c.focus(),a.current=!1,i.preventDefault()}),onInteractOutside:L(e.onInteractOutside,i=>{const c=i.detail.originalEvent,f=c.button===0&&c.ctrlKey===!0,u=c.button===2||f;(!o.modal||u)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ei.displayName=Qa;var Op="DropdownMenuGroup",Tp=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=de(n);return p.jsx(hp,{...o,...r,ref:t})});Tp.displayName=Op;var Pp="DropdownMenuLabel",ti=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=de(n);return p.jsx(gp,{...o,...r,ref:t})});ti.displayName=Pp;var Np="DropdownMenuItem",ni=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=de(n);return p.jsx(vp,{...o,...r,ref:t})});ni.displayName=Np;var kp="DropdownMenuCheckboxItem",Ip=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=de(n);return p.jsx(bp,{...o,...r,ref:t})});Ip.displayName=kp;var Dp="DropdownMenuRadioGroup",jp=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=de(n);return p.jsx(xp,{...o,...r,ref:t})});jp.displayName=Dp;var Lp="DropdownMenuRadioItem",Fp=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=de(n);return p.jsx(wp,{...o,...r,ref:t})});Fp.displayName=Lp;var $p="DropdownMenuItemIndicator",Vp=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=de(n);return p.jsx(yp,{...o,...r,ref:t})});Vp.displayName=$p;var Hp="DropdownMenuSeparator",ri=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=de(n);return p.jsx(Cp,{...o,...r,ref:t})});ri.displayName=Hp;var Wp="DropdownMenuArrow",zp=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=de(n);return p.jsx(Ep,{...o,...r,ref:t})});zp.displayName=Wp;var Bp="DropdownMenuSubTrigger",Gp=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=de(n);return p.jsx(Sp,{...o,...r,ref:t})});Gp.displayName=Bp;var Up="DropdownMenuSubContent",Kp=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=de(n);return p.jsx(Rp,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Kp.displayName=Up;var Yp=qa,qp=Za,Xp=Ja,Zp=ei,Jp=ti,Qp=ni,e0=ri;function t0({...e}){return p.jsx(Yp,{"data-slot":"dropdown-menu",...e})}function n0({...e}){return p.jsx(qp,{"data-slot":"dropdown-menu-trigger",...e})}function r0({className:e,sideOffset:t=4,...n}){return p.jsx(Xp,{children:p.jsx(Zp,{"data-slot":"dropdown-menu-content",sideOffset:t,className:B("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function oi({className:e,inset:t,variant:n="default",...r}){return p.jsx(Qp,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:B("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function o0({className:e,inset:t,...n}){return p.jsx(Jp,{"data-slot":"dropdown-menu-label","data-inset":t,className:B("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function s0({className:e,...t}){return p.jsx(e0,{"data-slot":"dropdown-menu-separator",className:B("bg-border -mx-1 my-1 h-px",e),...t})}const a0=()=>{const{user:e,error:t,isLoading:n}=Ui(),r=()=>{window.location.href="/auth/logout"};return n?p.jsx("div",{className:"h-10 w-10 animate-pulse rounded-full bg-gray-200"}):t?p.jsxs("div",{children:["Error: ",t.message]}):e?p.jsx("div",{className:"relative flex items-center gap-3",children:p.jsxs(t0,{children:[p.jsx(n0,{asChild:!0,children:p.jsx(jn,{variant:"ghost",size:"lg",className:"rounded-full cursor-pointer p-0",children:e.picture?p.jsx("img",{src:e.picture,alt:e.name||"User profile",width:40,height:40,className:"rounded-full"}):p.jsx(oo,{className:"h-5 w-5 text-gray-500"})})}),p.jsxs(r0,{align:"end",className:"w-72",children:[p.jsx(o0,{children:p.jsx("div",{className:"flex flex-col space-y-1",children:p.jsxs("div",{className:"flex flex-col space-y-1",children:[p.jsx("p",{className:"text-xs text-gray-500",children:e.name}),p.jsx("p",{className:"truncate text-xs text-gray-500",children:e.email})]})})}),p.jsx(s0,{}),p.jsx(oi,{asChild:!0,children:p.jsxs("a",{href:"/profile",className:"flex w-full cursor-default",children:[p.jsx(oo,{className:"mr-2 h-4 w-4"}),p.jsx("span",{children:"Profile"})]})}),p.jsxs(oi,{onClick:r,children:[p.jsx(rc,{className:"mr-2 h-4 w-4"}),p.jsx("span",{children:"Sign out"})]})]})]})}):null},i0=()=>p.jsx("div",{className:"sticky top-0 z-50",children:p.jsxs("header",{className:"flex h-16 items-center justify-between border-b bg-white px-4",children:[p.jsxs("div",{className:"flex h-full items-center gap-4 flex-1 min-w-0 overflow-hidden",children:[p.jsx(lf,{}),p.jsx(No,{orientation:"vertical"})]}),p.jsx("div",{className:"flex-shrink-0",children:p.jsx(a0,{})})]})}),c0=({children:e})=>p.jsx(Ki,{children:p.jsx(af,{children:p.jsxs("div",{className:"flex h-screen w-full",children:[p.jsx(Ef,{}),p.jsxs(df,{className:"flex-1 flex flex-col min-w-0",children:[p.jsx(i0,{}),p.jsx("main",{className:"flex-1 bg-white",id:"page-content",children:e})]})]})})});Fe.GLICloudProvider=c0,Object.defineProperty(Fe,Symbol.toStringTag,{value:"Module"})});
157
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return S.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},hg="DialogDescriptionWarning",pg=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${nu(hg).contentName}}.`;return S.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},mg=qc,gg=zc,ou=Vc,su=Jc,au=Yc,iu=Qc,yg=tu;const bg=mg,wg=gg,cu=S.forwardRef(({className:e,...t},r)=>A.jsx(ou,{className:ie("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));cu.displayName=ou.displayName;const vg=Zi("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),uu=S.forwardRef(({side:e="right",className:t,children:r,...n},o)=>A.jsxs(wg,{children:[A.jsx(cu,{}),A.jsxs(su,{ref:o,className:ie(vg({side:e}),t),...n,children:[r,A.jsxs(yg,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[A.jsx(np,{className:"h-4 w-4"}),A.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));uu.displayName=su.displayName;const lu=({className:e,...t})=>A.jsx("div",{className:ie("flex flex-col space-y-2 text-center sm:text-left",e),...t});lu.displayName="SheetHeader";const du=S.forwardRef(({className:e,...t},r)=>A.jsx(au,{ref:r,className:ie("text-lg font-semibold text-foreground",e),...t}));du.displayName=au.displayName;const fu=S.forwardRef(({className:e,...t},r)=>A.jsx(iu,{ref:r,className:ie("text-sm text-muted-foreground",e),...t}));fu.displayName=iu.displayName;const Eg=["top","right","bottom","left"],Ct=Math.min,qe=Math.max,bn=Math.round,wn=Math.floor,at=e=>({x:e,y:e}),_g={left:"right",right:"left",bottom:"top",top:"bottom"},Sg={start:"end",end:"start"};function Jo(e,t,r){return qe(e,Ct(t,r))}function bt(e,t){return typeof e=="function"?e(t):e}function wt(e){return e.split("-")[0]}function ur(e){return e.split("-")[1]}function Xo(e){return e==="x"?"y":"x"}function Yo(e){return e==="y"?"height":"width"}function it(e){return["top","bottom"].includes(wt(e))?"y":"x"}function Zo(e){return Xo(it(e))}function xg(e,t,r){r===void 0&&(r=!1);const n=ur(e),o=Zo(e),s=Yo(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=vn(a)),[a,vn(a)]}function Ag(e){const t=vn(e);return[Qo(e),t,Qo(t)]}function Qo(e){return e.replace(/start|end/g,t=>Sg[t])}function Rg(e,t,r){const n=["left","right"],o=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?s:a;default:return[]}}function Cg(e,t,r,n){const o=ur(e);let s=Rg(wt(e),r==="start",n);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(Qo)))),s}function vn(e){return e.replace(/left|right|bottom|top/g,t=>_g[t])}function Tg(e){return{top:0,right:0,bottom:0,left:0,...e}}function hu(e){return typeof e!="number"?Tg(e):{top:e,right:e,bottom:e,left:e}}function En(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function pu(e,t,r){let{reference:n,floating:o}=e;const s=it(t),a=Zo(t),i=Yo(a),c=wt(t),u=s==="y",l=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,h=n[i]/2-o[i]/2;let g;switch(c){case"top":g={x:l,y:n.y-o.height};break;case"bottom":g={x:l,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:d};break;case"left":g={x:n.x-o.width,y:d};break;default:g={x:n.x,y:n.y}}switch(ur(t)){case"start":g[a]-=h*(r&&u?-1:1);break;case"end":g[a]+=h*(r&&u?-1:1);break}return g}const Pg=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:a}=r,i=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:d}=pu(u,n,c),h=n,g={},E=0;for(let b=0;b<i.length;b++){const{name:m,fn:p}=i[b],{x:y,y:f,data:x,reset:v}=await p({x:l,y:d,initialPlacement:n,placement:h,strategy:o,middlewareData:g,rects:u,platform:a,elements:{reference:e,floating:t}});l=y??l,d=f??d,g={...g,[m]:{...g[m],...x}},v&&E<=50&&(E++,typeof v=="object"&&(v.placement&&(h=v.placement),v.rects&&(u=v.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):v.rects),{x:l,y:d}=pu(u,h,c)),b=-1)}return{x:l,y:d,placement:h,strategy:o,middlewareData:g}};async function Nr(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:a,elements:i,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:l="viewport",elementContext:d="floating",altBoundary:h=!1,padding:g=0}=bt(t,e),E=hu(g),m=i[h?d==="floating"?"reference":"floating":d],p=En(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(m)))==null||r?m:m.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:u,rootBoundary:l,strategy:c})),y=d==="floating"?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,f=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),x=await(s.isElement==null?void 0:s.isElement(f))?await(s.getScale==null?void 0:s.getScale(f))||{x:1,y:1}:{x:1,y:1},v=En(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:f,strategy:c}):y);return{top:(p.top-v.top+E.top)/x.y,bottom:(v.bottom-p.bottom+E.bottom)/x.y,left:(p.left-v.left+E.left)/x.x,right:(v.right-p.right+E.right)/x.x}}const Og=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:a,elements:i,middlewareData:c}=t,{element:u,padding:l=0}=bt(e,t)||{};if(u==null)return{};const d=hu(l),h={x:r,y:n},g=Zo(o),E=Yo(g),b=await a.getDimensions(u),m=g==="y",p=m?"top":"left",y=m?"bottom":"right",f=m?"clientHeight":"clientWidth",x=s.reference[E]+s.reference[g]-h[g]-s.floating[E],v=h[g]-s.reference[g],R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let w=R?R[f]:0;(!w||!await(a.isElement==null?void 0:a.isElement(R)))&&(w=i.floating[f]||s.floating[E]);const _=x/2-v/2,C=w/2-b[E]/2-1,D=Ct(d[p],C),I=Ct(d[y],C),P=D,H=w-b[E]-I,q=w/2-b[E]/2+_,re=Jo(P,q,H),B=!c.arrow&&ur(o)!=null&&q!==re&&s.reference[E]/2-(q<P?D:I)-b[E]/2<0,J=B?q<P?q-P:q-H:0;return{[g]:h[g]+J,data:{[g]:re,centerOffset:q-re-J,...B&&{alignmentOffset:J}},reset:B}}}),kg=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:c,elements:u}=t,{mainAxis:l=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:b=!0,...m}=bt(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const p=wt(o),y=it(i),f=wt(i)===i,x=await(c.isRTL==null?void 0:c.isRTL(u.floating)),v=h||(f||!b?[vn(i)]:Ag(i)),R=E!=="none";!h&&R&&v.push(...Cg(i,b,E,x));const w=[i,...v],_=await Nr(t,m),C=[];let D=((n=s.flip)==null?void 0:n.overflows)||[];if(l&&C.push(_[p]),d){const q=xg(o,a,x);C.push(_[q[0]],_[q[1]])}if(D=[...D,{placement:o,overflows:C}],!C.every(q=>q<=0)){var I,P;const q=(((I=s.flip)==null?void 0:I.index)||0)+1,re=w[q];if(re&&(!(d==="alignment"?y!==it(re):!1)||D.every(O=>O.overflows[0]>0&&it(O.placement)===y)))return{data:{index:q,overflows:D},reset:{placement:re}};let B=(P=D.filter(J=>J.overflows[0]<=0).sort((J,O)=>J.overflows[1]-O.overflows[1])[0])==null?void 0:P.placement;if(!B)switch(g){case"bestFit":{var H;const J=(H=D.filter(O=>{if(R){const L=it(O.placement);return L===y||L==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(L=>L>0).reduce((L,T)=>L+T,0)]).sort((O,L)=>O[1]-L[1])[0])==null?void 0:H[0];J&&(B=J);break}case"initialPlacement":B=i;break}if(o!==B)return{reset:{placement:B}}}return{}}}};function mu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function gu(e){return Eg.some(t=>e[t]>=0)}const Ng=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=bt(e,t);switch(n){case"referenceHidden":{const s=await Nr(t,{...o,elementContext:"reference"}),a=mu(s,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:gu(a)}}}case"escaped":{const s=await Nr(t,{...o,altBoundary:!0}),a=mu(s,r.floating);return{data:{escapedOffsets:a,escaped:gu(a)}}}default:return{}}}}};async function Ig(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=wt(r),i=ur(r),c=it(r)==="y",u=["left","top"].includes(a)?-1:1,l=s&&c?-1:1,d=bt(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:E}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof E=="number"&&(g=i==="end"?E*-1:E),c?{x:g*l,y:h*u}:{x:h*u,y:g*l}}const Dg=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:a,middlewareData:i}=t,c=await Ig(t,e);return a===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},Mg=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:m=>{let{x:p,y}=m;return{x:p,y}}},...c}=bt(e,t),u={x:r,y:n},l=await Nr(t,c),d=it(wt(o)),h=Xo(d);let g=u[h],E=u[d];if(s){const m=h==="y"?"top":"left",p=h==="y"?"bottom":"right",y=g+l[m],f=g-l[p];g=Jo(y,g,f)}if(a){const m=d==="y"?"top":"left",p=d==="y"?"bottom":"right",y=E+l[m],f=E-l[p];E=Jo(y,E,f)}const b=i.fn({...t,[h]:g,[d]:E});return{...b,data:{x:b.x-r,y:b.y-n,enabled:{[h]:s,[d]:a}}}}}},Lg=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:c=!0,crossAxis:u=!0}=bt(e,t),l={x:r,y:n},d=it(o),h=Xo(d);let g=l[h],E=l[d];const b=bt(i,t),m=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(c){const f=h==="y"?"height":"width",x=s.reference[h]-s.floating[f]+m.mainAxis,v=s.reference[h]+s.reference[f]-m.mainAxis;g<x?g=x:g>v&&(g=v)}if(u){var p,y;const f=h==="y"?"width":"height",x=["top","left"].includes(wt(o)),v=s.reference[d]-s.floating[f]+(x&&((p=a.offset)==null?void 0:p[d])||0)+(x?0:m.crossAxis),R=s.reference[d]+s.reference[f]+(x?0:((y=a.offset)==null?void 0:y[d])||0)-(x?m.crossAxis:0);E<v?E=v:E>R&&(E=R)}return{[h]:g,[d]:E}}}},jg=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:s,platform:a,elements:i}=t,{apply:c=()=>{},...u}=bt(e,t),l=await Nr(t,u),d=wt(o),h=ur(o),g=it(o)==="y",{width:E,height:b}=s.floating;let m,p;d==="top"||d==="bottom"?(m=d,p=h===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(p=d,m=h==="end"?"top":"bottom");const y=b-l.top-l.bottom,f=E-l.left-l.right,x=Ct(b-l[m],y),v=Ct(E-l[p],f),R=!t.middlewareData.shift;let w=x,_=v;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(_=f),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(w=y),R&&!h){const D=qe(l.left,0),I=qe(l.right,0),P=qe(l.top,0),H=qe(l.bottom,0);g?_=E-2*(D!==0||I!==0?D+I:qe(l.left,l.right)):w=b-2*(P!==0||H!==0?P+H:qe(l.top,l.bottom))}await c({...t,availableWidth:_,availableHeight:w});const C=await a.getDimensions(i.floating);return E!==C.width||b!==C.height?{reset:{rects:!0}}:{}}}};function _n(){return typeof window<"u"}function lr(e){return yu(e)?(e.nodeName||"").toLowerCase():"#document"}function Ge(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ct(e){var t;return(t=(yu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yu(e){return _n()?e instanceof Node||e instanceof Ge(e).Node:!1}function rt(e){return _n()?e instanceof Element||e instanceof Ge(e).Element:!1}function ut(e){return _n()?e instanceof HTMLElement||e instanceof Ge(e).HTMLElement:!1}function bu(e){return!_n()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ge(e).ShadowRoot}function Ir(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=nt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function Hg(e){return["table","td","th"].includes(lr(e))}function Sn(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function es(e){const t=ts(),r=rt(e)?nt(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Ug(e){let t=Tt(e);for(;ut(t)&&!dr(t);){if(es(t))return t;if(Sn(t))return null;t=Tt(t)}return null}function ts(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function dr(e){return["html","body","#document"].includes(lr(e))}function nt(e){return Ge(e).getComputedStyle(e)}function xn(e){return rt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Tt(e){if(lr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bu(e)&&e.host||ct(e);return bu(t)?t.host:t}function wu(e){const t=Tt(e);return dr(t)?e.ownerDocument?e.ownerDocument.body:e.body:ut(t)&&Ir(t)?t:wu(t)}function Dr(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=wu(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),a=Ge(o);if(s){const i=rs(a);return t.concat(a,a.visualViewport||[],Ir(o)?o:[],i&&r?Dr(i):[])}return t.concat(o,Dr(o,[],r))}function rs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vu(e){const t=nt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=ut(e),s=o?e.offsetWidth:r,a=o?e.offsetHeight:n,i=bn(r)!==s||bn(n)!==a;return i&&(r=s,n=a),{width:r,height:n,$:i}}function ns(e){return rt(e)?e:e.contextElement}function fr(e){const t=ns(e);if(!ut(t))return at(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=vu(t);let a=(s?bn(r.width):r.width)/n,i=(s?bn(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const Wg=at(0);function Eu(e){const t=Ge(e);return!ts()||!t.visualViewport?Wg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $g(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Ge(e)?!1:t}function Wt(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=ns(e);let a=at(1);t&&(n?rt(n)&&(a=fr(n)):a=fr(e));const i=$g(s,r,n)?Eu(s):at(0);let c=(o.left+i.x)/a.x,u=(o.top+i.y)/a.y,l=o.width/a.x,d=o.height/a.y;if(s){const h=Ge(s),g=n&&rt(n)?Ge(n):n;let E=h,b=rs(E);for(;b&&n&&g!==E;){const m=fr(b),p=b.getBoundingClientRect(),y=nt(b),f=p.left+(b.clientLeft+parseFloat(y.paddingLeft))*m.x,x=p.top+(b.clientTop+parseFloat(y.paddingTop))*m.y;c*=m.x,u*=m.y,l*=m.x,d*=m.y,c+=f,u+=x,E=Ge(b),b=rs(E)}}return En({width:l,height:d,x:c,y:u})}function os(e,t){const r=xn(e).scrollLeft;return t?t.left+r:Wt(ct(e)).left+r}function _u(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(r?0:os(e,n)),s=n.top+t.scrollTop;return{x:o,y:s}}function Fg(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",a=ct(n),i=t?Sn(t.floating):!1;if(n===a||i&&s)return r;let c={scrollLeft:0,scrollTop:0},u=at(1);const l=at(0),d=ut(n);if((d||!d&&!s)&&((lr(n)!=="body"||Ir(a))&&(c=xn(n)),ut(n))){const g=Wt(n);u=fr(n),l.x=g.x+n.clientLeft,l.y=g.y+n.clientTop}const h=a&&!d&&!s?_u(a,c,!0):at(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+l.x+h.x,y:r.y*u.y-c.scrollTop*u.y+l.y+h.y}}function Kg(e){return Array.from(e.getClientRects())}function qg(e){const t=ct(e),r=xn(e),n=e.ownerDocument.body,o=qe(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=qe(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+os(e);const i=-r.scrollTop;return nt(n).direction==="rtl"&&(a+=qe(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:a,y:i}}function Gg(e,t){const r=Ge(e),n=ct(e),o=r.visualViewport;let s=n.clientWidth,a=n.clientHeight,i=0,c=0;if(o){s=o.width,a=o.height;const u=ts();(!u||u&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}return{width:s,height:a,x:i,y:c}}function Bg(e,t){const r=Wt(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=ut(e)?fr(e):at(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,c=o*s.x,u=n*s.y;return{width:a,height:i,x:c,y:u}}function Su(e,t,r){let n;if(t==="viewport")n=Gg(e,r);else if(t==="document")n=qg(ct(e));else if(rt(t))n=Bg(t,r);else{const o=Eu(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return En(n)}function xu(e,t){const r=Tt(e);return r===t||!rt(r)||dr(r)?!1:nt(r).position==="fixed"||xu(r,t)}function zg(e,t){const r=t.get(e);if(r)return r;let n=Dr(e,[],!1).filter(i=>rt(i)&&lr(i)!=="body"),o=null;const s=nt(e).position==="fixed";let a=s?Tt(e):e;for(;rt(a)&&!dr(a);){const i=nt(a),c=es(a);!c&&i.position==="fixed"&&(o=null),(s?!c&&!o:!c&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ir(a)&&!c&&xu(e,a))?n=n.filter(l=>l!==a):o=i,a=Tt(a)}return t.set(e,n),n}function Vg(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?Sn(t)?[]:zg(t,this._c):[].concat(r),n],i=a[0],c=a.reduce((u,l)=>{const d=Su(t,l,o);return u.top=qe(d.top,u.top),u.right=Ct(d.right,u.right),u.bottom=Ct(d.bottom,u.bottom),u.left=qe(d.left,u.left),u},Su(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Jg(e){const{width:t,height:r}=vu(e);return{width:t,height:r}}function Xg(e,t,r){const n=ut(t),o=ct(t),s=r==="fixed",a=Wt(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const c=at(0);function u(){c.x=os(o)}if(n||!n&&!s)if((lr(t)!=="body"||Ir(o))&&(i=xn(t)),n){const g=Wt(t,!0,s,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else o&&u();s&&!n&&o&&u();const l=o&&!n&&!s?_u(o,i):at(0),d=a.left+i.scrollLeft-c.x-l.x,h=a.top+i.scrollTop-c.y-l.y;return{x:d,y:h,width:a.width,height:a.height}}function ss(e){return nt(e).position==="static"}function Au(e,t){if(!ut(e)||nt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ct(e)===r&&(r=r.ownerDocument.body),r}function Ru(e,t){const r=Ge(e);if(Sn(e))return r;if(!ut(e)){let o=Tt(e);for(;o&&!dr(o);){if(rt(o)&&!ss(o))return o;o=Tt(o)}return r}let n=Au(e,t);for(;n&&Hg(n)&&ss(n);)n=Au(n,t);return n&&dr(n)&&ss(n)&&!es(n)?r:n||Ug(e)||r}const Yg=async function(e){const t=this.getOffsetParent||Ru,r=this.getDimensions,n=await r(e.floating);return{reference:Xg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Zg(e){return nt(e).direction==="rtl"}const Qg={convertOffsetParentRelativeRectToViewportRelativeRect:Fg,getDocumentElement:ct,getClippingRect:Vg,getOffsetParent:Ru,getElementRects:Yg,getClientRects:Kg,getDimensions:Jg,getScale:fr,isElement:rt,isRTL:Zg};function Cu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ey(e,t){let r=null,n;const o=ct(e);function s(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:l,top:d,width:h,height:g}=u;if(i||t(),!h||!g)return;const E=wn(d),b=wn(o.clientWidth-(l+h)),m=wn(o.clientHeight-(d+g)),p=wn(l),f={rootMargin:-E+"px "+-b+"px "+-m+"px "+-p+"px",threshold:qe(0,Ct(1,c))||1};let x=!0;function v(R){const w=R[0].intersectionRatio;if(w!==c){if(!x)return a();w?a(!1,w):n=setTimeout(()=>{a(!1,1e-7)},1e3)}w===1&&!Cu(u,e.getBoundingClientRect())&&a(),x=!1}try{r=new IntersectionObserver(v,{...f,root:o.ownerDocument})}catch{r=new IntersectionObserver(v,f)}r.observe(e)}return a(!0),s}function ty(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=ns(e),l=o||s?[...u?Dr(u):[],...Dr(t)]:[];l.forEach(p=>{o&&p.addEventListener("scroll",r,{passive:!0}),s&&p.addEventListener("resize",r)});const d=u&&i?ey(u,r):null;let h=-1,g=null;a&&(g=new ResizeObserver(p=>{let[y]=p;y&&y.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var f;(f=g)==null||f.observe(t)})),r()}),u&&!c&&g.observe(u),g.observe(t));let E,b=c?Wt(e):null;c&&m();function m(){const p=Wt(e);b&&!Cu(b,p)&&r(),b=p,E=requestAnimationFrame(m)}return r(),()=>{var p;l.forEach(y=>{o&&y.removeEventListener("scroll",r),s&&y.removeEventListener("resize",r)}),d==null||d(),(p=g)==null||p.disconnect(),g=null,c&&cancelAnimationFrame(E)}}const ry=Dg,ny=Mg,oy=kg,sy=jg,ay=Ng,Tu=Og,iy=Lg,cy=(e,t,r)=>{const n=new Map,o={platform:Qg,...r},s={...o.platform,_c:n};return Pg(e,t,{...o,platform:s})};var uy=typeof document<"u",ly=function(){},An=uy?K.useLayoutEffect:ly;function Rn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Rn(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!Rn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Pu(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ou(e,t){const r=Pu(e);return Math.round(t*r)/r}function as(e){const t=S.useRef(e);return An(()=>{t.current=e}),t}function dy(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:c,open:u}=e,[l,d]=S.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=S.useState(n);Rn(h,n)||g(n);const[E,b]=S.useState(null),[m,p]=S.useState(null),y=S.useCallback(O=>{O!==R.current&&(R.current=O,b(O))},[]),f=S.useCallback(O=>{O!==w.current&&(w.current=O,p(O))},[]),x=s||E,v=a||m,R=S.useRef(null),w=S.useRef(null),_=S.useRef(l),C=c!=null,D=as(c),I=as(o),P=as(u),H=S.useCallback(()=>{if(!R.current||!w.current)return;const O={placement:t,strategy:r,middleware:h};I.current&&(O.platform=I.current),cy(R.current,w.current,O).then(L=>{const T={...L,isPositioned:P.current!==!1};q.current&&!Rn(_.current,T)&&(_.current=T,pi.flushSync(()=>{d(T)}))})},[h,t,r,I,P]);An(()=>{u===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,d(O=>({...O,isPositioned:!1})))},[u]);const q=S.useRef(!1);An(()=>(q.current=!0,()=>{q.current=!1}),[]),An(()=>{if(x&&(R.current=x),v&&(w.current=v),x&&v){if(D.current)return D.current(x,v,H);H()}},[x,v,H,D,C]);const re=S.useMemo(()=>({reference:R,floating:w,setReference:y,setFloating:f}),[y,f]),B=S.useMemo(()=>({reference:x,floating:v}),[x,v]),J=S.useMemo(()=>{const O={position:r,left:0,top:0};if(!B.floating)return O;const L=Ou(B.floating,l.x),T=Ou(B.floating,l.y);return i?{...O,transform:"translate("+L+"px, "+T+"px)",...Pu(B.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:L,top:T}},[r,i,B.floating,l.x,l.y]);return S.useMemo(()=>({...l,update:H,refs:re,elements:B,floatingStyles:J}),[l,H,re,B,J])}const fy=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Tu({element:n.current,padding:o}).fn(r):{}:n?Tu({element:n,padding:o}).fn(r):{}}}},hy=(e,t)=>({...ry(e),options:[e,t]}),py=(e,t)=>({...ny(e),options:[e,t]}),my=(e,t)=>({...iy(e),options:[e,t]}),gy=(e,t)=>({...oy(e),options:[e,t]}),yy=(e,t)=>({...sy(e),options:[e,t]}),by=(e,t)=>({...ay(e),options:[e,t]}),wy=(e,t)=>({...fy(e),options:[e,t]});var vy="Arrow",ku=S.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...s}=e;return A.jsx(Se.svg,{...s,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:A.jsx("polygon",{points:"0,0 30,0 15,10"})})});ku.displayName=vy;var Ey=ku;function _y(e){const[t,r]=S.useState(void 0);return At(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,i=u.blockSize}else a=e.offsetWidth,i=e.offsetHeight;r({width:a,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var is="Popper",[Nu,Cn]=Ht(is),[Sy,Iu]=Nu(is),Du=e=>{const{__scopePopper:t,children:r}=e,[n,o]=S.useState(null);return A.jsx(Sy,{scope:t,anchor:n,onAnchorChange:o,children:r})};Du.displayName=is;var Mu="PopperAnchor",Lu=S.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,s=Iu(Mu,r),a=S.useRef(null),i=Ce(t,a);return S.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||a.current)}),n?null:A.jsx(Se.div,{...o,ref:i})});Lu.displayName=Mu;var cs="PopperContent",[xy,Ay]=Nu(cs),ju=S.forwardRef((e,t)=>{var Q,ue,ce,ye,k,N;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:l=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:E,...b}=e,m=Iu(cs,r),[p,y]=S.useState(null),f=Ce(t,M=>y(M)),[x,v]=S.useState(null),R=_y(x),w=(R==null?void 0:R.width)??0,_=(R==null?void 0:R.height)??0,C=n+(s!=="center"?"-"+s:""),D=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},I=Array.isArray(u)?u:[u],P=I.length>0,H={padding:D,boundary:I.filter(Cy),altBoundary:P},{refs:q,floatingStyles:re,placement:B,isPositioned:J,middlewareData:O}=dy({strategy:"fixed",placement:C,whileElementsMounted:(...M)=>ty(...M,{animationFrame:g==="always"}),elements:{reference:m.anchor},middleware:[hy({mainAxis:o+_,alignmentAxis:a}),c&&py({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?my():void 0,...H}),c&&gy({...H}),yy({...H,apply:({elements:M,rects:F,availableWidth:ee,availableHeight:U})=>{const{width:Ee,height:Re}=F.reference,he=M.floating.style;he.setProperty("--radix-popper-available-width",`${ee}px`),he.setProperty("--radix-popper-available-height",`${U}px`),he.setProperty("--radix-popper-anchor-width",`${Ee}px`),he.setProperty("--radix-popper-anchor-height",`${Re}px`)}}),x&&wy({element:x,padding:i}),Ty({arrowWidth:w,arrowHeight:_}),h&&by({strategy:"referenceHidden",...H})]}),[L,T]=Wu(B),j=gt(E);At(()=>{J&&(j==null||j())},[J,j]);const z=(Q=O.arrow)==null?void 0:Q.x,V=(ue=O.arrow)==null?void 0:ue.y,ne=((ce=O.arrow)==null?void 0:ce.centerOffset)!==0,[de,be]=S.useState();return At(()=>{p&&be(window.getComputedStyle(p).zIndex)},[p]),A.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:J?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[(ye=O.transformOrigin)==null?void 0:ye.x,(k=O.transformOrigin)==null?void 0:k.y].join(" "),...((N=O.hide)==null?void 0:N.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:A.jsx(xy,{scope:r,placedSide:L,onArrowChange:v,arrowX:z,arrowY:V,shouldHideArrow:ne,children:A.jsx(Se.div,{"data-side":L,"data-align":T,...b,ref:f,style:{...b.style,animation:J?void 0:"none"}})})})});ju.displayName=cs;var Hu="PopperArrow",Ry={top:"bottom",right:"left",bottom:"top",left:"right"},Uu=S.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,s=Ay(Hu,n),a=Ry[s.placedSide];return A.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:A.jsx(Ey,{...o,ref:r,style:{...o.style,display:"block"}})})});Uu.displayName=Hu;function Cy(e){return e!==null}var Ty=e=>({name:"transformOrigin",options:e,fn(t){var m,p,y;const{placement:r,rects:n,middlewareData:o}=t,a=((m=o.arrow)==null?void 0:m.centerOffset)!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,l]=Wu(r),d={start:"0%",center:"50%",end:"100%"}[l],h=(((p=o.arrow)==null?void 0:p.x)??0)+i/2,g=(((y=o.arrow)==null?void 0:y.y)??0)+c/2;let E="",b="";return u==="bottom"?(E=a?d:`${h}px`,b=`${-c}px`):u==="top"?(E=a?d:`${h}px`,b=`${n.floating.height+c}px`):u==="right"?(E=`${-c}px`,b=a?d:`${g}px`):u==="left"&&(E=`${n.floating.width+c}px`,b=a?d:`${g}px`),{data:{x:E,y:b}}}});function Wu(e){const[t,r="center"]=e.split("-");return[t,r]}var Py=Du,$u=Lu,Fu=ju,Ku=Uu,Oy=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ky="VisuallyHidden",qu=S.forwardRef((e,t)=>A.jsx(Se.span,{...e,ref:t,style:{...Oy,...e.style}}));qu.displayName=ky;var Ny=qu,[Tn,xS]=Ht("Tooltip",[Cn]),us=Cn(),Gu="TooltipProvider",Iy=700,Bu="tooltip.open",[Dy,zu]=Tn(Gu),Vu=e=>{const{__scopeTooltip:t,delayDuration:r=Iy,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:s}=e,a=S.useRef(!0),i=S.useRef(!1),c=S.useRef(0);return S.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),A.jsx(Dy,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:S.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:S.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:i,onPointerInTransitChange:S.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:s})};Vu.displayName=Gu;var Ju="Tooltip",[AS,Pn]=Tn(Ju),ls="TooltipTrigger",My=S.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Pn(ls,r),s=zu(ls,r),a=us(r),i=S.useRef(null),c=Ce(t,i,o.onTriggerChange),u=S.useRef(!1),l=S.useRef(!1),d=S.useCallback(()=>u.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),A.jsx($u,{asChild:!0,...a,children:A.jsx(Se.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:c,onPointerMove:X(e.onPointerMove,h=>{h.pointerType!=="touch"&&!l.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),l.current=!0)}),onPointerLeave:X(e.onPointerLeave,()=>{o.onTriggerLeave(),l.current=!1}),onPointerDown:X(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:X(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:X(e.onBlur,o.onClose),onClick:X(e.onClick,o.onClose)})})});My.displayName=ls;var Ly="TooltipPortal",[RS,jy]=Tn(Ly,{forceMount:void 0}),hr="TooltipContent",Xu=S.forwardRef((e,t)=>{const r=jy(hr,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...s}=e,a=Pn(hr,e.__scopeTooltip);return A.jsx(yt,{present:n||a.open,children:a.disableHoverableContent?A.jsx(Yu,{side:o,...s,ref:t}):A.jsx(Hy,{side:o,...s,ref:t})})}),Hy=S.forwardRef((e,t)=>{const r=Pn(hr,e.__scopeTooltip),n=zu(hr,e.__scopeTooltip),o=S.useRef(null),s=Ce(t,o),[a,i]=S.useState(null),{trigger:c,onClose:u}=r,l=o.current,{onPointerInTransitChange:d}=n,h=S.useCallback(()=>{i(null),d(!1)},[d]),g=S.useCallback((E,b)=>{const m=E.currentTarget,p={x:E.clientX,y:E.clientY},y=Ky(p,m.getBoundingClientRect()),f=qy(p,y),x=Gy(b.getBoundingClientRect()),v=zy([...f,...x]);i(v),d(!0)},[d]);return S.useEffect(()=>()=>h(),[h]),S.useEffect(()=>{if(c&&l){const E=m=>g(m,l),b=m=>g(m,c);return c.addEventListener("pointerleave",E),l.addEventListener("pointerleave",b),()=>{c.removeEventListener("pointerleave",E),l.removeEventListener("pointerleave",b)}}},[c,l,g,h]),S.useEffect(()=>{if(a){const E=b=>{const m=b.target,p={x:b.clientX,y:b.clientY},y=(c==null?void 0:c.contains(m))||(l==null?void 0:l.contains(m)),f=!By(p,a);y?h():f&&(h(),u())};return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[c,l,a,u,h]),A.jsx(Yu,{...e,ref:s})}),[Uy,Wy]=Tn(Ju,{isInside:!1}),$y=sp("TooltipContent"),Yu=S.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...i}=e,c=Pn(hr,r),u=us(r),{onClose:l}=c;return S.useEffect(()=>(document.addEventListener(Bu,l),()=>document.removeEventListener(Bu,l)),[l]),S.useEffect(()=>{if(c.trigger){const d=h=>{const g=h.target;g!=null&&g.contains(c.trigger)&&l()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,l]),A.jsx(an,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:l,children:A.jsxs(Fu,{"data-state":c.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[A.jsx($y,{children:n}),A.jsx(Uy,{scope:r,isInside:!0,children:A.jsx(Ny,{id:c.contentId,role:"tooltip",children:o||n})})]})})});Xu.displayName=hr;var Zu="TooltipArrow",Fy=S.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=us(r);return Wy(Zu,r).isInside?null:A.jsx(Ku,{...o,...n,ref:t})});Fy.displayName=Zu;function Ky(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,n,o,s)){case s:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function qy(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function Gy(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function By(e,t){const{x:r,y:n}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],c=t[a],u=i.x,l=i.y,d=c.x,h=c.y;l>n!=h>n&&r<(d-u)*(n-l)/(h-l)+u&&(o=!o)}return o}function zy(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Vy(t)}function Vy(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const s=r[r.length-1],a=r[r.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Jy=Vu,Qu=Xu;const Xy=Jy,Yy=S.forwardRef(({className:e,sideOffset:t=4,...r},n)=>A.jsx(Qu,{ref:n,sideOffset:t,className:ie("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));Yy.displayName=Qu.displayName;const Zy="sidebar_state",Qy=60*60*24*7,eb="16rem",tb="18rem",rb="3rem",nb="b",el=S.createContext(null);function ds(){const e=S.useContext(el);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function ob({defaultOpen:e=!0,open:t,onOpenChange:r,className:n,style:o,children:s,...a}){const i=up(),[c,u]=S.useState(!1),[l,d]=S.useState(e),h=t??l,g=S.useCallback(p=>{const y=typeof p=="function"?p(h):p;r?r(y):d(y),document.cookie=`${Zy}=${y}; path=/; max-age=${Qy}`},[r,h]),E=S.useCallback(()=>i?u(p=>!p):g(p=>!p),[i,g,u]);S.useEffect(()=>{const p=y=>{y.key===nb&&(y.metaKey||y.ctrlKey)&&(y.preventDefault(),E())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[E]);const b=h?"expanded":"collapsed",m=S.useMemo(()=>({state:b,open:h,setOpen:g,isMobile:i,openMobile:c,setOpenMobile:u,toggleSidebar:E}),[b,h,g,i,c,u,E]);return A.jsx(el.Provider,{value:m,children:A.jsx(Xy,{delayDuration:0,children:A.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":eb,"--sidebar-width-icon":rb,...o},className:ie("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",n),...a,children:s})})})}function sb({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:n,children:o,...s}){const{isMobile:a,state:i,openMobile:c,setOpenMobile:u}=ds();return r==="none"?A.jsx("div",{"data-slot":"sidebar",className:ie("bg-white text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",n),...s,children:o}):a?A.jsx(bg,{open:c,onOpenChange:u,...s,children:A.jsxs(uu,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-white text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":tb},side:e,children:[A.jsxs(lu,{className:"sr-only",children:[A.jsx(du,{children:"Sidebar"}),A.jsx(fu,{children:"Displays the mobile sidebar."})]}),A.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):A.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":i,"data-collapsible":i==="collapsed"?r:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[A.jsx("div",{"data-slot":"sidebar-gap",className:ie("relative w-(--sidebar-width) bg-white transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),A.jsx("div",{"data-slot":"sidebar-container",className:ie("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...s,children:A.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-white group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col px-1 py-2 group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:o})})]})}function ab({className:e,onClick:t,...r}){const{toggleSidebar:n}=ds();return A.jsxs(No,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:ie("size-7",e),onClick:o=>{t==null||t(o),n()},...r,children:[A.jsx(rp,{}),A.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function ib({className:e,...t}){const{toggleSidebar:r}=ds();return A.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:ie("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}function cb({className:e,...t}){return A.jsx("main",{"data-slot":"sidebar-inset",className:ie("bg-white relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function ub({className:e,...t}){return A.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:ie("flex flex-col gap-2 p-2",e),...t})}function lb({className:e,...t}){return A.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:ie("flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function db({className:e,...t}){return A.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:ie("relative flex w-full min-w-0 flex-col px-2 py-1",e),...t})}function fb({className:e,...t}){return A.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:ie("w-full text-sm",e),...t})}function hb({className:e,...t}){return A.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:ie("border-sidebar-border mx-3 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t})}function pb({className:e,...t}){return A.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:ie("group/menu-sub-item relative",e),...t})}function mb({asChild:e=!1,size:t="md",isActive:r=!1,className:n,...o}){const s=e?Bi:"a";return A.jsx(s,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:ie("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",n),...o})}function gb({title:e,url:t,children:r,defaultOpen:n=!1,icon:o,isActive:s=!1}){const[a,i]=S.useState(n);return S.useEffect(()=>{s&&i(!0)},[s]),A.jsx(db,{children:A.jsxs("div",{className:"flex flex-col",children:[A.jsxs("div",{className:"flex flex-row items-center justify-between",children:[A.jsxs("a",{href:t,className:ie("flex flex-1 cursor-pointer items-center gap-2 rounded-lg p-2 transition-colors hover:bg-gray-100",s&&"bg-blue-50 text-blue-700 font-medium"),children:[o&&A.jsx("span",{className:ie(s?"text-blue-600":"text-gray-600"),children:o}),A.jsx("span",{className:ie(s&&"text-blue-700 font-medium"),children:e})]}),A.jsx("button",{type:"button",className:"mr-3 rounded-lg p-2 text-gray-500 hover:bg-gray-100 hover:text-gray-700",onClick:c=>{c.preventDefault(),c.stopPropagation(),i(!a)},"aria-label":a?"Collapse section":"Expand section",children:a?A.jsx(Qh,{className:"h-4 w-4"}):A.jsx(ep,{className:"h-4 w-4"})})]}),A.jsx("div",{className:ie("overflow-hidden transition-all",a?"max-h-96":"max-h-0"),children:r})]})})}const yb="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20141%2060'%3e%3cpath%20d='M0.059%2019.711V59.673H19.509V49.95H9.779V19.711H0.059Z'%20fill='%2385B9D1'%3e%3c/path%3e%3cpath%20d='M0%200L0.056%204.915V19.715H9.776V9.715H19.5V59.673H29.22V0H0Z'%20fill='%23F68029'%3e%3c/path%3e%3cpath%20d='M23.49%2019.717H9.776V29.439H23.49V19.717Z'%20fill='%23F68029'%3e%3c/path%3e%3cpath%20d='M0.0580006%2019.718L9.785%2029.445V19.718H0.0580006Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M9.777%2049.953L19.504%2059.679V49.953H9.777Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M50.213%2021.331C50.1839%2019.244%2050.325%2017.1581%2050.635%2015.094C50.8293%2013.6891%2051.2694%2012.3294%2051.935%2011.077C52.4295%2010.1519%2053.1979%209.4023%2054.135%208.93101C55.1033%208.49691%2056.1561%208.28375%2057.217%208.307C58.2628%208.27673%2059.3024%208.47715%2060.262%208.894C61.1441%209.33605%2061.8541%2010.059%2062.28%2010.949C62.8725%2012.1976%2063.2507%2013.5369%2063.399%2014.911C63.6554%2016.9922%2063.7717%2019.0882%2063.747%2021.185C63.7759%2023.338%2063.6421%2025.4901%2063.347%2027.623C63.1657%2029.0675%2062.7378%2030.4702%2062.082%2031.77C61.6022%2032.7122%2060.8471%2033.4862%2059.917%2033.989C58.9503%2034.4507%2057.888%2034.6768%2056.817%2034.649C55.7687%2034.6771%2054.7258%2034.4896%2053.753%2034.098C52.8534%2033.6775%2052.1275%2032.9579%2051.699%2032.062C51.0884%2030.7803%2050.7037%2029.4027%2050.562%2027.99C50.3018%2025.7802%2050.1852%2023.5559%2050.213%2021.331ZM54.913%2022.248C54.913%2023.6913%2054.9377%2024.9267%2054.987%2025.954C55.0147%2026.8043%2055.1127%2027.6509%2055.28%2028.485C55.3666%2029.0149%2055.5877%2029.5138%2055.922%2029.934C56.0643%2030.0868%2056.238%2030.207%2056.4312%2030.2862C56.6244%2030.3655%2056.8324%2030.4019%2057.041%2030.393C57.25%2030.3964%2057.4571%2030.3533%2057.6473%2030.2668C57.8375%2030.1803%2058.0062%2030.0526%2058.141%2029.893C58.4964%2029.4241%2058.7297%2028.8744%2058.82%2028.293C59.0025%2027.3609%2059.1128%2026.4161%2059.15%2025.467C59.2107%2024.3177%2059.2414%2022.936%2059.242%2021.322C59.242%2019.732%2059.224%2018.3747%2059.188%2017.25C59.169%2016.3373%2059.0736%2015.4278%2058.903%2014.531C58.8198%2013.9744%2058.5923%2013.4493%2058.243%2013.008C58.0929%2012.8491%2057.9104%2012.7244%2057.7078%2012.6422C57.5053%2012.5601%2057.2874%2012.5225%2057.069%2012.532C56.8667%2012.5304%2056.6668%2012.576%2056.4852%2012.6652C56.3036%2012.7544%2056.1453%2012.8848%2056.023%2013.046C55.6766%2013.5389%2055.4446%2014.103%2055.344%2014.697C55.1442%2015.6885%2055.0277%2016.695%2054.996%2017.706C54.9347%2018.9533%2054.904%2020.4697%2054.904%2022.255'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M83.329%2021.331C83.2999%2019.244%2083.441%2017.1581%2083.751%2015.094C83.9453%2013.6891%2084.3854%2012.3294%2085.051%2011.077C85.5455%2010.1519%2086.3139%209.40235%2087.251%208.93105C89.2087%208.112%2091.4106%208.09871%2093.378%208.89405C94.2601%209.33609%2094.9701%2010.0591%2095.396%2010.949C95.9885%2012.1976%2096.3667%2013.537%2096.515%2014.911C96.7714%2016.9922%2096.8877%2019.0883%2096.863%2021.185C96.8919%2023.3381%2096.7581%2025.4902%2096.463%2027.6231C96.2817%2029.0676%2095.8538%2030.4703%2095.198%2031.77C94.7182%2032.7123%2093.9631%2033.4862%2093.033%2033.989C92.0663%2034.4507%2091.004%2034.6769%2089.933%2034.649C88.8847%2034.6772%2087.8418%2034.4896%2086.869%2034.098C85.9694%2033.6775%2085.2435%2032.9579%2084.815%2032.062C84.2044%2030.7803%2083.8197%2029.4027%2083.678%2027.99C83.4178%2025.7803%2083.3012%2023.5559%2083.329%2021.331ZM88.029%2022.2481C88.029%2023.6914%2088.0537%2024.9267%2088.103%2025.954C88.1307%2026.8044%2088.2287%2027.6509%2088.396%2028.4851C88.4826%2029.015%2088.7037%2029.5139%2089.038%2029.934C89.1803%2030.0869%2089.354%2030.207%2089.5472%2030.2863C89.7404%2030.3655%2089.9484%2030.4019%2090.157%2030.393C90.366%2030.3964%2090.573%2030.3533%2090.7633%2030.2669C90.9535%2030.1804%2091.1222%2030.0527%2091.257%2029.893C91.6124%2029.4242%2091.8458%2028.8744%2091.936%2028.2931C92.1185%2027.3609%2092.2288%2026.4161%2092.266%2025.467C92.3267%2024.3177%2092.3574%2022.936%2092.358%2021.322C92.358%2019.732%2092.34%2018.3747%2092.304%2017.2501C92.2887%2016.3329%2092.1964%2015.4187%2092.028%2014.517C91.9448%2013.9605%2091.7173%2013.4354%2091.368%2012.994C91.2162%2012.8368%2091.0323%2012.7141%2090.8289%2012.6343C90.6255%2012.5544%2090.4072%2012.5192%2090.189%2012.531C89.9867%2012.5294%2089.7868%2012.575%2089.6052%2012.6643C89.4236%2012.7535%2089.2653%2012.8839%2089.143%2013.045C88.7966%2013.5379%2088.5646%2014.102%2088.464%2014.6961C88.2642%2015.6876%2088.1477%2016.6941%2088.116%2017.705C88.0547%2018.9524%2088.024%2020.4687%2088.024%2022.254'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M131.349%2034.65V8.32202H135.458V30.797H140.631V34.649L131.349%2034.65Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M71.95%2034.65V8.33203H76.059V30.796H81.232V34.648L71.95%2034.65Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M104.833%2014.692C104.934%2014.098%20105.166%2013.534%20105.512%2013.041C105.634%2012.8798%20105.793%2012.7494%20105.974%2012.6602C106.156%2012.571%20106.356%2012.5253%20106.558%2012.527H110.103V8.30798H106.703C105.642%208.2848%20104.589%208.49794%20103.621%208.93197C102.684%209.40306%20101.915%2010.1527%20101.421%2011.078C100.756%2012.3304%20100.316%2013.6901%20100.121%2015.095C99.8114%2017.1591%2099.6706%2019.245%2099.7%2021.332C99.6722%2023.5568%2099.7885%2025.7811%20100.048%2027.991C100.19%2029.4037%20100.574%2030.7812%20101.185%2032.063C101.614%2032.9584%20102.34%2033.6778%20103.239%2034.099C104.212%2034.4899%20105.255%2034.6771%20106.303%2034.649L110.103%2034.613V30.393H106.522C106.313%2030.402%20106.105%2030.3657%20105.912%2030.2866C105.719%2030.2076%20105.545%2030.0876%20105.403%2029.935C105.069%2029.5144%20104.848%2029.0152%20104.761%2028.485C104.594%2027.6509%20104.496%2026.8043%20104.468%2025.954C104.419%2024.9266%20104.394%2023.6916%20104.394%2022.249C104.394%2020.4636%20104.425%2018.9473%20104.486%2017.7C104.518%2016.6894%20104.633%2015.6832%20104.833%2014.692Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M46.728%2019.247H42.878V30.395H41.828C41.6182%2030.4039%2041.409%2030.3669%2041.2149%2030.2868C41.0208%2030.2067%2040.8465%2030.0853%2040.704%2029.931C40.3695%2029.5106%2040.1485%2029.0113%2040.062%2028.481C39.894%2027.647%2039.7956%2026.8004%2039.768%2025.95C39.7187%2024.9227%2039.6944%2023.6877%2039.695%2022.245C39.695%2020.4597%2039.7257%2018.9434%2039.787%2017.696C39.8191%2016.6854%2039.9355%2015.6792%2040.135%2014.688C40.2357%2014.094%2040.4677%2013.53%2040.814%2013.037C40.9376%2012.8768%2041.0968%2012.7476%2041.2791%2012.6598C41.4614%2012.5719%2041.6617%2012.5278%2041.864%2012.531H45.904V8.31202H42.012C40.9511%208.28877%2039.8983%208.50191%2038.93%208.93601C37.9927%209.40699%2037.2241%2010.1567%2036.73%2011.082C36.0644%2012.3344%2035.6243%2013.6941%2035.43%2015.099C35.1189%2017.1613%2034.9764%2019.2456%2035.004%2021.331C34.9762%2023.5559%2035.0925%2025.7802%2035.352%2027.99C35.494%2029.4026%2035.8787%2030.7802%2036.489%2032.062C36.9179%2032.9579%2037.6442%2033.6775%2038.544%2034.098C39.517%2034.4891%2040.5598%2034.6763%2041.608%2034.648L43.587%2034.629H46.727L46.728%2019.247Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M123.653%2029.87H118L116.691%2034.65H112.797L120.939%208L128.793%2034.65H124.856L123.653%2029.87ZM122.587%2026.212L120.893%2019.982L119.085%2026.212H122.587Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M39.016%2041.436H37.059V54.507H39.016V41.436Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M44.559%2041.436H46.384L48.331%2046.651C48.919%2048.1937%2049.4198%2049.7682%2049.831%2051.367C49.6744%2050.357%2049.5584%2049.4427%2049.483%2048.624C49.4077%2047.8054%2049.37%2047.0347%2049.37%2046.312V41.436H51.336V54.511H49.495L47.303%2048.627C47.103%2048.0797%2046.9134%2047.518%2046.734%2046.942C46.5547%2046.366%2046.39%2045.762%2046.24%2045.13C46.2274%2045.0507%2046.207%2044.9547%2046.179%2044.842C46.151%2044.7293%2046.1177%2044.5997%2046.079%2044.453C46.098%2044.6%2046.114%2044.725%2046.126%2044.829C46.138%2044.933%2046.148%2045.022%2046.154%2045.095L46.254%2046.424L46.354%2048.041C46.36%2048.131%2046.365%2048.241%2046.368%2048.371C46.371%2048.501%2046.368%2048.648%2046.368%2048.811L46.468%2054.511H44.559V41.436Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M55.493%2041.436H61.861V42.977H59.67V54.511H57.751V42.977H55.493V41.436Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M65.828%2041.436H71.028V42.926H67.787V47.065H70.665V48.555H67.787V53.016H71.028V54.506H65.828V41.436Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M75.906%2041.436H78.483C79.3332%2041.3696%2080.1787%2041.6132%2080.863%2042.122C81.2131%2042.4774%2081.4826%2042.904%2081.6531%2043.3729C81.8236%2043.8417%2081.8911%2044.3418%2081.851%2044.839C81.8876%2045.6248%2081.7066%2046.4055%2081.328%2047.095C81.1685%2047.3665%2080.9531%2047.6008%2080.696%2047.7826C80.4389%2047.9643%2080.1461%2048.0892%2079.837%2048.149L82.509%2054.507H80.525L77.863%2048.107V54.507H75.906V41.436ZM77.863%2047.227C78.1485%2047.2893%2078.4451%2047.279%2078.7256%2047.1969C79.0061%2047.1148%2079.2615%2046.9637%2079.4684%2046.7573C79.6753%2046.5509%2079.8271%2046.2959%2079.9098%2046.0156C79.9926%2045.7353%2080.0036%2045.4387%2079.942%2045.153C79.9472%2044.8034%2079.9137%2044.4543%2079.842%2044.112C79.7909%2043.8589%2079.6851%2043.62%2079.532%2043.412C79.3909%2043.2304%2079.2018%2043.0918%2078.986%2043.012C78.7308%2042.9221%2078.4615%2042.8791%2078.191%2042.885H77.862L77.863%2047.227Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M90.046%2041.06L85.913%2054.514H87.745L88.45%2051.974H91.496L92.135%2054.531H94.028L90.046%2041.06ZM88.876%2050.403L90.013%2046.703L91.048%2050.415L88.876%2050.403Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M106.344%2041.436H112.712V42.977H110.52V54.511H108.602V42.977H106.344V41.436Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M118.865%2041.462H116.908V54.533H118.865V41.462Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M134.181%2041.462H139.381V42.952H136.136V47.093H139.014V48.583H136.136V53.044H139.381V54.534H134.181V41.462Z'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M99.749%2044.338C99.8046%2044.0109%2099.9338%2043.7008%20100.127%2043.431C100.202%2043.3322%20100.3%2043.2523%20100.411%2043.1976C100.523%2043.1429%20100.646%2043.115%20100.77%2043.116H102.464V41.207H100.846C100.318%2041.1955%2099.7949%2041.3011%2099.313%2041.516C98.8543%2041.748%2098.4782%2042.1157%2098.236%2042.569C97.9008%2043.2016%2097.6788%2043.888%2097.58%2044.597C97.4215%2045.6561%2097.3493%2046.7263%2097.364%2047.797C97.3503%2048.9393%2097.4101%2050.0814%2097.543%2051.216C97.6145%2051.9294%2097.808%2052.6252%2098.115%2053.273C98.3244%2053.7086%2098.6776%2054.0586%2099.115%2054.264C99.6001%2054.458%20100.12%2054.5509%20100.642%2054.537L102.469%2054.52V52.61H100.755C100.629%2052.6147%20100.503%2052.592%20100.386%2052.5435C100.269%2052.495%20100.164%2052.4218%20100.078%2052.329C99.8888%2052.0951%2099.7637%2051.816%2099.715%2051.519C99.6273%2051.081%2099.5758%2050.6365%2099.561%2050.19C99.536%2049.66%2099.523%2049.014%2099.523%2048.27C99.523%2047.349%2099.539%2046.557%2099.57%2045.916C99.5873%2045.3865%2099.6485%2044.8594%2099.753%2044.34'%20fill='%230A3763'%3e%3c/path%3e%3cpath%20d='M128.799%2041.466L126.671%2048.91L124.671%2041.466H122.679L126.654%2054.953L130.774%2041.466H128.799Z'%20fill='%230A3763'%3e%3c/path%3e%3c/svg%3e";function bb(){const[e,t]=K.useState("");return K.useEffect(()=>{t(window.location.pathname);const n=()=>{t(window.location.pathname)},o=()=>{t(window.location.pathname)};return window.addEventListener("popstate",n),window.addEventListener("pushstate",o),window.addEventListener("replacestate",o),()=>{window.removeEventListener("popstate",n),window.removeEventListener("pushstate",o),window.removeEventListener("replacestate",o)}},[]),{currentPath:e,isActiveRoute:n=>!!(e===n||n!=="/"&&e.startsWith(n))}}const wb={navMain:[{title:"Essential Insights",url:"/essential-insights/overall-performance",icon:A.jsx(Zh,{className:"h-5 w-5"}),items:[{title:"Overall Performance",url:"/essential-insights/overall-performance",icon:A.jsx(Ki,{className:"h-4 w-4"})},{title:"Organic Performance",url:"/essential-insights/organic-performance",icon:A.jsx(Fi,{className:"h-4 w-4"})},{title:"Paid Performance",url:"/essential-insights/paid-performance",icon:A.jsx(Yh,{className:"h-4 w-4"})},{title:"Keyword Performance",url:"/essential-insights/keyword-performance",icon:A.jsx(Fi,{className:"h-4 w-4"})},{title:"More Components",url:"/essential-insights/more-components",icon:A.jsx(Lt,{className:"h-4 w-4"})}]},{title:"Price Monster",url:"/price-monster",icon:A.jsx(Lt,{className:"h-4 w-4"}),items:[{title:"Dashboard",url:"/price-monster/dashboard",icon:A.jsx(Lt,{className:"h-4 w-4"})}]},{title:"CMS",url:"/cms",icon:A.jsx(Lt,{className:"h-4 w-4"}),items:[{title:"Dashboard",url:"/cms/dashboard",icon:A.jsx(Lt,{className:"h-4 w-4"})}]},{title:"Storage Essentials",url:"/storage-essentials",icon:A.jsx(Lt,{className:"h-4 w-4"}),items:[{title:"Dashboard",url:"/storage-essentials/dashboard",icon:A.jsx(Lt,{className:"h-4 w-4"})}]}]};function vb({...e}){const{isActiveRoute:t}=bb();return A.jsxs(sb,{...e,children:[A.jsx(ub,{children:A.jsx("div",{className:"relative h-12 w-32 overflow-hidden",children:A.jsx("img",{src:yb,alt:"GLI Logo",className:"h-full w-full object-contain"})})}),A.jsxs(lb,{children:[A.jsx("div",{className:"relative flex w-full min-w-0 flex-col px-2 py-1",children:A.jsx("div",{className:"flex flex-col",children:A.jsxs("a",{href:"/",className:ie("flex cursor-pointer items-center gap-2 rounded-lg px-2 py-2 transition-colors","hover:bg-gray-100",t("/")&&"bg-blue-50 text-gli-bluedark font-medium"),children:[A.jsx(Ki,{className:ie("h-5 w-5",t("/")?"text-gli-bluedark":"text-gray-600")}),A.jsx("span",{children:"Home"})]})})}),wb.navMain.map(r=>{const n=t(r.url)||r.items.some(o=>t(o.url));return A.jsx(gb,{title:r.title,url:r.url,icon:r.icon,isActive:n,children:A.jsx(fb,{children:A.jsx(hb,{children:r.items.map(o=>{const s=t(o.url);return A.jsx(pb,{children:A.jsx(mb,{asChild:!0,children:A.jsxs("a",{href:o.url,className:ie("flex items-center gap-2 pl-4 transition-colors","text-muted-foreground hover:bg-muted hover:text-foreground",s&&"bg-blue-50 text-gli-bluedark font-medium"),children:[A.jsx("span",{className:ie(s?"text-gli-bluedark":"text-muted-foreground"),children:o.icon}),A.jsx("span",{className:ie(s?"text-gli-bluedark":"text-muted-foreground"),children:o.title})]})})},o.title)})})})},r.title)})]}),A.jsx(ib,{})]})}function tl(e){const t=e+"CollectionProvider",[r,n]=Ht(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=b=>{const{scope:m,children:p}=b,y=K.useRef(null),f=K.useRef(new Map).current;return A.jsx(o,{scope:m,itemMap:f,collectionRef:y,children:p})};a.displayName=t;const i=e+"CollectionSlot",c=er(i),u=K.forwardRef((b,m)=>{const{scope:p,children:y}=b,f=s(i,p),x=Ce(m,f.collectionRef);return A.jsx(c,{ref:x,children:y})});u.displayName=i;const l=e+"CollectionItemSlot",d="data-radix-collection-item",h=er(l),g=K.forwardRef((b,m)=>{const{scope:p,children:y,...f}=b,x=K.useRef(null),v=Ce(m,x),R=s(l,p);return K.useEffect(()=>(R.itemMap.set(x,{ref:x,...f}),()=>void R.itemMap.delete(x))),A.jsx(h,{[d]:"",ref:v,children:y})});g.displayName=l;function E(b){const m=s(e+"CollectionConsumer",b);return K.useCallback(()=>{const y=m.collectionRef.current;if(!y)return[];const f=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(m.itemMap.values()).sort((R,w)=>f.indexOf(R.ref.current)-f.indexOf(w.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:u,ItemSlot:g},E,n]}var Eb=S.createContext(void 0);function rl(e){const t=S.useContext(Eb);return e||t||"ltr"}var fs="rovingFocusGroup.onEntryFocus",_b={bubbles:!1,cancelable:!0},Mr="RovingFocusGroup",[hs,nl,Sb]=tl(Mr),[xb,ol]=Ht(Mr,[Sb]),[Ab,Rb]=xb(Mr),sl=S.forwardRef((e,t)=>A.jsx(hs.Provider,{scope:e.__scopeRovingFocusGroup,children:A.jsx(hs.Slot,{scope:e.__scopeRovingFocusGroup,children:A.jsx(Cb,{...e,ref:t})})}));sl.displayName=Mr;var Cb=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:l=!1,...d}=e,h=S.useRef(null),g=Ce(t,h),E=rl(s),[b,m]=Io({prop:a,defaultProp:i??null,onChange:c,caller:Mr}),[p,y]=S.useState(!1),f=gt(u),x=nl(r),v=S.useRef(!1),[R,w]=S.useState(0);return S.useEffect(()=>{const _=h.current;if(_)return _.addEventListener(fs,f),()=>_.removeEventListener(fs,f)},[f]),A.jsx(Ab,{scope:r,orientation:n,dir:E,loop:o,currentTabStopId:b,onItemFocus:S.useCallback(_=>m(_),[m]),onItemShiftTab:S.useCallback(()=>y(!0),[]),onFocusableItemAdd:S.useCallback(()=>w(_=>_+1),[]),onFocusableItemRemove:S.useCallback(()=>w(_=>_-1),[]),children:A.jsx(Se.div,{tabIndex:p||R===0?-1:0,"data-orientation":n,...d,ref:g,style:{outline:"none",...e.style},onMouseDown:X(e.onMouseDown,()=>{v.current=!0}),onFocus:X(e.onFocus,_=>{const C=!v.current;if(_.target===_.currentTarget&&C&&!p){const D=new CustomEvent(fs,_b);if(_.currentTarget.dispatchEvent(D),!D.defaultPrevented){const I=x().filter(B=>B.focusable),P=I.find(B=>B.active),H=I.find(B=>B.id===b),re=[P,H,...I].filter(Boolean).map(B=>B.ref.current);cl(re,l)}}v.current=!1}),onBlur:X(e.onBlur,()=>y(!1))})})}),al="RovingFocusGroupItem",il=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:s,children:a,...i}=e,c=or(),u=s||c,l=Rb(al,r),d=l.currentTabStopId===u,h=nl(r),{onFocusableItemAdd:g,onFocusableItemRemove:E,currentTabStopId:b}=l;return S.useEffect(()=>{if(n)return g(),()=>E()},[n,g,E]),A.jsx(hs.ItemSlot,{scope:r,id:u,focusable:n,active:o,children:A.jsx(Se.span,{tabIndex:d?0:-1,"data-orientation":l.orientation,...i,ref:t,onMouseDown:X(e.onMouseDown,m=>{n?l.onItemFocus(u):m.preventDefault()}),onFocus:X(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:X(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){l.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const p=Ob(m,l.orientation,l.dir);if(p!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let f=h().filter(x=>x.focusable).map(x=>x.ref.current);if(p==="last")f.reverse();else if(p==="prev"||p==="next"){p==="prev"&&f.reverse();const x=f.indexOf(m.currentTarget);f=l.loop?kb(f,x+1):f.slice(x+1)}setTimeout(()=>cl(f))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:b!=null}):a})})});il.displayName=al;var Tb={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Pb(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ob(e,t,r){const n=Pb(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Tb[n]}function cl(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function kb(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Nb=sl,Ib=il,ps=["Enter"," "],Db=["ArrowDown","PageUp","Home"],ul=["ArrowUp","PageDown","End"],Mb=[...Db,...ul],Lb={ltr:[...ps,"ArrowRight"],rtl:[...ps,"ArrowLeft"]},jb={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Lr="Menu",[jr,Hb,Ub]=tl(Lr),[$t,ll]=Ht(Lr,[Ub,Cn,ol]),On=Cn(),dl=ol(),[Wb,Ft]=$t(Lr),[$b,Hr]=$t(Lr),fl=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:o,onOpenChange:s,modal:a=!0}=e,i=On(t),[c,u]=S.useState(null),l=S.useRef(!1),d=gt(s),h=rl(o);return S.useEffect(()=>{const g=()=>{l.current=!0,document.addEventListener("pointerdown",E,{capture:!0,once:!0}),document.addEventListener("pointermove",E,{capture:!0,once:!0})},E=()=>l.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",E,{capture:!0}),document.removeEventListener("pointermove",E,{capture:!0})}},[]),A.jsx(Py,{...i,children:A.jsx(Wb,{scope:t,open:r,onOpenChange:d,content:c,onContentChange:u,children:A.jsx($b,{scope:t,onClose:S.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:l,dir:h,modal:a,children:n})})})};fl.displayName=Lr;var Fb="MenuAnchor",ms=S.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=On(r);return A.jsx($u,{...o,...n,ref:t})});ms.displayName=Fb;var gs="MenuPortal",[Kb,hl]=$t(gs,{forceMount:void 0}),pl=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:o}=e,s=Ft(gs,t);return A.jsx(Kb,{scope:t,forceMount:r,children:A.jsx(yt,{present:r||s.open,children:A.jsx(Ho,{asChild:!0,container:o,children:n})})})};pl.displayName=gs;var Xe="MenuContent",[qb,ys]=$t(Xe),ml=S.forwardRef((e,t)=>{const r=hl(Xe,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,s=Ft(Xe,e.__scopeMenu),a=Hr(Xe,e.__scopeMenu);return A.jsx(jr.Provider,{scope:e.__scopeMenu,children:A.jsx(yt,{present:n||s.open,children:A.jsx(jr.Slot,{scope:e.__scopeMenu,children:a.modal?A.jsx(Gb,{...o,ref:t}):A.jsx(Bb,{...o,ref:t})})})})}),Gb=S.forwardRef((e,t)=>{const r=Ft(Xe,e.__scopeMenu),n=S.useRef(null),o=Ce(t,n);return S.useEffect(()=>{const s=n.current;if(s)return Fc(s)},[]),A.jsx(bs,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:X(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),Bb=S.forwardRef((e,t)=>{const r=Ft(Xe,e.__scopeMenu);return A.jsx(bs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),zb=er("MenuContent.ScrollLock"),bs=S.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,onDismiss:g,disableOutsideScroll:E,...b}=e,m=Ft(Xe,r),p=Hr(Xe,r),y=On(r),f=dl(r),x=Hb(r),[v,R]=S.useState(null),w=S.useRef(null),_=Ce(t,w,m.onContentChange),C=S.useRef(0),D=S.useRef(""),I=S.useRef(0),P=S.useRef(null),H=S.useRef("right"),q=S.useRef(0),re=E?qo:S.Fragment,B=E?{as:zb,allowPinchZoom:!0}:void 0,J=L=>{var Q,ue;const T=D.current+L,j=x().filter(ce=>!ce.disabled),z=document.activeElement,V=(Q=j.find(ce=>ce.ref.current===z))==null?void 0:Q.textValue,ne=j.map(ce=>ce.textValue),de=sw(ne,T,V),be=(ue=j.find(ce=>ce.textValue===de))==null?void 0:ue.ref.current;(function ce(ye){D.current=ye,window.clearTimeout(C.current),ye!==""&&(C.current=window.setTimeout(()=>ce(""),1e3))})(T),be&&setTimeout(()=>be.focus())};S.useEffect(()=>()=>window.clearTimeout(C.current),[]),Cc();const O=S.useCallback(L=>{var j,z;return H.current===((j=P.current)==null?void 0:j.side)&&iw(L,(z=P.current)==null?void 0:z.area)},[]);return A.jsx(qb,{scope:r,searchRef:D,onItemEnter:S.useCallback(L=>{O(L)&&L.preventDefault()},[O]),onItemLeave:S.useCallback(L=>{var T;O(L)||((T=w.current)==null||T.focus(),R(null))},[O]),onTriggerLeave:S.useCallback(L=>{O(L)&&L.preventDefault()},[O]),pointerGraceTimerRef:I,onPointerGraceIntentChange:S.useCallback(L=>{P.current=L},[]),children:A.jsx(re,{...B,children:A.jsx(jo,{asChild:!0,trapped:o,onMountAutoFocus:X(s,L=>{var T;L.preventDefault(),(T=w.current)==null||T.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:A.jsx(an,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,onDismiss:g,children:A.jsx(Nb,{asChild:!0,...f,dir:p.dir,orientation:"vertical",loop:n,currentTabStopId:v,onCurrentTabStopIdChange:R,onEntryFocus:X(c,L=>{p.isUsingKeyboardRef.current||L.preventDefault()}),preventScrollOnEntryFocus:!0,children:A.jsx(Fu,{role:"menu","aria-orientation":"vertical","data-state":Nl(m.open),"data-radix-menu-content":"",dir:p.dir,...y,...b,ref:_,style:{outline:"none",...b.style},onKeyDown:X(b.onKeyDown,L=>{const j=L.target.closest("[data-radix-menu-content]")===L.currentTarget,z=L.ctrlKey||L.altKey||L.metaKey,V=L.key.length===1;j&&(L.key==="Tab"&&L.preventDefault(),!z&&V&&J(L.key));const ne=w.current;if(L.target!==ne||!Mb.includes(L.key))return;L.preventDefault();const be=x().filter(Q=>!Q.disabled).map(Q=>Q.ref.current);ul.includes(L.key)&&be.reverse(),nw(be)}),onBlur:X(e.onBlur,L=>{L.currentTarget.contains(L.target)||(window.clearTimeout(C.current),D.current="")}),onPointerMove:X(e.onPointerMove,Wr(L=>{const T=L.target,j=q.current!==L.clientX;if(L.currentTarget.contains(T)&&j){const z=L.clientX>q.current?"right":"left";H.current=z,q.current=L.clientX}}))})})})})})})});ml.displayName=Xe;var Vb="MenuGroup",ws=S.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return A.jsx(Se.div,{role:"group",...n,ref:t})});ws.displayName=Vb;var Jb="MenuLabel",gl=S.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return A.jsx(Se.div,{...n,ref:t})});gl.displayName=Jb;var kn="MenuItem",yl="menu.itemSelect",Nn=S.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...o}=e,s=S.useRef(null),a=Hr(kn,e.__scopeMenu),i=ys(kn,e.__scopeMenu),c=Ce(t,s),u=S.useRef(!1),l=()=>{const d=s.current;if(!r&&d){const h=new CustomEvent(yl,{bubbles:!0,cancelable:!0});d.addEventListener(yl,g=>n==null?void 0:n(g),{once:!0}),hc(d,h),h.defaultPrevented?u.current=!1:a.onClose()}};return A.jsx(bl,{...o,ref:c,disabled:r,onClick:X(e.onClick,l),onPointerDown:d=>{var h;(h=e.onPointerDown)==null||h.call(e,d),u.current=!0},onPointerUp:X(e.onPointerUp,d=>{var h;u.current||(h=d.currentTarget)==null||h.click()}),onKeyDown:X(e.onKeyDown,d=>{const h=i.searchRef.current!=="";r||h&&d.key===" "||ps.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Nn.displayName=kn;var bl=S.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:o,...s}=e,a=ys(kn,r),i=dl(r),c=S.useRef(null),u=Ce(t,c),[l,d]=S.useState(!1),[h,g]=S.useState("");return S.useEffect(()=>{const E=c.current;E&&g((E.textContent??"").trim())},[s.children]),A.jsx(jr.ItemSlot,{scope:r,disabled:n,textValue:o??h,children:A.jsx(Ib,{asChild:!0,...i,focusable:!n,children:A.jsx(Se.div,{role:"menuitem","data-highlighted":l?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...s,ref:u,onPointerMove:X(e.onPointerMove,Wr(E=>{n?a.onItemLeave(E):(a.onItemEnter(E),E.defaultPrevented||E.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:X(e.onPointerLeave,Wr(E=>a.onItemLeave(E))),onFocus:X(e.onFocus,()=>d(!0)),onBlur:X(e.onBlur,()=>d(!1))})})})}),Xb="MenuCheckboxItem",wl=S.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...o}=e;return A.jsx(xl,{scope:e.__scopeMenu,checked:r,children:A.jsx(Nn,{role:"menuitemcheckbox","aria-checked":In(r)?"mixed":r,...o,ref:t,"data-state":Es(r),onSelect:X(o.onSelect,()=>n==null?void 0:n(In(r)?!0:!r),{checkForDefaultPrevented:!1})})})});wl.displayName=Xb;var vl="MenuRadioGroup",[Yb,Zb]=$t(vl,{value:void 0,onValueChange:()=>{}}),El=S.forwardRef((e,t)=>{const{value:r,onValueChange:n,...o}=e,s=gt(n);return A.jsx(Yb,{scope:e.__scopeMenu,value:r,onValueChange:s,children:A.jsx(ws,{...o,ref:t})})});El.displayName=vl;var _l="MenuRadioItem",Sl=S.forwardRef((e,t)=>{const{value:r,...n}=e,o=Zb(_l,e.__scopeMenu),s=r===o.value;return A.jsx(xl,{scope:e.__scopeMenu,checked:s,children:A.jsx(Nn,{role:"menuitemradio","aria-checked":s,...n,ref:t,"data-state":Es(s),onSelect:X(n.onSelect,()=>{var a;return(a=o.onValueChange)==null?void 0:a.call(o,r)},{checkForDefaultPrevented:!1})})})});Sl.displayName=_l;var vs="MenuItemIndicator",[xl,Qb]=$t(vs,{checked:!1}),Al=S.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...o}=e,s=Qb(vs,r);return A.jsx(yt,{present:n||In(s.checked)||s.checked===!0,children:A.jsx(Se.span,{...o,ref:t,"data-state":Es(s.checked)})})});Al.displayName=vs;var ew="MenuSeparator",Rl=S.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return A.jsx(Se.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});Rl.displayName=ew;var tw="MenuArrow",Cl=S.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=On(r);return A.jsx(Ku,{...o,...n,ref:t})});Cl.displayName=tw;var rw="MenuSub",[CS,Tl]=$t(rw),Ur="MenuSubTrigger",Pl=S.forwardRef((e,t)=>{const r=Ft(Ur,e.__scopeMenu),n=Hr(Ur,e.__scopeMenu),o=Tl(Ur,e.__scopeMenu),s=ys(Ur,e.__scopeMenu),a=S.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:c}=s,u={__scopeMenu:e.__scopeMenu},l=S.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return S.useEffect(()=>l,[l]),S.useEffect(()=>{const d=i.current;return()=>{window.clearTimeout(d),c(null)}},[i,c]),A.jsx(ms,{asChild:!0,...u,children:A.jsx(bl,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":Nl(r.open),...e,ref:nn(t,o.onTriggerChange),onClick:d=>{var h;(h=e.onClick)==null||h.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:X(e.onPointerMove,Wr(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!r.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{r.onOpenChange(!0),l()},100))})),onPointerLeave:X(e.onPointerLeave,Wr(d=>{var g,E;l();const h=(g=r.content)==null?void 0:g.getBoundingClientRect();if(h){const b=(E=r.content)==null?void 0:E.dataset.side,m=b==="right",p=m?-5:5,y=h[m?"left":"right"],f=h[m?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+p,y:d.clientY},{x:y,y:h.top},{x:f,y:h.top},{x:f,y:h.bottom},{x:y,y:h.bottom}],side:b}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:X(e.onKeyDown,d=>{var g;const h=s.searchRef.current!=="";e.disabled||h&&d.key===" "||Lb[n.dir].includes(d.key)&&(r.onOpenChange(!0),(g=r.content)==null||g.focus(),d.preventDefault())})})})});Pl.displayName=Ur;var Ol="MenuSubContent",kl=S.forwardRef((e,t)=>{const r=hl(Xe,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,s=Ft(Xe,e.__scopeMenu),a=Hr(Xe,e.__scopeMenu),i=Tl(Ol,e.__scopeMenu),c=S.useRef(null),u=Ce(t,c);return A.jsx(jr.Provider,{scope:e.__scopeMenu,children:A.jsx(yt,{present:n||s.open,children:A.jsx(jr.Slot,{scope:e.__scopeMenu,children:A.jsx(bs,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:l=>{var d;a.isUsingKeyboardRef.current&&((d=c.current)==null||d.focus()),l.preventDefault()},onCloseAutoFocus:l=>l.preventDefault(),onFocusOutside:X(e.onFocusOutside,l=>{l.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:X(e.onEscapeKeyDown,l=>{a.onClose(),l.preventDefault()}),onKeyDown:X(e.onKeyDown,l=>{var g;const d=l.currentTarget.contains(l.target),h=jb[a.dir].includes(l.key);d&&h&&(s.onOpenChange(!1),(g=i.trigger)==null||g.focus(),l.preventDefault())})})})})})});kl.displayName=Ol;function Nl(e){return e?"open":"closed"}function In(e){return e==="indeterminate"}function Es(e){return In(e)?"indeterminate":e?"checked":"unchecked"}function nw(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function ow(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function sw(e,t,r){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let a=ow(e,Math.max(s,0));o.length===1&&(a=a.filter(u=>u!==r));const c=a.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==r?c:void 0}function aw(e,t){const{x:r,y:n}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],c=t[a],u=i.x,l=i.y,d=c.x,h=c.y;l>n!=h>n&&r<(d-u)*(n-l)/(h-l)+u&&(o=!o)}return o}function iw(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return aw(r,t)}function Wr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var cw=fl,uw=ms,lw=pl,dw=ml,fw=ws,hw=gl,pw=Nn,mw=wl,gw=El,yw=Sl,bw=Al,ww=Rl,vw=Cl,Ew=Pl,_w=kl,Dn="DropdownMenu",[Sw,TS]=Ht(Dn,[ll]),He=ll(),[xw,Il]=Sw(Dn),Dl=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:o,defaultOpen:s,onOpenChange:a,modal:i=!0}=e,c=He(t),u=S.useRef(null),[l,d]=Io({prop:o,defaultProp:s??!1,onChange:a,caller:Dn});return A.jsx(xw,{scope:t,triggerId:or(),triggerRef:u,contentId:or(),open:l,onOpenChange:d,onOpenToggle:S.useCallback(()=>d(h=>!h),[d]),modal:i,children:A.jsx(cw,{...c,open:l,onOpenChange:d,dir:n,modal:i,children:r})})};Dl.displayName=Dn;var Ml="DropdownMenuTrigger",Ll=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,s=Il(Ml,r),a=He(r);return A.jsx(uw,{asChild:!0,...a,children:A.jsx(Se.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...o,ref:nn(t,s.triggerRef),onPointerDown:X(e.onPointerDown,i=>{!n&&i.button===0&&i.ctrlKey===!1&&(s.onOpenToggle(),s.open||i.preventDefault())}),onKeyDown:X(e.onKeyDown,i=>{n||(["Enter"," "].includes(i.key)&&s.onOpenToggle(),i.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});Ll.displayName=Ml;var Aw="DropdownMenuPortal",jl=e=>{const{__scopeDropdownMenu:t,...r}=e,n=He(t);return A.jsx(lw,{...n,...r})};jl.displayName=Aw;var Hl="DropdownMenuContent",Ul=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Il(Hl,r),s=He(r),a=S.useRef(!1);return A.jsx(dw,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...n,ref:t,onCloseAutoFocus:X(e.onCloseAutoFocus,i=>{var c;a.current||(c=o.triggerRef.current)==null||c.focus(),a.current=!1,i.preventDefault()}),onInteractOutside:X(e.onInteractOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,l=c.button===2||u;(!o.modal||l)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ul.displayName=Hl;var Rw="DropdownMenuGroup",Cw=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=He(r);return A.jsx(fw,{...o,...n,ref:t})});Cw.displayName=Rw;var Tw="DropdownMenuLabel",Wl=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=He(r);return A.jsx(hw,{...o,...n,ref:t})});Wl.displayName=Tw;var Pw="DropdownMenuItem",$l=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=He(r);return A.jsx(pw,{...o,...n,ref:t})});$l.displayName=Pw;var Ow="DropdownMenuCheckboxItem",kw=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=He(r);return A.jsx(mw,{...o,...n,ref:t})});kw.displayName=Ow;var Nw="DropdownMenuRadioGroup",Iw=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=He(r);return A.jsx(gw,{...o,...n,ref:t})});Iw.displayName=Nw;var Dw="DropdownMenuRadioItem",Mw=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=He(r);return A.jsx(yw,{...o,...n,ref:t})});Mw.displayName=Dw;var Lw="DropdownMenuItemIndicator",jw=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=He(r);return A.jsx(bw,{...o,...n,ref:t})});jw.displayName=Lw;var Hw="DropdownMenuSeparator",Fl=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=He(r);return A.jsx(ww,{...o,...n,ref:t})});Fl.displayName=Hw;var Uw="DropdownMenuArrow",Ww=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=He(r);return A.jsx(vw,{...o,...n,ref:t})});Ww.displayName=Uw;var $w="DropdownMenuSubTrigger",Fw=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=He(r);return A.jsx(Ew,{...o,...n,ref:t})});Fw.displayName=$w;var Kw="DropdownMenuSubContent",qw=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=He(r);return A.jsx(_w,{...o,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});qw.displayName=Kw;var Gw=Dl,Bw=Ll,zw=jl,Vw=Ul,Jw=Wl,Xw=$l,Yw=Fl;function Zw({...e}){return A.jsx(Gw,{"data-slot":"dropdown-menu",...e})}function Qw({...e}){return A.jsx(Bw,{"data-slot":"dropdown-menu-trigger",...e})}function e0({className:e,sideOffset:t=4,...r}){return A.jsx(zw,{children:A.jsx(Vw,{"data-slot":"dropdown-menu-content",sideOffset:t,className:ie("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...r})})}function Kl({className:e,inset:t,variant:r="default",...n}){return A.jsx(Xw,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:ie("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n})}function t0({className:e,inset:t,...r}){return A.jsx(Jw,{"data-slot":"dropdown-menu-label","data-inset":t,className:ie("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...r})}function r0({className:e,...t}){return A.jsx(Yw,{"data-slot":"dropdown-menu-separator",className:ie("bg-border -mx-1 my-1 h-px",e),...t})}const n0=()=>{const{user:e,error:t,isLoading:r}=Uh(),n=()=>{window.location.href="/auth/logout"};return r?A.jsx("div",{className:"h-10 w-10 animate-pulse rounded-full bg-gray-200"}):t?A.jsxs("div",{children:["Error: ",t.message]}):e?A.jsx("div",{className:"relative flex items-center gap-3",children:A.jsxs(Zw,{children:[A.jsx(Qw,{asChild:!0,children:A.jsx(No,{variant:"ghost",size:"lg",className:"rounded-full cursor-pointer p-0",children:e.picture?A.jsx("img",{src:e.picture,alt:e.name||"User profile",width:40,height:40,className:"rounded-full"}):A.jsx(qi,{className:"h-5 w-5 text-gray-500"})})}),A.jsxs(e0,{align:"end",className:"w-72",children:[A.jsx(t0,{children:A.jsx("div",{className:"flex flex-col space-y-1",children:A.jsxs("div",{className:"flex flex-col space-y-1",children:[A.jsx("p",{className:"text-xs text-gray-500",children:e.name}),A.jsx("p",{className:"truncate text-xs text-gray-500",children:e.email})]})})}),A.jsx(r0,{}),A.jsx(Kl,{asChild:!0,children:A.jsxs("a",{href:"/profile",className:"flex w-full cursor-default",children:[A.jsx(qi,{className:"mr-2 h-4 w-4"}),A.jsx("span",{children:"Profile"})]})}),A.jsxs(Kl,{onClick:n,children:[A.jsx(tp,{className:"mr-2 h-4 w-4"}),A.jsx("span",{children:"Sign out"})]})]})]})}):null},o0=()=>A.jsx("div",{className:"sticky top-0 z-50",children:A.jsxs("header",{className:"flex h-16 items-center justify-between border-b bg-white px-4",children:[A.jsxs("div",{className:"flex h-full items-center gap-4 flex-1 min-w-0 overflow-hidden",children:[A.jsx(ab,{}),A.jsx(yc,{orientation:"vertical"})]}),A.jsx("div",{className:"flex-shrink-0",children:A.jsx(n0,{})})]})}),s0=({children:e})=>A.jsx(Gh,{children:A.jsx(ob,{children:A.jsxs("div",{className:"flex h-screen w-full",children:[A.jsx(vb,{}),A.jsxs(cb,{className:"flex-1 flex flex-col min-w-0",children:[A.jsx(o0,{}),A.jsx("main",{className:"flex-1 bg-white",id:"page-content",children:e})]})]})})});var $r={},_s={},Ss={},xs={},As,ql;function a0(){if(ql)return As;ql=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,o=(v,R)=>{for(var w in R)e(v,w,{get:R[w],enumerable:!0})},s=(v,R,w,_)=>{if(R&&typeof R=="object"||typeof R=="function")for(let C of r(R))!n.call(v,C)&&C!==w&&e(v,C,{get:()=>R[C],enumerable:!(_=t(R,C))||_.enumerable});return v},a=v=>s(e({},"__esModule",{value:!0}),v),i={};o(i,{RequestCookies:()=>p,ResponseCookies:()=>y,parseCookie:()=>u,parseSetCookie:()=>l,stringifyCookie:()=>c}),As=a(i);function c(v){var R;const w=["path"in v&&v.path&&`Path=${v.path}`,"expires"in v&&(v.expires||v.expires===0)&&`Expires=${(typeof v.expires=="number"?new Date(v.expires):v.expires).toUTCString()}`,"maxAge"in v&&typeof v.maxAge=="number"&&`Max-Age=${v.maxAge}`,"domain"in v&&v.domain&&`Domain=${v.domain}`,"secure"in v&&v.secure&&"Secure","httpOnly"in v&&v.httpOnly&&"HttpOnly","sameSite"in v&&v.sameSite&&`SameSite=${v.sameSite}`,"partitioned"in v&&v.partitioned&&"Partitioned","priority"in v&&v.priority&&`Priority=${v.priority}`].filter(Boolean),_=`${v.name}=${encodeURIComponent((R=v.value)!=null?R:"")}`;return w.length===0?_:`${_}; ${w.join("; ")}`}function u(v){const R=new Map;for(const w of v.split(/; */)){if(!w)continue;const _=w.indexOf("=");if(_===-1){R.set(w,"true");continue}const[C,D]=[w.slice(0,_),w.slice(_+1)];try{R.set(C,decodeURIComponent(D??"true"))}catch{}}return R}function l(v){if(!v)return;const[[R,w],..._]=u(v),{domain:C,expires:D,httponly:I,maxage:P,path:H,samesite:q,secure:re,partitioned:B,priority:J}=Object.fromEntries(_.map(([L,T])=>[L.toLowerCase().replace(/-/g,""),T])),O={name:R,value:decodeURIComponent(w),domain:C,...D&&{expires:new Date(D)},...I&&{httpOnly:!0},...typeof P=="string"&&{maxAge:Number(P)},path:H,...q&&{sameSite:g(q)},...re&&{secure:!0},...J&&{priority:b(J)},...B&&{partitioned:!0}};return d(O)}function d(v){const R={};for(const w in v)v[w]&&(R[w]=v[w]);return R}var h=["strict","lax","none"];function g(v){return v=v.toLowerCase(),h.includes(v)?v:void 0}var E=["low","medium","high"];function b(v){return v=v.toLowerCase(),E.includes(v)?v:void 0}function m(v){if(!v)return[];var R=[],w=0,_,C,D,I,P;function H(){for(;w<v.length&&/\s/.test(v.charAt(w));)w+=1;return w<v.length}function q(){return C=v.charAt(w),C!=="="&&C!==";"&&C!==","}for(;w<v.length;){for(_=w,P=!1;H();)if(C=v.charAt(w),C===","){for(D=w,w+=1,H(),I=w;w<v.length&&q();)w+=1;w<v.length&&v.charAt(w)==="="?(P=!0,w=I,R.push(v.substring(_,D)),_=w):w=D+1}else w+=1;(!P||w>=v.length)&&R.push(v.substring(_,v.length))}return R}var p=class{constructor(v){this._parsed=new Map,this._headers=v;const R=v.get("cookie");if(R){const w=u(R);for(const[_,C]of w)this._parsed.set(_,{name:_,value:C})}}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...v){const R=typeof v[0]=="string"?v[0]:v[0].name;return this._parsed.get(R)}getAll(...v){var R;const w=Array.from(this._parsed);if(!v.length)return w.map(([C,D])=>D);const _=typeof v[0]=="string"?v[0]:(R=v[0])==null?void 0:R.name;return w.filter(([C])=>C===_).map(([C,D])=>D)}has(v){return this._parsed.has(v)}set(...v){const[R,w]=v.length===1?[v[0].name,v[0].value]:v,_=this._parsed;return _.set(R,{name:R,value:w}),this._headers.set("cookie",Array.from(_).map(([C,D])=>c(D)).join("; ")),this}delete(v){const R=this._parsed,w=Array.isArray(v)?v.map(_=>R.delete(_)):R.delete(v);return this._headers.set("cookie",Array.from(R).map(([_,C])=>c(C)).join("; ")),w}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(v=>`${v.name}=${encodeURIComponent(v.value)}`).join("; ")}},y=class{constructor(v){this._parsed=new Map;var R,w,_;this._headers=v;const C=(_=(w=(R=v.getSetCookie)==null?void 0:R.call(v))!=null?w:v.get("set-cookie"))!=null?_:[],D=Array.isArray(C)?C:m(C);for(const I of D){const P=l(I);P&&this._parsed.set(P.name,P)}}get(...v){const R=typeof v[0]=="string"?v[0]:v[0].name;return this._parsed.get(R)}getAll(...v){var R;const w=Array.from(this._parsed.values());if(!v.length)return w;const _=typeof v[0]=="string"?v[0]:(R=v[0])==null?void 0:R.name;return w.filter(C=>C.name===_)}has(v){return this._parsed.has(v)}set(...v){const[R,w,_]=v.length===1?[v[0].name,v[0].value,v[0]]:v,C=this._parsed;return C.set(R,x({name:R,value:w,..._})),f(C,this._headers),this}delete(...v){const[R,w]=typeof v[0]=="string"?[v[0]]:[v[0].name,v[0]];return this.set({...w,name:R,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(c).join("; ")}};function f(v,R){R.delete("set-cookie");for(const[,w]of v){const _=c(w);R.append("set-cookie",_)}}function x(v={name:"",value:""}){return typeof v.expires=="number"&&(v.expires=new Date(v.expires)),v.maxAge&&(v.expires=new Date(Date.now()+v.maxAge*1e3)),(v.path===null||v.path===void 0)&&(v.path="/"),v}return As}var Gl;function Fr(){return Gl||(Gl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(n,o){for(var s in o)Object.defineProperty(n,s,{enumerable:!0,get:o[s]})}t(e,{RequestCookies:function(){return r.RequestCookies},ResponseCookies:function(){return r.ResponseCookies},stringifyCookie:function(){return r.stringifyCookie}});const r=a0()}(xs)),xs}var Rs={},Bl;function Cs(){return Bl||(Bl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ReflectAdapter",{enumerable:!0,get:function(){return t}});class t{static get(n,o,s){const a=Reflect.get(n,o,s);return typeof a=="function"?a.bind(n):a}static set(n,o,s,a){return Reflect.set(n,o,s,a)}static has(n,o){return Reflect.has(n,o)}static deleteProperty(n,o){return Reflect.deleteProperty(n,o)}}}(Rs)),Rs}var Ts={},Ps={},Os={},zl;function ks(){return zl||(zl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,u){for(var l in u)Object.defineProperty(c,l,{enumerable:!0,get:u[l]})}t(e,{bindSnapshot:function(){return a},createAsyncLocalStorage:function(){return s},createSnapshot:function(){return i}});const r=Object.defineProperty(new Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class n{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}static bind(u){return u}}const o=typeof globalThis<"u"&&globalThis.AsyncLocalStorage;function s(){return o?new o:new n}function a(c){return o?o.bind(c):n.bind(c)}function i(){return o?o.snapshot():function(c,...u){return c(...u)}}}(Os)),Os}var Vl;function i0(){return Vl||(Vl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"workAsyncStorageInstance",{enumerable:!0,get:function(){return r}});const r=(0,ks().createAsyncLocalStorage)()}(Ps)),Ps}var Jl;function Pt(){return Jl||(Jl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"workAsyncStorage",{enumerable:!0,get:function(){return t.workAsyncStorageInstance}});const t=i0()}(Ts)),Ts}var Ns={},Is={},Xl;function c0(){return Xl||(Xl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"workUnitAsyncStorageInstance",{enumerable:!0,get:function(){return r}});const r=(0,ks().createAsyncLocalStorage)()}(Is)),Is}var Mn={exports:{}},Yl;function u0(){return Yl||(Yl=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(f,x){for(var v in x)Object.defineProperty(f,v,{enumerable:!0,get:x[v]})}r(t,{ACTION_HEADER:function(){return o},FLIGHT_HEADERS:function(){return h},NEXT_DID_POSTPONE_HEADER:function(){return b},NEXT_HMR_REFRESH_HASH_COOKIE:function(){return u},NEXT_HMR_REFRESH_HEADER:function(){return c},NEXT_IS_PRERENDER_HEADER:function(){return y},NEXT_REWRITTEN_PATH_HEADER:function(){return m},NEXT_REWRITTEN_QUERY_HEADER:function(){return p},NEXT_ROUTER_PREFETCH_HEADER:function(){return a},NEXT_ROUTER_SEGMENT_PREFETCH_HEADER:function(){return i},NEXT_ROUTER_STALE_TIME_HEADER:function(){return E},NEXT_ROUTER_STATE_TREE_HEADER:function(){return s},NEXT_RSC_UNION_QUERY:function(){return g},NEXT_URL:function(){return l},RSC_CONTENT_TYPE_HEADER:function(){return d},RSC_HEADER:function(){return n}});const n="RSC",o="Next-Action",s="Next-Router-State-Tree",a="Next-Router-Prefetch",i="Next-Router-Segment-Prefetch",c="Next-HMR-Refresh",u="__next_hmr_refresh_hash__",l="Next-Url",d="text/x-component",h=[n,s,a,c,i],g="_rsc",E="x-nextjs-stale-time",b="x-nextjs-postponed",m="x-nextjs-rewritten-path",p="x-nextjs-rewritten-query",y="x-nextjs-prerender";(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Mn,Mn.exports)),Mn.exports}var Zl;function Kt(){return Zl||(Zl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,d){for(var h in d)Object.defineProperty(l,h,{enumerable:!0,get:d[h]})}t(e,{getDraftModeProviderForCacheScope:function(){return u},getExpectedRequestStore:function(){return o},getHmrRefreshHash:function(){return c},getPrerenderResumeDataCache:function(){return a},getRenderResumeDataCache:function(){return i},throwForMissingRequestStore:function(){return s},workUnitAsyncStorage:function(){return r.workUnitAsyncStorageInstance}});const r=c0(),n=u0();function o(l){const d=r.workUnitAsyncStorageInstance.getStore();switch(d||s(l),d.type){case"request":return d;case"prerender":case"prerender-ppr":case"prerender-legacy":throw Object.defineProperty(new Error(`\`${l}\` cannot be called inside a prerender. This is a bug in Next.js.`),"__NEXT_ERROR_CODE",{value:"E401",enumerable:!1,configurable:!0});case"cache":throw Object.defineProperty(new Error(`\`${l}\` cannot be called inside "use cache". Call it outside and pass an argument instead. Read more: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E37",enumerable:!1,configurable:!0});case"unstable-cache":throw Object.defineProperty(new Error(`\`${l}\` cannot be called inside unstable_cache. Call it outside and pass an argument instead. Read more: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E69",enumerable:!1,configurable:!0});default:return d}}function s(l){throw Object.defineProperty(new Error(`\`${l}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E251",enumerable:!1,configurable:!0})}function a(l){return l.type==="prerender"||l.type==="prerender-ppr"?l.prerenderResumeDataCache:null}function i(l){return l.type!=="prerender-legacy"&&l.type!=="cache"&&l.type!=="unstable-cache"?l.type==="request"?l.renderResumeDataCache:l.prerenderResumeDataCache:null}function c(l,d){var h;if(l.dev)return d.type==="cache"||d.type==="prerender"?d.hmrRefreshHash:d.type==="request"?(h=d.cookies.get(n.NEXT_HMR_REFRESH_HASH_COOKIE))==null?void 0:h.value:void 0}function u(l,d){if(l.isDraftMode)switch(d.type){case"cache":case"unstable-cache":case"request":return d.draftMode;default:return}}}(Ns)),Ns}var Ql;function l0(){return Ql||(Ql=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(m,p){for(var y in p)Object.defineProperty(m,y,{enumerable:!0,get:p[y]})}t(e,{MutableRequestCookiesAdapter:function(){return d},ReadonlyRequestCookiesError:function(){return a},RequestCookiesAdapter:function(){return i},appendMutableCookies:function(){return l},areCookiesMutableInCurrentPhase:function(){return g},getModifiedCookieValues:function(){return u},responseCookiesToRequestCookies:function(){return b},wrapWithMutableAccessCheck:function(){return h}});const r=Fr(),n=Cs(),o=Pt(),s=Kt();class a extends Error{constructor(){super("Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options")}static callable(){throw new a}}class i{static seal(p){return new Proxy(p,{get(y,f,x){switch(f){case"clear":case"delete":case"set":return a.callable;default:return n.ReflectAdapter.get(y,f,x)}}})}}const c=Symbol.for("next.mutated.cookies");function u(m){const p=m[c];return!p||!Array.isArray(p)||p.length===0?[]:p}function l(m,p){const y=u(p);if(y.length===0)return!1;const f=new r.ResponseCookies(m),x=f.getAll();for(const v of y)f.set(v);for(const v of x)f.set(v);return!0}class d{static wrap(p,y){const f=new r.ResponseCookies(new Headers);for(const _ of p.getAll())f.set(_);let x=[];const v=new Set,R=()=>{const _=o.workAsyncStorage.getStore();if(_&&(_.pathWasRevalidated=!0),x=f.getAll().filter(D=>v.has(D.name)),y){const D=[];for(const I of x){const P=new r.ResponseCookies(new Headers);P.set(I),D.push(P.toString())}y(D)}},w=new Proxy(f,{get(_,C,D){switch(C){case c:return x;case"delete":return function(...I){v.add(typeof I[0]=="string"?I[0]:I[0].name);try{return _.delete(...I),w}finally{R()}};case"set":return function(...I){v.add(typeof I[0]=="string"?I[0]:I[0].name);try{return _.set(...I),w}finally{R()}};default:return n.ReflectAdapter.get(_,C,D)}}});return w}}function h(m){const p=new Proxy(m,{get(y,f,x){switch(f){case"delete":return function(...v){return E("cookies().delete"),y.delete(...v),p};case"set":return function(...v){return E("cookies().set"),y.set(...v),p};default:return n.ReflectAdapter.get(y,f,x)}}});return p}function g(m){return m.phase==="action"}function E(m){const p=(0,s.getExpectedRequestStore)(m);if(!g(p))throw new a}function b(m){const p=new r.RequestCookies(new Headers);for(const y of m.getAll())p.set(y);return p}}(Ss)),Ss}var Ds={},Ln={exports:{}},ed;function td(){return ed||(ed=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}r(t,{DynamicServerError:function(){return o},isDynamicServerError:function(){return s}});const n="DYNAMIC_SERVER_USAGE";class o extends Error{constructor(i){super("Dynamic server usage: "+i),this.description=i,this.digest=n}}function s(a){return typeof a!="object"||a===null||!("digest"in a)||typeof a.digest!="string"?!1:a.digest===n}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Ln,Ln.exports)),Ln.exports}var jn={exports:{}},rd;function pr(){return rd||(rd=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}r(t,{StaticGenBailoutError:function(){return o},isStaticGenBailoutError:function(){return s}});const n="NEXT_STATIC_GEN_BAILOUT";class o extends Error{constructor(...i){super(...i),this.code=n}}function s(a){return typeof a!="object"||a===null||!("code"in a)?!1:a.code===n}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(jn,jn.exports)),jn.exports}var Ms={},nd;function Kr(){return nd||(nd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,u){for(var l in u)Object.defineProperty(c,l,{enumerable:!0,get:u[l]})}t(e,{isHangingPromiseRejectionError:function(){return r},makeHangingPromise:function(){return a}});function r(c){return typeof c!="object"||c===null||!("digest"in c)?!1:c.digest===n}const n="HANGING_PROMISE_REJECTION";class o extends Error{constructor(u){super(`During prerendering, ${u} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${u} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context.`),this.expression=u,this.digest=n}}const s=new WeakMap;function a(c,u){if(c.aborted)return Promise.reject(new o(u));{const l=new Promise((d,h)=>{const g=h.bind(null,new o(u));let E=s.get(c);if(E)E.push(g);else{const b=[g];s.set(c,b),c.addEventListener("abort",()=>{for(let m=0;m<b.length;m++)b[m]()},{once:!0})}});return l.catch(i),l}}function i(){}}(Ms)),Ms}var Ls={},od;function d0(){return od||(od=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,a){for(var i in a)Object.defineProperty(s,i,{enumerable:!0,get:a[i]})}t(e,{METADATA_BOUNDARY_NAME:function(){return r},OUTLET_BOUNDARY_NAME:function(){return o},VIEWPORT_BOUNDARY_NAME:function(){return n}});const r="__next_metadata_boundary__",n="__next_viewport_boundary__",o="__next_outlet_boundary__"}(Ls)),Ls}var js={},sd;function Hs(){return sd||(sd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{atLeastOneTask:function(){return o},scheduleImmediate:function(){return n},scheduleOnNextTick:function(){return r},waitAtLeastOneReactRenderTask:function(){return s}});const r=a=>{Promise.resolve().then(()=>{process.env.NEXT_RUNTIME==="edge"?setTimeout(a,0):process.nextTick(a)})},n=a=>{process.env.NEXT_RUNTIME==="edge"?setTimeout(a,0):setImmediate(a)};function o(){return new Promise(a=>n(a))}function s(){return process.env.NEXT_RUNTIME==="edge"?new Promise(a=>setTimeout(a,0)):new Promise(a=>setImmediate(a))}}(js)),js}var ad;function qr(){return ad||(ad=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(k,N){for(var M in N)Object.defineProperty(k,M,{enumerable:!0,get:N[M]})}t(e,{Postpone:function(){return _},abortAndThrowOnSynchronousRequestDataAccess:function(){return R},abortOnSynchronousPlatformIOAccess:function(){return x},accessedDynamicData:function(){return B},annotateDynamicAccess:function(){return z},consumeDynamicAccess:function(){return J},createDynamicTrackingState:function(){return h},createDynamicValidationState:function(){return g},createHangingInputAbortSignal:function(){return j},createPostponedAbortSignal:function(){return T},formatDynamicAPIAccesses:function(){return O},getFirstDynamicReason:function(){return E},isDynamicPostpone:function(){return I},isPrerenderInterruptedError:function(){return re},markCurrentScopeAsDynamic:function(){return b},postponeWithTracking:function(){return C},throwIfDisallowedDynamic:function(){return ye},throwToInterruptStaticGeneration:function(){return p},trackAllowedDynamicAccess:function(){return ue},trackDynamicDataInDynamicRender:function(){return y},trackFallbackParamAccessed:function(){return m},trackSynchronousPlatformIOAccessInDev:function(){return v},trackSynchronousRequestDataAccessInDev:function(){return w},useDynamicRouteParams:function(){return V}});const r=l(K),n=td(),o=pr(),s=Kt(),a=Pt(),i=Kr(),c=d0(),u=Hs();function l(k){return k&&k.__esModule?k:{default:k}}const d=typeof r.default.unstable_postpone=="function";function h(k){return{isDebugDynamicAccesses:k,dynamicAccesses:[],syncDynamicExpression:void 0,syncDynamicErrorWithStack:null}}function g(){return{hasSuspendedDynamic:!1,hasDynamicMetadata:!1,hasDynamicViewport:!1,hasSyncDynamicErrors:!1,dynamicErrors:[]}}function E(k){var N;return(N=k.dynamicAccesses[0])==null?void 0:N.expression}function b(k,N,M){if(!(N&&(N.type==="cache"||N.type==="unstable-cache"))&&!(k.forceDynamic||k.forceStatic)){if(k.dynamicShouldError)throw Object.defineProperty(new o.StaticGenBailoutError(`Route ${k.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${M}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E553",enumerable:!1,configurable:!0});if(N)if(N.type==="prerender-ppr")C(k.route,M,N.dynamicTracking);else if(N.type==="prerender-legacy"){N.revalidate=0;const F=Object.defineProperty(new n.DynamicServerError(`Route ${k.route} couldn't be rendered statically because it used ${M}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E550",enumerable:!1,configurable:!0});throw k.dynamicUsageDescription=M,k.dynamicUsageStack=F.stack,F}else process.env.NODE_ENV==="development"&&N&&N.type==="request"&&(N.usedDynamic=!0)}}function m(k,N){const M=s.workUnitAsyncStorage.getStore();!M||M.type!=="prerender-ppr"||C(k.route,N,M.dynamicTracking)}function p(k,N,M){const F=Object.defineProperty(new n.DynamicServerError(`Route ${N.route} couldn't be rendered statically because it used \`${k}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw M.revalidate=0,N.dynamicUsageDescription=k,N.dynamicUsageStack=F.stack,F}function y(k,N){if(N){if(N.type==="cache"||N.type==="unstable-cache")return;(N.type==="prerender"||N.type==="prerender-legacy")&&(N.revalidate=0),process.env.NODE_ENV==="development"&&N.type==="request"&&(N.usedDynamic=!0)}}function f(k,N,M){const F=`Route ${k} needs to bail out of prerendering at this point because it used ${N}.`,ee=q(F);M.controller.abort(ee);const U=M.dynamicTracking;U&&U.dynamicAccesses.push({stack:U.isDebugDynamicAccesses?new Error().stack:void 0,expression:N})}function x(k,N,M,F){const ee=F.dynamicTracking;ee&&ee.syncDynamicErrorWithStack===null&&(ee.syncDynamicExpression=N,ee.syncDynamicErrorWithStack=M),f(k,N,F)}function v(k){k.prerenderPhase=!1}function R(k,N,M,F){if(F.controller.signal.aborted===!1){const U=F.dynamicTracking;U&&U.syncDynamicErrorWithStack===null&&(U.syncDynamicExpression=N,U.syncDynamicErrorWithStack=M,F.validating===!0&&(U.syncDynamicLogged=!0)),f(k,N,F)}throw q(`Route ${k} needs to bail out of prerendering at this point because it used ${N}.`)}const w=v;function _({reason:k,route:N}){const M=s.workUnitAsyncStorage.getStore(),F=M&&M.type==="prerender-ppr"?M.dynamicTracking:null;C(N,k,F)}function C(k,N,M){L(),M&&M.dynamicAccesses.push({stack:M.isDebugDynamicAccesses?new Error().stack:void 0,expression:N}),r.default.unstable_postpone(D(k,N))}function D(k,N){return`Route ${k} needs to bail out of prerendering at this point because it used ${N}. React throws this special object to indicate where. It should not be caught by your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`}function I(k){return typeof k=="object"&&k!==null&&typeof k.message=="string"?P(k.message):!1}function P(k){return k.includes("needs to bail out of prerendering at this point because it used")&&k.includes("Learn more: https://nextjs.org/docs/messages/ppr-caught-error")}if(P(D("%%%","^^^"))===!1)throw Object.defineProperty(new Error("Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E296",enumerable:!1,configurable:!0});const H="NEXT_PRERENDER_INTERRUPTED";function q(k){const N=Object.defineProperty(new Error(k),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return N.digest=H,N}function re(k){return typeof k=="object"&&k!==null&&k.digest===H&&"name"in k&&"message"in k&&k instanceof Error}function B(k){return k.length>0}function J(k,N){return k.dynamicAccesses.push(...N.dynamicAccesses),k.dynamicAccesses}function O(k){return k.filter(N=>typeof N.stack=="string"&&N.stack.length>0).map(({expression:N,stack:M})=>(M=M.split(`
158
+ `).slice(4).filter(F=>!(F.includes("node_modules/next/")||F.includes(" (<anonymous>)")||F.includes(" (node:"))).join(`
159
+ `),`Dynamic API Usage Debug - ${N}:
160
+ ${M}`))}function L(){if(!d)throw Object.defineProperty(new Error("Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E224",enumerable:!1,configurable:!0})}function T(k){L();const N=new AbortController;try{r.default.unstable_postpone(k)}catch(M){N.abort(M)}return N.signal}function j(k){const N=new AbortController;return k.cacheSignal?k.cacheSignal.inputReady().then(()=>{N.abort()}):(0,u.scheduleOnNextTick)(()=>N.abort()),N.signal}function z(k,N){const M=N.dynamicTracking;M&&M.dynamicAccesses.push({stack:M.isDebugDynamicAccesses?new Error().stack:void 0,expression:k})}function V(k){const N=a.workAsyncStorage.getStore();if(N&&N.isStaticGeneration&&N.fallbackRouteParams&&N.fallbackRouteParams.size>0){const M=s.workUnitAsyncStorage.getStore();M&&(M.type==="prerender"?r.default.use((0,i.makeHangingPromise)(M.renderSignal,k)):M.type==="prerender-ppr"?C(N.route,k,M.dynamicTracking):M.type==="prerender-legacy"&&p(k,N,M))}}const ne=/\n\s+at Suspense \(<anonymous>\)/,de=new RegExp(`\\n\\s+at ${c.METADATA_BOUNDARY_NAME}[\\n\\s]`),be=new RegExp(`\\n\\s+at ${c.VIEWPORT_BOUNDARY_NAME}[\\n\\s]`),Q=new RegExp(`\\n\\s+at ${c.OUTLET_BOUNDARY_NAME}[\\n\\s]`);function ue(k,N,M,F,ee){if(!Q.test(N))if(de.test(N)){M.hasDynamicMetadata=!0;return}else if(be.test(N)){M.hasDynamicViewport=!0;return}else if(ne.test(N)){M.hasSuspendedDynamic=!0;return}else if(F.syncDynamicErrorWithStack||ee.syncDynamicErrorWithStack){M.hasSyncDynamicErrors=!0;return}else{const U=`Route "${k}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. We don't have the exact line number added to error messages yet but you can see which component in the stack below. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`,Ee=ce(U,N);M.dynamicErrors.push(Ee);return}}function ce(k,N){const M=Object.defineProperty(new Error(k),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return M.stack="Error: "+k+N,M}function ye(k,N,M,F){let ee,U,Ee;if(M.syncDynamicErrorWithStack?(ee=M.syncDynamicErrorWithStack,U=M.syncDynamicExpression,Ee=M.syncDynamicLogged===!0):F.syncDynamicErrorWithStack?(ee=F.syncDynamicErrorWithStack,U=F.syncDynamicExpression,Ee=F.syncDynamicLogged===!0):(ee=null,U=void 0,Ee=!1),N.hasSyncDynamicErrors&&ee)throw Ee||console.error(ee),new o.StaticGenBailoutError;const Re=N.dynamicErrors;if(Re.length){for(let he=0;he<Re.length;he++)console.error(Re[he]);throw new o.StaticGenBailoutError}if(!N.hasSuspendedDynamic){if(N.hasDynamicMetadata)throw ee?(console.error(ee),Object.defineProperty(new o.StaticGenBailoutError(`Route "${k}" has a \`generateMetadata\` that could not finish rendering before ${U} was used. Follow the instructions in the error for this expression to resolve.`),"__NEXT_ERROR_CODE",{value:"E608",enumerable:!1,configurable:!0})):Object.defineProperty(new o.StaticGenBailoutError(`Route "${k}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or external data (\`fetch(...)\`, etc...) but the rest of the route was static or only used cached data (\`"use cache"\`). If you expected this route to be prerenderable update your \`generateMetadata\` to not use Request data and only use cached external data. Otherwise, add \`await connection()\` somewhere within this route to indicate explicitly it should not be prerendered.`),"__NEXT_ERROR_CODE",{value:"E534",enumerable:!1,configurable:!0});if(N.hasDynamicViewport)throw ee?(console.error(ee),Object.defineProperty(new o.StaticGenBailoutError(`Route "${k}" has a \`generateViewport\` that could not finish rendering before ${U} was used. Follow the instructions in the error for this expression to resolve.`),"__NEXT_ERROR_CODE",{value:"E573",enumerable:!1,configurable:!0})):Object.defineProperty(new o.StaticGenBailoutError(`Route "${k}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or external data (\`fetch(...)\`, etc...) but the rest of the route was static or only used cached data (\`"use cache"\`). If you expected this route to be prerenderable update your \`generateViewport\` to not use Request data and only use cached external data. Otherwise, add \`await connection()\` somewhere within this route to indicate explicitly it should not be prerendered.`),"__NEXT_ERROR_CODE",{value:"E590",enumerable:!1,configurable:!0})}}}(Ds)),Ds}var Us={},id;function Ws(){return id||(id=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"createDedupedByCallsiteServerErrorLoggerDev",{enumerable:!0,get:function(){return c}});const t=n(K);function r(u){if(typeof WeakMap!="function")return null;var l=new WeakMap,d=new WeakMap;return(r=function(h){return h?d:l})(u)}function n(u,l){if(u&&u.__esModule)return u;if(u===null||typeof u!="object"&&typeof u!="function")return{default:u};var d=r(l);if(d&&d.has(u))return d.get(u);var h={__proto__:null},g=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var E in u)if(E!=="default"&&Object.prototype.hasOwnProperty.call(u,E)){var b=g?Object.getOwnPropertyDescriptor(u,E):null;b&&(b.get||b.set)?Object.defineProperty(h,E,b):h[E]=u[E]}return h.default=u,d&&d.set(u,h),h}const o={current:null},s=typeof t.cache=="function"?t.cache:u=>u,a=process.env.__NEXT_DYNAMIC_IO?console.error:console.warn,i=s(u=>{try{a(o.current)}finally{o.current=null}});function c(u){return function(...d){const h=u(...d);if(process.env.NODE_ENV!=="production"){var g;const E=(g=new Error().stack)==null?void 0:g.split(`
161
+ `);if(E===void 0||E.length<4)a(h);else{const b=E[4];o.current=h,i(b)}}else a(h)}}}(Us)),Us}var $s={},Fs={},Ks={},cd;function f0(){return cd||(cd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"afterTaskAsyncStorageInstance",{enumerable:!0,get:function(){return r}});const r=(0,ks().createAsyncLocalStorage)()}(Ks)),Ks}var ud;function h0(){return ud||(ud=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"afterTaskAsyncStorage",{enumerable:!0,get:function(){return t.afterTaskAsyncStorageInstance}});const t=f0()}(Fs)),Fs}var ld;function qs(){return ld||(ld=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,u){for(var l in u)Object.defineProperty(c,l,{enumerable:!0,get:u[l]})}t(e,{isRequestAPICallableInsideAfter:function(){return i},throwForSearchParamsAccessInUseCache:function(){return a},throwWithStaticGenerationBailoutError:function(){return o},throwWithStaticGenerationBailoutErrorWithDynamicError:function(){return s}});const r=pr(),n=h0();function o(c,u){throw Object.defineProperty(new r.StaticGenBailoutError(`Route ${c} couldn't be rendered statically because it used ${u}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E576",enumerable:!1,configurable:!0})}function s(c,u){throw Object.defineProperty(new r.StaticGenBailoutError(`Route ${c} with \`dynamic = "error"\` couldn't be rendered statically because it used ${u}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E543",enumerable:!1,configurable:!0})}function a(c){const u=Object.defineProperty(new Error(`Route ${c.route} used "searchParams" inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "searchParams" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E634",enumerable:!1,configurable:!0});throw c.invalidUsageError??(c.invalidUsageError=u),u}function i(){const c=n.afterTaskAsyncStorage.getStore();return(c==null?void 0:c.rootTaskSpawnPhase)==="action"}}($s)),$s}var dd;function p0(){return dd||(dd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"cookies",{enumerable:!0,get:function(){return d}});const t=l0(),r=Fr(),n=Pt(),o=Kt(),s=qr(),a=pr(),i=Kr(),c=Ws(),u=Hs(),l=qs();function d(){const w="cookies",_=n.workAsyncStorage.getStore(),C=o.workUnitAsyncStorage.getStore();if(_){if(C&&C.phase==="after"&&!(0,l.isRequestAPICallableInsideAfter)())throw Object.defineProperty(new Error(`Route ${_.route} used "cookies" inside "after(...)". This is not supported. If you need this data inside an "after" callback, use "cookies" outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E88",enumerable:!1,configurable:!0});if(_.forceStatic){const P=h();return b(P)}if(C){if(C.type==="cache")throw Object.defineProperty(new Error(`Route ${_.route} used "cookies" inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "cookies" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E398",enumerable:!1,configurable:!0});if(C.type==="unstable-cache")throw Object.defineProperty(new Error(`Route ${_.route} used "cookies" inside a function cached with "unstable_cache(...)". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "cookies" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E157",enumerable:!1,configurable:!0})}if(_.dynamicShouldError)throw Object.defineProperty(new a.StaticGenBailoutError(`Route ${_.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`cookies\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E549",enumerable:!1,configurable:!0});if(C){if(C.type==="prerender")return E(_.route,C);C.type==="prerender-ppr"?(0,s.postponeWithTracking)(_.route,w,C.dynamicTracking):C.type==="prerender-legacy"&&(0,s.throwToInterruptStaticGeneration)(w,_,C)}(0,s.trackDynamicDataInDynamicRender)(_,C)}const D=(0,o.getExpectedRequestStore)(w);let I;return(0,t.areCookiesMutableInCurrentPhase)(D)?I=D.userspaceMutableCookies:I=D.cookies,process.env.NODE_ENV==="development"&&!(_!=null&&_.isPrefetchRequest)?m(I,_==null?void 0:_.route):b(I)}function h(){return t.RequestCookiesAdapter.seal(new r.RequestCookies(new Headers({})))}const g=new WeakMap;function E(w,_){const C=g.get(_);if(C)return C;const D=(0,i.makeHangingPromise)(_.renderSignal,"`cookies()`");return g.set(_,D),Object.defineProperties(D,{[Symbol.iterator]:{value:function(){const I="`cookies()[Symbol.iterator]()`",P=x(w,I);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(w,I,P,_)}},size:{get(){const I="`cookies().size`",P=x(w,I);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(w,I,P,_)}},get:{value:function(){let P;arguments.length===0?P="`cookies().get()`":P=`\`cookies().get(${p(arguments[0])})\``;const H=x(w,P);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(w,P,H,_)}},getAll:{value:function(){let P;arguments.length===0?P="`cookies().getAll()`":P=`\`cookies().getAll(${p(arguments[0])})\``;const H=x(w,P);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(w,P,H,_)}},has:{value:function(){let P;arguments.length===0?P="`cookies().has()`":P=`\`cookies().has(${p(arguments[0])})\``;const H=x(w,P);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(w,P,H,_)}},set:{value:function(){let P;if(arguments.length===0)P="`cookies().set()`";else{const q=arguments[0];q?P=`\`cookies().set(${p(q)}, ...)\``:P="`cookies().set(...)`"}const H=x(w,P);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(w,P,H,_)}},delete:{value:function(){let I;arguments.length===0?I="`cookies().delete()`":arguments.length===1?I=`\`cookies().delete(${p(arguments[0])})\``:I=`\`cookies().delete(${p(arguments[0])}, ...)\``;const P=x(w,I);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(w,I,P,_)}},clear:{value:function(){const P="`cookies().clear()`",H=x(w,P);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(w,P,H,_)}},toString:{value:function(){const P="`cookies().toString()`",H=x(w,P);(0,s.abortAndThrowOnSynchronousRequestDataAccess)(w,P,H,_)}}}),D}function b(w){const _=g.get(w);if(_)return _;const C=Promise.resolve(w);return g.set(w,C),Object.defineProperties(C,{[Symbol.iterator]:{value:w[Symbol.iterator]?w[Symbol.iterator].bind(w):v.bind(w)},size:{get(){return w.size}},get:{value:w.get.bind(w)},getAll:{value:w.getAll.bind(w)},has:{value:w.has.bind(w)},set:{value:w.set.bind(w)},delete:{value:w.delete.bind(w)},clear:{value:typeof w.clear=="function"?w.clear.bind(w):R.bind(w,C)},toString:{value:w.toString.bind(w)}}),C}function m(w,_){const C=g.get(w);if(C)return C;const D=new Promise(I=>(0,u.scheduleImmediate)(()=>I(w)));return g.set(w,D),Object.defineProperties(D,{[Symbol.iterator]:{value:function(){return y(_,"`...cookies()` or similar iteration"),w[Symbol.iterator]?w[Symbol.iterator].apply(w,arguments):v.call(w)},writable:!1},size:{get(){return y(_,"`cookies().size`"),w.size}},get:{value:function(){let P;return arguments.length===0?P="`cookies().get()`":P=`\`cookies().get(${p(arguments[0])})\``,y(_,P),w.get.apply(w,arguments)},writable:!1},getAll:{value:function(){let P;return arguments.length===0?P="`cookies().getAll()`":P=`\`cookies().getAll(${p(arguments[0])})\``,y(_,P),w.getAll.apply(w,arguments)},writable:!1},has:{value:function(){let P;return arguments.length===0?P="`cookies().has()`":P=`\`cookies().has(${p(arguments[0])})\``,y(_,P),w.has.apply(w,arguments)},writable:!1},set:{value:function(){let P;if(arguments.length===0)P="`cookies().set()`";else{const H=arguments[0];H?P=`\`cookies().set(${p(H)}, ...)\``:P="`cookies().set(...)`"}return y(_,P),w.set.apply(w,arguments)},writable:!1},delete:{value:function(){let I;return arguments.length===0?I="`cookies().delete()`":arguments.length===1?I=`\`cookies().delete(${p(arguments[0])})\``:I=`\`cookies().delete(${p(arguments[0])}, ...)\``,y(_,I),w.delete.apply(w,arguments)},writable:!1},clear:{value:function(){return y(_,"`cookies().clear()`"),typeof w.clear=="function"?w.clear.apply(w,arguments):R.call(w,D)},writable:!1},toString:{value:function(){return y(_,"`cookies().toString()` or implicit casting"),w.toString.apply(w,arguments)},writable:!1}}),D}function p(w){return typeof w=="object"&&w!==null&&typeof w.name=="string"?`'${w.name}'`:typeof w=="string"?`'${w}'`:"..."}function y(w,_){const C=o.workUnitAsyncStorage.getStore();if(C&&C.type==="request"&&C.prerenderPhase===!0){const D=C;(0,s.trackSynchronousRequestDataAccessInDev)(D)}f(w,_)}const f=(0,c.createDedupedByCallsiteServerErrorLoggerDev)(x);function x(w,_){const C=w?`Route "${w}" `:"This route ";return Object.defineProperty(new Error(`${C}used ${_}. \`cookies()\` should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E223",enumerable:!1,configurable:!0})}function v(){return this.getAll().map(w=>[w.name,w]).values()}function R(w){for(const _ of this.getAll())this.delete(_.name);return w}}(_s)),_s}var Gs={},Bs={},fd;function m0(){return fd||(fd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,a){for(var i in a)Object.defineProperty(s,i,{enumerable:!0,get:a[i]})}t(e,{HeadersAdapter:function(){return o},ReadonlyHeadersError:function(){return n}});const r=Cs();class n extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new n}}class o extends Headers{constructor(a){super(),this.headers=new Proxy(a,{get(i,c,u){if(typeof c=="symbol")return r.ReflectAdapter.get(i,c,u);const l=c.toLowerCase(),d=Object.keys(a).find(h=>h.toLowerCase()===l);if(!(typeof d>"u"))return r.ReflectAdapter.get(i,d,u)},set(i,c,u,l){if(typeof c=="symbol")return r.ReflectAdapter.set(i,c,u,l);const d=c.toLowerCase(),h=Object.keys(a).find(g=>g.toLowerCase()===d);return r.ReflectAdapter.set(i,h??c,u,l)},has(i,c){if(typeof c=="symbol")return r.ReflectAdapter.has(i,c);const u=c.toLowerCase(),l=Object.keys(a).find(d=>d.toLowerCase()===u);return typeof l>"u"?!1:r.ReflectAdapter.has(i,l)},deleteProperty(i,c){if(typeof c=="symbol")return r.ReflectAdapter.deleteProperty(i,c);const u=c.toLowerCase(),l=Object.keys(a).find(d=>d.toLowerCase()===u);return typeof l>"u"?!0:r.ReflectAdapter.deleteProperty(i,l)}})}static seal(a){return new Proxy(a,{get(i,c,u){switch(c){case"append":case"delete":case"set":return n.callable;default:return r.ReflectAdapter.get(i,c,u)}}})}merge(a){return Array.isArray(a)?a.join(", "):a}static from(a){return a instanceof Headers?a:new o(a)}append(a,i){const c=this.headers[a];typeof c=="string"?this.headers[a]=[c,i]:Array.isArray(c)?c.push(i):this.headers[a]=i}delete(a){delete this.headers[a]}get(a){const i=this.headers[a];return typeof i<"u"?this.merge(i):null}has(a){return typeof this.headers[a]<"u"}set(a,i){this.headers[a]=i}forEach(a,i){for(const[c,u]of this.entries())a.call(i,u,c,this)}*entries(){for(const a of Object.keys(this.headers)){const i=a.toLowerCase(),c=this.get(i);yield[i,c]}}*keys(){for(const a of Object.keys(this.headers))yield a.toLowerCase()}*values(){for(const a of Object.keys(this.headers))yield this.get(a)}[Symbol.iterator](){return this.entries()}}}(Bs)),Bs}var hd;function g0(){return hd||(hd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"headers",{enumerable:!0,get:function(){return l}});const t=m0(),r=Pt(),n=Kt(),o=qr(),s=pr(),a=Kr(),i=Ws(),c=Hs(),u=qs();function l(){const f=r.workAsyncStorage.getStore(),x=n.workUnitAsyncStorage.getStore();if(f){if(x&&x.phase==="after"&&!(0,u.isRequestAPICallableInsideAfter)())throw Object.defineProperty(new Error(`Route ${f.route} used "headers" inside "after(...)". This is not supported. If you need this data inside an "after" callback, use "headers" outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E367",enumerable:!1,configurable:!0});if(f.forceStatic){const R=t.HeadersAdapter.seal(new Headers({}));return g(R)}if(x){if(x.type==="cache")throw Object.defineProperty(new Error(`Route ${f.route} used "headers" inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "headers" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E304",enumerable:!1,configurable:!0});if(x.type==="unstable-cache")throw Object.defineProperty(new Error(`Route ${f.route} used "headers" inside a function cached with "unstable_cache(...)". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "headers" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E127",enumerable:!1,configurable:!0})}if(f.dynamicShouldError)throw Object.defineProperty(new s.StaticGenBailoutError(`Route ${f.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`headers\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E525",enumerable:!1,configurable:!0});if(x){if(x.type==="prerender")return h(f.route,x);x.type==="prerender-ppr"?(0,o.postponeWithTracking)(f.route,"headers",x.dynamicTracking):x.type==="prerender-legacy"&&(0,o.throwToInterruptStaticGeneration)("headers",f,x)}(0,o.trackDynamicDataInDynamicRender)(f,x)}const v=(0,n.getExpectedRequestStore)("headers");return process.env.NODE_ENV==="development"&&!(f!=null&&f.isPrefetchRequest)?E(v.headers,f==null?void 0:f.route):g(v.headers)}const d=new WeakMap;function h(f,x){const v=d.get(x);if(v)return v;const R=(0,a.makeHangingPromise)(x.renderSignal,"`headers()`");return d.set(x,R),Object.defineProperties(R,{append:{value:function(){const _=`\`headers().append(${b(arguments[0])}, ...)\``,C=y(f,_);(0,o.abortAndThrowOnSynchronousRequestDataAccess)(f,_,C,x)}},delete:{value:function(){const _=`\`headers().delete(${b(arguments[0])})\``,C=y(f,_);(0,o.abortAndThrowOnSynchronousRequestDataAccess)(f,_,C,x)}},get:{value:function(){const _=`\`headers().get(${b(arguments[0])})\``,C=y(f,_);(0,o.abortAndThrowOnSynchronousRequestDataAccess)(f,_,C,x)}},has:{value:function(){const _=`\`headers().has(${b(arguments[0])})\``,C=y(f,_);(0,o.abortAndThrowOnSynchronousRequestDataAccess)(f,_,C,x)}},set:{value:function(){const _=`\`headers().set(${b(arguments[0])}, ...)\``,C=y(f,_);(0,o.abortAndThrowOnSynchronousRequestDataAccess)(f,_,C,x)}},getSetCookie:{value:function(){const _="`headers().getSetCookie()`",C=y(f,_);(0,o.abortAndThrowOnSynchronousRequestDataAccess)(f,_,C,x)}},forEach:{value:function(){const _="`headers().forEach(...)`",C=y(f,_);(0,o.abortAndThrowOnSynchronousRequestDataAccess)(f,_,C,x)}},keys:{value:function(){const _="`headers().keys()`",C=y(f,_);(0,o.abortAndThrowOnSynchronousRequestDataAccess)(f,_,C,x)}},values:{value:function(){const _="`headers().values()`",C=y(f,_);(0,o.abortAndThrowOnSynchronousRequestDataAccess)(f,_,C,x)}},entries:{value:function(){const _="`headers().entries()`",C=y(f,_);(0,o.abortAndThrowOnSynchronousRequestDataAccess)(f,_,C,x)}},[Symbol.iterator]:{value:function(){const w="`headers()[Symbol.iterator]()`",_=y(f,w);(0,o.abortAndThrowOnSynchronousRequestDataAccess)(f,w,_,x)}}}),R}function g(f){const x=d.get(f);if(x)return x;const v=Promise.resolve(f);return d.set(f,v),Object.defineProperties(v,{append:{value:f.append.bind(f)},delete:{value:f.delete.bind(f)},get:{value:f.get.bind(f)},has:{value:f.has.bind(f)},set:{value:f.set.bind(f)},getSetCookie:{value:f.getSetCookie.bind(f)},forEach:{value:f.forEach.bind(f)},keys:{value:f.keys.bind(f)},values:{value:f.values.bind(f)},entries:{value:f.entries.bind(f)},[Symbol.iterator]:{value:f[Symbol.iterator].bind(f)}}),v}function E(f,x){const v=d.get(f);if(v)return v;const R=new Promise(w=>(0,c.scheduleImmediate)(()=>w(f)));return d.set(f,R),Object.defineProperties(R,{append:{value:function(){const _=`\`headers().append(${b(arguments[0])}, ...)\``;return m(x,_),f.append.apply(f,arguments)}},delete:{value:function(){const _=`\`headers().delete(${b(arguments[0])})\``;return m(x,_),f.delete.apply(f,arguments)}},get:{value:function(){const _=`\`headers().get(${b(arguments[0])})\``;return m(x,_),f.get.apply(f,arguments)}},has:{value:function(){const _=`\`headers().has(${b(arguments[0])})\``;return m(x,_),f.has.apply(f,arguments)}},set:{value:function(){const _=`\`headers().set(${b(arguments[0])}, ...)\``;return m(x,_),f.set.apply(f,arguments)}},getSetCookie:{value:function(){return m(x,"`headers().getSetCookie()`"),f.getSetCookie.apply(f,arguments)}},forEach:{value:function(){return m(x,"`headers().forEach(...)`"),f.forEach.apply(f,arguments)}},keys:{value:function(){return m(x,"`headers().keys()`"),f.keys.apply(f,arguments)}},values:{value:function(){return m(x,"`headers().values()`"),f.values.apply(f,arguments)}},entries:{value:function(){return m(x,"`headers().entries()`"),f.entries.apply(f,arguments)}},[Symbol.iterator]:{value:function(){return m(x,"`...headers()` or similar iteration"),f[Symbol.iterator].apply(f,arguments)}}}),R}function b(f){return typeof f=="string"?`'${f}'`:"..."}function m(f,x){const v=n.workUnitAsyncStorage.getStore();if(v&&v.type==="request"&&v.prerenderPhase===!0){const R=v;(0,o.trackSynchronousRequestDataAccessInDev)(R)}p(f,x)}const p=(0,i.createDedupedByCallsiteServerErrorLoggerDev)(y);function y(f,x){const v=f?`Route "${f}" `:"This route ";return Object.defineProperty(new Error(`${v}used ${x}. \`headers()\` should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E277",enumerable:!1,configurable:!0})}}(Gs)),Gs}var zs={},pd;function y0(){return pd||(pd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"draftMode",{enumerable:!0,get:function(){return i}});const t=Kt(),r=Pt(),n=qr(),o=Ws(),s=pr(),a=td();function i(){const p="draftMode",y=r.workAsyncStorage.getStore(),f=t.workUnitAsyncStorage.getStore();switch((!y||!f)&&(0,t.throwForMissingRequestStore)(p),f.type){case"request":return c(f.draftMode,y);case"cache":case"unstable-cache":const x=(0,t.getDraftModeProviderForCacheScope)(y,f);if(x)return c(x,y);case"prerender":case"prerender-ppr":case"prerender-legacy":if(process.env.NODE_ENV==="development"&&!(y!=null&&y.isPrefetchRequest)){const R=y==null?void 0:y.route;return d(null,R)}else return l(null);default:return f}}function c(p,y){const f=u.get(i);if(f)return f;let x;if(process.env.NODE_ENV==="development"&&!(y!=null&&y.isPrefetchRequest)){const v=y==null?void 0:y.route;x=d(p,v)}else x=l(p);return u.set(p,x),x}const u=new WeakMap;function l(p){const y=new h(p),f=Promise.resolve(y);return Object.defineProperty(f,"isEnabled",{get(){return y.isEnabled},set(x){Object.defineProperty(f,"isEnabled",{value:x,writable:!0,enumerable:!0})},enumerable:!0,configurable:!0}),f.enable=y.enable.bind(y),f.disable=y.disable.bind(y),f}function d(p,y){const f=new h(p),x=Promise.resolve(f);return Object.defineProperty(x,"isEnabled",{get(){return g(y,"`draftMode().isEnabled`"),f.isEnabled},set(v){Object.defineProperty(x,"isEnabled",{value:v,writable:!0,enumerable:!0})},enumerable:!0,configurable:!0}),Object.defineProperty(x,"enable",{value:function(){return g(y,"`draftMode().enable()`"),f.enable.apply(f,arguments)}}),Object.defineProperty(x,"disable",{value:function(){return g(y,"`draftMode().disable()`"),f.disable.apply(f,arguments)}}),x}class h{constructor(y){this._provider=y}get isEnabled(){return this._provider!==null?this._provider.isEnabled:!1}enable(){m("draftMode().enable()"),this._provider!==null&&this._provider.enable()}disable(){m("draftMode().disable()"),this._provider!==null&&this._provider.disable()}}function g(p,y){const f=t.workUnitAsyncStorage.getStore();if(f&&f.type==="request"&&f.prerenderPhase===!0){const x=f;(0,n.trackSynchronousRequestDataAccessInDev)(x)}E(p,y)}const E=(0,o.createDedupedByCallsiteServerErrorLoggerDev)(b);function b(p,y){const f=p?`Route "${p}" `:"This route ";return Object.defineProperty(new Error(`${f}used ${y}. \`draftMode()\` should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E377",enumerable:!1,configurable:!0})}function m(p){const y=r.workAsyncStorage.getStore(),f=t.workUnitAsyncStorage.getStore();if(y){if(f){if(f.type==="cache")throw Object.defineProperty(new Error(`Route ${y.route} used "${p}" inside "use cache". The enabled status of draftMode can be read in caches but you must not enable or disable draftMode inside a cache. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E246",enumerable:!1,configurable:!0});if(f.type==="unstable-cache")throw Object.defineProperty(new Error(`Route ${y.route} used "${p}" inside a function cached with "unstable_cache(...)". The enabled status of draftMode can be read in caches but you must not enable or disable draftMode inside a cache. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E259",enumerable:!1,configurable:!0});if(f.phase==="after")throw Object.defineProperty(new Error(`Route ${y.route} used "${p}" inside \`after\`. The enabled status of draftMode can be read inside \`after\` but you cannot enable or disable draftMode. See more info here: https://nextjs.org/docs/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E348",enumerable:!1,configurable:!0})}if(y.dynamicShouldError)throw Object.defineProperty(new s.StaticGenBailoutError(`Route ${y.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${p}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E553",enumerable:!1,configurable:!0});if(f)if(f.type==="prerender"){const x=Object.defineProperty(new Error(`Route ${y.route} used ${p} without first calling \`await connection()\`. See more info here: https://nextjs.org/docs/messages/next-prerender-sync-headers`),"__NEXT_ERROR_CODE",{value:"E126",enumerable:!1,configurable:!0});(0,n.abortAndThrowOnSynchronousRequestDataAccess)(y.route,p,x,f)}else if(f.type==="prerender-ppr")(0,n.postponeWithTracking)(y.route,p,f.dynamicTracking);else if(f.type==="prerender-legacy"){f.revalidate=0;const x=Object.defineProperty(new a.DynamicServerError(`Route ${y.route} couldn't be rendered statically because it used \`${p}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw y.dynamicUsageDescription=p,y.dynamicUsageStack=x.stack,x}else process.env.NODE_ENV==="development"&&f&&f.type==="request"&&(f.usedDynamic=!0)}}}(zs)),zs}var md;function b0(){return md||(md=1,$r.cookies=p0().cookies,$r.headers=g0().headers,$r.draftMode=y0().draftMode),$r}var Gr=b0(),Hn={exports:{}},Vs={},Js={},Xs={},gd;function w0(){return gd||(gd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"detectDomainLocale",{enumerable:!0,get:function(){return t}});function t(r,n,o){if(r){o&&(o=o.toLowerCase());for(const i of r){var s,a;const c=(s=i.domain)==null?void 0:s.split(":",1)[0].toLowerCase();if(n===c||o===i.defaultLocale.toLowerCase()||(a=i.locales)!=null&&a.some(u=>u.toLowerCase()===o))return i}}}}(Xs)),Xs}var Ys={},Zs={},yd;function v0(){return yd||(yd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"removeTrailingSlash",{enumerable:!0,get:function(){return t}});function t(r){return r.replace(/\/$/,"")||"/"}}(Zs)),Zs}var Qs={},ea={},bd;function ta(){return bd||(bd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"parsePath",{enumerable:!0,get:function(){return t}});function t(r){const n=r.indexOf("#"),o=r.indexOf("?"),s=o>-1&&(n<0||o<n);return s||n>-1?{pathname:r.substring(0,s?o:n),query:s?r.substring(o,n>-1?n:void 0):"",hash:n>-1?r.slice(n):""}:{pathname:r,query:"",hash:""}}}(ea)),ea}var wd;function vd(){return wd||(wd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addPathPrefix",{enumerable:!0,get:function(){return r}});const t=ta();function r(n,o){if(!n.startsWith("/")||!o)return n;const{pathname:s,query:a,hash:i}=(0,t.parsePath)(n);return""+o+s+a+i}}(Qs)),Qs}var ra={},Ed;function E0(){return Ed||(Ed=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addPathSuffix",{enumerable:!0,get:function(){return r}});const t=ta();function r(n,o){if(!n.startsWith("/")||!o)return n;const{pathname:s,query:a,hash:i}=(0,t.parsePath)(n);return""+s+o+a+i}}(ra)),ra}var na={},oa={},_d;function sa(){return _d||(_d=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"pathHasPrefix",{enumerable:!0,get:function(){return r}});const t=ta();function r(n,o){if(typeof n!="string")return!1;const{pathname:s}=(0,t.parsePath)(n);return s===o||s.startsWith(o+"/")}}(oa)),oa}var Sd;function _0(){return Sd||(Sd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addLocale",{enumerable:!0,get:function(){return n}});const t=vd(),r=sa();function n(o,s,a,i){if(!s||s===a)return o;const c=o.toLowerCase();return!i&&((0,r.pathHasPrefix)(c,"/api")||(0,r.pathHasPrefix)(c,"/"+s.toLowerCase()))?o:(0,t.addPathPrefix)(o,"/"+s)}}(na)),na}var xd;function S0(){return xd||(xd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"formatNextPathnameInfo",{enumerable:!0,get:function(){return s}});const t=v0(),r=vd(),n=E0(),o=_0();function s(a){let i=(0,o.addLocale)(a.pathname,a.locale,a.buildId?void 0:a.defaultLocale,a.ignorePrefix);return(a.buildId||!a.trailingSlash)&&(i=(0,t.removeTrailingSlash)(i)),a.buildId&&(i=(0,n.addPathSuffix)((0,r.addPathPrefix)(i,"/_next/data/"+a.buildId),a.pathname==="/"?"index.json":".json")),i=(0,r.addPathPrefix)(i,a.basePath),!a.buildId&&a.trailingSlash?i.endsWith("/")?i:(0,n.addPathSuffix)(i,"/"):(0,t.removeTrailingSlash)(i)}}(Ys)),Ys}var aa={},Ad;function x0(){return Ad||(Ad=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getHostname",{enumerable:!0,get:function(){return t}});function t(r,n){let o;if(n!=null&&n.host&&!Array.isArray(n.host))o=n.host.toString().split(":",1)[0];else if(r.hostname)o=r.hostname;else return;return o.toLowerCase()}}(aa)),aa}var ia={},ca={},Rd;function A0(){return Rd||(Rd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"normalizeLocalePath",{enumerable:!0,get:function(){return r}});const t=new WeakMap;function r(n,o){if(!o)return{pathname:n};let s=t.get(o);s||(s=o.map(l=>l.toLowerCase()),t.set(o,s));let a;const i=n.split("/",2);if(!i[1])return{pathname:n};const c=i[1].toLowerCase(),u=s.indexOf(c);return u<0?{pathname:n}:(a=o[u],n=n.slice(a.length+1)||"/",{pathname:n,detectedLocale:a})}}(ca)),ca}var ua={},Cd;function R0(){return Cd||(Cd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"removePathPrefix",{enumerable:!0,get:function(){return r}});const t=sa();function r(n,o){if(!(0,t.pathHasPrefix)(n,o))return n;const s=n.slice(o.length);return s.startsWith("/")?s:"/"+s}}(ua)),ua}var Td;function C0(){return Td||(Td=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getNextPathnameInfo",{enumerable:!0,get:function(){return o}});const t=A0(),r=R0(),n=sa();function o(s,a){var i;const{basePath:c,i18n:u,trailingSlash:l}=(i=a.nextConfig)!=null?i:{},d={pathname:s,trailingSlash:s!=="/"?s.endsWith("/"):l};c&&(0,n.pathHasPrefix)(d.pathname,c)&&(d.pathname=(0,r.removePathPrefix)(d.pathname,c),d.basePath=c);let h=d.pathname;if(d.pathname.startsWith("/_next/data/")&&d.pathname.endsWith(".json")){const E=d.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),b=E[0];d.buildId=b,h=E[1]!=="index"?"/"+E.slice(1).join("/"):"/",a.parseData===!0&&(d.pathname=h)}if(u){let E=a.i18nProvider?a.i18nProvider.analyze(d.pathname):(0,t.normalizeLocalePath)(d.pathname,u.locales);d.locale=E.detectedLocale;var g;d.pathname=(g=E.pathname)!=null?g:d.pathname,!E.detectedLocale&&d.buildId&&(E=a.i18nProvider?a.i18nProvider.analyze(h):(0,t.normalizeLocalePath)(h,u.locales),E.detectedLocale&&(d.locale=E.detectedLocale))}return d}}(ia)),ia}var Pd;function Od(){return Pd||(Pd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NextURL",{enumerable:!0,get:function(){return c}});const t=w0(),r=S0(),n=x0(),o=C0(),s=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function a(u,l){return new URL(String(u).replace(s,"localhost"),l&&String(l).replace(s,"localhost"))}const i=Symbol("NextURLInternal");class c{constructor(l,d,h){let g,E;typeof d=="object"&&"pathname"in d||typeof d=="string"?(g=d,E=h||{}):E=h||d||{},this[i]={url:a(l,g??E.base),options:E,basePath:""},this.analyze()}analyze(){var l,d,h,g,E;const b=(0,o.getNextPathnameInfo)(this[i].url.pathname,{nextConfig:this[i].options.nextConfig,parseData:!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,i18nProvider:this[i].options.i18nProvider}),m=(0,n.getHostname)(this[i].url,this[i].options.headers);this[i].domainLocale=this[i].options.i18nProvider?this[i].options.i18nProvider.detectDomainLocale(m):(0,t.detectDomainLocale)((d=this[i].options.nextConfig)==null||(l=d.i18n)==null?void 0:l.domains,m);const p=((h=this[i].domainLocale)==null?void 0:h.defaultLocale)||((E=this[i].options.nextConfig)==null||(g=E.i18n)==null?void 0:g.defaultLocale);this[i].url.pathname=b.pathname,this[i].defaultLocale=p,this[i].basePath=b.basePath??"",this[i].buildId=b.buildId,this[i].locale=b.locale??p,this[i].trailingSlash=b.trailingSlash}formatPathname(){return(0,r.formatNextPathnameInfo)({basePath:this[i].basePath,buildId:this[i].buildId,defaultLocale:this[i].options.forceLocale?void 0:this[i].defaultLocale,locale:this[i].locale,pathname:this[i].url.pathname,trailingSlash:this[i].trailingSlash})}formatSearch(){return this[i].url.search}get buildId(){return this[i].buildId}set buildId(l){this[i].buildId=l}get locale(){return this[i].locale??""}set locale(l){var d,h;if(!this[i].locale||!(!((h=this[i].options.nextConfig)==null||(d=h.i18n)==null)&&d.locales.includes(l)))throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale "${l}"`),"__NEXT_ERROR_CODE",{value:"E597",enumerable:!1,configurable:!0});this[i].locale=l}get defaultLocale(){return this[i].defaultLocale}get domainLocale(){return this[i].domainLocale}get searchParams(){return this[i].url.searchParams}get host(){return this[i].url.host}set host(l){this[i].url.host=l}get hostname(){return this[i].url.hostname}set hostname(l){this[i].url.hostname=l}get port(){return this[i].url.port}set port(l){this[i].url.port=l}get protocol(){return this[i].url.protocol}set protocol(l){this[i].url.protocol=l}get href(){const l=this.formatPathname(),d=this.formatSearch();return`${this.protocol}//${this.host}${l}${d}${this.hash}`}set href(l){this[i].url=a(l),this.analyze()}get origin(){return this[i].url.origin}get pathname(){return this[i].url.pathname}set pathname(l){this[i].url.pathname=l}get hash(){return this[i].url.hash}set hash(l){this[i].url.hash=l}get search(){return this[i].url.search}set search(l){this[i].url.search=l}get password(){return this[i].url.password}set password(l){this[i].url.password=l}get username(){return this[i].url.username}set username(l){this[i].url.username=l}get basePath(){return this[i].basePath}set basePath(l){this[i].basePath=l.startsWith("/")?l:`/${l}`}toString(){return this.href}toJSON(){return this.href}[Symbol.for("edge-runtime.inspect.custom")](){return{href:this.href,origin:this.origin,protocol:this.protocol,username:this.username,password:this.password,host:this.host,hostname:this.hostname,port:this.port,pathname:this.pathname,search:this.search,searchParams:this.searchParams,hash:this.hash}}clone(){return new c(String(this),this[i].options)}}}(Js)),Js}var la={},da={},kd;function T0(){return kd||(kd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(he,xe){for(var De in xe)Object.defineProperty(he,De,{enumerable:!0,get:xe[De]})}t(e,{ACTION_SUFFIX:function(){return d},APP_DIR_ALIAS:function(){return re},CACHE_ONE_YEAR:function(){return w},DOT_NEXT_ALIAS:function(){return H},ESLINT_DEFAULT_DIRS:function(){return F},GSP_NO_RETURNED_VALUE:function(){return ue},GSSP_COMPONENT_MEMBER_ERROR:function(){return k},GSSP_NO_RETURNED_VALUE:function(){return ce},INFINITE_CACHE:function(){return _},INSTRUMENTATION_HOOK_FILENAME:function(){return I},MATCHED_PATH_HEADER:function(){return o},MIDDLEWARE_FILENAME:function(){return C},MIDDLEWARE_LOCATION_REGEXP:function(){return D},NEXT_BODY_SUFFIX:function(){return E},NEXT_CACHE_IMPLICIT_TAG_ID:function(){return R},NEXT_CACHE_REVALIDATED_TAGS_HEADER:function(){return m},NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER:function(){return p},NEXT_CACHE_SOFT_TAG_MAX_LENGTH:function(){return v},NEXT_CACHE_TAGS_HEADER:function(){return b},NEXT_CACHE_TAG_MAX_ITEMS:function(){return f},NEXT_CACHE_TAG_MAX_LENGTH:function(){return x},NEXT_DATA_SUFFIX:function(){return h},NEXT_INTERCEPTION_MARKER_PREFIX:function(){return n},NEXT_META_SUFFIX:function(){return g},NEXT_QUERY_PARAM_PREFIX:function(){return r},NEXT_RESUME_HEADER:function(){return y},NON_STANDARD_NODE_ENV:function(){return N},PAGES_DIR_ALIAS:function(){return P},PRERENDER_REVALIDATE_HEADER:function(){return s},PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER:function(){return a},PUBLIC_DIR_MIDDLEWARE_CONFLICT:function(){return z},ROOT_DIR_ALIAS:function(){return q},RSC_ACTION_CLIENT_WRAPPER_ALIAS:function(){return j},RSC_ACTION_ENCRYPTION_ALIAS:function(){return T},RSC_ACTION_PROXY_ALIAS:function(){return O},RSC_ACTION_VALIDATE_ALIAS:function(){return J},RSC_CACHE_WRAPPER_ALIAS:function(){return L},RSC_MOD_REF_PROXY_ALIAS:function(){return B},RSC_PREFETCH_SUFFIX:function(){return i},RSC_SEGMENTS_DIR_SUFFIX:function(){return c},RSC_SEGMENT_SUFFIX:function(){return u},RSC_SUFFIX:function(){return l},SERVER_PROPS_EXPORT_ERROR:function(){return Q},SERVER_PROPS_GET_INIT_PROPS_CONFLICT:function(){return ne},SERVER_PROPS_SSG_CONFLICT:function(){return de},SERVER_RUNTIME:function(){return ee},SSG_FALLBACK_EXPORT_ERROR:function(){return M},SSG_GET_INITIAL_PROPS_CONFLICT:function(){return V},STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR:function(){return be},UNSTABLE_REVALIDATE_RENAME_ERROR:function(){return ye},WEBPACK_LAYERS:function(){return Ee},WEBPACK_RESOURCE_QUERIES:function(){return Re}});const r="nxtP",n="nxtI",o="x-matched-path",s="x-prerender-revalidate",a="x-prerender-revalidate-if-generated",i=".prefetch.rsc",c=".segments",u=".segment.rsc",l=".rsc",d=".action",h=".json",g=".meta",E=".body",b="x-next-cache-tags",m="x-next-revalidated-tags",p="x-next-revalidate-tag-token",y="next-resume",f=128,x=256,v=1024,R="_N_T_",w=31536e3,_=4294967294,C="middleware",D=`(?:src/)?${C}`,I="instrumentation",P="private-next-pages",H="private-dot-next",q="private-next-root-dir",re="private-next-app-dir",B="private-next-rsc-mod-ref-proxy",J="private-next-rsc-action-validate",O="private-next-rsc-server-reference",L="private-next-rsc-cache-wrapper",T="private-next-rsc-action-encryption",j="private-next-rsc-action-client-wrapper",z="You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict",V="You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps",ne="You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.",de="You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps",be="can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props",Q="pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export",ue="Your `getStaticProps` function did not return an object. Did you forget to add a `return`?",ce="Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?",ye="The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.",k="can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member",N='You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env',M="Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export",F=["app","pages","components","lib","src"],ee={edge:"edge",experimentalEdge:"experimental-edge",nodejs:"nodejs"},U={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",apiNode:"api-node",apiEdge:"api-edge",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",pagesDirBrowser:"pages-dir-browser",pagesDirEdge:"pages-dir-edge",pagesDirNode:"pages-dir-node"},Ee={...U,GROUP:{builtinReact:[U.reactServerComponents,U.actionBrowser],serverOnly:[U.reactServerComponents,U.actionBrowser,U.instrument,U.middleware],neutralTarget:[U.apiNode,U.apiEdge],clientOnly:[U.serverSideRendering,U.appPagesBrowser],bundled:[U.reactServerComponents,U.actionBrowser,U.serverSideRendering,U.appPagesBrowser,U.shared,U.instrument,U.middleware],appPages:[U.reactServerComponents,U.serverSideRendering,U.appPagesBrowser,U.actionBrowser]}},Re={edgeSSREntry:"__next_edge_ssr_entry__",metadata:"__next_metadata__",metadataRoute:"__next_metadata_route__",metadataImageMeta:"__next_metadata_image_meta__"}}(da)),da}var Nd;function Id(){return Nd||(Nd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,u){for(var l in u)Object.defineProperty(c,l,{enumerable:!0,get:u[l]})}t(e,{fromNodeOutgoingHttpHeaders:function(){return n},normalizeNextQueryParam:function(){return i},splitCookiesString:function(){return o},toNodeOutgoingHttpHeaders:function(){return s},validateURL:function(){return a}});const r=T0();function n(c){const u=new Headers;for(let[l,d]of Object.entries(c)){const h=Array.isArray(d)?d:[d];for(let g of h)typeof g>"u"||(typeof g=="number"&&(g=g.toString()),u.append(l,g))}return u}function o(c){var u=[],l=0,d,h,g,E,b;function m(){for(;l<c.length&&/\s/.test(c.charAt(l));)l+=1;return l<c.length}function p(){return h=c.charAt(l),h!=="="&&h!==";"&&h!==","}for(;l<c.length;){for(d=l,b=!1;m();)if(h=c.charAt(l),h===","){for(g=l,l+=1,m(),E=l;l<c.length&&p();)l+=1;l<c.length&&c.charAt(l)==="="?(b=!0,l=E,u.push(c.substring(d,g)),d=l):l=g+1}else l+=1;(!b||l>=c.length)&&u.push(c.substring(d,c.length))}return u}function s(c){const u={},l=[];if(c)for(const[d,h]of c.entries())d.toLowerCase()==="set-cookie"?(l.push(...o(h)),u[d]=l.length===1?l[0]:l):u[d]=h;return u}function a(c){try{return String(new URL(String(c)))}catch(u){throw Object.defineProperty(new Error(`URL is malformed "${String(c)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`,{cause:u}),"__NEXT_ERROR_CODE",{value:"E61",enumerable:!1,configurable:!0})}}function i(c){const u=[r.NEXT_QUERY_PARAM_PREFIX,r.NEXT_INTERCEPTION_MARKER_PREFIX];for(const l of u)if(c!==l&&c.startsWith(l))return c.substring(l.length);return null}}(la)),la}var fa={},Dd;function P0(){return Dd||(Dd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,a){for(var i in a)Object.defineProperty(s,i,{enumerable:!0,get:a[i]})}t(e,{PageSignatureError:function(){return r},RemovedPageError:function(){return n},RemovedUAError:function(){return o}});class r extends Error{constructor({page:a}){super(`The middleware "${a}" accepts an async API directly with the form:
162
+
163
+ export function middleware(request, event) {
164
+ return NextResponse.redirect('/new-location')
165
+ }
166
+
167
+ Read more: https://nextjs.org/docs/messages/middleware-new-signature
168
+ `)}}class n extends Error{constructor(){super("The request.page has been deprecated in favour of `URLPattern`.\n Read more: https://nextjs.org/docs/messages/middleware-request-page\n ")}}class o extends Error{constructor(){super("The request.ua has been removed in favour of `userAgent` function.\n Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n ")}}}(fa)),fa}var Md;function O0(){return Md||(Md=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,u){for(var l in u)Object.defineProperty(c,l,{enumerable:!0,get:u[l]})}t(e,{INTERNALS:function(){return a},NextRequest:function(){return i}});const r=Od(),n=Id(),o=P0(),s=Fr(),a=Symbol("internal request");class i extends Request{constructor(u,l={}){const d=typeof u!="string"&&"url"in u?u.url:String(u);(0,n.validateURL)(d),process.env.NEXT_RUNTIME!=="edge"&&l.body&&l.duplex!=="half"&&(l.duplex="half"),u instanceof Request?super(u,l):super(d,l);const h=new r.NextURL(d,{headers:(0,n.toNodeOutgoingHttpHeaders)(this.headers),nextConfig:l.nextConfig});this[a]={cookies:new s.RequestCookies(this.headers),nextUrl:h,url:process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE?d:h.toString()}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,nextUrl:this.nextUrl,url:this.url,bodyUsed:this.bodyUsed,cache:this.cache,credentials:this.credentials,destination:this.destination,headers:Object.fromEntries(this.headers),integrity:this.integrity,keepalive:this.keepalive,method:this.method,mode:this.mode,redirect:this.redirect,referrer:this.referrer,referrerPolicy:this.referrerPolicy,signal:this.signal}}get cookies(){return this[a].cookies}get nextUrl(){return this[a].nextUrl}get page(){throw new o.RemovedPageError}get ua(){throw new o.RemovedUAError}get url(){return this[a].url}}}(Vs)),Vs}var ha={},Ld;function k0(){return Ld||(Ld=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NextResponse",{enumerable:!0,get:function(){return u}});const t=Fr(),r=Od(),n=Id(),o=Cs(),s=Fr(),a=Symbol("internal response"),i=new Set([301,302,303,307,308]);function c(l,d){var h;if(!(l==null||(h=l.request)==null)&&h.headers){if(!(l.request.headers instanceof Headers))throw Object.defineProperty(new Error("request.headers must be an instance of Headers"),"__NEXT_ERROR_CODE",{value:"E119",enumerable:!1,configurable:!0});const g=[];for(const[E,b]of l.request.headers)d.set("x-middleware-request-"+E,b),g.push(E);d.set("x-middleware-override-headers",g.join(","))}}class u extends Response{constructor(d,h={}){super(d,h);const g=this.headers,E=new s.ResponseCookies(g),b=new Proxy(E,{get(m,p,y){switch(p){case"delete":case"set":return(...f)=>{const x=Reflect.apply(m[p],m,f),v=new Headers(g);return x instanceof s.ResponseCookies&&g.set("x-middleware-set-cookie",x.getAll().map(R=>(0,t.stringifyCookie)(R)).join(",")),c(h,v),x};default:return o.ReflectAdapter.get(m,p,y)}}});this[a]={cookies:b,url:h.url?new r.NextURL(h.url,{headers:(0,n.toNodeOutgoingHttpHeaders)(g),nextConfig:h.nextConfig}):void 0}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,url:this.url,body:this.body,bodyUsed:this.bodyUsed,headers:Object.fromEntries(this.headers),ok:this.ok,redirected:this.redirected,status:this.status,statusText:this.statusText,type:this.type}}get cookies(){return this[a].cookies}static json(d,h){const g=Response.json(d,h);return new u(g.body,g)}static redirect(d,h){const g=typeof h=="number"?h:(h==null?void 0:h.status)??307;if(!i.has(g))throw Object.defineProperty(new RangeError('Failed to execute "redirect" on "response": Invalid status code'),"__NEXT_ERROR_CODE",{value:"E529",enumerable:!1,configurable:!0});const E=typeof h=="object"?h:{},b=new Headers(E==null?void 0:E.headers);return b.set("Location",(0,n.validateURL)(d)),new u(null,{...E,headers:b,status:g})}static rewrite(d,h){const g=new Headers(h==null?void 0:h.headers);return g.set("x-middleware-rewrite",(0,n.validateURL)(d)),c(h,g),new u(null,{...h,headers:g})}static next(d){const h=new Headers(d==null?void 0:d.headers);return h.set("x-middleware-next","1"),c(d,h),new u(null,{...d,headers:h})}}}(ha)),ha}var pa={},jd;function N0(){return jd||(jd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageResponse",{enumerable:!0,get:function(){return t}});function t(){throw Object.defineProperty(new Error('ImageResponse moved from "next/server" to "next/og" since Next.js 14, please import from "next/og" instead'),"__NEXT_ERROR_CODE",{value:"E183",enumerable:!1,configurable:!0})}}(pa)),pa}var ma={},ga={exports:{}},Hd;function I0(){return Hd||(Hd=1,(()=>{var e={226:function(o,s){(function(a,i){var c="1.0.35",u="",l="?",d="function",h="undefined",g="object",E="string",b="major",m="model",p="name",y="type",f="vendor",x="version",v="architecture",R="console",w="mobile",_="tablet",C="smarttv",D="wearable",I="embedded",P=350,H="Amazon",q="Apple",re="ASUS",B="BlackBerry",J="Browser",O="Chrome",L="Edge",T="Firefox",j="Google",z="Huawei",V="LG",ne="Microsoft",de="Motorola",be="Opera",Q="Samsung",ue="Sharp",ce="Sony",ye="Xiaomi",k="Zebra",N="Facebook",M="Chromium OS",F="Mac OS",ee=function(se,me){var te={};for(var we in se)me[we]&&me[we].length%2===0?te[we]=me[we].concat(se[we]):te[we]=se[we];return te},U=function(se){for(var me={},te=0;te<se.length;te++)me[se[te].toUpperCase()]=se[te];return me},Ee=function(se,me){return typeof se===E?Re(me).indexOf(Re(se))!==-1:!1},Re=function(se){return se.toLowerCase()},he=function(se){return typeof se===E?se.replace(/[^\d\.]/g,u).split(".")[0]:i},xe=function(se,me){if(typeof se===E)return se=se.replace(/^\s\s*/,u),typeof me===h?se:se.substring(0,P)},De=function(se,me){for(var te=0,we,Dt,dt,pe,Y,ft;te<me.length&&!Y;){var fi=me[te],rh=me[te+1];for(we=Dt=0;we<fi.length&&!Y&&fi[we];)if(Y=fi[we++].exec(se),Y)for(dt=0;dt<rh.length;dt++)ft=Y[++Dt],pe=rh[dt],typeof pe===g&&pe.length>0?pe.length===2?typeof pe[1]==d?this[pe[0]]=pe[1].call(this,ft):this[pe[0]]=pe[1]:pe.length===3?typeof pe[1]===d&&!(pe[1].exec&&pe[1].test)?this[pe[0]]=ft?pe[1].call(this,ft,pe[2]):i:this[pe[0]]=ft?ft.replace(pe[1],pe[2]):i:pe.length===4&&(this[pe[0]]=ft?pe[3].call(this,ft.replace(pe[1],pe[2])):i):this[pe]=ft||i;te+=2}},Sr=function(se,me){for(var te in me)if(typeof me[te]===g&&me[te].length>0){for(var we=0;we<me[te].length;we++)if(Ee(me[te][we],se))return te===l?i:te}else if(Ee(me[te],se))return te===l?i:te;return se},oo={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Xr={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Fe={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[x,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[x,[p,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,x],[/opios[\/ ]+([\w\.]+)/i],[x,[p,be+" Mini"]],[/\bopr\/([\w\.]+)/i],[x,[p,be]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[p,x],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[x,[p,"UC"+J]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[x,[p,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[x,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[x,[p,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[x,[p,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[x,[p,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure "+J],x],[/\bfocus\/([\w\.]+)/i],[x,[p,T+" Focus"]],[/\bopt\/([\w\.]+)/i],[x,[p,be+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[x,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[x,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[x,[p,be+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[x,[p,"MIUI "+J]],[/fxios\/([-\w\.]+)/i],[x,[p,T]],[/\bqihu|(qi?ho?o?|360)browser/i],[[p,"360 "+J]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 "+J],x],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],x],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[p,x],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,N],x],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[p,x],[/\bgsa\/([\w\.]+) .*safari\//i],[x,[p,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[x,[p,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[x,[p,O+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,O+" WebView"],x],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[x,[p,"Android "+J]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,x],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[x,[p,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[x,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[x,Sr,oo]],[/(webkit|khtml)\/([\w\.]+)/i],[p,x],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,"Netscape"],x],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[x,[p,T+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[p,x],[/(cobalt)\/([\w\.]+)/i],[p,[x,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[v,"amd64"]],[/(ia32(?=;))/i],[[v,Re]],[/((?:i[346]|x)86)[;\)]/i],[[v,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[v,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[v,"armhf"]],[/windows (ce|mobile); ppc;/i],[[v,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[v,/ower/,u,Re]],[/(sun4\w)[;\)]/i],[[v,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[v,Re]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[m,[f,Q],[y,_]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[m,[f,Q],[y,w]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[m,[f,q],[y,w]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[m,[f,q],[y,_]],[/(macintosh);/i],[m,[f,q]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[m,[f,ue],[y,w]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[m,[f,z],[y,_]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[m,[f,z],[y,w]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[m,/_/g," "],[f,ye],[y,w]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[m,/_/g," "],[f,ye],[y,_]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[m,[f,"OPPO"],[y,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[m,[f,"Vivo"],[y,w]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[m,[f,"Realme"],[y,w]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[m,[f,de],[y,w]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[m,[f,de],[y,_]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[m,[f,V],[y,_]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[m,[f,V],[y,w]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[m,[f,"Lenovo"],[y,_]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[m,/_/g," "],[f,"Nokia"],[y,w]],[/(pixel c)\b/i],[m,[f,j],[y,_]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[m,[f,j],[y,w]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[m,[f,ce],[y,w]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[m,"Xperia Tablet"],[f,ce],[y,_]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[m,[f,"OnePlus"],[y,w]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[m,[f,H],[y,_]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[m,/(.+)/g,"Fire Phone $1"],[f,H],[y,w]],[/(playbook);[-\w\),; ]+(rim)/i],[m,f,[y,_]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[m,[f,B],[y,w]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[m,[f,re],[y,_]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[m,[f,re],[y,w]],[/(nexus 9)/i],[m,[f,"HTC"],[y,_]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[f,[m,/_/g," "],[y,w]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[m,[f,"Acer"],[y,_]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[m,[f,"Meizu"],[y,w]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[f,m,[y,w]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[f,m,[y,_]],[/(surface duo)/i],[m,[f,ne],[y,_]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[m,[f,"Fairphone"],[y,w]],[/(u304aa)/i],[m,[f,"AT&T"],[y,w]],[/\bsie-(\w*)/i],[m,[f,"Siemens"],[y,w]],[/\b(rct\w+) b/i],[m,[f,"RCA"],[y,_]],[/\b(venue[\d ]{2,7}) b/i],[m,[f,"Dell"],[y,_]],[/\b(q(?:mv|ta)\w+) b/i],[m,[f,"Verizon"],[y,_]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[m,[f,"Barnes & Noble"],[y,_]],[/\b(tm\d{3}\w+) b/i],[m,[f,"NuVision"],[y,_]],[/\b(k88) b/i],[m,[f,"ZTE"],[y,_]],[/\b(nx\d{3}j) b/i],[m,[f,"ZTE"],[y,w]],[/\b(gen\d{3}) b.+49h/i],[m,[f,"Swiss"],[y,w]],[/\b(zur\d{3}) b/i],[m,[f,"Swiss"],[y,_]],[/\b((zeki)?tb.*\b) b/i],[m,[f,"Zeki"],[y,_]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],m,[y,_]],[/\b(ns-?\w{0,9}) b/i],[m,[f,"Insignia"],[y,_]],[/\b((nxa|next)-?\w{0,9}) b/i],[m,[f,"NextBook"],[y,_]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],m,[y,w]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],m,[y,w]],[/\b(ph-1) /i],[m,[f,"Essential"],[y,w]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[m,[f,"Envizen"],[y,_]],[/\b(trio[-\w\. ]+) b/i],[m,[f,"MachSpeed"],[y,_]],[/\btu_(1491) b/i],[m,[f,"Rotor"],[y,_]],[/(shield[\w ]+) b/i],[m,[f,"Nvidia"],[y,_]],[/(sprint) (\w+)/i],[f,m,[y,w]],[/(kin\.[onetw]{3})/i],[[m,/\./g," "],[f,ne],[y,w]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[m,[f,k],[y,_]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[m,[f,k],[y,w]],[/smart-tv.+(samsung)/i],[f,[y,C]],[/hbbtv.+maple;(\d+)/i],[[m,/^/,"SmartTV"],[f,Q],[y,C]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,V],[y,C]],[/(apple) ?tv/i],[f,[m,q+" TV"],[y,C]],[/crkey/i],[[m,O+"cast"],[f,j],[y,C]],[/droid.+aft(\w)( bui|\))/i],[m,[f,H],[y,C]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[m,[f,ue],[y,C]],[/(bravia[\w ]+)( bui|\))/i],[m,[f,ce],[y,C]],[/(mitv-\w{5}) bui/i],[m,[f,ye],[y,C]],[/Hbbtv.*(technisat) (.*);/i],[f,m,[y,C]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[f,xe],[m,xe],[y,C]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[y,C]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,m,[y,R]],[/droid.+; (shield) bui/i],[m,[f,"Nvidia"],[y,R]],[/(playstation [345portablevi]+)/i],[m,[f,ce],[y,R]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[m,[f,ne],[y,R]],[/((pebble))app/i],[f,m,[y,D]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[m,[f,q],[y,D]],[/droid.+; (glass) \d/i],[m,[f,j],[y,D]],[/droid.+; (wt63?0{2,3})\)/i],[m,[f,k],[y,D]],[/(quest( 2| pro)?)/i],[m,[f,N],[y,D]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[y,I]],[/(aeobc)\b/i],[m,[f,H],[y,I]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[m,[y,w]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[m,[y,_]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[y,_]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[y,w]],[/(android[-\w\. ]{0,9});.+buil/i],[m,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[x,[p,L+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[x,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[p,x],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[x,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,x],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[p,[x,Sr,Xr]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[p,"Windows"],[x,Sr,Xr]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[x,/_/g,"."],[p,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[p,F],[x,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[x,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[p,x],[/\(bb(10);/i],[x,[p,B]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[x,[p,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[x,[p,T+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[x,[p,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[x,[p,"watchOS"]],[/crkey\/([\d\.]+)/i],[x,[p,O+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[p,M],x],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[p,x],[/(sunos) ?([\w\.\d]*)/i],[[p,"Solaris"],x],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[p,x]]},Ae=function(se,me){if(typeof se===g&&(me=se,se=i),!(this instanceof Ae))return new Ae(se,me).getResult();var te=typeof a!==h&&a.navigator?a.navigator:i,we=se||(te&&te.userAgent?te.userAgent:u),Dt=te&&te.userAgentData?te.userAgentData:i,dt=me?ee(Fe,me):Fe,pe=te&&te.userAgent==we;return this.getBrowser=function(){var Y={};return Y[p]=i,Y[x]=i,De.call(Y,we,dt.browser),Y[b]=he(Y[x]),pe&&te&&te.brave&&typeof te.brave.isBrave==d&&(Y[p]="Brave"),Y},this.getCPU=function(){var Y={};return Y[v]=i,De.call(Y,we,dt.cpu),Y},this.getDevice=function(){var Y={};return Y[f]=i,Y[m]=i,Y[y]=i,De.call(Y,we,dt.device),pe&&!Y[y]&&Dt&&Dt.mobile&&(Y[y]=w),pe&&Y[m]=="Macintosh"&&te&&typeof te.standalone!==h&&te.maxTouchPoints&&te.maxTouchPoints>2&&(Y[m]="iPad",Y[y]=_),Y},this.getEngine=function(){var Y={};return Y[p]=i,Y[x]=i,De.call(Y,we,dt.engine),Y},this.getOS=function(){var Y={};return Y[p]=i,Y[x]=i,De.call(Y,we,dt.os),pe&&!Y[p]&&Dt&&Dt.platform!="Unknown"&&(Y[p]=Dt.platform.replace(/chrome os/i,M).replace(/macos/i,F)),Y},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return we},this.setUA=function(Y){return we=typeof Y===E&&Y.length>P?xe(Y,P):Y,this},this.setUA(we),this};Ae.VERSION=c,Ae.BROWSER=U([p,x,b]),Ae.CPU=U([v]),Ae.DEVICE=U([m,f,y,R,w,C,_,D,I]),Ae.ENGINE=Ae.OS=U([p,x]),typeof s!==h?(o.exports&&(s=o.exports=Ae),s.UAParser=Ae):typeof a!==h&&(a.UAParser=Ae);var lt=typeof a!==h&&(a.jQuery||a.Zepto);if(lt&&!lt.ua){var xr=new Ae;lt.ua=xr.getResult(),lt.ua.get=function(){return xr.getUA()},lt.ua.set=function(se){xr.setUA(se);var me=xr.getResult();for(var te in me)lt.ua[te]=me[te]}}})(typeof window=="object"?window:this)}},t={};function r(o){var s=t[o];if(s!==void 0)return s.exports;var a=t[o]={exports:{}},i=!0;try{e[o].call(a.exports,a,a.exports,r),i=!1}finally{i&&delete t[o]}return a.exports}typeof r<"u"&&(r.ab=__dirname+"/");var n=r(226);ga.exports=n})()),ga.exports}var Ud;function Wd(){return Ud||(Ud=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var u in c)Object.defineProperty(i,u,{enumerable:!0,get:c[u]})}t(e,{isBot:function(){return o},userAgent:function(){return a},userAgentFromString:function(){return s}});const r=n(I0());function n(i){return i&&i.__esModule?i:{default:i}}function o(i){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(i)}function s(i){return{...(0,r.default)(i),isBot:i===void 0?!1:o(i)}}function a({headers:i}){return s(i.get("user-agent")||void 0)}}(ma)),ma}var ya={},$d;function D0(){return $d||($d=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"URLPattern",{enumerable:!0,get:function(){return t}});const t=typeof URLPattern>"u"?void 0:URLPattern}(ya)),ya}var ba={},wa={},Fd;function M0(){return Fd||(Fd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"after",{enumerable:!0,get:function(){return r}});const t=Pt();function r(n){const o=t.workAsyncStorage.getStore();if(!o)throw Object.defineProperty(new Error("`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context"),"__NEXT_ERROR_CODE",{value:"E468",enumerable:!1,configurable:!0});const{afterContext:s}=o;return s.after(n)}}(wa)),wa}var Kd;function L0(){return Kd||(Kd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),t(M0(),e);function t(r,n){return Object.keys(r).forEach(function(o){o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:function(){return r[o]}})}),r}}(ba)),ba}var va={},qd;function j0(){return qd||(qd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"connection",{enumerable:!0,get:function(){return i}});const t=Pt(),r=Kt(),n=qr(),o=pr(),s=Kr(),a=qs();function i(){const c=t.workAsyncStorage.getStore(),u=r.workUnitAsyncStorage.getStore();if(c){if(u&&u.phase==="after"&&!(0,a.isRequestAPICallableInsideAfter)())throw Object.defineProperty(new Error(`Route ${c.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E186",enumerable:!1,configurable:!0});if(c.forceStatic)return Promise.resolve(void 0);if(u){if(u.type==="cache")throw Object.defineProperty(new Error(`Route ${c.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E111",enumerable:!1,configurable:!0});if(u.type==="unstable-cache")throw Object.defineProperty(new Error(`Route ${c.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E1",enumerable:!1,configurable:!0})}if(c.dynamicShouldError)throw Object.defineProperty(new o.StaticGenBailoutError(`Route ${c.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E562",enumerable:!1,configurable:!0});if(u){if(u.type==="prerender")return(0,s.makeHangingPromise)(u.renderSignal,"`connection()`");u.type==="prerender-ppr"?(0,n.postponeWithTracking)(c.route,"connection",u.dynamicTracking):u.type==="prerender-legacy"&&(0,n.throwToInterruptStaticGeneration)("connection",c,u)}(0,n.trackDynamicDataInDynamicRender)(c,u)}return Promise.resolve(void 0)}}(va)),va}var Ea={},_a={},Gd;function H0(){return Gd||(Gd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"InvariantError",{enumerable:!0,get:function(){return t}});class t extends Error{constructor(n,o){super("Invariant: "+(n.endsWith(".")?n:n+".")+" This is a bug in Next.js.",o),this.name="InvariantError"}}}(_a)),_a}var Sa={},Bd;function U0(){return Bd||(Bd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{describeHasCheckingStringProperty:function(){return o},describeStringPropertyAccess:function(){return n},wellKnownProperties:function(){return s}});const r=/^[A-Za-z_$][A-Za-z0-9_$]*$/;function n(a,i){return r.test(i)?"`"+a+"."+i+"`":"`"+a+"["+JSON.stringify(i)+"]`"}function o(a,i){const c=JSON.stringify(i);return"`Reflect.has("+a+", "+c+")`, `"+c+" in "+a+"`, or similar"}const s=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toString","valueOf","toLocaleString","then","catch","finally","status","displayName","toJSON","$$typeof","__esModule"])}(Sa)),Sa}var zd;function W0(){return zd||(zd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"unstable_rootParams",{enumerable:!0,get:function(){return c}});const t=H0(),r=qr(),n=Pt(),o=Kt(),s=Kr(),a=U0(),i=new WeakMap;async function c(){const d=n.workAsyncStorage.getStore();if(!d)throw Object.defineProperty(new t.InvariantError("Missing workStore in unstable_rootParams"),"__NEXT_ERROR_CODE",{value:"E615",enumerable:!1,configurable:!0});const h=o.workUnitAsyncStorage.getStore();if(!h)throw Object.defineProperty(new Error(`Route ${d.route} used \`unstable_rootParams()\` in Pages Router. This API is only available within App Router.`),"__NEXT_ERROR_CODE",{value:"E641",enumerable:!1,configurable:!0});switch(h.type){case"unstable-cache":case"cache":throw Object.defineProperty(new Error(`Route ${d.route} used \`unstable_rootParams()\` inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`),"__NEXT_ERROR_CODE",{value:"E642",enumerable:!1,configurable:!0});case"prerender":case"prerender-ppr":case"prerender-legacy":return u(h.rootParams,d,h);default:return Promise.resolve(h.rootParams)}}function u(d,h,g){const E=h.fallbackRouteParams;if(E){let b=!1;for(const m in d)if(E.has(m)){b=!0;break}if(b){if(g.type==="prerender"){const m=i.get(d);if(m)return m;const p=(0,s.makeHangingPromise)(g.renderSignal,"`unstable_rootParams`");return i.set(d,p),p}return l(d,E,h,g)}}return Promise.resolve(d)}function l(d,h,g,E){const b=i.get(d);if(b)return b;const m={...d},p=Promise.resolve(m);return i.set(d,p),Object.keys(d).forEach(y=>{a.wellKnownProperties.has(y)||(h.has(y)?Object.defineProperty(m,y,{get(){const f=(0,a.describeStringPropertyAccess)("unstable_rootParams",y);E.type==="prerender-ppr"?(0,r.postponeWithTracking)(g.route,f,E.dynamicTracking):(0,r.throwToInterruptStaticGeneration)(f,g,E)},enumerable:!0}):p[y]=d[y])}),p}}(Ea)),Ea}var Vd;function $0(){return Vd||(Vd=1,function(e,t){const r={NextRequest:O0().NextRequest,NextResponse:k0().NextResponse,ImageResponse:N0().ImageResponse,userAgentFromString:Wd().userAgentFromString,userAgent:Wd().userAgent,URLPattern:D0().URLPattern,after:L0().after,connection:j0().connection,unstable_rootParams:W0().unstable_rootParams};e.exports=r,t.NextRequest=r.NextRequest,t.NextResponse=r.NextResponse,t.ImageResponse=r.ImageResponse,t.userAgentFromString=r.userAgentFromString,t.userAgent=r.userAgent,t.URLPattern=r.URLPattern,t.after=r.after,t.connection=r.connection,t.unstable_rootParams=r.unstable_rootParams}(Hn,Hn.exports)),Hn.exports}var ge=$0();const ae=crypto,Be=e=>e instanceof CryptoKey,F0=async(e,t)=>{const r=`SHA-${e.slice(-3)}`;return new Uint8Array(await ae.subtle.digest(r,t))},Ue=new TextEncoder,qt=new TextDecoder,Un=2**32;function vt(...e){const t=e.reduce((o,{length:s})=>o+s,0),r=new Uint8Array(t);let n=0;for(const o of e)r.set(o,n),n+=o.length;return r}function K0(e,t){return vt(Ue.encode(e),new Uint8Array([0]),t)}function xa(e,t,r){if(t<0||t>=Un)throw new RangeError(`value must be >= 0 and <= ${Un-1}. Received ${t}`);e.set([t>>>24,t>>>16,t>>>8,t&255],r)}function Jd(e){const t=Math.floor(e/Un),r=e%Un,n=new Uint8Array(8);return xa(n,t,0),xa(n,r,4),n}function Aa(e){const t=new Uint8Array(4);return xa(t,e),t}function Ra(e){return vt(Aa(e.length),e)}async function q0(e,t,r){const n=Math.ceil((t>>3)/32),o=new Uint8Array(n*32);for(let s=0;s<n;s++){const a=new Uint8Array(4+e.length+r.length);a.set(Aa(s+1)),a.set(e,4),a.set(r,4+e.length),o.set(await F0("sha256",a),s*32)}return o.slice(0,t>>3)}const G0=e=>{let t=e;typeof t=="string"&&(t=Ue.encode(t));const r=32768,n=[];for(let o=0;o<t.length;o+=r)n.push(String.fromCharCode.apply(null,t.subarray(o,o+r)));return btoa(n.join(""))},ze=e=>G0(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),B0=e=>{const t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r},Oe=e=>{let t=e;t instanceof Uint8Array&&(t=qt.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return B0(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};class Me extends Error{constructor(t,r){var n;super(t,r),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,(n=Error.captureStackTrace)==null||n.call(Error,this,this.constructor)}}Me.code="ERR_JOSE_GENERIC";class Ke extends Me{constructor(t,r,n="unspecified",o="unspecified"){super(t,{cause:{claim:n,reason:o,payload:r}}),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=n,this.reason=o,this.payload=r}}Ke.code="ERR_JWT_CLAIM_VALIDATION_FAILED";class Ca extends Me{constructor(t,r,n="unspecified",o="unspecified"){super(t,{cause:{claim:n,reason:o,payload:r}}),this.code="ERR_JWT_EXPIRED",this.claim=n,this.reason=o,this.payload=r}}Ca.code="ERR_JWT_EXPIRED";class Wn extends Me{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}}Wn.code="ERR_JOSE_ALG_NOT_ALLOWED";class _e extends Me{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}}_e.code="ERR_JOSE_NOT_SUPPORTED";class $n extends Me{constructor(t="decryption operation failed",r){super(t,r),this.code="ERR_JWE_DECRYPTION_FAILED"}}$n.code="ERR_JWE_DECRYPTION_FAILED";class G extends Me{constructor(){super(...arguments),this.code="ERR_JWE_INVALID"}}G.code="ERR_JWE_INVALID";class ke extends Me{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}}ke.code="ERR_JWS_INVALID";class Ta extends Me{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}}Ta.code="ERR_JWT_INVALID";class z0 extends Me{constructor(){super(...arguments),this.code="ERR_JWK_INVALID"}}z0.code="ERR_JWK_INVALID";class Pa extends Me{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}}Pa.code="ERR_JWKS_INVALID";class Oa extends Me{constructor(t="no applicable key found in the JSON Web Key Set",r){super(t,r),this.code="ERR_JWKS_NO_MATCHING_KEY"}}Oa.code="ERR_JWKS_NO_MATCHING_KEY";class Xd extends Me{constructor(t="multiple matching keys found in the JSON Web Key Set",r){super(t,r),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}Xd.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";class Yd extends Me{constructor(t="request timed out",r){super(t,r),this.code="ERR_JWKS_TIMEOUT"}}Yd.code="ERR_JWKS_TIMEOUT";class Zd extends Me{constructor(t="signature verification failed",r){super(t,r),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}Zd.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";const ka=ae.getRandomValues.bind(ae);function Qd(e){switch(e){case"A128GCM":case"A128GCMKW":case"A192GCM":case"A192GCMKW":case"A256GCM":case"A256GCMKW":return 96;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return 128;default:throw new _e(`Unsupported JWE Algorithm: ${e}`)}}const V0=e=>ka(new Uint8Array(Qd(e)>>3)),ef=(e,t)=>{if(t.length<<3!==Qd(e))throw new G("Invalid Initialization Vector length")},Fn=(e,t)=>{const r=e.byteLength<<3;if(r!==t)throw new G(`Invalid Content Encryption Key length. Expected ${t} bits, got ${r} bits`)},J0=(e,t)=>{if(!(e instanceof Uint8Array))throw new TypeError("First argument must be a buffer");if(!(t instanceof Uint8Array))throw new TypeError("Second argument must be a buffer");if(e.length!==t.length)throw new TypeError("Input buffers must have the same length");const r=e.length;let n=0,o=-1;for(;++o<r;)n|=e[o]^t[o];return n===0};function Ne(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function Et(e,t){return e.name===t}function Kn(e){return parseInt(e.name.slice(4),10)}function X0(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}function tf(e,t){if(t.length&&!t.some(r=>e.usages.includes(r))){let r="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const n=t.pop();r+=`one of ${t.join(", ")}, or ${n}.`}else t.length===2?r+=`one of ${t[0]} or ${t[1]}.`:r+=`${t[0]}.`;throw new TypeError(r)}}function Y0(e,t,...r){switch(t){case"HS256":case"HS384":case"HS512":{if(!Et(e.algorithm,"HMAC"))throw Ne("HMAC");const n=parseInt(t.slice(2),10);if(Kn(e.algorithm.hash)!==n)throw Ne(`SHA-${n}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!Et(e.algorithm,"RSASSA-PKCS1-v1_5"))throw Ne("RSASSA-PKCS1-v1_5");const n=parseInt(t.slice(2),10);if(Kn(e.algorithm.hash)!==n)throw Ne(`SHA-${n}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!Et(e.algorithm,"RSA-PSS"))throw Ne("RSA-PSS");const n=parseInt(t.slice(2),10);if(Kn(e.algorithm.hash)!==n)throw Ne(`SHA-${n}`,"algorithm.hash");break}case"EdDSA":{if(e.algorithm.name!=="Ed25519"&&e.algorithm.name!=="Ed448")throw Ne("Ed25519 or Ed448");break}case"Ed25519":{if(!Et(e.algorithm,"Ed25519"))throw Ne("Ed25519");break}case"ES256":case"ES384":case"ES512":{if(!Et(e.algorithm,"ECDSA"))throw Ne("ECDSA");const n=X0(t);if(e.algorithm.namedCurve!==n)throw Ne(n,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}tf(e,r)}function Ot(e,t,...r){switch(t){case"A128GCM":case"A192GCM":case"A256GCM":{if(!Et(e.algorithm,"AES-GCM"))throw Ne("AES-GCM");const n=parseInt(t.slice(1,4),10);if(e.algorithm.length!==n)throw Ne(n,"algorithm.length");break}case"A128KW":case"A192KW":case"A256KW":{if(!Et(e.algorithm,"AES-KW"))throw Ne("AES-KW");const n=parseInt(t.slice(1,4),10);if(e.algorithm.length!==n)throw Ne(n,"algorithm.length");break}case"ECDH":{switch(e.algorithm.name){case"ECDH":case"X25519":case"X448":break;default:throw Ne("ECDH, X25519, or X448")}break}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!Et(e.algorithm,"PBKDF2"))throw Ne("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(!Et(e.algorithm,"RSA-OAEP"))throw Ne("RSA-OAEP");const n=parseInt(t.slice(9),10)||1;if(Kn(e.algorithm.hash)!==n)throw Ne(`SHA-${n}`,"algorithm.hash");break}default:throw new TypeError("CryptoKey does not support this operation")}tf(e,r)}function rf(e,t,...r){var n;if(r=r.filter(Boolean),r.length>2){const o=r.pop();e+=`one of type ${r.join(", ")}, or ${o}.`}else r.length===2?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return t==null?e+=` Received ${t}`:typeof t=="function"&&t.name?e+=` Received function ${t.name}`:typeof t=="object"&&t!=null&&(n=t.constructor)!=null&&n.name&&(e+=` Received an instance of ${t.constructor.name}`),e}const We=(e,...t)=>rf("Key must be ",e,...t);function nf(e,t,...r){return rf(`Key for the ${e} algorithm must be `,t,...r)}const of=e=>Be(e)?!0:(e==null?void 0:e[Symbol.toStringTag])==="KeyObject",$e=["CryptoKey"];async function Z0(e,t,r,n,o,s){if(!(t instanceof Uint8Array))throw new TypeError(We(t,"Uint8Array"));const a=parseInt(e.slice(1,4),10),i=await ae.subtle.importKey("raw",t.subarray(a>>3),"AES-CBC",!1,["decrypt"]),c=await ae.subtle.importKey("raw",t.subarray(0,a>>3),{hash:`SHA-${a<<1}`,name:"HMAC"},!1,["sign"]),u=vt(s,n,r,Jd(s.length<<3)),l=new Uint8Array((await ae.subtle.sign("HMAC",c,u)).slice(0,a>>3));let d;try{d=J0(o,l)}catch{}if(!d)throw new $n;let h;try{h=new Uint8Array(await ae.subtle.decrypt({iv:n,name:"AES-CBC"},i,r))}catch{}if(!h)throw new $n;return h}async function Q0(e,t,r,n,o,s){let a;t instanceof Uint8Array?a=await ae.subtle.importKey("raw",t,"AES-GCM",!1,["decrypt"]):(Ot(t,e,"decrypt"),a=t);try{return new Uint8Array(await ae.subtle.decrypt({additionalData:s,iv:n,name:"AES-GCM",tagLength:128},a,vt(r,o)))}catch{throw new $n}}const sf=async(e,t,r,n,o,s)=>{if(!Be(t)&&!(t instanceof Uint8Array))throw new TypeError(We(t,...$e,"Uint8Array"));if(!n)throw new G("JWE Initialization Vector missing");if(!o)throw new G("JWE Authentication Tag missing");switch(ef(e,n),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return t instanceof Uint8Array&&Fn(t,parseInt(e.slice(-3),10)),Z0(e,t,r,n,o,s);case"A128GCM":case"A192GCM":case"A256GCM":return t instanceof Uint8Array&&Fn(t,parseInt(e.slice(1,4),10)),Q0(e,t,r,n,o,s);default:throw new _e("Unsupported JWE Content Encryption Algorithm")}},Na=(...e)=>{const t=e.filter(Boolean);if(t.length===0||t.length===1)return!0;let r;for(const n of t){const o=Object.keys(n);if(!r||r.size===0){r=new Set(o);continue}for(const s of o){if(r.has(s))return!1;r.add(s)}}return!0};function ev(e){return typeof e=="object"&&e!==null}function Ve(e){if(!ev(e)||Object.prototype.toString.call(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}const qn=[{hash:"SHA-256",name:"HMAC"},!0,["sign"]];function af(e,t){if(e.algorithm.length!==parseInt(t.slice(1,4),10))throw new TypeError(`Invalid key size for alg: ${t}`)}function cf(e,t,r){if(Be(e))return Ot(e,t,r),e;if(e instanceof Uint8Array)return ae.subtle.importKey("raw",e,"AES-KW",!0,[r]);throw new TypeError(We(e,...$e,"Uint8Array"))}const Ia=async(e,t,r)=>{const n=await cf(t,e,"wrapKey");af(n,e);const o=await ae.subtle.importKey("raw",r,...qn);return new Uint8Array(await ae.subtle.wrapKey("raw",o,n,"AES-KW"))},Da=async(e,t,r)=>{const n=await cf(t,e,"unwrapKey");af(n,e);const o=await ae.subtle.unwrapKey("raw",r,n,"AES-KW",...qn);return new Uint8Array(await ae.subtle.exportKey("raw",o))};async function uf(e,t,r,n,o=new Uint8Array(0),s=new Uint8Array(0)){if(!Be(e))throw new TypeError(We(e,...$e));if(Ot(e,"ECDH"),!Be(t))throw new TypeError(We(t,...$e));Ot(t,"ECDH","deriveBits");const a=vt(Ra(Ue.encode(r)),Ra(o),Ra(s),Aa(n));let i;e.algorithm.name==="X25519"?i=256:e.algorithm.name==="X448"?i=448:i=Math.ceil(parseInt(e.algorithm.namedCurve.substr(-3),10)/8)<<3;const c=new Uint8Array(await ae.subtle.deriveBits({name:e.algorithm.name,public:e},t,i));return q0(c,n,a)}async function tv(e){if(!Be(e))throw new TypeError(We(e,...$e));return ae.subtle.generateKey(e.algorithm,!0,["deriveBits"])}function lf(e){if(!Be(e))throw new TypeError(We(e,...$e));return["P-256","P-384","P-521"].includes(e.algorithm.namedCurve)||e.algorithm.name==="X25519"||e.algorithm.name==="X448"}function rv(e){if(!(e instanceof Uint8Array)||e.length<8)throw new G("PBES2 Salt Input must be 8 or more octets")}function nv(e,t){if(e instanceof Uint8Array)return ae.subtle.importKey("raw",e,"PBKDF2",!1,["deriveBits"]);if(Be(e))return Ot(e,t,"deriveBits","deriveKey"),e;throw new TypeError(We(e,...$e,"Uint8Array"))}async function df(e,t,r,n){rv(e);const o=K0(t,e),s=parseInt(t.slice(13,16),10),a={hash:`SHA-${t.slice(8,11)}`,iterations:r,name:"PBKDF2",salt:o},i={length:s,name:"AES-KW"},c=await nv(n,t);if(c.usages.includes("deriveBits"))return new Uint8Array(await ae.subtle.deriveBits(a,c,s));if(c.usages.includes("deriveKey"))return ae.subtle.deriveKey(a,c,i,!1,["wrapKey","unwrapKey"]);throw new TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"')}const ov=async(e,t,r,n=2048,o=ka(new Uint8Array(16)))=>{const s=await df(o,e,n,t);return{encryptedKey:await Ia(e.slice(-6),s,r),p2c:n,p2s:ze(o)}},sv=async(e,t,r,n,o)=>{const s=await df(o,e,n,t);return Da(e.slice(-6),s,r)};function Gn(e){switch(e){case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":return"RSA-OAEP";default:throw new _e(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}const Ma=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:r}=t.algorithm;if(typeof r!="number"||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}},av=async(e,t,r)=>{if(!Be(t))throw new TypeError(We(t,...$e));if(Ot(t,e,"encrypt","wrapKey"),Ma(e,t),t.usages.includes("encrypt"))return new Uint8Array(await ae.subtle.encrypt(Gn(e),t,r));if(t.usages.includes("wrapKey")){const n=await ae.subtle.importKey("raw",r,...qn);return new Uint8Array(await ae.subtle.wrapKey("raw",n,t,Gn(e)))}throw new TypeError('RSA-OAEP key "usages" must include "encrypt" or "wrapKey" for this operation')},iv=async(e,t,r)=>{if(!Be(t))throw new TypeError(We(t,...$e));if(Ot(t,e,"decrypt","unwrapKey"),Ma(e,t),t.usages.includes("decrypt"))return new Uint8Array(await ae.subtle.decrypt(Gn(e),t,r));if(t.usages.includes("unwrapKey")){const n=await ae.subtle.unwrapKey("raw",r,t,Gn(e),...qn);return new Uint8Array(await ae.subtle.exportKey("raw",n))}throw new TypeError('RSA-OAEP key "usages" must include "decrypt" or "unwrapKey" for this operation')};function mr(e){return Ve(e)&&typeof e.kty=="string"}function cv(e){return e.kty!=="oct"&&typeof e.d=="string"}function uv(e){return e.kty!=="oct"&&typeof e.d>"u"}function lv(e){return mr(e)&&e.kty==="oct"&&typeof e.k=="string"}function dv(e){let t,r;switch(e.kty){case"RSA":{switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new _e('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}case"EC":{switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new _e('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}case"OKP":{switch(e.alg){case"Ed25519":t={name:"Ed25519"},r=e.d?["sign"]:["verify"];break;case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new _e('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}default:throw new _e('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}const ff=async e=>{if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:t,keyUsages:r}=dv(e),n=[t,e.ext??!1,e.key_ops??r],o={...e};return delete o.alg,delete o.use,ae.subtle.importKey("jwk",o,...n)},hf=e=>Oe(e);let gr,yr;const pf=e=>(e==null?void 0:e[Symbol.toStringTag])==="KeyObject",Bn=async(e,t,r,n,o=!1)=>{let s=e.get(t);if(s!=null&&s[n])return s[n];const a=await ff({...r,alg:n});return o&&Object.freeze(t),s?s[n]=a:e.set(t,{[n]:a}),a},Gt={normalizePublicKey:(e,t)=>{if(pf(e)){let r=e.export({format:"jwk"});return delete r.d,delete r.dp,delete r.dq,delete r.p,delete r.q,delete r.qi,r.k?hf(r.k):(yr||(yr=new WeakMap),Bn(yr,e,r,t))}return mr(e)?e.k?Oe(e.k):(yr||(yr=new WeakMap),Bn(yr,e,e,t,!0)):e},normalizePrivateKey:(e,t)=>{if(pf(e)){let r=e.export({format:"jwk"});return r.k?hf(r.k):(gr||(gr=new WeakMap),Bn(gr,e,r,t))}return mr(e)?e.k?Oe(e.k):(gr||(gr=new WeakMap),Bn(gr,e,e,t,!0)):e}};function La(e){switch(e){case"A128GCM":return 128;case"A192GCM":return 192;case"A256GCM":case"A128CBC-HS256":return 256;case"A192CBC-HS384":return 384;case"A256CBC-HS512":return 512;default:throw new _e(`Unsupported JWE Algorithm: ${e}`)}}const br=e=>ka(new Uint8Array(La(e)>>3)),kt=(e,t,r=0)=>{r===0&&(t.unshift(t.length),t.unshift(6));const n=e.indexOf(t[0],r);if(n===-1)return!1;const o=e.subarray(n,n+t.length);return o.length!==t.length?!1:o.every((s,a)=>s===t[a])||kt(e,t,n+1)},mf=e=>{switch(!0){case kt(e,[42,134,72,206,61,3,1,7]):return"P-256";case kt(e,[43,129,4,0,34]):return"P-384";case kt(e,[43,129,4,0,35]):return"P-521";case kt(e,[43,101,110]):return"X25519";case kt(e,[43,101,111]):return"X448";case kt(e,[43,101,112]):return"Ed25519";case kt(e,[43,101,113]):return"Ed448";default:throw new _e("Invalid or unsupported EC Key Curve or OKP Key Sub Type")}},fv=async(e,t,r,n,o)=>{let s,a;const i=new Uint8Array(atob(r.replace(e,"")).split("").map(c=>c.charCodeAt(0)));switch(n){case"PS256":case"PS384":case"PS512":s={name:"RSA-PSS",hash:`SHA-${n.slice(-3)}`},a=["sign"];break;case"RS256":case"RS384":case"RS512":s={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${n.slice(-3)}`},a=["sign"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":s={name:"RSA-OAEP",hash:`SHA-${parseInt(n.slice(-3),10)||1}`},a=["decrypt","unwrapKey"];break;case"ES256":s={name:"ECDSA",namedCurve:"P-256"},a=["sign"];break;case"ES384":s={name:"ECDSA",namedCurve:"P-384"},a=["sign"];break;case"ES512":s={name:"ECDSA",namedCurve:"P-521"},a=["sign"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{const c=mf(i);s=c.startsWith("P-")?{name:"ECDH",namedCurve:c}:{name:c},a=["deriveBits"];break}case"Ed25519":s={name:"Ed25519"},a=["sign"];break;case"EdDSA":s={name:mf(i)},a=["sign"];break;default:throw new _e('Invalid or unsupported "alg" (Algorithm) value')}return ae.subtle.importKey(t,i,s,!1,a)},hv=(e,t,r)=>fv(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,"pkcs8",e,t);async function pv(e,t,r){if(typeof e!="string"||e.indexOf("-----BEGIN PRIVATE KEY-----")!==0)throw new TypeError('"pkcs8" must be PKCS#8 formatted string');return hv(e,t)}async function ja(e,t){if(!Ve(e))throw new TypeError("JWK must be an object");switch(t||(t=e.alg),e.kty){case"oct":if(typeof e.k!="string"||!e.k)throw new TypeError('missing "k" (Key Value) Parameter value');return Oe(e.k);case"RSA":if("oth"in e&&e.oth!==void 0)throw new _e('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return ff({...e,alg:t});default:throw new _e('Unsupported "kty" (Key Type) Parameter value')}}const wr=e=>e==null?void 0:e[Symbol.toStringTag],Ha=(e,t,r)=>{var n,o;if(t.use!==void 0&&t.use!=="sig")throw new TypeError("Invalid key for this operation, when present its use must be sig");if(t.key_ops!==void 0&&((o=(n=t.key_ops).includes)==null?void 0:o.call(n,r))!==!0)throw new TypeError(`Invalid key for this operation, when present its key_ops must include ${r}`);if(t.alg!==void 0&&t.alg!==e)throw new TypeError(`Invalid key for this operation, when present its alg must be ${e}`);return!0},mv=(e,t,r,n)=>{if(!(t instanceof Uint8Array)){if(n&&mr(t)){if(lv(t)&&Ha(e,t,r))return;throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!of(t))throw new TypeError(nf(e,t,...$e,"Uint8Array",n?"JSON Web Key":null));if(t.type!=="secret")throw new TypeError(`${wr(t)} instances for symmetric algorithms must be of type "secret"`)}},gv=(e,t,r,n)=>{if(n&&mr(t))switch(r){case"sign":if(cv(t)&&Ha(e,t,r))return;throw new TypeError("JSON Web Key for this operation be a private JWK");case"verify":if(uv(t)&&Ha(e,t,r))return;throw new TypeError("JSON Web Key for this operation be a public JWK")}if(!of(t))throw new TypeError(nf(e,t,...$e,n?"JSON Web Key":null));if(t.type==="secret")throw new TypeError(`${wr(t)} instances for asymmetric algorithms must not be of type "secret"`);if(r==="sign"&&t.type==="public")throw new TypeError(`${wr(t)} instances for asymmetric algorithm signing must be of type "private"`);if(r==="decrypt"&&t.type==="public")throw new TypeError(`${wr(t)} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&r==="verify"&&t.type==="private")throw new TypeError(`${wr(t)} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&r==="encrypt"&&t.type==="private")throw new TypeError(`${wr(t)} instances for asymmetric algorithm encryption must be of type "public"`)};function gf(e,t,r,n){t.startsWith("HS")||t==="dir"||t.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(t)?mv(t,r,n,e):gv(t,r,n,e)}const yf=gf.bind(void 0,!1),bf=gf.bind(void 0,!0);async function yv(e,t,r,n,o){if(!(r instanceof Uint8Array))throw new TypeError(We(r,"Uint8Array"));const s=parseInt(e.slice(1,4),10),a=await ae.subtle.importKey("raw",r.subarray(s>>3),"AES-CBC",!1,["encrypt"]),i=await ae.subtle.importKey("raw",r.subarray(0,s>>3),{hash:`SHA-${s<<1}`,name:"HMAC"},!1,["sign"]),c=new Uint8Array(await ae.subtle.encrypt({iv:n,name:"AES-CBC"},a,t)),u=vt(o,n,c,Jd(o.length<<3)),l=new Uint8Array((await ae.subtle.sign("HMAC",i,u)).slice(0,s>>3));return{ciphertext:c,tag:l,iv:n}}async function bv(e,t,r,n,o){let s;r instanceof Uint8Array?s=await ae.subtle.importKey("raw",r,"AES-GCM",!1,["encrypt"]):(Ot(r,e,"encrypt"),s=r);const a=new Uint8Array(await ae.subtle.encrypt({additionalData:o,iv:n,name:"AES-GCM",tagLength:128},s,t)),i=a.slice(-16);return{ciphertext:a.slice(0,-16),tag:i,iv:n}}const wf=async(e,t,r,n,o)=>{if(!Be(r)&&!(r instanceof Uint8Array))throw new TypeError(We(r,...$e,"Uint8Array"));switch(n?ef(e,n):n=V0(e),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return r instanceof Uint8Array&&Fn(r,parseInt(e.slice(-3),10)),yv(e,t,r,n,o);case"A128GCM":case"A192GCM":case"A256GCM":return r instanceof Uint8Array&&Fn(r,parseInt(e.slice(1,4),10)),bv(e,t,r,n,o);default:throw new _e("Unsupported JWE Content Encryption Algorithm")}};async function wv(e,t,r,n){const o=e.slice(0,7),s=await wf(o,r,t,n,new Uint8Array(0));return{encryptedKey:s.ciphertext,iv:ze(s.iv),tag:ze(s.tag)}}async function vv(e,t,r,n,o){const s=e.slice(0,7);return sf(s,t,r,n,o,new Uint8Array(0))}async function Ev(e,t,r,n,o){var s;switch(yf(e,t,"decrypt"),t=await((s=Gt.normalizePrivateKey)==null?void 0:s.call(Gt,t,e))||t,e){case"dir":{if(r!==void 0)throw new G("Encountered unexpected JWE Encrypted Key");return t}case"ECDH-ES":if(r!==void 0)throw new G("Encountered unexpected JWE Encrypted Key");case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!Ve(n.epk))throw new G('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');if(!lf(t))throw new _e("ECDH with the provided key is not allowed or not supported by your javascript runtime");const a=await ja(n.epk,e);let i,c;if(n.apu!==void 0){if(typeof n.apu!="string")throw new G('JOSE Header "apu" (Agreement PartyUInfo) invalid');try{i=Oe(n.apu)}catch{throw new G("Failed to base64url decode the apu")}}if(n.apv!==void 0){if(typeof n.apv!="string")throw new G('JOSE Header "apv" (Agreement PartyVInfo) invalid');try{c=Oe(n.apv)}catch{throw new G("Failed to base64url decode the apv")}}const u=await uf(a,t,e==="ECDH-ES"?n.enc:e,e==="ECDH-ES"?La(n.enc):parseInt(e.slice(-5,-2),10),i,c);if(e==="ECDH-ES")return u;if(r===void 0)throw new G("JWE Encrypted Key missing");return Da(e.slice(-6),u,r)}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(r===void 0)throw new G("JWE Encrypted Key missing");return iv(e,t,r)}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{if(r===void 0)throw new G("JWE Encrypted Key missing");if(typeof n.p2c!="number")throw new G('JOSE Header "p2c" (PBES2 Count) missing or invalid');const a=(o==null?void 0:o.maxPBES2Count)||1e4;if(n.p2c>a)throw new G('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds');if(typeof n.p2s!="string")throw new G('JOSE Header "p2s" (PBES2 Salt) missing or invalid');let i;try{i=Oe(n.p2s)}catch{throw new G("Failed to base64url decode the p2s")}return sv(e,t,r,n.p2c,i)}case"A128KW":case"A192KW":case"A256KW":{if(r===void 0)throw new G("JWE Encrypted Key missing");return Da(e,t,r)}case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{if(r===void 0)throw new G("JWE Encrypted Key missing");if(typeof n.iv!="string")throw new G('JOSE Header "iv" (Initialization Vector) missing or invalid');if(typeof n.tag!="string")throw new G('JOSE Header "tag" (Authentication Tag) missing or invalid');let a;try{a=Oe(n.iv)}catch{throw new G("Failed to base64url decode the iv")}let i;try{i=Oe(n.tag)}catch{throw new G("Failed to base64url decode the tag")}return vv(e,t,r,a,i)}default:throw new _e('Invalid or unsupported "alg" (JWE Algorithm) header value')}}function Ua(e,t,r,n,o){if(o.crit!==void 0&&(n==null?void 0:n.crit)===void 0)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!n||n.crit===void 0)return new Set;if(!Array.isArray(n.crit)||n.crit.length===0||n.crit.some(a=>typeof a!="string"||a.length===0))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let s;r!==void 0?s=new Map([...Object.entries(r),...t.entries()]):s=t;for(const a of n.crit){if(!s.has(a))throw new _e(`Extension Header Parameter "${a}" is not recognized`);if(o[a]===void 0)throw new e(`Extension Header Parameter "${a}" is missing`);if(s.get(a)&&n[a]===void 0)throw new e(`Extension Header Parameter "${a}" MUST be integrity protected`)}return new Set(n.crit)}const Wa=(e,t)=>{if(t!==void 0&&(!Array.isArray(t)||t.some(r=>typeof r!="string")))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};async function _v(e,t,r){if(!Ve(e))throw new G("Flattened JWE must be an object");if(e.protected===void 0&&e.header===void 0&&e.unprotected===void 0)throw new G("JOSE Header missing");if(e.iv!==void 0&&typeof e.iv!="string")throw new G("JWE Initialization Vector incorrect type");if(typeof e.ciphertext!="string")throw new G("JWE Ciphertext missing or incorrect type");if(e.tag!==void 0&&typeof e.tag!="string")throw new G("JWE Authentication Tag incorrect type");if(e.protected!==void 0&&typeof e.protected!="string")throw new G("JWE Protected Header incorrect type");if(e.encrypted_key!==void 0&&typeof e.encrypted_key!="string")throw new G("JWE Encrypted Key incorrect type");if(e.aad!==void 0&&typeof e.aad!="string")throw new G("JWE AAD incorrect type");if(e.header!==void 0&&!Ve(e.header))throw new G("JWE Shared Unprotected Header incorrect type");if(e.unprotected!==void 0&&!Ve(e.unprotected))throw new G("JWE Per-Recipient Unprotected Header incorrect type");let n;if(e.protected)try{const f=Oe(e.protected);n=JSON.parse(qt.decode(f))}catch{throw new G("JWE Protected Header is invalid")}if(!Na(n,e.header,e.unprotected))throw new G("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");const o={...n,...e.header,...e.unprotected};if(Ua(G,new Map,r==null?void 0:r.crit,n,o),o.zip!==void 0)throw new _e('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');const{alg:s,enc:a}=o;if(typeof s!="string"||!s)throw new G("missing JWE Algorithm (alg) in JWE Header");if(typeof a!="string"||!a)throw new G("missing JWE Encryption Algorithm (enc) in JWE Header");const i=r&&Wa("keyManagementAlgorithms",r.keyManagementAlgorithms),c=r&&Wa("contentEncryptionAlgorithms",r.contentEncryptionAlgorithms);if(i&&!i.has(s)||!i&&s.startsWith("PBES2"))throw new Wn('"alg" (Algorithm) Header Parameter value not allowed');if(c&&!c.has(a))throw new Wn('"enc" (Encryption Algorithm) Header Parameter value not allowed');let u;if(e.encrypted_key!==void 0)try{u=Oe(e.encrypted_key)}catch{throw new G("Failed to base64url decode the encrypted_key")}let l=!1;typeof t=="function"&&(t=await t(n,e),l=!0);let d;try{d=await Ev(s,t,u,o,r)}catch(f){if(f instanceof TypeError||f instanceof G||f instanceof _e)throw f;d=br(a)}let h,g;if(e.iv!==void 0)try{h=Oe(e.iv)}catch{throw new G("Failed to base64url decode the iv")}if(e.tag!==void 0)try{g=Oe(e.tag)}catch{throw new G("Failed to base64url decode the tag")}const E=Ue.encode(e.protected??"");let b;e.aad!==void 0?b=vt(E,Ue.encode("."),Ue.encode(e.aad)):b=E;let m;try{m=Oe(e.ciphertext)}catch{throw new G("Failed to base64url decode the ciphertext")}const y={plaintext:await sf(a,d,m,h,g,b)};if(e.protected!==void 0&&(y.protectedHeader=n),e.aad!==void 0)try{y.additionalAuthenticatedData=Oe(e.aad)}catch{throw new G("Failed to base64url decode the aad")}return e.unprotected!==void 0&&(y.sharedUnprotectedHeader=e.unprotected),e.header!==void 0&&(y.unprotectedHeader=e.header),l?{...y,key:t}:y}async function Sv(e,t,r){if(e instanceof Uint8Array&&(e=qt.decode(e)),typeof e!="string")throw new G("Compact JWE must be a string or Uint8Array");const{0:n,1:o,2:s,3:a,4:i,length:c}=e.split(".");if(c!==5)throw new G("Invalid Compact JWE");const u=await _v({ciphertext:a,iv:s||void 0,protected:n,tag:i||void 0,encrypted_key:o||void 0},t,r),l={plaintext:u.plaintext,protectedHeader:u.protectedHeader};return typeof t=="function"?{...l,key:u.key}:l}const xv=Symbol(),Av=async e=>{if(e instanceof Uint8Array)return{kty:"oct",k:ze(e)};if(!Be(e))throw new TypeError(We(e,...$e,"Uint8Array"));if(!e.extractable)throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");const{ext:t,key_ops:r,alg:n,use:o,...s}=await ae.subtle.exportKey("jwk",e);return s};async function Rv(e){return Av(e)}async function Cv(e,t,r,n,o={}){var c;let s,a,i;switch(yf(e,r,"encrypt"),r=await((c=Gt.normalizePublicKey)==null?void 0:c.call(Gt,r,e))||r,e){case"dir":{i=r;break}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!lf(r))throw new _e("ECDH with the provided key is not allowed or not supported by your javascript runtime");const{apu:u,apv:l}=o;let{epk:d}=o;d||(d=(await tv(r)).privateKey);const{x:h,y:g,crv:E,kty:b}=await Rv(d),m=await uf(r,d,e==="ECDH-ES"?t:e,e==="ECDH-ES"?La(t):parseInt(e.slice(-5,-2),10),u,l);if(a={epk:{x:h,crv:E,kty:b}},b==="EC"&&(a.epk.y=g),u&&(a.apu=ze(u)),l&&(a.apv=ze(l)),e==="ECDH-ES"){i=m;break}i=n||br(t);const p=e.slice(-6);s=await Ia(p,m,i);break}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{i=n||br(t),s=await av(e,r,i);break}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{i=n||br(t);const{p2c:u,p2s:l}=o;({encryptedKey:s,...a}=await ov(e,r,i,u,l));break}case"A128KW":case"A192KW":case"A256KW":{i=n||br(t),s=await Ia(e,r,i);break}case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{i=n||br(t);const{iv:u}=o;({encryptedKey:s,...a}=await wv(e,r,i,u));break}default:throw new _e('Invalid or unsupported "alg" (JWE Algorithm) header value')}return{cek:i,encryptedKey:s,parameters:a}}class Tv{constructor(t){if(!(t instanceof Uint8Array))throw new TypeError("plaintext must be an instance of Uint8Array");this._plaintext=t}setKeyManagementParameters(t){if(this._keyManagementParameters)throw new TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=t,this}setProtectedHeader(t){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=t,this}setSharedUnprotectedHeader(t){if(this._sharedUnprotectedHeader)throw new TypeError("setSharedUnprotectedHeader can only be called once");return this._sharedUnprotectedHeader=t,this}setUnprotectedHeader(t){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=t,this}setAdditionalAuthenticatedData(t){return this._aad=t,this}setContentEncryptionKey(t){if(this._cek)throw new TypeError("setContentEncryptionKey can only be called once");return this._cek=t,this}setInitializationVector(t){if(this._iv)throw new TypeError("setInitializationVector can only be called once");return this._iv=t,this}async encrypt(t,r){if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader)throw new G("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");if(!Na(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader))throw new G("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");const n={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};if(Ua(G,new Map,r==null?void 0:r.crit,this._protectedHeader,n),n.zip!==void 0)throw new _e('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');const{alg:o,enc:s}=n;if(typeof o!="string"||!o)throw new G('JWE "alg" (Algorithm) Header Parameter missing or invalid');if(typeof s!="string"||!s)throw new G('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');let a;if(this._cek&&(o==="dir"||o==="ECDH-ES"))throw new TypeError(`setContentEncryptionKey cannot be called with JWE "alg" (Algorithm) Header ${o}`);let i;{let b;({cek:i,encryptedKey:a,parameters:b}=await Cv(o,s,t,this._cek,this._keyManagementParameters)),b&&(r&&xv in r?this._unprotectedHeader?this._unprotectedHeader={...this._unprotectedHeader,...b}:this.setUnprotectedHeader(b):this._protectedHeader?this._protectedHeader={...this._protectedHeader,...b}:this.setProtectedHeader(b))}let c,u,l;this._protectedHeader?u=Ue.encode(ze(JSON.stringify(this._protectedHeader))):u=Ue.encode(""),this._aad?(l=ze(this._aad),c=vt(u,Ue.encode("."),Ue.encode(l))):c=u;const{ciphertext:d,tag:h,iv:g}=await wf(s,this._plaintext,i,this._iv,c),E={ciphertext:ze(d)};return g&&(E.iv=ze(g)),h&&(E.tag=ze(h)),a&&(E.encrypted_key=ze(a)),l&&(E.aad=l),this._protectedHeader&&(E.protected=qt.decode(u)),this._sharedUnprotectedHeader&&(E.unprotected=this._sharedUnprotectedHeader),this._unprotectedHeader&&(E.header=this._unprotectedHeader),E}}function Pv(e,t){const r=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case"Ed25519":return{name:"Ed25519"};case"EdDSA":return{name:t.name};default:throw new _e(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}async function Ov(e,t,r){if(t=await Gt.normalizePublicKey(t,e),Be(t))return Y0(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(We(t,...$e));return ae.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw new TypeError(We(t,...$e,"Uint8Array","JSON Web Key"))}const kv=async(e,t,r,n)=>{const o=await Ov(e,t,"verify");Ma(e,o);const s=Pv(e,o.algorithm);try{return await ae.subtle.verify(s,o,r,n)}catch{return!1}};async function vf(e,t,r){if(!Ve(e))throw new ke("Flattened JWS must be an object");if(e.protected===void 0&&e.header===void 0)throw new ke('Flattened JWS must have either of the "protected" or "header" members');if(e.protected!==void 0&&typeof e.protected!="string")throw new ke("JWS Protected Header incorrect type");if(e.payload===void 0)throw new ke("JWS Payload missing");if(typeof e.signature!="string")throw new ke("JWS Signature missing or incorrect type");if(e.header!==void 0&&!Ve(e.header))throw new ke("JWS Unprotected Header incorrect type");let n={};if(e.protected)try{const b=Oe(e.protected);n=JSON.parse(qt.decode(b))}catch{throw new ke("JWS Protected Header is invalid")}if(!Na(n,e.header))throw new ke("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const o={...n,...e.header},s=Ua(ke,new Map([["b64",!0]]),r==null?void 0:r.crit,n,o);let a=!0;if(s.has("b64")&&(a=n.b64,typeof a!="boolean"))throw new ke('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:i}=o;if(typeof i!="string"||!i)throw new ke('JWS "alg" (Algorithm) Header Parameter missing or invalid');const c=r&&Wa("algorithms",r.algorithms);if(c&&!c.has(i))throw new Wn('"alg" (Algorithm) Header Parameter value not allowed');if(a){if(typeof e.payload!="string")throw new ke("JWS Payload must be a string")}else if(typeof e.payload!="string"&&!(e.payload instanceof Uint8Array))throw new ke("JWS Payload must be a string or an Uint8Array instance");let u=!1;typeof t=="function"?(t=await t(n,e),u=!0,bf(i,t,"verify"),mr(t)&&(t=await ja(t,i))):bf(i,t,"verify");const l=vt(Ue.encode(e.protected??""),Ue.encode("."),typeof e.payload=="string"?Ue.encode(e.payload):e.payload);let d;try{d=Oe(e.signature)}catch{throw new ke("Failed to base64url decode the signature")}if(!await kv(i,t,d,l))throw new Zd;let g;if(a)try{g=Oe(e.payload)}catch{throw new ke("Failed to base64url decode the payload")}else typeof e.payload=="string"?g=Ue.encode(e.payload):g=e.payload;const E={payload:g};return e.protected!==void 0&&(E.protectedHeader=n),e.header!==void 0&&(E.unprotectedHeader=e.header),u?{...E,key:t}:E}async function Nv(e,t,r){if(e instanceof Uint8Array&&(e=qt.decode(e)),typeof e!="string")throw new ke("Compact JWS must be a string or Uint8Array");const{0:n,1:o,2:s,length:a}=e.split(".");if(a!==3)throw new ke("Invalid Compact JWS");const i=await vf({payload:o,protected:n,signature:s},t,r),c={payload:i.payload,protectedHeader:i.protectedHeader};return typeof t=="function"?{...c,key:i.key}:c}const Nt=e=>Math.floor(e.getTime()/1e3),Ef=60,_f=Ef*60,$a=_f*24,Iv=$a*7,Dv=$a*365.25,Mv=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,Br=e=>{const t=Mv.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");const r=parseFloat(t[2]),n=t[3].toLowerCase();let o;switch(n){case"sec":case"secs":case"second":case"seconds":case"s":o=Math.round(r);break;case"minute":case"minutes":case"min":case"mins":case"m":o=Math.round(r*Ef);break;case"hour":case"hours":case"hr":case"hrs":case"h":o=Math.round(r*_f);break;case"day":case"days":case"d":o=Math.round(r*$a);break;case"week":case"weeks":case"w":o=Math.round(r*Iv);break;default:o=Math.round(r*Dv);break}return t[1]==="-"||t[4]==="ago"?-o:o},Sf=e=>e.toLowerCase().replace(/^application\//,""),Lv=(e,t)=>typeof e=="string"?t.includes(e):Array.isArray(e)?t.some(Set.prototype.has.bind(new Set(e))):!1,xf=(e,t,r={})=>{let n;try{n=JSON.parse(qt.decode(t))}catch{}if(!Ve(n))throw new Ta("JWT Claims Set must be a top-level JSON object");const{typ:o}=r;if(o&&(typeof e.typ!="string"||Sf(e.typ)!==Sf(o)))throw new Ke('unexpected "typ" JWT header value',n,"typ","check_failed");const{requiredClaims:s=[],issuer:a,subject:i,audience:c,maxTokenAge:u}=r,l=[...s];u!==void 0&&l.push("iat"),c!==void 0&&l.push("aud"),i!==void 0&&l.push("sub"),a!==void 0&&l.push("iss");for(const E of new Set(l.reverse()))if(!(E in n))throw new Ke(`missing required "${E}" claim`,n,E,"missing");if(a&&!(Array.isArray(a)?a:[a]).includes(n.iss))throw new Ke('unexpected "iss" claim value',n,"iss","check_failed");if(i&&n.sub!==i)throw new Ke('unexpected "sub" claim value',n,"sub","check_failed");if(c&&!Lv(n.aud,typeof c=="string"?[c]:c))throw new Ke('unexpected "aud" claim value',n,"aud","check_failed");let d;switch(typeof r.clockTolerance){case"string":d=Br(r.clockTolerance);break;case"number":d=r.clockTolerance;break;case"undefined":d=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:h}=r,g=Nt(h||new Date);if((n.iat!==void 0||u)&&typeof n.iat!="number")throw new Ke('"iat" claim must be a number',n,"iat","invalid");if(n.nbf!==void 0){if(typeof n.nbf!="number")throw new Ke('"nbf" claim must be a number',n,"nbf","invalid");if(n.nbf>g+d)throw new Ke('"nbf" claim timestamp check failed',n,"nbf","check_failed")}if(n.exp!==void 0){if(typeof n.exp!="number")throw new Ke('"exp" claim must be a number',n,"exp","invalid");if(n.exp<=g-d)throw new Ca('"exp" claim timestamp check failed',n,"exp","check_failed")}if(u){const E=g-n.iat,b=typeof u=="number"?u:Br(u);if(E-d>b)throw new Ca('"iat" claim timestamp check failed (too far in the past)',n,"iat","check_failed");if(E<0-d)throw new Ke('"iat" claim timestamp check failed (it should be in the past)',n,"iat","check_failed")}return n};async function jv(e,t,r){var a;const n=await Nv(e,t,r);if((a=n.protectedHeader.crit)!=null&&a.includes("b64")&&n.protectedHeader.b64===!1)throw new Ta("JWTs MUST NOT use unencoded payload");const s={payload:xf(n.protectedHeader,n.payload,r),protectedHeader:n.protectedHeader};return typeof t=="function"?{...s,key:n.key}:s}async function Hv(e,t,r){const n=await Sv(e,t,r),o=xf(n.protectedHeader,n.plaintext,r),{protectedHeader:s}=n;if(s.iss!==void 0&&s.iss!==o.iss)throw new Ke('replicated "iss" claim header parameter mismatch',o,"iss","mismatch");if(s.sub!==void 0&&s.sub!==o.sub)throw new Ke('replicated "sub" claim header parameter mismatch',o,"sub","mismatch");if(s.aud!==void 0&&JSON.stringify(s.aud)!==JSON.stringify(o.aud))throw new Ke('replicated "aud" claim header parameter mismatch',o,"aud","mismatch");const a={payload:o,protectedHeader:s};return typeof t=="function"?{...a,key:n.key}:a}class Uv{constructor(t){this._flattened=new Tv(t)}setContentEncryptionKey(t){return this._flattened.setContentEncryptionKey(t),this}setInitializationVector(t){return this._flattened.setInitializationVector(t),this}setProtectedHeader(t){return this._flattened.setProtectedHeader(t),this}setKeyManagementParameters(t){return this._flattened.setKeyManagementParameters(t),this}async encrypt(t,r){const n=await this._flattened.encrypt(t,r);return[n.protected,n.encrypted_key,n.iv,n.ciphertext,n.tag].join(".")}}function Bt(e,t){if(!Number.isFinite(t))throw new TypeError(`Invalid ${e} input`);return t}class Wv{constructor(t={}){if(!Ve(t))throw new TypeError("JWT Claims Set MUST be an object");this._payload=t}setIssuer(t){return this._payload={...this._payload,iss:t},this}setSubject(t){return this._payload={...this._payload,sub:t},this}setAudience(t){return this._payload={...this._payload,aud:t},this}setJti(t){return this._payload={...this._payload,jti:t},this}setNotBefore(t){return typeof t=="number"?this._payload={...this._payload,nbf:Bt("setNotBefore",t)}:t instanceof Date?this._payload={...this._payload,nbf:Bt("setNotBefore",Nt(t))}:this._payload={...this._payload,nbf:Nt(new Date)+Br(t)},this}setExpirationTime(t){return typeof t=="number"?this._payload={...this._payload,exp:Bt("setExpirationTime",t)}:t instanceof Date?this._payload={...this._payload,exp:Bt("setExpirationTime",Nt(t))}:this._payload={...this._payload,exp:Nt(new Date)+Br(t)},this}setIssuedAt(t){return typeof t>"u"?this._payload={...this._payload,iat:Nt(new Date)}:t instanceof Date?this._payload={...this._payload,iat:Bt("setIssuedAt",Nt(t))}:typeof t=="string"?this._payload={...this._payload,iat:Bt("setIssuedAt",Nt(new Date)+Br(t))}:this._payload={...this._payload,iat:Bt("setIssuedAt",t)},this}}class $v extends Wv{setProtectedHeader(t){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=t,this}setKeyManagementParameters(t){if(this._keyManagementParameters)throw new TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=t,this}setContentEncryptionKey(t){if(this._cek)throw new TypeError("setContentEncryptionKey can only be called once");return this._cek=t,this}setInitializationVector(t){if(this._iv)throw new TypeError("setInitializationVector can only be called once");return this._iv=t,this}replicateIssuerAsHeader(){return this._replicateIssuerAsHeader=!0,this}replicateSubjectAsHeader(){return this._replicateSubjectAsHeader=!0,this}replicateAudienceAsHeader(){return this._replicateAudienceAsHeader=!0,this}async encrypt(t,r){const n=new Uv(Ue.encode(JSON.stringify(this._payload)));return this._replicateIssuerAsHeader&&(this._protectedHeader={...this._protectedHeader,iss:this._payload.iss}),this._replicateSubjectAsHeader&&(this._protectedHeader={...this._protectedHeader,sub:this._payload.sub}),this._replicateAudienceAsHeader&&(this._protectedHeader={...this._protectedHeader,aud:this._payload.aud}),n.setProtectedHeader(this._protectedHeader),this._iv&&n.setInitializationVector(this._iv),this._cek&&n.setContentEncryptionKey(this._cek),this._keyManagementParameters&&n.setKeyManagementParameters(this._keyManagementParameters),n.encrypt(t,r)}}function Fv(e){switch(typeof e=="string"&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new _e('Unsupported "alg" value for a JSON Web Key Set')}}function Kv(e){return e&&typeof e=="object"&&Array.isArray(e.keys)&&e.keys.every(qv)}function qv(e){return Ve(e)}function Af(e){return typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e))}class Gv{constructor(t){if(this._cached=new WeakMap,!Kv(t))throw new Pa("JSON Web Key Set malformed");this._jwks=Af(t)}async getKey(t,r){const{alg:n,kid:o}={...t,...r==null?void 0:r.header},s=Fv(n),a=this._jwks.keys.filter(u=>{let l=s===u.kty;if(l&&typeof o=="string"&&(l=o===u.kid),l&&typeof u.alg=="string"&&(l=n===u.alg),l&&typeof u.use=="string"&&(l=u.use==="sig"),l&&Array.isArray(u.key_ops)&&(l=u.key_ops.includes("verify")),l)switch(n){case"ES256":l=u.crv==="P-256";break;case"ES256K":l=u.crv==="secp256k1";break;case"ES384":l=u.crv==="P-384";break;case"ES512":l=u.crv==="P-521";break;case"Ed25519":l=u.crv==="Ed25519";break;case"EdDSA":l=u.crv==="Ed25519"||u.crv==="Ed448";break}return l}),{0:i,length:c}=a;if(c===0)throw new Oa;if(c!==1){const u=new Xd,{_cached:l}=this;throw u[Symbol.asyncIterator]=async function*(){for(const d of a)try{yield await Rf(l,d,n)}catch{}},u}return Rf(this._cached,i,n)}}async function Rf(e,t,r){const n=e.get(t)||e.set(t,{}).get(t);if(n[r]===void 0){const o=await ja({...t,ext:!0},r);if(o instanceof Uint8Array||o.type!=="public")throw new Pa("JSON Web Key Set members must be public keys");n[r]=o}return n[r]}function Cf(e){const t=new Gv(e),r=async(n,o)=>t.getKey(n,o);return Object.defineProperties(r,{jwks:{value:()=>Af(t._jwks),enumerable:!0,configurable:!1,writable:!1}}),r}const Bv=async(e,t,r)=>{let n,o,s=!1;typeof AbortController=="function"&&(n=new AbortController,o=setTimeout(()=>{s=!0,n.abort()},t));const a=await fetch(e.href,{signal:n?n.signal:void 0,redirect:"manual",headers:r.headers}).catch(i=>{throw s?new Yd:i});if(o!==void 0&&clearTimeout(o),a.status!==200)throw new Me("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await a.json()}catch{throw new Me("Failed to parse the JSON Web Key Set HTTP response as JSON")}};function zv(){return typeof WebSocketPair<"u"||typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"||typeof EdgeRuntime<"u"&&EdgeRuntime==="vercel"}let Fa;(typeof navigator>"u"||!((eh=(ro=navigator.userAgent)==null?void 0:ro.startsWith)!=null&&eh.call(ro,"Mozilla/5.0 ")))&&(Fa="jose/v5.10.0");const zn=Symbol();function Vv(e,t){return!(typeof e!="object"||e===null||!("uat"in e)||typeof e.uat!="number"||Date.now()-e.uat>=t||!("jwks"in e)||!Ve(e.jwks)||!Array.isArray(e.jwks.keys)||!Array.prototype.every.call(e.jwks.keys,Ve))}class Jv{constructor(t,r){if(!(t instanceof URL))throw new TypeError("url must be an instance of URL");this._url=new URL(t.href),this._options={agent:r==null?void 0:r.agent,headers:r==null?void 0:r.headers},this._timeoutDuration=typeof(r==null?void 0:r.timeoutDuration)=="number"?r==null?void 0:r.timeoutDuration:5e3,this._cooldownDuration=typeof(r==null?void 0:r.cooldownDuration)=="number"?r==null?void 0:r.cooldownDuration:3e4,this._cacheMaxAge=typeof(r==null?void 0:r.cacheMaxAge)=="number"?r==null?void 0:r.cacheMaxAge:6e5,(r==null?void 0:r[zn])!==void 0&&(this._cache=r==null?void 0:r[zn],Vv(r==null?void 0:r[zn],this._cacheMaxAge)&&(this._jwksTimestamp=this._cache.uat,this._local=Cf(this._cache.jwks)))}coolingDown(){return typeof this._jwksTimestamp=="number"?Date.now()<this._jwksTimestamp+this._cooldownDuration:!1}fresh(){return typeof this._jwksTimestamp=="number"?Date.now()<this._jwksTimestamp+this._cacheMaxAge:!1}async getKey(t,r){(!this._local||!this.fresh())&&await this.reload();try{return await this._local(t,r)}catch(n){if(n instanceof Oa&&this.coolingDown()===!1)return await this.reload(),this._local(t,r);throw n}}async reload(){this._pendingFetch&&zv()&&(this._pendingFetch=void 0);const t=new Headers(this._options.headers);Fa&&!t.has("User-Agent")&&(t.set("User-Agent",Fa),this._options.headers=Object.fromEntries(t.entries())),this._pendingFetch||(this._pendingFetch=Bv(this._url,this._timeoutDuration,this._options).then(r=>{this._local=Cf(r),this._cache&&(this._cache.uat=Date.now(),this._cache.jwks=r),this._jwksTimestamp=Date.now(),this._pendingFetch=void 0}).catch(r=>{throw this._pendingFetch=void 0,r})),await this._pendingFetch}}function Xv(e,t){const r=new Jv(e,t),n=async(o,s)=>r.getKey(o,s);return Object.defineProperties(n,{coolingDown:{get:()=>r.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>r.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>r.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>!!r._pendingFetch,enumerable:!0,configurable:!1},jwks:{value:()=>{var o;return(o=r._local)==null?void 0:o.jwks()},enumerable:!0,configurable:!1,writable:!1}}),n}const Yv=ze;let Ka;(typeof navigator>"u"||!((th=(no=navigator.userAgent)==null?void 0:no.startsWith)!=null&&th.call(no,"Mozilla/5.0 ")))&&(Ka="oauth4webapi/v3.5.3");function zr(e,t){if(e==null)return!1;try{return e instanceof t||Object.getPrototypeOf(e)[Symbol.toStringTag]===t.prototype[Symbol.toStringTag]}catch{return!1}}const Ye="ERR_INVALID_ARG_VALUE",Je="ERR_INVALID_ARG_TYPE";function ve(e,t,r){const n=new TypeError(e,{cause:r});return Object.assign(n,{code:t}),n}const It=Symbol(),Zv=Symbol(),Qv=Symbol(),zt=Symbol(),qa=Symbol(),eE=new TextEncoder,tE=new TextDecoder;function vr(e){return typeof e=="string"?eE.encode(e):tE.decode(e)}let Ga;Uint8Array.prototype.toBase64?Ga=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0})):Ga=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));const r=[];for(let n=0;n<t.byteLength;n+=32768)r.push(String.fromCharCode.apply(null,t.subarray(n,n+32768)));return btoa(r.join("")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")};let Ba;Uint8Array.fromBase64?Ba=e=>{try{return Uint8Array.fromBase64(e,{alphabet:"base64url"})}catch(t){throw ve("The input to be decoded is not correctly encoded.",Ye,t)}}:Ba=e=>{try{const t=atob(e.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"")),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}catch(t){throw ve("The input to be decoded is not correctly encoded.",Ye,t)}};function Vt(e){return typeof e=="string"?Ba(e):Ga(e)}class Ze extends Error{constructor(r,n){var o;super(r,n);Le(this,"code");this.name=this.constructor.name,this.code=t_,(o=Error.captureStackTrace)==null||o.call(Error,this,this.constructor)}}class rE extends Error{constructor(r,n){var o;super(r,n);Le(this,"code");this.name=this.constructor.name,n!=null&&n.code&&(this.code=n==null?void 0:n.code),(o=Error.captureStackTrace)==null||o.call(Error,this,this.constructor)}}function Z(e,t,r){return new rE(e,{code:t,cause:r})}function nE(e,t){if(!(e instanceof CryptoKey))throw ve(`${t} must be a CryptoKey`,Je)}function oE(e,t){if(nE(e,t),e.type!=="private")throw ve(`${t} must be a private CryptoKey`,Ye)}function Vn(e){return!(e===null||typeof e!="object"||Array.isArray(e))}function za(e){zr(e,Headers)&&(e=Object.fromEntries(e.entries()));const t=new Headers(e??{});if(Ka&&!t.has("user-agent")&&t.set("user-agent",Ka),t.has("authorization"))throw ve('"options.headers" must not include the "authorization" header name',Ye);return t}function Tf(e){if(typeof e=="function"&&(e=e()),!(e instanceof AbortSignal))throw ve('"options.signal" must return or be an instance of AbortSignal',Je);return e}function Pf(e){return e.includes("//")?e.replace("//","/"):e}function sE(e,t){return e.pathname==="/"?e.pathname=t:e.pathname=Pf(`${t}/${e.pathname}`),e}function aE(e,t){return e.pathname=Pf(`${e.pathname}/${t}`),e}async function iE(e,t,r,n){if(!(e instanceof URL))throw ve(`"${t}" must be an instance of URL`,Je);Nf(e,(n==null?void 0:n[It])!==!0);const o=r(new URL(e.href)),s=za(n==null?void 0:n.headers);return s.set("accept","application/json"),((n==null?void 0:n[zt])||fetch)(o.href,{body:void 0,headers:Object.fromEntries(s.entries()),method:"GET",redirect:"manual",signal:n!=null&&n.signal?Tf(n.signal):void 0})}async function cE(e,t){return iE(e,"issuerIdentifier",r=>{switch(t==null?void 0:t.algorithm){case void 0:case"oidc":aE(r,".well-known/openid-configuration");break;case"oauth2":sE(r,".well-known/oauth-authorization-server");break;default:throw ve('"options.algorithm" must be "oidc" (default), or "oauth2"',Ye)}return r},t)}function Vr(e,t,r,n,o){try{if(typeof e!="number"||!Number.isFinite(e))throw ve(`${r} must be a number`,Je,o);if(e>0)return;throw ve(`${r} must be a positive number`,Ye,o)}catch(s){throw n?Z(s.message,n,o):s}}function Ie(e,t,r,n){try{if(typeof e!="string")throw ve(`${t} must be a string`,Je,n);if(e.length===0)throw ve(`${t} must not be empty`,Ye,n)}catch(o){throw r?Z(o.message,r,n):o}}async function uE(e,t){const r=e;if(!(r instanceof URL)&&r!==Kf)throw ve('"expectedIssuerIdentifier" must be an instance of URL',Je);if(!zr(t,Response))throw ve('"response" must be an instance of Response',Je);if(t.status!==200)throw Z('"response" is not a conform Authorization Server Metadata response (unexpected HTTP status code)',$f,t);Yn(t);const n=await ni(t);if(Ie(n.issuer,'"response" body "issuer" property',fe,{body:n}),r!==Kf&&new URL(n.issuer).href!==r.href)throw Z('"response" body "issuer" property does not match the expected value',a_,{expected:r.href,body:n,attribute:"issuer"});return n}function Of(e){dE(e,"application/json")}function lE(e,...t){let r='"response" content-type must be ';if(t.length>2){const n=t.pop();r+=`${t.join(", ")}, or ${n}`}else t.length===2?r+=`${t[0]} or ${t[1]}`:r+=t[0];return Z(r,n_,e)}function dE(e,t){if(WE(e)!==t)throw lE(e,t)}function Jn(){return Vt(crypto.getRandomValues(new Uint8Array(32)))}function fE(){return Jn()}function hE(){return Jn()}function pE(){return Jn()}async function mE(e){return Ie(e,"codeVerifier"),Vt(await crypto.subtle.digest("SHA-256",vr(e)))}function gE(e){return e instanceof CryptoKey?{key:e}:(e==null?void 0:e.key)instanceof CryptoKey?(e.kid!==void 0&&Ie(e.kid,'"kid"'),{key:e.key,kid:e.kid}):{}}function yE(e){switch(e.algorithm.hash.name){case"SHA-256":return"PS256";case"SHA-384":return"PS384";case"SHA-512":return"PS512";default:throw new Ze("unsupported RsaHashedKeyAlgorithm hash name",{cause:e})}}function bE(e){switch(e.algorithm.hash.name){case"SHA-256":return"RS256";case"SHA-384":return"RS384";case"SHA-512":return"RS512";default:throw new Ze("unsupported RsaHashedKeyAlgorithm hash name",{cause:e})}}function wE(e){switch(e.algorithm.namedCurve){case"P-256":return"ES256";case"P-384":return"ES384";case"P-521":return"ES512";default:throw new Ze("unsupported EcKeyAlgorithm namedCurve",{cause:e})}}function vE(e){switch(e.algorithm.name){case"RSA-PSS":return yE(e);case"RSASSA-PKCS1-v1_5":return bE(e);case"ECDSA":return wE(e);case"Ed25519":case"EdDSA":return"Ed25519";default:throw new Ze("unsupported CryptoKey algorithm name",{cause:e})}}function Va(e){const t=e==null?void 0:e[Zv];return typeof t=="number"&&Number.isFinite(t)?t:0}function kf(e){const t=e==null?void 0:e[Qv];return typeof t=="number"&&Number.isFinite(t)&&Math.sign(t)!==-1?t:30}function Ja(){return Math.floor(Date.now()/1e3)}function Jt(e){if(typeof e!="object"||e===null)throw ve('"as" must be an object',Je);Ie(e.issuer,'"as.issuer"')}function Xt(e){if(typeof e!="object"||e===null)throw ve('"client" must be an object',Je);Ie(e.client_id,'"client.client_id"')}function EE(e){return Ie(e,'"clientSecret"'),(t,r,n,o)=>{n.set("client_id",r.client_id),n.set("client_secret",e)}}function _E(e,t){const r=Ja()+Va(t);return{jti:Jn(),aud:e.issuer,exp:r+60,iat:r,nbf:r,iss:t.client_id,sub:t.client_id}}function SE(e,t){const{key:r,kid:n}=gE(e);return oE(r,'"clientPrivateKey.key"'),async(o,s,a,i)=>{const c={alg:vE(r),kid:n},u=_E(o,s);a.set("client_id",s.client_id),a.set("client_assertion_type","urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),a.set("client_assertion",await xE(c,u,r))}}async function xE(e,t,r){if(!r.usages.includes("sign"))throw ve('CryptoKey instances used for signing assertions must include "sign" in their "usages"',Ye);const n=`${Vt(vr(JSON.stringify(e)))}.${Vt(vr(JSON.stringify(t)))}`,o=Vt(await crypto.subtle.sign(f_(r),r,vr(n)));return`${n}.${o}`}const AE=URL.parse?(e,t)=>URL.parse(e,t):(e,t)=>{try{return new URL(e,t)}catch{return null}};function Nf(e,t){if(t&&e.protocol!=="https:")throw Z("only requests to HTTPS are allowed",o_,e);if(e.protocol!=="https:"&&e.protocol!=="http:")throw Z("only HTTP and HTTPS requests are allowed",s_,e)}function If(e,t,r,n){let o;if(typeof e!="string"||!(o=AE(e)))throw Z(`authorization server metadata does not contain a valid ${r?`"as.mtls_endpoint_aliases.${t}"`:`"as.${t}"`}`,e===void 0?i_:c_,{attribute:r?`mtls_endpoint_aliases.${t}`:t});return Nf(o,n),o}function Df(e,t,r,n){return r&&e.mtls_endpoint_aliases&&t in e.mtls_endpoint_aliases?If(e.mtls_endpoint_aliases[t],t,r,n):If(e[t],t,r,n)}async function RE(e,t,r,n,o){var u;Jt(e),Xt(t);const s=Df(e,"pushed_authorization_request_endpoint",t.use_mtls_endpoint_aliases,(o==null?void 0:o[It])!==!0),a=new URLSearchParams(n);a.set("client_id",t.client_id);const i=za(o==null?void 0:o.headers);i.set("accept","application/json"),(o==null?void 0:o.DPoP)!==void 0&&(Lf(o.DPoP),await o.DPoP.addProof(s,i,"POST"));const c=await jf(e,t,r,s,a,i,o);return(u=o==null?void 0:o.DPoP)==null||u.cacheNonce(c),c}class CE extends Error{constructor(r,n){var o;super(r,n);Le(this,"cause");Le(this,"code");Le(this,"error");Le(this,"status");Le(this,"error_description");Le(this,"response");this.name=this.constructor.name,this.code=e_,this.cause=n.cause,this.error=n.cause.error,this.status=n.response.status,this.error_description=n.cause.error_description,Object.defineProperty(this,"response",{enumerable:!1,value:n.response}),(o=Error.captureStackTrace)==null||o.call(Error,this,this.constructor)}}class TE extends Error{constructor(r,n){var o;super(r,n);Le(this,"cause");Le(this,"code");Le(this,"error");Le(this,"error_description");this.name=this.constructor.name,this.code=r_,this.cause=n.cause,this.error=n.cause.get("error"),this.error_description=n.cause.get("error_description")??void 0,(o=Error.captureStackTrace)==null||o.call(Error,this,this.constructor)}}class PE extends Error{constructor(r,n){var o;super(r,n);Le(this,"cause");Le(this,"code");Le(this,"response");Le(this,"status");this.name=this.constructor.name,this.code=QE,this.cause=n.cause,this.status=n.response.status,this.response=n.response,Object.defineProperty(this,"response",{enumerable:!1}),(o=Error.captureStackTrace)==null||o.call(Error,this,this.constructor)}}const Xn="[a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+",OE="[a-zA-Z0-9\\-\\._\\~\\+\\/]+[=]{0,2}",kE="("+Xn+")\\s*=\\s*"+'"((?:[^"\\\\]|\\\\.)*)"',NE="("+Xn+")\\s*=\\s*("+Xn+")",IE=new RegExp("^[,\\s]*("+Xn+")\\s(.*)"),DE=new RegExp("^[,\\s]*"+kE+"[,\\s]*(.*)"),ME=new RegExp("^[,\\s]*"+NE+"[,\\s]*(.*)"),LE=new RegExp("^("+OE+")(?:$|[,\\s])(.*)");function jE(e){if(!zr(e,Response))throw ve('"response" must be an instance of Response',Je);const t=e.headers.get("www-authenticate");if(t===null)return;const r=[];let n=t;for(;n;){let o=n.match(IE);const s=o==null?void 0:o[1].toLowerCase();if(n=o==null?void 0:o["2"],!s)return;const a={};let i;for(;n;){let u,l;if(o=n.match(DE)){if([,u,l,n]=o,l.includes("\\"))try{l=JSON.parse(`"${l}"`)}catch{}a[u.toLowerCase()]=l;continue}if(o=n.match(ME)){[,u,l,n]=o,a[u.toLowerCase()]=l;continue}if(o=n.match(LE)){if(Object.keys(a).length)break;[,i,n]=o;break}return}const c={scheme:s,parameters:a};i&&(c.token68=i),r.push(c)}if(r.length)return r}async function HE(e,t,r){if(Jt(e),Xt(t),!zr(r,Response))throw ve('"response" must be an instance of Response',Je);Wf(r),await Mf(r,201,"Pushed Authorization Request Endpoint"),Yn(r);const n=await ni(r);Ie(n.request_uri,'"response" body "request_uri" property',fe,{body:n});let o=typeof n.expires_in!="number"?parseFloat(n.expires_in):n.expires_in;return Vr(o,!1,'"response" body "expires_in" property',fe,{body:n}),n.expires_in=o,n}async function UE(e){if(e.status>399&&e.status<500){Yn(e),Of(e);try{const t=await e.clone().json();if(Vn(t)&&typeof t.error=="string"&&t.error.length)return t}catch{}}}async function Mf(e,t,r){var n;if(e.status!==t){let o;throw(o=await UE(e))?(await((n=e.body)==null?void 0:n.cancel()),new CE("server responded with an error in the response body",{cause:o,response:e})):Z(`"response" is not a conform ${r} response (unexpected HTTP status code)`,$f,e)}}function Lf(e){if(!Za.has(e))throw ve('"options.DPoP" is not a valid DPoPHandle',Ye)}function WE(e){var t;return(t=e.headers.get("content-type"))==null?void 0:t.split(";")[0]}async function jf(e,t,r,n,o,s,a){return await r(e,t,o,s),s.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),((a==null?void 0:a[zt])||fetch)(n.href,{body:o,headers:Object.fromEntries(s.entries()),method:"POST",redirect:"manual",signal:a!=null&&a.signal?Tf(a.signal):void 0})}async function Xa(e,t,r,n,o,s){var u;const a=Df(e,"token_endpoint",t.use_mtls_endpoint_aliases,(s==null?void 0:s[It])!==!0);o.set("grant_type",n);const i=za(s==null?void 0:s.headers);i.set("accept","application/json"),(s==null?void 0:s.DPoP)!==void 0&&(Lf(s.DPoP),await s.DPoP.addProof(a,i,"POST"));const c=await jf(e,t,r,a,o,i,s);return(u=s==null?void 0:s.DPoP)==null||u.cacheNonce(c),c}async function $E(e,t,r,n,o){Jt(e),Xt(t),Ie(n,'"refreshToken"');const s=new URLSearchParams(o==null?void 0:o.additionalParameters);return s.set("refresh_token",n),Xa(e,t,r,"refresh_token",s,o)}const Hf=new WeakMap,FE=new WeakMap;function Uf(e){if(!e.id_token)return;const t=Hf.get(e);if(!t)throw ve('"ref" was already garbage collected or did not resolve from the proper sources',Ye);return t}async function Ya(e,t,r,n,o){if(Jt(e),Xt(t),!zr(r,Response))throw ve('"response" must be an instance of Response',Je);Wf(r),await Mf(r,200,"Token Endpoint"),Yn(r);const s=await ni(r);if(Ie(s.access_token,'"response" body "access_token" property',fe,{body:s}),Ie(s.token_type,'"response" body "token_type" property',fe,{body:s}),s.token_type=s.token_type.toLowerCase(),s.token_type!=="dpop"&&s.token_type!=="bearer")throw new Ze("unsupported `token_type` value",{cause:{body:s}});if(s.expires_in!==void 0){let a=typeof s.expires_in!="number"?parseFloat(s.expires_in):s.expires_in;Vr(a,!1,'"response" body "expires_in" property',fe,{body:s}),s.expires_in=a}if(s.refresh_token!==void 0&&Ie(s.refresh_token,'"response" body "refresh_token" property',fe,{body:s}),s.scope!==void 0&&typeof s.scope!="string")throw Z('"response" body "scope" property must be a string',fe,{body:s});if(s.id_token!==void 0){Ie(s.id_token,'"response" body "id_token" property',fe,{body:s});const a=["aud","exp","iat","iss","sub"];t.require_auth_time===!0&&a.push("auth_time"),t.default_max_age!==void 0&&(Vr(t.default_max_age,!1,'"client.default_max_age"'),a.push("auth_time")),n!=null&&n.length&&a.push(...n);const{claims:i,jwt:c}=await h_(s.id_token,p_.bind(void 0,t.id_token_signed_response_alg,e.id_token_signing_alg_values_supported,"RS256"),Va(t),kf(t),o==null?void 0:o[qa]).then(XE.bind(void 0,a)).then(GE.bind(void 0,e)).then(qE.bind(void 0,t.client_id));if(Array.isArray(i.aud)&&i.aud.length!==1){if(i.azp===void 0)throw Z('ID Token "aud" (audience) claim includes additional untrusted audiences',Yt,{claims:i,claim:"aud"});if(i.azp!==t.client_id)throw Z('unexpected ID Token "azp" (authorized party) claim value',Yt,{expected:t.client_id,claims:i,claim:"azp"})}i.auth_time!==void 0&&Vr(i.auth_time,!1,'ID Token "auth_time" (authentication time)',fe,{claims:i}),FE.set(r,c),Hf.set(s,i)}return s}function Wf(e){let t;if(t=jE(e))throw new PE("server responded with a challenge in the WWW-Authenticate HTTP Header",{cause:t,response:e})}async function KE(e,t,r,n){return Ya(e,t,r,void 0,n)}function qE(e,t){if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e))throw Z('unexpected JWT "aud" (audience) claim value',Yt,{expected:e,claims:t.claims,claim:"aud"})}else if(t.claims.aud!==e)throw Z('unexpected JWT "aud" (audience) claim value',Yt,{expected:e,claims:t.claims,claim:"aud"});return t}function GE(e,t){var n;const r=((n=e[b_])==null?void 0:n.call(e,t))??e.issuer;if(t.claims.iss!==r)throw Z('unexpected JWT "iss" (issuer) claim value',Yt,{expected:r,claims:t.claims,claim:"iss"});return t}const Za=new WeakSet;function BE(e){return Za.add(e),e}const zE=Symbol();async function VE(e,t,r,n,o,s,a){if(Jt(e),Xt(t),!Za.has(n))throw ve('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()',Ye);Ie(o,'"redirectUri"');const i=Zt(n,"code");if(!i)throw Z('no authorization code in "callbackParameters"',fe);const c=new URLSearchParams(a==null?void 0:a.additionalParameters);return c.set("redirect_uri",o),c.set("code",i),s!==zE&&(Ie(s,'"codeVerifier"'),c.set("code_verifier",s)),Xa(e,t,r,"authorization_code",c,a)}const JE={aud:"audience",c_hash:"code hash",client_id:"client id",exp:"expiration time",iat:"issued at",iss:"issuer",jti:"jwt id",nonce:"nonce",s_hash:"state hash",sub:"subject",ath:"access token hash",htm:"http method",htu:"http uri",cnf:"confirmation",auth_time:"authentication time"};function XE(e,t){for(const r of e)if(t.claims[r]===void 0)throw Z(`JWT "${r}" (${JE[r]}) claim missing`,fe,{claims:t.claims});return t}const Qa=Symbol(),ei=Symbol();async function YE(e,t,r,n){return ZE(e,t,r,n.expectedNonce,n.maxAge,{[qa]:n[qa]})}async function ZE(e,t,r,n,o,s){const a=[];switch(n){case void 0:n=Qa;break;case Qa:break;default:Ie(n,'"expectedNonce" argument'),a.push("nonce")}switch(o??(o=t.default_max_age),o){case void 0:o=ei;break;case ei:break;default:Vr(o,!1,'"maxAge" argument'),a.push("auth_time")}const i=await Ya(e,t,r,a,s);Ie(i.id_token,'"response" body "id_token" property',fe,{body:i});const c=Uf(i);if(o!==ei){const u=Ja()+Va(t),l=kf(t);if(c.auth_time+o<u-l)throw Z("too much time has elapsed since the last End-User authentication",ri,{claims:c,now:u,tolerance:l,claim:"auth_time"})}if(n===Qa){if(c.nonce!==void 0)throw Z('unexpected ID Token "nonce" claim value',Yt,{expected:void 0,claims:c,claim:"nonce"})}else if(c.nonce!==n)throw Z('unexpected ID Token "nonce" claim value',Yt,{expected:n,claims:c,claim:"nonce"});return i}const QE="OAUTH_WWW_AUTHENTICATE_CHALLENGE",e_="OAUTH_RESPONSE_BODY_ERROR",t_="OAUTH_UNSUPPORTED_OPERATION",r_="OAUTH_AUTHORIZATION_RESPONSE_ERROR",ti="OAUTH_PARSE_ERROR",fe="OAUTH_INVALID_RESPONSE",n_="OAUTH_RESPONSE_IS_NOT_JSON",$f="OAUTH_RESPONSE_IS_NOT_CONFORM",o_="OAUTH_HTTP_REQUEST_FORBIDDEN",s_="OAUTH_REQUEST_PROTOCOL_FORBIDDEN",ri="OAUTH_JWT_TIMESTAMP_CHECK_FAILED",Yt="OAUTH_JWT_CLAIM_COMPARISON_FAILED",a_="OAUTH_JSON_ATTRIBUTE_COMPARISON_FAILED",i_="OAUTH_MISSING_SERVER_METADATA",c_="OAUTH_INVALID_SERVER_METADATA";async function u_(e,t,r,n,o,s){return Jt(e),Xt(t),Ie(n,'"grantType"'),Xa(e,t,r,n,new URLSearchParams(o),s)}async function l_(e,t,r,n){return Ya(e,t,r,void 0,n)}function Yn(e){if(e.bodyUsed)throw ve('"response" body has been used already',Ye)}function Ff(e){const{algorithm:t}=e;if(typeof t.modulusLength!="number"||t.modulusLength<2048)throw new Ze(`unsupported ${t.name} modulusLength`,{cause:e})}function d_(e){const{algorithm:t}=e;switch(t.namedCurve){case"P-256":return"SHA-256";case"P-384":return"SHA-384";case"P-521":return"SHA-512";default:throw new Ze("unsupported ECDSA namedCurve",{cause:e})}}function f_(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:d_(e)};case"RSA-PSS":switch(Ff(e),e.algorithm.hash.name){case"SHA-256":case"SHA-384":case"SHA-512":return{name:e.algorithm.name,saltLength:parseInt(e.algorithm.hash.name.slice(-3),10)>>3};default:throw new Ze("unsupported RSA-PSS hash name",{cause:e})}case"RSASSA-PKCS1-v1_5":return Ff(e),e.algorithm.name;case"Ed25519":return e.algorithm.name}throw new Ze("unsupported CryptoKey algorithm name",{cause:e})}async function h_(e,t,r,n,o){let{0:s,1:a,length:i}=e.split(".");if(i===5)if(o!==void 0)e=await o(e),{0:s,1:a,length:i}=e.split(".");else throw new Ze("JWE decryption is not configured",{cause:e});if(i!==3)throw Z("Invalid JWT",fe,e);let c;try{c=JSON.parse(vr(Vt(s)))}catch(d){throw Z("failed to parse JWT Header body as base64url encoded JSON",ti,d)}if(!Vn(c))throw Z("JWT Header must be a top level object",fe,e);if(t(c),c.crit!==void 0)throw new Ze('no JWT "crit" header parameter extensions are supported',{cause:{header:c}});let u;try{u=JSON.parse(vr(Vt(a)))}catch(d){throw Z("failed to parse JWT Payload body as base64url encoded JSON",ti,d)}if(!Vn(u))throw Z("JWT Payload must be a top level object",fe,e);const l=Ja()+r;if(u.exp!==void 0){if(typeof u.exp!="number")throw Z('unexpected JWT "exp" (expiration time) claim type',fe,{claims:u});if(u.exp<=l-n)throw Z('unexpected JWT "exp" (expiration time) claim value, expiration is past current timestamp',ri,{claims:u,now:l,tolerance:n,claim:"exp"})}if(u.iat!==void 0&&typeof u.iat!="number")throw Z('unexpected JWT "iat" (issued at) claim type',fe,{claims:u});if(u.iss!==void 0&&typeof u.iss!="string")throw Z('unexpected JWT "iss" (issuer) claim type',fe,{claims:u});if(u.nbf!==void 0){if(typeof u.nbf!="number")throw Z('unexpected JWT "nbf" (not before) claim type',fe,{claims:u});if(u.nbf>l+n)throw Z('unexpected JWT "nbf" (not before) claim value',ri,{claims:u,now:l,tolerance:n,claim:"nbf"})}if(u.aud!==void 0&&typeof u.aud!="string"&&!Array.isArray(u.aud))throw Z('unexpected JWT "aud" (audience) claim type',fe,{claims:u});return{header:c,claims:u,jwt:e}}function p_(e,t,r,n){if(e!==void 0){if(typeof e=="string"?n.alg!==e:!e.includes(n.alg))throw Z('unexpected JWT "alg" header parameter',fe,{header:n,expected:e,reason:"client configuration"});return}if(Array.isArray(t)){if(!t.includes(n.alg))throw Z('unexpected JWT "alg" header parameter',fe,{header:n,expected:t,reason:"authorization server metadata"});return}if(r!==void 0){if(typeof r=="string"?n.alg!==r:typeof r=="function"?!r(n.alg):!r.includes(n.alg))throw Z('unexpected JWT "alg" header parameter',fe,{header:n,expected:r,reason:"default value"});return}throw Z('missing client or server configuration to verify used JWT "alg" header parameter',void 0,{client:e,issuer:t,fallback:r})}function Zt(e,t){const{0:r,length:n}=e.getAll(t);if(n>1)throw Z(`"${t}" parameter must be provided only once`,fe);return r}const m_=Symbol(),g_=Symbol();function y_(e,t,r,n){if(Jt(e),Xt(t),r instanceof URL&&(r=r.searchParams),!(r instanceof URLSearchParams))throw ve('"parameters" must be an instance of URLSearchParams, or URL',Je);if(Zt(r,"response"))throw Z('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()',fe,{parameters:r});const o=Zt(r,"iss"),s=Zt(r,"state");if(!o&&e.authorization_response_iss_parameter_supported)throw Z('response parameter "iss" (issuer) missing',fe,{parameters:r});if(o&&o!==e.issuer)throw Z('unexpected "iss" (issuer) response parameter value',fe,{expected:e.issuer,parameters:r});switch(n){case void 0:case g_:if(s!==void 0)throw Z('unexpected "state" response parameter encountered',fe,{expected:void 0,parameters:r});break;case m_:break;default:if(Ie(n,'"expectedState" argument'),s!==n)throw Z(s===void 0?'response parameter "state" missing':'unexpected "state" response parameter value',fe,{expected:n,parameters:r})}if(Zt(r,"error"))throw new TE("authorization response from the server is an error",{cause:r});const i=Zt(r,"id_token"),c=Zt(r,"token");if(i!==void 0||c!==void 0)throw new Ze("implicit and hybrid flows are not supported");return BE(new URLSearchParams(r))}async function ni(e,t=Of){let r;try{r=await e.json()}catch(n){throw t(e),Z('failed to parse "response" body as JSON',ti,n)}if(!Vn(r))throw Z('"response" body must be a top level object',fe,{body:r});return r}const Kf=Symbol(),b_=Symbol(),w_={version:"4.7.0"};function v_(e,t){let r;try{r=new URL(e,t)}catch{return}if(r.origin===t.origin)return r}function Zn(e){var t;const r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||e.expires===0)&&`Expires=${(typeof e.expires=="number"?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&typeof e.maxAge=="number"&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),n=`${e.name}=${encodeURIComponent((t=e.value)!=null?t:"")}`;return r.length===0?n:`${n}; ${r.join("; ")}`}function qf(e){const t=new Map;for(const r of e.split(/; */)){if(!r)continue;const n=r.indexOf("=");if(n===-1){t.set(r,"true");continue}const[o,s]=[r.slice(0,n),r.slice(n+1)];try{t.set(o,decodeURIComponent(s??"true"))}catch{}}return t}function E_(e){if(!e)return;const[[t,r],...n]=qf(e),{domain:o,expires:s,httponly:a,maxage:i,path:c,samesite:u,secure:l,partitioned:d,priority:h}=Object.fromEntries(n.map(([E,b])=>[E.toLowerCase().replace(/-/g,""),b])),g={name:t,value:decodeURIComponent(r),domain:o,...s&&{expires:new Date(s)},...a&&{httpOnly:!0},...typeof i=="string"&&{maxAge:Number(i)},path:c,...u&&{sameSite:x_(u)},...l&&{secure:!0},...h&&{priority:R_(h)},...d&&{partitioned:!0}};return __(g)}function __(e){const t={};for(const r in e)e[r]&&(t[r]=e[r]);return t}var S_=["strict","lax","none"];function x_(e){return e=e.toLowerCase(),S_.includes(e)?e:void 0}var A_=["low","medium","high"];function R_(e){return e=e.toLowerCase(),A_.includes(e)?e:void 0}function C_(e){if(!e)return[];var t=[],r=0,n,o,s,a,i;function c(){for(;r<e.length&&/\s/.test(e.charAt(r));)r+=1;return r<e.length}function u(){return o=e.charAt(r),o!=="="&&o!==";"&&o!==","}for(;r<e.length;){for(n=r,i=!1;c();)if(o=e.charAt(r),o===","){for(s=r,r+=1,c(),a=r;r<e.length&&u();)r+=1;r<e.length&&e.charAt(r)==="="?(i=!0,r=a,t.push(e.substring(n,s)),n=r):r=s+1}else r+=1;(!i||r>=e.length)&&t.push(e.substring(n,e.length))}return t}var T_=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t){const r=qf(t);for(const[n,o]of r)this._parsed.set(n,{name:n,value:o})}}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){const t=typeof e[0]=="string"?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;const r=Array.from(this._parsed);if(!e.length)return r.map(([o,s])=>s);const n=typeof e[0]=="string"?e[0]:(t=e[0])==null?void 0:t.name;return r.filter(([o])=>o===n).map(([o,s])=>s)}has(e){return this._parsed.has(e)}set(...e){const[t,r]=e.length===1?[e[0].name,e[0].value]:e,n=this._parsed;return n.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(n).map(([o,s])=>Zn(s)).join("; ")),this}delete(e){const t=this._parsed,r=Array.isArray(e)?e.map(n=>t.delete(n)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([n,o])=>Zn(o)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},oi=class{constructor(e){this._parsed=new Map;var t,r,n;this._headers=e;const o=(n=(r=(t=e.getSetCookie)==null?void 0:t.call(e))!=null?r:e.get("set-cookie"))!=null?n:[],s=Array.isArray(o)?o:C_(o);for(const a of s){const i=E_(a);i&&this._parsed.set(i.name,i)}}get(...e){const t=typeof e[0]=="string"?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;const r=Array.from(this._parsed.values());if(!e.length)return r;const n=typeof e[0]=="string"?e[0]:(t=e[0])==null?void 0:t.name;return r.filter(o=>o.name===n)}has(e){return this._parsed.has(e)}set(...e){const[t,r,n]=e.length===1?[e[0].name,e[0].value,e[0]]:e,o=this._parsed;return o.set(t,O_({name:t,value:r,...n})),P_(o,this._headers),this}delete(...e){const[t,r]=typeof e[0]=="string"?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(Zn).join("; ")}};function P_(e,t){t.delete("set-cookie");for(const[,r]of e){const n=Zn(r);t.append("set-cookie",n)}}function O_(e={name:"",value:""}){return typeof e.expires=="number"&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+e.maxAge*1e3)),(e.path===null||e.path===void 0)&&(e.path="/"),e}const k_=()=>{if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;throw new Error("unable to locate global object")},N_=async(e,t,r,n,o)=>{const{crypto:{subtle:s}}=k_();return new Uint8Array(await s.deriveBits({name:"HKDF",hash:`SHA-${e.substr(3)}`,salt:r,info:n},await s.importKey("raw",t,"HKDF",!1,["deriveBits"]),o<<3))};function I_(e){switch(e){case"sha256":case"sha384":case"sha512":case"sha1":return e;default:throw new TypeError('unsupported "digest" value')}}function si(e,t){if(typeof e=="string")return new TextEncoder().encode(e);if(!(e instanceof Uint8Array))throw new TypeError(`"${t}"" must be an instance of Uint8Array or a string`);return e}function D_(e){const t=si(e,"ikm");if(!t.byteLength)throw new TypeError('"ikm" must be at least one byte in length');return t}function M_(e){const t=si(e,"info");if(t.byteLength>1024)throw TypeError('"info" must not contain more than 1024 bytes');return t}function L_(e,t){if(!Number.isInteger(e)||e<1)throw new TypeError('"keylen" must be a positive integer');const r=parseInt(t.substr(3),10)>>3||20;if(e>255*r)throw new TypeError('"keylen" too large');return e}async function ai(e,t,r,n,o){return N_(I_(e),D_(t),si(r,"salt"),M_(n),L_(o,e))}const j_="A256GCM",H_="dir",Gf="sha256",ii=32,Bf="JWE CEK";async function Qn(e,t,r,n){const o=await ai(Gf,t,"",Bf,ii);return(await new $v(e).setProtectedHeader({enc:j_,alg:H_,...n}).setExpirationTime(r).encrypt(o)).toString()}async function Er(e,t,r){const n=await ai(Gf,t,"",Bf,ii);return await Hv(e,n,{...r,clockTolerance:15})}const U_=e=>ai("sha256",e,"","JWS Cookie Signing",ii);async function W_(e,t,r){if(!t)return;const[n,o]=t.split("."),s={protected:Yv(JSON.stringify({alg:"HS256",b64:!1,crit:["b64"]})),payload:`${e}=${n}`,signature:o},a=await U_(r);try{return await vf(s,a,{algorithms:["HS256"]}),n}catch{return}}const ci=3500,eo="__",$_=new RegExp(`${eo}(\\d+)$`),zf=/\.(\d+)$/,ui=(e,t)=>{const r=t?zf.exec(e):$_.exec(e);if(r)return parseInt(r[1],10)},to=(e,t,r)=>{const n=new RegExp(r?`^${t}${zf.source}$`:`^${t}${eo}\\d+$`);return e.getAll().filter(o=>n.test(o.name))};function F_(e,t,r,n,o){const{transient:s,...a}=r,i={...a};if(s&&delete i.maxAge,new TextEncoder().encode(t).length<=ci){o.set(e,t,i),n.set(e,t),to(n,e).forEach(g=>{o.delete(g.name),n.delete(g.name)});return}let u=0,l=0;for(;u<t.length;){const g=t.slice(u,u+ci),E=`${e}${eo}${l}`;o.set(E,g,i),n.set(E,g),u+=ci,l++}const h=to(n,e).length-l;if(h>0)for(let g=0;g<h;g++){const E=l+g,b=`${e}${eo}${E}`;o.delete(b),n.delete(b)}o.delete(e),n.delete(e)}function Vf(e,t,r){const n=t.get(e);if(n!=null&&n.value)return n.value;const o=to(t,e,r).sort((a,i)=>ui(a.name,r)-ui(i.name,r));if(o.length===0)return;const s=ui(o[o.length-1].name,r);if(o.length!==s+1){console.warn(`Incomplete chunked cookie '${e}': Found ${o.length} chunks, expected ${s+1}`);return}return o.map(a=>a.value).join("")}function Jf(e,t,r,n){r.delete(e),to(t,e,n).forEach(o=>{r.delete(o.name)})}function Jr(e){e.headers.set("Cache-Control","private, no-cache, no-store, must-revalidate, max-age=0"),e.headers.set("Pragma","no-cache"),e.headers.set("Expires","0")}const K_=["sub","name","nickname","given_name","family_name","picture","email","email_verified","org_id"];function q_(e){return Object.keys(e).reduce((t,r)=>(K_.includes(r)&&(t[r]=e[r]),t),{})}const G_=["client_id","redirect_uri","response_type","code_challenge","code_challenge_method","state","nonce"],Xf=["openid","profile","email","offline_access"].join(" "),B_="urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token",z_="urn:ietf:params:oauth:token-type:refresh_token",V_="http://auth0.com/oauth/token-type/federated-connection-access-token";function li(e,t){return new URL(ji(Hi(e)),Li(t))}class J_{constructor(t){if(this.fetch=t.fetch||fetch,this.jwksCache=t.jwksCache||{},this.allowInsecureRequests=t.allowInsecureRequests??!1,this.httpOptions=()=>{const n=new Headers,o=t.enableTelemetry??!0,s=t.httpTimeout??5e3;if(o){const a="nextjs-auth0",i=w_.version;n.set("User-Agent",`${a}/${i}`),n.set("Auth0-Client",X_(JSON.stringify({name:a,version:i})))}return{signal:AbortSignal.timeout(s),headers:n}},this.allowInsecureRequests&&process.env.NODE_ENV==="production"&&console.warn("allowInsecureRequests is enabled in a production environment. This is not recommended."),this.transactionStore=t.transactionStore,this.sessionStore=t.sessionStore,this.domain=t.domain,this.clientMetadata={client_id:t.clientId},this.clientSecret=t.clientSecret,this.authorizationParameters=t.authorizationParameters||{scope:Xf},this.pushedAuthorizationRequests=t.pushedAuthorizationRequests??!1,this.clientAssertionSigningKey=t.clientAssertionSigningKey,this.clientAssertionSigningAlg=t.clientAssertionSigningAlg||"RS256",this.authorizationParameters.scope||(this.authorizationParameters.scope=Xf),!this.authorizationParameters.scope.split(" ").map(n=>n.trim()).includes("openid"))throw new Error("The 'openid' scope must be included in the set of scopes. See https://auth0.com/docs");this.appBaseUrl=t.appBaseUrl,this.signInReturnToPath=t.signInReturnToPath||"/",this.beforeSessionSaved=t.beforeSessionSaved,this.onCallback=t.onCallback||this.defaultOnCallback,this.routes={login:"/auth/login",logout:"/auth/logout",callback:"/auth/callback",backChannelLogout:"/auth/backchannel-logout",profile:process.env.NEXT_PUBLIC_PROFILE_ROUTE||"/auth/profile",accessToken:process.env.NEXT_PUBLIC_ACCESS_TOKEN_ROUTE||"/auth/access-token",...t.routes},this.enableAccessTokenEndpoint=t.enableAccessTokenEndpoint??!0,this.noContentProfileResponseWhenUnauthenticated=t.noContentProfileResponseWhenUnauthenticated??!1}async handler(t){const{pathname:r}=t.nextUrl,n=Hh(r),o=t.method;if(o==="GET"&&n===this.routes.login)return this.handleLogin(t);if(o==="GET"&&n===this.routes.logout)return this.handleLogout(t);if(o==="GET"&&n===this.routes.callback)return this.handleCallback(t);if(o==="GET"&&n===this.routes.profile)return this.handleProfile(t);if(o==="GET"&&n===this.routes.accessToken&&this.enableAccessTokenEndpoint)return this.handleAccessToken(t);if(o==="POST"&&n===this.routes.backChannelLogout)return this.handleBackChannelLogout(t);{const s=ge.NextResponse.next(),a=await this.sessionStore.get(t.cookies);return a&&(await this.sessionStore.set(t.cookies,s.cookies,{...a}),Jr(s)),s}}async startInteractiveLogin(t={}){const r=li(this.routes.callback,this.appBaseUrl);let n=this.signInReturnToPath;if(t.returnTo){const b=new URL(this.authorizationParameters.redirect_uri||this.appBaseUrl),m=v_(t.returnTo,b);m&&(n=m.pathname+m.search+m.hash)}const o="S256",s=fE(),a=await mE(s),i=hE(),c=pE(),u=new URLSearchParams;u.set("client_id",this.clientMetadata.client_id),u.set("redirect_uri",r.toString()),u.set("response_type","code"),u.set("code_challenge",a),u.set("code_challenge_method",o),u.set("state",i),u.set("nonce",c);const l={...this.authorizationParameters,...t.authorizationParameters};Object.entries(l).forEach(([b,m])=>{!G_.includes(b)&&m!=null&&u.set(b,String(m))});const d={nonce:c,maxAge:this.authorizationParameters.max_age,codeVerifier:s,responseType:"code",state:i,returnTo:n},[h,g]=await this.authorizationUrl(u);if(h)return new ge.NextResponse("An error occured while trying to initiate the login request.",{status:500});const E=ge.NextResponse.redirect(g.toString());return await this.transactionStore.save(E.cookies,d),E}async handleLogin(t){const r=Object.fromEntries(t.nextUrl.searchParams.entries()),n={authorizationParameters:this.pushedAuthorizationRequests?{}:r,returnTo:r.returnTo};return this.startInteractiveLogin(n)}async handleLogout(t){const r=await this.sessionStore.get(t.cookies),[n,o]=await this.discoverAuthorizationServerMetadata();if(n)return new ge.NextResponse("An error occured while trying to initiate the logout request.",{status:500});const s=t.nextUrl.searchParams.get("returnTo")||this.appBaseUrl;if(!o.end_session_endpoint){console.warn("The Auth0 client does not have RP-initiated logout enabled, the user will be redirected to the `/v2/logout` endpoint instead. Learn how to enable it here: https://auth0.com/docs/authenticate/login/logout/log-users-out-of-auth0#enable-endpoint-discovery");const c=new URL("/v2/logout",this.issuer);c.searchParams.set("returnTo",s),c.searchParams.set("client_id",this.clientMetadata.client_id);const u=ge.NextResponse.redirect(c);return await this.sessionStore.delete(t.cookies,u.cookies),await this.transactionStore.deleteAll(t.cookies,u.cookies),u}const a=new URL(o.end_session_endpoint);a.searchParams.set("client_id",this.clientMetadata.client_id),a.searchParams.set("post_logout_redirect_uri",s),r!=null&&r.internal.sid&&a.searchParams.set("logout_hint",r.internal.sid),r!=null&&r.tokenSet.idToken&&a.searchParams.set("id_token_hint",r==null?void 0:r.tokenSet.idToken);const i=ge.NextResponse.redirect(a);return await this.sessionStore.delete(t.cookies,i.cookies),Jr(i),await this.transactionStore.deleteAll(t.cookies,i.cookies),i}async handleCallback(t){const r=t.nextUrl.searchParams.get("state");if(!r)return this.onCallback(new $h,{},null);const n=await this.transactionStore.get(t.cookies,r);if(!n)return this.onCallback(new Fh,{},null);const o=n.payload,s={returnTo:o.returnTo},[a,i]=await this.discoverAuthorizationServerMetadata();if(a)return this.onCallback(a,s,null);let c;try{c=y_(i,this.clientMetadata,t.nextUrl.searchParams,o.state)}catch(E){return this.onCallback(new Ui({cause:new Pr({code:E.error,message:E.error_description})}),s,null)}let u;try{const E=li(this.routes.callback,this.appBaseUrl);u=await VE(i,this.clientMetadata,await this.getClientAuth(),c,E.toString(),o.codeVerifier,{...this.httpOptions(),[zt]:this.fetch,[It]:this.allowInsecureRequests})}catch(E){return this.onCallback(new Kh(E.message),s,null)}let l;try{l=await YE(i,this.clientMetadata,u,{expectedNonce:o.nonce,maxAge:o.maxAge,requireIdToken:!0})}catch(E){return this.onCallback(new qh({cause:new Pr({code:E.error,message:E.error_description})}),s,null)}const d=Uf(l);let h={user:d,tokenSet:{accessToken:l.access_token,idToken:l.id_token,scope:l.scope,refreshToken:l.refresh_token,expiresAt:Math.floor(Date.now()/1e3)+Number(l.expires_in)},internal:{sid:d.sid,createdAt:Math.floor(Date.now()/1e3)}};const g=await this.onCallback(null,s,h);return this.beforeSessionSaved?h={...await this.beforeSessionSaved(h,l.id_token??null),internal:h.internal}:h.user=q_(d),await this.sessionStore.set(t.cookies,g.cookies,h,!0),Jr(g),await this.transactionStore.delete(g.cookies,r),g}async handleProfile(t){const r=await this.sessionStore.get(t.cookies);if(!r)return this.noContentProfileResponseWhenUnauthenticated?new ge.NextResponse(null,{status:204}):new ge.NextResponse(null,{status:401});const n=ge.NextResponse.json(r==null?void 0:r.user);return Jr(n),n}async handleAccessToken(t){const r=await this.sessionStore.get(t.cookies);if(!r)return ge.NextResponse.json({error:{message:"The user does not have an active session.",code:Qt.MISSING_SESSION}},{status:401});const[n,o]=await this.getTokenSet(r.tokenSet);if(n)return ge.NextResponse.json({error:{message:n.message,code:n.code}},{status:401});const s=ge.NextResponse.json({token:o.accessToken,scope:o.scope,expires_at:o.expiresAt});return(o.accessToken!==r.tokenSet.accessToken||o.refreshToken!==r.tokenSet.refreshToken||o.expiresAt!==r.tokenSet.expiresAt)&&(await this.sessionStore.set(t.cookies,s.cookies,{...r,tokenSet:o}),Jr(s)),s}async handleBackChannelLogout(t){if(!this.sessionStore.store)return new ge.NextResponse("A session data store is not configured.",{status:500});if(!this.sessionStore.store.deleteByLogoutToken)return new ge.NextResponse("Back-channel logout is not supported by the session data store.",{status:500});const n=new URLSearchParams(await t.text()).get("logout_token");if(!n)return new ge.NextResponse("Missing `logout_token` in the request body.",{status:400});const[o,s]=await this.verifyLogoutToken(n);return o?new ge.NextResponse(o.message,{status:400}):(await this.sessionStore.store.deleteByLogoutToken(s),new ge.NextResponse(null,{status:204}))}async getTokenSet(t,r){if(!t.refreshToken&&t.expiresAt<=Date.now()/1e3)return[new xo(Qt.MISSING_REFRESH_TOKEN,"The access token has expired and a refresh token was not provided. The user needs to re-authenticate."),null];if(t.refreshToken&&(r||t.expiresAt<=Date.now()/1e3)){const[n,o]=await this.discoverAuthorizationServerMetadata();if(n)return[n,null];const s=await $E(o,this.clientMetadata,await this.getClientAuth(),t.refreshToken,{...this.httpOptions(),[zt]:this.fetch,[It]:this.allowInsecureRequests});let a;try{a=await KE(o,this.clientMetadata,s)}catch(u){return[new xo(Qt.FAILED_TO_REFRESH_TOKEN,"The access token has expired and there was an error while trying to refresh it.",new Pr({code:u.error,message:u.error_description})),null]}const i=Math.floor(Date.now()/1e3)+Number(a.expires_in),c={...t,accessToken:a.access_token,idToken:a.id_token,expiresAt:i};return a.refresh_token?c.refreshToken=a.refresh_token:c.refreshToken=t.refreshToken,[null,c]}return[null,t]}async discoverAuthorizationServerMetadata(){if(this.authorizationServerMetadata)return[null,this.authorizationServerMetadata];const t=new URL(this.issuer);try{const r=await cE(t,{...this.httpOptions(),[zt]:this.fetch,[It]:this.allowInsecureRequests}).then(n=>uE(t,n));return this.authorizationServerMetadata=r,[null,r]}catch(r){return console.error(`An error occured while performing the discovery request. issuer=${t.toString()}, error:`,r),[new Wh("Discovery failed for the OpenID Connect configuration."),null]}}async defaultOnCallback(t,r){return t?new ge.NextResponse(t.message,{status:500}):ge.NextResponse.redirect(li(r.returnTo||"/",this.appBaseUrl))}async verifyLogoutToken(t){const[r,n]=await this.discoverAuthorizationServerMetadata();if(r)return[r,null];const o="RS256",s=Xv(new URL(n.jwks_uri),{[zn]:this.jwksCache}),{payload:a}=await jv(t,s,{issuer:n.issuer,audience:this.clientMetadata.client_id,algorithms:[o],requiredClaims:["iat"]});return!("sid"in a)&&!("sub"in a)?[new St('either "sid" or "sub" (or both) claims must be present'),null]:"sid"in a&&typeof a.sid!="string"?[new St('"sid" claim must be a string'),null]:"sub"in a&&typeof a.sub!="string"?[new St('"sub" claim must be a string'),null]:"nonce"in a?[new St('"nonce" claim is prohibited'),null]:"events"in a?typeof a.events!="object"||a.events===null?[new St('"events" claim must be an object'),null]:"http://schemas.openid.net/event/backchannel-logout"in a.events?typeof a.events["http://schemas.openid.net/event/backchannel-logout"]!="object"?[new St('"http://schemas.openid.net/event/backchannel-logout" member in the "events" claim must be an object'),null]:[null,{sid:a.sid,sub:a.sub}]:[new St('"http://schemas.openid.net/event/backchannel-logout" member is missing in the "events" claim'),null]:[new St('"events" claim is missing'),null]}async authorizationUrl(t){const[r,n]=await this.discoverAuthorizationServerMetadata();if(r)return[r,null];if(this.pushedAuthorizationRequests&&!n.pushed_authorization_request_endpoint)return console.error("The Auth0 tenant does not have pushed authorization requests enabled. Learn how to enable it here: https://auth0.com/docs/get-started/applications/configure-par"),[new Error("The authorization server does not support pushed authorization requests."),null];const o=new URL(n.authorization_endpoint);if(this.pushedAuthorizationRequests){const s=await RE(n,this.clientMetadata,await this.getClientAuth(),t,{...this.httpOptions(),[zt]:this.fetch,[It]:this.allowInsecureRequests});let a;try{a=await HE(n,this.clientMetadata,s)}catch(i){return[new Ui({cause:new Pr({code:i.error,message:i.error_description}),message:"An error occured while pushing the authorization request."}),null]}return o.searchParams.set("request_uri",a.request_uri),o.searchParams.set("client_id",this.clientMetadata.client_id),[null,o]}return o.search=t.toString(),[null,o]}async getClientAuth(){if(!this.clientSecret&&!this.clientAssertionSigningKey)throw new Error("The client secret or client assertion signing key must be provided.");let t=this.clientAssertionSigningKey;return t&&!(t instanceof CryptoKey)&&(t=await pv(t,this.clientAssertionSigningAlg)),t?SE(t):EE(this.clientSecret)}get issuer(){return this.domain.startsWith("http://")||this.domain.startsWith("https://")?this.domain:`https://${this.domain}`}async getConnectionTokenSet(t,r,n){if(!t.refreshToken&&(!r||r.expiresAt<=Date.now()/1e3))return[new Ao(Or.MISSING_REFRESH_TOKEN,"A refresh token was not present, Connection Access Token requires a refresh token. The user needs to re-authenticate."),null];if(t.refreshToken&&(!r||r.expiresAt<=Date.now()/1e3)){const o=new URLSearchParams;o.append("connection",n.connection),o.append("subject_token_type",z_),o.append("subject_token",t.refreshToken),o.append("requested_token_type",V_),n.login_hint&&o.append("login_hint",n.login_hint);const[s,a]=await this.discoverAuthorizationServerMetadata();if(s)return[s,null];const i=await u_(a,this.clientMetadata,await this.getClientAuth(),B_,o,{[zt]:this.fetch,[It]:this.allowInsecureRequests});let c;try{c=await l_(a,this.clientMetadata,i)}catch(u){return[new Ao(Or.FAILED_TO_EXCHANGE,"There was an error trying to exchange the refresh token for a connection access token.",new Pr({code:u.error,message:u.error_description})),null]}return[null,{accessToken:c.access_token,expiresAt:Math.floor(Date.now()/1e3)+Number(c.expires_in),scope:c.scope,connection:n.connection}]}return[null,r]}}const X_=e=>{const t=new TextEncoder().encode(e),r=32768,n=[];for(let o=0;o<t.length;o+=r)n.push(String.fromCharCode.apply(null,t.subarray(o,o+r)));return btoa(n.join(""))},Y_="__session";class Yf{constructor({secret:t,rolling:r=!0,absoluteDuration:n=60*60*24*3,inactivityDuration:o=60*60*24*1,store:s,cookieOptions:a}){this.secret=t,this.rolling=r,this.absoluteDuration=n,this.inactivityDuration=o,this.store=s,this.sessionCookieName=(a==null?void 0:a.name)??Y_,this.cookieConfig={httpOnly:!0,sameSite:(a==null?void 0:a.sameSite)??"lax",secure:(a==null?void 0:a.secure)??!1,path:(a==null?void 0:a.path)??"/",domain:a==null?void 0:a.domain,transient:a==null?void 0:a.transient}}epoch(){return Date.now()/1e3|0}calculateMaxAge(t){if(!this.rolling)return this.absoluteDuration;const r=this.epoch(),o=Math.min(r+this.inactivityDuration,t+this.absoluteDuration)-this.epoch();return o>0?o:0}}const _r="appSession";function Z_(e){if(e.protectedHeader.iat){const t=e;return Zf(t.protectedHeader,t.payload)}return e.payload}function Q_(e){var t;if((t=e.header)!=null&&t.iat){const r=e;return Zf(r.header,r.data)}return e}function Zf(e,t){const r=t.user;return{user:r,tokenSet:{idToken:t.idToken??void 0,accessToken:t.accessToken??void 0,scope:t.accessTokenScope,refreshToken:t.refreshToken,expiresAt:t.accessTokenExpiresAt},internal:{sid:r.sid,createdAt:e.iat}}}const Qf=()=>{const e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")};class eS extends Yf{constructor({secret:t,store:r,rolling:n,absoluteDuration:o,inactivityDuration:s,cookieOptions:a}){super({secret:t,rolling:n,absoluteDuration:o,inactivityDuration:s,cookieOptions:a}),this.store=r}async get(t){const r=t.get(this.sessionCookieName)||t.get(_r);if(!r||!r.value)return null;let n=null;try{const{payload:s}=await Er(r.value,this.secret);n=s.id}catch(s){if(s.code==="ERR_JWE_INVALID"){const a=await W_(r.name,r.value,this.secret);if(!a)return null;n=a}}if(!n)return null;const o=await this.store.get(n);return o?Q_(o):null}async set(t,r,n,o=!1){var l;let s=null;const a=(l=t.get(this.sessionCookieName))==null?void 0:l.value;if(a){const{payload:d}=await Er(a,this.secret);s=d.id}s&&o&&(await this.store.delete(s),s=Qf()),s||(s=Qf());const i=this.calculateMaxAge(n.internal.createdAt),c=Date.now()/1e3+i,u=await Qn({id:s},this.secret,c);r.set(this.sessionCookieName,u.toString(),{...this.cookieConfig,maxAge:i}),await this.store.set(s,n),t.set(this.sessionCookieName,u.toString()),this.sessionCookieName!==_r&&t.has(_r)&&r.delete(_r)}async delete(t,r){var s;const n=(s=t.get(this.sessionCookieName))==null?void 0:s.value;if(await r.delete(this.sessionCookieName),!n)return;const{payload:o}=await Er(n,this.secret);await this.store.delete(o.id)}}class tS extends Yf{constructor({secret:t,rolling:r,absoluteDuration:n,inactivityDuration:o,cookieOptions:s}){super({secret:t,rolling:r,absoluteDuration:n,inactivityDuration:o,cookieOptions:s}),this.connectionTokenSetsCookieName="__FC"}async get(t){const r=Vf(this.sessionCookieName,t)??Vf(_r,t,!0);if(!r)return null;const n=await Er(r,this.secret),o=Z_(n),s=await Promise.all(this.getConnectionTokenSetsCookies(t).map(a=>Er(a.value,this.secret)));return{...o,...s.length?{connectionTokenSets:s.map(a=>a.payload)}:{}}}async set(t,r,n){const{connectionTokenSets:o,...s}=n,a=this.calculateMaxAge(n.internal.createdAt),i=Math.floor(Date.now()/1e3)+a,u=(await Qn(s,this.secret,i)).toString(),l={...this.cookieConfig,maxAge:a};F_(this.sessionCookieName,u,l,t,r),o!=null&&o.length&&await Promise.all(o.map((d,h)=>this.storeInCookie(t,r,d,`${this.connectionTokenSetsCookieName}_${h}`,a))),Jf(_r,t,r,!0)}async delete(t,r){Jf(this.sessionCookieName,t,r),this.getConnectionTokenSetsCookies(t).forEach(n=>r.delete(n.name))}async storeInCookie(t,r,n,o,s){const a=Math.floor(Date.now()/1e3+s),i=await Qn(n,this.secret,a),c=i.toString();r.set(o,i.toString(),{...this.cookieConfig,maxAge:s}),t.set(o,c);const u=new oi(new Headers);u.set(o,c,{...this.cookieConfig,maxAge:s}),new TextEncoder().encode(u.toString()).length>=4096&&(o===this.sessionCookieName?console.warn(`The ${o} cookie size exceeds 4096 bytes, which may cause issues in some browsers. Consider removing any unnecessary custom claims from the access token or the user profile. Alternatively, you can use a stateful session implementation to store the session data in a data store.`):console.warn(`The ${o} cookie size exceeds 4096 bytes, which may cause issues in some browsers. You can use a stateful session implementation to store the session data in a data store.`))}getConnectionTokenSetsCookies(t){return t.getAll().filter(r=>r.name.startsWith(this.connectionTokenSetsCookieName))}}const rS="__txn_";class nS{constructor({secret:t,cookieOptions:r}){this.secret=t,this.transactionCookiePrefix=(r==null?void 0:r.prefix)??rS,this.cookieConfig={httpOnly:!0,sameSite:(r==null?void 0:r.sameSite)??"lax",secure:(r==null?void 0:r.secure)??!1,path:(r==null?void 0:r.path)??"/",maxAge:60*60}}getTransactionCookieName(t){return`${this.transactionCookiePrefix}${t}`}getCookiePrefix(){return this.transactionCookiePrefix}async save(t,r){const n=Math.floor(Date.now()/1e3+this.cookieConfig.maxAge),o=await Qn(r,this.secret,n);if(!r.state)throw new Error("Transaction state is required");t.set(this.getTransactionCookieName(r.state),o.toString(),this.cookieConfig)}async get(t,r){var s;const n=this.getTransactionCookieName(r),o=(s=t.get(n))==null?void 0:s.value;return o?Er(o,this.secret):null}async delete(t,r){await t.delete(this.getTransactionCookieName(r))}async deleteAll(t,r){const n=this.getCookiePrefix();t.getAll().forEach(o=>{o.name.startsWith(n)&&r.delete(o.name)})}}class oS{constructor(t={}){var d,h,g,E,b,m,p,y,f,x,v,R,w,_,C,D;const{domain:r,clientId:n,clientSecret:o,appBaseUrl:s,secret:a,clientAssertionSigningKey:i}=this.validateAndExtractRequiredOptions(t),c=t.clientAssertionSigningAlg||process.env.AUTH0_CLIENT_ASSERTION_SIGNING_ALG,u={name:((h=(d=t.session)==null?void 0:d.cookie)==null?void 0:h.name)??"__session",secure:((E=(g=t.session)==null?void 0:g.cookie)==null?void 0:E.secure)??process.env.AUTH0_COOKIE_SECURE==="true",sameSite:((m=(b=t.session)==null?void 0:b.cookie)==null?void 0:m.sameSite)??process.env.AUTH0_COOKIE_SAME_SITE??"lax",path:((y=(p=t.session)==null?void 0:p.cookie)==null?void 0:y.path)??process.env.AUTH0_COOKIE_PATH??"/",transient:((x=(f=t.session)==null?void 0:f.cookie)==null?void 0:x.transient)??process.env.AUTH0_COOKIE_TRANSIENT==="true",domain:((R=(v=t.session)==null?void 0:v.cookie)==null?void 0:R.domain)??process.env.AUTH0_COOKIE_DOMAIN},l={prefix:((w=t.transactionCookie)==null?void 0:w.prefix)??"__txn_",secure:((_=t.transactionCookie)==null?void 0:_.secure)??!1,sameSite:((C=t.transactionCookie)==null?void 0:C.sameSite)??"lax",path:((D=t.transactionCookie)==null?void 0:D.path)??"/"};if(s){const{protocol:I}=new URL(s);I==="https:"&&(u.secure=!0,l.secure=!0)}this.transactionStore=new nS({...t.session,secret:a,cookieOptions:l}),this.sessionStore=t.sessionStore?new eS({...t.session,secret:a,store:t.sessionStore,cookieOptions:u}):new tS({...t.session,secret:a,cookieOptions:u}),this.authClient=new J_({transactionStore:this.transactionStore,sessionStore:this.sessionStore,domain:r,clientId:n,clientSecret:o,clientAssertionSigningKey:i,clientAssertionSigningAlg:c,authorizationParameters:t.authorizationParameters,pushedAuthorizationRequests:t.pushedAuthorizationRequests,appBaseUrl:s,secret:a,signInReturnToPath:t.signInReturnToPath,beforeSessionSaved:t.beforeSessionSaved,onCallback:t.onCallback,routes:t.routes,allowInsecureRequests:t.allowInsecureRequests,httpTimeout:t.httpTimeout,enableTelemetry:t.enableTelemetry,enableAccessTokenEndpoint:t.enableAccessTokenEndpoint,noContentProfileResponseWhenUnauthenticated:t.noContentProfileResponseWhenUnauthenticated})}middleware(t){return this.authClient.handler.bind(this.authClient)(t)}async getSession(t){return t?t instanceof ge.NextRequest?this.sessionStore.get(t.cookies):this.sessionStore.get(this.createRequestCookies(t)):this.sessionStore.get(await Gr.cookies())}async getAccessToken(t,r,n){const o={refresh:!1};let s,a,i={};if(t&&(t instanceof Request||typeof t.headers=="object")){if(s=t,a=r,i={...o,...n??{}},!a)throw new TypeError("getAccessToken(req, res): The 'res' argument is missing. Both 'req' and 'res' must be provided together for Pages Router or middleware usage.")}else{if(r!==void 0||n!==void 0)throw new TypeError("getAccessToken: Invalid arguments. Valid signatures are getAccessToken(), getAccessToken(options), or getAccessToken(req, res, options).");i={...o,...t??{}}}const c=s?await this.getSession(s):await this.getSession();if(!c)throw new xo(Qt.MISSING_SESSION,"The user does not have an active session.");const[u,l]=await this.authClient.getTokenSet(c.tokenSet,i.refresh);if(u)throw u;return(l.accessToken!==c.tokenSet.accessToken||l.expiresAt!==c.tokenSet.expiresAt||l.refreshToken!==c.tokenSet.refreshToken)&&await this.saveToSession({...c,tokenSet:l},s,a),{token:l.accessToken,scope:l.scope,expiresAt:l.expiresAt}}async getAccessTokenForConnection(t,r,n){var c,u;const o=r?await this.getSession(r):await this.getSession();if(!o)throw new Ao(Or.MISSING_SESSION,"The user does not have an active session.");const s=(c=o.connectionTokenSets)==null?void 0:c.find(l=>l.connection===t.connection),[a,i]=await this.authClient.getConnectionTokenSet(o.tokenSet,s,t);if(a!==null)throw a;if(i&&(!s||i.accessToken!==s.accessToken||i.expiresAt!==s.expiresAt||i.scope!==s.scope)){let l;s?l=(u=o.connectionTokenSets)==null?void 0:u.map(d=>d.connection===t.connection?i:d):l=[...o.connectionTokenSets||[],i],await this.saveToSession({...o,connectionTokenSets:l},r,n)}return{token:i.accessToken,scope:i.scope,expiresAt:i.expiresAt}}async updateSession(t,r,n){if(r){const o=t;if(!n)throw new Error("The session data is missing.");if(o instanceof ge.NextRequest&&r instanceof ge.NextResponse){const s=await this.getSession(o);if(!s)throw new Error("The user is not authenticated.");await this.sessionStore.set(o.cookies,r.cookies,{...n,internal:{...s.internal}})}else{const s=await this.getSession(o);if(!s)throw new Error("The user is not authenticated.");const a=new Headers,i=new oi(a),c=n,u=this.createRequestCookies(o),l=r;await this.sessionStore.set(u,i,{...c,internal:{...s.internal}});for(const[d,h]of a.entries())l.setHeader(d,h)}}else{const o=await this.getSession();if(!o)throw new Error("The user is not authenticated.");const s=t;if(!s)throw new Error("The session data is missing.");await this.sessionStore.set(await Gr.cookies(),await Gr.cookies(),{...s,internal:{...o.internal}})}}createRequestCookies(t){const r=new Headers;for(const n in t.headers)if(Array.isArray(t.headers[n]))for(const o of t.headers[n])r.append(n,o);else r.append(n,t.headers[n]??"");return new T_(r)}async startInteractiveLogin(t){return this.authClient.startInteractiveLogin(t)}async saveToSession(t,r,n){if(r&&n)if(r instanceof ge.NextRequest&&n instanceof ge.NextResponse)await this.sessionStore.set(r.cookies,n.cookies,t);else{const o=new Headers,s=new oi(o),a=n;await this.sessionStore.set(this.createRequestCookies(r),s,t);for(const[i,c]of o.entries())a.setHeader(i,c)}else try{await this.sessionStore.set(await Gr.cookies(),await Gr.cookies(),t)}catch{process.env.NODE_ENV==="development"&&console.warn("Failed to persist the updated token set. `getAccessToken()` was likely called from a Server Component which cannot set cookies.")}}validateAndExtractRequiredOptions(t){const r={domain:t.domain??process.env.AUTH0_DOMAIN,clientId:t.clientId??process.env.AUTH0_CLIENT_ID,appBaseUrl:t.appBaseUrl??process.env.APP_BASE_URL,secret:t.secret??process.env.AUTH0_SECRET},n=t.clientSecret??process.env.AUTH0_CLIENT_SECRET,o=t.clientAssertionSigningKey??process.env.AUTH0_CLIENT_ASSERTION_SIGNING_KEY,s=!!(n||o),a=Object.entries(r).filter(([,c])=>!c).map(([c])=>c);if(s||a.push("clientAuthentication"),a.length){const c={domain:"AUTH0_DOMAIN",clientId:"AUTH0_CLIENT_ID",appBaseUrl:"APP_BASE_URL",secret:"AUTH0_SECRET"};let u=`WARNING: Not all required options were provided when creating an instance of Auth0Client. Ensure to provide all missing options, either by passing it to the Auth0Client constructor, or by setting the corresponding environment variable.
169
+ `;a.forEach(l=>{l==="clientAuthentication"?u+=`Missing: clientAuthentication: Set either AUTH0_CLIENT_SECRET env var or AUTH0_CLIENT_ASSERTION_SIGNING_KEY env var, or pass clientSecret or clientAssertionSigningKey in options
170
+ `:c[l]?u+=`Missing: ${l}: Set ${c[l]} env var or pass ${l} in options
171
+ `:u+=`Missing: ${l}
172
+ `}),console.error(u.trim())}return{...r,clientSecret:n,clientAssertionSigningKey:o}}}const di=new oS({authorizationParameters:{scope:"openid profile email permissions",audience:`${process.env.AUTH0_AUDIENCE}`}});async function sS(){const e=await di.getAccessToken();return(e==null?void 0:e.token)||"No token available"}async function aS(e){try{const t=await di.middleware(e);if(t instanceof ge.NextResponse){const r=t.status;if(r===401||r===403||r===500){const n=new URL("/auth/login",e.url);return ge.NextResponse.redirect(n)}}return t}catch(t){if(t instanceof Error&&t.message==="Missing session"){const n=new URL("/auth/login",e.url);return ge.NextResponse.redirect(n)}const r=new URL("/auth/login",e.url);return ge.NextResponse.redirect(r)}}const iS=["/((?!_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt|api/auth).*)"];Pe.GLICloudProvider=s0,Pe.accessToken=sS,Pe.auth0=di,Pe.authMiddlewareMatcher=iS,Pe.handleAuthMiddleware=aS,Object.defineProperty(Pe,Symbol.toStringTag,{value:"Module"})});