@bluealba/pae-ui-react-core 4.0.1-feature-initial-feature-flags-poc-1242 → 4.0.1-feature-feature-flags-1243
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +40 -65
- package/dist/index.esm.js +2104 -2241
- package/dist/index.systemjs.js +46 -71
- package/dist/index.umd.js +43 -68
- package/dist/src/hooks/applications/ApplicationMenu.d.ts +0 -2
- package/dist/src/hooks/applications/useApplicationMenu.d.ts +3 -1
- package/dist/src/hooks/index.d.ts +0 -2
- package/package.json +1 -1
- package/dist/src/hooks/applications/useDocumentationMenuItems.d.ts +0 -4
- package/dist/src/hooks/applications/useModuleMenu.d.ts +0 -11
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";require('./index.css');var li=e=>{throw TypeError(e)};var uo=(e,t,n)=>t.has(e)||li("Cannot "+n);var b=(e,t,n)=>(uo(e,t,"read from private field"),n?n.call(e):t.get(e)),k=(e,t,n)=>t.has(e)?li("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),O=(e,t,n,r)=>(uo(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),$=(e,t,n)=>(uo(e,t,"access private method"),n);var Yn=(e,t,n,r)=>({set _(o){O(e,t,o,n)},get _(){return b(e,t,r)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),gr=require("single-spa"),
|
|
1
|
+
"use strict";require('./index.css');var li=e=>{throw TypeError(e)};var uo=(e,t,n)=>t.has(e)||li("Cannot "+n);var b=(e,t,n)=>(uo(e,t,"read from private field"),n?n.call(e):t.get(e)),k=(e,t,n)=>t.has(e)?li("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),O=(e,t,n,r)=>(uo(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),$=(e,t,n)=>(uo(e,t,"access private method"),n);var Yn=(e,t,n,r)=>({set _(o){O(e,t,o,n)},get _(){return b(e,t,r)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),gr=require("single-spa"),Aa=require("react-dom");function Oa(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 g=Oa(E),ja=Oa(Aa),ed={auth:{SESSION_EXPIRED:"platform:auth:session-expired"},apps:{APP_CLICKED:"platform:apps:app-clicked"},shell:{NAVBAR_STATE_CHANGED:"platform:shell:navbar-state-changed",MENU_STATE_CHANGED:"platform:shell:menu-state-changed"}},Rn="__PAE_GLOBAL_STATE__",Da="__PAE_REACTIVE_GLOBAL_STATE__",ka="__PAE_EXTENSIONS_POINTS_REGISTRY__",_o="__PAE_CUSTOMIZATIONS_LOADING_STATE_KEY__",td="/auth/logout",nd=(e,t)=>{const[n,r]=E.useState(t);return E.useEffect(()=>{const o=e.subscribe(s=>{r(s)});return()=>{o.unsubscribe()}},[r]),n},rd=(e,t,n)=>n.map((r,o)=>o===e?t(r):r),od=(e,t,n)=>rd(n.findIndex(e),t,n),Ro=(e,t)=>typeof e=="function"?e(t):e,La=(e,t)=>{const n=nd(e,t),r=E.useCallback(o=>{e.next(Ro(o,n))},[n]);return[n,r]},Br=()=>La(window[Da],window[Rn]),Mn=()=>Br()[0].catalog,sd=()=>{const e=Mn(),t=E.useCallback(r=>{window[Da].next({...window[Rn],catalog:Ro(r,e)})},[e]),n=E.useCallback((r,o)=>{t(s=>od(i=>i.name===r,i=>{var a;return{...i,ui:{...i.ui,customProps:Ro(o,((a=i.ui)==null?void 0:a.customProps)??{})}}},s))},[t]);return[e,t,n]},Ia=()=>{const[e,t]=E.useState(document.location.pathname);return E.useEffect(()=>{const n=()=>{t(window.location.pathname)};return window.addEventListener("popstate",n),()=>{window.removeEventListener("popstate",n)}},[t]),e};var id=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ad(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ma={exports:{}},Cn={},ui;function cd(){if(ui)return Cn;ui=1;/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.development.js
|
|
4
4
|
*
|
|
@@ -6,55 +6,30 @@
|
|
|
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
|
-
*/return function(){var e=E,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),w=Symbol.iterator,f="@@iterator";function y(v){if(v===null||typeof v!="object")return null;var P=w&&v[w]||v[f];return typeof P=="function"?P:null}var C=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(v){{for(var P=arguments.length,j=new Array(P>1?P-1:0),L=1;L<P;L++)j[L-1]=arguments[L];S("error",v,j)}}function S(v,P,j){{var L=C.ReactDebugCurrentFrame,V=L.getStackAddendum();V!==""&&(P+="%s",j=j.concat([V]));var G=j.map(function(H){return String(H)});G.unshift("Warning: "+P),Function.prototype.apply.call(console[v],console,G)}}var _=!1,R=!1,A=!1,T=!1,I=!1,M;M=Symbol.for("react.module.reference");function N(v){return!!(typeof v=="string"||typeof v=="function"||v===r||v===s||I||v===o||v===l||v===d||T||v===m||_||R||A||typeof v=="object"&&v!==null&&(v.$$typeof===h||v.$$typeof===p||v.$$typeof===i||v.$$typeof===a||v.$$typeof===c||v.$$typeof===M||v.getModuleId!==void 0))}function Q(v,P,j){var L=v.displayName;if(L)return L;var V=P.displayName||P.name||"";return V!==""?j+"("+V+")":j}function K(v){return v.displayName||"Context"}function W(v){if(v==null)return null;if(typeof v.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof v=="function")return v.displayName||v.name||null;if(typeof v=="string")return v;switch(v){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case d:return"SuspenseList"}if(typeof v=="object")switch(v.$$typeof){case a:var P=v;return K(P)+".Consumer";case i:var j=v;return K(j._context)+".Provider";case c:return Q(v,v.render,"ForwardRef");case p:var L=v.displayName||null;return L!==null?L:W(v.type)||"Memo";case h:{var V=v,G=V._payload,H=V._init;try{return W(H(G))}catch{return null}}}return null}var
|
|
10
|
-
`+Ht+v}}var Wt=!1,Ct;{var
|
|
9
|
+
*/return function(){var e=E,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),w=Symbol.iterator,f="@@iterator";function y(v){if(v===null||typeof v!="object")return null;var P=w&&v[w]||v[f];return typeof P=="function"?P:null}var C=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(v){{for(var P=arguments.length,j=new Array(P>1?P-1:0),L=1;L<P;L++)j[L-1]=arguments[L];S("error",v,j)}}function S(v,P,j){{var L=C.ReactDebugCurrentFrame,V=L.getStackAddendum();V!==""&&(P+="%s",j=j.concat([V]));var G=j.map(function(H){return String(H)});G.unshift("Warning: "+P),Function.prototype.apply.call(console[v],console,G)}}var _=!1,R=!1,A=!1,T=!1,I=!1,M;M=Symbol.for("react.module.reference");function N(v){return!!(typeof v=="string"||typeof v=="function"||v===r||v===s||I||v===o||v===l||v===d||T||v===m||_||R||A||typeof v=="object"&&v!==null&&(v.$$typeof===h||v.$$typeof===p||v.$$typeof===i||v.$$typeof===a||v.$$typeof===c||v.$$typeof===M||v.getModuleId!==void 0))}function Q(v,P,j){var L=v.displayName;if(L)return L;var V=P.displayName||P.name||"";return V!==""?j+"("+V+")":j}function K(v){return v.displayName||"Context"}function W(v){if(v==null)return null;if(typeof v.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof v=="function")return v.displayName||v.name||null;if(typeof v=="string")return v;switch(v){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case d:return"SuspenseList"}if(typeof v=="object")switch(v.$$typeof){case a:var P=v;return K(P)+".Consumer";case i:var j=v;return K(j._context)+".Provider";case c:return Q(v,v.render,"ForwardRef");case p:var L=v.displayName||null;return L!==null?L:W(v.type)||"Memo";case h:{var V=v,G=V._payload,H=V._init;try{return W(H(G))}catch{return null}}}return null}var z=Object.assign,ne=0,Z,X,F,re,ye,bt,Vn;function qn(){}qn.__reactDisabledLog=!0;function ro(){{if(ne===0){Z=console.log,X=console.info,F=console.warn,re=console.error,ye=console.group,bt=console.groupCollapsed,Vn=console.groupEnd;var v={configurable:!0,enumerable:!0,value:qn,writable:!0};Object.defineProperties(console,{info:v,log:v,warn:v,error:v,group:v,groupCollapsed:v,groupEnd:v})}ne++}}function oo(){{if(ne--,ne===0){var v={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:z({},v,{value:Z}),info:z({},v,{value:X}),warn:z({},v,{value:F}),error:z({},v,{value:re}),group:z({},v,{value:ye}),groupCollapsed:z({},v,{value:bt}),groupEnd:z({},v,{value:Vn})})}ne<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var bn=C.ReactCurrentDispatcher,Ht;function wt(v,P,j){{if(Ht===void 0)try{throw Error()}catch(V){var L=V.stack.trim().match(/\n( *(at )?)/);Ht=L&&L[1]||""}return`
|
|
10
|
+
`+Ht+v}}var Wt=!1,Ct;{var zn=typeof WeakMap=="function"?WeakMap:Map;Ct=new zn}function wn(v,P){if(!v||Wt)return"";{var j=Ct.get(v);if(j!==void 0)return j}var L;Wt=!0;var V=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var G;G=bn.current,bn.current=null,ro();try{if(P){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(de){L=de}Reflect.construct(v,[],H)}else{try{H.call()}catch(de){L=de}v.call(H.prototype)}}else{try{throw Error()}catch(de){L=de}v()}}catch(de){if(de&&L&&typeof de.stack=="string"){for(var B=de.stack.split(`
|
|
11
11
|
`),ae=L.stack.split(`
|
|
12
12
|
`),ee=B.length-1,te=ae.length-1;ee>=1&&te>=0&&B[ee]!==ae[te];)te--;for(;ee>=1&&te>=0;ee--,te--)if(B[ee]!==ae[te]){if(ee!==1||te!==1)do if(ee--,te--,te<0||B[ee]!==ae[te]){var Ce=`
|
|
13
|
-
`+B[ee].replace(" at new "," at ");return v.displayName&&Ce.includes("<anonymous>")&&(Ce=Ce.replace("<anonymous>",v.displayName)),typeof v=="function"&&Ct.set(v,Ce),Ce}while(ee>=1&&te>=0);break}}}finally{Wt=!1,
|
|
13
|
+
`+B[ee].replace(" at new "," at ");return v.displayName&&Ce.includes("<anonymous>")&&(Ce=Ce.replace("<anonymous>",v.displayName)),typeof v=="function"&&Ct.set(v,Ce),Ce}while(ee>=1&&te>=0);break}}}finally{Wt=!1,bn.current=G,oo(),Error.prepareStackTrace=V}var zt=v?v.displayName||v.name:"",St=zt?wt(zt):"";return typeof v=="function"&&Ct.set(v,St),St}function xt(v,P,j){return wn(v,!1)}function Gn(v){var P=v.prototype;return!!(P&&P.isReactComponent)}function Vt(v,P,j){if(v==null)return"";if(typeof v=="function")return wn(v,Gn(v));if(typeof v=="string")return wt(v);switch(v){case l:return wt("Suspense");case d:return wt("SuspenseList")}if(typeof v=="object")switch(v.$$typeof){case c:return xt(v.render);case p:return Vt(v.type,P,j);case h:{var L=v,V=L._payload,G=L._init;try{return Vt(G(V),P,j)}catch{}}}return""}var Et=Object.prototype.hasOwnProperty,Qn={},Kn=C.ReactDebugCurrentFrame;function Ue(v){if(v){var P=v._owner,j=Vt(v.type,v._source,P?P.type:null);Kn.setExtraStackFrame(j)}else Kn.setExtraStackFrame(null)}function Du(v,P,j,L,V){{var G=Function.call.bind(Et);for(var H in v)if(G(v,H)){var B=void 0;try{if(typeof v[H]!="function"){var ae=Error((L||"React class")+": "+j+" type `"+H+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof v[H]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ae.name="Invariant Violation",ae}B=v[H](P,H,L,j,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ee){B=ee}B&&!(B instanceof Error)&&(Ue(V),x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",L||"React class",j,H,typeof B),Ue(null)),B instanceof Error&&!(B.message in Qn)&&(Qn[B.message]=!0,Ue(V),x("Failed %s type: %s",j,B.message),Ue(null))}}}var ku=Array.isArray;function so(v){return ku(v)}function Lu(v){{var P=typeof Symbol=="function"&&Symbol.toStringTag,j=P&&v[Symbol.toStringTag]||v.constructor.name||"Object";return j}}function Iu(v){try{return Zs(v),!1}catch{return!0}}function Zs(v){return""+v}function Xs(v){if(Iu(v))return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Lu(v)),Zs(v)}var Js=C.ReactCurrentOwner,Mu={key:!0,ref:!0,__self:!0,__source:!0},ei,ti;function Nu(v){if(Et.call(v,"ref")){var P=Object.getOwnPropertyDescriptor(v,"ref").get;if(P&&P.isReactWarning)return!1}return v.ref!==void 0}function $u(v){if(Et.call(v,"key")){var P=Object.getOwnPropertyDescriptor(v,"key").get;if(P&&P.isReactWarning)return!1}return v.key!==void 0}function Fu(v,P){typeof v.ref=="string"&&Js.current}function Bu(v,P){{var j=function(){ei||(ei=!0,x("%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://reactjs.org/link/special-props)",P))};j.isReactWarning=!0,Object.defineProperty(v,"key",{get:j,configurable:!0})}}function Uu(v,P){{var j=function(){ti||(ti=!0,x("%s: `ref` 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://reactjs.org/link/special-props)",P))};j.isReactWarning=!0,Object.defineProperty(v,"ref",{get:j,configurable:!0})}}var Hu=function(v,P,j,L,V,G,H){var B={$$typeof:t,type:v,key:P,ref:j,props:H,_owner:G};return B._store={},Object.defineProperty(B._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(B,"_self",{configurable:!1,enumerable:!1,writable:!1,value:L}),Object.defineProperty(B,"_source",{configurable:!1,enumerable:!1,writable:!1,value:V}),Object.freeze&&(Object.freeze(B.props),Object.freeze(B)),B};function Wu(v,P,j,L,V){{var G,H={},B=null,ae=null;j!==void 0&&(Xs(j),B=""+j),$u(P)&&(Xs(P.key),B=""+P.key),Nu(P)&&(ae=P.ref,Fu(P,V));for(G in P)Et.call(P,G)&&!Mu.hasOwnProperty(G)&&(H[G]=P[G]);if(v&&v.defaultProps){var ee=v.defaultProps;for(G in ee)H[G]===void 0&&(H[G]=ee[G])}if(B||ae){var te=typeof v=="function"?v.displayName||v.name||"Unknown":v;B&&Bu(H,te),ae&&Uu(H,te)}return Hu(v,B,ae,V,L,Js.current,H)}}var io=C.ReactCurrentOwner,ni=C.ReactDebugCurrentFrame;function qt(v){if(v){var P=v._owner,j=Vt(v.type,v._source,P?P.type:null);ni.setExtraStackFrame(j)}else ni.setExtraStackFrame(null)}var ao;ao=!1;function co(v){return typeof v=="object"&&v!==null&&v.$$typeof===t}function ri(){{if(io.current){var v=W(io.current.type);if(v)return`
|
|
14
14
|
|
|
15
|
-
Check the render method of \``+v+"`."}return""}}function
|
|
15
|
+
Check the render method of \``+v+"`."}return""}}function Vu(v){return""}var oi={};function qu(v){{var P=ri();if(!P){var j=typeof v=="string"?v:v.displayName||v.name;j&&(P=`
|
|
16
16
|
|
|
17
|
-
Check the top-level render call using <`+j+">.")}return P}}function si(v,P){{if(!v._store||v._store.validated||v.key!=null)return;v._store.validated=!0;var j=
|
|
17
|
+
Check the top-level render call using <`+j+">.")}return P}}function si(v,P){{if(!v._store||v._store.validated||v.key!=null)return;v._store.validated=!0;var j=qu(P);if(oi[j])return;oi[j]=!0;var L="";v&&v._owner&&v._owner!==io.current&&(L=" It was passed a child from "+W(v._owner.type)+"."),qt(v),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',j,L),qt(null)}}function ii(v,P){{if(typeof v!="object")return;if(so(v))for(var j=0;j<v.length;j++){var L=v[j];co(L)&&si(L,P)}else if(co(v))v._store&&(v._store.validated=!0);else if(v){var V=y(v);if(typeof V=="function"&&V!==v.entries)for(var G=V.call(v),H;!(H=G.next()).done;)co(H.value)&&si(H.value,P)}}}function zu(v){{var P=v.type;if(P==null||typeof P=="string")return;var j;if(typeof P=="function")j=P.propTypes;else if(typeof P=="object"&&(P.$$typeof===c||P.$$typeof===p))j=P.propTypes;else return;if(j){var L=W(P);Du(j,v.props,"prop",L,v)}else if(P.PropTypes!==void 0&&!ao){ao=!0;var V=W(P);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",V||"Unknown")}typeof P.getDefaultProps=="function"&&!P.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Gu(v){{for(var P=Object.keys(v.props),j=0;j<P.length;j++){var L=P[j];if(L!=="children"&&L!=="key"){qt(v),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",L),qt(null);break}}v.ref!==null&&(qt(v),x("Invalid attribute `ref` supplied to `React.Fragment`."),qt(null))}}var ai={};function ci(v,P,j,L,V,G){{var H=N(v);if(!H){var B="";(v===void 0||typeof v=="object"&&v!==null&&Object.keys(v).length===0)&&(B+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ae=Vu();ae?B+=ae:B+=ri();var ee;v===null?ee="null":so(v)?ee="array":v!==void 0&&v.$$typeof===t?(ee="<"+(W(v.type)||"Unknown")+" />",B=" Did you accidentally export a JSX literal instead of a component?"):ee=typeof v,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ee,B)}var te=Wu(v,P,j,V,G);if(te==null)return te;if(H){var Ce=P.children;if(Ce!==void 0)if(L)if(so(Ce)){for(var zt=0;zt<Ce.length;zt++)ii(Ce[zt],v);Object.freeze&&Object.freeze(Ce)}else x("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 ii(Ce,v)}if(Et.call(P,"key")){var St=W(v),de=Object.keys(P).filter(function(Ju){return Ju!=="key"}),lo=de.length>0?"{key: someKey, "+de.join(": ..., ")+": ...}":"{key: someKey}";if(!ai[St+lo]){var Xu=de.length>0?"{"+de.join(": ..., ")+": ...}":"{}";x(`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} />`,lo,St,
|
|
23
|
-
* @license lucide-react v0.511.0 - ISC
|
|
24
|
-
*
|
|
25
|
-
* This source code is licensed under the ISC license.
|
|
26
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/const Rd=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Td=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),di=e=>{const t=Td(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ja=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Pd=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
28
|
-
* @license lucide-react v0.511.0 - ISC
|
|
29
|
-
*
|
|
30
|
-
* This source code is licensed under the ISC license.
|
|
31
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/var Ad={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"};/**
|
|
33
|
-
* @license lucide-react v0.511.0 - ISC
|
|
34
|
-
*
|
|
35
|
-
* This source code is licensed under the ISC license.
|
|
36
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/const Od=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},c)=>E.createElement("svg",{ref:c,...Ad,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ja("lucide",o),...!s&&!Pd(a)&&{"aria-hidden":"true"},...a},[...i.map(([l,d])=>E.createElement(l,d)),...Array.isArray(s)?s:[s]]));/**
|
|
38
|
-
* @license lucide-react v0.511.0 - ISC
|
|
39
|
-
*
|
|
40
|
-
* This source code is licensed under the ISC license.
|
|
41
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/const jd=(e,t)=>{const n=E.forwardRef(({className:r,...o},s)=>E.createElement(Od,{ref:s,iconNode:t,className:Ja(`lucide-${Rd(di(e))}`,`lucide-${e}`,r),...o}));return n.displayName=di(e),n};/**
|
|
43
|
-
* @license lucide-react v0.511.0 - ISC
|
|
44
|
-
*
|
|
45
|
-
* This source code is licensed under the ISC license.
|
|
46
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const Dd=[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["path",{d:"M8 11h8",key:"vwpz6n"}],["path",{d:"M8 7h6",key:"1f0q6e"}]],kd=jd("book-text",Dd),ec=e=>{const t=mn();return E.useMemo(()=>{if(!e)return[];const n=t.filter(o=>o.type==="documentation"&&o.application===e.name),r=Xa(e.operations||[]);return n.filter(o=>{var s,i;return(i=(s=o.authorization)==null?void 0:s.operations)!=null&&i.length?r(o.authorization.operations):!0}).map(o=>{var s;return{label:o.displayName,externalUrl:o.baseUrl,target:"_blank",align:"bottom",Icon:E.createElement(kd,{size:20}),operations:((s=o.authorization)==null?void 0:s.operations)||[]}})},[t,e])},Ld=e=>{const{menu:t,loading:n}=Za(e),r=ec(e),o=E.useMemo(()=>[...t,...r],[t,r]);return{loading:n,menu:o}};function Y(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function _t(e){return function t(n){return arguments.length===0||Y(n)?t:e.apply(this,arguments)}}function et(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return Y(n)?t:_t(function(o){return e(n,o)});default:return Y(n)&&Y(r)?t:Y(n)?_t(function(o){return e(o,r)}):Y(r)?_t(function(o){return e(n,o)}):e(n,r)}}}function ls(e){return function t(n,r,o){switch(arguments.length){case 0:return t;case 1:return Y(n)?t:et(function(s,i){return e(n,s,i)});case 2:return Y(n)&&Y(r)?t:Y(n)?et(function(s,i){return e(s,r,i)}):Y(r)?et(function(s,i){return e(n,s,i)}):_t(function(s){return e(n,r,s)});default:return Y(n)&&Y(r)&&Y(o)?t:Y(n)&&Y(r)?et(function(s,i){return e(s,i,o)}):Y(n)&&Y(o)?et(function(s,i){return e(s,r,i)}):Y(r)&&Y(o)?et(function(s,i){return e(n,s,i)}):Y(n)?_t(function(s){return e(s,r,o)}):Y(r)?_t(function(s){return e(n,s,o)}):Y(o)?_t(function(s){return e(n,r,s)}):e(n,r,o)}}}function Zn(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function fi(e){return Object.prototype.toString.call(e)==="[object Object]"}var Id=ls(function(t,n,r){var o=t(n),s=t(r);return o>s?-1:o<s?1:0}),Md=ls(function(t,n,r){var o={},s;n=n||{},r=r||{};for(s in n)Zn(s,n)&&(o[s]=Zn(s,r)?t(s,n[s],r[s]):n[s]);for(s in r)Zn(s,r)&&!Zn(s,o)&&(o[s]=r[s]);return o}),Nd=ls(function e(t,n,r){return Md(function(o,s,i){return fi(s)&&fi(i)?e(t,s,i):t(o,s,i)},n,r)}),$d=et(function(t,n){return Nd(function(r,o,s){return s},t,n)}),Fd=et(function(t,n){return Array.prototype.slice.call(n,0).sort(function(r,o){for(var s=0,i=0;s===0&&i<t.length;)s=t[i](r,o),i+=1;return s})});const us=()=>{const e=Ma(),t=Qa();return E.useMemo(()=>Bd(e,t),[e,t])},Bd=(e,t)=>Fd([Id(Ud)],t).find(n=>n.route&&e.startsWith(n.route)),Ud=e=>{var t;return((t=e==null?void 0:e.route)==null?void 0:t.length)||-1},tc=()=>{var e;return(e=us())==null?void 0:e.name},Hd=()=>{const e=us(),t=Ka(e);return Wr(t==null?void 0:t.name)},nc=(e,t)=>{const r=mn().find(o=>o.name===e);if(!r){if(t)return null;throw new Error(`Service with name [${e}] not available in the catalog`)}return r.baseUrl},ds=(e,t)=>{const n=nc(e,!!t)??t;return E.useCallback((r,o)=>{const i={Accept:"application/json",...(o==null?void 0:o.body)instanceof FormData?{}:{"Content-Type":"application/json"},...o==null?void 0:o.headers};return fetch(Wd(`${n}${r}`),{...o,headers:i})},[n])},Wd=e=>e.replace(/\/+/g,"/"),Vd=(e,t)=>n=>({timestamp:new Date(new Date().toUTCString()).toISOString(),module:t.name,moduleVersion:t.version,application:t.application,user:e.username,...n}),zd=(e,t,n)=>async r=>{if(r.length===0)throw new Error("Invalid call to trackEvents with an empty array of events!");const o=await e("/event",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r.map(Vd(t,n)))});if(!o.ok)throw new Error(`Error publishing habits event ${o.statusText}`)},qd="@bluealba/pae-habits-service",rc=()=>{const{authUser:e}=Ur(),t=Nn(),n=ds(qd);return E.useCallback(zd(n,e,t),[n,e,t])},Gd=()=>{const e=rc();return E.useCallback((t,n)=>e([{name:t,data:n}]),[e])},oc=e=>{const t=Nn(),n=window[La],[r,o]=E.useState(null);return E.useEffect(()=>n.defineExtensionPoint(t,e,s=>{o(()=>s)}),[o]),r},sc=(e,t,n)=>{E.useEffect(()=>window[La].setExtensionPoint(e,t,n),[])},ic=(e,t)=>{E.useEffect(()=>(window.addEventListener(e,t),()=>window.removeEventListener(e,t)),[e,t])},ac=e=>{const{cssCustomizationLoadingDelay:t=1e3}=Wa();E.useEffect(()=>{if(!e)return;const n=document.createElement("style");return setTimeout(()=>{n.innerHTML=e,document.head.append(n)},t),()=>n&&n.remove()},[e])},Qd=e=>{var t;return(t=e.split(/[#?]/)[0].split(".").pop())==null?void 0:t.trim()},Kd={woff2:"woff2",woff:"woff",ttf:"truetype",otf:"opentype",eot:"embedded-opentype",svg:"svg"},Yd=e=>{const t=Qd(e);return t?Kd[t]:void 0},Zd=(e,t)=>{const n=t??Yd(e);return n?`format(${n})`:""};function cc(e){const[t,n]=E.useState(!1);return E.useEffect(()=>{if(!(e!=null&&e.length))return;const r=document.createElement("style");r.setAttribute("data-generated-fonts","true");const o=e.flatMap(({fontFamily:i,variants:a})=>a.map(({path:c,fontWeight:l,format:d})=>`
|
|
22
|
+
<%s key={someKey} {...props} />`,lo,St,Xu,St),ai[St+lo]=!0}}return v===r?Gu(te):zu(te),te}}function Qu(v,P,j){return ci(v,P,j,!0)}function Ku(v,P,j){return ci(v,P,j,!1)}var Yu=Ku,Zu=Qu;Cn.Fragment=r,Cn.jsx=Yu,Cn.jsxs=Zu}(),Cn}Ma.exports=cd();var u=Ma.exports;const Na=E.createContext(null),$a=({module:e,children:t})=>u.jsx(Na.Provider,{value:e,children:t});$a.displayName="PAEModule";const Nn=()=>{const e=E.useContext(Na);if(!e)throw new Error("Module metadata was not setup yet !!");return e};function is(){if(!window[Rn])throw new Error("PAE Global state not found.");return window[Rn]}const as=()=>{const{authUser:{applications:e}}=is();return e||[]},Fa=e=>as().filter(t=>t.isGlobal||t.name===e).flatMap(t=>t.operations),Ba=()=>{const{application:e}=Nn();return E.useMemo(()=>Fa(e),[e])},Ua=e=>(...t)=>t.every(n=>e.some(r=>r.name===n)),Ur=()=>{const[{authUser:e}]=Br(),t=Ba();return{authUser:e,hasAccess:E.useMemo(()=>Ua(t),[t])}},ld=()=>{const{authUser:e}=Ur();return!e||e.id==="anon"},Ha=()=>{var e;return((e=Nn().ui)==null?void 0:e.customProps)??{}},cs=e=>{const t=Mn();return E.useMemo(()=>{const n=t.find(r=>r.name===e);if(!n)throw new Error(`Could not find the module [${e}] in the local catalog !`);return n},[t,e])},Wa=e=>{var t,n;return((n=(t=cs(e))==null?void 0:t.ui)==null?void 0:n.customProps)??{}},ud=e=>e.replace(/\/+/g,"/"),dd=(e,t="only-base-path")=>{const{apiDocs:n,health:r,version:o,changelog:s}=(e==null?void 0:e.commonPaths)||{},i=(a,c="")=>{if(a===void 0&&!c)return;const l=a??c;if(t==="only-base-path")return l;const d=ud(`${e.baseUrl}/${l}`);return t==="with-module-base"?d:`${document.location.origin}${d}`};return{apiDocsPath:i(n,"/api-docs-json"),healthPath:i(r,"/health"),versionPath:i(o,"/version"),changelogPath:i(s,"/changelog")}};function fd(){window.open(td,"_self")}const hd=e=>gr.navigateToUrl(e),pd=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z]{2,}$/,md=e=>pd.test(e),gd=(e,t=2)=>{if(!e)return"";const n=e.split(" ");return n.length===1?n.join("").slice(0,t):n.map(r=>r[0]).join("").slice(0,t)},Va=e=>e.type==="app",yd=e=>e.modules.some(Va)&&e.route&&e.route!=="/",qa=e=>{const{catalog:t}=is();return Hr(t.filter(n=>n.application===e))},Hr=(e=[])=>e.find(t=>{var n;return Va(t)&&((n=t.ui)==null?void 0:n.route)!=="/"}),za=()=>{const e=Mn();return E.useMemo(()=>as().map(n=>{var s,i,a;const r=vd(e,n.name),o=Hr(r);return{name:n.name,displayName:((i=(s=o==null?void 0:o.ui)==null?void 0:s.customProps)==null?void 0:i.overrideApplicationDisplayName)??n.displayName,modules:r,route:(a=o==null?void 0:o.ui)==null?void 0:a.route,roles:[],operations:n.operations}}),[e])},vd=(e,t)=>e.filter(n=>n.application===t)||[],Ga=()=>{const e=za();return E.useMemo(()=>e.filter(yd),[e])},Qa=e=>E.useMemo(()=>e?qa(e.name):void 0,[e]),ht=new Map,bd=e=>{try{const{catalog:t}=is(),n=t.find(r=>r.name===e);return n!=null&&n.version?`${e}@${n.version}`:e}catch{return e}},Wr=e=>{const[t,n]=E.useState(null);return E.useEffect(()=>{(async()=>{if(!e){n(null);return}try{const o=bd(e);if(ht.has(o)){const i=ht.get(o);n(i);return}const s=await System.import(e);ht.set(o,s),n(s)}catch(o){console.error(`Error importing module ${e}: ${o.message}`),n(null)}})()},[e,n]),t},wd=e=>{e?(Array.from(ht.keys()).filter(n=>n.startsWith(e)).forEach(n=>ht.delete(n)),console.log(`[useApplicationJSModule] Cleared cache for module: ${e}`)):(ht.clear(),console.log("[useApplicationJSModule] Cleared all module cache"))};typeof window<"u"&&(window.PAE={...window.PAE,clearModuleCache:wd,getModuleCacheSize:()=>ht.size,getModuleCacheKeys:()=>Array.from(ht.keys())});const Ka=e=>{const t=typeof e=="string"?qa(e):Hr(e==null?void 0:e.modules),n=Wr(t==null?void 0:t.name);return n==null?void 0:n.icon},Cd=e=>{const t=Hr(e==null?void 0:e.modules),n=Wr(t==null?void 0:t.name),[r,o]=E.useState(!1),[s,i]=E.useState({}),a=async()=>(typeof(n==null?void 0:n.menu)=="function"?await n.menu():n==null?void 0:n.menu)||[],c=async()=>{if(!(n!=null&&n.menu))return[];o(!0);const p=xd((e==null?void 0:e.operations)||[]),h=(await a()).map(m=>{const{operations:w,items:f,path:y}=m;if(w!=null&&w.length&&!p(w))return null;const C=(f||[]).filter(x=>{var S;return!((S=x==null?void 0:x.operations)!=null&&S.length)||p(x.operations)});return!C.length&&!y?null:{...m,items:C}}).filter(Boolean);return o(!1),h},l=async()=>{const p=await c();e&&i(h=>({...h,[e.name]:p}))};E.useEffect(()=>{l()},[n==null?void 0:n.menu]);const d=E.useMemo(()=>e?s[e.name]||[]:[],[s,e]);return{loading:r,menu:d}},xd=e=>t=>t.every(n=>e.some(r=>r.name===n));function Y(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function _t(e){return function t(n){return arguments.length===0||Y(n)?t:e.apply(this,arguments)}}function et(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return Y(n)?t:_t(function(o){return e(n,o)});default:return Y(n)&&Y(r)?t:Y(n)?_t(function(o){return e(o,r)}):Y(r)?_t(function(o){return e(n,o)}):e(n,r)}}}function ls(e){return function t(n,r,o){switch(arguments.length){case 0:return t;case 1:return Y(n)?t:et(function(s,i){return e(n,s,i)});case 2:return Y(n)&&Y(r)?t:Y(n)?et(function(s,i){return e(s,r,i)}):Y(r)?et(function(s,i){return e(n,s,i)}):_t(function(s){return e(n,r,s)});default:return Y(n)&&Y(r)&&Y(o)?t:Y(n)&&Y(r)?et(function(s,i){return e(s,i,o)}):Y(n)&&Y(o)?et(function(s,i){return e(s,r,i)}):Y(r)&&Y(o)?et(function(s,i){return e(n,s,i)}):Y(n)?_t(function(s){return e(s,r,o)}):Y(r)?_t(function(s){return e(n,s,o)}):Y(o)?_t(function(s){return e(n,r,s)}):e(n,r,o)}}}function Zn(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function di(e){return Object.prototype.toString.call(e)==="[object Object]"}var Ed=ls(function(t,n,r){var o=t(n),s=t(r);return o>s?-1:o<s?1:0}),Sd=ls(function(t,n,r){var o={},s;n=n||{},r=r||{};for(s in n)Zn(s,n)&&(o[s]=Zn(s,r)?t(s,n[s],r[s]):n[s]);for(s in r)Zn(s,r)&&!Zn(s,o)&&(o[s]=r[s]);return o}),_d=ls(function e(t,n,r){return Sd(function(o,s,i){return di(s)&&di(i)?e(t,s,i):t(o,s,i)},n,r)}),Rd=et(function(t,n){return _d(function(r,o,s){return s},t,n)}),Td=et(function(t,n){return Array.prototype.slice.call(n,0).sort(function(r,o){for(var s=0,i=0;s===0&&i<t.length;)s=t[i](r,o),i+=1;return s})});const us=()=>{const e=Ia(),t=Ga();return E.useMemo(()=>Pd(e,t),[e,t])},Pd=(e,t)=>Td([Ed(Ad)],t).find(n=>n.route&&e.startsWith(n.route)),Ad=e=>{var t;return((t=e==null?void 0:e.route)==null?void 0:t.length)||-1},Ya=()=>{var e;return(e=us())==null?void 0:e.name},Od=()=>{const e=us(),t=Qa(e);return Wr(t==null?void 0:t.name)},Za=(e,t)=>{const r=Mn().find(o=>o.name===e);if(!r){if(t)return null;throw new Error(`Service with name [${e}] not available in the catalog`)}return r.baseUrl},ds=(e,t)=>{const n=Za(e,!!t)??t;return E.useCallback((r,o)=>{const i={Accept:"application/json",...(o==null?void 0:o.body)instanceof FormData?{}:{"Content-Type":"application/json"},...o==null?void 0:o.headers};return fetch(jd(`${n}${r}`),{...o,headers:i})},[n])},jd=e=>e.replace(/\/+/g,"/"),Dd=(e,t)=>n=>({timestamp:new Date(new Date().toUTCString()).toISOString(),module:t.name,moduleVersion:t.version,application:t.application,user:e.username,...n}),kd=(e,t,n)=>async r=>{if(r.length===0)throw new Error("Invalid call to trackEvents with an empty array of events!");const o=await e("/event",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r.map(Dd(t,n)))});if(!o.ok)throw new Error(`Error publishing habits event ${o.statusText}`)},Ld="@bluealba/pae-habits-service",Xa=()=>{const{authUser:e}=Ur(),t=Nn(),n=ds(Ld);return E.useCallback(kd(n,e,t),[n,e,t])},Id=()=>{const e=Xa();return E.useCallback((t,n)=>e([{name:t,data:n}]),[e])},Ja=e=>{const t=Nn(),n=window[ka],[r,o]=E.useState(null);return E.useEffect(()=>n.defineExtensionPoint(t,e,s=>{o(()=>s)}),[o]),r},ec=(e,t,n)=>{E.useEffect(()=>window[ka].setExtensionPoint(e,t,n),[])},tc=(e,t)=>{E.useEffect(()=>(window.addEventListener(e,t),()=>window.removeEventListener(e,t)),[e,t])},nc=e=>{const{cssCustomizationLoadingDelay:t=1e3}=Ha();E.useEffect(()=>{if(!e)return;const n=document.createElement("style");return setTimeout(()=>{n.innerHTML=e,document.head.append(n)},t),()=>n&&n.remove()},[e])},Md=e=>{var t;return(t=e.split(/[#?]/)[0].split(".").pop())==null?void 0:t.trim()},Nd={woff2:"woff2",woff:"woff",ttf:"truetype",otf:"opentype",eot:"embedded-opentype",svg:"svg"},$d=e=>{const t=Md(e);return t?Nd[t]:void 0},Fd=(e,t)=>{const n=t??$d(e);return n?`format(${n})`:""};function rc(e){const[t,n]=E.useState(!1);return E.useEffect(()=>{if(!(e!=null&&e.length))return;const r=document.createElement("style");r.setAttribute("data-generated-fonts","true");const o=e.flatMap(({fontFamily:i,variants:a})=>a.map(({path:c,fontWeight:l,format:d})=>`
|
|
48
23
|
@font-face {
|
|
49
24
|
font-family: "${i}";
|
|
50
|
-
src: url("${c}") ${
|
|
25
|
+
src: url("${c}") ${Fd(c,d)};
|
|
51
26
|
font-weight: ${l};
|
|
52
27
|
font-style: normal;
|
|
53
28
|
}
|
|
54
29
|
`)).join(`
|
|
55
|
-
`);return r.innerHTML=o,document.head.appendChild(r),(async()=>{try{await Promise.all(e.flatMap(({fontFamily:i,variants:a})=>a.map(({fontWeight:c})=>document.fonts.load(`normal ${c} 1em "${i}"`))))}finally{n(!0)}})(),()=>{document.head.removeChild(r)}},[e]),E.useEffect(()=>{!t&&!(e!=null&&e.length)&&n(!0)},[e,t]),{fontsLoaded:t}}var To=function(e,t){return To=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},To(e,t)};function $n(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");To(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Le=function(){return Le=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},Le.apply(this,arguments)};function
|
|
30
|
+
`);return r.innerHTML=o,document.head.appendChild(r),(async()=>{try{await Promise.all(e.flatMap(({fontFamily:i,variants:a})=>a.map(({fontWeight:c})=>document.fonts.load(`normal ${c} 1em "${i}"`))))}finally{n(!0)}})(),()=>{document.head.removeChild(r)}},[e]),E.useEffect(()=>{!t&&!(e!=null&&e.length)&&n(!0)},[e,t]),{fontsLoaded:t}}var To=function(e,t){return To=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},To(e,t)};function $n(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");To(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Le=function(){return Le=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},Le.apply(this,arguments)};function oc(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 Po(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ao(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function Tr(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))}function ze(e){return typeof e=="function"}function sc(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var fo=sc(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
56
31
|
`+n.map(function(r,o){return o+1+") "+r.toString()}).join(`
|
|
57
|
-
`):"",this.name="UnsubscriptionError",this.errors=n}});function Oo(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Vr=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,o,s;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var a=Po(i),c=a.next();!c.done;c=a.next()){var l=c.value;l.remove(this)}}catch(f){t={error:f}}finally{try{c&&!c.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else i.remove(this);var d=this.initialTeardown;if(qe(d))try{d()}catch(f){s=f instanceof fo?f.errors:[f]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var h=Po(p),m=h.next();!m.done;m=h.next()){var w=m.value;try{hi(w)}catch(f){s=s??[],f instanceof fo?s=Tr(Tr([],Ao(s)),Ao(f.errors)):s.push(f)}}}catch(f){r={error:f}}finally{try{m&&!m.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}}if(s)throw new fo(s)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)hi(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&Oo(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&Oo(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),dc=Vr.EMPTY;function fc(e){return e instanceof Vr||e&&"closed"in e&&qe(e.remove)&&qe(e.add)&&qe(e.unsubscribe)}function hi(e){qe(e)?e():e.unsubscribe()}var Xd={Promise:void 0},Jd={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Tr([e,t],Ao(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function ef(e){Jd.setTimeout(function(){throw e})}function pi(){}function yr(e){e()}var hc=function(e){$n(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,fc(n)&&n.add(r)):r.destination=rf,r}return t.create=function(n,r,o){return new jo(n,r,o)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Vr),tf=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){Xn(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){Xn(r)}else Xn(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){Xn(n)}},e}(),jo=function(e){$n(t,e);function t(n,r,o){var s=e.call(this)||this,i;return qe(n)||!n?i={next:n??void 0,error:r??void 0,complete:o??void 0}:i=n,s.destination=new tf(i),s}return t}(hc);function Xn(e){ef(e)}function nf(e){throw e}var rf={closed:!0,next:pi,error:nf,complete:pi},of=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function sf(e){return e}function af(e){return e.length===0?sf:e.length===1?e[0]:function(n){return e.reduce(function(r,o){return o(r)},n)}}var mi=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var o=this,s=lf(t)?t:new jo(t,n,r);return yr(function(){var i=o,a=i.operator,c=i.source;s.add(a?a.call(s,c):c?o._subscribe(s):o._trySubscribe(s))}),s},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=gi(n),new n(function(o,s){var i=new jo({next:function(a){try{t(a)}catch(c){s(c),i.unsubscribe()}},error:s,complete:o});r.subscribe(i)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[of]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return af(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=gi(t),new t(function(r,o){var s;n.subscribe(function(i){return s=i},function(i){return o(i)},function(){return r(s)})})},e.create=function(t){return new e(t)},e}();function gi(e){var t;return(t=e??Xd.Promise)!==null&&t!==void 0?t:Promise}function cf(e){return e&&qe(e.next)&&qe(e.error)&&qe(e.complete)}function lf(e){return e&&e instanceof hc||cf(e)&&fc(e)}var uf=uc(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),pc=function(e){$n(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new yi(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new uf},t.prototype.next=function(n){var r=this;yr(function(){var o,s;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var i=Po(r.currentObservers),a=i.next();!a.done;a=i.next()){var c=a.value;c.next(n)}}catch(l){o={error:l}}finally{try{a&&!a.done&&(s=i.return)&&s.call(i)}finally{if(o)throw o.error}}}})},t.prototype.error=function(n){var r=this;yr(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var o=r.observers;o.length;)o.shift().error(n)}})},t.prototype.complete=function(){var n=this;yr(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,o=this,s=o.hasError,i=o.isStopped,a=o.observers;return s||i?dc:(this.currentObservers=null,a.push(n),new Vr(function(){r.currentObservers=null,Oo(a,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,o=r.hasError,s=r.thrownError,i=r.isStopped;o?n.error(s):i&&n.complete()},t.prototype.asObservable=function(){var n=new mi;return n.source=this,n},t.create=function(n,r){return new yi(n,r)},t}(mi),yi=function(e){$n(t,e);function t(n,r){var o=e.call(this)||this;return o.destination=n,o.source=r,o}return t.prototype.next=function(n){var r,o;(o=(r=this.destination)===null||r===void 0?void 0:r.next)===null||o===void 0||o.call(r,n)},t.prototype.error=function(n){var r,o;(o=(r=this.destination)===null||r===void 0?void 0:r.error)===null||o===void 0||o.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,o;return(o=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&o!==void 0?o:dc},t}(pc),df=function(e){$n(t,e);function t(n){var r=e.call(this)||this;return r._value=n,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(n){var r=e.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},t.prototype.getValue=function(){var n=this,r=n.hasError,o=n.thrownError,s=n._value;if(r)throw o;return this._throwIfClosed(),s},t.prototype.next=function(n){e.prototype.next.call(this,this._value=n)},t}(pc);const ff=e=>{const{fontsLoaded:t}=cc(e.fonts);ac(e.styleSheet);const n=()=>{const r=new df(!0);window[_o]=r};E.useEffect(()=>{t&&window[_o].next(!1)},[t]),E.useEffect(()=>{n()},[])},hf=()=>{const e=window[_o];return Ia(e,e.getValue()??void 0)},Do="theme",vi=()=>document.documentElement.dataset[Do]==="dark"?"dark":"light",pf=()=>{const[e,t]=E.useState(vi());return E.useEffect(()=>{const n=document.documentElement,r=()=>t(vi),o=new MutationObserver(s=>{for(const i of s)i.type==="attributes"&&i.attributeName===`data-${Do}`&&r()});return o.observe(n,{attributes:!0,attributeFilter:[`data-${Do}`]}),r(),()=>{o.disconnect()}},[]),e},mf=e=>e!==void 0,gf=e=>e!==!0;let yf={data:""},vf=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||yf,bf=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,wf=/\/\*[^]*?\*\/| +/g,bi=/\n+/g,tt=(e,t)=>{let n="",r="",o="";for(let s in e){let i=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+i+";":r+=s[1]=="f"?tt(i,s):s+"{"+tt(i,s[1]=="k"?"":t)+"}":typeof i=="object"?r+=tt(i,t?t.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,a):a?a+" "+c:c)):s):i!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=tt.p?tt.p(s,i):s+":"+i+";")}return n+(t&&o?t+"{"+o+"}":o)+r},He={},mc=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+mc(e[n]);return t}return e},Cf=(e,t,n,r,o)=>{let s=mc(e),i=He[s]||(He[s]=(c=>{let l=0,d=11;for(;l<c.length;)d=101*d+c.charCodeAt(l++)>>>0;return"go"+d})(s));if(!He[i]){let c=s!==e?e:(l=>{let d,p,h=[{}];for(;d=bf.exec(l.replace(wf,""));)d[4]?h.shift():d[3]?(p=d[3].replace(bi," ").trim(),h.unshift(h[0][p]=h[0][p]||{})):h[0][d[1]]=d[2].replace(bi," ").trim();return h[0]})(e);He[i]=tt(o?{["@keyframes "+i]:c}:c,n?"":"."+i)}let a=n&&He.g?He.g:null;return n&&(He.g=He[i]),((c,l,d,p)=>{p?l.data=l.data.replace(p,c):l.data.indexOf(c)===-1&&(l.data=d?c+l.data:l.data+c)})(He[i],t,r,a),i},xf=(e,t,n)=>e.reduce((r,o,s)=>{let i=t[s];if(i&&i.call){let a=i(n),c=a&&a.props&&a.props.className||/^go/.test(a)&&a;i=c?"."+c:a&&typeof a=="object"?a.props?"":tt(a,""):a===!1?"":a}return r+o+(i??"")},"");function zr(e){let t=this||{},n=e.call?e(t.p):e;return Cf(n.unshift?n.raw?xf(n,[].slice.call(arguments,1),t.p):n.reduce((r,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,vf(t.target),t.g,t.o,t.k)}let gc,ko,Lo;zr.bind({g:1});let Qe=zr.bind({k:1});function Ef(e,t,n,r){tt.p=t,gc=e,ko=n,Lo=r}function vt(e,t){let n=this||{};return function(){let r=arguments;function o(s,i){let a=Object.assign({},s),c=a.className||o.className;n.p=Object.assign({theme:ko&&ko()},a),n.o=/ *go\d+/.test(c),a.className=zr.apply(n,r)+(c?" "+c:"");let l=e;return e[0]&&(l=a.as||e,delete a.as),Lo&&l[0]&&Lo(a),gc(l,a)}return o}}var Sf=e=>typeof e=="function",Pr=(e,t)=>Sf(e)?e(t):e,_f=(()=>{let e=0;return()=>(++e).toString()})(),yc=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Rf=20,vr=new Map,Tf=1e3,wi=e=>{if(vr.has(e))return;let t=setTimeout(()=>{vr.delete(e),Bt({type:4,toastId:e})},Tf);vr.set(e,t)},Pf=e=>{let t=vr.get(e);t&&clearTimeout(t)},Io=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,Rf)};case 1:return t.toast.id&&Pf(t.toast.id),{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case 2:let{toast:n}=t;return e.toasts.find(s=>s.id===n.id)?Io(e,{type:1,toast:n}):Io(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?wi(r):e.toasts.forEach(s=>{wi(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===r||r===void 0?{...s,visible:!1}:s)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+o}))}}},br=[],wr={toasts:[],pausedAt:void 0},Bt=e=>{wr=Io(wr,e),br.forEach(t=>{t(wr)})},Af={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Of=(e={})=>{let[t,n]=E.useState(wr);E.useEffect(()=>(br.push(n),()=>{let o=br.indexOf(n);o>-1&&br.splice(o,1)}),[t]);let r=t.toasts.map(o=>{var s,i;return{...e,...e[o.type],...o,duration:o.duration||((s=e[o.type])==null?void 0:s.duration)||(e==null?void 0:e.duration)||Af[o.type],style:{...e.style,...(i=e[o.type])==null?void 0:i.style,...o.style}}});return{...t,toasts:r}},jf=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||_f()}),Fn=e=>(t,n)=>{let r=jf(t,e,n);return Bt({type:2,toast:r}),r.id},be=(e,t)=>Fn("blank")(e,t);be.error=Fn("error");be.success=Fn("success");be.loading=Fn("loading");be.custom=Fn("custom");be.dismiss=e=>{Bt({type:3,toastId:e})};be.remove=e=>Bt({type:4,toastId:e});be.promise=(e,t,n)=>{let r=be.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(o=>(be.success(Pr(t.success,o),{id:r,...n,...n==null?void 0:n.success}),o)).catch(o=>{be.error(Pr(t.error,o),{id:r,...n,...n==null?void 0:n.error})}),e};var Df=(e,t)=>{Bt({type:1,toast:{id:e,height:t}})},kf=()=>{Bt({type:5,time:Date.now()})},Lf=e=>{let{toasts:t,pausedAt:n}=Of(e);E.useEffect(()=>{if(n)return;let s=Date.now(),i=t.map(a=>{if(a.duration===1/0)return;let c=(a.duration||0)+a.pauseDuration-(s-a.createdAt);if(c<0){a.visible&&be.dismiss(a.id);return}return setTimeout(()=>be.dismiss(a.id),c)});return()=>{i.forEach(a=>a&&clearTimeout(a))}},[t,n]);let r=E.useCallback(()=>{n&&Bt({type:6,time:Date.now()})},[n]),o=E.useCallback((s,i)=>{let{reverseOrder:a=!1,gutter:c=8,defaultPosition:l}=i||{},d=t.filter(m=>(m.position||l)===(s.position||l)&&m.height),p=d.findIndex(m=>m.id===s.id),h=d.filter((m,w)=>w<p&&m.visible).length;return d.filter(m=>m.visible).slice(...a?[h+1]:[0,h]).reduce((m,w)=>m+(w.height||0)+c,0)},[t]);return{toasts:t,handlers:{updateHeight:Df,startPause:kf,endPause:r,calculateOffset:o}}},If=Qe`
|
|
32
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function Oo(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Vr=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,o,s;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var a=Po(i),c=a.next();!c.done;c=a.next()){var l=c.value;l.remove(this)}}catch(f){t={error:f}}finally{try{c&&!c.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else i.remove(this);var d=this.initialTeardown;if(ze(d))try{d()}catch(f){s=f instanceof fo?f.errors:[f]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var h=Po(p),m=h.next();!m.done;m=h.next()){var w=m.value;try{fi(w)}catch(f){s=s??[],f instanceof fo?s=Tr(Tr([],Ao(s)),Ao(f.errors)):s.push(f)}}}catch(f){r={error:f}}finally{try{m&&!m.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}}if(s)throw new fo(s)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)fi(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&Oo(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&Oo(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),ic=Vr.EMPTY;function ac(e){return e instanceof Vr||e&&"closed"in e&&ze(e.remove)&&ze(e.add)&&ze(e.unsubscribe)}function fi(e){ze(e)?e():e.unsubscribe()}var Bd={Promise:void 0},Ud={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Tr([e,t],Ao(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function Hd(e){Ud.setTimeout(function(){throw e})}function hi(){}function yr(e){e()}var cc=function(e){$n(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,ac(n)&&n.add(r)):r.destination=qd,r}return t.create=function(n,r,o){return new jo(n,r,o)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Vr),Wd=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){Xn(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){Xn(r)}else Xn(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){Xn(n)}},e}(),jo=function(e){$n(t,e);function t(n,r,o){var s=e.call(this)||this,i;return ze(n)||!n?i={next:n??void 0,error:r??void 0,complete:o??void 0}:i=n,s.destination=new Wd(i),s}return t}(cc);function Xn(e){Hd(e)}function Vd(e){throw e}var qd={closed:!0,next:hi,error:Vd,complete:hi},zd=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Gd(e){return e}function Qd(e){return e.length===0?Gd:e.length===1?e[0]:function(n){return e.reduce(function(r,o){return o(r)},n)}}var pi=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var o=this,s=Yd(t)?t:new jo(t,n,r);return yr(function(){var i=o,a=i.operator,c=i.source;s.add(a?a.call(s,c):c?o._subscribe(s):o._trySubscribe(s))}),s},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=mi(n),new n(function(o,s){var i=new jo({next:function(a){try{t(a)}catch(c){s(c),i.unsubscribe()}},error:s,complete:o});r.subscribe(i)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[zd]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Qd(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=mi(t),new t(function(r,o){var s;n.subscribe(function(i){return s=i},function(i){return o(i)},function(){return r(s)})})},e.create=function(t){return new e(t)},e}();function mi(e){var t;return(t=e??Bd.Promise)!==null&&t!==void 0?t:Promise}function Kd(e){return e&&ze(e.next)&&ze(e.error)&&ze(e.complete)}function Yd(e){return e&&e instanceof cc||Kd(e)&&ac(e)}var Zd=sc(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),lc=function(e){$n(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new gi(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new Zd},t.prototype.next=function(n){var r=this;yr(function(){var o,s;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var i=Po(r.currentObservers),a=i.next();!a.done;a=i.next()){var c=a.value;c.next(n)}}catch(l){o={error:l}}finally{try{a&&!a.done&&(s=i.return)&&s.call(i)}finally{if(o)throw o.error}}}})},t.prototype.error=function(n){var r=this;yr(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var o=r.observers;o.length;)o.shift().error(n)}})},t.prototype.complete=function(){var n=this;yr(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,o=this,s=o.hasError,i=o.isStopped,a=o.observers;return s||i?ic:(this.currentObservers=null,a.push(n),new Vr(function(){r.currentObservers=null,Oo(a,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,o=r.hasError,s=r.thrownError,i=r.isStopped;o?n.error(s):i&&n.complete()},t.prototype.asObservable=function(){var n=new pi;return n.source=this,n},t.create=function(n,r){return new gi(n,r)},t}(pi),gi=function(e){$n(t,e);function t(n,r){var o=e.call(this)||this;return o.destination=n,o.source=r,o}return t.prototype.next=function(n){var r,o;(o=(r=this.destination)===null||r===void 0?void 0:r.next)===null||o===void 0||o.call(r,n)},t.prototype.error=function(n){var r,o;(o=(r=this.destination)===null||r===void 0?void 0:r.error)===null||o===void 0||o.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,o;return(o=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&o!==void 0?o:ic},t}(lc),Xd=function(e){$n(t,e);function t(n){var r=e.call(this)||this;return r._value=n,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(n){var r=e.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},t.prototype.getValue=function(){var n=this,r=n.hasError,o=n.thrownError,s=n._value;if(r)throw o;return this._throwIfClosed(),s},t.prototype.next=function(n){e.prototype.next.call(this,this._value=n)},t}(lc);const Jd=e=>{const{fontsLoaded:t}=rc(e.fonts);nc(e.styleSheet);const n=()=>{const r=new Xd(!0);window[_o]=r};E.useEffect(()=>{t&&window[_o].next(!1)},[t]),E.useEffect(()=>{n()},[])},ef=()=>{const e=window[_o];return La(e,e.getValue()??void 0)},Do="theme",yi=()=>document.documentElement.dataset[Do]==="dark"?"dark":"light",tf=()=>{const[e,t]=E.useState(yi());return E.useEffect(()=>{const n=document.documentElement,r=()=>t(yi),o=new MutationObserver(s=>{for(const i of s)i.type==="attributes"&&i.attributeName===`data-${Do}`&&r()});return o.observe(n,{attributes:!0,attributeFilter:[`data-${Do}`]}),r(),()=>{o.disconnect()}},[]),e},nf=e=>e!==void 0,rf=e=>e!==!0;let of={data:""},sf=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||of,af=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,cf=/\/\*[^]*?\*\/| +/g,vi=/\n+/g,tt=(e,t)=>{let n="",r="",o="";for(let s in e){let i=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+i+";":r+=s[1]=="f"?tt(i,s):s+"{"+tt(i,s[1]=="k"?"":t)+"}":typeof i=="object"?r+=tt(i,t?t.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,a):a?a+" "+c:c)):s):i!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=tt.p?tt.p(s,i):s+":"+i+";")}return n+(t&&o?t+"{"+o+"}":o)+r},He={},uc=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+uc(e[n]);return t}return e},lf=(e,t,n,r,o)=>{let s=uc(e),i=He[s]||(He[s]=(c=>{let l=0,d=11;for(;l<c.length;)d=101*d+c.charCodeAt(l++)>>>0;return"go"+d})(s));if(!He[i]){let c=s!==e?e:(l=>{let d,p,h=[{}];for(;d=af.exec(l.replace(cf,""));)d[4]?h.shift():d[3]?(p=d[3].replace(vi," ").trim(),h.unshift(h[0][p]=h[0][p]||{})):h[0][d[1]]=d[2].replace(vi," ").trim();return h[0]})(e);He[i]=tt(o?{["@keyframes "+i]:c}:c,n?"":"."+i)}let a=n&&He.g?He.g:null;return n&&(He.g=He[i]),((c,l,d,p)=>{p?l.data=l.data.replace(p,c):l.data.indexOf(c)===-1&&(l.data=d?c+l.data:l.data+c)})(He[i],t,r,a),i},uf=(e,t,n)=>e.reduce((r,o,s)=>{let i=t[s];if(i&&i.call){let a=i(n),c=a&&a.props&&a.props.className||/^go/.test(a)&&a;i=c?"."+c:a&&typeof a=="object"?a.props?"":tt(a,""):a===!1?"":a}return r+o+(i??"")},"");function qr(e){let t=this||{},n=e.call?e(t.p):e;return lf(n.unshift?n.raw?uf(n,[].slice.call(arguments,1),t.p):n.reduce((r,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,sf(t.target),t.g,t.o,t.k)}let dc,ko,Lo;qr.bind({g:1});let Qe=qr.bind({k:1});function df(e,t,n,r){tt.p=t,dc=e,ko=n,Lo=r}function vt(e,t){let n=this||{};return function(){let r=arguments;function o(s,i){let a=Object.assign({},s),c=a.className||o.className;n.p=Object.assign({theme:ko&&ko()},a),n.o=/ *go\d+/.test(c),a.className=qr.apply(n,r)+(c?" "+c:"");let l=e;return e[0]&&(l=a.as||e,delete a.as),Lo&&l[0]&&Lo(a),dc(l,a)}return o}}var ff=e=>typeof e=="function",Pr=(e,t)=>ff(e)?e(t):e,hf=(()=>{let e=0;return()=>(++e).toString()})(),fc=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),pf=20,vr=new Map,mf=1e3,bi=e=>{if(vr.has(e))return;let t=setTimeout(()=>{vr.delete(e),Bt({type:4,toastId:e})},mf);vr.set(e,t)},gf=e=>{let t=vr.get(e);t&&clearTimeout(t)},Io=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,pf)};case 1:return t.toast.id&&gf(t.toast.id),{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case 2:let{toast:n}=t;return e.toasts.find(s=>s.id===n.id)?Io(e,{type:1,toast:n}):Io(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?bi(r):e.toasts.forEach(s=>{bi(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===r||r===void 0?{...s,visible:!1}:s)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+o}))}}},br=[],wr={toasts:[],pausedAt:void 0},Bt=e=>{wr=Io(wr,e),br.forEach(t=>{t(wr)})},yf={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},vf=(e={})=>{let[t,n]=E.useState(wr);E.useEffect(()=>(br.push(n),()=>{let o=br.indexOf(n);o>-1&&br.splice(o,1)}),[t]);let r=t.toasts.map(o=>{var s,i;return{...e,...e[o.type],...o,duration:o.duration||((s=e[o.type])==null?void 0:s.duration)||(e==null?void 0:e.duration)||yf[o.type],style:{...e.style,...(i=e[o.type])==null?void 0:i.style,...o.style}}});return{...t,toasts:r}},bf=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||hf()}),Fn=e=>(t,n)=>{let r=bf(t,e,n);return Bt({type:2,toast:r}),r.id},be=(e,t)=>Fn("blank")(e,t);be.error=Fn("error");be.success=Fn("success");be.loading=Fn("loading");be.custom=Fn("custom");be.dismiss=e=>{Bt({type:3,toastId:e})};be.remove=e=>Bt({type:4,toastId:e});be.promise=(e,t,n)=>{let r=be.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(o=>(be.success(Pr(t.success,o),{id:r,...n,...n==null?void 0:n.success}),o)).catch(o=>{be.error(Pr(t.error,o),{id:r,...n,...n==null?void 0:n.error})}),e};var wf=(e,t)=>{Bt({type:1,toast:{id:e,height:t}})},Cf=()=>{Bt({type:5,time:Date.now()})},xf=e=>{let{toasts:t,pausedAt:n}=vf(e);E.useEffect(()=>{if(n)return;let s=Date.now(),i=t.map(a=>{if(a.duration===1/0)return;let c=(a.duration||0)+a.pauseDuration-(s-a.createdAt);if(c<0){a.visible&&be.dismiss(a.id);return}return setTimeout(()=>be.dismiss(a.id),c)});return()=>{i.forEach(a=>a&&clearTimeout(a))}},[t,n]);let r=E.useCallback(()=>{n&&Bt({type:6,time:Date.now()})},[n]),o=E.useCallback((s,i)=>{let{reverseOrder:a=!1,gutter:c=8,defaultPosition:l}=i||{},d=t.filter(m=>(m.position||l)===(s.position||l)&&m.height),p=d.findIndex(m=>m.id===s.id),h=d.filter((m,w)=>w<p&&m.visible).length;return d.filter(m=>m.visible).slice(...a?[h+1]:[0,h]).reduce((m,w)=>m+(w.height||0)+c,0)},[t]);return{toasts:t,handlers:{updateHeight:wf,startPause:Cf,endPause:r,calculateOffset:o}}},Ef=Qe`
|
|
58
33
|
from {
|
|
59
34
|
transform: scale(0) rotate(45deg);
|
|
60
35
|
opacity: 0;
|
|
@@ -62,7 +37,7 @@ from {
|
|
|
62
37
|
to {
|
|
63
38
|
transform: scale(1) rotate(45deg);
|
|
64
39
|
opacity: 1;
|
|
65
|
-
}`,
|
|
40
|
+
}`,Sf=Qe`
|
|
66
41
|
from {
|
|
67
42
|
transform: scale(0);
|
|
68
43
|
opacity: 0;
|
|
@@ -70,7 +45,7 @@ from {
|
|
|
70
45
|
to {
|
|
71
46
|
transform: scale(1);
|
|
72
47
|
opacity: 1;
|
|
73
|
-
}`,
|
|
48
|
+
}`,_f=Qe`
|
|
74
49
|
from {
|
|
75
50
|
transform: scale(0) rotate(90deg);
|
|
76
51
|
opacity: 0;
|
|
@@ -78,7 +53,7 @@ from {
|
|
|
78
53
|
to {
|
|
79
54
|
transform: scale(1) rotate(90deg);
|
|
80
55
|
opacity: 1;
|
|
81
|
-
}
|
|
56
|
+
}`,Rf=vt("div")`
|
|
82
57
|
width: 20px;
|
|
83
58
|
opacity: 0;
|
|
84
59
|
height: 20px;
|
|
@@ -87,14 +62,14 @@ to {
|
|
|
87
62
|
position: relative;
|
|
88
63
|
transform: rotate(45deg);
|
|
89
64
|
|
|
90
|
-
animation: ${
|
|
65
|
+
animation: ${Ef} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
91
66
|
forwards;
|
|
92
67
|
animation-delay: 100ms;
|
|
93
68
|
|
|
94
69
|
&:after,
|
|
95
70
|
&:before {
|
|
96
71
|
content: '';
|
|
97
|
-
animation: ${
|
|
72
|
+
animation: ${Sf} 0.15s ease-out forwards;
|
|
98
73
|
animation-delay: 150ms;
|
|
99
74
|
position: absolute;
|
|
100
75
|
border-radius: 3px;
|
|
@@ -107,18 +82,18 @@ to {
|
|
|
107
82
|
}
|
|
108
83
|
|
|
109
84
|
&:before {
|
|
110
|
-
animation: ${
|
|
85
|
+
animation: ${_f} 0.15s ease-out forwards;
|
|
111
86
|
animation-delay: 180ms;
|
|
112
87
|
transform: rotate(90deg);
|
|
113
88
|
}
|
|
114
|
-
`,
|
|
89
|
+
`,Tf=Qe`
|
|
115
90
|
from {
|
|
116
91
|
transform: rotate(0deg);
|
|
117
92
|
}
|
|
118
93
|
to {
|
|
119
94
|
transform: rotate(360deg);
|
|
120
95
|
}
|
|
121
|
-
`,
|
|
96
|
+
`,Pf=vt("div")`
|
|
122
97
|
width: 12px;
|
|
123
98
|
height: 12px;
|
|
124
99
|
box-sizing: border-box;
|
|
@@ -126,8 +101,8 @@ to {
|
|
|
126
101
|
border-radius: 100%;
|
|
127
102
|
border-color: ${e=>e.secondary||"#e0e0e0"};
|
|
128
103
|
border-right-color: ${e=>e.primary||"#616161"};
|
|
129
|
-
animation: ${
|
|
130
|
-
`,
|
|
104
|
+
animation: ${Tf} 1s linear infinite;
|
|
105
|
+
`,Af=Qe`
|
|
131
106
|
from {
|
|
132
107
|
transform: scale(0) rotate(45deg);
|
|
133
108
|
opacity: 0;
|
|
@@ -135,7 +110,7 @@ from {
|
|
|
135
110
|
to {
|
|
136
111
|
transform: scale(1) rotate(45deg);
|
|
137
112
|
opacity: 1;
|
|
138
|
-
}`,
|
|
113
|
+
}`,Of=Qe`
|
|
139
114
|
0% {
|
|
140
115
|
height: 0;
|
|
141
116
|
width: 0;
|
|
@@ -149,7 +124,7 @@ to {
|
|
|
149
124
|
100% {
|
|
150
125
|
opacity: 1;
|
|
151
126
|
height: 10px;
|
|
152
|
-
}`,
|
|
127
|
+
}`,jf=vt("div")`
|
|
153
128
|
width: 20px;
|
|
154
129
|
opacity: 0;
|
|
155
130
|
height: 20px;
|
|
@@ -158,13 +133,13 @@ to {
|
|
|
158
133
|
position: relative;
|
|
159
134
|
transform: rotate(45deg);
|
|
160
135
|
|
|
161
|
-
animation: ${
|
|
136
|
+
animation: ${Af} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
162
137
|
forwards;
|
|
163
138
|
animation-delay: 100ms;
|
|
164
139
|
&:after {
|
|
165
140
|
content: '';
|
|
166
141
|
box-sizing: border-box;
|
|
167
|
-
animation: ${
|
|
142
|
+
animation: ${Of} 0.2s ease-out forwards;
|
|
168
143
|
opacity: 0;
|
|
169
144
|
animation-delay: 200ms;
|
|
170
145
|
position: absolute;
|
|
@@ -176,16 +151,16 @@ to {
|
|
|
176
151
|
height: 10px;
|
|
177
152
|
width: 6px;
|
|
178
153
|
}
|
|
179
|
-
`,
|
|
154
|
+
`,Df=vt("div")`
|
|
180
155
|
position: absolute;
|
|
181
|
-
`,
|
|
156
|
+
`,kf=vt("div")`
|
|
182
157
|
position: relative;
|
|
183
158
|
display: flex;
|
|
184
159
|
justify-content: center;
|
|
185
160
|
align-items: center;
|
|
186
161
|
min-width: 20px;
|
|
187
162
|
min-height: 20px;
|
|
188
|
-
`,
|
|
163
|
+
`,Lf=Qe`
|
|
189
164
|
from {
|
|
190
165
|
transform: scale(0.6);
|
|
191
166
|
opacity: 0.4;
|
|
@@ -193,20 +168,20 @@ from {
|
|
|
193
168
|
to {
|
|
194
169
|
transform: scale(1);
|
|
195
170
|
opacity: 1;
|
|
196
|
-
}`,
|
|
171
|
+
}`,If=vt("div")`
|
|
197
172
|
position: relative;
|
|
198
173
|
transform: scale(0.6);
|
|
199
174
|
opacity: 0.4;
|
|
200
175
|
min-width: 20px;
|
|
201
|
-
animation: ${
|
|
176
|
+
animation: ${Lf} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
202
177
|
forwards;
|
|
203
|
-
`,
|
|
178
|
+
`,Mf=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?g.createElement(If,null,t):t:n==="blank"?null:g.createElement(kf,null,g.createElement(Pf,{...r}),n!=="loading"&&g.createElement(Df,null,n==="error"?g.createElement(Rf,{...r}):g.createElement(jf,{...r})))},Nf=e=>`
|
|
204
179
|
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
|
|
205
180
|
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
|
206
|
-
|
|
181
|
+
`,$f=e=>`
|
|
207
182
|
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
|
208
183
|
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
|
209
|
-
`,
|
|
184
|
+
`,Ff="0%{opacity:0;} 100%{opacity:1;}",Bf="0%{opacity:1;} 100%{opacity:0;}",Uf=vt("div")`
|
|
210
185
|
display: flex;
|
|
211
186
|
align-items: center;
|
|
212
187
|
background: #fff;
|
|
@@ -218,20 +193,20 @@ to {
|
|
|
218
193
|
pointer-events: auto;
|
|
219
194
|
padding: 8px 10px;
|
|
220
195
|
border-radius: 8px;
|
|
221
|
-
`,
|
|
196
|
+
`,Hf=vt("div")`
|
|
222
197
|
display: flex;
|
|
223
198
|
justify-content: center;
|
|
224
199
|
margin: 4px 10px;
|
|
225
200
|
color: inherit;
|
|
226
201
|
flex: 1 1 auto;
|
|
227
202
|
white-space: pre-line;
|
|
228
|
-
`,
|
|
203
|
+
`,Wf=(e,t)=>{let n=e.includes("top")?1:-1,[r,o]=fc()?[Ff,Bf]:[Nf(n),$f(n)];return{animation:t?`${Qe(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Qe(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Vf=g.memo(({toast:e,position:t,style:n,children:r})=>{let o=e.height?Wf(e.position||t||"top-center",e.visible):{opacity:0},s=g.createElement(Mf,{toast:e}),i=g.createElement(Hf,{...e.ariaProps},Pr(e.message,e));return g.createElement(Uf,{className:e.className,style:{...o,...n,...e.style}},typeof r=="function"?r({icon:s,message:i}):g.createElement(g.Fragment,null,s,i))});df(g.createElement);var qf=({id:e,className:t,style:n,onHeightUpdate:r,children:o})=>{let s=g.useCallback(i=>{if(i){let a=()=>{let c=i.getBoundingClientRect().height;r(e,c)};a(),new MutationObserver(a).observe(i,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return g.createElement("div",{ref:s,className:t,style:n},o)},zf=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},o=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:fc()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...o}},Gf=qr`
|
|
229
204
|
z-index: 9999;
|
|
230
205
|
> * {
|
|
231
206
|
pointer-events: auto;
|
|
232
207
|
}
|
|
233
|
-
`,Jn=16,ih=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:o,containerStyle:s,containerClassName:i})=>{let{toasts:a,handlers:c}=Lf(n);return g.createElement("div",{style:{position:"fixed",zIndex:9999,top:Jn,left:Jn,right:Jn,bottom:Jn,pointerEvents:"none",...s},className:i,onMouseEnter:c.startPause,onMouseLeave:c.endPause},a.map(l=>{let d=l.position||t,p=c.calculateOffset(l,{reverseOrder:e,gutter:r,defaultPosition:t}),h=oh(d,p);return g.createElement(rh,{id:l.id,key:l.id,onHeightUpdate:c.updateHeight,className:l.visible?sh:"",style:h},l.type==="custom"?Pr(l.message,l):o?o(l):g.createElement(nh,{toast:l,position:d}))}))},Ci=be;const fs=()=>({notify:E.useCallback((t,n,r)=>{n==="warning"||n==="info"?Ci(t,{icon:n==="warning"?"⚠️":"ℹ️",style:{background:"var(--platform-background-primary-color)",color:"var(--platform-text-primary-color)"}}):Ci[n](t,{style:{background:"var(--platform-background-primary-color)",color:"var(--platform-text-primary-color)"}}),r&&console.error(r)},[])});var gn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Mt=typeof window>"u"||"Deno"in globalThis;function ue(){}function ah(e,t){return typeof e=="function"?e(t):e}function Mo(e){return typeof e=="number"&&e>=0&&e!==1/0}function vc(e,t){return Math.max(e+(t||0)-Date.now(),0)}function pt(e,t){return typeof e=="function"?e(t):e}function _e(e,t){return typeof e=="function"?e(t):e}function xi(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==hs(i,t.options))return!1}else if(!Pn(t.queryKey,i))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||s&&!s(t))}function Ei(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Nt(t.options.mutationKey)!==Nt(s))return!1}else if(!Pn(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function hs(e,t){return((t==null?void 0:t.queryKeyHashFn)||Nt)(e)}function Nt(e){return JSON.stringify(e,(t,n)=>$o(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Pn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Pn(e[n],t[n])):!1}function No(e,t){if(e===t)return e;const n=Si(e)&&Si(t);if(n||$o(e)&&$o(t)){const r=n?e:Object.keys(e),o=r.length,s=n?t:Object.keys(t),i=s.length,a=n?[]:{};let c=0;for(let l=0;l<i;l++){const d=n?l:s[l];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,c++):(a[d]=No(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&c++)}return o===i&&c===o?e:a}return t}function Ar(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Si(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function $o(e){if(!_i(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!_i(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function _i(e){return Object.prototype.toString.call(e)==="[object Object]"}function ch(e){return new Promise(t=>{setTimeout(t,e)})}function Fo(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){try{return No(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return No(e,t)}return t}function lh(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function uh(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Or=Symbol();function bc(e,t){return e.queryFn===Or&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Or?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function wc(e,t){return typeof e=="function"?e(...t):!!e}var Tt,nt,Xt,wa,dh=(wa=class extends gn{constructor(){super();k(this,Tt);k(this,nt);k(this,Xt);O(this,Xt,t=>{if(!Mt&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){b(this,nt)||this.setEventListener(b(this,Xt))}onUnsubscribe(){var t;this.hasListeners()||((t=b(this,nt))==null||t.call(this),O(this,nt,void 0))}setEventListener(t){var n;O(this,Xt,t),(n=b(this,nt))==null||n.call(this),O(this,nt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){b(this,Tt)!==t&&(O(this,Tt,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof b(this,Tt)=="boolean"?b(this,Tt):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Tt=new WeakMap,nt=new WeakMap,Xt=new WeakMap,wa),ps=new dh,Jt,rt,en,Ca,fh=(Ca=class extends gn{constructor(){super();k(this,Jt,!0);k(this,rt);k(this,en);O(this,en,t=>{if(!Mt&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){b(this,rt)||this.setEventListener(b(this,en))}onUnsubscribe(){var t;this.hasListeners()||((t=b(this,rt))==null||t.call(this),O(this,rt,void 0))}setEventListener(t){var n;O(this,en,t),(n=b(this,rt))==null||n.call(this),O(this,rt,t(this.setOnline.bind(this)))}setOnline(t){b(this,Jt)!==t&&(O(this,Jt,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return b(this,Jt)}},Jt=new WeakMap,rt=new WeakMap,en=new WeakMap,Ca),jr=new fh;function Bo(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function hh(e){return Math.min(1e3*2**e,3e4)}function Cc(e){return(e??"online")==="online"?jr.isOnline():!0}var xc=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ho(e){return e instanceof xc}function Ec(e){let t=!1,n=0,r=!1,o;const s=Bo(),i=f=>{var y;r||(h(new xc(f)),(y=e.abort)==null||y.call(e))},a=()=>{t=!0},c=()=>{t=!1},l=()=>ps.isFocused()&&(e.networkMode==="always"||jr.isOnline())&&e.canRun(),d=()=>Cc(e.networkMode)&&e.canRun(),p=f=>{var y;r||(r=!0,(y=e.onSuccess)==null||y.call(e,f),o==null||o(),s.resolve(f))},h=f=>{var y;r||(r=!0,(y=e.onError)==null||y.call(e,f),o==null||o(),s.reject(f))},m=()=>new Promise(f=>{var y;o=C=>{(r||l())&&f(C)},(y=e.onPause)==null||y.call(e)}).then(()=>{var f;o=void 0,r||(f=e.onContinue)==null||f.call(e)}),w=()=>{if(r)return;let f;const y=n===0?e.initialPromise:void 0;try{f=y??e.fn()}catch(C){f=Promise.reject(C)}Promise.resolve(f).then(p).catch(C=>{var A;if(r)return;const x=e.retry??(Mt?0:3),S=e.retryDelay??hh,_=typeof S=="function"?S(n,C):S,R=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,C);if(t||!R){h(C);return}n++,(A=e.onFail)==null||A.call(e,n,C),ch(_).then(()=>l()?void 0:m()).then(()=>{t?h(C):w()})})};return{promise:s,cancel:i,continue:()=>(o==null||o(),s),cancelRetry:a,continueRetry:c,canStart:d,start:()=>(d()?w():m().then(w),s)}}var ph=e=>setTimeout(e,0);function mh(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=ph;const s=a=>{t?e.push(a):o(()=>{n(a)})},i=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||i()}return c},batchCalls:a=>(...c)=>{s(()=>{a(...c)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var oe=mh(),Pt,xa,Sc=(xa=class{constructor(){k(this,Pt)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Mo(this.gcTime)&&O(this,Pt,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Mt?1/0:5*60*1e3))}clearGcTimeout(){b(this,Pt)&&(clearTimeout(b(this,Pt)),O(this,Pt,void 0))}},Pt=new WeakMap,xa),tn,nn,xe,At,se,kn,Ot,Ee,We,Ea,gh=(Ea=class extends Sc{constructor(t){super();k(this,Ee);k(this,tn);k(this,nn);k(this,xe);k(this,At);k(this,se);k(this,kn);k(this,Ot);O(this,Ot,!1),O(this,kn,t.defaultOptions),this.setOptions(t.options),this.observers=[],O(this,At,t.client),O(this,xe,b(this,At).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,O(this,tn,yh(this.options)),this.state=t.state??b(this,tn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=b(this,se))==null?void 0:t.promise}setOptions(t){this.options={...b(this,kn),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&b(this,xe).remove(this)}setData(t,n){const r=Fo(this.state.data,t,this.options);return $(this,Ee,We).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){$(this,Ee,We).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=b(this,se))==null?void 0:r.promise;return(o=b(this,se))==null||o.cancel(t),n?n.then(ue).catch(ue):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(b(this,tn))}isActive(){return this.observers.some(t=>_e(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Or||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>pt(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!vc(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=b(this,se))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=b(this,se))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),b(this,xe).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(b(this,se)&&(b(this,Ot)?b(this,se).cancel({revert:!0}):b(this,se).cancelRetry()),this.scheduleGc()),b(this,xe).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||$(this,Ee,We).call(this,{type:"invalidate"})}fetch(t,n){var l,d,p;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(b(this,se))return b(this,se).continueRetry(),b(this,se).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(m=>m.options.queryFn);h&&this.setOptions(h.options)}Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']");const r=new AbortController,o=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(O(this,Ot,!0),r.signal)})},s=()=>{const h=bc(this.options,n),w=(()=>{const f={client:b(this,At),queryKey:this.queryKey,meta:this.meta};return o(f),f})();return O(this,Ot,!1),this.options.persister?this.options.persister(h,w,this):h(w)},a=(()=>{const h={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:b(this,At),state:this.state,fetchFn:s};return o(h),h})();(l=this.options.behavior)==null||l.onFetch(a,this),O(this,nn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&$(this,Ee,We).call(this,{type:"fetch",meta:(p=a.fetchOptions)==null?void 0:p.meta});const c=h=>{var m,w,f,y;ho(h)&&h.silent||$(this,Ee,We).call(this,{type:"error",error:h}),ho(h)||((w=(m=b(this,xe).config).onError)==null||w.call(m,h,this),(y=(f=b(this,xe).config).onSettled)==null||y.call(f,this.state.data,h,this)),this.scheduleGc()};return O(this,se,Ec({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var m,w,f,y;if(h===void 0){console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(C){c(C);return}(w=(m=b(this,xe).config).onSuccess)==null||w.call(m,h,this),(y=(f=b(this,xe).config).onSettled)==null||y.call(f,h,this.state.error,this),this.scheduleGc()},onError:c,onFail:(h,m)=>{$(this,Ee,We).call(this,{type:"failed",failureCount:h,error:m})},onPause:()=>{$(this,Ee,We).call(this,{type:"pause"})},onContinue:()=>{$(this,Ee,We).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),b(this,se).start()}},tn=new WeakMap,nn=new WeakMap,xe=new WeakMap,At=new WeakMap,se=new WeakMap,kn=new WeakMap,Ot=new WeakMap,Ee=new WeakSet,We=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,..._c(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return ho(o)&&o.revert&&b(this,nn)?{...b(this,nn),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),oe.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),b(this,xe).notify({query:this,type:"updated",action:t})})},Ea);function _c(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Cc(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function yh(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var je,Sa,vh=(Sa=class extends gn{constructor(t={}){super();k(this,je);this.config=t,O(this,je,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??hs(o,n);let i=this.get(s);return i||(i=new gh({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(i)),i}add(t){b(this,je).has(t.queryHash)||(b(this,je).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=b(this,je).get(t.queryHash);n&&(t.destroy(),n===t&&b(this,je).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){oe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return b(this,je).get(t)}getAll(){return[...b(this,je).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>xi(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>xi(t,r)):n}notify(t){oe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){oe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){oe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},je=new WeakMap,Sa),De,ce,jt,ke,Xe,_a,bh=(_a=class extends Sc{constructor(t){super();k(this,ke);k(this,De);k(this,ce);k(this,jt);this.mutationId=t.mutationId,O(this,ce,t.mutationCache),O(this,De,[]),this.state=t.state||Rc(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){b(this,De).includes(t)||(b(this,De).push(t),this.clearGcTimeout(),b(this,ce).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){O(this,De,b(this,De).filter(n=>n!==t)),this.scheduleGc(),b(this,ce).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){b(this,De).length||(this.state.status==="pending"?this.scheduleGc():b(this,ce).remove(this))}continue(){var t;return((t=b(this,jt))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,a,c,l,d,p,h,m,w,f,y,C,x,S,_,R,A,T,I;const n=()=>{$(this,ke,Xe).call(this,{type:"continue"})};O(this,jt,Ec({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(M,N)=>{$(this,ke,Xe).call(this,{type:"failed",failureCount:M,error:N})},onPause:()=>{$(this,ke,Xe).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>b(this,ce).canRun(this)}));const r=this.state.status==="pending",o=!b(this,jt).canStart();try{if(r)n();else{$(this,ke,Xe).call(this,{type:"pending",variables:t,isPaused:o}),await((i=(s=b(this,ce).config).onMutate)==null?void 0:i.call(s,t,this));const N=await((c=(a=this.options).onMutate)==null?void 0:c.call(a,t));N!==this.state.context&&$(this,ke,Xe).call(this,{type:"pending",context:N,variables:t,isPaused:o})}const M=await b(this,jt).start();return await((d=(l=b(this,ce).config).onSuccess)==null?void 0:d.call(l,M,t,this.state.context,this)),await((h=(p=this.options).onSuccess)==null?void 0:h.call(p,M,t,this.state.context)),await((w=(m=b(this,ce).config).onSettled)==null?void 0:w.call(m,M,null,this.state.variables,this.state.context,this)),await((y=(f=this.options).onSettled)==null?void 0:y.call(f,M,null,t,this.state.context)),$(this,ke,Xe).call(this,{type:"success",data:M}),M}catch(M){try{throw await((x=(C=b(this,ce).config).onError)==null?void 0:x.call(C,M,t,this.state.context,this)),await((_=(S=this.options).onError)==null?void 0:_.call(S,M,t,this.state.context)),await((A=(R=b(this,ce).config).onSettled)==null?void 0:A.call(R,void 0,M,this.state.variables,this.state.context,this)),await((I=(T=this.options).onSettled)==null?void 0:I.call(T,void 0,M,t,this.state.context)),M}finally{$(this,ke,Xe).call(this,{type:"error",error:M})}}finally{b(this,ce).runNext(this)}}},De=new WeakMap,ce=new WeakMap,jt=new WeakMap,ke=new WeakSet,Xe=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),oe.batch(()=>{b(this,De).forEach(r=>{r.onMutationUpdate(t)}),b(this,ce).notify({mutation:this,type:"updated",action:t})})},_a);function Rc(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ve,Se,Ln,Ra,wh=(Ra=class extends gn{constructor(t={}){super();k(this,Ve);k(this,Se);k(this,Ln);this.config=t,O(this,Ve,new Set),O(this,Se,new Map),O(this,Ln,0)}build(t,n,r){const o=new bh({mutationCache:this,mutationId:++Yn(this,Ln)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){b(this,Ve).add(t);const n=er(t);if(typeof n=="string"){const r=b(this,Se).get(n);r?r.push(t):b(this,Se).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(b(this,Ve).delete(t)){const n=er(t);if(typeof n=="string"){const r=b(this,Se).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&b(this,Se).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=er(t);if(typeof n=="string"){const r=b(this,Se).get(n),o=r==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=er(t);if(typeof n=="string"){const o=(r=b(this,Se).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){oe.batch(()=>{b(this,Ve).forEach(t=>{this.notify({type:"removed",mutation:t})}),b(this,Ve).clear(),b(this,Se).clear()})}getAll(){return Array.from(b(this,Ve))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ei(n,r))}findAll(t={}){return this.getAll().filter(n=>Ei(t,n))}notify(t){oe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return oe.batch(()=>Promise.all(t.map(n=>n.continue().catch(ue))))}},Ve=new WeakMap,Se=new WeakMap,Ln=new WeakMap,Ra);function er(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Ri(e){return{onFetch:(t,n)=>{var d,p,h,m,w;const r=t.options,o=(h=(p=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:p.fetchMore)==null?void 0:h.direction,s=((m=t.state.data)==null?void 0:m.pages)||[],i=((w=t.state.data)==null?void 0:w.pageParams)||[];let a={pages:[],pageParams:[]},c=0;const l=async()=>{let f=!1;const y=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?f=!0:t.signal.addEventListener("abort",()=>{f=!0}),t.signal)})},C=bc(t.options,t.fetchOptions),x=async(S,_,R)=>{if(f)return Promise.reject();if(_==null&&S.pages.length)return Promise.resolve(S);const T=(()=>{const Q={client:t.client,queryKey:t.queryKey,pageParam:_,direction:R?"backward":"forward",meta:t.options.meta};return y(Q),Q})(),I=await C(T),{maxPages:M}=t.options,N=R?uh:lh;return{pages:N(S.pages,I,M),pageParams:N(S.pageParams,_,M)}};if(o&&s.length){const S=o==="backward",_=S?Ch:Ti,R={pages:s,pageParams:i},A=_(r,R);a=await x(R,A,S)}else{const S=e??s.length;do{const _=c===0?i[0]??r.initialPageParam:Ti(r,a);if(c>0&&_==null)break;a=await x(a,_),c++}while(c<S)}return a};t.options.persister?t.fetchFn=()=>{var f,y;return(y=(f=t.options).persister)==null?void 0:y.call(f,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function Ti(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Ch(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var J,ot,st,rn,on,it,sn,an,Ta,xh=(Ta=class{constructor(e={}){k(this,J);k(this,ot);k(this,st);k(this,rn);k(this,on);k(this,it);k(this,sn);k(this,an);O(this,J,e.queryCache||new vh),O(this,ot,e.mutationCache||new wh),O(this,st,e.defaultOptions||{}),O(this,rn,new Map),O(this,on,new Map),O(this,it,0)}mount(){Yn(this,it)._++,b(this,it)===1&&(O(this,sn,ps.subscribe(async e=>{e&&(await this.resumePausedMutations(),b(this,J).onFocus())})),O(this,an,jr.subscribe(async e=>{e&&(await this.resumePausedMutations(),b(this,J).onOnline())})))}unmount(){var e,t;Yn(this,it)._--,b(this,it)===0&&((e=b(this,sn))==null||e.call(this),O(this,sn,void 0),(t=b(this,an))==null||t.call(this),O(this,an,void 0))}isFetching(e){return b(this,J).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return b(this,ot).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=b(this,J).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=b(this,J).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(pt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return b(this,J).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=b(this,J).get(r.queryHash),s=o==null?void 0:o.state.data,i=ah(t,s);if(i!==void 0)return b(this,J).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return oe.batch(()=>b(this,J).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=b(this,J).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=b(this,J);oe.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=b(this,J);return oe.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=oe.batch(()=>b(this,J).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(ue).catch(ue)}invalidateQueries(e,t={}){return oe.batch(()=>(b(this,J).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=oe.batch(()=>b(this,J).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(ue)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(ue)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=b(this,J).build(this,t);return n.isStaleByTime(pt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ue).catch(ue)}fetchInfiniteQuery(e){return e.behavior=Ri(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ue).catch(ue)}ensureInfiniteQueryData(e){return e.behavior=Ri(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return jr.isOnline()?b(this,ot).resumePausedMutations():Promise.resolve()}getQueryCache(){return b(this,J)}getMutationCache(){return b(this,ot)}getDefaultOptions(){return b(this,st)}setDefaultOptions(e){O(this,st,e)}setQueryDefaults(e,t){b(this,rn).set(Nt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...b(this,rn).values()],n={};return t.forEach(r=>{Pn(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){b(this,on).set(Nt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...b(this,on).values()],n={};return t.forEach(r=>{Pn(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...b(this,st).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=hs(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Or&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...b(this,st).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){b(this,J).clear(),b(this,ot).clear()}},J=new WeakMap,ot=new WeakMap,st=new WeakMap,rn=new WeakMap,on=new WeakMap,it=new WeakMap,sn=new WeakMap,an=new WeakMap,Ta),he,U,In,le,Dt,cn,at,ct,Mn,ln,un,kt,Lt,lt,dn,z,Sn,Uo,Ho,Wo,Vo,zo,qo,Go,Tc,Pa,Eh=(Pa=class extends gn{constructor(t,n){super();k(this,z);k(this,he);k(this,U);k(this,In);k(this,le);k(this,Dt);k(this,cn);k(this,at);k(this,ct);k(this,Mn);k(this,ln);k(this,un);k(this,kt);k(this,Lt);k(this,lt);k(this,dn,new Set);this.options=n,O(this,he,t),O(this,ct,null),O(this,at,Bo()),this.options.experimental_prefetchInRender||b(this,at).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(b(this,U).addObserver(this),Pi(b(this,U),this.options)?$(this,z,Sn).call(this):this.updateResult(),$(this,z,Vo).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Qo(b(this,U),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Qo(b(this,U),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,$(this,z,zo).call(this),$(this,z,qo).call(this),b(this,U).removeObserver(this)}setOptions(t){const n=this.options,r=b(this,U);if(this.options=b(this,he).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof _e(this.options.enabled,b(this,U))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");$(this,z,Go).call(this),b(this,U).setOptions(this.options),n._defaulted&&!Ar(this.options,n)&&b(this,he).getQueryCache().notify({type:"observerOptionsUpdated",query:b(this,U),observer:this});const o=this.hasListeners();o&&Ai(b(this,U),r,this.options,n)&&$(this,z,Sn).call(this),this.updateResult(),o&&(b(this,U)!==r||_e(this.options.enabled,b(this,U))!==_e(n.enabled,b(this,U))||pt(this.options.staleTime,b(this,U))!==pt(n.staleTime,b(this,U)))&&$(this,z,Uo).call(this);const s=$(this,z,Ho).call(this);o&&(b(this,U)!==r||_e(this.options.enabled,b(this,U))!==_e(n.enabled,b(this,U))||s!==b(this,lt))&&$(this,z,Wo).call(this,s)}getOptimisticResult(t){const n=b(this,he).getQueryCache().build(b(this,he),t),r=this.createResult(n,t);return _h(this,r)&&(O(this,le,r),O(this,cn,this.options),O(this,Dt,b(this,U).state)),r}getCurrentResult(){return b(this,le)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),Reflect.get(r,o))})}trackProp(t){b(this,dn).add(t)}getCurrentQuery(){return b(this,U)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=b(this,he).defaultQueryOptions(t),r=b(this,he).getQueryCache().build(b(this,he),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return $(this,z,Sn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),b(this,le)))}createResult(t,n){var M;const r=b(this,U),o=this.options,s=b(this,le),i=b(this,Dt),a=b(this,cn),l=t!==r?t.state:b(this,In),{state:d}=t;let p={...d},h=!1,m;if(n._optimisticResults){const N=this.hasListeners(),Q=!N&&Pi(t,n),K=N&&Ai(t,r,n,o);(Q||K)&&(p={...p,..._c(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:w,errorUpdatedAt:f,status:y}=p;m=p.data;let C=!1;if(n.placeholderData!==void 0&&m===void 0&&y==="pending"){let N;s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(N=s.data,C=!0):N=typeof n.placeholderData=="function"?n.placeholderData((M=b(this,un))==null?void 0:M.state.data,b(this,un)):n.placeholderData,N!==void 0&&(y="success",m=Fo(s==null?void 0:s.data,N,n),h=!0)}if(n.select&&m!==void 0&&!C)if(s&&m===(i==null?void 0:i.data)&&n.select===b(this,Mn))m=b(this,ln);else try{O(this,Mn,n.select),m=n.select(m),m=Fo(s==null?void 0:s.data,m,n),O(this,ln,m),O(this,ct,null)}catch(N){O(this,ct,N)}b(this,ct)&&(w=b(this,ct),m=b(this,ln),f=Date.now(),y="error");const x=p.fetchStatus==="fetching",S=y==="pending",_=y==="error",R=S&&x,A=m!==void 0,I={status:y,fetchStatus:p.fetchStatus,isPending:S,isSuccess:y==="success",isError:_,isInitialLoading:R,isLoading:R,data:m,dataUpdatedAt:p.dataUpdatedAt,error:w,errorUpdatedAt:f,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>l.dataUpdateCount||p.errorUpdateCount>l.errorUpdateCount,isFetching:x,isRefetching:x&&!S,isLoadingError:_&&!A,isPaused:p.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:_&&A,isStale:ms(t,n),refetch:this.refetch,promise:b(this,at)};if(this.options.experimental_prefetchInRender){const N=W=>{I.status==="error"?W.reject(I.error):I.data!==void 0&&W.resolve(I.data)},Q=()=>{const W=O(this,at,I.promise=Bo());N(W)},K=b(this,at);switch(K.status){case"pending":t.queryHash===r.queryHash&&N(K);break;case"fulfilled":(I.status==="error"||I.data!==K.value)&&Q();break;case"rejected":(I.status!=="error"||I.error!==K.reason)&&Q();break}}return I}updateResult(){const t=b(this,le),n=this.createResult(b(this,U),this.options);if(O(this,Dt,b(this,U).state),O(this,cn,this.options),b(this,Dt).data!==void 0&&O(this,un,b(this,U)),Ar(n,t))return;O(this,le,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!b(this,dn).size)return!0;const i=new Set(s??b(this,dn));return this.options.throwOnError&&i.add("error"),Object.keys(b(this,le)).some(a=>{const c=a;return b(this,le)[c]!==t[c]&&i.has(c)})};$(this,z,Tc).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&$(this,z,Vo).call(this)}},he=new WeakMap,U=new WeakMap,In=new WeakMap,le=new WeakMap,Dt=new WeakMap,cn=new WeakMap,at=new WeakMap,ct=new WeakMap,Mn=new WeakMap,ln=new WeakMap,un=new WeakMap,kt=new WeakMap,Lt=new WeakMap,lt=new WeakMap,dn=new WeakMap,z=new WeakSet,Sn=function(t){$(this,z,Go).call(this);let n=b(this,U).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ue)),n},Uo=function(){$(this,z,zo).call(this);const t=pt(this.options.staleTime,b(this,U));if(Mt||b(this,le).isStale||!Mo(t))return;const r=vc(b(this,le).dataUpdatedAt,t)+1;O(this,kt,setTimeout(()=>{b(this,le).isStale||this.updateResult()},r))},Ho=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(b(this,U)):this.options.refetchInterval)??!1},Wo=function(t){$(this,z,qo).call(this),O(this,lt,t),!(Mt||_e(this.options.enabled,b(this,U))===!1||!Mo(b(this,lt))||b(this,lt)===0)&&O(this,Lt,setInterval(()=>{(this.options.refetchIntervalInBackground||ps.isFocused())&&$(this,z,Sn).call(this)},b(this,lt)))},Vo=function(){$(this,z,Uo).call(this),$(this,z,Wo).call(this,$(this,z,Ho).call(this))},zo=function(){b(this,kt)&&(clearTimeout(b(this,kt)),O(this,kt,void 0))},qo=function(){b(this,Lt)&&(clearInterval(b(this,Lt)),O(this,Lt,void 0))},Go=function(){const t=b(this,he).getQueryCache().build(b(this,he),this.options);if(t===b(this,U))return;const n=b(this,U);O(this,U,t),O(this,In,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Tc=function(t){oe.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(b(this,le))}),b(this,he).getQueryCache().notify({query:b(this,U),type:"observerResultsUpdated"})})},Pa);function Sh(e,t){return _e(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Pi(e,t){return Sh(e,t)||e.state.data!==void 0&&Qo(e,t,t.refetchOnMount)}function Qo(e,t,n){if(_e(t.enabled,e)!==!1&&pt(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&ms(e,t)}return!1}function Ai(e,t,n,r){return(e!==t||_e(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ms(e,n)}function ms(e,t){return _e(t.enabled,e)!==!1&&e.isStaleByTime(pt(t.staleTime,e))}function _h(e,t){return!Ar(e.getCurrentResult(),t)}var ut,dt,pe,ze,Ge,Cr,Ko,Aa,Rh=(Aa=class extends gn{constructor(n,r){super();k(this,Ge);k(this,ut);k(this,dt);k(this,pe);k(this,ze);O(this,ut,n),this.setOptions(r),this.bindMethods(),$(this,Ge,Cr).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=b(this,ut).defaultMutationOptions(n),Ar(this.options,r)||b(this,ut).getMutationCache().notify({type:"observerOptionsUpdated",mutation:b(this,pe),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Nt(r.mutationKey)!==Nt(this.options.mutationKey)?this.reset():((o=b(this,pe))==null?void 0:o.state.status)==="pending"&&b(this,pe).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=b(this,pe))==null||n.removeObserver(this)}onMutationUpdate(n){$(this,Ge,Cr).call(this),$(this,Ge,Ko).call(this,n)}getCurrentResult(){return b(this,dt)}reset(){var n;(n=b(this,pe))==null||n.removeObserver(this),O(this,pe,void 0),$(this,Ge,Cr).call(this),$(this,Ge,Ko).call(this)}mutate(n,r){var o;return O(this,ze,r),(o=b(this,pe))==null||o.removeObserver(this),O(this,pe,b(this,ut).getMutationCache().build(b(this,ut),this.options)),b(this,pe).addObserver(this),b(this,pe).execute(n)}},ut=new WeakMap,dt=new WeakMap,pe=new WeakMap,ze=new WeakMap,Ge=new WeakSet,Cr=function(){var r;const n=((r=b(this,pe))==null?void 0:r.state)??Rc();O(this,dt,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Ko=function(n){oe.batch(()=>{var r,o,s,i,a,c,l,d;if(b(this,ze)&&this.hasListeners()){const p=b(this,dt).variables,h=b(this,dt).context;(n==null?void 0:n.type)==="success"?((o=(r=b(this,ze)).onSuccess)==null||o.call(r,n.data,p,h),(i=(s=b(this,ze)).onSettled)==null||i.call(s,n.data,null,p,h)):(n==null?void 0:n.type)==="error"&&((c=(a=b(this,ze)).onError)==null||c.call(a,n.error,p,h),(d=(l=b(this,ze)).onSettled)==null||d.call(l,void 0,n.error,p,h))}this.listeners.forEach(p=>{p(b(this,dt))})})},Aa),Pc=g.createContext(void 0),gs=e=>{const t=g.useContext(Pc);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Th=({client:e,children:t})=>(g.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(Pc.Provider,{value:e,children:t})),Ac=g.createContext(!1),Ph=()=>g.useContext(Ac);Ac.Provider;function Ah(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Oh=g.createContext(Ah()),jh=()=>g.useContext(Oh),Dh=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},kh=e=>{g.useEffect(()=>{e.clearReset()},[e])},Lh=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||wc(n,[e.error,r])),Ih=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Mh=(e,t)=>e.isLoading&&e.isFetching&&!t,Nh=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Oi=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function $h(e,t,n){var p,h,m,w,f;if(typeof e!="object"||Array.isArray(e))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=Ph(),o=jh(),s=gs(),i=s.defaultQueryOptions(e);(h=(p=s.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||h.call(p,i),i.queryFn||console.error(`[${i.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`),i._optimisticResults=r?"isRestoring":"optimistic",Ih(i),Dh(i,o),kh(o);const a=!s.getQueryCache().get(i.queryHash),[c]=g.useState(()=>new t(s,i)),l=c.getOptimisticResult(i),d=!r&&e.subscribed!==!1;if(g.useSyncExternalStore(g.useCallback(y=>{const C=d?c.subscribe(oe.batchCalls(y)):ue;return c.updateResult(),C},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),g.useEffect(()=>{c.setOptions(i)},[i,c]),Nh(i,l))throw Oi(i,c,o);if(Lh({result:l,errorResetBoundary:o,throwOnError:i.throwOnError,query:s.getQueryCache().get(i.queryHash),suspense:i.suspense}))throw l.error;if((w=(m=s.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||w.call(m,i,l),i.experimental_prefetchInRender&&!Mt&&Mh(l,r)){const y=a?Oi(i,c,o):(f=s.getQueryCache().get(i.queryHash))==null?void 0:f.promise;y==null||y.catch(ue).finally(()=>{c.updateResult()})}return i.notifyOnChangeProps?l:c.trackResult(l)}function ji(e,t){return $h(e,Eh)}function tr(e,t){const n=gs(),[r]=g.useState(()=>new Rh(n,e));g.useEffect(()=>{r.setOptions(e)},[r,e]);const o=g.useSyncExternalStore(g.useCallback(i=>r.subscribe(oe.batchCalls(i)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=g.useCallback((i,a)=>{r.mutate(i,a).catch(ue)},[r]);if(o.error&&wc(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const nr={STALE_TIME:1e3*60*5,GC_TIME:1e3*60*10,RETRY_COUNT:1,RETRY_DELAY:1e3},Di={refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchOnMount:!1,staleTime:nr.STALE_TIME,gcTime:nr.GC_TIME,retry:nr.RETRY_COUNT,retryDelay:nr.RETRY_DELAY,enable:!0},rr=e=>e instanceof Error?e.message:String(e),Oc=(e,t,n)=>{const r=gs(),{notify:o}=fs(),{createFn:s,readFn:i,readByIdFn:a,updateFn:c,deleteFn:l,partialUpdateFn:d}=n,p=()=>{r.invalidateQueries({queryKey:[e]})},h=(_,R,A,T)=>o(T!=null&&T.overrideSuccessMessage?T==null?void 0:T.overrideSuccessMessage(_,R):A,"success"),m=(_,R,A,T)=>o(T!=null&&T.overrideErrorMessage?T==null?void 0:T.overrideErrorMessage(_,R):A,"error");return{useCreate:_=>tr({mutationFn:R=>s(R),onSuccess:R=>{p(),h(t,R,`${t} created successfully`,_)},onError:R=>{m(t,R,`Error creating ${t}: ${rr(R)}`,_)}}),useReadQuery:_=>ji({queryKey:[e],queryFn:i,...Di,..._}),useReadByIdQuery:(_,R)=>ji({queryKey:[e,_],queryFn:()=>a(_),...Di,enabled:!!_,...R}),useUpdate:_=>tr({mutationFn:({id:R,data:A})=>c(R,A),onSuccess:R=>{p(),h(t,R,`${t} updated successfully`,_)},onError:R=>{m(t,R,`Error updating ${t}: ${rr(R)}`,_)}}),usePartialUpdate:_=>d&&tr({mutationFn:({id:R,data:A})=>d(R,A),onSuccess:R=>{p(),h(t,R,`${t} updated successfully`,_)},onError:R=>{m(t,R,`Error updating ${t}: ${rr(R)}`,_)}}),useDelete:_=>tr({mutationFn:R=>l(R),onSuccess:()=>{p(),h(t,null,`${t} deleted successfully`,_)},onError:R=>{m(t,R,`Error deleting ${t}: ${rr(R)}`,_)}}),invalidateQueries:p}},Fh=(e,t)=>Oc(e,t,{createFn:n=>fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then(r=>r.json()),deleteFn:n=>fetch(`${e}/${n}`,{method:"DELETE"}).then(r=>{if(!r.ok)throw new Error(`Error deleting: ${r.status}`)}),readByIdFn:n=>fetch(`${e}/${n}`).then(r=>r.json()),readFn:()=>fetch(e).then(n=>n.json()),updateFn:(n,r)=>fetch(`${e}/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then(o=>o.json()),partialUpdateFn:(n,r)=>fetch(`${e}/${n}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then(o=>o.json())}),Bh={SINGLE_TENANT:"single-tenant"},Uh={COOKIE:"cookie"},po="tenant",ki="tenant",Li="tenant",Hh=Bh.SINGLE_TENANT,Wh=Uh.COOKIE,Vh={mode:Hh,clientSideMode:Wh,tenantIDPProvisioningStrategy:"none"};class zh{setTenant(t,n){const r=new URL(window.location.href);r.searchParams.set(ki,t.name),window.location.href=r.toString()}getCurrentTenantName(){const t=new URL(window.location.href);return new URLSearchParams(t.search).get(ki)}}class qh{setTenant(t,n){sessionStorage.setItem(Li,t.name),window.location.reload()}getCurrentTenantName(){return sessionStorage.getItem(Li)}}/*! js-cookie v3.0.5 | MIT */function or(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Gh={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Yo(e,t){function n(o,s,i){if(!(typeof document>"u")){i=or({},t,i),typeof i.expires=="number"&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&(i.expires=i.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in i)i[c]&&(a+="; "+c,i[c]!==!0&&(a+="="+i[c].split(";")[0]));return document.cookie=o+"="+e.write(s,o)+a}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],i={},a=0;a<s.length;a++){var c=s[a].split("="),l=c.slice(1).join("=");try{var d=decodeURIComponent(c[0]);if(i[d]=e.read(l,d),o===d)break}catch{}}return o?i[o]:i}}return Object.create({set:n,get:r,remove:function(o,s){n(o,"",or({},s,{expires:-1}))},withAttributes:function(o){return Yo(this.converter,or({},this.attributes,o))},withConverter:function(o){return Yo(or({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var mo=Yo(Gh,{path:"/"});class Qh{setTenant(t,n){t?mo.set(po,t.name):mo.remove(po),window.location.reload()}getCurrentTenantName(){return mo.get(po)}}class Kh{extractSubdomain(t){if(t==="localhost"||/^\d+\.\d+\.\d+\.\d+$/.test(t))return"";const n=t.split(".");if(n.length<2||n.length===2||n[0]==="www"&&n.length===3)return"";const o=(n[0]==="www"?n.slice(1):n).slice(0,-2);return o.length>0?o.join("."):""}getBaseDomain(t){const n=t.split(".");return t==="localhost"||/^\d+\.\d+\.\d+\.\d+$/.test(t)||n.length<=2?t:n.slice(-2).join(".")}setTenant(t,n){var l;const r=(l=n.urlPatterns)==null?void 0:l.find(d=>d.patternType==="subdomain"&&d.tenantId===t.id&&d.isActive);if(!r)throw new Error(`No active subdomain pattern found for tenant '${t.name}'`);const o=new URL(window.location.href),s=r.patternValue,i=o.hostname,a=this.getBaseDomain(i),c=s?`${s}.${a}`:a;o.hostname=c,window.location.href=o.toString()}getCurrentTenantName(){const t=window.location.hostname;return this.extractSubdomain(t)||null}}const Ii={queryParams:new zh,sessionStorage:new qh,cookie:new Qh,subdomain:new Kh},Yh=e=>{const t=Ii[e.clientSideMode];if(!t)throw new Error(`Client side tenant mode '${e.clientSideMode}' is not supported ${JSON.stringify({strategies:Ii},null,2)}`);return t},Zh=(e,t,n)=>{const r=t.find(s=>s.name===n);if(!r)throw Error("No tenant permission");return Yh(e).setTenant(r,e),r},Xh=()=>{const[e,t]=Br(),{tenants:n=[],currentTenant:r,tenantConfig:o=Vh}=e,s=E.useCallback(i=>{const a=Zh(o,n,i);t({...e,currentTenant:a})},[o,e]);return{tenants:n,currentTenant:r,tenantConfig:o,selectTenant:s}};function Jh(e){if(!e.ok)throw console.error(e),new Error(e.statusText)}async function sr(e,t,n,r){const o=await e(`/user-states/${encodeURIComponent(t)}/${encodeURIComponent(n)}`,r);return Jh(o),o}class ir{static async get(t,n,r){const s=await sr(t,n,r,{method:"GET",headers:{"Content-Type":"application/json"}});return s.status===204?null:await s.json()}static async create(t,n,r,o){const s={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:o})};return await(await sr(t,n,r,s)).json()}static async update(t,n,r,o){const s={method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:o})};return await(await sr(t,n,r,s)).json()}static async delete(t,n,r){return await sr(t,n,r,{method:"DELETE",headers:{"Content-Type":"application/json"}}),null}}const ep=e=>{const t=ds("@bluealba/pae-nestjs-gateway-service"),n=tc();if(!n)throw new Error("You must call the useUserState hook within a PAE application.");const[r,o]=E.useState(null),[s,i]=E.useState(!1),[a,c]=E.useState(!1),[l,d]=E.useState(null),p=(x,S)=>E.useCallback(async({newValue:_,shouldThrowError:R}={})=>{try{c(!0),d(null);const A=await x(t,n,e,_);return o(A),A?A.value:null}catch(A){if(d(A==null?void 0:A.message),console.error(`Failed to ${S} ${e}:`,A),R)throw A;return null}finally{c(!1)}},[t,n,e]),h=p(ir.get,"fetch"),m=p(ir.create,"create"),w=p(ir.update,"update"),f=p(ir.delete,"delete"),y=E.useCallback(async()=>{try{await h()}finally{i(!0)}},[h]);E.useEffect(()=>{y()},[y]);const C=E.useCallback(async(x,S=!1)=>r==null?await m({newValue:x,shouldThrowError:S}):await w({newValue:x,shouldThrowError:S}),[r,m,w]);return{value:r?r.value:null,hasFetched:s,loading:a,error:l,setValue:C,createValue:m,updateValue:w,deleteValue:f}},jc="__PAE_EXTENSION_POINT_REACT_CONTENT_EMPTY__",tp=({module:e,point:t,children:n})=>(sc(e,t,n??jc),null),Dc=({name:e,children:t,...n})=>{const r=oc(e);if(r===jc)return null;if(!r)return u.jsx(u.Fragment,{children:t??null});if(np(r)){const o=r;return u.jsx(o,{...n})}else return r},np=e=>typeof e=="function",rp=(e,t)=>{const n=r=>(t=t||e.displayName||e.name||"?",u.jsx(Dc,{name:t,...r,children:u.jsx(e,{...r})}));return n.displayName=`extensionPoint(${t})`,n},Mi="single-spa:app-change";function op(){const[e,t]=E.useState(Ni());return E.useEffect(()=>{const n=()=>{t(Ni())};return window.addEventListener(Mi,n),()=>{window.removeEventListener(Mi,n)}},[]),e}function Ni(){return gr.getAppNames().reduce((t,n)=>(gr.getAppStatus(n)?t[n]=gr.getAppStatus(n):t[n]="NOT_LOADED",t),{})}function sp(e){const n=op()[e]??"LOAD_ERROR";return{statusName:n,isLoading:n==="LOADING_SOURCE_CODE"||n==="BOOTSTRAPPING"||n==="MOUNTING",isMounted:n==="MOUNTED",isBroken:n==="SKIP_BECAUSE_BROKEN"||n==="LOAD_ERROR"}}const kc=({appName:e})=>u.jsx("div",{children:u.jsxs("p",{children:["Loading ",e,"..."]})});kc.displayName="BaseLoading";const Lc=({appName:e})=>u.jsxs("div",{children:[u.jsx("p",{children:"Something went wrong..."}),u.jsxs("p",{children:["Failed to load ",e]})]});Lc.displayName="BaseError";const ip={display:"flex",flexDirection:"column",flex:1},Ic=E.forwardRef((e,t)=>u.jsx("div",{ref:t,style:ip,...e}));Ic.displayName="BaseContainer";const ap="pae-app:",Mc=E.forwardRef(({appName:e,LoadingComponent:t=kc,ErrorComponent:n=Lc,ContainerComponent:r=Ic,...o},s)=>{const i=sp(e);return u.jsxs(r,{ref:s,...o,id:`${ap}${e}`,children:[i.isLoading&&u.jsx(t,{appName:e}),i.isBroken&&u.jsx(n,{appName:e})]})});Mc.displayName="ModulePlaceHolder";const ys=({operations:e,children:t,forbiddenContent:n})=>{var o;const{hasAccess:r}=Ur();if(!r(...e)){if(!n)return null;if(typeof n=="function")if((o=n==null?void 0:n.prototype)!=null&&o.isReactComponent){const s=n;return u.jsx(s,{operations:e})}else return n({operations:e});return E.isValidElement(n)?n:null}return t};ys.displayName="Authorized";const cp=({eventName:e,listener:t})=>(ic(e,t),null),lp=()=>u.jsx("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:u.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",d:"M8.737 8.737a21.49 21.49 0 0 1 3.308-2.724m0 0c3.063-2.026 5.99-2.641 7.331-1.3 1.827 1.828.026 6.591-4.023 10.64-4.049 4.049-8.812 5.85-10.64 4.023-1.33-1.33-.736-4.218 1.249-7.253m6.083-6.11c-3.063-2.026-5.99-2.641-7.331-1.3-1.827 1.828-.026 6.591 4.023 10.64m3.308-9.34a21.497 21.497 0 0 1 3.308 2.724m2.775 3.386c1.985 3.035 2.579 5.923 1.248 7.253-1.336 1.337-4.245.732-7.295-1.275M14 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"})}),Nc=({applicationName:e})=>{const t=Ya(e);if(t)if(typeof t=="function"){const n=t;return u.jsx(n,{})}else return t;return u.jsx(lp,{})};Nc.displayName="ApplicationIcon";const up=(e,t)=>{const n=r=>u.jsx(ys,{operations:t,children:u.jsx(e,{...r})});return n.displayName="Authorized",n};function $c(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=$c(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function D(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=$c(e))&&(r&&(r+=" "),r+=t);return r}const dp="spinner__fakUN",fp="spinner-rotation__wUmPV",hp="button__8FA9H",pp="button--contained-primary__stkTx",mp="button--outlined-primary__KZ1ww",gp="button--text-primary__GLTfm",yp="button--contained-danger__L9ehT",vp="button--outlined-danger__eoYLd",bp="button--text-danger__Sw-ha",wp="icon__--umH",ar={spinner:dp,"spinner-rotation":"spinner-rotation__wUmPV",spinnerRotation:fp,button:hp,"button--contained-primary":"button--contained-primary__stkTx",buttonContainedPrimary:pp,"button--outlined-primary":"button--outlined-primary__KZ1ww",buttonOutlinedPrimary:mp,"button--text-primary":"button--text-primary__GLTfm",buttonTextPrimary:gp,"button--contained-danger":"button--contained-danger__L9ehT",buttonContainedDanger:yp,"button--outlined-danger":"button--outlined-danger__eoYLd",buttonOutlinedDanger:vp,"button--text-danger":"button--text-danger__Sw-ha",buttonTextDanger:bp,icon:wp},Dr=E.forwardRef(({variant:e="contained",colorScheme:t="primary",loading:n=!1,IconComponent:r,className:o,children:s,...i},a)=>{const c=D(ar.button,ar[`button--${e}-${t}`],o);return u.jsxs("button",{ref:a,className:c,...i,children:[n?u.jsx("div",{className:ar.spinner}):r&&u.jsx(r,{className:ar.icon}),s]})});Dr.displayName="Button";const Cp="Badges__5jpum",xp="Badges__5jpum",Ep="Badge__95MWM",Sp="Badge__95MWM",_p="Badge--primary__Rx-bS",Rp="Badge--secondary__d92bT",Tp="Badge--success__Kdo98",Pp="Badge--warning__bf-Nn",Ap="Badge--danger__HTj39",Op="Badge--small__y93Pj",jp="Badge--regular__aT5AL",Dp="Badge--large__wORCH",xr={Badges:Cp,badges:xp,Badge:Ep,badge:Sp,"Badge--primary":"Badge--primary__Rx-bS",badgePrimary:_p,"Badge--secondary":"Badge--secondary__d92bT",badgeSecondary:Rp,"Badge--success":"Badge--success__Kdo98",badgeSuccess:Tp,"Badge--warning":"Badge--warning__bf-Nn",badgeWarning:Pp,"Badge--danger":"Badge--danger__HTj39",badgeDanger:Ap,"Badge--small":"Badge--small__y93Pj",badgeSmall:Op,"Badge--regular":"Badge--regular__aT5AL",badgeRegular:jp,"Badge--large":"Badge--large__wORCH",badgeLarge:Dp},$i={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var Fi={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function kp(e){var d,p;var t,n=[],r=1,o;if(typeof e=="number")return{space:"rgb",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(typeof e=="number")return{space:"rgb",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(e=String(e).toLowerCase(),$i[e])n=$i[e].slice(),o="rgb";else if(e==="transparent")r=0,o="rgb",n=[0,0,0];else if(e[0]==="#"){var s=e.slice(1),i=s.length,a=i<=4;r=1,a?(n=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],i===4&&(r=parseInt(s[3]+s[3],16)/255)):(n=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],i===8&&(r=parseInt(s[6]+s[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),o="rgb"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(e)){var c=t[1];o=c.replace(/a$/,"");var l=o==="cmyk"?4:o==="gray"?1:3;n=t[2].trim().split(/\s*[,\/]\s*|\s+/),o==="color"&&(o=n.shift()),n=n.map(function(h,m){if(h[h.length-1]==="%")return h=parseFloat(h)/100,m===3?h:o==="rgb"?h*255:o[0]==="h"||o[0]==="l"&&!m?h*100:o==="lab"?h*125:o==="lch"?m<2?h*150:h*360:o[0]==="o"&&!m?h:o==="oklab"?h*.4:o==="oklch"?m<2?h*.4:h*360:h;if(o[m]==="h"||m===2&&o[o.length-1]==="h"){if(Fi[h]!==void 0)return Fi[h];if(h.endsWith("deg"))return parseFloat(h);if(h.endsWith("turn"))return parseFloat(h)*360;if(h.endsWith("grad"))return parseFloat(h)*360/400;if(h.endsWith("rad"))return parseFloat(h)*180/Math.PI}return h==="none"?0:parseFloat(h)}),r=n.length>l?n.pop():1}else/[0-9](?:\s|\/|,)/.test(e)&&(n=e.match(/([0-9]+)/g).map(function(h){return parseFloat(h)}),o=((p=(d=e.match(/([a-z])/ig))==null?void 0:d.join(""))==null?void 0:p.toLowerCase())||"rgb");return{space:o,values:n,alpha:r}}const Lp=(e,t)=>{const{space:n,values:r}=kp(e);return n[0]==="h"?`${n}a(${r[0]}, ${r[1]}%, ${r[2]}%, ${t})`:`${n}a(${r}, ${t})`},vs=E.forwardRef(({children:e,color:t,className:n,customColor:r,size:o="small",style:s,...i},a)=>{const c=r?{color:r,background:Lp(r,.1)}:{},l=D(xr.Badge,xr[`Badge--${o}`],{[xr[`Badge--${t}`]]:!!t},n);return u.jsx("span",{ref:a,className:l,style:{...s,...c},...i,children:e})});vs.displayName="Badge";const bs=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(xr.Badges,t);return u.jsx("div",{ref:r,className:o,...n,children:e})});bs.displayName="Badges";const Fc=({size:e=24,color:t="currentColor",strokeWidth:n=2,className:r,style:o,...s})=>u.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",className:r,style:o,...s,children:[u.jsx("rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",ry:"1"}),u.jsx("path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"})]}),Bc=({size:e=24,color:t="currentColor",strokeWidth:n=2,className:r,style:o,...s})=>u.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",className:r,style:o,...s,children:[u.jsx("rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",ry:"1"}),u.jsx("path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"}),u.jsx("path",{d:"m9 12 2 2 4-4"})]}),Ip="CopyToClipboardButton__2Nd2m",Mp={CopyToClipboardButton:Ip},Np=({content:e})=>{const[t,n]=$p(),{notify:r}=fs(),o=t?Bc:Fc,s=E.useCallback(async()=>{await n(e)&&r("Copied to the Clipboard !","success")},[e,r]);return u.jsx(o,{className:Mp.CopyToClipboardButton,size:18,onClick:s})},$p=()=>{const[e,t]=E.useState(!1);return[e,async r=>{try{return await navigator.clipboard.writeText(r),t(!0),setTimeout(()=>t(!1),2e3),!0}catch(o){return console.error("Failed to copy text: ",o),!1}}]},Fp="FieldGroup__Q2JCV",Bp="FieldGroup__Q2JCV",Up="FieldGroup--horizontal__kpfL1",Hp="FieldGroup--vertical__FLo-Q",Bi={FieldGroup:Fp,fieldGroup:Bp,"FieldGroup--horizontal":"FieldGroup--horizontal__kpfL1",fieldGroupHorizontal:Up,"FieldGroup--vertical":"FieldGroup--vertical__FLo-Q",fieldGroupVertical:Hp},Uc=E.forwardRef(({children:e,className:t,orientation:n="vertical",...r},o)=>{const s=D(Bi.FieldGroup,Bi[`FieldGroup--${n}`],t);return u.jsx("div",{ref:o,className:s,...r,children:e})});Uc.displayName="FieldGroup";const Wp="Input__uS0sb",Ui={Input:Wp,Error:"Error__-DQpw"},qr=E.forwardRef(({className:e,error:t,...n},r)=>{const o=D(Ui.Input,t&&Ui.Error,e);return u.jsx("input",{ref:r,className:o,...n})});qr.displayName="Input";const Vp={Error:"Error__N4OP5"},Hc=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Vp.Error,t);return u.jsx("span",{ref:r,className:o,...n,children:e})});Hc.displayName="InputError";const zp="Label__VYUvW",Hi={Label:zp,Error:"Error__Eu6DI"},Wc=E.forwardRef(({children:e,className:t,error:n,...r},o)=>{const s=D(Hi.Label,n&&Hi.Error,t);return u.jsx("label",{ref:o,className:s,...r,children:e})});Wc.displayName="Label";const qp="Select__giqpe",Gp="Chevron__YvhBd",Zo={Select:qp,Chevron:Gp},Vc=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Zo.Option,t);return u.jsx("option",{ref:r,className:o,...n,children:e})});Vc.displayName="Option";const ws=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Zo.Select,t);return u.jsxs("div",{className:o,children:[u.jsx("select",{ref:r,...n,children:e}),u.jsx("div",{className:Zo.Chevron,children:u.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("path",{d:"M4 6L8 10L12 6",stroke:"#818181",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})})})]})});ws.displayName="Select";ws.Option=Vc;const Qp="TextArea__pa-A0",Kp={TextArea:Qp},zc=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Kp.TextArea,t);return u.jsx("textarea",{ref:r,className:o,...n,children:e})});zc.displayName="TextArea";const Yp="SearchInput__4OFyE",Zp="SearchIcon__YgnQy",Xp="ClearIcon__ukRVr",Jp="SearchInput__ClearIcon__uzVoc",e1="SearchInput__SearchIcon__zoDG4",En={SearchInput:Yp,SearchIcon:Zp,ClearIcon:Xp,SearchInput__ClearIcon:Jp,SearchInput__SearchIcon:e1},Cs=E.forwardRef(({className:e,placeholder:t="Type to search...",showClearButton:n=!1,showSearchIcon:r=!0,onClear:o,...s},i)=>{const a=D(En.SearchInput,n&&En.SearchInput__ClearIcon,r&&En.SearchInput__SearchIcon,e),c=D(En.SearchIcon),l=D(En.ClearIcon);return u.jsxs("div",{className:a,children:[u.jsx(qr,{ref:i,type:"text",placeholder:t,...s}),r&&u.jsx("svg",{className:c,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("path",{d:"M13 13L10.6667 10.6667M12.3333 6.66667C12.3333 9.79628 9.79628 12.3333 6.66667 12.3333C3.53705 12.3333 1 9.79628 1 6.66667C1 3.53705 3.53705 1 6.66667 1C9.79628 1 12.3333 3.53705 12.3333 6.66667Z",stroke:"#A4A4A4",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})}),n&&u.jsx("svg",{className:l,width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:o,children:u.jsx("path",{d:"M7.33334 0.666748L0.666672 7.33341M0.666672 0.666748L7.33334 7.33341",stroke:"#818181",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})})]})});Cs.displayName="SearchInput";const t1="SearchAutocomplete__vR9Hk",n1="AutocompleteItem__YIm7R",r1="AutocompleteHighlighter__LAFTV",o1="AutocompleteHighlighter__match__Wy1o2",s1="DropdownList__-fHIk",i1="AutocompleteItemDescription__4QYN5",It={SearchAutocomplete:t1,AutocompleteItem:n1,"AutocompleteItem--canBeSelected":"AutocompleteItem--canBeSelected__jxk4z",AutocompleteHighlighter:r1,AutocompleteHighlighter__match:o1,DropdownList:s1,AutocompleteItemDescription:i1},a1="DropdownList__QTXXX",c1="DropdownList__QTXXX",l1="DropdownList--closed__pdL1Z",u1="DropdownList--open__opzc9",d1="DropdownList--left__xSwXR",Rt={DropdownList:a1,dropdownList:c1,"DropdownList--closed":"DropdownList--closed__pdL1Z",dropdownListClosed:l1,"DropdownList--open":"DropdownList--open__opzc9",dropdownListOpen:u1,"DropdownList--left":"DropdownList--left__xSwXR",dropdownListLeft:d1},Gr=E.forwardRef(({children:e,className:t,open:n,align:r="right",...o},s)=>{const i=D(Rt.DropdownList,{[Rt["DropdownList--open"]]:n,[Rt["DropdownList--closed"]]:!n,[Rt["DropdownList--left"]]:r==="left"},t);return u.jsx("div",{ref:s,className:i,...o,children:e})});Gr.displayName="DropdownList";const _n=E.forwardRef(({children:e,className:t,canBeSelected:n=!1,...r},o)=>{const s=D(It.AutocompleteItem,{[It["AutocompleteItem--canBeSelected"]]:n},t);return u.jsx("div",{ref:o,className:s,...r,children:e})});_n.displayName="AutocompleteItem";const f1=300,h1={query:"",suggestions:[],loading:!1,error:null},p1=({suggestionFetcher:e,canAdd:t})=>{const[n,r]=E.useState(h1);return E.useEffect(()=>{r(a=>({...a,loading:!0}));const s=async()=>{try{const a=await e(n.query);t&&!a.some(c=>c.value.toLowerCase()===n.query.toLowerCase())&&a.push({label:`Add "${n.query}"`,value:n.query,isNew:!0}),r(c=>({...c,suggestions:a,loading:!1}))}catch(a){r(c=>({...c,suggestions:[],error:a,loading:!1}))}},i=setTimeout(()=>{s()},f1);return()=>{clearTimeout(i)}},[n.query]),{...n,setQuery:s=>{r(i=>({...i,query:s}))}}},qc=E.forwardRef(({text:e,query:t,className:n,...r},o)=>{const s=D(It.AutocompleteHighlighter,n),i=(a,c)=>{const l=a.toLowerCase().indexOf(c.toLowerCase());if(l===-1||c.length===0)return a;const d=a.slice(0,l),p=a.slice(l,l+c.length),h=a.slice(l+c.length);return u.jsxs(u.Fragment,{children:[d,u.jsx("span",{className:It.AutocompleteHighlighter__match,children:p}),i(h,c)]})};return u.jsx("div",{ref:o,className:s,...r,children:i(e,t)})});qc.displayName="AutocompleteHighlighter";const m1=5,Gc=E.forwardRef(({children:e,className:t,canAdd:n,maxSuggestionsShown:r=m1,searchInputProps:o,keepSelectedOption:s,suggestionFetcher:i,onAccept:a,...c},l)=>{const{query:d,setQuery:p,suggestions:h,loading:m}=p1({suggestionFetcher:i,canAdd:n}),[w,f]=E.useState(null),y=d.length>0,C=T=>{p(T.target.value)},x=T=>{a==null||a(T),s?(f(T),p(T.value)):p("")},S=()=>{a==null||a(null),f(null),p("")},_=D(It.SearchAutocomplete,t),R=h.slice(0,r),A=h.slice(r);return u.jsxs("div",{ref:l,className:_,...c,children:[u.jsx(Cs,{...o,value:d,onChange:C,showClearButton:!!w,onClear:S}),e,u.jsxs(Gr,{className:It.DropdownList,open:y&&!w,role:"listbox","aria-label":"Suggestions",children:[m?u.jsx(_n,{children:"Loading..."}):R.map(T=>u.jsxs(_n,{canBeSelected:!0,onClick:x.bind(null,T),children:[u.jsx(qc,{text:T.label,query:d}),T.description&&u.jsx("span",{className:It.AutocompleteItemDescription,children:T.description})]},T.value)),!m&&A.length>0&&u.jsxs(_n,{children:[A.length," more results"]}),y&&h.length===0&&!m&&u.jsx(_n,{children:"No results found"})]})]})});Gc.displayName="SearchAutocomplete";const ft=e=>{let t=null,n=null;return E.Children.forEach(e.children,r=>{const o=r.props.condition;o===void 0?n=r:!t&&o===!0&&(t=r)}),u.jsx(u.Fragment,{children:t||n})};ft.displayName="Show";ft.When=({condition:e,children:t})=>u.jsx(u.Fragment,{children:e&&t});ft.Else=({render:e,children:t})=>u.jsx(u.Fragment,{children:e||t});function Wi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Qc(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Wi(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():Wi(e[o],null)}}}}function Ae(...e){return g.useCallback(Qc(...e),e)}function xs(e){const t=y1(e),n=g.forwardRef((r,o)=>{const{children:s,...i}=r,a=g.Children.toArray(s),c=a.find(b1);if(c){const l=c.props.children,d=a.map(p=>p===c?g.Children.count(l)>1?g.Children.only(null):g.isValidElement(l)?l.props.children:null:p);return u.jsx(t,{...i,ref:o,children:g.isValidElement(l)?g.cloneElement(l,void 0,d):null})}return u.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var g1=xs("Slot");function y1(e){const t=g.forwardRef((n,r)=>{const{children:o,...s}=n;if(g.isValidElement(o)){const i=C1(o),a=w1(s,o.props);return o.type!==g.Fragment&&(a.ref=r?Qc(r,i):i),g.cloneElement(o,a)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Kc=Symbol("radix.slottable");function v1(e){const t=({children:n})=>u.jsx(u.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Kc,t}function b1(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Kc}function w1(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]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function C1(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)}const x1="SkeletonListContainer__MKJhE",E1="Skeleton__Ovpiw",Yc={SkeletonListContainer:x1,Skeleton:E1},Qr=E.forwardRef((e,t)=>{const{children:n,className:r,loading:o,height:s=48,width:i,borderRadius:a,style:c,...l}=e;if(!o&&n)return n;const d=E.isValidElement(n)?g1:"span";return u.jsx(d,{ref:t,"aria-hidden":!0,className:D(Yc.Skeleton,r),style:{...c,width:i,minWidth:i,height:s,borderRadius:a},"data-inline-skeleton":E.isValidElement(n)?void 0:!0,tabIndex:-1,...l,children:n})});Qr.displayName="Skeleton";const Zc=e=>{const{numberOfItems:t,itemsGap:n=2,itemProps:r}=e,o=Array.from({length:t},(s,i)=>i+1);return u.jsx("div",{className:D(Yc.SkeletonListContainer),style:{gap:n},children:o.map(s=>u.jsx(Qr,{loading:!0,...r},s))})};Zc.displayName="SkeletonList";function me(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 S1(e,t){const n=g.createContext(t),r=s=>{const{children:i,...a}=s,c=g.useMemo(()=>a,Object.values(a));return u.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(s){const i=g.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Es(e,t=[]){let n=[];function r(s,i){const a=g.createContext(i),c=n.length;n=[...n,i];const l=p=>{var C;const{scope:h,children:m,...w}=p,f=((C=h==null?void 0:h[e])==null?void 0:C[c])||a,y=g.useMemo(()=>w,Object.values(w));return u.jsx(f.Provider,{value:y,children:m})};l.displayName=s+"Provider";function d(p,h){var f;const m=((f=h==null?void 0:h[e])==null?void 0:f[c])||a,w=g.useContext(m);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[l,d]}const o=()=>{const s=n.map(i=>g.createContext(i));return function(a){const c=(a==null?void 0:a[e])||s;return g.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,_1(o,...t)]}function _1(...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 i=r.reduce((a,{useScope:c,scopeName:l})=>{const p=c(s)[`__scope${l}`];return{...a,...p}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var R1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ge=R1.reduce((e,t)=>{const n=xs(`Primitive.${t}`),r=g.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function T1(e,t){e&&Da.flushSync(()=>e.dispatchEvent(t))}function fn(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function P1(e,t=globalThis==null?void 0:globalThis.document){const n=fn(e);g.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 A1="DismissableLayer",Xo="dismissableLayer.update",O1="dismissableLayer.pointerDownOutside",j1="dismissableLayer.focusOutside",Vi,Xc=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ss=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,l=g.useContext(Xc),[d,p]=g.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=g.useState({}),w=Ae(t,T=>p(T)),f=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),C=f.indexOf(y),x=d?f.indexOf(d):-1,S=l.layersWithOutsidePointerEventsDisabled.size>0,_=x>=C,R=L1(T=>{const I=T.target,M=[...l.branches].some(N=>N.contains(I));!_||M||(o==null||o(T),i==null||i(T),T.defaultPrevented||a==null||a())},h),A=I1(T=>{const I=T.target;[...l.branches].some(N=>N.contains(I))||(s==null||s(T),i==null||i(T),T.defaultPrevented||a==null||a())},h);return P1(T=>{x===l.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},h),g.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Vi=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),zi(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Vi)}},[d,h,n,l]),g.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),zi())},[d,l]),g.useEffect(()=>{const T=()=>m({});return document.addEventListener(Xo,T),()=>document.removeEventListener(Xo,T)},[]),u.jsx(ge.div,{...c,ref:w,style:{pointerEvents:S?_?"auto":"none":void 0,...e.style},onFocusCapture:me(e.onFocusCapture,A.onFocusCapture),onBlurCapture:me(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:me(e.onPointerDownCapture,R.onPointerDownCapture)})});Ss.displayName=A1;var D1="DismissableLayerBranch",k1=g.forwardRef((e,t)=>{const n=g.useContext(Xc),r=g.useRef(null),o=Ae(t,r);return g.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),u.jsx(ge.div,{...e,ref:o})});k1.displayName=D1;function L1(e,t=globalThis==null?void 0:globalThis.document){const n=fn(e),r=g.useRef(!1),o=g.useRef(()=>{});return g.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){Jc(O1,n,l,{discrete:!0})};const l={originalEvent:a};a.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},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function I1(e,t=globalThis==null?void 0:globalThis.document){const n=fn(e),r=g.useRef(!1);return g.useEffect(()=>{const o=s=>{s.target&&!r.current&&Jc(j1,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 zi(){const e=new CustomEvent(Xo);document.dispatchEvent(e)}function Jc(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?T1(o,s):o.dispatchEvent(s)}var mt=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},M1=g[" useId ".trim().toString()]||(()=>{}),N1=0;function Er(e){const[t,n]=g.useState(M1());return mt(()=>{n(r=>r??String(N1++))},[e]),t?`radix-${t}`:""}const $1=["top","right","bottom","left"],gt=Math.min,ve=Math.max,kr=Math.round,cr=Math.floor,Ne=e=>({x:e,y:e}),F1={left:"right",right:"left",bottom:"top",top:"bottom"},B1={start:"end",end:"start"};function Jo(e,t,n){return ve(e,gt(t,n))}function Ke(e,t){return typeof e=="function"?e(t):e}function Ye(e){return e.split("-")[0]}function yn(e){return e.split("-")[1]}function _s(e){return e==="x"?"y":"x"}function Rs(e){return e==="y"?"height":"width"}const U1=new Set(["top","bottom"]);function Me(e){return U1.has(Ye(e))?"y":"x"}function Ts(e){return _s(Me(e))}function H1(e,t,n){n===void 0&&(n=!1);const r=yn(e),o=Ts(e),s=Rs(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Lr(i)),[i,Lr(i)]}function W1(e){const t=Lr(e);return[es(e),t,es(t)]}function es(e){return e.replace(/start|end/g,t=>B1[t])}const qi=["left","right"],Gi=["right","left"],V1=["top","bottom"],z1=["bottom","top"];function q1(e,t,n){switch(e){case"top":case"bottom":return n?t?Gi:qi:t?qi:Gi;case"left":case"right":return t?V1:z1;default:return[]}}function G1(e,t,n,r){const o=yn(e);let s=q1(Ye(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(es)))),s}function Lr(e){return e.replace(/left|right|bottom|top/g,t=>F1[t])}function Q1(e){return{top:0,right:0,bottom:0,left:0,...e}}function el(e){return typeof e!="number"?Q1(e):{top:e,right:e,bottom:e,left:e}}function Ir(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 Qi(e,t,n){let{reference:r,floating:o}=e;const s=Me(t),i=Ts(t),a=Rs(i),c=Ye(t),l=s==="y",d=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let m;switch(c){case"top":m={x:d,y:r.y-o.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:p};break;case"left":m={x:r.x-o.width,y:p};break;default:m={x:r.x,y:r.y}}switch(yn(t)){case"start":m[i]-=h*(n&&l?-1:1);break;case"end":m[i]+=h*(n&&l?-1:1);break}return m}const K1=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:p}=Qi(l,r,c),h=r,m={},w=0;for(let f=0;f<a.length;f++){const{name:y,fn:C}=a[f],{x,y:S,data:_,reset:R}=await C({x:d,y:p,initialPlacement:r,placement:h,strategy:o,middlewareData:m,rects:l,platform:i,elements:{reference:e,floating:t}});d=x??d,p=S??p,m={...m,[y]:{...m[y],..._}},R&&w<=50&&(w++,typeof R=="object"&&(R.placement&&(h=R.placement),R.rects&&(l=R.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:d,y:p}=Qi(l,h,c)),f=-1)}return{x:d,y:p,placement:h,strategy:o,middlewareData:m}};async function An(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:h=!1,padding:m=0}=Ke(t,e),w=el(m),y=a[h?p==="floating"?"reference":"floating":p],C=Ir(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:c})),x=p==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),_=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},R=Ir(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:S,strategy:c}):x);return{top:(C.top-R.top+w.top)/_.y,bottom:(R.bottom-C.bottom+w.bottom)/_.y,left:(C.left-R.left+w.left)/_.x,right:(R.right-C.right+w.right)/_.x}}const Y1=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:l,padding:d=0}=Ke(e,t)||{};if(l==null)return{};const p=el(d),h={x:n,y:r},m=Ts(o),w=Rs(m),f=await i.getDimensions(l),y=m==="y",C=y?"top":"left",x=y?"bottom":"right",S=y?"clientHeight":"clientWidth",_=s.reference[w]+s.reference[m]-h[m]-s.floating[w],R=h[m]-s.reference[m],A=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let T=A?A[S]:0;(!T||!await(i.isElement==null?void 0:i.isElement(A)))&&(T=a.floating[S]||s.floating[w]);const I=_/2-R/2,M=T/2-f[w]/2-1,N=gt(p[C],M),Q=gt(p[x],M),K=N,W=T-f[w]-Q,q=T/2-f[w]/2+I,ne=Jo(K,q,W),Z=!c.arrow&&yn(o)!=null&&q!==ne&&s.reference[w]/2-(q<K?N:Q)-f[w]/2<0,X=Z?q<K?q-K:q-W:0;return{[m]:h[m]+X,data:{[m]:ne,centerOffset:q-ne-X,...Z&&{alignmentOffset:X}},reset:Z}}}),Z1=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:f=!0,...y}=Ke(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const C=Ye(o),x=Me(a),S=Ye(a)===a,_=await(c.isRTL==null?void 0:c.isRTL(l.floating)),R=h||(S||!f?[Lr(a)]:W1(a)),A=w!=="none";!h&&A&&R.push(...G1(a,f,w,_));const T=[a,...R],I=await An(t,y),M=[];let N=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&M.push(I[C]),p){const q=H1(o,i,_);M.push(I[q[0]],I[q[1]])}if(N=[...N,{placement:o,overflows:M}],!M.every(q=>q<=0)){var Q,K;const q=(((Q=s.flip)==null?void 0:Q.index)||0)+1,ne=T[q];if(ne&&(!(p==="alignment"?x!==Me(ne):!1)||N.every(F=>Me(F.placement)===x?F.overflows[0]>0:!0)))return{data:{index:q,overflows:N},reset:{placement:ne}};let Z=(K=N.filter(X=>X.overflows[0]<=0).sort((X,F)=>X.overflows[1]-F.overflows[1])[0])==null?void 0:K.placement;if(!Z)switch(m){case"bestFit":{var W;const X=(W=N.filter(F=>{if(A){const re=Me(F.placement);return re===x||re==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(re=>re>0).reduce((re,ye)=>re+ye,0)]).sort((F,re)=>F[1]-re[1])[0])==null?void 0:W[0];X&&(Z=X);break}case"initialPlacement":Z=a;break}if(o!==Z)return{reset:{placement:Z}}}return{}}}};function Ki(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Yi(e){return $1.some(t=>e[t]>=0)}const X1=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Ke(e,t);switch(r){case"referenceHidden":{const s=await An(t,{...o,elementContext:"reference"}),i=Ki(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Yi(i)}}}case"escaped":{const s=await An(t,{...o,altBoundary:!0}),i=Ki(s,n.floating);return{data:{escapedOffsets:i,escaped:Yi(i)}}}default:return{}}}}},tl=new Set(["left","top"]);async function J1(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Ye(n),a=yn(n),c=Me(n)==="y",l=tl.has(i)?-1:1,d=s&&c?-1:1,p=Ke(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof w=="number"&&(m=a==="end"?w*-1:w),c?{x:m*d,y:h*l}:{x:h*l,y:m*d}}const em=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await J1(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},tm=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:i=!1,limiter:a={fn:y=>{let{x:C,y:x}=y;return{x:C,y:x}}},...c}=Ke(e,t),l={x:n,y:r},d=await An(t,c),p=Me(Ye(o)),h=_s(p);let m=l[h],w=l[p];if(s){const y=h==="y"?"top":"left",C=h==="y"?"bottom":"right",x=m+d[y],S=m-d[C];m=Jo(x,m,S)}if(i){const y=p==="y"?"top":"left",C=p==="y"?"bottom":"right",x=w+d[y],S=w-d[C];w=Jo(x,w,S)}const f=a.fn({...t,[h]:m,[p]:w});return{...f,data:{x:f.x-n,y:f.y-r,enabled:{[h]:s,[p]:i}}}}}},nm=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=Ke(e,t),d={x:n,y:r},p=Me(o),h=_s(p);let m=d[h],w=d[p];const f=Ke(a,t),y=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(c){const S=h==="y"?"height":"width",_=s.reference[h]-s.floating[S]+y.mainAxis,R=s.reference[h]+s.reference[S]-y.mainAxis;m<_?m=_:m>R&&(m=R)}if(l){var C,x;const S=h==="y"?"width":"height",_=tl.has(Ye(o)),R=s.reference[p]-s.floating[S]+(_&&((C=i.offset)==null?void 0:C[p])||0)+(_?0:y.crossAxis),A=s.reference[p]+s.reference[S]+(_?0:((x=i.offset)==null?void 0:x[p])||0)-(_?y.crossAxis:0);w<R?w=R:w>A&&(w=A)}return{[h]:m,[p]:w}}}},rm=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...l}=Ke(e,t),d=await An(t,l),p=Ye(o),h=yn(o),m=Me(o)==="y",{width:w,height:f}=s.floating;let y,C;p==="top"||p==="bottom"?(y=p,C=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(C=p,y=h==="end"?"top":"bottom");const x=f-d.top-d.bottom,S=w-d.left-d.right,_=gt(f-d[y],x),R=gt(w-d[C],S),A=!t.middlewareData.shift;let T=_,I=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(I=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=x),A&&!h){const N=ve(d.left,0),Q=ve(d.right,0),K=ve(d.top,0),W=ve(d.bottom,0);m?I=w-2*(N!==0||Q!==0?N+Q:ve(d.left,d.right)):T=f-2*(K!==0||W!==0?K+W:ve(d.top,d.bottom))}await c({...t,availableWidth:I,availableHeight:T});const M=await i.getDimensions(a.floating);return w!==M.width||f!==M.height?{reset:{rects:!0}}:{}}}};function Kr(){return typeof window<"u"}function vn(e){return nl(e)?(e.nodeName||"").toLowerCase():"#document"}function we(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fe(e){var t;return(t=(nl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nl(e){return Kr()?e instanceof Node||e instanceof we(e).Node:!1}function Te(e){return Kr()?e instanceof Element||e instanceof we(e).Element:!1}function $e(e){return Kr()?e instanceof HTMLElement||e instanceof we(e).HTMLElement:!1}function Zi(e){return!Kr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof we(e).ShadowRoot}const om=new Set(["inline","contents"]);function Bn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!om.has(o)}const sm=new Set(["table","td","th"]);function im(e){return sm.has(vn(e))}const am=[":popover-open",":modal"];function Yr(e){return am.some(t=>{try{return e.matches(t)}catch{return!1}})}const cm=["transform","translate","scale","rotate","perspective"],lm=["transform","translate","scale","rotate","perspective","filter"],um=["paint","layout","strict","content"];function Ps(e){const t=As(),n=Te(e)?Pe(e):e;return cm.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)||lm.some(r=>(n.willChange||"").includes(r))||um.some(r=>(n.contain||"").includes(r))}function dm(e){let t=yt(e);for(;$e(t)&&!hn(t);){if(Ps(t))return t;if(Yr(t))return null;t=yt(t)}return null}function As(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const fm=new Set(["html","body","#document"]);function hn(e){return fm.has(vn(e))}function Pe(e){return we(e).getComputedStyle(e)}function Zr(e){return Te(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yt(e){if(vn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Zi(e)&&e.host||Fe(e);return Zi(t)?t.host:t}function rl(e){const t=yt(e);return hn(t)?e.ownerDocument?e.ownerDocument.body:e.body:$e(t)&&Bn(t)?t:rl(t)}function On(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=rl(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=we(o);if(s){const a=ts(i);return t.concat(i,i.visualViewport||[],Bn(o)?o:[],a&&n?On(a):[])}return t.concat(o,On(o,[],n))}function ts(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ol(e){const t=Pe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=$e(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=kr(n)!==s||kr(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Os(e){return Te(e)?e:e.contextElement}function Yt(e){const t=Os(e);if(!$e(t))return Ne(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=ol(t);let i=(s?kr(n.width):n.width)/r,a=(s?kr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const hm=Ne(0);function sl(e){const t=we(e);return!As()||!t.visualViewport?hm:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pm(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==we(e)?!1:t}function $t(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Os(e);let i=Ne(1);t&&(r?Te(r)&&(i=Yt(r)):i=Yt(e));const a=pm(s,n,r)?sl(s):Ne(0);let c=(o.left+a.x)/i.x,l=(o.top+a.y)/i.y,d=o.width/i.x,p=o.height/i.y;if(s){const h=we(s),m=r&&Te(r)?we(r):r;let w=h,f=ts(w);for(;f&&r&&m!==w;){const y=Yt(f),C=f.getBoundingClientRect(),x=Pe(f),S=C.left+(f.clientLeft+parseFloat(x.paddingLeft))*y.x,_=C.top+(f.clientTop+parseFloat(x.paddingTop))*y.y;c*=y.x,l*=y.y,d*=y.x,p*=y.y,c+=S,l+=_,w=we(f),f=ts(w)}}return Ir({width:d,height:p,x:c,y:l})}function js(e,t){const n=Zr(e).scrollLeft;return t?t.left+n:$t(Fe(e)).left+n}function il(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:js(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function mm(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Fe(r),a=t?Yr(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=Ne(1);const d=Ne(0),p=$e(r);if((p||!p&&!s)&&((vn(r)!=="body"||Bn(i))&&(c=Zr(r)),$e(r))){const m=$t(r);l=Yt(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const h=i&&!p&&!s?il(i,c,!0):Ne(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+d.x+h.x,y:n.y*l.y-c.scrollTop*l.y+d.y+h.y}}function gm(e){return Array.from(e.getClientRects())}function ym(e){const t=Fe(e),n=Zr(e),r=e.ownerDocument.body,o=ve(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=ve(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+js(e);const a=-n.scrollTop;return Pe(r).direction==="rtl"&&(i+=ve(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function vm(e,t){const n=we(e),r=Fe(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const l=As();(!l||l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:a,y:c}}const bm=new Set(["absolute","fixed"]);function wm(e,t){const n=$t(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=$e(e)?Yt(e):Ne(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,l=r*s.y;return{width:i,height:a,x:c,y:l}}function Xi(e,t,n){let r;if(t==="viewport")r=vm(e,n);else if(t==="document")r=ym(Fe(e));else if(Te(t))r=wm(t,n);else{const o=sl(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ir(r)}function al(e,t){const n=yt(e);return n===t||!Te(n)||hn(n)?!1:Pe(n).position==="fixed"||al(n,t)}function Cm(e,t){const n=t.get(e);if(n)return n;let r=On(e,[],!1).filter(a=>Te(a)&&vn(a)!=="body"),o=null;const s=Pe(e).position==="fixed";let i=s?yt(e):e;for(;Te(i)&&!hn(i);){const a=Pe(i),c=Ps(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&bm.has(o.position)||Bn(i)&&!c&&al(e,i))?r=r.filter(d=>d!==i):o=a,i=yt(i)}return t.set(e,r),r}function xm(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Yr(t)?[]:Cm(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((l,d)=>{const p=Xi(t,d,o);return l.top=ve(p.top,l.top),l.right=gt(p.right,l.right),l.bottom=gt(p.bottom,l.bottom),l.left=ve(p.left,l.left),l},Xi(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Em(e){const{width:t,height:n}=ol(e);return{width:t,height:n}}function Sm(e,t,n){const r=$e(t),o=Fe(t),s=n==="fixed",i=$t(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Ne(0);function l(){c.x=js(o)}if(r||!r&&!s)if((vn(t)!=="body"||Bn(o))&&(a=Zr(t)),r){const m=$t(t,!0,s,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else o&&l();s&&!r&&o&&l();const d=o&&!r&&!s?il(o,a):Ne(0),p=i.left+a.scrollLeft-c.x-d.x,h=i.top+a.scrollTop-c.y-d.y;return{x:p,y:h,width:i.width,height:i.height}}function go(e){return Pe(e).position==="static"}function Ji(e,t){if(!$e(e)||Pe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Fe(e)===n&&(n=n.ownerDocument.body),n}function cl(e,t){const n=we(e);if(Yr(e))return n;if(!$e(e)){let o=yt(e);for(;o&&!hn(o);){if(Te(o)&&!go(o))return o;o=yt(o)}return n}let r=Ji(e,t);for(;r&&im(r)&&go(r);)r=Ji(r,t);return r&&hn(r)&&go(r)&&!Ps(r)?n:r||dm(e)||n}const _m=async function(e){const t=this.getOffsetParent||cl,n=this.getDimensions,r=await n(e.floating);return{reference:Sm(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Rm(e){return Pe(e).direction==="rtl"}const Tm={convertOffsetParentRelativeRectToViewportRelativeRect:mm,getDocumentElement:Fe,getClippingRect:xm,getOffsetParent:cl,getElementRects:_m,getClientRects:gm,getDimensions:Em,getScale:Yt,isElement:Te,isRTL:Rm};function ll(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Pm(e,t){let n=null,r;const o=Fe(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:d,top:p,width:h,height:m}=l;if(a||t(),!h||!m)return;const w=cr(p),f=cr(o.clientWidth-(d+h)),y=cr(o.clientHeight-(p+m)),C=cr(d),S={rootMargin:-w+"px "+-f+"px "+-y+"px "+-C+"px",threshold:ve(0,gt(1,c))||1};let _=!0;function R(A){const T=A[0].intersectionRatio;if(T!==c){if(!_)return i();T?i(!1,T):r=setTimeout(()=>{i(!1,1e-7)},1e3)}T===1&&!ll(l,e.getBoundingClientRect())&&i(),_=!1}try{n=new IntersectionObserver(R,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(R,S)}n.observe(e)}return i(!0),s}function Am(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Os(e),d=o||s?[...l?On(l):[],...On(t)]:[];d.forEach(C=>{o&&C.addEventListener("scroll",n,{passive:!0}),s&&C.addEventListener("resize",n)});const p=l&&a?Pm(l,n):null;let h=-1,m=null;i&&(m=new ResizeObserver(C=>{let[x]=C;x&&x.target===l&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=m)==null||S.observe(t)})),n()}),l&&!c&&m.observe(l),m.observe(t));let w,f=c?$t(e):null;c&&y();function y(){const C=$t(e);f&&!ll(f,C)&&n(),f=C,w=requestAnimationFrame(y)}return n(),()=>{var C;d.forEach(x=>{o&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),p==null||p(),(C=m)==null||C.disconnect(),m=null,c&&cancelAnimationFrame(w)}}const Om=em,jm=tm,Dm=Z1,km=rm,Lm=X1,ea=Y1,Im=nm,Mm=(e,t,n)=>{const r=new Map,o={platform:Tm,...n},s={...o.platform,_c:r};return K1(e,t,{...o,platform:s})};var Nm=typeof document<"u",$m=function(){},Sr=Nm?E.useLayoutEffect:$m;function Mr(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(!Mr(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)&&!Mr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ul(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ta(e,t){const n=ul(e);return Math.round(t*n)/n}function yo(e){const t=g.useRef(e);return Sr(()=>{t.current=e}),t}function Fm(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[d,p]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=g.useState(r);Mr(h,r)||m(r);const[w,f]=g.useState(null),[y,C]=g.useState(null),x=g.useCallback(F=>{F!==A.current&&(A.current=F,f(F))},[]),S=g.useCallback(F=>{F!==T.current&&(T.current=F,C(F))},[]),_=s||w,R=i||y,A=g.useRef(null),T=g.useRef(null),I=g.useRef(d),M=c!=null,N=yo(c),Q=yo(o),K=yo(l),W=g.useCallback(()=>{if(!A.current||!T.current)return;const F={placement:t,strategy:n,middleware:h};Q.current&&(F.platform=Q.current),Mm(A.current,T.current,F).then(re=>{const ye={...re,isPositioned:K.current!==!1};q.current&&!Mr(I.current,ye)&&(I.current=ye,Da.flushSync(()=>{p(ye)}))})},[h,t,n,Q,K]);Sr(()=>{l===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,p(F=>({...F,isPositioned:!1})))},[l]);const q=g.useRef(!1);Sr(()=>(q.current=!0,()=>{q.current=!1}),[]),Sr(()=>{if(_&&(A.current=_),R&&(T.current=R),_&&R){if(N.current)return N.current(_,R,W);W()}},[_,R,W,N,M]);const ne=g.useMemo(()=>({reference:A,floating:T,setReference:x,setFloating:S}),[x,S]),Z=g.useMemo(()=>({reference:_,floating:R}),[_,R]),X=g.useMemo(()=>{const F={position:n,left:0,top:0};if(!Z.floating)return F;const re=ta(Z.floating,d.x),ye=ta(Z.floating,d.y);return a?{...F,transform:"translate("+re+"px, "+ye+"px)",...ul(Z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:re,top:ye}},[n,a,Z.floating,d.x,d.y]);return g.useMemo(()=>({...d,update:W,refs:ne,elements:Z,floatingStyles:X}),[d,W,ne,Z,X])}const Bm=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?ea({element:r.current,padding:o}).fn(n):{}:r?ea({element:r,padding:o}).fn(n):{}}}},Um=(e,t)=>({...Om(e),options:[e,t]}),Hm=(e,t)=>({...jm(e),options:[e,t]}),Wm=(e,t)=>({...Im(e),options:[e,t]}),Vm=(e,t)=>({...Dm(e),options:[e,t]}),zm=(e,t)=>({...km(e),options:[e,t]}),qm=(e,t)=>({...Lm(e),options:[e,t]}),Gm=(e,t)=>({...Bm(e),options:[e,t]});var Qm="Arrow",dl=g.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return u.jsx(ge.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});dl.displayName=Qm;var Km=dl;function Ym(e){const[t,n]=g.useState(void 0);return mt(()=>{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 i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,a=l.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Ds="Popper",[fl,hl]=Es(Ds),[Zm,pl]=fl(Ds),ml=e=>{const{__scopePopper:t,children:n}=e,[r,o]=g.useState(null);return u.jsx(Zm,{scope:t,anchor:r,onAnchorChange:o,children:n})};ml.displayName=Ds;var gl="PopperAnchor",yl=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=pl(gl,n),i=g.useRef(null),a=Ae(t,i);return g.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:u.jsx(ge.div,{...o,ref:a})});yl.displayName=gl;var ks="PopperContent",[Xm,Jm]=fl(ks),vl=g.forwardRef((e,t)=>{var Ht,wt,Wt,Ct,qn,Cn;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:w,...f}=e,y=pl(ks,n),[C,x]=g.useState(null),S=Ae(t,xt=>x(xt)),[_,R]=g.useState(null),A=Ym(_),T=(A==null?void 0:A.width)??0,I=(A==null?void 0:A.height)??0,M=r+(s!=="center"?"-"+s:""),N=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},Q=Array.isArray(l)?l:[l],K=Q.length>0,W={padding:N,boundary:Q.filter(tg),altBoundary:K},{refs:q,floatingStyles:ne,placement:Z,isPositioned:X,middlewareData:F}=Fm({strategy:"fixed",placement:M,whileElementsMounted:(...xt)=>Am(...xt,{animationFrame:m==="always"}),elements:{reference:y.anchor},middleware:[Um({mainAxis:o+I,alignmentAxis:i}),c&&Hm({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Wm():void 0,...W}),c&&Vm({...W}),zm({...W,apply:({elements:xt,rects:Gn,availableWidth:Vt,availableHeight:Et})=>{const{width:Qn,height:Kn}=Gn.reference,Ue=xt.floating.style;Ue.setProperty("--radix-popper-available-width",`${Vt}px`),Ue.setProperty("--radix-popper-available-height",`${Et}px`),Ue.setProperty("--radix-popper-anchor-width",`${Qn}px`),Ue.setProperty("--radix-popper-anchor-height",`${Kn}px`)}}),_&&Gm({element:_,padding:a}),ng({arrowWidth:T,arrowHeight:I}),h&&qm({strategy:"referenceHidden",...W})]}),[re,ye]=Cl(Z),bt=fn(w);mt(()=>{X&&(bt==null||bt())},[X,bt]);const Vn=(Ht=F.arrow)==null?void 0:Ht.x,zn=(wt=F.arrow)==null?void 0:wt.y,ro=((Wt=F.arrow)==null?void 0:Wt.centerOffset)!==0,[oo,wn]=g.useState();return mt(()=>{C&&wn(window.getComputedStyle(C).zIndex)},[C]),u.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...ne,transform:X?ne.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oo,"--radix-popper-transform-origin":[(Ct=F.transformOrigin)==null?void 0:Ct.x,(qn=F.transformOrigin)==null?void 0:qn.y].join(" "),...((Cn=F.hide)==null?void 0:Cn.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(Xm,{scope:n,placedSide:re,onArrowChange:R,arrowX:Vn,arrowY:zn,shouldHideArrow:ro,children:u.jsx(ge.div,{"data-side":re,"data-align":ye,...f,ref:S,style:{...f.style,animation:X?void 0:"none"}})})})});vl.displayName=ks;var bl="PopperArrow",eg={top:"bottom",right:"left",bottom:"top",left:"right"},wl=g.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Jm(bl,r),i=eg[s.placedSide];return u.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]: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:u.jsx(Km,{...o,ref:n,style:{...o.style,display:"block"}})})});wl.displayName=bl;function tg(e){return e!==null}var ng=e=>({name:"transformOrigin",options:e,fn(t){var y,C,x;const{placement:n,rects:r,middlewareData:o}=t,i=((y=o.arrow)==null?void 0:y.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,d]=Cl(n),p={start:"0%",center:"50%",end:"100%"}[d],h=(((C=o.arrow)==null?void 0:C.x)??0)+a/2,m=(((x=o.arrow)==null?void 0:x.y)??0)+c/2;let w="",f="";return l==="bottom"?(w=i?p:`${h}px`,f=`${-c}px`):l==="top"?(w=i?p:`${h}px`,f=`${r.floating.height+c}px`):l==="right"?(w=`${-c}px`,f=i?p:`${m}px`):l==="left"&&(w=`${r.floating.width+c}px`,f=i?p:`${m}px`),{data:{x:w,y:f}}}});function Cl(e){const[t,n="center"]=e.split("-");return[t,n]}var rg=ml,og=yl,sg=vl,ig=wl,ag="Portal",Ls=g.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=g.useState(!1);mt(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Oa.createPortal(u.jsx(ge.div,{...r,ref:t}),i):null});Ls.displayName=ag;function cg(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var bn=e=>{const{present:t,children:n}=e,r=lg(t),o=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),s=Ae(r.ref,ug(o));return typeof n=="function"||r.isPresent?g.cloneElement(o,{ref:s}):null};bn.displayName="Presence";function lg(e){const[t,n]=g.useState(),r=g.useRef(null),o=g.useRef(e),s=g.useRef("none"),i=e?"mounted":"unmounted",[a,c]=cg(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const l=lr(r.current);s.current=a==="mounted"?l:"none"},[a]),mt(()=>{const l=r.current,d=o.current;if(d!==e){const h=s.current,m=lr(l);e?c("MOUNT"):m==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(d&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),mt(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,p=m=>{const f=lr(r.current).includes(m.animationName);if(m.target===t&&f&&(c("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},h=m=>{m.target===t&&(s.current=lr(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:g.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function lr(e){return(e==null?void 0:e.animationName)||"none"}function ug(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 dg=g[" useInsertionEffect ".trim().toString()]||mt;function xl({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=fg({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:o;{const d=g.useRef(e!==void 0);g.useEffect(()=>{const p=d.current;p!==a&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${a?"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.`),d.current=a},[a,r])}const l=g.useCallback(d=>{var p;if(a){const h=hg(d)?d(e):d;h!==e&&((p=i.current)==null||p.call(i,h))}else s(d)},[a,e,s,i]);return[c,l]}function fg({defaultProp:e,onChange:t}){const[n,r]=g.useState(e),o=g.useRef(n),s=g.useRef(t);return dg(()=>{s.current=t},[t]),g.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function hg(e){return typeof e=="function"}var pg=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"}),mg="VisuallyHidden",El=g.forwardRef((e,t)=>u.jsx(ge.span,{...e,ref:t,style:{...pg,...e.style}}));El.displayName=mg;var gg=El,[Xr,s2]=Es("Tooltip",[hl]),Jr=hl(),Sl="TooltipProvider",yg=700,ns="tooltip.open",[vg,Is]=Xr(Sl),_l=e=>{const{__scopeTooltip:t,delayDuration:n=yg,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=g.useRef(!0),a=g.useRef(!1),c=g.useRef(0);return g.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),u.jsx(vg,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:g.useCallback(l=>{a.current=l},[]),disableHoverableContent:o,children:s})};_l.displayName=Sl;var jn="Tooltip",[bg,Un]=Xr(jn),Rl=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,c=Is(jn,e.__scopeTooltip),l=Jr(t),[d,p]=g.useState(null),h=Er(),m=g.useRef(0),w=i??c.disableHoverableContent,f=a??c.delayDuration,y=g.useRef(!1),[C,x]=xl({prop:r,defaultProp:o??!1,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(ns))):c.onClose(),s==null||s(T)},caller:jn}),S=g.useMemo(()=>C?y.current?"delayed-open":"instant-open":"closed",[C]),_=g.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y.current=!1,x(!0)},[x]),R=g.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),A=g.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{y.current=!0,x(!0),m.current=0},f)},[f,x]);return g.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),u.jsx(rg,{...l,children:u.jsx(bg,{scope:t,contentId:h,open:C,stateAttribute:S,trigger:d,onTriggerChange:p,onTriggerEnter:g.useCallback(()=>{c.isOpenDelayedRef.current?A():_()},[c.isOpenDelayedRef,A,_]),onTriggerLeave:g.useCallback(()=>{w?R():(window.clearTimeout(m.current),m.current=0)},[R,w]),onOpen:_,onClose:R,disableHoverableContent:w,children:n})})};Rl.displayName=jn;var rs="TooltipTrigger",Tl=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Un(rs,n),s=Is(rs,n),i=Jr(n),a=g.useRef(null),c=Ae(t,a,o.onTriggerChange),l=g.useRef(!1),d=g.useRef(!1),p=g.useCallback(()=>l.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),u.jsx(og,{asChild:!0,...i,children:u.jsx(ge.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:me(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:me(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:me(e.onPointerDown,()=>{o.open&&o.onClose(),l.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:me(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:me(e.onBlur,o.onClose),onClick:me(e.onClick,o.onClose)})})});Tl.displayName=rs;var Ms="TooltipPortal",[wg,Cg]=Xr(Ms,{forceMount:void 0}),Pl=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Un(Ms,t);return u.jsx(wg,{scope:t,forceMount:n,children:u.jsx(bn,{present:n||s.open,children:u.jsx(Ls,{asChild:!0,container:o,children:r})})})};Pl.displayName=Ms;var pn="TooltipContent",Al=g.forwardRef((e,t)=>{const n=Cg(pn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=Un(pn,e.__scopeTooltip);return u.jsx(bn,{present:r||i.open,children:i.disableHoverableContent?u.jsx(Ol,{side:o,...s,ref:t}):u.jsx(xg,{side:o,...s,ref:t})})}),xg=g.forwardRef((e,t)=>{const n=Un(pn,e.__scopeTooltip),r=Is(pn,e.__scopeTooltip),o=g.useRef(null),s=Ae(t,o),[i,a]=g.useState(null),{trigger:c,onClose:l}=n,d=o.current,{onPointerInTransitChange:p}=r,h=g.useCallback(()=>{a(null),p(!1)},[p]),m=g.useCallback((w,f)=>{const y=w.currentTarget,C={x:w.clientX,y:w.clientY},x=Rg(C,y.getBoundingClientRect()),S=Tg(C,x),_=Pg(f.getBoundingClientRect()),R=Og([...S,..._]);a(R),p(!0)},[p]);return g.useEffect(()=>()=>h(),[h]),g.useEffect(()=>{if(c&&d){const w=y=>m(y,d),f=y=>m(y,c);return c.addEventListener("pointerleave",w),d.addEventListener("pointerleave",f),()=>{c.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",f)}}},[c,d,m,h]),g.useEffect(()=>{if(i){const w=f=>{const y=f.target,C={x:f.clientX,y:f.clientY},x=(c==null?void 0:c.contains(y))||(d==null?void 0:d.contains(y)),S=!Ag(C,i);x?h():S&&(h(),l())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[c,d,i,l,h]),u.jsx(Ol,{...e,ref:s})}),[Eg,Sg]=Xr(jn,{isInside:!1}),_g=v1("TooltipContent"),Ol=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,c=Un(pn,n),l=Jr(n),{onClose:d}=c;return g.useEffect(()=>(document.addEventListener(ns,d),()=>document.removeEventListener(ns,d)),[d]),g.useEffect(()=>{if(c.trigger){const p=h=>{const m=h.target;m!=null&&m.contains(c.trigger)&&d()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,d]),u.jsx(Ss,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:d,children:u.jsxs(sg,{"data-state":c.stateAttribute,...l,...a,ref:t,style:{...a.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:[u.jsx(_g,{children:r}),u.jsx(Eg,{scope:n,isInside:!0,children:u.jsx(gg,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Al.displayName=pn;var jl="TooltipArrow",Dl=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Jr(n);return Sg(jl,n).isInside?null:u.jsx(ig,{...o,...r,ref:t})});Dl.displayName=jl;function Rg(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 Tg(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 Pg(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 Ag(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],c=t[i],l=a.x,d=a.y,p=c.x,h=c.y;d>r!=h>r&&n<(p-l)*(r-d)/(h-d)+l&&(o=!o)}return o}function Og(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),jg(t)}function jg(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],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.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],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.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 Dg=_l,kg=Rl,Lg=Tl,Ig=Pl,Mg=Al,Ng=Dl;const $g="tooltip__nUuSh",Fg="tooltipArrow__W2w-f",na={tooltip:$g,tooltipArrow:Fg},kl=({children:e,open:t,displayName:n,tooltipContent:r,className:o,disabled:s,delayDuration:i=300,side:a="right",sideOffset:c=0})=>{const[l,d]=E.useState(!1),p=t!==void 0,m=s?!1:p?t:l,w=f=>{s||p||d(f)};return u.jsx(Dg,{delayDuration:i,children:u.jsxs(kg,{open:m,onOpenChange:w,children:[u.jsx(Lg,{asChild:!0,children:e}),u.jsx(Ig,{children:u.jsxs(Mg,{className:D(na.tooltip,o),side:a,sideOffset:c,children:[n,r,u.jsx(Ng,{className:na.tooltipArrow})]})})]})})};kl.displayName="Tooltip";const Bg="spinner__qa7F6",Ug="rotate__EqlXe",Hg="spinner-dark__9A9-q",Wg="spinner-white__gRbtI",Vg="spinner-success__otWGm",zg="spinner-danger__Bq5DM",qg="spinner-warning__U900K",ra={spinner:Bg,rotate:Ug,"spinner-dark":"spinner-dark__9A9-q",spinnerDark:Hg,"spinner-white":"spinner-white__gRbtI",spinnerWhite:Wg,"spinner-success":"spinner-success__otWGm",spinnerSuccess:Vg,"spinner-danger":"spinner-danger__Bq5DM",spinnerDanger:zg,"spinner-warning":"spinner-warning__U900K",spinnerWarning:qg},Ll=({className:e,color:t="white",size:n=80,thickness:r})=>{const o=D(ra.spinner,ra[`spinner-${t}`],e),s=r??Math.max(n/12,2);return u.jsx("span",{style:{width:n,height:n,borderWidth:s},className:o})};Ll.displayName="Spinner";const Gg="disabled__KpauE",Qg="checked__2-JV-",Kg="thumb__fEuKD",ur={switch:"switch__0b2av",disabled:Gg,checked:Qg,thumb:Kg},Il=E.forwardRef(({checked:e,defaultChecked:t=!1,onCheckedChange:n,disabled:r=!1,id:o,className:s,name:i,"aria-label":a,"aria-labelledby":c,"aria-describedby":l,...d},p)=>{const[h,m]=E.useState(t),w=e!==void 0,f=w?!!e:h,y=()=>{if(r)return;const x=!f;w||m(x),n==null||n(x)},C=x=>{(x.key===" "||x.key==="Enter")&&(x.preventDefault(),y())};return u.jsx("button",{ref:p,type:"button",role:"switch","aria-checked":f,"aria-label":a,"aria-labelledby":c,"aria-describedby":l,disabled:r,id:o,name:i,className:D(ur.switch,{[ur.checked]:f,[ur.disabled]:r}),onClick:y,onKeyDown:C,...d,children:u.jsx("span",{className:ur.thumb,"aria-hidden":"true"})})});Il.displayName="Switch";const Yg="tabs-root__ELmdj",Zg="tabs-list__rc10N",Xg="tabs-list--horizontal__e1YW4",Jg="tabs-list--vertical__huK05",ey="tabs-trigger__D8R4R",ty="tabs-trigger--disabled__ezDWc",ny="tabs-trigger--horizontal__4jBFV",ry="tabs-trigger--active__S-Z-S",oy="tabs-trigger--vertical__dNVIZ",sy="tabs-content__1d77o",Ie={tabsRoot:Yg,tabsList:Zg,tabsListHorizontal:Xg,tabsListVertical:Jg,tabsTrigger:ey,tabsTriggerDisabled:ty,tabsTriggerHorizontal:ny,tabsTriggerActive:ry,tabsTriggerVertical:oy,tabsContent:sy},Ml=E.createContext(null),Ns=()=>{const e=E.useContext(Ml);if(!e)throw new Error("Tabs components must be used within a Tabs provider");return e},iy=({defaultValue:e,value:t,onValueChange:n,orientation:r="horizontal",className:o="",children:s})=>{const[i,a]=E.useState(e||""),c=t!==void 0,l=c?t:i,d=p=>{c||a(p),n==null||n(p)};return u.jsx(Ml.Provider,{value:{value:l,onValueChange:d,orientation:r},children:u.jsx("div",{className:D(Ie.tabsRoot,o),children:s})})},ay=({className:e="",children:t})=>{const{orientation:n}=Ns(),r=E.useRef(null),o=s=>{var l;const i=(l=r.current)==null?void 0:l.querySelectorAll('[role="tab"]:not([disabled])');if(!i)return;const a=Array.from(i).findIndex(d=>d===document.activeElement);let c=a;switch(s.key){case"ArrowLeft":n==="horizontal"&&(s.preventDefault(),c=a>0?a-1:i.length-1);break;case"ArrowRight":n==="horizontal"&&(s.preventDefault(),c=a<i.length-1?a+1:0);break;case"ArrowUp":n==="vertical"&&(s.preventDefault(),c=a>0?a-1:i.length-1);break;case"ArrowDown":n==="vertical"&&(s.preventDefault(),c=a<i.length-1?a+1:0);break;case"Home":s.preventDefault(),c=0;break;case"End":s.preventDefault(),c=i.length-1;break}if(c!==a){const d=i[c];d.focus(),d.click()}};return u.jsx("div",{ref:r,role:"tablist","aria-orientation":n,onKeyDown:o,className:D(Ie.tabsList,n==="horizontal"?Ie.tabsListHorizontal:Ie.tabsListVertical,e),children:t})},cy=({value:e,disabled:t=!1,className:n="",children:r})=>{const{value:o,onValueChange:s,orientation:i}=Ns(),a=o===e,c=()=>{t||s(e)};return u.jsx("button",{role:"tab","aria-selected":a,"aria-controls":`content-${e}`,tabIndex:a?0:-1,disabled:t,onClick:c,className:D(Ie.tabsTrigger,i==="horizontal"?Ie.tabsTriggerHorizontal:Ie.tabsTriggerVertical,a&&Ie.tabsTriggerActive,t&&Ie.tabsTriggerDisabled,n),children:r})},ly=({value:e,className:t="",children:n})=>{const{value:r}=Ns();return r===e?u.jsx("div",{role:"tabpanel",id:`content-${e}`,"aria-labelledby":`trigger-${e}`,tabIndex:0,className:D(Ie.tabsContent,t),children:n}):null},Nl=({className:e,state:t="open",onClick:n})=>t==="open"?u.jsxs("svg",{className:e,onClick:n,xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",viewBox:"0 0 14 14",fill:"none",children:[u.jsx("path",{d:"M1.41174 7.41635C1.3323 7.29056 1.29257 7.22766 1.27034 7.13065C1.25364 7.05778 1.25364 6.94287 1.27034 6.87C1.29257 6.77299 1.3323 6.71009 1.41174 6.58431C2.06823 5.54482 4.02232 2.91699 7.00024 2.91699C9.97815 2.91699 11.9322 5.54482 12.5887 6.5843C12.6682 6.71009 12.7079 6.77299 12.7301 6.87C12.7468 6.94287 12.7468 7.05778 12.7301 7.13065C12.7079 7.22766 12.6682 7.29056 12.5887 7.41635C11.9322 8.45584 9.97815 11.0837 7.00024 11.0837C4.02232 11.0837 2.06823 8.45584 1.41174 7.41635Z",stroke:"#818181",strokeWidth:"1.16667",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M7.00024 8.75033C7.96673 8.75033 8.75024 7.96682 8.75024 7.00033C8.75024 6.03383 7.96673 5.25033 7.00024 5.25033C6.03374 5.25033 5.25024 6.03383 5.25024 7.00033C5.25024 7.96682 6.03374 8.75033 7.00024 8.75033Z",stroke:"#818181",strokeWidth:"1.16667",strokeLinecap:"round",strokeLinejoin:"round"})]}):u.jsx("svg",{className:e,onClick:n,xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",viewBox:"0 0 14 14",fill:"none",children:u.jsx("path",{d:"M6.26672 2.97052C6.50379 2.93547 6.74835 2.91667 7.00024 2.91667C9.97816 2.91667 11.9323 5.54449 12.5887 6.58398C12.6682 6.70979 12.7079 6.7727 12.7302 6.86973C12.7469 6.94259 12.7468 7.05755 12.7301 7.13042C12.7079 7.22744 12.6679 7.29077 12.5879 7.41741C12.413 7.69425 12.1463 8.08331 11.793 8.50527M3.92252 3.9171C2.66131 4.77266 1.8051 5.9613 1.41231 6.58308C1.3325 6.70942 1.29259 6.7726 1.27035 6.86961C1.25364 6.94248 1.25363 7.05742 1.27033 7.13029C1.29257 7.22731 1.33229 7.29022 1.41174 7.41602C2.06823 8.45551 4.02232 11.0833 7.00024 11.0833C8.20098 11.0833 9.23526 10.6561 10.0851 10.078M1.75024 1.75L12.2502 12.25M5.76281 5.76256C5.44612 6.07925 5.25024 6.51675 5.25024 7C5.25024 7.9665 6.03374 8.75 7.00024 8.75C7.48349 8.75 7.92099 8.55413 8.23768 8.23744",stroke:"#818181",strokeWidth:"1.16667",strokeLinecap:"round",strokeLinejoin:"round"})}),uy="PasswordInput__GDJDN",dy="eyeIcon__kDExG",oa={PasswordInput:uy,eyeIcon:dy},fy=E.forwardRef((e,t)=>{const[n,r]=E.useState("password"),o=E.useCallback(()=>{r(s=>s==="password"?"text":"password")},[r]);return u.jsxs("div",{className:D(oa.PasswordInput,e.className),children:[u.jsx(qr,{type:n,...e,ref:t}),u.jsx(Nl,{className:oa.eyeIcon,onClick:o,state:n==="password"?"open":"closed"})]})});var vo="focusScope.autoFocusOnMount",bo="focusScope.autoFocusOnUnmount",sa={bubbles:!1,cancelable:!0},hy="FocusScope",$l=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=g.useState(null),l=fn(o),d=fn(s),p=g.useRef(null),h=Ae(t,f=>c(f)),m=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let f=function(S){if(m.paused||!a)return;const _=S.target;a.contains(_)?p.current=_:Je(p.current,{select:!0})},y=function(S){if(m.paused||!a)return;const _=S.relatedTarget;_!==null&&(a.contains(_)||Je(p.current,{select:!0}))},C=function(S){if(document.activeElement===document.body)for(const R of S)R.removedNodes.length>0&&Je(a)};document.addEventListener("focusin",f),document.addEventListener("focusout",y);const x=new MutationObserver(C);return a&&x.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",y),x.disconnect()}}},[r,a,m.paused]),g.useEffect(()=>{if(a){aa.add(m);const f=document.activeElement;if(!a.contains(f)){const C=new CustomEvent(vo,sa);a.addEventListener(vo,l),a.dispatchEvent(C),C.defaultPrevented||(py(by(Fl(a)),{select:!0}),document.activeElement===f&&Je(a))}return()=>{a.removeEventListener(vo,l),setTimeout(()=>{const C=new CustomEvent(bo,sa);a.addEventListener(bo,d),a.dispatchEvent(C),C.defaultPrevented||Je(f??document.body,{select:!0}),a.removeEventListener(bo,d),aa.remove(m)},0)}}},[a,l,d,m]);const w=g.useCallback(f=>{if(!n&&!r||m.paused)return;const y=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,C=document.activeElement;if(y&&C){const x=f.currentTarget,[S,_]=my(x);S&&_?!f.shiftKey&&C===_?(f.preventDefault(),n&&Je(S,{select:!0})):f.shiftKey&&C===S&&(f.preventDefault(),n&&Je(_,{select:!0})):C===x&&f.preventDefault()}},[n,r,m.paused]);return u.jsx(ge.div,{tabIndex:-1,...i,ref:h,onKeyDown:w})});$l.displayName=hy;function py(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Je(r,{select:t}),document.activeElement!==n)return}function my(e){const t=Fl(e),n=ia(t,e),r=ia(t.reverse(),e);return[n,r]}function Fl(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 ia(e,t){for(const n of e)if(!gy(n,{upTo:t}))return n}function gy(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 yy(e){return e instanceof HTMLInputElement&&"select"in e}function Je(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&yy(e)&&t&&e.select()}}var aa=vy();function vy(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ca(e,t),e.unshift(t)},remove(t){var n;e=ca(e,t),(n=e[0])==null||n.resume()}}}function ca(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function by(e){return e.filter(t=>t.tagName!=="A")}var wo=0;function wy(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??la()),document.body.insertAdjacentElement("beforeend",e[1]??la()),wo++,()=>{wo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),wo--}},[])}function la(){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 _r="right-scroll-bar-position",Rr="width-before-scroll-bar",Cy="with-scroll-bars-hidden",xy="--removed-body-scroll-bar-size";function Co(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ey(e,t){var n=E.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 Sy=typeof window<"u"?g.useLayoutEffect:g.useEffect,ua=new WeakMap;function _y(e,t){var n=Ey(null,function(r){return e.forEach(function(o){return Co(o,r)})});return Sy(function(){var r=ua.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Co(a,null)}),s.forEach(function(a){o.has(a)||Co(a,i)})}ua.set(n,e)},[e]),n}function Ry(e){return e}function Ty(e,t){t===void 0&&(t=Ry);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 i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var d=i;i=[],d.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(d){i.push(d),l()},filter:function(d){return i=i.filter(d),n}}}};return o}function Py(e){e===void 0&&(e={});var t=Ty(null);return t.options=Le({async:!0,ssr:!1},e),t}var Bl=function(e){var t=e.sideCar,n=lc(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 g.createElement(r,Le({},n))};Bl.isSideCarExport=!0;function Ay(e,t){return e.useMedium(t),Bl}var Ul=Py(),xo=function(){},eo=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:xo,onWheelCapture:xo,onTouchMoveCapture:xo}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,l=e.removeScrollBar,d=e.enabled,p=e.shards,h=e.sideCar,m=e.noRelative,w=e.noIsolation,f=e.inert,y=e.allowPinchZoom,C=e.as,x=C===void 0?"div":C,S=e.gapMode,_=lc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=h,A=_y([n,t]),T=Le(Le({},_),o);return g.createElement(g.Fragment,null,d&&g.createElement(R,{sideCar:Ul,removeScrollBar:l,shards:p,noRelative:m,noIsolation:w,inert:f,setCallbacks:s,allowPinchZoom:!!y,lockRef:n,gapMode:S}),i?g.cloneElement(g.Children.only(a),Le(Le({},T),{ref:A})):g.createElement(x,Le({},T,{className:c,ref:A}),a))});eo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};eo.classNames={fullWidth:Rr,zeroRight:_r};var Oy=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function jy(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Oy();return t&&e.setAttribute("nonce",t),e}function Dy(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ky(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ly=function(){var e=0,t=null;return{add:function(n){e==0&&(t=jy())&&(Dy(t,n),ky(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Iy=function(){var e=Ly();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Hl=function(){var e=Iy(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},My={left:0,top:0,right:0,gap:0},Eo=function(e){return parseInt(e||"",10)||0},Ny=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[Eo(n),Eo(r),Eo(o)]},$y=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return My;var t=Ny(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])}},Fy=Hl(),Zt="data-scroll-locked",By=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
234
|
-
.`.concat(
|
|
208
|
+
`,Jn=16,Qf=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:o,containerStyle:s,containerClassName:i})=>{let{toasts:a,handlers:c}=xf(n);return g.createElement("div",{style:{position:"fixed",zIndex:9999,top:Jn,left:Jn,right:Jn,bottom:Jn,pointerEvents:"none",...s},className:i,onMouseEnter:c.startPause,onMouseLeave:c.endPause},a.map(l=>{let d=l.position||t,p=c.calculateOffset(l,{reverseOrder:e,gutter:r,defaultPosition:t}),h=zf(d,p);return g.createElement(qf,{id:l.id,key:l.id,onHeightUpdate:c.updateHeight,className:l.visible?Gf:"",style:h},l.type==="custom"?Pr(l.message,l):o?o(l):g.createElement(Vf,{toast:l,position:d}))}))},wi=be;const fs=()=>({notify:E.useCallback((t,n,r)=>{n==="warning"||n==="info"?wi(t,{icon:n==="warning"?"⚠️":"ℹ️",style:{background:"var(--platform-background-primary-color)",color:"var(--platform-text-primary-color)"}}):wi[n](t,{style:{background:"var(--platform-background-primary-color)",color:"var(--platform-text-primary-color)"}}),r&&console.error(r)},[])});var mn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Mt=typeof window>"u"||"Deno"in globalThis;function ue(){}function Kf(e,t){return typeof e=="function"?e(t):e}function Mo(e){return typeof e=="number"&&e>=0&&e!==1/0}function hc(e,t){return Math.max(e+(t||0)-Date.now(),0)}function pt(e,t){return typeof e=="function"?e(t):e}function _e(e,t){return typeof e=="function"?e(t):e}function Ci(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==hs(i,t.options))return!1}else if(!Tn(t.queryKey,i))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||s&&!s(t))}function xi(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Nt(t.options.mutationKey)!==Nt(s))return!1}else if(!Tn(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function hs(e,t){return((t==null?void 0:t.queryKeyHashFn)||Nt)(e)}function Nt(e){return JSON.stringify(e,(t,n)=>$o(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Tn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Tn(e[n],t[n])):!1}function No(e,t){if(e===t)return e;const n=Ei(e)&&Ei(t);if(n||$o(e)&&$o(t)){const r=n?e:Object.keys(e),o=r.length,s=n?t:Object.keys(t),i=s.length,a=n?[]:{};let c=0;for(let l=0;l<i;l++){const d=n?l:s[l];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,c++):(a[d]=No(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&c++)}return o===i&&c===o?e:a}return t}function Ar(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Ei(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function $o(e){if(!Si(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Si(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Si(e){return Object.prototype.toString.call(e)==="[object Object]"}function Yf(e){return new Promise(t=>{setTimeout(t,e)})}function Fo(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){try{return No(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return No(e,t)}return t}function Zf(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Xf(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Or=Symbol();function pc(e,t){return e.queryFn===Or&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Or?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function mc(e,t){return typeof e=="function"?e(...t):!!e}var Tt,nt,Xt,ba,Jf=(ba=class extends mn{constructor(){super();k(this,Tt);k(this,nt);k(this,Xt);O(this,Xt,t=>{if(!Mt&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){b(this,nt)||this.setEventListener(b(this,Xt))}onUnsubscribe(){var t;this.hasListeners()||((t=b(this,nt))==null||t.call(this),O(this,nt,void 0))}setEventListener(t){var n;O(this,Xt,t),(n=b(this,nt))==null||n.call(this),O(this,nt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){b(this,Tt)!==t&&(O(this,Tt,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof b(this,Tt)=="boolean"?b(this,Tt):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Tt=new WeakMap,nt=new WeakMap,Xt=new WeakMap,ba),ps=new Jf,Jt,rt,en,wa,eh=(wa=class extends mn{constructor(){super();k(this,Jt,!0);k(this,rt);k(this,en);O(this,en,t=>{if(!Mt&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){b(this,rt)||this.setEventListener(b(this,en))}onUnsubscribe(){var t;this.hasListeners()||((t=b(this,rt))==null||t.call(this),O(this,rt,void 0))}setEventListener(t){var n;O(this,en,t),(n=b(this,rt))==null||n.call(this),O(this,rt,t(this.setOnline.bind(this)))}setOnline(t){b(this,Jt)!==t&&(O(this,Jt,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return b(this,Jt)}},Jt=new WeakMap,rt=new WeakMap,en=new WeakMap,wa),jr=new eh;function Bo(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function th(e){return Math.min(1e3*2**e,3e4)}function gc(e){return(e??"online")==="online"?jr.isOnline():!0}var yc=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ho(e){return e instanceof yc}function vc(e){let t=!1,n=0,r=!1,o;const s=Bo(),i=f=>{var y;r||(h(new yc(f)),(y=e.abort)==null||y.call(e))},a=()=>{t=!0},c=()=>{t=!1},l=()=>ps.isFocused()&&(e.networkMode==="always"||jr.isOnline())&&e.canRun(),d=()=>gc(e.networkMode)&&e.canRun(),p=f=>{var y;r||(r=!0,(y=e.onSuccess)==null||y.call(e,f),o==null||o(),s.resolve(f))},h=f=>{var y;r||(r=!0,(y=e.onError)==null||y.call(e,f),o==null||o(),s.reject(f))},m=()=>new Promise(f=>{var y;o=C=>{(r||l())&&f(C)},(y=e.onPause)==null||y.call(e)}).then(()=>{var f;o=void 0,r||(f=e.onContinue)==null||f.call(e)}),w=()=>{if(r)return;let f;const y=n===0?e.initialPromise:void 0;try{f=y??e.fn()}catch(C){f=Promise.reject(C)}Promise.resolve(f).then(p).catch(C=>{var A;if(r)return;const x=e.retry??(Mt?0:3),S=e.retryDelay??th,_=typeof S=="function"?S(n,C):S,R=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,C);if(t||!R){h(C);return}n++,(A=e.onFail)==null||A.call(e,n,C),Yf(_).then(()=>l()?void 0:m()).then(()=>{t?h(C):w()})})};return{promise:s,cancel:i,continue:()=>(o==null||o(),s),cancelRetry:a,continueRetry:c,canStart:d,start:()=>(d()?w():m().then(w),s)}}var nh=e=>setTimeout(e,0);function rh(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=nh;const s=a=>{t?e.push(a):o(()=>{n(a)})},i=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||i()}return c},batchCalls:a=>(...c)=>{s(()=>{a(...c)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var oe=rh(),Pt,Ca,bc=(Ca=class{constructor(){k(this,Pt)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Mo(this.gcTime)&&O(this,Pt,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Mt?1/0:5*60*1e3))}clearGcTimeout(){b(this,Pt)&&(clearTimeout(b(this,Pt)),O(this,Pt,void 0))}},Pt=new WeakMap,Ca),tn,nn,xe,At,se,Dn,Ot,Ee,We,xa,oh=(xa=class extends bc{constructor(t){super();k(this,Ee);k(this,tn);k(this,nn);k(this,xe);k(this,At);k(this,se);k(this,Dn);k(this,Ot);O(this,Ot,!1),O(this,Dn,t.defaultOptions),this.setOptions(t.options),this.observers=[],O(this,At,t.client),O(this,xe,b(this,At).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,O(this,tn,sh(this.options)),this.state=t.state??b(this,tn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=b(this,se))==null?void 0:t.promise}setOptions(t){this.options={...b(this,Dn),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&b(this,xe).remove(this)}setData(t,n){const r=Fo(this.state.data,t,this.options);return $(this,Ee,We).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){$(this,Ee,We).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=b(this,se))==null?void 0:r.promise;return(o=b(this,se))==null||o.cancel(t),n?n.then(ue).catch(ue):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(b(this,tn))}isActive(){return this.observers.some(t=>_e(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Or||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>pt(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!hc(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=b(this,se))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=b(this,se))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),b(this,xe).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(b(this,se)&&(b(this,Ot)?b(this,se).cancel({revert:!0}):b(this,se).cancelRetry()),this.scheduleGc()),b(this,xe).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||$(this,Ee,We).call(this,{type:"invalidate"})}fetch(t,n){var l,d,p;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(b(this,se))return b(this,se).continueRetry(),b(this,se).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(m=>m.options.queryFn);h&&this.setOptions(h.options)}Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']");const r=new AbortController,o=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(O(this,Ot,!0),r.signal)})},s=()=>{const h=pc(this.options,n),w=(()=>{const f={client:b(this,At),queryKey:this.queryKey,meta:this.meta};return o(f),f})();return O(this,Ot,!1),this.options.persister?this.options.persister(h,w,this):h(w)},a=(()=>{const h={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:b(this,At),state:this.state,fetchFn:s};return o(h),h})();(l=this.options.behavior)==null||l.onFetch(a,this),O(this,nn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&$(this,Ee,We).call(this,{type:"fetch",meta:(p=a.fetchOptions)==null?void 0:p.meta});const c=h=>{var m,w,f,y;ho(h)&&h.silent||$(this,Ee,We).call(this,{type:"error",error:h}),ho(h)||((w=(m=b(this,xe).config).onError)==null||w.call(m,h,this),(y=(f=b(this,xe).config).onSettled)==null||y.call(f,this.state.data,h,this)),this.scheduleGc()};return O(this,se,vc({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var m,w,f,y;if(h===void 0){console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(C){c(C);return}(w=(m=b(this,xe).config).onSuccess)==null||w.call(m,h,this),(y=(f=b(this,xe).config).onSettled)==null||y.call(f,h,this.state.error,this),this.scheduleGc()},onError:c,onFail:(h,m)=>{$(this,Ee,We).call(this,{type:"failed",failureCount:h,error:m})},onPause:()=>{$(this,Ee,We).call(this,{type:"pause"})},onContinue:()=>{$(this,Ee,We).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),b(this,se).start()}},tn=new WeakMap,nn=new WeakMap,xe=new WeakMap,At=new WeakMap,se=new WeakMap,Dn=new WeakMap,Ot=new WeakMap,Ee=new WeakSet,We=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...wc(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return ho(o)&&o.revert&&b(this,nn)?{...b(this,nn),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),oe.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),b(this,xe).notify({query:this,type:"updated",action:t})})},xa);function wc(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:gc(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function sh(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var je,Ea,ih=(Ea=class extends mn{constructor(t={}){super();k(this,je);this.config=t,O(this,je,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??hs(o,n);let i=this.get(s);return i||(i=new oh({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(i)),i}add(t){b(this,je).has(t.queryHash)||(b(this,je).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=b(this,je).get(t.queryHash);n&&(t.destroy(),n===t&&b(this,je).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){oe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return b(this,je).get(t)}getAll(){return[...b(this,je).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ci(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Ci(t,r)):n}notify(t){oe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){oe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){oe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},je=new WeakMap,Ea),De,ce,jt,ke,Xe,Sa,ah=(Sa=class extends bc{constructor(t){super();k(this,ke);k(this,De);k(this,ce);k(this,jt);this.mutationId=t.mutationId,O(this,ce,t.mutationCache),O(this,De,[]),this.state=t.state||Cc(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){b(this,De).includes(t)||(b(this,De).push(t),this.clearGcTimeout(),b(this,ce).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){O(this,De,b(this,De).filter(n=>n!==t)),this.scheduleGc(),b(this,ce).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){b(this,De).length||(this.state.status==="pending"?this.scheduleGc():b(this,ce).remove(this))}continue(){var t;return((t=b(this,jt))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,a,c,l,d,p,h,m,w,f,y,C,x,S,_,R,A,T,I;const n=()=>{$(this,ke,Xe).call(this,{type:"continue"})};O(this,jt,vc({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(M,N)=>{$(this,ke,Xe).call(this,{type:"failed",failureCount:M,error:N})},onPause:()=>{$(this,ke,Xe).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>b(this,ce).canRun(this)}));const r=this.state.status==="pending",o=!b(this,jt).canStart();try{if(r)n();else{$(this,ke,Xe).call(this,{type:"pending",variables:t,isPaused:o}),await((i=(s=b(this,ce).config).onMutate)==null?void 0:i.call(s,t,this));const N=await((c=(a=this.options).onMutate)==null?void 0:c.call(a,t));N!==this.state.context&&$(this,ke,Xe).call(this,{type:"pending",context:N,variables:t,isPaused:o})}const M=await b(this,jt).start();return await((d=(l=b(this,ce).config).onSuccess)==null?void 0:d.call(l,M,t,this.state.context,this)),await((h=(p=this.options).onSuccess)==null?void 0:h.call(p,M,t,this.state.context)),await((w=(m=b(this,ce).config).onSettled)==null?void 0:w.call(m,M,null,this.state.variables,this.state.context,this)),await((y=(f=this.options).onSettled)==null?void 0:y.call(f,M,null,t,this.state.context)),$(this,ke,Xe).call(this,{type:"success",data:M}),M}catch(M){try{throw await((x=(C=b(this,ce).config).onError)==null?void 0:x.call(C,M,t,this.state.context,this)),await((_=(S=this.options).onError)==null?void 0:_.call(S,M,t,this.state.context)),await((A=(R=b(this,ce).config).onSettled)==null?void 0:A.call(R,void 0,M,this.state.variables,this.state.context,this)),await((I=(T=this.options).onSettled)==null?void 0:I.call(T,void 0,M,t,this.state.context)),M}finally{$(this,ke,Xe).call(this,{type:"error",error:M})}}finally{b(this,ce).runNext(this)}}},De=new WeakMap,ce=new WeakMap,jt=new WeakMap,ke=new WeakSet,Xe=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),oe.batch(()=>{b(this,De).forEach(r=>{r.onMutationUpdate(t)}),b(this,ce).notify({mutation:this,type:"updated",action:t})})},Sa);function Cc(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ve,Se,kn,_a,ch=(_a=class extends mn{constructor(t={}){super();k(this,Ve);k(this,Se);k(this,kn);this.config=t,O(this,Ve,new Set),O(this,Se,new Map),O(this,kn,0)}build(t,n,r){const o=new ah({mutationCache:this,mutationId:++Yn(this,kn)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){b(this,Ve).add(t);const n=er(t);if(typeof n=="string"){const r=b(this,Se).get(n);r?r.push(t):b(this,Se).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(b(this,Ve).delete(t)){const n=er(t);if(typeof n=="string"){const r=b(this,Se).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&b(this,Se).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=er(t);if(typeof n=="string"){const r=b(this,Se).get(n),o=r==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=er(t);if(typeof n=="string"){const o=(r=b(this,Se).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){oe.batch(()=>{b(this,Ve).forEach(t=>{this.notify({type:"removed",mutation:t})}),b(this,Ve).clear(),b(this,Se).clear()})}getAll(){return Array.from(b(this,Ve))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>xi(n,r))}findAll(t={}){return this.getAll().filter(n=>xi(t,n))}notify(t){oe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return oe.batch(()=>Promise.all(t.map(n=>n.continue().catch(ue))))}},Ve=new WeakMap,Se=new WeakMap,kn=new WeakMap,_a);function er(e){var t;return(t=e.options.scope)==null?void 0:t.id}function _i(e){return{onFetch:(t,n)=>{var d,p,h,m,w;const r=t.options,o=(h=(p=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:p.fetchMore)==null?void 0:h.direction,s=((m=t.state.data)==null?void 0:m.pages)||[],i=((w=t.state.data)==null?void 0:w.pageParams)||[];let a={pages:[],pageParams:[]},c=0;const l=async()=>{let f=!1;const y=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?f=!0:t.signal.addEventListener("abort",()=>{f=!0}),t.signal)})},C=pc(t.options,t.fetchOptions),x=async(S,_,R)=>{if(f)return Promise.reject();if(_==null&&S.pages.length)return Promise.resolve(S);const T=(()=>{const Q={client:t.client,queryKey:t.queryKey,pageParam:_,direction:R?"backward":"forward",meta:t.options.meta};return y(Q),Q})(),I=await C(T),{maxPages:M}=t.options,N=R?Xf:Zf;return{pages:N(S.pages,I,M),pageParams:N(S.pageParams,_,M)}};if(o&&s.length){const S=o==="backward",_=S?lh:Ri,R={pages:s,pageParams:i},A=_(r,R);a=await x(R,A,S)}else{const S=e??s.length;do{const _=c===0?i[0]??r.initialPageParam:Ri(r,a);if(c>0&&_==null)break;a=await x(a,_),c++}while(c<S)}return a};t.options.persister?t.fetchFn=()=>{var f,y;return(y=(f=t.options).persister)==null?void 0:y.call(f,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function Ri(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function lh(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var J,ot,st,rn,on,it,sn,an,Ra,uh=(Ra=class{constructor(e={}){k(this,J);k(this,ot);k(this,st);k(this,rn);k(this,on);k(this,it);k(this,sn);k(this,an);O(this,J,e.queryCache||new ih),O(this,ot,e.mutationCache||new ch),O(this,st,e.defaultOptions||{}),O(this,rn,new Map),O(this,on,new Map),O(this,it,0)}mount(){Yn(this,it)._++,b(this,it)===1&&(O(this,sn,ps.subscribe(async e=>{e&&(await this.resumePausedMutations(),b(this,J).onFocus())})),O(this,an,jr.subscribe(async e=>{e&&(await this.resumePausedMutations(),b(this,J).onOnline())})))}unmount(){var e,t;Yn(this,it)._--,b(this,it)===0&&((e=b(this,sn))==null||e.call(this),O(this,sn,void 0),(t=b(this,an))==null||t.call(this),O(this,an,void 0))}isFetching(e){return b(this,J).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return b(this,ot).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=b(this,J).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=b(this,J).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(pt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return b(this,J).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=b(this,J).get(r.queryHash),s=o==null?void 0:o.state.data,i=Kf(t,s);if(i!==void 0)return b(this,J).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return oe.batch(()=>b(this,J).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=b(this,J).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=b(this,J);oe.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=b(this,J);return oe.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=oe.batch(()=>b(this,J).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(ue).catch(ue)}invalidateQueries(e,t={}){return oe.batch(()=>(b(this,J).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=oe.batch(()=>b(this,J).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(ue)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(ue)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=b(this,J).build(this,t);return n.isStaleByTime(pt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ue).catch(ue)}fetchInfiniteQuery(e){return e.behavior=_i(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ue).catch(ue)}ensureInfiniteQueryData(e){return e.behavior=_i(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return jr.isOnline()?b(this,ot).resumePausedMutations():Promise.resolve()}getQueryCache(){return b(this,J)}getMutationCache(){return b(this,ot)}getDefaultOptions(){return b(this,st)}setDefaultOptions(e){O(this,st,e)}setQueryDefaults(e,t){b(this,rn).set(Nt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...b(this,rn).values()],n={};return t.forEach(r=>{Tn(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){b(this,on).set(Nt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...b(this,on).values()],n={};return t.forEach(r=>{Tn(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...b(this,st).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=hs(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Or&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...b(this,st).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){b(this,J).clear(),b(this,ot).clear()}},J=new WeakMap,ot=new WeakMap,st=new WeakMap,rn=new WeakMap,on=new WeakMap,it=new WeakMap,sn=new WeakMap,an=new WeakMap,Ra),he,U,Ln,le,Dt,cn,at,ct,In,ln,un,kt,Lt,lt,dn,q,En,Uo,Ho,Wo,Vo,qo,zo,Go,xc,Ta,dh=(Ta=class extends mn{constructor(t,n){super();k(this,q);k(this,he);k(this,U);k(this,Ln);k(this,le);k(this,Dt);k(this,cn);k(this,at);k(this,ct);k(this,In);k(this,ln);k(this,un);k(this,kt);k(this,Lt);k(this,lt);k(this,dn,new Set);this.options=n,O(this,he,t),O(this,ct,null),O(this,at,Bo()),this.options.experimental_prefetchInRender||b(this,at).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(b(this,U).addObserver(this),Ti(b(this,U),this.options)?$(this,q,En).call(this):this.updateResult(),$(this,q,Vo).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Qo(b(this,U),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Qo(b(this,U),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,$(this,q,qo).call(this),$(this,q,zo).call(this),b(this,U).removeObserver(this)}setOptions(t){const n=this.options,r=b(this,U);if(this.options=b(this,he).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof _e(this.options.enabled,b(this,U))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");$(this,q,Go).call(this),b(this,U).setOptions(this.options),n._defaulted&&!Ar(this.options,n)&&b(this,he).getQueryCache().notify({type:"observerOptionsUpdated",query:b(this,U),observer:this});const o=this.hasListeners();o&&Pi(b(this,U),r,this.options,n)&&$(this,q,En).call(this),this.updateResult(),o&&(b(this,U)!==r||_e(this.options.enabled,b(this,U))!==_e(n.enabled,b(this,U))||pt(this.options.staleTime,b(this,U))!==pt(n.staleTime,b(this,U)))&&$(this,q,Uo).call(this);const s=$(this,q,Ho).call(this);o&&(b(this,U)!==r||_e(this.options.enabled,b(this,U))!==_e(n.enabled,b(this,U))||s!==b(this,lt))&&$(this,q,Wo).call(this,s)}getOptimisticResult(t){const n=b(this,he).getQueryCache().build(b(this,he),t),r=this.createResult(n,t);return hh(this,r)&&(O(this,le,r),O(this,cn,this.options),O(this,Dt,b(this,U).state)),r}getCurrentResult(){return b(this,le)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),Reflect.get(r,o))})}trackProp(t){b(this,dn).add(t)}getCurrentQuery(){return b(this,U)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=b(this,he).defaultQueryOptions(t),r=b(this,he).getQueryCache().build(b(this,he),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return $(this,q,En).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),b(this,le)))}createResult(t,n){var M;const r=b(this,U),o=this.options,s=b(this,le),i=b(this,Dt),a=b(this,cn),l=t!==r?t.state:b(this,Ln),{state:d}=t;let p={...d},h=!1,m;if(n._optimisticResults){const N=this.hasListeners(),Q=!N&&Ti(t,n),K=N&&Pi(t,r,n,o);(Q||K)&&(p={...p,...wc(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:w,errorUpdatedAt:f,status:y}=p;m=p.data;let C=!1;if(n.placeholderData!==void 0&&m===void 0&&y==="pending"){let N;s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(N=s.data,C=!0):N=typeof n.placeholderData=="function"?n.placeholderData((M=b(this,un))==null?void 0:M.state.data,b(this,un)):n.placeholderData,N!==void 0&&(y="success",m=Fo(s==null?void 0:s.data,N,n),h=!0)}if(n.select&&m!==void 0&&!C)if(s&&m===(i==null?void 0:i.data)&&n.select===b(this,In))m=b(this,ln);else try{O(this,In,n.select),m=n.select(m),m=Fo(s==null?void 0:s.data,m,n),O(this,ln,m),O(this,ct,null)}catch(N){O(this,ct,N)}b(this,ct)&&(w=b(this,ct),m=b(this,ln),f=Date.now(),y="error");const x=p.fetchStatus==="fetching",S=y==="pending",_=y==="error",R=S&&x,A=m!==void 0,I={status:y,fetchStatus:p.fetchStatus,isPending:S,isSuccess:y==="success",isError:_,isInitialLoading:R,isLoading:R,data:m,dataUpdatedAt:p.dataUpdatedAt,error:w,errorUpdatedAt:f,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>l.dataUpdateCount||p.errorUpdateCount>l.errorUpdateCount,isFetching:x,isRefetching:x&&!S,isLoadingError:_&&!A,isPaused:p.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:_&&A,isStale:ms(t,n),refetch:this.refetch,promise:b(this,at)};if(this.options.experimental_prefetchInRender){const N=W=>{I.status==="error"?W.reject(I.error):I.data!==void 0&&W.resolve(I.data)},Q=()=>{const W=O(this,at,I.promise=Bo());N(W)},K=b(this,at);switch(K.status){case"pending":t.queryHash===r.queryHash&&N(K);break;case"fulfilled":(I.status==="error"||I.data!==K.value)&&Q();break;case"rejected":(I.status!=="error"||I.error!==K.reason)&&Q();break}}return I}updateResult(){const t=b(this,le),n=this.createResult(b(this,U),this.options);if(O(this,Dt,b(this,U).state),O(this,cn,this.options),b(this,Dt).data!==void 0&&O(this,un,b(this,U)),Ar(n,t))return;O(this,le,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!b(this,dn).size)return!0;const i=new Set(s??b(this,dn));return this.options.throwOnError&&i.add("error"),Object.keys(b(this,le)).some(a=>{const c=a;return b(this,le)[c]!==t[c]&&i.has(c)})};$(this,q,xc).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&$(this,q,Vo).call(this)}},he=new WeakMap,U=new WeakMap,Ln=new WeakMap,le=new WeakMap,Dt=new WeakMap,cn=new WeakMap,at=new WeakMap,ct=new WeakMap,In=new WeakMap,ln=new WeakMap,un=new WeakMap,kt=new WeakMap,Lt=new WeakMap,lt=new WeakMap,dn=new WeakMap,q=new WeakSet,En=function(t){$(this,q,Go).call(this);let n=b(this,U).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ue)),n},Uo=function(){$(this,q,qo).call(this);const t=pt(this.options.staleTime,b(this,U));if(Mt||b(this,le).isStale||!Mo(t))return;const r=hc(b(this,le).dataUpdatedAt,t)+1;O(this,kt,setTimeout(()=>{b(this,le).isStale||this.updateResult()},r))},Ho=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(b(this,U)):this.options.refetchInterval)??!1},Wo=function(t){$(this,q,zo).call(this),O(this,lt,t),!(Mt||_e(this.options.enabled,b(this,U))===!1||!Mo(b(this,lt))||b(this,lt)===0)&&O(this,Lt,setInterval(()=>{(this.options.refetchIntervalInBackground||ps.isFocused())&&$(this,q,En).call(this)},b(this,lt)))},Vo=function(){$(this,q,Uo).call(this),$(this,q,Wo).call(this,$(this,q,Ho).call(this))},qo=function(){b(this,kt)&&(clearTimeout(b(this,kt)),O(this,kt,void 0))},zo=function(){b(this,Lt)&&(clearInterval(b(this,Lt)),O(this,Lt,void 0))},Go=function(){const t=b(this,he).getQueryCache().build(b(this,he),this.options);if(t===b(this,U))return;const n=b(this,U);O(this,U,t),O(this,Ln,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},xc=function(t){oe.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(b(this,le))}),b(this,he).getQueryCache().notify({query:b(this,U),type:"observerResultsUpdated"})})},Ta);function fh(e,t){return _e(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ti(e,t){return fh(e,t)||e.state.data!==void 0&&Qo(e,t,t.refetchOnMount)}function Qo(e,t,n){if(_e(t.enabled,e)!==!1&&pt(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&ms(e,t)}return!1}function Pi(e,t,n,r){return(e!==t||_e(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ms(e,n)}function ms(e,t){return _e(t.enabled,e)!==!1&&e.isStaleByTime(pt(t.staleTime,e))}function hh(e,t){return!Ar(e.getCurrentResult(),t)}var ut,dt,pe,qe,Ge,Cr,Ko,Pa,ph=(Pa=class extends mn{constructor(n,r){super();k(this,Ge);k(this,ut);k(this,dt);k(this,pe);k(this,qe);O(this,ut,n),this.setOptions(r),this.bindMethods(),$(this,Ge,Cr).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=b(this,ut).defaultMutationOptions(n),Ar(this.options,r)||b(this,ut).getMutationCache().notify({type:"observerOptionsUpdated",mutation:b(this,pe),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Nt(r.mutationKey)!==Nt(this.options.mutationKey)?this.reset():((o=b(this,pe))==null?void 0:o.state.status)==="pending"&&b(this,pe).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=b(this,pe))==null||n.removeObserver(this)}onMutationUpdate(n){$(this,Ge,Cr).call(this),$(this,Ge,Ko).call(this,n)}getCurrentResult(){return b(this,dt)}reset(){var n;(n=b(this,pe))==null||n.removeObserver(this),O(this,pe,void 0),$(this,Ge,Cr).call(this),$(this,Ge,Ko).call(this)}mutate(n,r){var o;return O(this,qe,r),(o=b(this,pe))==null||o.removeObserver(this),O(this,pe,b(this,ut).getMutationCache().build(b(this,ut),this.options)),b(this,pe).addObserver(this),b(this,pe).execute(n)}},ut=new WeakMap,dt=new WeakMap,pe=new WeakMap,qe=new WeakMap,Ge=new WeakSet,Cr=function(){var r;const n=((r=b(this,pe))==null?void 0:r.state)??Cc();O(this,dt,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Ko=function(n){oe.batch(()=>{var r,o,s,i,a,c,l,d;if(b(this,qe)&&this.hasListeners()){const p=b(this,dt).variables,h=b(this,dt).context;(n==null?void 0:n.type)==="success"?((o=(r=b(this,qe)).onSuccess)==null||o.call(r,n.data,p,h),(i=(s=b(this,qe)).onSettled)==null||i.call(s,n.data,null,p,h)):(n==null?void 0:n.type)==="error"&&((c=(a=b(this,qe)).onError)==null||c.call(a,n.error,p,h),(d=(l=b(this,qe)).onSettled)==null||d.call(l,void 0,n.error,p,h))}this.listeners.forEach(p=>{p(b(this,dt))})})},Pa),Ec=g.createContext(void 0),gs=e=>{const t=g.useContext(Ec);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},mh=({client:e,children:t})=>(g.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(Ec.Provider,{value:e,children:t})),Sc=g.createContext(!1),gh=()=>g.useContext(Sc);Sc.Provider;function yh(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var vh=g.createContext(yh()),bh=()=>g.useContext(vh),wh=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Ch=e=>{g.useEffect(()=>{e.clearReset()},[e])},xh=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||mc(n,[e.error,r])),Eh=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Sh=(e,t)=>e.isLoading&&e.isFetching&&!t,_h=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Ai=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Rh(e,t,n){var p,h,m,w,f;if(typeof e!="object"||Array.isArray(e))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=gh(),o=bh(),s=gs(),i=s.defaultQueryOptions(e);(h=(p=s.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||h.call(p,i),i.queryFn||console.error(`[${i.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`),i._optimisticResults=r?"isRestoring":"optimistic",Eh(i),wh(i,o),Ch(o);const a=!s.getQueryCache().get(i.queryHash),[c]=g.useState(()=>new t(s,i)),l=c.getOptimisticResult(i),d=!r&&e.subscribed!==!1;if(g.useSyncExternalStore(g.useCallback(y=>{const C=d?c.subscribe(oe.batchCalls(y)):ue;return c.updateResult(),C},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),g.useEffect(()=>{c.setOptions(i)},[i,c]),_h(i,l))throw Ai(i,c,o);if(xh({result:l,errorResetBoundary:o,throwOnError:i.throwOnError,query:s.getQueryCache().get(i.queryHash),suspense:i.suspense}))throw l.error;if((w=(m=s.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||w.call(m,i,l),i.experimental_prefetchInRender&&!Mt&&Sh(l,r)){const y=a?Ai(i,c,o):(f=s.getQueryCache().get(i.queryHash))==null?void 0:f.promise;y==null||y.catch(ue).finally(()=>{c.updateResult()})}return i.notifyOnChangeProps?l:c.trackResult(l)}function Oi(e,t){return Rh(e,dh)}function tr(e,t){const n=gs(),[r]=g.useState(()=>new ph(n,e));g.useEffect(()=>{r.setOptions(e)},[r,e]);const o=g.useSyncExternalStore(g.useCallback(i=>r.subscribe(oe.batchCalls(i)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=g.useCallback((i,a)=>{r.mutate(i,a).catch(ue)},[r]);if(o.error&&mc(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const nr={STALE_TIME:1e3*60*5,GC_TIME:1e3*60*10,RETRY_COUNT:1,RETRY_DELAY:1e3},ji={refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchOnMount:!1,staleTime:nr.STALE_TIME,gcTime:nr.GC_TIME,retry:nr.RETRY_COUNT,retryDelay:nr.RETRY_DELAY,enable:!0},rr=e=>e instanceof Error?e.message:String(e),_c=(e,t,n)=>{const r=gs(),{notify:o}=fs(),{createFn:s,readFn:i,readByIdFn:a,updateFn:c,deleteFn:l,partialUpdateFn:d}=n,p=()=>{r.invalidateQueries({queryKey:[e]})},h=(_,R,A,T)=>o(T!=null&&T.overrideSuccessMessage?T==null?void 0:T.overrideSuccessMessage(_,R):A,"success"),m=(_,R,A,T)=>o(T!=null&&T.overrideErrorMessage?T==null?void 0:T.overrideErrorMessage(_,R):A,"error");return{useCreate:_=>tr({mutationFn:R=>s(R),onSuccess:R=>{p(),h(t,R,`${t} created successfully`,_)},onError:R=>{m(t,R,`Error creating ${t}: ${rr(R)}`,_)}}),useReadQuery:_=>Oi({queryKey:[e],queryFn:i,...ji,..._}),useReadByIdQuery:(_,R)=>Oi({queryKey:[e,_],queryFn:()=>a(_),...ji,enabled:!!_,...R}),useUpdate:_=>tr({mutationFn:({id:R,data:A})=>c(R,A),onSuccess:R=>{p(),h(t,R,`${t} updated successfully`,_)},onError:R=>{m(t,R,`Error updating ${t}: ${rr(R)}`,_)}}),usePartialUpdate:_=>d&&tr({mutationFn:({id:R,data:A})=>d(R,A),onSuccess:R=>{p(),h(t,R,`${t} updated successfully`,_)},onError:R=>{m(t,R,`Error updating ${t}: ${rr(R)}`,_)}}),useDelete:_=>tr({mutationFn:R=>l(R),onSuccess:()=>{p(),h(t,null,`${t} deleted successfully`,_)},onError:R=>{m(t,R,`Error deleting ${t}: ${rr(R)}`,_)}}),invalidateQueries:p}},Th=(e,t)=>_c(e,t,{createFn:n=>fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then(r=>r.json()),deleteFn:n=>fetch(`${e}/${n}`,{method:"DELETE"}).then(r=>{if(!r.ok)throw new Error(`Error deleting: ${r.status}`)}),readByIdFn:n=>fetch(`${e}/${n}`).then(r=>r.json()),readFn:()=>fetch(e).then(n=>n.json()),updateFn:(n,r)=>fetch(`${e}/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then(o=>o.json()),partialUpdateFn:(n,r)=>fetch(`${e}/${n}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then(o=>o.json())}),Ph={SINGLE_TENANT:"single-tenant"},Ah={COOKIE:"cookie"},po="tenant",Di="tenant",ki="tenant",Oh=Ph.SINGLE_TENANT,jh=Ah.COOKIE,Dh={mode:Oh,clientSideMode:jh,tenantIDPProvisioningStrategy:"none"};class kh{setTenant(t,n){const r=new URL(window.location.href);r.searchParams.set(Di,t.name),window.location.href=r.toString()}getCurrentTenantName(){const t=new URL(window.location.href);return new URLSearchParams(t.search).get(Di)}}class Lh{setTenant(t,n){sessionStorage.setItem(ki,t.name),window.location.reload()}getCurrentTenantName(){return sessionStorage.getItem(ki)}}/*! js-cookie v3.0.5 | MIT */function or(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Ih={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Yo(e,t){function n(o,s,i){if(!(typeof document>"u")){i=or({},t,i),typeof i.expires=="number"&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&(i.expires=i.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in i)i[c]&&(a+="; "+c,i[c]!==!0&&(a+="="+i[c].split(";")[0]));return document.cookie=o+"="+e.write(s,o)+a}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],i={},a=0;a<s.length;a++){var c=s[a].split("="),l=c.slice(1).join("=");try{var d=decodeURIComponent(c[0]);if(i[d]=e.read(l,d),o===d)break}catch{}}return o?i[o]:i}}return Object.create({set:n,get:r,remove:function(o,s){n(o,"",or({},s,{expires:-1}))},withAttributes:function(o){return Yo(this.converter,or({},this.attributes,o))},withConverter:function(o){return Yo(or({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var mo=Yo(Ih,{path:"/"});class Mh{setTenant(t,n){t?mo.set(po,t.name):mo.remove(po),window.location.reload()}getCurrentTenantName(){return mo.get(po)}}class Nh{extractSubdomain(t){if(t==="localhost"||/^\d+\.\d+\.\d+\.\d+$/.test(t))return"";const n=t.split(".");if(n.length<2||n.length===2||n[0]==="www"&&n.length===3)return"";const o=(n[0]==="www"?n.slice(1):n).slice(0,-2);return o.length>0?o.join("."):""}getBaseDomain(t){const n=t.split(".");return t==="localhost"||/^\d+\.\d+\.\d+\.\d+$/.test(t)||n.length<=2?t:n.slice(-2).join(".")}setTenant(t,n){var l;const r=(l=n.urlPatterns)==null?void 0:l.find(d=>d.patternType==="subdomain"&&d.tenantId===t.id&&d.isActive);if(!r)throw new Error(`No active subdomain pattern found for tenant '${t.name}'`);const o=new URL(window.location.href),s=r.patternValue,i=o.hostname,a=this.getBaseDomain(i),c=s?`${s}.${a}`:a;o.hostname=c,window.location.href=o.toString()}getCurrentTenantName(){const t=window.location.hostname;return this.extractSubdomain(t)||null}}const Li={queryParams:new kh,sessionStorage:new Lh,cookie:new Mh,subdomain:new Nh},$h=e=>{const t=Li[e.clientSideMode];if(!t)throw new Error(`Client side tenant mode '${e.clientSideMode}' is not supported ${JSON.stringify({strategies:Li},null,2)}`);return t},Fh=(e,t,n)=>{const r=t.find(s=>s.name===n);if(!r)throw Error("No tenant permission");return $h(e).setTenant(r,e),r},Bh=()=>{const[e,t]=Br(),{tenants:n=[],currentTenant:r,tenantConfig:o=Dh}=e,s=E.useCallback(i=>{const a=Fh(o,n,i);t({...e,currentTenant:a})},[o,e]);return{tenants:n,currentTenant:r,tenantConfig:o,selectTenant:s}};function Uh(e){if(!e.ok)throw console.error(e),new Error(e.statusText)}async function sr(e,t,n,r){const o=await e(`/user-states/${encodeURIComponent(t)}/${encodeURIComponent(n)}`,r);return Uh(o),o}class ir{static async get(t,n,r){const s=await sr(t,n,r,{method:"GET",headers:{"Content-Type":"application/json"}});return s.status===204?null:await s.json()}static async create(t,n,r,o){const s={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:o})};return await(await sr(t,n,r,s)).json()}static async update(t,n,r,o){const s={method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:o})};return await(await sr(t,n,r,s)).json()}static async delete(t,n,r){return await sr(t,n,r,{method:"DELETE",headers:{"Content-Type":"application/json"}}),null}}const Hh=e=>{const t=ds("@bluealba/pae-nestjs-gateway-service"),n=Ya();if(!n)throw new Error("You must call the useUserState hook within a PAE application.");const[r,o]=E.useState(null),[s,i]=E.useState(!1),[a,c]=E.useState(!1),[l,d]=E.useState(null),p=(x,S)=>E.useCallback(async({newValue:_,shouldThrowError:R}={})=>{try{c(!0),d(null);const A=await x(t,n,e,_);return o(A),A?A.value:null}catch(A){if(d(A==null?void 0:A.message),console.error(`Failed to ${S} ${e}:`,A),R)throw A;return null}finally{c(!1)}},[t,n,e]),h=p(ir.get,"fetch"),m=p(ir.create,"create"),w=p(ir.update,"update"),f=p(ir.delete,"delete"),y=E.useCallback(async()=>{try{await h()}finally{i(!0)}},[h]);E.useEffect(()=>{y()},[y]);const C=E.useCallback(async(x,S=!1)=>r==null?await m({newValue:x,shouldThrowError:S}):await w({newValue:x,shouldThrowError:S}),[r,m,w]);return{value:r?r.value:null,hasFetched:s,loading:a,error:l,setValue:C,createValue:m,updateValue:w,deleteValue:f}},Rc="__PAE_EXTENSION_POINT_REACT_CONTENT_EMPTY__",Wh=({module:e,point:t,children:n})=>(ec(e,t,n??Rc),null),Tc=({name:e,children:t,...n})=>{const r=Ja(e);if(r===Rc)return null;if(!r)return u.jsx(u.Fragment,{children:t??null});if(Vh(r)){const o=r;return u.jsx(o,{...n})}else return r},Vh=e=>typeof e=="function",qh=(e,t)=>{const n=r=>(t=t||e.displayName||e.name||"?",u.jsx(Tc,{name:t,...r,children:u.jsx(e,{...r})}));return n.displayName=`extensionPoint(${t})`,n},Ii="single-spa:app-change";function zh(){const[e,t]=E.useState(Mi());return E.useEffect(()=>{const n=()=>{t(Mi())};return window.addEventListener(Ii,n),()=>{window.removeEventListener(Ii,n)}},[]),e}function Mi(){return gr.getAppNames().reduce((t,n)=>(gr.getAppStatus(n)?t[n]=gr.getAppStatus(n):t[n]="NOT_LOADED",t),{})}function Gh(e){const n=zh()[e]??"LOAD_ERROR";return{statusName:n,isLoading:n==="LOADING_SOURCE_CODE"||n==="BOOTSTRAPPING"||n==="MOUNTING",isMounted:n==="MOUNTED",isBroken:n==="SKIP_BECAUSE_BROKEN"||n==="LOAD_ERROR"}}const Pc=({appName:e})=>u.jsx("div",{children:u.jsxs("p",{children:["Loading ",e,"..."]})});Pc.displayName="BaseLoading";const Ac=({appName:e})=>u.jsxs("div",{children:[u.jsx("p",{children:"Something went wrong..."}),u.jsxs("p",{children:["Failed to load ",e]})]});Ac.displayName="BaseError";const Qh={display:"flex",flexDirection:"column",flex:1},Oc=E.forwardRef((e,t)=>u.jsx("div",{ref:t,style:Qh,...e}));Oc.displayName="BaseContainer";const Kh="pae-app:",jc=E.forwardRef(({appName:e,LoadingComponent:t=Pc,ErrorComponent:n=Ac,ContainerComponent:r=Oc,...o},s)=>{const i=Gh(e);return u.jsxs(r,{ref:s,...o,id:`${Kh}${e}`,children:[i.isLoading&&u.jsx(t,{appName:e}),i.isBroken&&u.jsx(n,{appName:e})]})});jc.displayName="ModulePlaceHolder";const ys=({operations:e,children:t,forbiddenContent:n})=>{var o;const{hasAccess:r}=Ur();if(!r(...e)){if(!n)return null;if(typeof n=="function")if((o=n==null?void 0:n.prototype)!=null&&o.isReactComponent){const s=n;return u.jsx(s,{operations:e})}else return n({operations:e});return E.isValidElement(n)?n:null}return t};ys.displayName="Authorized";const Yh=({eventName:e,listener:t})=>(tc(e,t),null),Zh=()=>u.jsx("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:u.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",d:"M8.737 8.737a21.49 21.49 0 0 1 3.308-2.724m0 0c3.063-2.026 5.99-2.641 7.331-1.3 1.827 1.828.026 6.591-4.023 10.64-4.049 4.049-8.812 5.85-10.64 4.023-1.33-1.33-.736-4.218 1.249-7.253m6.083-6.11c-3.063-2.026-5.99-2.641-7.331-1.3-1.827 1.828-.026 6.591 4.023 10.64m3.308-9.34a21.497 21.497 0 0 1 3.308 2.724m2.775 3.386c1.985 3.035 2.579 5.923 1.248 7.253-1.336 1.337-4.245.732-7.295-1.275M14 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"})}),Dc=({applicationName:e})=>{const t=Ka(e);if(t)if(typeof t=="function"){const n=t;return u.jsx(n,{})}else return t;return u.jsx(Zh,{})};Dc.displayName="ApplicationIcon";const Xh=(e,t)=>{const n=r=>u.jsx(ys,{operations:t,children:u.jsx(e,{...r})});return n.displayName="Authorized",n};function kc(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=kc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function D(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=kc(e))&&(r&&(r+=" "),r+=t);return r}const Jh="spinner__fakUN",ep="spinner-rotation__wUmPV",tp="button__8FA9H",np="button--contained-primary__stkTx",rp="button--outlined-primary__KZ1ww",op="button--text-primary__GLTfm",sp="button--contained-danger__L9ehT",ip="button--outlined-danger__eoYLd",ap="button--text-danger__Sw-ha",cp="icon__--umH",ar={spinner:Jh,"spinner-rotation":"spinner-rotation__wUmPV",spinnerRotation:ep,button:tp,"button--contained-primary":"button--contained-primary__stkTx",buttonContainedPrimary:np,"button--outlined-primary":"button--outlined-primary__KZ1ww",buttonOutlinedPrimary:rp,"button--text-primary":"button--text-primary__GLTfm",buttonTextPrimary:op,"button--contained-danger":"button--contained-danger__L9ehT",buttonContainedDanger:sp,"button--outlined-danger":"button--outlined-danger__eoYLd",buttonOutlinedDanger:ip,"button--text-danger":"button--text-danger__Sw-ha",buttonTextDanger:ap,icon:cp},Dr=E.forwardRef(({variant:e="contained",colorScheme:t="primary",loading:n=!1,IconComponent:r,className:o,children:s,...i},a)=>{const c=D(ar.button,ar[`button--${e}-${t}`],o);return u.jsxs("button",{ref:a,className:c,...i,children:[n?u.jsx("div",{className:ar.spinner}):r&&u.jsx(r,{className:ar.icon}),s]})});Dr.displayName="Button";const lp="Badges__5jpum",up="Badges__5jpum",dp="Badge__95MWM",fp="Badge__95MWM",hp="Badge--primary__Rx-bS",pp="Badge--secondary__d92bT",mp="Badge--success__Kdo98",gp="Badge--warning__bf-Nn",yp="Badge--danger__HTj39",vp="Badge--small__y93Pj",bp="Badge--regular__aT5AL",wp="Badge--large__wORCH",xr={Badges:lp,badges:up,Badge:dp,badge:fp,"Badge--primary":"Badge--primary__Rx-bS",badgePrimary:hp,"Badge--secondary":"Badge--secondary__d92bT",badgeSecondary:pp,"Badge--success":"Badge--success__Kdo98",badgeSuccess:mp,"Badge--warning":"Badge--warning__bf-Nn",badgeWarning:gp,"Badge--danger":"Badge--danger__HTj39",badgeDanger:yp,"Badge--small":"Badge--small__y93Pj",badgeSmall:vp,"Badge--regular":"Badge--regular__aT5AL",badgeRegular:bp,"Badge--large":"Badge--large__wORCH",badgeLarge:wp},Ni={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var $i={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function Cp(e){var d,p;var t,n=[],r=1,o;if(typeof e=="number")return{space:"rgb",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(typeof e=="number")return{space:"rgb",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(e=String(e).toLowerCase(),Ni[e])n=Ni[e].slice(),o="rgb";else if(e==="transparent")r=0,o="rgb",n=[0,0,0];else if(e[0]==="#"){var s=e.slice(1),i=s.length,a=i<=4;r=1,a?(n=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],i===4&&(r=parseInt(s[3]+s[3],16)/255)):(n=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],i===8&&(r=parseInt(s[6]+s[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),o="rgb"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(e)){var c=t[1];o=c.replace(/a$/,"");var l=o==="cmyk"?4:o==="gray"?1:3;n=t[2].trim().split(/\s*[,\/]\s*|\s+/),o==="color"&&(o=n.shift()),n=n.map(function(h,m){if(h[h.length-1]==="%")return h=parseFloat(h)/100,m===3?h:o==="rgb"?h*255:o[0]==="h"||o[0]==="l"&&!m?h*100:o==="lab"?h*125:o==="lch"?m<2?h*150:h*360:o[0]==="o"&&!m?h:o==="oklab"?h*.4:o==="oklch"?m<2?h*.4:h*360:h;if(o[m]==="h"||m===2&&o[o.length-1]==="h"){if($i[h]!==void 0)return $i[h];if(h.endsWith("deg"))return parseFloat(h);if(h.endsWith("turn"))return parseFloat(h)*360;if(h.endsWith("grad"))return parseFloat(h)*360/400;if(h.endsWith("rad"))return parseFloat(h)*180/Math.PI}return h==="none"?0:parseFloat(h)}),r=n.length>l?n.pop():1}else/[0-9](?:\s|\/|,)/.test(e)&&(n=e.match(/([0-9]+)/g).map(function(h){return parseFloat(h)}),o=((p=(d=e.match(/([a-z])/ig))==null?void 0:d.join(""))==null?void 0:p.toLowerCase())||"rgb");return{space:o,values:n,alpha:r}}const xp=(e,t)=>{const{space:n,values:r}=Cp(e);return n[0]==="h"?`${n}a(${r[0]}, ${r[1]}%, ${r[2]}%, ${t})`:`${n}a(${r}, ${t})`},vs=E.forwardRef(({children:e,color:t,className:n,customColor:r,size:o="small",style:s,...i},a)=>{const c=r?{color:r,background:xp(r,.1)}:{},l=D(xr.Badge,xr[`Badge--${o}`],{[xr[`Badge--${t}`]]:!!t},n);return u.jsx("span",{ref:a,className:l,style:{...s,...c},...i,children:e})});vs.displayName="Badge";const bs=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(xr.Badges,t);return u.jsx("div",{ref:r,className:o,...n,children:e})});bs.displayName="Badges";const Lc=({size:e=24,color:t="currentColor",strokeWidth:n=2,className:r,style:o,...s})=>u.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",className:r,style:o,...s,children:[u.jsx("rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",ry:"1"}),u.jsx("path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"})]}),Ic=({size:e=24,color:t="currentColor",strokeWidth:n=2,className:r,style:o,...s})=>u.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",className:r,style:o,...s,children:[u.jsx("rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",ry:"1"}),u.jsx("path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"}),u.jsx("path",{d:"m9 12 2 2 4-4"})]}),Ep="CopyToClipboardButton__2Nd2m",Sp={CopyToClipboardButton:Ep},_p=({content:e})=>{const[t,n]=Rp(),{notify:r}=fs(),o=t?Ic:Lc,s=E.useCallback(async()=>{await n(e)&&r("Copied to the Clipboard !","success")},[e,r]);return u.jsx(o,{className:Sp.CopyToClipboardButton,size:18,onClick:s})},Rp=()=>{const[e,t]=E.useState(!1);return[e,async r=>{try{return await navigator.clipboard.writeText(r),t(!0),setTimeout(()=>t(!1),2e3),!0}catch(o){return console.error("Failed to copy text: ",o),!1}}]},Tp="FieldGroup__Q2JCV",Pp="FieldGroup__Q2JCV",Ap="FieldGroup--horizontal__kpfL1",Op="FieldGroup--vertical__FLo-Q",Fi={FieldGroup:Tp,fieldGroup:Pp,"FieldGroup--horizontal":"FieldGroup--horizontal__kpfL1",fieldGroupHorizontal:Ap,"FieldGroup--vertical":"FieldGroup--vertical__FLo-Q",fieldGroupVertical:Op},Mc=E.forwardRef(({children:e,className:t,orientation:n="vertical",...r},o)=>{const s=D(Fi.FieldGroup,Fi[`FieldGroup--${n}`],t);return u.jsx("div",{ref:o,className:s,...r,children:e})});Mc.displayName="FieldGroup";const jp="Input__uS0sb",Bi={Input:jp,Error:"Error__-DQpw"},zr=E.forwardRef(({className:e,error:t,...n},r)=>{const o=D(Bi.Input,t&&Bi.Error,e);return u.jsx("input",{ref:r,className:o,...n})});zr.displayName="Input";const Dp={Error:"Error__N4OP5"},Nc=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Dp.Error,t);return u.jsx("span",{ref:r,className:o,...n,children:e})});Nc.displayName="InputError";const kp="Label__VYUvW",Ui={Label:kp,Error:"Error__Eu6DI"},$c=E.forwardRef(({children:e,className:t,error:n,...r},o)=>{const s=D(Ui.Label,n&&Ui.Error,t);return u.jsx("label",{ref:o,className:s,...r,children:e})});$c.displayName="Label";const Lp="Select__giqpe",Ip="Chevron__YvhBd",Zo={Select:Lp,Chevron:Ip},Fc=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Zo.Option,t);return u.jsx("option",{ref:r,className:o,...n,children:e})});Fc.displayName="Option";const ws=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Zo.Select,t);return u.jsxs("div",{className:o,children:[u.jsx("select",{ref:r,...n,children:e}),u.jsx("div",{className:Zo.Chevron,children:u.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("path",{d:"M4 6L8 10L12 6",stroke:"#818181",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})})})]})});ws.displayName="Select";ws.Option=Fc;const Mp="TextArea__pa-A0",Np={TextArea:Mp},Bc=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Np.TextArea,t);return u.jsx("textarea",{ref:r,className:o,...n,children:e})});Bc.displayName="TextArea";const $p="SearchInput__4OFyE",Fp="SearchIcon__YgnQy",Bp="ClearIcon__ukRVr",Up="SearchInput__ClearIcon__uzVoc",Hp="SearchInput__SearchIcon__zoDG4",xn={SearchInput:$p,SearchIcon:Fp,ClearIcon:Bp,SearchInput__ClearIcon:Up,SearchInput__SearchIcon:Hp},Cs=E.forwardRef(({className:e,placeholder:t="Type to search...",showClearButton:n=!1,showSearchIcon:r=!0,onClear:o,...s},i)=>{const a=D(xn.SearchInput,n&&xn.SearchInput__ClearIcon,r&&xn.SearchInput__SearchIcon,e),c=D(xn.SearchIcon),l=D(xn.ClearIcon);return u.jsxs("div",{className:a,children:[u.jsx(zr,{ref:i,type:"text",placeholder:t,...s}),r&&u.jsx("svg",{className:c,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("path",{d:"M13 13L10.6667 10.6667M12.3333 6.66667C12.3333 9.79628 9.79628 12.3333 6.66667 12.3333C3.53705 12.3333 1 9.79628 1 6.66667C1 3.53705 3.53705 1 6.66667 1C9.79628 1 12.3333 3.53705 12.3333 6.66667Z",stroke:"#A4A4A4",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})}),n&&u.jsx("svg",{className:l,width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:o,children:u.jsx("path",{d:"M7.33334 0.666748L0.666672 7.33341M0.666672 0.666748L7.33334 7.33341",stroke:"#818181",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})})]})});Cs.displayName="SearchInput";const Wp="SearchAutocomplete__vR9Hk",Vp="AutocompleteItem__YIm7R",qp="AutocompleteHighlighter__LAFTV",zp="AutocompleteHighlighter__match__Wy1o2",Gp="DropdownList__-fHIk",Qp="AutocompleteItemDescription__4QYN5",It={SearchAutocomplete:Wp,AutocompleteItem:Vp,"AutocompleteItem--canBeSelected":"AutocompleteItem--canBeSelected__jxk4z",AutocompleteHighlighter:qp,AutocompleteHighlighter__match:zp,DropdownList:Gp,AutocompleteItemDescription:Qp},Kp="DropdownList__QTXXX",Yp="DropdownList__QTXXX",Zp="DropdownList--closed__pdL1Z",Xp="DropdownList--open__opzc9",Jp="DropdownList--left__xSwXR",Rt={DropdownList:Kp,dropdownList:Yp,"DropdownList--closed":"DropdownList--closed__pdL1Z",dropdownListClosed:Zp,"DropdownList--open":"DropdownList--open__opzc9",dropdownListOpen:Xp,"DropdownList--left":"DropdownList--left__xSwXR",dropdownListLeft:Jp},Gr=E.forwardRef(({children:e,className:t,open:n,align:r="right",...o},s)=>{const i=D(Rt.DropdownList,{[Rt["DropdownList--open"]]:n,[Rt["DropdownList--closed"]]:!n,[Rt["DropdownList--left"]]:r==="left"},t);return u.jsx("div",{ref:s,className:i,...o,children:e})});Gr.displayName="DropdownList";const Sn=E.forwardRef(({children:e,className:t,canBeSelected:n=!1,...r},o)=>{const s=D(It.AutocompleteItem,{[It["AutocompleteItem--canBeSelected"]]:n},t);return u.jsx("div",{ref:o,className:s,...r,children:e})});Sn.displayName="AutocompleteItem";const e1=300,t1={query:"",suggestions:[],loading:!1,error:null},n1=({suggestionFetcher:e,canAdd:t})=>{const[n,r]=E.useState(t1);return E.useEffect(()=>{r(a=>({...a,loading:!0}));const s=async()=>{try{const a=await e(n.query);t&&!a.some(c=>c.value.toLowerCase()===n.query.toLowerCase())&&a.push({label:`Add "${n.query}"`,value:n.query,isNew:!0}),r(c=>({...c,suggestions:a,loading:!1}))}catch(a){r(c=>({...c,suggestions:[],error:a,loading:!1}))}},i=setTimeout(()=>{s()},e1);return()=>{clearTimeout(i)}},[n.query]),{...n,setQuery:s=>{r(i=>({...i,query:s}))}}},Uc=E.forwardRef(({text:e,query:t,className:n,...r},o)=>{const s=D(It.AutocompleteHighlighter,n),i=(a,c)=>{const l=a.toLowerCase().indexOf(c.toLowerCase());if(l===-1||c.length===0)return a;const d=a.slice(0,l),p=a.slice(l,l+c.length),h=a.slice(l+c.length);return u.jsxs(u.Fragment,{children:[d,u.jsx("span",{className:It.AutocompleteHighlighter__match,children:p}),i(h,c)]})};return u.jsx("div",{ref:o,className:s,...r,children:i(e,t)})});Uc.displayName="AutocompleteHighlighter";const r1=5,Hc=E.forwardRef(({children:e,className:t,canAdd:n,maxSuggestionsShown:r=r1,searchInputProps:o,keepSelectedOption:s,suggestionFetcher:i,onAccept:a,...c},l)=>{const{query:d,setQuery:p,suggestions:h,loading:m}=n1({suggestionFetcher:i,canAdd:n}),[w,f]=E.useState(null),y=d.length>0,C=T=>{p(T.target.value)},x=T=>{a==null||a(T),s?(f(T),p(T.value)):p("")},S=()=>{a==null||a(null),f(null),p("")},_=D(It.SearchAutocomplete,t),R=h.slice(0,r),A=h.slice(r);return u.jsxs("div",{ref:l,className:_,...c,children:[u.jsx(Cs,{...o,value:d,onChange:C,showClearButton:!!w,onClear:S}),e,u.jsxs(Gr,{className:It.DropdownList,open:y&&!w,role:"listbox","aria-label":"Suggestions",children:[m?u.jsx(Sn,{children:"Loading..."}):R.map(T=>u.jsxs(Sn,{canBeSelected:!0,onClick:x.bind(null,T),children:[u.jsx(Uc,{text:T.label,query:d}),T.description&&u.jsx("span",{className:It.AutocompleteItemDescription,children:T.description})]},T.value)),!m&&A.length>0&&u.jsxs(Sn,{children:[A.length," more results"]}),y&&h.length===0&&!m&&u.jsx(Sn,{children:"No results found"})]})]})});Hc.displayName="SearchAutocomplete";const ft=e=>{let t=null,n=null;return E.Children.forEach(e.children,r=>{const o=r.props.condition;o===void 0?n=r:!t&&o===!0&&(t=r)}),u.jsx(u.Fragment,{children:t||n})};ft.displayName="Show";ft.When=({condition:e,children:t})=>u.jsx(u.Fragment,{children:e&&t});ft.Else=({render:e,children:t})=>u.jsx(u.Fragment,{children:e||t});function Hi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Wc(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Hi(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():Hi(e[o],null)}}}}function Ae(...e){return g.useCallback(Wc(...e),e)}function xs(e){const t=s1(e),n=g.forwardRef((r,o)=>{const{children:s,...i}=r,a=g.Children.toArray(s),c=a.find(a1);if(c){const l=c.props.children,d=a.map(p=>p===c?g.Children.count(l)>1?g.Children.only(null):g.isValidElement(l)?l.props.children:null:p);return u.jsx(t,{...i,ref:o,children:g.isValidElement(l)?g.cloneElement(l,void 0,d):null})}return u.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var o1=xs("Slot");function s1(e){const t=g.forwardRef((n,r)=>{const{children:o,...s}=n;if(g.isValidElement(o)){const i=l1(o),a=c1(s,o.props);return o.type!==g.Fragment&&(a.ref=r?Wc(r,i):i),g.cloneElement(o,a)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Vc=Symbol("radix.slottable");function i1(e){const t=({children:n})=>u.jsx(u.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Vc,t}function a1(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vc}function c1(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]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function l1(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)}const u1="SkeletonListContainer__MKJhE",d1="Skeleton__Ovpiw",qc={SkeletonListContainer:u1,Skeleton:d1},Qr=E.forwardRef((e,t)=>{const{children:n,className:r,loading:o,height:s=48,width:i,borderRadius:a,style:c,...l}=e;if(!o&&n)return n;const d=E.isValidElement(n)?o1:"span";return u.jsx(d,{ref:t,"aria-hidden":!0,className:D(qc.Skeleton,r),style:{...c,width:i,minWidth:i,height:s,borderRadius:a},"data-inline-skeleton":E.isValidElement(n)?void 0:!0,tabIndex:-1,...l,children:n})});Qr.displayName="Skeleton";const zc=e=>{const{numberOfItems:t,itemsGap:n=2,itemProps:r}=e,o=Array.from({length:t},(s,i)=>i+1);return u.jsx("div",{className:D(qc.SkeletonListContainer),style:{gap:n},children:o.map(s=>u.jsx(Qr,{loading:!0,...r},s))})};zc.displayName="SkeletonList";function me(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 f1(e,t){const n=g.createContext(t),r=s=>{const{children:i,...a}=s,c=g.useMemo(()=>a,Object.values(a));return u.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(s){const i=g.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Es(e,t=[]){let n=[];function r(s,i){const a=g.createContext(i),c=n.length;n=[...n,i];const l=p=>{var C;const{scope:h,children:m,...w}=p,f=((C=h==null?void 0:h[e])==null?void 0:C[c])||a,y=g.useMemo(()=>w,Object.values(w));return u.jsx(f.Provider,{value:y,children:m})};l.displayName=s+"Provider";function d(p,h){var f;const m=((f=h==null?void 0:h[e])==null?void 0:f[c])||a,w=g.useContext(m);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[l,d]}const o=()=>{const s=n.map(i=>g.createContext(i));return function(a){const c=(a==null?void 0:a[e])||s;return g.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,h1(o,...t)]}function h1(...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 i=r.reduce((a,{useScope:c,scopeName:l})=>{const p=c(s)[`__scope${l}`];return{...a,...p}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var p1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ge=p1.reduce((e,t)=>{const n=xs(`Primitive.${t}`),r=g.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function m1(e,t){e&&ja.flushSync(()=>e.dispatchEvent(t))}function fn(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function g1(e,t=globalThis==null?void 0:globalThis.document){const n=fn(e);g.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 y1="DismissableLayer",Xo="dismissableLayer.update",v1="dismissableLayer.pointerDownOutside",b1="dismissableLayer.focusOutside",Wi,Gc=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ss=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,l=g.useContext(Gc),[d,p]=g.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=g.useState({}),w=Ae(t,T=>p(T)),f=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),C=f.indexOf(y),x=d?f.indexOf(d):-1,S=l.layersWithOutsidePointerEventsDisabled.size>0,_=x>=C,R=x1(T=>{const I=T.target,M=[...l.branches].some(N=>N.contains(I));!_||M||(o==null||o(T),i==null||i(T),T.defaultPrevented||a==null||a())},h),A=E1(T=>{const I=T.target;[...l.branches].some(N=>N.contains(I))||(s==null||s(T),i==null||i(T),T.defaultPrevented||a==null||a())},h);return g1(T=>{x===l.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},h),g.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Wi=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),Vi(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Wi)}},[d,h,n,l]),g.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),Vi())},[d,l]),g.useEffect(()=>{const T=()=>m({});return document.addEventListener(Xo,T),()=>document.removeEventListener(Xo,T)},[]),u.jsx(ge.div,{...c,ref:w,style:{pointerEvents:S?_?"auto":"none":void 0,...e.style},onFocusCapture:me(e.onFocusCapture,A.onFocusCapture),onBlurCapture:me(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:me(e.onPointerDownCapture,R.onPointerDownCapture)})});Ss.displayName=y1;var w1="DismissableLayerBranch",C1=g.forwardRef((e,t)=>{const n=g.useContext(Gc),r=g.useRef(null),o=Ae(t,r);return g.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),u.jsx(ge.div,{...e,ref:o})});C1.displayName=w1;function x1(e,t=globalThis==null?void 0:globalThis.document){const n=fn(e),r=g.useRef(!1),o=g.useRef(()=>{});return g.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){Qc(v1,n,l,{discrete:!0})};const l={originalEvent:a};a.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},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function E1(e,t=globalThis==null?void 0:globalThis.document){const n=fn(e),r=g.useRef(!1);return g.useEffect(()=>{const o=s=>{s.target&&!r.current&&Qc(b1,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 Vi(){const e=new CustomEvent(Xo);document.dispatchEvent(e)}function Qc(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?m1(o,s):o.dispatchEvent(s)}var mt=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},S1=g[" useId ".trim().toString()]||(()=>{}),_1=0;function Er(e){const[t,n]=g.useState(S1());return mt(()=>{n(r=>r??String(_1++))},[e]),t?`radix-${t}`:""}const R1=["top","right","bottom","left"],gt=Math.min,ve=Math.max,kr=Math.round,cr=Math.floor,Ne=e=>({x:e,y:e}),T1={left:"right",right:"left",bottom:"top",top:"bottom"},P1={start:"end",end:"start"};function Jo(e,t,n){return ve(e,gt(t,n))}function Ke(e,t){return typeof e=="function"?e(t):e}function Ye(e){return e.split("-")[0]}function gn(e){return e.split("-")[1]}function _s(e){return e==="x"?"y":"x"}function Rs(e){return e==="y"?"height":"width"}const A1=new Set(["top","bottom"]);function Me(e){return A1.has(Ye(e))?"y":"x"}function Ts(e){return _s(Me(e))}function O1(e,t,n){n===void 0&&(n=!1);const r=gn(e),o=Ts(e),s=Rs(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Lr(i)),[i,Lr(i)]}function j1(e){const t=Lr(e);return[es(e),t,es(t)]}function es(e){return e.replace(/start|end/g,t=>P1[t])}const qi=["left","right"],zi=["right","left"],D1=["top","bottom"],k1=["bottom","top"];function L1(e,t,n){switch(e){case"top":case"bottom":return n?t?zi:qi:t?qi:zi;case"left":case"right":return t?D1:k1;default:return[]}}function I1(e,t,n,r){const o=gn(e);let s=L1(Ye(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(es)))),s}function Lr(e){return e.replace(/left|right|bottom|top/g,t=>T1[t])}function M1(e){return{top:0,right:0,bottom:0,left:0,...e}}function Kc(e){return typeof e!="number"?M1(e):{top:e,right:e,bottom:e,left:e}}function Ir(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 Gi(e,t,n){let{reference:r,floating:o}=e;const s=Me(t),i=Ts(t),a=Rs(i),c=Ye(t),l=s==="y",d=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let m;switch(c){case"top":m={x:d,y:r.y-o.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:p};break;case"left":m={x:r.x-o.width,y:p};break;default:m={x:r.x,y:r.y}}switch(gn(t)){case"start":m[i]-=h*(n&&l?-1:1);break;case"end":m[i]+=h*(n&&l?-1:1);break}return m}const N1=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:p}=Gi(l,r,c),h=r,m={},w=0;for(let f=0;f<a.length;f++){const{name:y,fn:C}=a[f],{x,y:S,data:_,reset:R}=await C({x:d,y:p,initialPlacement:r,placement:h,strategy:o,middlewareData:m,rects:l,platform:i,elements:{reference:e,floating:t}});d=x??d,p=S??p,m={...m,[y]:{...m[y],..._}},R&&w<=50&&(w++,typeof R=="object"&&(R.placement&&(h=R.placement),R.rects&&(l=R.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:d,y:p}=Gi(l,h,c)),f=-1)}return{x:d,y:p,placement:h,strategy:o,middlewareData:m}};async function Pn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:h=!1,padding:m=0}=Ke(t,e),w=Kc(m),y=a[h?p==="floating"?"reference":"floating":p],C=Ir(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:c})),x=p==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),_=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},R=Ir(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:S,strategy:c}):x);return{top:(C.top-R.top+w.top)/_.y,bottom:(R.bottom-C.bottom+w.bottom)/_.y,left:(C.left-R.left+w.left)/_.x,right:(R.right-C.right+w.right)/_.x}}const $1=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:l,padding:d=0}=Ke(e,t)||{};if(l==null)return{};const p=Kc(d),h={x:n,y:r},m=Ts(o),w=Rs(m),f=await i.getDimensions(l),y=m==="y",C=y?"top":"left",x=y?"bottom":"right",S=y?"clientHeight":"clientWidth",_=s.reference[w]+s.reference[m]-h[m]-s.floating[w],R=h[m]-s.reference[m],A=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let T=A?A[S]:0;(!T||!await(i.isElement==null?void 0:i.isElement(A)))&&(T=a.floating[S]||s.floating[w]);const I=_/2-R/2,M=T/2-f[w]/2-1,N=gt(p[C],M),Q=gt(p[x],M),K=N,W=T-f[w]-Q,z=T/2-f[w]/2+I,ne=Jo(K,z,W),Z=!c.arrow&&gn(o)!=null&&z!==ne&&s.reference[w]/2-(z<K?N:Q)-f[w]/2<0,X=Z?z<K?z-K:z-W:0;return{[m]:h[m]+X,data:{[m]:ne,centerOffset:z-ne-X,...Z&&{alignmentOffset:X}},reset:Z}}}),F1=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:f=!0,...y}=Ke(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const C=Ye(o),x=Me(a),S=Ye(a)===a,_=await(c.isRTL==null?void 0:c.isRTL(l.floating)),R=h||(S||!f?[Lr(a)]:j1(a)),A=w!=="none";!h&&A&&R.push(...I1(a,f,w,_));const T=[a,...R],I=await Pn(t,y),M=[];let N=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&M.push(I[C]),p){const z=O1(o,i,_);M.push(I[z[0]],I[z[1]])}if(N=[...N,{placement:o,overflows:M}],!M.every(z=>z<=0)){var Q,K;const z=(((Q=s.flip)==null?void 0:Q.index)||0)+1,ne=T[z];if(ne&&(!(p==="alignment"?x!==Me(ne):!1)||N.every(F=>Me(F.placement)===x?F.overflows[0]>0:!0)))return{data:{index:z,overflows:N},reset:{placement:ne}};let Z=(K=N.filter(X=>X.overflows[0]<=0).sort((X,F)=>X.overflows[1]-F.overflows[1])[0])==null?void 0:K.placement;if(!Z)switch(m){case"bestFit":{var W;const X=(W=N.filter(F=>{if(A){const re=Me(F.placement);return re===x||re==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(re=>re>0).reduce((re,ye)=>re+ye,0)]).sort((F,re)=>F[1]-re[1])[0])==null?void 0:W[0];X&&(Z=X);break}case"initialPlacement":Z=a;break}if(o!==Z)return{reset:{placement:Z}}}return{}}}};function Qi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ki(e){return R1.some(t=>e[t]>=0)}const B1=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Ke(e,t);switch(r){case"referenceHidden":{const s=await Pn(t,{...o,elementContext:"reference"}),i=Qi(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Ki(i)}}}case"escaped":{const s=await Pn(t,{...o,altBoundary:!0}),i=Qi(s,n.floating);return{data:{escapedOffsets:i,escaped:Ki(i)}}}default:return{}}}}},Yc=new Set(["left","top"]);async function U1(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Ye(n),a=gn(n),c=Me(n)==="y",l=Yc.has(i)?-1:1,d=s&&c?-1:1,p=Ke(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof w=="number"&&(m=a==="end"?w*-1:w),c?{x:m*d,y:h*l}:{x:h*l,y:m*d}}const H1=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await U1(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},W1=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:i=!1,limiter:a={fn:y=>{let{x:C,y:x}=y;return{x:C,y:x}}},...c}=Ke(e,t),l={x:n,y:r},d=await Pn(t,c),p=Me(Ye(o)),h=_s(p);let m=l[h],w=l[p];if(s){const y=h==="y"?"top":"left",C=h==="y"?"bottom":"right",x=m+d[y],S=m-d[C];m=Jo(x,m,S)}if(i){const y=p==="y"?"top":"left",C=p==="y"?"bottom":"right",x=w+d[y],S=w-d[C];w=Jo(x,w,S)}const f=a.fn({...t,[h]:m,[p]:w});return{...f,data:{x:f.x-n,y:f.y-r,enabled:{[h]:s,[p]:i}}}}}},V1=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=Ke(e,t),d={x:n,y:r},p=Me(o),h=_s(p);let m=d[h],w=d[p];const f=Ke(a,t),y=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(c){const S=h==="y"?"height":"width",_=s.reference[h]-s.floating[S]+y.mainAxis,R=s.reference[h]+s.reference[S]-y.mainAxis;m<_?m=_:m>R&&(m=R)}if(l){var C,x;const S=h==="y"?"width":"height",_=Yc.has(Ye(o)),R=s.reference[p]-s.floating[S]+(_&&((C=i.offset)==null?void 0:C[p])||0)+(_?0:y.crossAxis),A=s.reference[p]+s.reference[S]+(_?0:((x=i.offset)==null?void 0:x[p])||0)-(_?y.crossAxis:0);w<R?w=R:w>A&&(w=A)}return{[h]:m,[p]:w}}}},q1=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...l}=Ke(e,t),d=await Pn(t,l),p=Ye(o),h=gn(o),m=Me(o)==="y",{width:w,height:f}=s.floating;let y,C;p==="top"||p==="bottom"?(y=p,C=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(C=p,y=h==="end"?"top":"bottom");const x=f-d.top-d.bottom,S=w-d.left-d.right,_=gt(f-d[y],x),R=gt(w-d[C],S),A=!t.middlewareData.shift;let T=_,I=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(I=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=x),A&&!h){const N=ve(d.left,0),Q=ve(d.right,0),K=ve(d.top,0),W=ve(d.bottom,0);m?I=w-2*(N!==0||Q!==0?N+Q:ve(d.left,d.right)):T=f-2*(K!==0||W!==0?K+W:ve(d.top,d.bottom))}await c({...t,availableWidth:I,availableHeight:T});const M=await i.getDimensions(a.floating);return w!==M.width||f!==M.height?{reset:{rects:!0}}:{}}}};function Kr(){return typeof window<"u"}function yn(e){return Zc(e)?(e.nodeName||"").toLowerCase():"#document"}function we(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fe(e){var t;return(t=(Zc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Zc(e){return Kr()?e instanceof Node||e instanceof we(e).Node:!1}function Te(e){return Kr()?e instanceof Element||e instanceof we(e).Element:!1}function $e(e){return Kr()?e instanceof HTMLElement||e instanceof we(e).HTMLElement:!1}function Yi(e){return!Kr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof we(e).ShadowRoot}const z1=new Set(["inline","contents"]);function Bn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!z1.has(o)}const G1=new Set(["table","td","th"]);function Q1(e){return G1.has(yn(e))}const K1=[":popover-open",":modal"];function Yr(e){return K1.some(t=>{try{return e.matches(t)}catch{return!1}})}const Y1=["transform","translate","scale","rotate","perspective"],Z1=["transform","translate","scale","rotate","perspective","filter"],X1=["paint","layout","strict","content"];function Ps(e){const t=As(),n=Te(e)?Pe(e):e;return Y1.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)||Z1.some(r=>(n.willChange||"").includes(r))||X1.some(r=>(n.contain||"").includes(r))}function J1(e){let t=yt(e);for(;$e(t)&&!hn(t);){if(Ps(t))return t;if(Yr(t))return null;t=yt(t)}return null}function As(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const em=new Set(["html","body","#document"]);function hn(e){return em.has(yn(e))}function Pe(e){return we(e).getComputedStyle(e)}function Zr(e){return Te(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yt(e){if(yn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yi(e)&&e.host||Fe(e);return Yi(t)?t.host:t}function Xc(e){const t=yt(e);return hn(t)?e.ownerDocument?e.ownerDocument.body:e.body:$e(t)&&Bn(t)?t:Xc(t)}function An(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Xc(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=we(o);if(s){const a=ts(i);return t.concat(i,i.visualViewport||[],Bn(o)?o:[],a&&n?An(a):[])}return t.concat(o,An(o,[],n))}function ts(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Jc(e){const t=Pe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=$e(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=kr(n)!==s||kr(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Os(e){return Te(e)?e:e.contextElement}function Yt(e){const t=Os(e);if(!$e(t))return Ne(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Jc(t);let i=(s?kr(n.width):n.width)/r,a=(s?kr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const tm=Ne(0);function el(e){const t=we(e);return!As()||!t.visualViewport?tm:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nm(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==we(e)?!1:t}function $t(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Os(e);let i=Ne(1);t&&(r?Te(r)&&(i=Yt(r)):i=Yt(e));const a=nm(s,n,r)?el(s):Ne(0);let c=(o.left+a.x)/i.x,l=(o.top+a.y)/i.y,d=o.width/i.x,p=o.height/i.y;if(s){const h=we(s),m=r&&Te(r)?we(r):r;let w=h,f=ts(w);for(;f&&r&&m!==w;){const y=Yt(f),C=f.getBoundingClientRect(),x=Pe(f),S=C.left+(f.clientLeft+parseFloat(x.paddingLeft))*y.x,_=C.top+(f.clientTop+parseFloat(x.paddingTop))*y.y;c*=y.x,l*=y.y,d*=y.x,p*=y.y,c+=S,l+=_,w=we(f),f=ts(w)}}return Ir({width:d,height:p,x:c,y:l})}function js(e,t){const n=Zr(e).scrollLeft;return t?t.left+n:$t(Fe(e)).left+n}function tl(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:js(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function rm(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Fe(r),a=t?Yr(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=Ne(1);const d=Ne(0),p=$e(r);if((p||!p&&!s)&&((yn(r)!=="body"||Bn(i))&&(c=Zr(r)),$e(r))){const m=$t(r);l=Yt(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const h=i&&!p&&!s?tl(i,c,!0):Ne(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+d.x+h.x,y:n.y*l.y-c.scrollTop*l.y+d.y+h.y}}function om(e){return Array.from(e.getClientRects())}function sm(e){const t=Fe(e),n=Zr(e),r=e.ownerDocument.body,o=ve(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=ve(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+js(e);const a=-n.scrollTop;return Pe(r).direction==="rtl"&&(i+=ve(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function im(e,t){const n=we(e),r=Fe(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const l=As();(!l||l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:a,y:c}}const am=new Set(["absolute","fixed"]);function cm(e,t){const n=$t(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=$e(e)?Yt(e):Ne(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,l=r*s.y;return{width:i,height:a,x:c,y:l}}function Zi(e,t,n){let r;if(t==="viewport")r=im(e,n);else if(t==="document")r=sm(Fe(e));else if(Te(t))r=cm(t,n);else{const o=el(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ir(r)}function nl(e,t){const n=yt(e);return n===t||!Te(n)||hn(n)?!1:Pe(n).position==="fixed"||nl(n,t)}function lm(e,t){const n=t.get(e);if(n)return n;let r=An(e,[],!1).filter(a=>Te(a)&&yn(a)!=="body"),o=null;const s=Pe(e).position==="fixed";let i=s?yt(e):e;for(;Te(i)&&!hn(i);){const a=Pe(i),c=Ps(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&am.has(o.position)||Bn(i)&&!c&&nl(e,i))?r=r.filter(d=>d!==i):o=a,i=yt(i)}return t.set(e,r),r}function um(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Yr(t)?[]:lm(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((l,d)=>{const p=Zi(t,d,o);return l.top=ve(p.top,l.top),l.right=gt(p.right,l.right),l.bottom=gt(p.bottom,l.bottom),l.left=ve(p.left,l.left),l},Zi(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function dm(e){const{width:t,height:n}=Jc(e);return{width:t,height:n}}function fm(e,t,n){const r=$e(t),o=Fe(t),s=n==="fixed",i=$t(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Ne(0);function l(){c.x=js(o)}if(r||!r&&!s)if((yn(t)!=="body"||Bn(o))&&(a=Zr(t)),r){const m=$t(t,!0,s,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else o&&l();s&&!r&&o&&l();const d=o&&!r&&!s?tl(o,a):Ne(0),p=i.left+a.scrollLeft-c.x-d.x,h=i.top+a.scrollTop-c.y-d.y;return{x:p,y:h,width:i.width,height:i.height}}function go(e){return Pe(e).position==="static"}function Xi(e,t){if(!$e(e)||Pe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Fe(e)===n&&(n=n.ownerDocument.body),n}function rl(e,t){const n=we(e);if(Yr(e))return n;if(!$e(e)){let o=yt(e);for(;o&&!hn(o);){if(Te(o)&&!go(o))return o;o=yt(o)}return n}let r=Xi(e,t);for(;r&&Q1(r)&&go(r);)r=Xi(r,t);return r&&hn(r)&&go(r)&&!Ps(r)?n:r||J1(e)||n}const hm=async function(e){const t=this.getOffsetParent||rl,n=this.getDimensions,r=await n(e.floating);return{reference:fm(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function pm(e){return Pe(e).direction==="rtl"}const mm={convertOffsetParentRelativeRectToViewportRelativeRect:rm,getDocumentElement:Fe,getClippingRect:um,getOffsetParent:rl,getElementRects:hm,getClientRects:om,getDimensions:dm,getScale:Yt,isElement:Te,isRTL:pm};function ol(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gm(e,t){let n=null,r;const o=Fe(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:d,top:p,width:h,height:m}=l;if(a||t(),!h||!m)return;const w=cr(p),f=cr(o.clientWidth-(d+h)),y=cr(o.clientHeight-(p+m)),C=cr(d),S={rootMargin:-w+"px "+-f+"px "+-y+"px "+-C+"px",threshold:ve(0,gt(1,c))||1};let _=!0;function R(A){const T=A[0].intersectionRatio;if(T!==c){if(!_)return i();T?i(!1,T):r=setTimeout(()=>{i(!1,1e-7)},1e3)}T===1&&!ol(l,e.getBoundingClientRect())&&i(),_=!1}try{n=new IntersectionObserver(R,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(R,S)}n.observe(e)}return i(!0),s}function ym(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Os(e),d=o||s?[...l?An(l):[],...An(t)]:[];d.forEach(C=>{o&&C.addEventListener("scroll",n,{passive:!0}),s&&C.addEventListener("resize",n)});const p=l&&a?gm(l,n):null;let h=-1,m=null;i&&(m=new ResizeObserver(C=>{let[x]=C;x&&x.target===l&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=m)==null||S.observe(t)})),n()}),l&&!c&&m.observe(l),m.observe(t));let w,f=c?$t(e):null;c&&y();function y(){const C=$t(e);f&&!ol(f,C)&&n(),f=C,w=requestAnimationFrame(y)}return n(),()=>{var C;d.forEach(x=>{o&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),p==null||p(),(C=m)==null||C.disconnect(),m=null,c&&cancelAnimationFrame(w)}}const vm=H1,bm=W1,wm=F1,Cm=q1,xm=B1,Ji=$1,Em=V1,Sm=(e,t,n)=>{const r=new Map,o={platform:mm,...n},s={...o.platform,_c:r};return N1(e,t,{...o,platform:s})};var _m=typeof document<"u",Rm=function(){},Sr=_m?E.useLayoutEffect:Rm;function Mr(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(!Mr(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)&&!Mr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function sl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ea(e,t){const n=sl(e);return Math.round(t*n)/n}function yo(e){const t=g.useRef(e);return Sr(()=>{t.current=e}),t}function Tm(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[d,p]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=g.useState(r);Mr(h,r)||m(r);const[w,f]=g.useState(null),[y,C]=g.useState(null),x=g.useCallback(F=>{F!==A.current&&(A.current=F,f(F))},[]),S=g.useCallback(F=>{F!==T.current&&(T.current=F,C(F))},[]),_=s||w,R=i||y,A=g.useRef(null),T=g.useRef(null),I=g.useRef(d),M=c!=null,N=yo(c),Q=yo(o),K=yo(l),W=g.useCallback(()=>{if(!A.current||!T.current)return;const F={placement:t,strategy:n,middleware:h};Q.current&&(F.platform=Q.current),Sm(A.current,T.current,F).then(re=>{const ye={...re,isPositioned:K.current!==!1};z.current&&!Mr(I.current,ye)&&(I.current=ye,ja.flushSync(()=>{p(ye)}))})},[h,t,n,Q,K]);Sr(()=>{l===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,p(F=>({...F,isPositioned:!1})))},[l]);const z=g.useRef(!1);Sr(()=>(z.current=!0,()=>{z.current=!1}),[]),Sr(()=>{if(_&&(A.current=_),R&&(T.current=R),_&&R){if(N.current)return N.current(_,R,W);W()}},[_,R,W,N,M]);const ne=g.useMemo(()=>({reference:A,floating:T,setReference:x,setFloating:S}),[x,S]),Z=g.useMemo(()=>({reference:_,floating:R}),[_,R]),X=g.useMemo(()=>{const F={position:n,left:0,top:0};if(!Z.floating)return F;const re=ea(Z.floating,d.x),ye=ea(Z.floating,d.y);return a?{...F,transform:"translate("+re+"px, "+ye+"px)",...sl(Z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:re,top:ye}},[n,a,Z.floating,d.x,d.y]);return g.useMemo(()=>({...d,update:W,refs:ne,elements:Z,floatingStyles:X}),[d,W,ne,Z,X])}const Pm=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?Ji({element:r.current,padding:o}).fn(n):{}:r?Ji({element:r,padding:o}).fn(n):{}}}},Am=(e,t)=>({...vm(e),options:[e,t]}),Om=(e,t)=>({...bm(e),options:[e,t]}),jm=(e,t)=>({...Em(e),options:[e,t]}),Dm=(e,t)=>({...wm(e),options:[e,t]}),km=(e,t)=>({...Cm(e),options:[e,t]}),Lm=(e,t)=>({...xm(e),options:[e,t]}),Im=(e,t)=>({...Pm(e),options:[e,t]});var Mm="Arrow",il=g.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return u.jsx(ge.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});il.displayName=Mm;var Nm=il;function $m(e){const[t,n]=g.useState(void 0);return mt(()=>{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 i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,a=l.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Ds="Popper",[al,cl]=Es(Ds),[Fm,ll]=al(Ds),ul=e=>{const{__scopePopper:t,children:n}=e,[r,o]=g.useState(null);return u.jsx(Fm,{scope:t,anchor:r,onAnchorChange:o,children:n})};ul.displayName=Ds;var dl="PopperAnchor",fl=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=ll(dl,n),i=g.useRef(null),a=Ae(t,i);return g.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:u.jsx(ge.div,{...o,ref:a})});fl.displayName=dl;var ks="PopperContent",[Bm,Um]=al(ks),hl=g.forwardRef((e,t)=>{var Ht,wt,Wt,Ct,zn,wn;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:w,...f}=e,y=ll(ks,n),[C,x]=g.useState(null),S=Ae(t,xt=>x(xt)),[_,R]=g.useState(null),A=$m(_),T=(A==null?void 0:A.width)??0,I=(A==null?void 0:A.height)??0,M=r+(s!=="center"?"-"+s:""),N=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},Q=Array.isArray(l)?l:[l],K=Q.length>0,W={padding:N,boundary:Q.filter(Wm),altBoundary:K},{refs:z,floatingStyles:ne,placement:Z,isPositioned:X,middlewareData:F}=Tm({strategy:"fixed",placement:M,whileElementsMounted:(...xt)=>ym(...xt,{animationFrame:m==="always"}),elements:{reference:y.anchor},middleware:[Am({mainAxis:o+I,alignmentAxis:i}),c&&Om({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?jm():void 0,...W}),c&&Dm({...W}),km({...W,apply:({elements:xt,rects:Gn,availableWidth:Vt,availableHeight:Et})=>{const{width:Qn,height:Kn}=Gn.reference,Ue=xt.floating.style;Ue.setProperty("--radix-popper-available-width",`${Vt}px`),Ue.setProperty("--radix-popper-available-height",`${Et}px`),Ue.setProperty("--radix-popper-anchor-width",`${Qn}px`),Ue.setProperty("--radix-popper-anchor-height",`${Kn}px`)}}),_&&Im({element:_,padding:a}),Vm({arrowWidth:T,arrowHeight:I}),h&&Lm({strategy:"referenceHidden",...W})]}),[re,ye]=gl(Z),bt=fn(w);mt(()=>{X&&(bt==null||bt())},[X,bt]);const Vn=(Ht=F.arrow)==null?void 0:Ht.x,qn=(wt=F.arrow)==null?void 0:wt.y,ro=((Wt=F.arrow)==null?void 0:Wt.centerOffset)!==0,[oo,bn]=g.useState();return mt(()=>{C&&bn(window.getComputedStyle(C).zIndex)},[C]),u.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...ne,transform:X?ne.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oo,"--radix-popper-transform-origin":[(Ct=F.transformOrigin)==null?void 0:Ct.x,(zn=F.transformOrigin)==null?void 0:zn.y].join(" "),...((wn=F.hide)==null?void 0:wn.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(Bm,{scope:n,placedSide:re,onArrowChange:R,arrowX:Vn,arrowY:qn,shouldHideArrow:ro,children:u.jsx(ge.div,{"data-side":re,"data-align":ye,...f,ref:S,style:{...f.style,animation:X?void 0:"none"}})})})});hl.displayName=ks;var pl="PopperArrow",Hm={top:"bottom",right:"left",bottom:"top",left:"right"},ml=g.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Um(pl,r),i=Hm[s.placedSide];return u.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]: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:u.jsx(Nm,{...o,ref:n,style:{...o.style,display:"block"}})})});ml.displayName=pl;function Wm(e){return e!==null}var Vm=e=>({name:"transformOrigin",options:e,fn(t){var y,C,x;const{placement:n,rects:r,middlewareData:o}=t,i=((y=o.arrow)==null?void 0:y.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,d]=gl(n),p={start:"0%",center:"50%",end:"100%"}[d],h=(((C=o.arrow)==null?void 0:C.x)??0)+a/2,m=(((x=o.arrow)==null?void 0:x.y)??0)+c/2;let w="",f="";return l==="bottom"?(w=i?p:`${h}px`,f=`${-c}px`):l==="top"?(w=i?p:`${h}px`,f=`${r.floating.height+c}px`):l==="right"?(w=`${-c}px`,f=i?p:`${m}px`):l==="left"&&(w=`${r.floating.width+c}px`,f=i?p:`${m}px`),{data:{x:w,y:f}}}});function gl(e){const[t,n="center"]=e.split("-");return[t,n]}var qm=ul,zm=fl,Gm=hl,Qm=ml,Km="Portal",Ls=g.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=g.useState(!1);mt(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Aa.createPortal(u.jsx(ge.div,{...r,ref:t}),i):null});Ls.displayName=Km;function Ym(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var vn=e=>{const{present:t,children:n}=e,r=Zm(t),o=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),s=Ae(r.ref,Xm(o));return typeof n=="function"||r.isPresent?g.cloneElement(o,{ref:s}):null};vn.displayName="Presence";function Zm(e){const[t,n]=g.useState(),r=g.useRef(null),o=g.useRef(e),s=g.useRef("none"),i=e?"mounted":"unmounted",[a,c]=Ym(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const l=lr(r.current);s.current=a==="mounted"?l:"none"},[a]),mt(()=>{const l=r.current,d=o.current;if(d!==e){const h=s.current,m=lr(l);e?c("MOUNT"):m==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(d&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),mt(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,p=m=>{const f=lr(r.current).includes(m.animationName);if(m.target===t&&f&&(c("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},h=m=>{m.target===t&&(s.current=lr(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:g.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function lr(e){return(e==null?void 0:e.animationName)||"none"}function Xm(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 Jm=g[" useInsertionEffect ".trim().toString()]||mt;function yl({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=eg({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:o;{const d=g.useRef(e!==void 0);g.useEffect(()=>{const p=d.current;p!==a&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${a?"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.`),d.current=a},[a,r])}const l=g.useCallback(d=>{var p;if(a){const h=tg(d)?d(e):d;h!==e&&((p=i.current)==null||p.call(i,h))}else s(d)},[a,e,s,i]);return[c,l]}function eg({defaultProp:e,onChange:t}){const[n,r]=g.useState(e),o=g.useRef(n),s=g.useRef(t);return Jm(()=>{s.current=t},[t]),g.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function tg(e){return typeof e=="function"}var ng=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"}),rg="VisuallyHidden",vl=g.forwardRef((e,t)=>u.jsx(ge.span,{...e,ref:t,style:{...ng,...e.style}}));vl.displayName=rg;var og=vl,[Xr,G0]=Es("Tooltip",[cl]),Jr=cl(),bl="TooltipProvider",sg=700,ns="tooltip.open",[ig,Is]=Xr(bl),wl=e=>{const{__scopeTooltip:t,delayDuration:n=sg,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=g.useRef(!0),a=g.useRef(!1),c=g.useRef(0);return g.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),u.jsx(ig,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:g.useCallback(l=>{a.current=l},[]),disableHoverableContent:o,children:s})};wl.displayName=bl;var On="Tooltip",[ag,Un]=Xr(On),Cl=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,c=Is(On,e.__scopeTooltip),l=Jr(t),[d,p]=g.useState(null),h=Er(),m=g.useRef(0),w=i??c.disableHoverableContent,f=a??c.delayDuration,y=g.useRef(!1),[C,x]=yl({prop:r,defaultProp:o??!1,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(ns))):c.onClose(),s==null||s(T)},caller:On}),S=g.useMemo(()=>C?y.current?"delayed-open":"instant-open":"closed",[C]),_=g.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y.current=!1,x(!0)},[x]),R=g.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),A=g.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{y.current=!0,x(!0),m.current=0},f)},[f,x]);return g.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),u.jsx(qm,{...l,children:u.jsx(ag,{scope:t,contentId:h,open:C,stateAttribute:S,trigger:d,onTriggerChange:p,onTriggerEnter:g.useCallback(()=>{c.isOpenDelayedRef.current?A():_()},[c.isOpenDelayedRef,A,_]),onTriggerLeave:g.useCallback(()=>{w?R():(window.clearTimeout(m.current),m.current=0)},[R,w]),onOpen:_,onClose:R,disableHoverableContent:w,children:n})})};Cl.displayName=On;var rs="TooltipTrigger",xl=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Un(rs,n),s=Is(rs,n),i=Jr(n),a=g.useRef(null),c=Ae(t,a,o.onTriggerChange),l=g.useRef(!1),d=g.useRef(!1),p=g.useCallback(()=>l.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),u.jsx(zm,{asChild:!0,...i,children:u.jsx(ge.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:me(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:me(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:me(e.onPointerDown,()=>{o.open&&o.onClose(),l.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:me(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:me(e.onBlur,o.onClose),onClick:me(e.onClick,o.onClose)})})});xl.displayName=rs;var Ms="TooltipPortal",[cg,lg]=Xr(Ms,{forceMount:void 0}),El=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Un(Ms,t);return u.jsx(cg,{scope:t,forceMount:n,children:u.jsx(vn,{present:n||s.open,children:u.jsx(Ls,{asChild:!0,container:o,children:r})})})};El.displayName=Ms;var pn="TooltipContent",Sl=g.forwardRef((e,t)=>{const n=lg(pn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=Un(pn,e.__scopeTooltip);return u.jsx(vn,{present:r||i.open,children:i.disableHoverableContent?u.jsx(_l,{side:o,...s,ref:t}):u.jsx(ug,{side:o,...s,ref:t})})}),ug=g.forwardRef((e,t)=>{const n=Un(pn,e.__scopeTooltip),r=Is(pn,e.__scopeTooltip),o=g.useRef(null),s=Ae(t,o),[i,a]=g.useState(null),{trigger:c,onClose:l}=n,d=o.current,{onPointerInTransitChange:p}=r,h=g.useCallback(()=>{a(null),p(!1)},[p]),m=g.useCallback((w,f)=>{const y=w.currentTarget,C={x:w.clientX,y:w.clientY},x=pg(C,y.getBoundingClientRect()),S=mg(C,x),_=gg(f.getBoundingClientRect()),R=vg([...S,..._]);a(R),p(!0)},[p]);return g.useEffect(()=>()=>h(),[h]),g.useEffect(()=>{if(c&&d){const w=y=>m(y,d),f=y=>m(y,c);return c.addEventListener("pointerleave",w),d.addEventListener("pointerleave",f),()=>{c.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",f)}}},[c,d,m,h]),g.useEffect(()=>{if(i){const w=f=>{const y=f.target,C={x:f.clientX,y:f.clientY},x=(c==null?void 0:c.contains(y))||(d==null?void 0:d.contains(y)),S=!yg(C,i);x?h():S&&(h(),l())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[c,d,i,l,h]),u.jsx(_l,{...e,ref:s})}),[dg,fg]=Xr(On,{isInside:!1}),hg=i1("TooltipContent"),_l=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,c=Un(pn,n),l=Jr(n),{onClose:d}=c;return g.useEffect(()=>(document.addEventListener(ns,d),()=>document.removeEventListener(ns,d)),[d]),g.useEffect(()=>{if(c.trigger){const p=h=>{const m=h.target;m!=null&&m.contains(c.trigger)&&d()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,d]),u.jsx(Ss,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:d,children:u.jsxs(Gm,{"data-state":c.stateAttribute,...l,...a,ref:t,style:{...a.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:[u.jsx(hg,{children:r}),u.jsx(dg,{scope:n,isInside:!0,children:u.jsx(og,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Sl.displayName=pn;var Rl="TooltipArrow",Tl=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Jr(n);return fg(Rl,n).isInside?null:u.jsx(Qm,{...o,...r,ref:t})});Tl.displayName=Rl;function pg(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 mg(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 gg(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 yg(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],c=t[i],l=a.x,d=a.y,p=c.x,h=c.y;d>r!=h>r&&n<(p-l)*(r-d)/(h-d)+l&&(o=!o)}return o}function vg(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),bg(t)}function bg(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],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.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],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.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 wg=wl,Cg=Cl,xg=xl,Eg=El,Sg=Sl,_g=Tl;const Rg="tooltip__nUuSh",Tg="tooltipArrow__W2w-f",ta={tooltip:Rg,tooltipArrow:Tg},Pl=({children:e,open:t,displayName:n,tooltipContent:r,className:o,disabled:s,delayDuration:i=300,side:a="right",sideOffset:c=0})=>{const[l,d]=E.useState(!1),p=t!==void 0,m=s?!1:p?t:l,w=f=>{s||p||d(f)};return u.jsx(wg,{delayDuration:i,children:u.jsxs(Cg,{open:m,onOpenChange:w,children:[u.jsx(xg,{asChild:!0,children:e}),u.jsx(Eg,{children:u.jsxs(Sg,{className:D(ta.tooltip,o),side:a,sideOffset:c,children:[n,r,u.jsx(_g,{className:ta.tooltipArrow})]})})]})})};Pl.displayName="Tooltip";const Pg="spinner__qa7F6",Ag="rotate__EqlXe",Og="spinner-dark__9A9-q",jg="spinner-white__gRbtI",Dg="spinner-success__otWGm",kg="spinner-danger__Bq5DM",Lg="spinner-warning__U900K",na={spinner:Pg,rotate:Ag,"spinner-dark":"spinner-dark__9A9-q",spinnerDark:Og,"spinner-white":"spinner-white__gRbtI",spinnerWhite:jg,"spinner-success":"spinner-success__otWGm",spinnerSuccess:Dg,"spinner-danger":"spinner-danger__Bq5DM",spinnerDanger:kg,"spinner-warning":"spinner-warning__U900K",spinnerWarning:Lg},Al=({className:e,color:t="white",size:n=80,thickness:r})=>{const o=D(na.spinner,na[`spinner-${t}`],e),s=r??Math.max(n/12,2);return u.jsx("span",{style:{width:n,height:n,borderWidth:s},className:o})};Al.displayName="Spinner";const Ig="disabled__KpauE",Mg="checked__2-JV-",Ng="thumb__fEuKD",ur={switch:"switch__0b2av",disabled:Ig,checked:Mg,thumb:Ng},Ol=E.forwardRef(({checked:e,defaultChecked:t=!1,onCheckedChange:n,disabled:r=!1,id:o,className:s,name:i,"aria-label":a,"aria-labelledby":c,"aria-describedby":l,...d},p)=>{const[h,m]=E.useState(t),w=e!==void 0,f=w?!!e:h,y=()=>{if(r)return;const x=!f;w||m(x),n==null||n(x)},C=x=>{(x.key===" "||x.key==="Enter")&&(x.preventDefault(),y())};return u.jsx("button",{ref:p,type:"button",role:"switch","aria-checked":f,"aria-label":a,"aria-labelledby":c,"aria-describedby":l,disabled:r,id:o,name:i,className:D(ur.switch,{[ur.checked]:f,[ur.disabled]:r}),onClick:y,onKeyDown:C,...d,children:u.jsx("span",{className:ur.thumb,"aria-hidden":"true"})})});Ol.displayName="Switch";const $g="tabs-root__ELmdj",Fg="tabs-list__rc10N",Bg="tabs-list--horizontal__e1YW4",Ug="tabs-list--vertical__huK05",Hg="tabs-trigger__D8R4R",Wg="tabs-trigger--disabled__ezDWc",Vg="tabs-trigger--horizontal__4jBFV",qg="tabs-trigger--active__S-Z-S",zg="tabs-trigger--vertical__dNVIZ",Gg="tabs-content__1d77o",Ie={tabsRoot:$g,tabsList:Fg,tabsListHorizontal:Bg,tabsListVertical:Ug,tabsTrigger:Hg,tabsTriggerDisabled:Wg,tabsTriggerHorizontal:Vg,tabsTriggerActive:qg,tabsTriggerVertical:zg,tabsContent:Gg},jl=E.createContext(null),Ns=()=>{const e=E.useContext(jl);if(!e)throw new Error("Tabs components must be used within a Tabs provider");return e},Qg=({defaultValue:e,value:t,onValueChange:n,orientation:r="horizontal",className:o="",children:s})=>{const[i,a]=E.useState(e||""),c=t!==void 0,l=c?t:i,d=p=>{c||a(p),n==null||n(p)};return u.jsx(jl.Provider,{value:{value:l,onValueChange:d,orientation:r},children:u.jsx("div",{className:D(Ie.tabsRoot,o),children:s})})},Kg=({className:e="",children:t})=>{const{orientation:n}=Ns(),r=E.useRef(null),o=s=>{var l;const i=(l=r.current)==null?void 0:l.querySelectorAll('[role="tab"]:not([disabled])');if(!i)return;const a=Array.from(i).findIndex(d=>d===document.activeElement);let c=a;switch(s.key){case"ArrowLeft":n==="horizontal"&&(s.preventDefault(),c=a>0?a-1:i.length-1);break;case"ArrowRight":n==="horizontal"&&(s.preventDefault(),c=a<i.length-1?a+1:0);break;case"ArrowUp":n==="vertical"&&(s.preventDefault(),c=a>0?a-1:i.length-1);break;case"ArrowDown":n==="vertical"&&(s.preventDefault(),c=a<i.length-1?a+1:0);break;case"Home":s.preventDefault(),c=0;break;case"End":s.preventDefault(),c=i.length-1;break}if(c!==a){const d=i[c];d.focus(),d.click()}};return u.jsx("div",{ref:r,role:"tablist","aria-orientation":n,onKeyDown:o,className:D(Ie.tabsList,n==="horizontal"?Ie.tabsListHorizontal:Ie.tabsListVertical,e),children:t})},Yg=({value:e,disabled:t=!1,className:n="",children:r})=>{const{value:o,onValueChange:s,orientation:i}=Ns(),a=o===e,c=()=>{t||s(e)};return u.jsx("button",{role:"tab","aria-selected":a,"aria-controls":`content-${e}`,tabIndex:a?0:-1,disabled:t,onClick:c,className:D(Ie.tabsTrigger,i==="horizontal"?Ie.tabsTriggerHorizontal:Ie.tabsTriggerVertical,a&&Ie.tabsTriggerActive,t&&Ie.tabsTriggerDisabled,n),children:r})},Zg=({value:e,className:t="",children:n})=>{const{value:r}=Ns();return r===e?u.jsx("div",{role:"tabpanel",id:`content-${e}`,"aria-labelledby":`trigger-${e}`,tabIndex:0,className:D(Ie.tabsContent,t),children:n}):null},Dl=({className:e,state:t="open",onClick:n})=>t==="open"?u.jsxs("svg",{className:e,onClick:n,xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",viewBox:"0 0 14 14",fill:"none",children:[u.jsx("path",{d:"M1.41174 7.41635C1.3323 7.29056 1.29257 7.22766 1.27034 7.13065C1.25364 7.05778 1.25364 6.94287 1.27034 6.87C1.29257 6.77299 1.3323 6.71009 1.41174 6.58431C2.06823 5.54482 4.02232 2.91699 7.00024 2.91699C9.97815 2.91699 11.9322 5.54482 12.5887 6.5843C12.6682 6.71009 12.7079 6.77299 12.7301 6.87C12.7468 6.94287 12.7468 7.05778 12.7301 7.13065C12.7079 7.22766 12.6682 7.29056 12.5887 7.41635C11.9322 8.45584 9.97815 11.0837 7.00024 11.0837C4.02232 11.0837 2.06823 8.45584 1.41174 7.41635Z",stroke:"#818181",strokeWidth:"1.16667",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M7.00024 8.75033C7.96673 8.75033 8.75024 7.96682 8.75024 7.00033C8.75024 6.03383 7.96673 5.25033 7.00024 5.25033C6.03374 5.25033 5.25024 6.03383 5.25024 7.00033C5.25024 7.96682 6.03374 8.75033 7.00024 8.75033Z",stroke:"#818181",strokeWidth:"1.16667",strokeLinecap:"round",strokeLinejoin:"round"})]}):u.jsx("svg",{className:e,onClick:n,xmlns:"http://www.w3.org/2000/svg",width:"1.5em",height:"1.5em",viewBox:"0 0 14 14",fill:"none",children:u.jsx("path",{d:"M6.26672 2.97052C6.50379 2.93547 6.74835 2.91667 7.00024 2.91667C9.97816 2.91667 11.9323 5.54449 12.5887 6.58398C12.6682 6.70979 12.7079 6.7727 12.7302 6.86973C12.7469 6.94259 12.7468 7.05755 12.7301 7.13042C12.7079 7.22744 12.6679 7.29077 12.5879 7.41741C12.413 7.69425 12.1463 8.08331 11.793 8.50527M3.92252 3.9171C2.66131 4.77266 1.8051 5.9613 1.41231 6.58308C1.3325 6.70942 1.29259 6.7726 1.27035 6.86961C1.25364 6.94248 1.25363 7.05742 1.27033 7.13029C1.29257 7.22731 1.33229 7.29022 1.41174 7.41602C2.06823 8.45551 4.02232 11.0833 7.00024 11.0833C8.20098 11.0833 9.23526 10.6561 10.0851 10.078M1.75024 1.75L12.2502 12.25M5.76281 5.76256C5.44612 6.07925 5.25024 6.51675 5.25024 7C5.25024 7.9665 6.03374 8.75 7.00024 8.75C7.48349 8.75 7.92099 8.55413 8.23768 8.23744",stroke:"#818181",strokeWidth:"1.16667",strokeLinecap:"round",strokeLinejoin:"round"})}),Xg="PasswordInput__GDJDN",Jg="eyeIcon__kDExG",ra={PasswordInput:Xg,eyeIcon:Jg},ey=E.forwardRef((e,t)=>{const[n,r]=E.useState("password"),o=E.useCallback(()=>{r(s=>s==="password"?"text":"password")},[r]);return u.jsxs("div",{className:D(ra.PasswordInput,e.className),children:[u.jsx(zr,{type:n,...e,ref:t}),u.jsx(Dl,{className:ra.eyeIcon,onClick:o,state:n==="password"?"open":"closed"})]})});var vo="focusScope.autoFocusOnMount",bo="focusScope.autoFocusOnUnmount",oa={bubbles:!1,cancelable:!0},ty="FocusScope",kl=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=g.useState(null),l=fn(o),d=fn(s),p=g.useRef(null),h=Ae(t,f=>c(f)),m=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let f=function(S){if(m.paused||!a)return;const _=S.target;a.contains(_)?p.current=_:Je(p.current,{select:!0})},y=function(S){if(m.paused||!a)return;const _=S.relatedTarget;_!==null&&(a.contains(_)||Je(p.current,{select:!0}))},C=function(S){if(document.activeElement===document.body)for(const R of S)R.removedNodes.length>0&&Je(a)};document.addEventListener("focusin",f),document.addEventListener("focusout",y);const x=new MutationObserver(C);return a&&x.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",y),x.disconnect()}}},[r,a,m.paused]),g.useEffect(()=>{if(a){ia.add(m);const f=document.activeElement;if(!a.contains(f)){const C=new CustomEvent(vo,oa);a.addEventListener(vo,l),a.dispatchEvent(C),C.defaultPrevented||(ny(ay(Ll(a)),{select:!0}),document.activeElement===f&&Je(a))}return()=>{a.removeEventListener(vo,l),setTimeout(()=>{const C=new CustomEvent(bo,oa);a.addEventListener(bo,d),a.dispatchEvent(C),C.defaultPrevented||Je(f??document.body,{select:!0}),a.removeEventListener(bo,d),ia.remove(m)},0)}}},[a,l,d,m]);const w=g.useCallback(f=>{if(!n&&!r||m.paused)return;const y=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,C=document.activeElement;if(y&&C){const x=f.currentTarget,[S,_]=ry(x);S&&_?!f.shiftKey&&C===_?(f.preventDefault(),n&&Je(S,{select:!0})):f.shiftKey&&C===S&&(f.preventDefault(),n&&Je(_,{select:!0})):C===x&&f.preventDefault()}},[n,r,m.paused]);return u.jsx(ge.div,{tabIndex:-1,...i,ref:h,onKeyDown:w})});kl.displayName=ty;function ny(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Je(r,{select:t}),document.activeElement!==n)return}function ry(e){const t=Ll(e),n=sa(t,e),r=sa(t.reverse(),e);return[n,r]}function Ll(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 sa(e,t){for(const n of e)if(!oy(n,{upTo:t}))return n}function oy(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 sy(e){return e instanceof HTMLInputElement&&"select"in e}function Je(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&sy(e)&&t&&e.select()}}var ia=iy();function iy(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=aa(e,t),e.unshift(t)},remove(t){var n;e=aa(e,t),(n=e[0])==null||n.resume()}}}function aa(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ay(e){return e.filter(t=>t.tagName!=="A")}var wo=0;function cy(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ca()),document.body.insertAdjacentElement("beforeend",e[1]??ca()),wo++,()=>{wo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),wo--}},[])}function ca(){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 _r="right-scroll-bar-position",Rr="width-before-scroll-bar",ly="with-scroll-bars-hidden",uy="--removed-body-scroll-bar-size";function Co(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function dy(e,t){var n=E.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 fy=typeof window<"u"?g.useLayoutEffect:g.useEffect,la=new WeakMap;function hy(e,t){var n=dy(null,function(r){return e.forEach(function(o){return Co(o,r)})});return fy(function(){var r=la.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Co(a,null)}),s.forEach(function(a){o.has(a)||Co(a,i)})}la.set(n,e)},[e]),n}function py(e){return e}function my(e,t){t===void 0&&(t=py);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 i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var d=i;i=[],d.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(d){i.push(d),l()},filter:function(d){return i=i.filter(d),n}}}};return o}function gy(e){e===void 0&&(e={});var t=my(null);return t.options=Le({async:!0,ssr:!1},e),t}var Il=function(e){var t=e.sideCar,n=oc(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 g.createElement(r,Le({},n))};Il.isSideCarExport=!0;function yy(e,t){return e.useMedium(t),Il}var Ml=gy(),xo=function(){},eo=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:xo,onWheelCapture:xo,onTouchMoveCapture:xo}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,l=e.removeScrollBar,d=e.enabled,p=e.shards,h=e.sideCar,m=e.noRelative,w=e.noIsolation,f=e.inert,y=e.allowPinchZoom,C=e.as,x=C===void 0?"div":C,S=e.gapMode,_=oc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=h,A=hy([n,t]),T=Le(Le({},_),o);return g.createElement(g.Fragment,null,d&&g.createElement(R,{sideCar:Ml,removeScrollBar:l,shards:p,noRelative:m,noIsolation:w,inert:f,setCallbacks:s,allowPinchZoom:!!y,lockRef:n,gapMode:S}),i?g.cloneElement(g.Children.only(a),Le(Le({},T),{ref:A})):g.createElement(x,Le({},T,{className:c,ref:A}),a))});eo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};eo.classNames={fullWidth:Rr,zeroRight:_r};var vy=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function by(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=vy();return t&&e.setAttribute("nonce",t),e}function wy(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Cy(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var xy=function(){var e=0,t=null;return{add:function(n){e==0&&(t=by())&&(wy(t,n),Cy(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ey=function(){var e=xy();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Nl=function(){var e=Ey(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Sy={left:0,top:0,right:0,gap:0},Eo=function(e){return parseInt(e||"",10)||0},_y=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[Eo(n),Eo(r),Eo(o)]},Ry=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Sy;var t=_y(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])}},Ty=Nl(),Zt="data-scroll-locked",Py=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
209
|
+
.`.concat(ly,` {
|
|
235
210
|
overflow: hidden `).concat(r,`;
|
|
236
211
|
padding-right: `).concat(a,"px ").concat(r,`;
|
|
237
212
|
}
|
|
@@ -265,13 +240,13 @@ to {
|
|
|
265
240
|
}
|
|
266
241
|
|
|
267
242
|
body[`).concat(Zt,`] {
|
|
268
|
-
`).concat(
|
|
243
|
+
`).concat(uy,": ").concat(a,`px;
|
|
269
244
|
}
|
|
270
|
-
`)},
|
|
245
|
+
`)},ua=function(){var e=parseInt(document.body.getAttribute(Zt)||"0",10);return isFinite(e)?e:0},Ay=function(){g.useEffect(function(){return document.body.setAttribute(Zt,(ua()+1).toString()),function(){var e=ua()-1;e<=0?document.body.removeAttribute(Zt):document.body.setAttribute(Zt,e.toString())}},[])},Oy=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Ay();var s=g.useMemo(function(){return Ry(o)},[o]);return g.createElement(Ty,{styles:Py(s,!t,o,n?"":"!important")})},os=!1;if(typeof window<"u")try{var dr=Object.defineProperty({},"passive",{get:function(){return os=!0,!0}});window.addEventListener("test",dr,dr),window.removeEventListener("test",dr,dr)}catch{os=!1}var Gt=os?{passive:!1}:!1,jy=function(e){return e.tagName==="TEXTAREA"},$l=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!jy(e)&&n[t]==="visible")},Dy=function(e){return $l(e,"overflowY")},ky=function(e){return $l(e,"overflowX")},da=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Fl(e,r);if(o){var s=Bl(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ly=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Iy=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Fl=function(e,t){return e==="v"?Dy(t):ky(t)},Bl=function(e,t){return e==="v"?Ly(t):Iy(t)},My=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ny=function(e,t,n,r,o){var s=My(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,c=t.contains(a),l=!1,d=i>0,p=0,h=0;do{if(!a)break;var m=Bl(e,a),w=m[0],f=m[1],y=m[2],C=f-y-s*w;(w||C)&&Fl(e,a)&&(p+=C,h+=w);var x=a.parentNode;a=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(d&&Math.abs(p)<1||!d&&Math.abs(h)<1)&&(l=!0),l},fr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},fa=function(e){return[e.deltaX,e.deltaY]},ha=function(e){return e&&"current"in e?e.current:e},$y=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Fy=function(e){return`
|
|
271
246
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
272
247
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
273
|
-
`)},
|
|
248
|
+
`)},By=0,Qt=[];function Uy(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),o=g.useState(By++)[0],s=g.useState(Nl)[0],i=g.useRef(e);g.useEffect(function(){i.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var f=Tr([e.lockRef.current],(e.shards||[]).map(ha),!0).filter(Boolean);return f.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),f.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=g.useCallback(function(f,y){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!i.current.allowPinchZoom;var C=fr(f),x=n.current,S="deltaX"in f?f.deltaX:x[0]-C[0],_="deltaY"in f?f.deltaY:x[1]-C[1],R,A=f.target,T=Math.abs(S)>Math.abs(_)?"h":"v";if("touches"in f&&T==="h"&&A.type==="range")return!1;var I=da(T,A);if(!I)return!0;if(I?R=T:(R=T==="v"?"h":"v",I=da(T,A)),!I)return!1;if(!r.current&&"changedTouches"in f&&(S||_)&&(r.current=R),!R)return!0;var M=r.current||R;return Ny(M,y,f,M==="h"?S:_)},[]),c=g.useCallback(function(f){var y=f;if(!(!Qt.length||Qt[Qt.length-1]!==s)){var C="deltaY"in y?fa(y):fr(y),x=t.current.filter(function(R){return R.name===y.type&&(R.target===y.target||y.target===R.shadowParent)&&$y(R.delta,C)})[0];if(x&&x.should){y.cancelable&&y.preventDefault();return}if(!x){var S=(i.current.shards||[]).map(ha).filter(Boolean).filter(function(R){return R.contains(y.target)}),_=S.length>0?a(y,S[0]):!i.current.noIsolation;_&&y.cancelable&&y.preventDefault()}}},[]),l=g.useCallback(function(f,y,C,x){var S={name:f,delta:y,target:C,should:x,shadowParent:Hy(C)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(_){return _!==S})},1)},[]),d=g.useCallback(function(f){n.current=fr(f),r.current=void 0},[]),p=g.useCallback(function(f){l(f.type,fa(f),f.target,a(f,e.lockRef.current))},[]),h=g.useCallback(function(f){l(f.type,fr(f),f.target,a(f,e.lockRef.current))},[]);g.useEffect(function(){return Qt.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Gt),document.addEventListener("touchmove",c,Gt),document.addEventListener("touchstart",d,Gt),function(){Qt=Qt.filter(function(f){return f!==s}),document.removeEventListener("wheel",c,Gt),document.removeEventListener("touchmove",c,Gt),document.removeEventListener("touchstart",d,Gt)}},[]);var m=e.removeScrollBar,w=e.inert;return g.createElement(g.Fragment,null,w?g.createElement(s,{styles:Fy(o)}):null,m?g.createElement(Oy,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Hy(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Wy=yy(Ml,Uy);var Ul=g.forwardRef(function(e,t){return g.createElement(eo,Le({},e,{ref:t,sideCar:Wy}))});Ul.classNames=eo.classNames;var Vy=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Kt=new WeakMap,hr=new WeakMap,pr={},So=0,Hl=function(e){return e&&(e.host||Hl(e.parentNode))},qy=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Hl(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})},zy=function(e,t,n,r){var o=qy(t,Array.isArray(e)?e:[e]);pr[n]||(pr[n]=new WeakMap);var s=pr[n],i=[],a=new Set,c=new Set(o),l=function(p){!p||a.has(p)||(a.add(p),l(p.parentNode))};o.forEach(l);var d=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(h){if(a.has(h))d(h);else try{var m=h.getAttribute(r),w=m!==null&&m!=="false",f=(Kt.get(h)||0)+1,y=(s.get(h)||0)+1;Kt.set(h,f),s.set(h,y),i.push(h),f===1&&w&&hr.set(h,!0),y===1&&h.setAttribute(n,"true"),w||h.setAttribute(r,"true")}catch(C){console.error("aria-hidden: cannot operate on ",h,C)}})};return d(t),a.clear(),So++,function(){i.forEach(function(p){var h=Kt.get(p)-1,m=s.get(p)-1;Kt.set(p,h),s.set(p,m),h||(hr.has(p)||p.removeAttribute(r),hr.delete(p)),m||p.removeAttribute(n)}),So--,So||(Kt=new WeakMap,Kt=new WeakMap,hr=new WeakMap,pr={})}},Gy=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Vy(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),zy(r,o,n,"aria-hidden")):function(){return null}},to="Dialog",[Wl,Q0]=Es(to),[Qy,Oe]=Wl(to),Vl=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=g.useRef(null),c=g.useRef(null),[l,d]=yl({prop:r,defaultProp:o??!1,onChange:s,caller:to});return u.jsx(Qy,{scope:t,triggerRef:a,contentRef:c,contentId:Er(),titleId:Er(),descriptionId:Er(),open:l,onOpenChange:d,onOpenToggle:g.useCallback(()=>d(p=>!p),[d]),modal:i,children:n})};Vl.displayName=to;var ql="DialogTrigger",Ky=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Oe(ql,n),s=Ae(t,o.triggerRef);return u.jsx(ge.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Bs(o.open),...r,ref:s,onClick:me(e.onClick,o.onOpenToggle)})});Ky.displayName=ql;var $s="DialogPortal",[Yy,zl]=Wl($s,{forceMount:void 0}),Gl=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=Oe($s,t);return u.jsx(Yy,{scope:t,forceMount:n,children:g.Children.map(r,i=>u.jsx(vn,{present:n||s.open,children:u.jsx(Ls,{asChild:!0,container:o,children:i})}))})};Gl.displayName=$s;var Nr="DialogOverlay",Ql=g.forwardRef((e,t)=>{const n=zl(Nr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Oe(Nr,e.__scopeDialog);return s.modal?u.jsx(vn,{present:r||s.open,children:u.jsx(Xy,{...o,ref:t})}):null});Ql.displayName=Nr;var Zy=xs("DialogOverlay.RemoveScroll"),Xy=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Oe(Nr,n);return u.jsx(Ul,{as:Zy,allowPinchZoom:!0,shards:[o.contentRef],children:u.jsx(ge.div,{"data-state":Bs(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ft="DialogContent",Kl=g.forwardRef((e,t)=>{const n=zl(Ft,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Oe(Ft,e.__scopeDialog);return u.jsx(vn,{present:r||s.open,children:s.modal?u.jsx(Jy,{...o,ref:t}):u.jsx(ev,{...o,ref:t})})});Kl.displayName=Ft;var Jy=g.forwardRef((e,t)=>{const n=Oe(Ft,e.__scopeDialog),r=g.useRef(null),o=Ae(t,n.contentRef,r);return g.useEffect(()=>{const s=r.current;if(s)return Gy(s)},[]),u.jsx(Yl,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:me(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:me(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:me(e.onFocusOutside,s=>s.preventDefault())})}),ev=g.forwardRef((e,t)=>{const n=Oe(Ft,e.__scopeDialog),r=g.useRef(!1),o=g.useRef(!1);return u.jsx(Yl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((l=n.triggerRef.current)==null?void 0:l.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Yl=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=Oe(Ft,n),c=g.useRef(null),l=Ae(t,c);return cy(),u.jsxs(u.Fragment,{children:[u.jsx(kl,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:u.jsx(Ss,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Bs(a.open),...i,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(tv,{titleId:a.titleId}),u.jsx(rv,{contentRef:c,descriptionId:a.descriptionId})]})]})}),Fs="DialogTitle",Zl=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Oe(Fs,n);return u.jsx(ge.h2,{id:o.titleId,...r,ref:t})});Zl.displayName=Fs;var Xl="DialogDescription",Jl=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Oe(Xl,n);return u.jsx(ge.p,{id:o.descriptionId,...r,ref:t})});Jl.displayName=Xl;var eu="DialogClose",tu=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Oe(eu,n);return u.jsx(ge.button,{type:"button",...r,ref:t,onClick:me(e.onClick,()=>o.onOpenChange(!1))})});tu.displayName=eu;function Bs(e){return e?"open":"closed"}var nu="DialogTitleWarning",[K0,ru]=f1(nu,{contentName:Ft,titleName:Fs,docsSlug:"dialog"}),tv=({titleId:e})=>{const t=ru(nu),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
274
249
|
|
|
275
250
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
276
251
|
|
|
277
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},pv="DialogDescriptionWarning",mv=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${cu(pv).contentName}}.`;return g.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},gv=Kl,yv=Xl,vv=Jl,bv=eu,wv=nu,Cv=ou,xv=iu;const Ev="Overlay__M5Z83",Sv="Content__wAkP4",ma={Overlay:Ev,Content:Sv},_v="Header__VHxNf",Rv="Content__I04qM",Tv="Close__xSN-7",Pv="Title__Dznh6",Av="Footer__-8gzQ",Ov="Actions__kKF2Q",Ut={Header:_v,Content:Rv,Close:Tv,Title:Pv,Footer:Av,Actions:Ov},lu=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Ut.Header,t);return u.jsx("div",{ref:r,className:o,...n,children:e})});lu.displayName="Header";const uu=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Ut.Content,t);return u.jsx("div",{ref:r,className:o,...n,children:e})});uu.displayName="Content";const du=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Ut.Footer,t);return u.jsx("div",{ref:r,className:o,...n,children:e})});du.displayName="Footer";const fu=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Ut.Title,t);return u.jsx(wv,{ref:r,className:o,...n,children:e})});fu.displayName="Title";const hu=E.forwardRef(({className:e,...t},n)=>{const r=D(Ut.Close,e);return u.jsx(xv,{ref:n,asChild:!0,className:r,...t,children:u.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("path",{d:"M11 1L1 11M1 1L11 11",stroke:"#A9A9A9",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})});hu.displayName="Close";const pu=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Ut.Actions,t);return u.jsx("div",{ref:r,className:o,...n,children:e})});pu.displayName="Actions";const mu=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Ut.Description,t);return u.jsx("div",{ref:r,className:o,...n,children:e})});mu.displayName="Description";const ie=({children:e,onClose:t,open:n=!1,className:r})=>{const o=()=>{t==null||t()};return u.jsx(gv,{onOpenChange:o,open:n,children:u.jsxs(yv,{children:[u.jsx(vv,{className:ma.Overlay}),u.jsxs(bv,{children:[u.jsx(Cv,{}),u.jsx("div",{className:D(ma.Content,r),children:e})]})]})})};ie.displayName="Dialog";ie.Header=lu;ie.Content=uu;ie.Footer=du;ie.Actions=pu;ie.Title=fu;ie.Description=mu;ie.Close=hu;const jv="pill__vtGwB",Dv="pill--solid__F-mR4",kv="pill--outline__gC-mh",ga={pill:jv,"pill--solid":"pill--solid__F-mR4",pillSolid:Dv,"pill--outline":"pill--outline__gC-mh",pillOutline:kv},Lv=({children:e,variant:t="solid",className:n})=>{const r=D(ga.pill,ga[`pill--${t}`],n);return u.jsx("div",{className:r,children:e})},Iv="DialogContent__-WjG9",Mv="Message__AUgVP",ya={DialogContent:Iv,Message:Mv},gu=({loading:e,title:t,children:n,className:r,onClose:o,onConfirm:s,...i})=>u.jsxs(ie,{...i,className:D(ya.DialogContent,r),children:[u.jsxs(ie.Header,{children:[u.jsx(ie.Title,{children:t}),u.jsx(ie.Close,{onClick:o})]}),u.jsx(ie.Content,{children:typeof n=="string"?u.jsx("p",{className:ya.Message,children:n}):n}),u.jsx(ie.Footer,{children:u.jsxs(ie.Actions,{children:[u.jsx(Dr,{onClick:o,disabled:e,variant:"outlined",children:"Cancel"}),u.jsx(Dr,{onClick:s,disabled:e,loading:e,variant:"contained",children:"Confirm"})]})})]});gu.displayName="ConfirmDialog";const Nv="container__AjtYJ",$v="title__A2vCu",Fv="description__bP6Ig",Bv="mailToText__SdlsE",mr={container:Nv,title:$v,description:Fv,mailToText:Bv},yu=()=>u.jsxs("svg",{width:"200",height:"200",viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u.jsx("path",{d:"M184.415 152.221C183.936 151.406 183.401 150.621 182.892 149.824C181.61 147.817 180.327 145.809 179.045 143.801C177.102 140.759 175.159 137.717 173.215 134.676C170.766 130.841 168.316 127.006 165.866 123.171C163.068 118.79 160.27 114.41 157.472 110.03C154.484 105.352 151.496 100.674 148.508 95.9965C145.474 91.2464 142.439 86.4963 139.405 81.7463C136.513 77.2189 133.621 72.6915 130.729 68.1641C128.123 64.084 125.517 60.0039 122.91 55.9238C120.748 52.5389 118.586 49.1541 116.424 45.7692C114.864 43.3273 113.304 40.8854 111.744 38.4436C110.943 37.1899 110.142 35.9362 109.342 34.6825C108.765 33.7802 108.096 32.9744 107.292 32.2572C104.604 29.8584 100.572 29.2302 97.2301 30.5252C94.5951 31.5463 92.6177 33.3853 91.0923 35.7373C90.8768 36.0696 90.6658 36.405 90.4526 36.7387C89.3951 38.3941 88.3378 40.0494 87.2803 41.7049C85.5124 44.4725 83.7444 47.2402 81.9765 50.0079C79.644 53.6594 77.3114 57.3111 74.9788 60.9626C72.2632 65.2138 69.5477 69.465 66.8321 73.7162C63.8817 78.3349 60.9313 82.9536 57.9811 87.5722C54.9542 92.3106 51.9274 97.0491 48.9006 101.787C45.9557 106.398 43.0107 111.008 40.0658 115.618C37.3487 119.872 34.6316 124.125 31.9145 128.379C29.6106 131.986 27.3067 135.592 25.0028 139.199C23.2565 141.933 21.5101 144.667 19.7639 147.4C18.7335 149.013 17.7031 150.626 16.6728 152.239C14.8665 155.067 13.7231 158.171 14.23 161.595C14.9672 166.576 19.2366 170.131 24.2215 170.137C25.559 170.139 26.8963 170.137 28.2338 170.137C30.9198 170.137 33.6058 170.137 36.2918 170.137C40.0725 170.137 43.8533 170.137 47.6341 170.137C52.2557 170.137 56.8772 170.137 61.4989 170.137C66.7339 170.137 71.969 170.137 77.204 170.137C82.7467 170.137 88.2894 170.137 93.8322 170.137C99.4529 170.137 105.074 170.137 110.694 170.137C116.139 170.137 121.584 170.137 127.029 170.137C132.044 170.137 137.06 170.137 142.075 170.137C146.425 170.137 150.776 170.137 155.127 170.137C158.516 170.137 161.904 170.137 165.293 170.137C167.49 170.137 169.686 170.137 171.883 170.137C172.633 170.137 173.384 170.137 174.135 170.137C178.404 170.087 182.136 167.627 184.212 163.932C186.248 160.307 186.562 155.866 184.415 152.221ZM94.0937 37.3471C94.0897 37.3539 94.0862 37.3597 94.0824 37.3661C94.0826 37.3652 94.0831 37.3642 94.0833 37.3632C94.0844 37.3581 94.0909 37.3518 94.0937 37.3471ZM178.584 164.489C178.476 164.538 178.524 164.516 178.584 164.489V164.489ZM180.937 162.79C180.979 162.72 181.118 162.485 181.127 162.498C181.145 162.528 181.058 162.647 180.937 162.79ZM181.821 160.333C181.806 160.446 181.782 160.646 181.773 160.697C181.736 160.919 181.686 161.139 181.637 161.359C181.637 161.359 181.637 161.359 181.637 161.359C181.629 161.377 181.621 161.399 181.61 161.426C181.54 161.604 181.472 161.785 181.406 161.965C181.402 161.977 181.398 161.988 181.394 161.999C181.304 162.16 181.219 162.323 181.123 162.481C181.074 162.562 181.016 162.641 180.97 162.724C180.949 162.762 180.936 162.785 180.93 162.798C180.727 163.035 180.436 163.332 180.388 163.385C180.696 163.049 180.535 163.229 180.318 163.42C180.172 163.548 180.018 163.666 179.869 163.79C179.848 163.807 179.831 163.822 179.816 163.835C179.797 163.845 179.775 163.857 179.747 163.873C179.576 163.97 179.411 164.078 179.238 164.171C179.043 164.277 178.844 164.373 178.642 164.463C178.556 164.494 178.471 164.526 178.384 164.553C177.532 164.819 176.835 164.945 176.084 164.954C175.296 164.954 174.508 164.954 173.719 164.954C171.519 164.954 169.318 164.954 167.118 164.954C163.751 164.954 160.385 164.954 157.019 164.954C152.756 164.954 148.493 164.954 144.231 164.954C139.275 164.954 134.319 164.954 129.364 164.954C123.981 164.954 118.598 164.954 113.215 164.954C107.651 164.954 102.086 164.954 96.5224 164.954C91.024 164.954 85.5255 164.954 80.0271 164.954C74.8407 164.954 69.6543 164.954 64.4679 164.954C59.8401 164.954 55.2123 164.954 50.5846 164.954C46.7784 164.954 42.9721 164.954 39.166 164.954C36.3891 164.954 33.6122 164.954 30.8354 164.954C29.3555 164.954 27.8756 164.954 26.3957 164.954C25.9641 164.954 25.534 164.958 25.1029 164.922C23.4511 164.785 22.11 164.207 20.7626 163.127C20.3445 162.792 19.7301 162.074 19.3142 161.434C19.2096 161.273 19.1102 161.109 19.0161 160.942C18.9707 160.861 18.8013 160.534 18.8105 160.558C18.7451 160.414 18.5329 159.846 18.4422 159.537C18.3467 159.211 18.2692 158.879 18.2129 158.544C18.2174 158.545 18.1876 158.285 18.1815 158.192C18.1669 157.964 18.1617 157.736 18.1651 157.508C18.166 157.455 18.1793 157.245 18.185 157.131C18.2055 157.005 18.2441 156.74 18.2591 156.662C18.2913 156.493 18.3319 156.326 18.3726 156.16C18.2821 156.539 18.4099 156.072 18.4891 155.866C18.518 155.79 18.6652 155.487 18.6846 155.432C18.7383 155.339 18.7932 155.243 18.8125 155.21C18.8692 155.114 18.9282 155.019 18.9875 154.924C19.0003 154.904 19.0137 154.884 19.0265 154.863C19.2211 154.554 19.4201 154.247 19.617 153.939C20.6335 152.348 21.6501 150.756 22.6667 149.165C24.3869 146.472 26.107 143.779 27.8271 141.086C30.0848 137.552 32.3425 134.017 34.6001 130.483C37.2646 126.312 39.9291 122.141 42.5935 117.97C45.5011 113.418 48.4086 108.866 51.3161 104.315C54.3131 99.6229 57.31 94.9312 60.3069 90.2397C63.2394 85.6489 66.172 81.058 69.1045 76.4672C71.819 72.2178 74.5334 67.9683 77.2479 63.719C79.5904 60.0517 81.9331 56.3844 84.2756 52.7172C86.0852 49.8842 87.8948 47.0513 89.7044 44.2184C90.8459 42.4315 91.9873 40.6446 93.1287 38.8578C93.3976 38.4368 93.6701 38.0178 93.9356 37.5945C93.9507 37.5705 93.9737 37.5416 93.9972 37.511C93.8744 37.7231 94.1597 37.2638 94.301 37.0921C94.4017 36.9695 94.5483 36.8114 94.5423 36.8113C94.6372 36.721 94.7333 36.6319 94.8323 36.546C94.9866 36.4121 95.1478 36.2876 95.3084 36.1615C94.9392 36.4513 95.3917 36.1121 95.5441 36.0212C96.7591 35.2961 98.1095 34.9498 99.7068 35.0725C101.356 35.1993 102.702 35.7434 104.07 36.8307C104.685 37.3192 105.311 38.1542 105.817 38.9457C106.592 40.1592 107.367 41.3727 108.142 42.5862C109.667 44.9733 111.192 47.3605 112.717 49.7476C114.838 53.0679 116.959 56.3881 119.08 59.7083C121.629 63.6999 124.179 67.6913 126.729 71.6829C129.579 76.1455 132.43 80.6082 135.281 85.0709C138.267 89.7458 141.253 94.4206 144.239 99.0955C147.207 103.742 150.176 108.388 153.144 113.035C155.94 117.412 158.736 121.789 161.532 126.167C164.002 130.034 166.473 133.902 168.943 137.769C170.935 140.886 172.926 144.003 174.917 147.12C176.27 149.239 177.623 151.357 178.976 153.475C179.551 154.376 180.134 155.272 180.702 156.177C181.138 156.872 181.311 157.219 181.54 157.972C181.6 158.167 181.652 158.363 181.697 158.561C181.711 158.623 181.759 158.873 181.78 158.97C181.787 159.063 181.815 159.319 181.819 159.383C181.831 159.579 181.836 159.775 181.834 159.972C181.834 160.022 181.825 160.217 181.821 160.333Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M98.5821 122.507C99.019 122.759 99.6307 122.629 100.038 122.389C101.205 121.703 101.925 120.275 102.041 118.92C103.115 106.361 106.514 75.1051 106.514 68.3062C106.514 59.902 92.8134 60.6835 92.0664 71.3279C91.6887 76.7103 97.5083 119.581 97.8266 121.187C97.9188 121.652 98.1423 122.253 98.5821 122.507Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M101.841 133.945C101.826 133.94 101.812 133.934 101.797 133.929C98.2767 132.6 94.4012 134.976 93.9964 138.717C93.9765 138.901 93.9636 139.086 93.958 139.272C93.8552 142.712 96.4467 146.126 99.8464 146.664C103.245 147.201 106.896 144.494 107.099 141.059C107.285 137.909 104.789 135.072 101.841 133.945Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M161.729 131.662C161.873 131.367 162.082 130.81 161.71 130.584C161.365 130.375 160.901 130.836 160.768 131.107C156.804 139.201 152.84 147.295 148.877 155.389C147.759 157.67 146.642 159.952 145.525 162.233C145.38 162.528 145.171 163.085 145.543 163.311C145.888 163.52 146.352 163.059 146.485 162.788C150.449 154.694 154.413 146.6 158.377 138.506C159.494 136.225 160.611 133.943 161.729 131.662Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M144.786 152.64C144.441 152.43 143.977 152.891 143.844 153.163C142.363 156.187 140.882 159.21 139.402 162.234C139.257 162.528 139.048 163.085 139.42 163.311C139.765 163.521 140.229 163.06 140.362 162.788C141.843 159.764 143.323 156.741 144.804 153.717C144.948 153.423 145.158 152.866 144.786 152.64Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M136.792 156.459C136.447 156.25 135.983 156.711 135.85 156.982C134.993 158.733 134.136 160.483 133.279 162.233C133.134 162.528 132.925 163.085 133.297 163.311C133.642 163.52 134.106 163.06 134.239 162.788C135.096 161.037 135.953 159.287 136.81 157.537C136.955 157.242 137.164 156.685 136.792 156.459Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M129.1 159.663C128.755 159.454 128.291 159.915 128.158 160.186C127.824 160.869 127.49 161.551 127.155 162.234C127.011 162.528 126.802 163.086 127.174 163.311C127.519 163.521 127.983 163.06 128.116 162.788C128.45 162.106 128.784 161.423 129.118 160.741C129.263 160.447 129.472 159.889 129.1 159.663Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M165.835 137.946C165.979 137.652 166.188 137.094 165.816 136.868C165.471 136.659 165.007 137.12 164.874 137.392C161.72 143.832 158.566 150.273 155.412 156.713C154.511 158.553 153.609 160.393 152.708 162.233C152.564 162.528 152.355 163.085 152.726 163.311C153.071 163.52 153.535 163.06 153.669 162.788C156.823 156.347 159.977 149.907 163.131 143.466C164.032 141.626 164.933 139.786 165.835 137.946Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M169.923 143.153C169.578 142.943 169.114 143.404 168.98 143.676C165.951 149.862 162.921 156.048 159.892 162.234C159.748 162.528 159.538 163.086 159.91 163.311C160.255 163.521 160.719 163.06 160.852 162.788C163.882 156.602 166.911 150.416 169.941 144.23C170.085 143.936 170.294 143.378 169.923 143.153Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M174.332 148.821C173.987 148.611 173.523 149.072 173.39 149.344C171.286 153.64 169.182 157.937 167.077 162.234C166.933 162.528 166.724 163.086 167.095 163.311C167.44 163.521 167.905 163.06 168.038 162.788C170.142 158.492 172.246 154.195 174.351 149.898C174.495 149.604 174.704 149.046 174.332 148.821Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M178.197 155.597C177.852 155.387 177.388 155.848 177.255 156.12C176.257 158.158 175.259 160.196 174.261 162.233C174.117 162.528 173.907 163.085 174.279 163.311C174.624 163.52 175.088 163.06 175.221 162.788C176.219 160.75 177.217 158.712 178.215 156.674C178.36 156.38 178.569 155.823 178.197 155.597Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M97.1962 40.2135C97.3477 39.9803 97.4773 39.477 97.1807 39.2971C96.8678 39.1072 96.5194 39.5265 96.3794 39.7419C94.7034 42.3205 93.0556 44.9176 91.4179 47.5205C88.1743 52.6759 84.976 57.8633 81.9271 63.1367C80.4155 65.7509 78.9283 68.3855 77.5879 71.0925C77.4642 71.3423 77.2879 71.8174 77.6034 72.0088C77.8975 72.1874 78.2905 71.7947 78.4047 71.564C80.9657 66.3919 83.9726 61.4308 86.9671 56.5018C89.7369 51.9427 92.5713 47.4226 95.4474 42.9297C96.0279 42.0228 96.6094 41.1164 97.1962 40.2135Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M75.3224 76.1247C75.0193 75.9408 74.6477 76.3459 74.521 76.5695C74.1645 77.1991 73.808 77.8286 73.4515 78.4581C73.3144 78.7003 73.1605 79.1884 73.467 79.3744C73.77 79.5583 74.1416 79.1532 74.2684 78.9296C74.6248 78.3001 74.9814 77.6705 75.3378 77.0411C75.475 76.7988 75.6288 76.3107 75.3224 76.1247Z",fill:"var(--pae-shell-color-secondary)"})]});yu.displayName="WarningIcon";const Uv="support@bluealba.com",Hv="@bluealba/pae-shell-ui",Us=()=>{const{supportEmail:e=Uv}=Va(Hv),t=`mailto:${e}?Subject=Support`;return u.jsxs("div",{className:mr.container,children:[u.jsx(yu,{}),u.jsx("div",{className:mr.title,children:"Oops! Something went wrong"}),u.jsxs("div",{className:mr.description,children:["If the error persists, ",u.jsx("a",{className:mr.mailToText,href:t,children:"contact the administrator."})]})]})};Us.displayName="ErrorState";const Wv="List__h09XG",Vv="List__h09XG",zv="Item__YMy2i",qv="Item__YMy2i",Gv="List--primary__J2pbx",Qv="List--secondary__gi1ao",Kv="Item--selected__yRWow",Yv="Title__RJmEW",Zv="Title__RJmEW",Xv="Description__DGyX2",Jv="Description__DGyX2",e0="Actions__UHP5l",t0="Actions__UHP5l",n0="Action__q-R1I",r0="Action__q-R1I",o0="Item--disabled__Ke1u-",s0="List--small__ijoSR",i0="List--medium__E1FEY",a0="List--large__T8tfz",c0="Icon__dFr-L",l0="Icon__dFr-L",Re={List:Wv,list:Vv,Item:zv,item:qv,"List--primary":"List--primary__J2pbx",listPrimary:Gv,"List--secondary":"List--secondary__gi1ao",listSecondary:Qv,"Item--selected":"Item--selected__yRWow",itemSelected:Kv,Title:Yv,title:Zv,Description:Xv,description:Jv,Actions:e0,actions:t0,Action:n0,action:r0,"Item--disabled":"Item--disabled__Ke1u-",itemDisabled:o0,"List--small":"List--small__ijoSR",listSmall:s0,"List--medium":"List--medium__E1FEY",listMedium:i0,"List--large":"List--large__T8tfz",listLarge:a0,Icon:c0,icon:l0},vu=E.forwardRef(({children:e,className:t,selected:n,disabled:r=!1,...o},s)=>{const i=D(Re.Item,{[Re["Item--selected"]]:n,[Re["Item--disabled"]]:r},t);return u.jsx("li",{ref:s,className:i,role:"listitem","aria-disabled":r,...o,children:e})});vu.displayName="Item";const bu=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Re.Title,t);return u.jsx("h3",{ref:r,className:o,...n,children:e})});bu.displayName="Title";const wu=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Re.Description,t);return u.jsx("p",{ref:r,className:o,...n,children:e})});wu.displayName="Description";const Hs=({className:e,...t})=>u.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,...t,children:[u.jsx("path",{d:"M6 6.5C6.27614 6.5 6.5 6.27614 6.5 6C6.5 5.72386 6.27614 5.5 6 5.5C5.72386 5.5 5.5 5.72386 5.5 6C5.5 6.27614 5.72386 6.5 6 6.5Z",stroke:"#A9A9A9",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M9.5 6.5C9.77614 6.5 10 6.27614 10 6C10 5.72386 9.77614 5.5 9.5 5.5C9.22386 5.5 9 5.72386 9 6C9 6.27614 9.22386 6.5 9.5 6.5Z",stroke:"#A9A9A9",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M2.5 6.5C2.77614 6.5 3 6.27614 3 6C3 5.72386 2.77614 5.5 2.5 5.5C2.22386 5.5 2 5.72386 2 6C2 6.27614 2.22386 6.5 2.5 6.5Z",stroke:"#A9A9A9",strokeLinecap:"round",strokeLinejoin:"round"})]});Hs.displayName="HorizontalDots";const Cu=E.forwardRef(({children:e,className:t,onClick:n,...r},o)=>{const s=E.useRef(null),[i,a]=E.useState(!1),c=D(Re.Actions,t),l=()=>{const w=Rt["DropdownList--open"],f=Rt["DropdownList--closed"];document.querySelectorAll(`.${w}`).forEach(C=>{C!==s.current&&(C.classList.remove(w),C.classList.add(f))})},d=w=>{w.stopPropagation(),i?p():(a(!0),n==null||n(w))},p=()=>{a(!1)},h=w=>{w.key==="Escape"&&p()},m=w=>{s.current&&!s.current.contains(w.target)&&p()};return E.useEffect(()=>(i?(l(),document.addEventListener("keydown",h),document.addEventListener("click",m)):(document.removeEventListener("keydown",h),document.removeEventListener("click",m)),()=>{document.removeEventListener("keydown",h),document.removeEventListener("click",m)}),[i]),u.jsxs("div",{ref:o,className:c,onClick:d,role:"button",tabIndex:0,"data-testid":"actions",...r,children:[u.jsx(Hs,{}),u.jsx(Gr,{align:"left",ref:s,open:i,"data-testid":"actions-dropdown",role:"menu","aria-label":"Actions",children:e})]})});Cu.displayName="Actions";const xu=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Re.Action,t);return u.jsx("button",{ref:r,className:o,...n,children:e})});xu.displayName="Action";const Eu=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Re.Icon,t);return u.jsx("div",{ref:r,className:o,...n,children:e})});Eu.displayName="Icon";const Be=E.forwardRef(({children:e,className:t,size:n="medium",variant:r,...o},s)=>{const i=D(Re.List,{[Re[`List--${n}`]]:n,[Re[`List--${r}`]]:r},t);return u.jsx("ul",{ref:s,className:i,role:"list",...o,children:e})});Be.displayName="List";Be.Item=vu;Be.Badges=bs;Be.Badge=vs;Be.Title=bu;Be.Description=wu;Be.Actions=Cu;Be.Action=xu;Be.Icon=Eu;const u0="Navigation__uylxk",d0="PaginationContent__UpLw0",f0="PaginationEllipsis__perWk",h0="PaginationLink__GVUZj",p0="Active__u1Ahy",m0="Disabled__8WM0y",g0="Prev__wp4hc",y0="Next__eVyL5",Ze={Navigation:u0,PaginationContent:d0,PaginationEllipsis:f0,PaginationLink:h0,Active:p0,Disabled:m0,Prev:g0,Next:y0},Su=({className:e,...t})=>u.jsxs("svg",{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",className:e,...t,children:[u.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u.jsx("path",{d:"M9 6l6 6l-6 6"})]});Su.displayName="ChevronRight";const _u=({className:e,...t})=>u.jsxs("svg",{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",className:e,...t,children:[u.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u.jsx("path",{d:"M15 6l-6 6l6 6"})]});_u.displayName="ChevronLeft";const Ws=({className:e,...t})=>u.jsx("nav",{role:"navigation","aria-label":"pagination",className:D(Ze.Navigation,e),...t});Ws.displayName="Pagination";const Vs=g.forwardRef(({className:e,...t},n)=>u.jsx("ul",{ref:n,className:D(Ze.PaginationContent,e),...t}));Vs.displayName="PaginationContent";const Rn=g.forwardRef(({className:e,...t},n)=>u.jsx("li",{ref:n,className:e,...t}));Rn.displayName="PaginationItem";const Hn=({className:e,isActive:t,...n})=>u.jsx("a",{"aria-current":t?"page":void 0,className:D(Ze.PaginationLink,t&&Ze.Active,e),...n});Hn.displayName="PaginationLink";const zs=({className:e,disabled:t,...n})=>u.jsxs(Hn,{"aria-label":"Go to previous page",className:D(t&&Ze.Disabled,Ze.Prev,e),...n,children:[u.jsx(_u,{}),u.jsx("span",{children:"Previous"})]});zs.displayName="PaginationPrevious";const qs=({className:e,disabled:t,...n})=>u.jsxs(Hn,{"aria-label":"Go to next page",className:D(t&&Ze.Disabled,Ze.Next,e),...n,children:[u.jsx("span",{children:"Next"}),u.jsx(Su,{})]});qs.displayName="PaginationNext";const Gs=({className:e,...t})=>u.jsx("span",{"aria-hidden":!0,className:D(Ze.PaginationEllipsis,e),...t,children:u.jsx(Hs,{})});Gs.displayName="PaginationEllipsis";function v0(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ru={exports:{}};(function(e,t){(function(n,r){typeof v0=="function"?e.exports=r():n.pluralize=r()})(dd,function(){var n=[],r=[],o={},s={},i={};function a(f){return typeof f=="string"?new RegExp("^"+f+"$","i"):f}function c(f,y){return f===y?y:f===f.toLowerCase()?y.toLowerCase():f===f.toUpperCase()?y.toUpperCase():f[0]===f[0].toUpperCase()?y.charAt(0).toUpperCase()+y.substr(1).toLowerCase():y.toLowerCase()}function l(f,y){return f.replace(/\$(\d{1,2})/g,function(C,x){return y[x]||""})}function d(f,y){return f.replace(y[0],function(C,x){var S=l(y[1],arguments);return c(C===""?f[x-1]:C,S)})}function p(f,y,C){if(!f.length||o.hasOwnProperty(f))return y;for(var x=C.length;x--;){var S=C[x];if(S[0].test(y))return d(y,S)}return y}function h(f,y,C){return function(x){var S=x.toLowerCase();return y.hasOwnProperty(S)?c(x,S):f.hasOwnProperty(S)?c(x,f[S]):p(S,x,C)}}function m(f,y,C,x){return function(S){var _=S.toLowerCase();return y.hasOwnProperty(_)?!0:f.hasOwnProperty(_)?!1:p(_,_,C)===_}}function w(f,y,C){var x=y===1?w.singular(f):w.plural(f);return(C?y+" ":"")+x}return w.plural=h(i,s,n),w.isPlural=m(i,s,n),w.singular=h(s,i,r),w.isSingular=m(s,i,r),w.addPluralRule=function(f,y){n.push([a(f),y])},w.addSingularRule=function(f,y){r.push([a(f),y])},w.addUncountableRule=function(f){if(typeof f=="string"){o[f.toLowerCase()]=!0;return}w.addPluralRule(f,"$0"),w.addSingularRule(f,"$0")},w.addIrregularRule=function(f,y){y=y.toLowerCase(),f=f.toLowerCase(),i[f]=y,s[y]=f},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(f){return w.addIrregularRule(f[0],f[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(f){return w.addPluralRule(f[0],f[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(f){return w.addSingularRule(f[0],f[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(w.addUncountableRule),w})})(Ru);var b0=Ru.exports;const w0=fd(b0),Qs=({count:e,singularText:t,children:n=(r,o)=>`${r} ${o}`})=>u.jsx(u.Fragment,{children:n(e,w0(t,e))});Qs.displayName="PluralizeCounter";const C0="TableContainer__osh6Z",x0="TableHeader__sYa-8",E0="Table__2cIs3",S0="selectable__WsGg1",_0="Cell__ZEv-K",R0="Right__YoM1V",T0="Center__CF3tr",P0="Sortable__JIV1V",A0="SortIcon__f0bBy",O0="Active__rJjxB",j0="Rotate__7cwTK",D0="Pagination__sbqMP",k0="PointerNone__kQdQS",fe={TableContainer:C0,TableHeader:x0,Table:E0,selectable:S0,Cell:_0,Right:R0,Center:T0,Sortable:P0,SortIcon:A0,Active:O0,Rotate:j0,Pagination:D0,PointerNone:k0},L0="EmptyStateContainer__Q9FEb",I0="Message__IHK6M",va={EmptyStateContainer:L0,Message:I0},Tu=({size:e=64})=>u.jsxs("svg",{width:e,height:e,viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u.jsxs("g",{clipPath:"url(#clip-path)",children:[u.jsx("mask",{id:"mask0_1070_8032",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"64",height:"64",children:u.jsx("path",{d:"M64 0H0V64H64V0Z",fill:"white"})}),u.jsx("g",{mask:"url(#mask0_1070_8032)",children:u.jsx("path",{d:"M40 10.6673H13.3333V53.334H50.6667V21.334H40V10.6673ZM8 7.97932C8 6.51798 9.192 5.33398 10.664 5.33398H42.6667L56 18.6673V55.982C56.0024 56.3321 55.936 56.6793 55.8043 57.0039C55.6725 57.3284 55.4781 57.6239 55.2323 57.8732C54.9864 58.1225 54.6936 58.3209 54.3712 58.4572C54.0485 58.5935 53.7021 58.6649 53.352 58.6673H10.648C9.94768 58.6625 9.27739 58.3823 8.78192 57.8873C8.28645 57.3924 8.00557 56.7223 8 56.022V7.97932ZM36.0773 38.5233C33.8408 39.83 31.2056 40.2788 28.6627 39.786C26.1197 39.2929 23.8428 37.8921 22.2566 35.8444C20.6704 33.7966 19.883 31.2417 20.0414 28.6564C20.1998 26.071 21.293 23.6315 23.1173 21.7927C24.9532 19.9571 27.3955 18.8541 29.9864 18.6904C32.5773 18.5267 35.1389 19.3134 37.1912 20.9032C39.2435 22.493 40.6456 24.7767 41.1347 27.3263C41.6237 29.8759 41.1664 32.5164 39.848 34.7527L45.7413 40.646L41.9707 44.4193L36.0773 38.5233ZM34.4293 33.1047C34.9387 32.6126 35.3451 32.0241 35.6245 31.3735C35.904 30.7228 36.0512 30.0231 36.0573 29.3148C36.0635 28.6065 35.9285 27.9044 35.6603 27.2489C35.3923 26.5935 34.9963 25.998 34.4955 25.4972C33.9947 24.9964 33.3992 24.6004 32.7437 24.3323C32.0883 24.0641 31.3861 23.9292 30.6779 23.9353C29.9696 23.9415 29.2699 24.0886 28.6192 24.3681C27.9685 24.6476 27.38 25.0539 26.888 25.5633C25.9165 26.5692 25.3789 27.9164 25.3911 29.3148C25.4032 30.7132 25.9641 32.0508 26.9531 33.0396C27.9419 34.0287 29.2795 34.5895 30.6779 34.6015C32.0763 34.6137 33.4235 34.0761 34.4293 33.1047Z",fill:"currentColor"})})]}),u.jsx("defs",{children:u.jsx("clipPath",{id:"clip-path",children:u.jsx("rect",{width:"64",height:"64",fill:"white"})})})]});Tu.displayName="EmptyStateIcon";const Ks=({message:e="No results found"})=>u.jsxs("div",{className:D(va.EmptyStateContainer),children:[u.jsx(Tu,{}),u.jsx("p",{className:va.Message,children:e})]});Ks.displayName="EmptyState";const M0=(e,t,n=1)=>{if(e<=1)return["1"];const r=[],o=s=>{(r.length===0||r[r.length-1]!==s)&&r.push(s)};o(1),t-n>2&&o("...");for(let s=Math.max(2,t-n);s<=Math.min(e-1,t+n);s++)o(s);return t+n<e-1&&o("..."),o(e),r.map(String)},Pu=({page:e,totalPages:t,onPageChange:n})=>{const r=e===1,o=e===t;return u.jsx(Ws,{className:fe.Pagination,children:u.jsxs(Vs,{children:[u.jsx(Rn,{children:u.jsx(zs,{className:D({[fe.PointerNone]:r}),onClick:()=>!r&&n(e-1)})}),M0(t,e).map((s,i)=>u.jsxs(Rn,{children:[s==="..."&&u.jsx(Gs,{}),s!=="..."&&u.jsx(Hn,{isActive:+s===e,onClick:()=>+s!==e&&n(+s),children:s})]},i)),u.jsx(Rn,{children:u.jsx(qs,{className:D({[fe.PointerNone]:o}),onClick:()=>!o&&n(e+1)})})]})})};Pu.displayName="TablePagination";const Au=({className:e,...t})=>u.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,...t,children:u.jsx("path",{d:"M6 2.5V9.5M6 9.5L9.5 6M6 9.5L2.5 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});Au.displayName="ArrowDown";const Ou=({columns:e,data:t,isLoading:n,totalCount:r=0,headerLabel:o,sort:s,loadingConfig:i,pagination:a,onRowClick:c})=>{const{count:l=5,height:d=40}=i||{},p=y=>y.sortName??y.name,h=y=>D({[fe.Cell]:!0,[fe.Center]:y.align==="center",[fe.Right]:y.align==="right",[fe.Sortable]:y.isSortable}),m=y=>{if(!s)return"";const C=p(y);return D({[fe.SortIcon]:!0,[fe.Active]:y.isSortable&&s.field===C,[fe.Rotate]:s.field===C&&s.direction==="asc"})},w=y=>()=>c==null?void 0:c(y),f=y=>()=>{if(!s||!y.isSortable)return;const{field:C,direction:x,onSort:S}=s,_=p(y);C===_?S(_,x==="asc"?"desc":"asc"):S(_,"asc")};return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:fe.TableContainer,children:[o&&u.jsx("div",{className:fe.TableHeader,children:u.jsx(Qs,{count:r,singularText:o,children:(y,C)=>`${y} ${C}`})}),u.jsxs("table",{className:fe.Table,children:[u.jsx("thead",{children:u.jsx("tr",{children:e.map(y=>u.jsx("th",{children:u.jsxs("div",{className:h(y),onClick:f(y),children:[u.jsx("span",{children:y.displayName}),y.isSortable&&u.jsx(Au,{className:m(y)})]})},y.name))})}),u.jsx("tbody",{children:u.jsxs(ft,{children:[u.jsx(ft.When,{condition:n,children:[...Array(l).keys()].map(y=>u.jsx("tr",{children:u.jsx("td",{colSpan:e.length,style:{padding:4},children:u.jsx(Qr,{height:d})})},y))}),u.jsx(ft.When,{condition:!t.length,children:u.jsx("tr",{children:u.jsx("td",{colSpan:e.length,children:u.jsx(Ks,{})})})}),u.jsx(ft.Else,{children:t.map((y,C)=>u.jsx("tr",{className:c&&fe.selectable,onClick:w(y),children:e.map(x=>u.jsx("td",{style:x.width?{width:x.width}:{},children:u.jsx("div",{className:h(x),children:x.cellRenderer?x.cellRenderer(y):x.valueGetter?x.valueGetter(y):y[x.name]})},`${x.name}-${C}`))},C))})]})})]})]}),a&&u.jsx(Pu,{...a})]})};Ou.displayName="Table";const N0="alert__LblpE",$0="destructive__bLNSM",F0="alertTitle__gblKf",B0="alertDescription__BuVHV",$r={alert:N0,default:"default__mgO6A",destructive:$0,alertTitle:F0,alertDescription:B0},no=({className:e,variant:t="default",children:n,...r})=>u.jsx("div",{"data-slot":"alert",role:"alert",className:D($r.alert,$r[t],e),...r,children:n}),U0=g.forwardRef(({children:e,className:t,...n},r)=>u.jsx("div",{ref:r,"data-slot":"alert-title",className:D($r.alertTitle,t),...n,children:e})),H0=g.forwardRef(({children:e,className:t,...n},r)=>u.jsx("div",{ref:r,"data-slot":"alert-description",className:D($r.alertDescription,t),...n,children:e}));no.displayName="Alert";no.Title=U0;no.Description=H0;function ba(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Fr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ba(Object(n),!0).forEach(function(r){W0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ba(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ju(e){return(ju=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function W0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ss(e){return(ss=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function Du(e,t){var n;if(typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(r){var o=r.appName||r.name;if(!o)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var s="single-spa-application:".concat(o);return function(){var i=document.getElementById(s);return i||((i=document.createElement("div")).id=s,document.body.appendChild(i)),i}}(t))!="function")throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(ss(n)));return function(){var r=n(t);if(!(r instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(ss(r)));return r}}var Dn=null;try{Dn=require("react").createContext()}catch{}var V0={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function z0(e){if(ju(e)!=="object")throw new Error("single-spa-react requires a configuration object");var t,n=Fr(Fr({},V0),e);if(!n.React)throw new Error("single-spa-react must be passed opts.React");if(!n.ReactDOM&&!n.ReactDOMClient)throw new Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(n.renderType||((t=n.ReactDOMClient)!==null&&t!==void 0&&t.createRoot?n.renderType="createRoot":n.renderType="render"),!n.rootComponent&&!n.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(n.errorBoundary&&typeof n.errorBoundary!="function")throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!Dn&&n.React.createContext&&(Dn=n.React.createContext()),n.SingleSpaRoot=function(o){function s(i){s.displayName="SingleSpaRoot(".concat(i.name,")")}return s.prototype=Object.create(o.React.Component.prototype),s.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},s.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},s.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},s}(n);var r={bootstrap:q0.bind(null,n),mount:G0.bind(null,n),unmount:Q0.bind(null,n)};return n.parcelCanUpdate&&(r.update=K0.bind(null,n)),r}function q0(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(n){e.rootComponent=n})}function G0(e,t){return new Promise(function(n,r){e.suppressComponentDidCatchWarning||!function(a){if(!(a&&typeof a.version=="string"&&a.version.indexOf(".")>=0))return!1;var c=a.version.slice(0,a.version.indexOf("."));try{return Number(c)>=16}catch{return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=ku(e,t,function(){n(this)}),s=Du(e,t)(),i=function(a){var c=a.reactDom,l=a.renderType,d=a.elementToRender,p=a.domElement,h=c[l];if(typeof h!="function")throw new Error('renderType "'.concat(l,'" did not return a function.'));switch(l){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var m=h(p);return m.render(d),m;case"hydrateRoot":return h(p,d);case"hydrate":default:return h(d,p),null}}({elementToRender:o,domElement:s,reactDom:Ys(e),renderType:Y0(e)});e.domElements[t.name]=s,e.renderResults[t.name]=i})}function Q0(e,t){return new Promise(function(n){e.unmountResolves[t.name]=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():Ys(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function K0(e,t){return new Promise(function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=ku(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var s=Du(e,t)();Ys(e).render(r,s)}})}function Ys(e){return e.ReactDOMClient||e.ReactDOM}function Y0(e){return typeof e.renderType=="function"?e.renderType():e.renderType}function ku(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=Dn?e.React.createElement(Dn.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(s,i){function a(c){s.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},a.displayName="SingleSpaReactErrorBoundary(".concat(c.name,")")}return a.prototype=Object.create(s.React.Component.prototype),a.prototype.render=function(){return this.state.caughtError?(s.errorBoundary||i.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},a.prototype.componentDidCatch=function(c,l){this.setState({caughtError:c,caughtErrorInfo:l})},a}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),o=e.React.createElement(e.SingleSpaRoot,Fr(Fr({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach(function(s){return s()}),delete e.updateResolves[t.name])},unmountFinished:function(){e.unmountResolves[t.name]&&(e.unmountResolves[t.name](),delete e.unmountResolves[t.name])}}),o)}const Z0=e=>{const t=new xh;return function(r){if(!r)throw new Error("Microfrontend did not receive any properties !!");const o=cs(r.module.name);return u.jsx(Fa,{module:o,children:u.jsxs(Th,{client:t,children:[u.jsx(e,{...r}),u.jsx(ih,{position:"top-right",reverseOrder:!0})]})})}},X0=({rootComponent:e,...t})=>z0({errorBoundary(n){return console.error(n),u.jsx(Us,{})},...t,rootComponent:Z0(e)}),J0=e=>{const t={authUser:{id:"testuser",username:"testuser",displayName:"Test User",applications:[]},catalog:[],authentication:{passwordMethodEnabled:!0,registerEnabled:!0,invitationsEnabled:!0,resetPasswordExpiration:3e4,passwordConstraints:{lowerCaseRequired:!1,upperCaseRequired:!1,symbolRequired:!1,digitRequired:!1,minLength:0,maxLength:8},sessionExpiration:864e5,jwtSecret:"",sessionIncludeOrigUser:!1,impersonationMode:"cookie",canImpersonateNonExistentUsers:!1,providers:[]},platformVersion:"0.0.0"};Object.defineProperty(window,Tn,{value:e?$d(t,e):t})},e2={flags:new Map,variants:new Map,isLoading:!1,error:null,checkFlag:()=>!1,getVariant:()=>null,refresh:async()=>{}},Wn=E.createContext(e2),Lu=({gatewayUrl:e="",prefetchFlags:t=[],refreshInterval:n,children:r})=>{const[o,s]=E.useState(new Map),[i,a]=E.useState(new Map),[c,l]=E.useState(!1),[d,p]=E.useState(null),h=E.useCallback(async C=>{if(C.length!==0){l(!0),p(null);try{const x=`${e}/_/feature-flags/evaluate`,S=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({flagNames:C}),credentials:"include"});if(!S.ok)throw new Error(`Failed to fetch feature flags: ${S.status} ${S.statusText}`);const _=await S.json(),R=new Map,A=new Map;_.flags.forEach(T=>{R.set(T.flagName,T.enabled),T.variant!==void 0&&A.set(T.flagName,{variant:T.variant.name||null,payload:T.variant.payload})}),s(R),a(A)}catch(x){const S=x instanceof Error?x:new Error("Unknown error fetching feature flags");p(S),console.error("Error fetching feature flags:",S)}finally{l(!1)}}},[e]),m=E.useCallback(async()=>{t.length>0&&await h(t)},[t,h]);E.useEffect(()=>{t.length>0&&h(t)},[t,h]),E.useEffect(()=>{if(n&&n>0&&t.length>0){const C=setInterval(()=>{h(t)},n);return()=>{clearInterval(C)}}},[n,t,h]);const w=E.useCallback((C,x=!1)=>o.get(C)??x,[o]),f=E.useCallback(C=>i.get(C)??null,[i]),y=E.useMemo(()=>({flags:o,variants:i,isLoading:c,error:d,checkFlag:w,getVariant:f,refresh:m}),[o,i,c,d,w,f,m]);return u.jsx(Wn.Provider,{value:y,children:r})};Lu.displayName="FeatureFlagsProvider";function Iu(e,t=!1,n=""){const r=E.useContext(Wn),[o,s]=E.useState(t),[i,a]=E.useState(!1);if(E.useEffect(()=>{const l=r.checkFlag(e,null);if(l!=null){s(l),a(!0);return}let d=!0;return(async()=>{try{const h=`${n}/_/feature-flags/${encodeURIComponent(e)}`,m=await fetch(h,{method:"GET",headers:{"Content-Type":"application/json"},credentials:"include"});if(!m.ok){console.warn(`Failed to fetch feature flag '${e}': ${m.status} ${m.statusText}`),d&&(s(t),a(!0));return}const w=await m.json();if(d){const f=typeof w.value=="boolean"?w.value:t;s(f),a(!0)}}catch(h){console.error(`Error fetching feature flag '${e}':`,h),d&&(s(t),a(!0))}})(),()=>{d=!1}},[e,t,n,r]),!i&&r.flags.size===0)return t;const c=r.checkFlag(e,null);return c??o}function t2(){const e=E.useContext(Wn);if(!e)throw new Error("useFeatureFlags must be used within a FeatureFlagsProvider. Wrap your component tree with <FeatureFlagsProvider> to use this hook.");return e}function n2(e,t=""){const n=E.useContext(Wn),[r,o]=E.useState(null),[s,i]=E.useState(void 0),[a,c]=E.useState(!0);E.useEffect(()=>{const d=n.getVariant(e);if(d!==null){o(d.variant),i(d.payload),c(!1);return}let p=!0;return(async()=>{c(!0);try{const m=`${t}/_/feature-flags/${encodeURIComponent(e)}`,w=await fetch(m,{method:"GET",headers:{"Content-Type":"application/json"},credentials:"include"});if(!w.ok){console.warn(`Failed to fetch variant for flag '${e}': ${w.status} ${w.statusText}`),p&&(o(null),i(void 0),c(!1));return}const f=await w.json();if(p){const y=typeof f.value=="string"?f.value:(f.value===null||f.value===void 0,null);o(y),i(void 0),c(!1)}}catch(m){console.error(`Error fetching variant for flag '${e}':`,m),p&&(o(null),i(void 0),c(!1))}})(),()=>{p=!1}},[e,t,n]);const l=n.getVariant(e);return l!==null?{variant:l.variant,payload:l.payload,isLoading:!1}:{variant:r,payload:s,isLoading:a}}const Mu=({flag:e,children:t,fallback:n=null,invert:r=!1,gatewayUrl:o=""})=>{const s=Iu(e,!1,o);return(r?!s:s)?u.jsx(u.Fragment,{children:t}):u.jsx(u.Fragment,{children:n})};Mu.displayName="FeatureFlagGuard";exports.Alert=no;exports.ApplicationIcon=Nc;exports.Authorized=ys;exports.Badge=vs;exports.Badges=bs;exports.Button=Dr;exports.ClipboardCheckIcon=Bc;exports.ClipboardIcon=Fc;exports.ConfirmDialog=gu;exports.CopyToClipboardButton=Np;exports.Dialog=ie;exports.DropdownList=Gr;exports.EmptyState=Ks;exports.ErrorState=Us;exports.ExtendExtensionPoint=tp;exports.ExtensionPoint=Dc;exports.EyeIcon=Nl;exports.FeatureFlagGuard=Mu;exports.FeatureFlagsContext=Wn;exports.FeatureFlagsProvider=Lu;exports.FieldGroup=Uc;exports.Input=qr;exports.InputError=Hc;exports.Label=Wc;exports.List=Be;exports.ModulePlaceHolder=Mc;exports.Pagination=Ws;exports.PaginationContent=Vs;exports.PaginationEllipsis=Gs;exports.PaginationItem=Rn;exports.PaginationLink=Hn;exports.PaginationNext=qs;exports.PaginationPrevious=zs;exports.PasswordInput=fy;exports.Pill=Lv;exports.PlatformEventListener=cp;exports.PlatformEvents=sd;exports.PluralizeCounter=Qs;exports.SearchAutocomplete=Gc;exports.SearchInput=Cs;exports.Select=ws;exports.Show=ft;exports.Skeleton=Qr;exports.SkeletonList=Zc;exports.Spinner=Ll;exports.Switch=Il;exports.Table=Ou;exports.Tabs=iy;exports.TabsContent=ly;exports.TabsList=ay;exports.TabsTrigger=cy;exports.TextArea=zc;exports.Tooltip=kl;exports.authorized=up;exports.dropdownListStyles=Rt;exports.extensionPoint=rp;exports.getApplications=as;exports.getInitials=Cd;exports.getOperations=Ba;exports.hasAccess=Ha;exports.initializeMicroFrontend=X0;exports.isPlatformCustomizationCompleted=gf;exports.isValidEmail=wd;exports.logout=yd;exports.navigateTo=vd;exports.platformHaveAnyCustomization=mf;exports.setupTestEnvironment=J0;exports.useApplicationIcon=Ya;exports.useApplicationJSModule=Wr;exports.useApplicationMenu=Ld;exports.useApplicationUIModule=Ka;exports.useApplications=Ga;exports.useAuth=Ur;exports.useCatalog=mn;exports.useCurrentApplication=us;exports.useCurrentApplicationName=tc;exports.useCurrentJSModule=Hd;exports.useDocumentationMenuItems=ec;exports.useDynamicFonts=cc;exports.useDynamicStyleSheet=ac;exports.useExtendExtensionPoint=sc;exports.useExtensionPoint=oc;exports.useFeatureFlag=Iu;exports.useFeatureFlags=t2;exports.useGetPlatformTheme=pf;exports.useHasNoSession=pd;exports.useLocation=Ma;exports.useModule=cs;exports.useModuleCommonPaths=gd;exports.useModuleConfig=Wa;exports.useModuleConfigByName=Va;exports.useModuleMenu=Za;exports.useModuleMetadata=Nn;exports.useMutableCatalog=ud;exports.useNotifications=fs;exports.useOperations=Ua;exports.usePAECustomizationsLoadingState=hf;exports.usePAEState=Br;exports.usePlatformCustomization=ff;exports.usePlatformEventListener=ic;exports.useResource=Fh;exports.useResourceActions=Oc;exports.useServiceBaseURL=nc;exports.useServiceInvoker=ds;exports.useTenants=Xh;exports.useTrackEvent=Gd;exports.useTrackEvents=rc;exports.useUIApplications=Qa;exports.useUserState=ep;exports.useVariant=n2;
|
|
252
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},nv="DialogDescriptionWarning",rv=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ru(nv).contentName}}.`;return g.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},ov=Vl,sv=Gl,iv=Ql,av=Kl,cv=Zl,lv=Jl,uv=tu;const dv="Overlay__M5Z83",fv="Content__wAkP4",pa={Overlay:dv,Content:fv},hv="Header__VHxNf",pv="Content__I04qM",mv="Close__xSN-7",gv="Title__Dznh6",yv="Footer__-8gzQ",vv="Actions__kKF2Q",Ut={Header:hv,Content:pv,Close:mv,Title:gv,Footer:yv,Actions:vv},ou=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Ut.Header,t);return u.jsx("div",{ref:r,className:o,...n,children:e})});ou.displayName="Header";const su=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Ut.Content,t);return u.jsx("div",{ref:r,className:o,...n,children:e})});su.displayName="Content";const iu=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Ut.Footer,t);return u.jsx("div",{ref:r,className:o,...n,children:e})});iu.displayName="Footer";const au=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Ut.Title,t);return u.jsx(cv,{ref:r,className:o,...n,children:e})});au.displayName="Title";const cu=E.forwardRef(({className:e,...t},n)=>{const r=D(Ut.Close,e);return u.jsx(uv,{ref:n,asChild:!0,className:r,...t,children:u.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("path",{d:"M11 1L1 11M1 1L11 11",stroke:"#A9A9A9",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})});cu.displayName="Close";const lu=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Ut.Actions,t);return u.jsx("div",{ref:r,className:o,...n,children:e})});lu.displayName="Actions";const uu=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Ut.Description,t);return u.jsx("div",{ref:r,className:o,...n,children:e})});uu.displayName="Description";const ie=({children:e,onClose:t,open:n=!1,className:r})=>{const o=()=>{t==null||t()};return u.jsx(ov,{onOpenChange:o,open:n,children:u.jsxs(sv,{children:[u.jsx(iv,{className:pa.Overlay}),u.jsxs(av,{children:[u.jsx(lv,{}),u.jsx("div",{className:D(pa.Content,r),children:e})]})]})})};ie.displayName="Dialog";ie.Header=ou;ie.Content=su;ie.Footer=iu;ie.Actions=lu;ie.Title=au;ie.Description=uu;ie.Close=cu;const bv="pill__vtGwB",wv="pill--solid__F-mR4",Cv="pill--outline__gC-mh",ma={pill:bv,"pill--solid":"pill--solid__F-mR4",pillSolid:wv,"pill--outline":"pill--outline__gC-mh",pillOutline:Cv},xv=({children:e,variant:t="solid",className:n})=>{const r=D(ma.pill,ma[`pill--${t}`],n);return u.jsx("div",{className:r,children:e})},Ev="DialogContent__-WjG9",Sv="Message__AUgVP",ga={DialogContent:Ev,Message:Sv},du=({loading:e,title:t,children:n,className:r,onClose:o,onConfirm:s,...i})=>u.jsxs(ie,{...i,className:D(ga.DialogContent,r),children:[u.jsxs(ie.Header,{children:[u.jsx(ie.Title,{children:t}),u.jsx(ie.Close,{onClick:o})]}),u.jsx(ie.Content,{children:typeof n=="string"?u.jsx("p",{className:ga.Message,children:n}):n}),u.jsx(ie.Footer,{children:u.jsxs(ie.Actions,{children:[u.jsx(Dr,{onClick:o,disabled:e,variant:"outlined",children:"Cancel"}),u.jsx(Dr,{onClick:s,disabled:e,loading:e,variant:"contained",children:"Confirm"})]})})]});du.displayName="ConfirmDialog";const _v="container__AjtYJ",Rv="title__A2vCu",Tv="description__bP6Ig",Pv="mailToText__SdlsE",mr={container:_v,title:Rv,description:Tv,mailToText:Pv},fu=()=>u.jsxs("svg",{width:"200",height:"200",viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u.jsx("path",{d:"M184.415 152.221C183.936 151.406 183.401 150.621 182.892 149.824C181.61 147.817 180.327 145.809 179.045 143.801C177.102 140.759 175.159 137.717 173.215 134.676C170.766 130.841 168.316 127.006 165.866 123.171C163.068 118.79 160.27 114.41 157.472 110.03C154.484 105.352 151.496 100.674 148.508 95.9965C145.474 91.2464 142.439 86.4963 139.405 81.7463C136.513 77.2189 133.621 72.6915 130.729 68.1641C128.123 64.084 125.517 60.0039 122.91 55.9238C120.748 52.5389 118.586 49.1541 116.424 45.7692C114.864 43.3273 113.304 40.8854 111.744 38.4436C110.943 37.1899 110.142 35.9362 109.342 34.6825C108.765 33.7802 108.096 32.9744 107.292 32.2572C104.604 29.8584 100.572 29.2302 97.2301 30.5252C94.5951 31.5463 92.6177 33.3853 91.0923 35.7373C90.8768 36.0696 90.6658 36.405 90.4526 36.7387C89.3951 38.3941 88.3378 40.0494 87.2803 41.7049C85.5124 44.4725 83.7444 47.2402 81.9765 50.0079C79.644 53.6594 77.3114 57.3111 74.9788 60.9626C72.2632 65.2138 69.5477 69.465 66.8321 73.7162C63.8817 78.3349 60.9313 82.9536 57.9811 87.5722C54.9542 92.3106 51.9274 97.0491 48.9006 101.787C45.9557 106.398 43.0107 111.008 40.0658 115.618C37.3487 119.872 34.6316 124.125 31.9145 128.379C29.6106 131.986 27.3067 135.592 25.0028 139.199C23.2565 141.933 21.5101 144.667 19.7639 147.4C18.7335 149.013 17.7031 150.626 16.6728 152.239C14.8665 155.067 13.7231 158.171 14.23 161.595C14.9672 166.576 19.2366 170.131 24.2215 170.137C25.559 170.139 26.8963 170.137 28.2338 170.137C30.9198 170.137 33.6058 170.137 36.2918 170.137C40.0725 170.137 43.8533 170.137 47.6341 170.137C52.2557 170.137 56.8772 170.137 61.4989 170.137C66.7339 170.137 71.969 170.137 77.204 170.137C82.7467 170.137 88.2894 170.137 93.8322 170.137C99.4529 170.137 105.074 170.137 110.694 170.137C116.139 170.137 121.584 170.137 127.029 170.137C132.044 170.137 137.06 170.137 142.075 170.137C146.425 170.137 150.776 170.137 155.127 170.137C158.516 170.137 161.904 170.137 165.293 170.137C167.49 170.137 169.686 170.137 171.883 170.137C172.633 170.137 173.384 170.137 174.135 170.137C178.404 170.087 182.136 167.627 184.212 163.932C186.248 160.307 186.562 155.866 184.415 152.221ZM94.0937 37.3471C94.0897 37.3539 94.0862 37.3597 94.0824 37.3661C94.0826 37.3652 94.0831 37.3642 94.0833 37.3632C94.0844 37.3581 94.0909 37.3518 94.0937 37.3471ZM178.584 164.489C178.476 164.538 178.524 164.516 178.584 164.489V164.489ZM180.937 162.79C180.979 162.72 181.118 162.485 181.127 162.498C181.145 162.528 181.058 162.647 180.937 162.79ZM181.821 160.333C181.806 160.446 181.782 160.646 181.773 160.697C181.736 160.919 181.686 161.139 181.637 161.359C181.637 161.359 181.637 161.359 181.637 161.359C181.629 161.377 181.621 161.399 181.61 161.426C181.54 161.604 181.472 161.785 181.406 161.965C181.402 161.977 181.398 161.988 181.394 161.999C181.304 162.16 181.219 162.323 181.123 162.481C181.074 162.562 181.016 162.641 180.97 162.724C180.949 162.762 180.936 162.785 180.93 162.798C180.727 163.035 180.436 163.332 180.388 163.385C180.696 163.049 180.535 163.229 180.318 163.42C180.172 163.548 180.018 163.666 179.869 163.79C179.848 163.807 179.831 163.822 179.816 163.835C179.797 163.845 179.775 163.857 179.747 163.873C179.576 163.97 179.411 164.078 179.238 164.171C179.043 164.277 178.844 164.373 178.642 164.463C178.556 164.494 178.471 164.526 178.384 164.553C177.532 164.819 176.835 164.945 176.084 164.954C175.296 164.954 174.508 164.954 173.719 164.954C171.519 164.954 169.318 164.954 167.118 164.954C163.751 164.954 160.385 164.954 157.019 164.954C152.756 164.954 148.493 164.954 144.231 164.954C139.275 164.954 134.319 164.954 129.364 164.954C123.981 164.954 118.598 164.954 113.215 164.954C107.651 164.954 102.086 164.954 96.5224 164.954C91.024 164.954 85.5255 164.954 80.0271 164.954C74.8407 164.954 69.6543 164.954 64.4679 164.954C59.8401 164.954 55.2123 164.954 50.5846 164.954C46.7784 164.954 42.9721 164.954 39.166 164.954C36.3891 164.954 33.6122 164.954 30.8354 164.954C29.3555 164.954 27.8756 164.954 26.3957 164.954C25.9641 164.954 25.534 164.958 25.1029 164.922C23.4511 164.785 22.11 164.207 20.7626 163.127C20.3445 162.792 19.7301 162.074 19.3142 161.434C19.2096 161.273 19.1102 161.109 19.0161 160.942C18.9707 160.861 18.8013 160.534 18.8105 160.558C18.7451 160.414 18.5329 159.846 18.4422 159.537C18.3467 159.211 18.2692 158.879 18.2129 158.544C18.2174 158.545 18.1876 158.285 18.1815 158.192C18.1669 157.964 18.1617 157.736 18.1651 157.508C18.166 157.455 18.1793 157.245 18.185 157.131C18.2055 157.005 18.2441 156.74 18.2591 156.662C18.2913 156.493 18.3319 156.326 18.3726 156.16C18.2821 156.539 18.4099 156.072 18.4891 155.866C18.518 155.79 18.6652 155.487 18.6846 155.432C18.7383 155.339 18.7932 155.243 18.8125 155.21C18.8692 155.114 18.9282 155.019 18.9875 154.924C19.0003 154.904 19.0137 154.884 19.0265 154.863C19.2211 154.554 19.4201 154.247 19.617 153.939C20.6335 152.348 21.6501 150.756 22.6667 149.165C24.3869 146.472 26.107 143.779 27.8271 141.086C30.0848 137.552 32.3425 134.017 34.6001 130.483C37.2646 126.312 39.9291 122.141 42.5935 117.97C45.5011 113.418 48.4086 108.866 51.3161 104.315C54.3131 99.6229 57.31 94.9312 60.3069 90.2397C63.2394 85.6489 66.172 81.058 69.1045 76.4672C71.819 72.2178 74.5334 67.9683 77.2479 63.719C79.5904 60.0517 81.9331 56.3844 84.2756 52.7172C86.0852 49.8842 87.8948 47.0513 89.7044 44.2184C90.8459 42.4315 91.9873 40.6446 93.1287 38.8578C93.3976 38.4368 93.6701 38.0178 93.9356 37.5945C93.9507 37.5705 93.9737 37.5416 93.9972 37.511C93.8744 37.7231 94.1597 37.2638 94.301 37.0921C94.4017 36.9695 94.5483 36.8114 94.5423 36.8113C94.6372 36.721 94.7333 36.6319 94.8323 36.546C94.9866 36.4121 95.1478 36.2876 95.3084 36.1615C94.9392 36.4513 95.3917 36.1121 95.5441 36.0212C96.7591 35.2961 98.1095 34.9498 99.7068 35.0725C101.356 35.1993 102.702 35.7434 104.07 36.8307C104.685 37.3192 105.311 38.1542 105.817 38.9457C106.592 40.1592 107.367 41.3727 108.142 42.5862C109.667 44.9733 111.192 47.3605 112.717 49.7476C114.838 53.0679 116.959 56.3881 119.08 59.7083C121.629 63.6999 124.179 67.6913 126.729 71.6829C129.579 76.1455 132.43 80.6082 135.281 85.0709C138.267 89.7458 141.253 94.4206 144.239 99.0955C147.207 103.742 150.176 108.388 153.144 113.035C155.94 117.412 158.736 121.789 161.532 126.167C164.002 130.034 166.473 133.902 168.943 137.769C170.935 140.886 172.926 144.003 174.917 147.12C176.27 149.239 177.623 151.357 178.976 153.475C179.551 154.376 180.134 155.272 180.702 156.177C181.138 156.872 181.311 157.219 181.54 157.972C181.6 158.167 181.652 158.363 181.697 158.561C181.711 158.623 181.759 158.873 181.78 158.97C181.787 159.063 181.815 159.319 181.819 159.383C181.831 159.579 181.836 159.775 181.834 159.972C181.834 160.022 181.825 160.217 181.821 160.333Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M98.5821 122.507C99.019 122.759 99.6307 122.629 100.038 122.389C101.205 121.703 101.925 120.275 102.041 118.92C103.115 106.361 106.514 75.1051 106.514 68.3062C106.514 59.902 92.8134 60.6835 92.0664 71.3279C91.6887 76.7103 97.5083 119.581 97.8266 121.187C97.9188 121.652 98.1423 122.253 98.5821 122.507Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M101.841 133.945C101.826 133.94 101.812 133.934 101.797 133.929C98.2767 132.6 94.4012 134.976 93.9964 138.717C93.9765 138.901 93.9636 139.086 93.958 139.272C93.8552 142.712 96.4467 146.126 99.8464 146.664C103.245 147.201 106.896 144.494 107.099 141.059C107.285 137.909 104.789 135.072 101.841 133.945Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M161.729 131.662C161.873 131.367 162.082 130.81 161.71 130.584C161.365 130.375 160.901 130.836 160.768 131.107C156.804 139.201 152.84 147.295 148.877 155.389C147.759 157.67 146.642 159.952 145.525 162.233C145.38 162.528 145.171 163.085 145.543 163.311C145.888 163.52 146.352 163.059 146.485 162.788C150.449 154.694 154.413 146.6 158.377 138.506C159.494 136.225 160.611 133.943 161.729 131.662Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M144.786 152.64C144.441 152.43 143.977 152.891 143.844 153.163C142.363 156.187 140.882 159.21 139.402 162.234C139.257 162.528 139.048 163.085 139.42 163.311C139.765 163.521 140.229 163.06 140.362 162.788C141.843 159.764 143.323 156.741 144.804 153.717C144.948 153.423 145.158 152.866 144.786 152.64Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M136.792 156.459C136.447 156.25 135.983 156.711 135.85 156.982C134.993 158.733 134.136 160.483 133.279 162.233C133.134 162.528 132.925 163.085 133.297 163.311C133.642 163.52 134.106 163.06 134.239 162.788C135.096 161.037 135.953 159.287 136.81 157.537C136.955 157.242 137.164 156.685 136.792 156.459Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M129.1 159.663C128.755 159.454 128.291 159.915 128.158 160.186C127.824 160.869 127.49 161.551 127.155 162.234C127.011 162.528 126.802 163.086 127.174 163.311C127.519 163.521 127.983 163.06 128.116 162.788C128.45 162.106 128.784 161.423 129.118 160.741C129.263 160.447 129.472 159.889 129.1 159.663Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M165.835 137.946C165.979 137.652 166.188 137.094 165.816 136.868C165.471 136.659 165.007 137.12 164.874 137.392C161.72 143.832 158.566 150.273 155.412 156.713C154.511 158.553 153.609 160.393 152.708 162.233C152.564 162.528 152.355 163.085 152.726 163.311C153.071 163.52 153.535 163.06 153.669 162.788C156.823 156.347 159.977 149.907 163.131 143.466C164.032 141.626 164.933 139.786 165.835 137.946Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M169.923 143.153C169.578 142.943 169.114 143.404 168.98 143.676C165.951 149.862 162.921 156.048 159.892 162.234C159.748 162.528 159.538 163.086 159.91 163.311C160.255 163.521 160.719 163.06 160.852 162.788C163.882 156.602 166.911 150.416 169.941 144.23C170.085 143.936 170.294 143.378 169.923 143.153Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M174.332 148.821C173.987 148.611 173.523 149.072 173.39 149.344C171.286 153.64 169.182 157.937 167.077 162.234C166.933 162.528 166.724 163.086 167.095 163.311C167.44 163.521 167.905 163.06 168.038 162.788C170.142 158.492 172.246 154.195 174.351 149.898C174.495 149.604 174.704 149.046 174.332 148.821Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M178.197 155.597C177.852 155.387 177.388 155.848 177.255 156.12C176.257 158.158 175.259 160.196 174.261 162.233C174.117 162.528 173.907 163.085 174.279 163.311C174.624 163.52 175.088 163.06 175.221 162.788C176.219 160.75 177.217 158.712 178.215 156.674C178.36 156.38 178.569 155.823 178.197 155.597Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M97.1962 40.2135C97.3477 39.9803 97.4773 39.477 97.1807 39.2971C96.8678 39.1072 96.5194 39.5265 96.3794 39.7419C94.7034 42.3205 93.0556 44.9176 91.4179 47.5205C88.1743 52.6759 84.976 57.8633 81.9271 63.1367C80.4155 65.7509 78.9283 68.3855 77.5879 71.0925C77.4642 71.3423 77.2879 71.8174 77.6034 72.0088C77.8975 72.1874 78.2905 71.7947 78.4047 71.564C80.9657 66.3919 83.9726 61.4308 86.9671 56.5018C89.7369 51.9427 92.5713 47.4226 95.4474 42.9297C96.0279 42.0228 96.6094 41.1164 97.1962 40.2135Z",fill:"var(--pae-shell-color-secondary)"}),u.jsx("path",{d:"M75.3224 76.1247C75.0193 75.9408 74.6477 76.3459 74.521 76.5695C74.1645 77.1991 73.808 77.8286 73.4515 78.4581C73.3144 78.7003 73.1605 79.1884 73.467 79.3744C73.77 79.5583 74.1416 79.1532 74.2684 78.9296C74.6248 78.3001 74.9814 77.6705 75.3378 77.0411C75.475 76.7988 75.6288 76.3107 75.3224 76.1247Z",fill:"var(--pae-shell-color-secondary)"})]});fu.displayName="WarningIcon";const Av="support@bluealba.com",Ov="@bluealba/pae-shell-ui",Us=()=>{const{supportEmail:e=Av}=Wa(Ov),t=`mailto:${e}?Subject=Support`;return u.jsxs("div",{className:mr.container,children:[u.jsx(fu,{}),u.jsx("div",{className:mr.title,children:"Oops! Something went wrong"}),u.jsxs("div",{className:mr.description,children:["If the error persists, ",u.jsx("a",{className:mr.mailToText,href:t,children:"contact the administrator."})]})]})};Us.displayName="ErrorState";const jv="List__h09XG",Dv="List__h09XG",kv="Item__YMy2i",Lv="Item__YMy2i",Iv="List--primary__J2pbx",Mv="List--secondary__gi1ao",Nv="Item--selected__yRWow",$v="Title__RJmEW",Fv="Title__RJmEW",Bv="Description__DGyX2",Uv="Description__DGyX2",Hv="Actions__UHP5l",Wv="Actions__UHP5l",Vv="Action__q-R1I",qv="Action__q-R1I",zv="Item--disabled__Ke1u-",Gv="List--small__ijoSR",Qv="List--medium__E1FEY",Kv="List--large__T8tfz",Yv="Icon__dFr-L",Zv="Icon__dFr-L",Re={List:jv,list:Dv,Item:kv,item:Lv,"List--primary":"List--primary__J2pbx",listPrimary:Iv,"List--secondary":"List--secondary__gi1ao",listSecondary:Mv,"Item--selected":"Item--selected__yRWow",itemSelected:Nv,Title:$v,title:Fv,Description:Bv,description:Uv,Actions:Hv,actions:Wv,Action:Vv,action:qv,"Item--disabled":"Item--disabled__Ke1u-",itemDisabled:zv,"List--small":"List--small__ijoSR",listSmall:Gv,"List--medium":"List--medium__E1FEY",listMedium:Qv,"List--large":"List--large__T8tfz",listLarge:Kv,Icon:Yv,icon:Zv},hu=E.forwardRef(({children:e,className:t,selected:n,disabled:r=!1,...o},s)=>{const i=D(Re.Item,{[Re["Item--selected"]]:n,[Re["Item--disabled"]]:r},t);return u.jsx("li",{ref:s,className:i,role:"listitem","aria-disabled":r,...o,children:e})});hu.displayName="Item";const pu=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Re.Title,t);return u.jsx("h3",{ref:r,className:o,...n,children:e})});pu.displayName="Title";const mu=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Re.Description,t);return u.jsx("p",{ref:r,className:o,...n,children:e})});mu.displayName="Description";const Hs=({className:e,...t})=>u.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,...t,children:[u.jsx("path",{d:"M6 6.5C6.27614 6.5 6.5 6.27614 6.5 6C6.5 5.72386 6.27614 5.5 6 5.5C5.72386 5.5 5.5 5.72386 5.5 6C5.5 6.27614 5.72386 6.5 6 6.5Z",stroke:"#A9A9A9",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M9.5 6.5C9.77614 6.5 10 6.27614 10 6C10 5.72386 9.77614 5.5 9.5 5.5C9.22386 5.5 9 5.72386 9 6C9 6.27614 9.22386 6.5 9.5 6.5Z",stroke:"#A9A9A9",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M2.5 6.5C2.77614 6.5 3 6.27614 3 6C3 5.72386 2.77614 5.5 2.5 5.5C2.22386 5.5 2 5.72386 2 6C2 6.27614 2.22386 6.5 2.5 6.5Z",stroke:"#A9A9A9",strokeLinecap:"round",strokeLinejoin:"round"})]});Hs.displayName="HorizontalDots";const gu=E.forwardRef(({children:e,className:t,onClick:n,...r},o)=>{const s=E.useRef(null),[i,a]=E.useState(!1),c=D(Re.Actions,t),l=()=>{const w=Rt["DropdownList--open"],f=Rt["DropdownList--closed"];document.querySelectorAll(`.${w}`).forEach(C=>{C!==s.current&&(C.classList.remove(w),C.classList.add(f))})},d=w=>{w.stopPropagation(),i?p():(a(!0),n==null||n(w))},p=()=>{a(!1)},h=w=>{w.key==="Escape"&&p()},m=w=>{s.current&&!s.current.contains(w.target)&&p()};return E.useEffect(()=>(i?(l(),document.addEventListener("keydown",h),document.addEventListener("click",m)):(document.removeEventListener("keydown",h),document.removeEventListener("click",m)),()=>{document.removeEventListener("keydown",h),document.removeEventListener("click",m)}),[i]),u.jsxs("div",{ref:o,className:c,onClick:d,role:"button",tabIndex:0,"data-testid":"actions",...r,children:[u.jsx(Hs,{}),u.jsx(Gr,{align:"left",ref:s,open:i,"data-testid":"actions-dropdown",role:"menu","aria-label":"Actions",children:e})]})});gu.displayName="Actions";const yu=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Re.Action,t);return u.jsx("button",{ref:r,className:o,...n,children:e})});yu.displayName="Action";const vu=E.forwardRef(({children:e,className:t,...n},r)=>{const o=D(Re.Icon,t);return u.jsx("div",{ref:r,className:o,...n,children:e})});vu.displayName="Icon";const Be=E.forwardRef(({children:e,className:t,size:n="medium",variant:r,...o},s)=>{const i=D(Re.List,{[Re[`List--${n}`]]:n,[Re[`List--${r}`]]:r},t);return u.jsx("ul",{ref:s,className:i,role:"list",...o,children:e})});Be.displayName="List";Be.Item=hu;Be.Badges=bs;Be.Badge=vs;Be.Title=pu;Be.Description=mu;Be.Actions=gu;Be.Action=yu;Be.Icon=vu;const Xv="Navigation__uylxk",Jv="PaginationContent__UpLw0",e0="PaginationEllipsis__perWk",t0="PaginationLink__GVUZj",n0="Active__u1Ahy",r0="Disabled__8WM0y",o0="Prev__wp4hc",s0="Next__eVyL5",Ze={Navigation:Xv,PaginationContent:Jv,PaginationEllipsis:e0,PaginationLink:t0,Active:n0,Disabled:r0,Prev:o0,Next:s0},bu=({className:e,...t})=>u.jsxs("svg",{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",className:e,...t,children:[u.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u.jsx("path",{d:"M9 6l6 6l-6 6"})]});bu.displayName="ChevronRight";const wu=({className:e,...t})=>u.jsxs("svg",{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",className:e,...t,children:[u.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u.jsx("path",{d:"M15 6l-6 6l6 6"})]});wu.displayName="ChevronLeft";const Ws=({className:e,...t})=>u.jsx("nav",{role:"navigation","aria-label":"pagination",className:D(Ze.Navigation,e),...t});Ws.displayName="Pagination";const Vs=g.forwardRef(({className:e,...t},n)=>u.jsx("ul",{ref:n,className:D(Ze.PaginationContent,e),...t}));Vs.displayName="PaginationContent";const _n=g.forwardRef(({className:e,...t},n)=>u.jsx("li",{ref:n,className:e,...t}));_n.displayName="PaginationItem";const Hn=({className:e,isActive:t,...n})=>u.jsx("a",{"aria-current":t?"page":void 0,className:D(Ze.PaginationLink,t&&Ze.Active,e),...n});Hn.displayName="PaginationLink";const qs=({className:e,disabled:t,...n})=>u.jsxs(Hn,{"aria-label":"Go to previous page",className:D(t&&Ze.Disabled,Ze.Prev,e),...n,children:[u.jsx(wu,{}),u.jsx("span",{children:"Previous"})]});qs.displayName="PaginationPrevious";const zs=({className:e,disabled:t,...n})=>u.jsxs(Hn,{"aria-label":"Go to next page",className:D(t&&Ze.Disabled,Ze.Next,e),...n,children:[u.jsx("span",{children:"Next"}),u.jsx(bu,{})]});zs.displayName="PaginationNext";const Gs=({className:e,...t})=>u.jsx("span",{"aria-hidden":!0,className:D(Ze.PaginationEllipsis,e),...t,children:u.jsx(Hs,{})});Gs.displayName="PaginationEllipsis";function i0(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Cu={exports:{}};(function(e,t){(function(n,r){typeof i0=="function"?e.exports=r():n.pluralize=r()})(id,function(){var n=[],r=[],o={},s={},i={};function a(f){return typeof f=="string"?new RegExp("^"+f+"$","i"):f}function c(f,y){return f===y?y:f===f.toLowerCase()?y.toLowerCase():f===f.toUpperCase()?y.toUpperCase():f[0]===f[0].toUpperCase()?y.charAt(0).toUpperCase()+y.substr(1).toLowerCase():y.toLowerCase()}function l(f,y){return f.replace(/\$(\d{1,2})/g,function(C,x){return y[x]||""})}function d(f,y){return f.replace(y[0],function(C,x){var S=l(y[1],arguments);return c(C===""?f[x-1]:C,S)})}function p(f,y,C){if(!f.length||o.hasOwnProperty(f))return y;for(var x=C.length;x--;){var S=C[x];if(S[0].test(y))return d(y,S)}return y}function h(f,y,C){return function(x){var S=x.toLowerCase();return y.hasOwnProperty(S)?c(x,S):f.hasOwnProperty(S)?c(x,f[S]):p(S,x,C)}}function m(f,y,C,x){return function(S){var _=S.toLowerCase();return y.hasOwnProperty(_)?!0:f.hasOwnProperty(_)?!1:p(_,_,C)===_}}function w(f,y,C){var x=y===1?w.singular(f):w.plural(f);return(C?y+" ":"")+x}return w.plural=h(i,s,n),w.isPlural=m(i,s,n),w.singular=h(s,i,r),w.isSingular=m(s,i,r),w.addPluralRule=function(f,y){n.push([a(f),y])},w.addSingularRule=function(f,y){r.push([a(f),y])},w.addUncountableRule=function(f){if(typeof f=="string"){o[f.toLowerCase()]=!0;return}w.addPluralRule(f,"$0"),w.addSingularRule(f,"$0")},w.addIrregularRule=function(f,y){y=y.toLowerCase(),f=f.toLowerCase(),i[f]=y,s[y]=f},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(f){return w.addIrregularRule(f[0],f[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(f){return w.addPluralRule(f[0],f[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(f){return w.addSingularRule(f[0],f[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(w.addUncountableRule),w})})(Cu);var a0=Cu.exports;const c0=ad(a0),Qs=({count:e,singularText:t,children:n=(r,o)=>`${r} ${o}`})=>u.jsx(u.Fragment,{children:n(e,c0(t,e))});Qs.displayName="PluralizeCounter";const l0="TableContainer__osh6Z",u0="TableHeader__sYa-8",d0="Table__2cIs3",f0="selectable__WsGg1",h0="Cell__ZEv-K",p0="Right__YoM1V",m0="Center__CF3tr",g0="Sortable__JIV1V",y0="SortIcon__f0bBy",v0="Active__rJjxB",b0="Rotate__7cwTK",w0="Pagination__sbqMP",C0="PointerNone__kQdQS",fe={TableContainer:l0,TableHeader:u0,Table:d0,selectable:f0,Cell:h0,Right:p0,Center:m0,Sortable:g0,SortIcon:y0,Active:v0,Rotate:b0,Pagination:w0,PointerNone:C0},x0="EmptyStateContainer__Q9FEb",E0="Message__IHK6M",ya={EmptyStateContainer:x0,Message:E0},xu=({size:e=64})=>u.jsxs("svg",{width:e,height:e,viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u.jsxs("g",{clipPath:"url(#clip-path)",children:[u.jsx("mask",{id:"mask0_1070_8032",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"64",height:"64",children:u.jsx("path",{d:"M64 0H0V64H64V0Z",fill:"white"})}),u.jsx("g",{mask:"url(#mask0_1070_8032)",children:u.jsx("path",{d:"M40 10.6673H13.3333V53.334H50.6667V21.334H40V10.6673ZM8 7.97932C8 6.51798 9.192 5.33398 10.664 5.33398H42.6667L56 18.6673V55.982C56.0024 56.3321 55.936 56.6793 55.8043 57.0039C55.6725 57.3284 55.4781 57.6239 55.2323 57.8732C54.9864 58.1225 54.6936 58.3209 54.3712 58.4572C54.0485 58.5935 53.7021 58.6649 53.352 58.6673H10.648C9.94768 58.6625 9.27739 58.3823 8.78192 57.8873C8.28645 57.3924 8.00557 56.7223 8 56.022V7.97932ZM36.0773 38.5233C33.8408 39.83 31.2056 40.2788 28.6627 39.786C26.1197 39.2929 23.8428 37.8921 22.2566 35.8444C20.6704 33.7966 19.883 31.2417 20.0414 28.6564C20.1998 26.071 21.293 23.6315 23.1173 21.7927C24.9532 19.9571 27.3955 18.8541 29.9864 18.6904C32.5773 18.5267 35.1389 19.3134 37.1912 20.9032C39.2435 22.493 40.6456 24.7767 41.1347 27.3263C41.6237 29.8759 41.1664 32.5164 39.848 34.7527L45.7413 40.646L41.9707 44.4193L36.0773 38.5233ZM34.4293 33.1047C34.9387 32.6126 35.3451 32.0241 35.6245 31.3735C35.904 30.7228 36.0512 30.0231 36.0573 29.3148C36.0635 28.6065 35.9285 27.9044 35.6603 27.2489C35.3923 26.5935 34.9963 25.998 34.4955 25.4972C33.9947 24.9964 33.3992 24.6004 32.7437 24.3323C32.0883 24.0641 31.3861 23.9292 30.6779 23.9353C29.9696 23.9415 29.2699 24.0886 28.6192 24.3681C27.9685 24.6476 27.38 25.0539 26.888 25.5633C25.9165 26.5692 25.3789 27.9164 25.3911 29.3148C25.4032 30.7132 25.9641 32.0508 26.9531 33.0396C27.9419 34.0287 29.2795 34.5895 30.6779 34.6015C32.0763 34.6137 33.4235 34.0761 34.4293 33.1047Z",fill:"currentColor"})})]}),u.jsx("defs",{children:u.jsx("clipPath",{id:"clip-path",children:u.jsx("rect",{width:"64",height:"64",fill:"white"})})})]});xu.displayName="EmptyStateIcon";const Ks=({message:e="No results found"})=>u.jsxs("div",{className:D(ya.EmptyStateContainer),children:[u.jsx(xu,{}),u.jsx("p",{className:ya.Message,children:e})]});Ks.displayName="EmptyState";const S0=(e,t,n=1)=>{if(e<=1)return["1"];const r=[],o=s=>{(r.length===0||r[r.length-1]!==s)&&r.push(s)};o(1),t-n>2&&o("...");for(let s=Math.max(2,t-n);s<=Math.min(e-1,t+n);s++)o(s);return t+n<e-1&&o("..."),o(e),r.map(String)},Eu=({page:e,totalPages:t,onPageChange:n})=>{const r=e===1,o=e===t;return u.jsx(Ws,{className:fe.Pagination,children:u.jsxs(Vs,{children:[u.jsx(_n,{children:u.jsx(qs,{className:D({[fe.PointerNone]:r}),onClick:()=>!r&&n(e-1)})}),S0(t,e).map((s,i)=>u.jsxs(_n,{children:[s==="..."&&u.jsx(Gs,{}),s!=="..."&&u.jsx(Hn,{isActive:+s===e,onClick:()=>+s!==e&&n(+s),children:s})]},i)),u.jsx(_n,{children:u.jsx(zs,{className:D({[fe.PointerNone]:o}),onClick:()=>!o&&n(e+1)})})]})})};Eu.displayName="TablePagination";const Su=({className:e,...t})=>u.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,...t,children:u.jsx("path",{d:"M6 2.5V9.5M6 9.5L9.5 6M6 9.5L2.5 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});Su.displayName="ArrowDown";const _u=({columns:e,data:t,isLoading:n,totalCount:r=0,headerLabel:o,sort:s,loadingConfig:i,pagination:a,onRowClick:c})=>{const{count:l=5,height:d=40}=i||{},p=y=>y.sortName??y.name,h=y=>D({[fe.Cell]:!0,[fe.Center]:y.align==="center",[fe.Right]:y.align==="right",[fe.Sortable]:y.isSortable}),m=y=>{if(!s)return"";const C=p(y);return D({[fe.SortIcon]:!0,[fe.Active]:y.isSortable&&s.field===C,[fe.Rotate]:s.field===C&&s.direction==="asc"})},w=y=>()=>c==null?void 0:c(y),f=y=>()=>{if(!s||!y.isSortable)return;const{field:C,direction:x,onSort:S}=s,_=p(y);C===_?S(_,x==="asc"?"desc":"asc"):S(_,"asc")};return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:fe.TableContainer,children:[o&&u.jsx("div",{className:fe.TableHeader,children:u.jsx(Qs,{count:r,singularText:o,children:(y,C)=>`${y} ${C}`})}),u.jsxs("table",{className:fe.Table,children:[u.jsx("thead",{children:u.jsx("tr",{children:e.map(y=>u.jsx("th",{children:u.jsxs("div",{className:h(y),onClick:f(y),children:[u.jsx("span",{children:y.displayName}),y.isSortable&&u.jsx(Su,{className:m(y)})]})},y.name))})}),u.jsx("tbody",{children:u.jsxs(ft,{children:[u.jsx(ft.When,{condition:n,children:[...Array(l).keys()].map(y=>u.jsx("tr",{children:u.jsx("td",{colSpan:e.length,style:{padding:4},children:u.jsx(Qr,{height:d})})},y))}),u.jsx(ft.When,{condition:!t.length,children:u.jsx("tr",{children:u.jsx("td",{colSpan:e.length,children:u.jsx(Ks,{})})})}),u.jsx(ft.Else,{children:t.map((y,C)=>u.jsx("tr",{className:c&&fe.selectable,onClick:w(y),children:e.map(x=>u.jsx("td",{style:x.width?{width:x.width}:{},children:u.jsx("div",{className:h(x),children:x.cellRenderer?x.cellRenderer(y):x.valueGetter?x.valueGetter(y):y[x.name]})},`${x.name}-${C}`))},C))})]})})]})]}),a&&u.jsx(Eu,{...a})]})};_u.displayName="Table";const _0="alert__LblpE",R0="destructive__bLNSM",T0="alertTitle__gblKf",P0="alertDescription__BuVHV",$r={alert:_0,default:"default__mgO6A",destructive:R0,alertTitle:T0,alertDescription:P0},no=({className:e,variant:t="default",children:n,...r})=>u.jsx("div",{"data-slot":"alert",role:"alert",className:D($r.alert,$r[t],e),...r,children:n}),A0=g.forwardRef(({children:e,className:t,...n},r)=>u.jsx("div",{ref:r,"data-slot":"alert-title",className:D($r.alertTitle,t),...n,children:e})),O0=g.forwardRef(({children:e,className:t,...n},r)=>u.jsx("div",{ref:r,"data-slot":"alert-description",className:D($r.alertDescription,t),...n,children:e}));no.displayName="Alert";no.Title=A0;no.Description=O0;function va(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Fr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?va(Object(n),!0).forEach(function(r){j0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):va(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ru(e){return(Ru=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function j0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ss(e){return(ss=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function Tu(e,t){var n;if(typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(r){var o=r.appName||r.name;if(!o)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var s="single-spa-application:".concat(o);return function(){var i=document.getElementById(s);return i||((i=document.createElement("div")).id=s,document.body.appendChild(i)),i}}(t))!="function")throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(ss(n)));return function(){var r=n(t);if(!(r instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(ss(r)));return r}}var jn=null;try{jn=require("react").createContext()}catch{}var D0={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function k0(e){if(Ru(e)!=="object")throw new Error("single-spa-react requires a configuration object");var t,n=Fr(Fr({},D0),e);if(!n.React)throw new Error("single-spa-react must be passed opts.React");if(!n.ReactDOM&&!n.ReactDOMClient)throw new Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(n.renderType||((t=n.ReactDOMClient)!==null&&t!==void 0&&t.createRoot?n.renderType="createRoot":n.renderType="render"),!n.rootComponent&&!n.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(n.errorBoundary&&typeof n.errorBoundary!="function")throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!jn&&n.React.createContext&&(jn=n.React.createContext()),n.SingleSpaRoot=function(o){function s(i){s.displayName="SingleSpaRoot(".concat(i.name,")")}return s.prototype=Object.create(o.React.Component.prototype),s.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},s.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},s.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},s}(n);var r={bootstrap:L0.bind(null,n),mount:I0.bind(null,n),unmount:M0.bind(null,n)};return n.parcelCanUpdate&&(r.update=N0.bind(null,n)),r}function L0(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(n){e.rootComponent=n})}function I0(e,t){return new Promise(function(n,r){e.suppressComponentDidCatchWarning||!function(a){if(!(a&&typeof a.version=="string"&&a.version.indexOf(".")>=0))return!1;var c=a.version.slice(0,a.version.indexOf("."));try{return Number(c)>=16}catch{return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=Pu(e,t,function(){n(this)}),s=Tu(e,t)(),i=function(a){var c=a.reactDom,l=a.renderType,d=a.elementToRender,p=a.domElement,h=c[l];if(typeof h!="function")throw new Error('renderType "'.concat(l,'" did not return a function.'));switch(l){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var m=h(p);return m.render(d),m;case"hydrateRoot":return h(p,d);case"hydrate":default:return h(d,p),null}}({elementToRender:o,domElement:s,reactDom:Ys(e),renderType:$0(e)});e.domElements[t.name]=s,e.renderResults[t.name]=i})}function M0(e,t){return new Promise(function(n){e.unmountResolves[t.name]=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():Ys(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function N0(e,t){return new Promise(function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=Pu(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var s=Tu(e,t)();Ys(e).render(r,s)}})}function Ys(e){return e.ReactDOMClient||e.ReactDOM}function $0(e){return typeof e.renderType=="function"?e.renderType():e.renderType}function Pu(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=jn?e.React.createElement(jn.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(s,i){function a(c){s.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},a.displayName="SingleSpaReactErrorBoundary(".concat(c.name,")")}return a.prototype=Object.create(s.React.Component.prototype),a.prototype.render=function(){return this.state.caughtError?(s.errorBoundary||i.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},a.prototype.componentDidCatch=function(c,l){this.setState({caughtError:c,caughtErrorInfo:l})},a}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),o=e.React.createElement(e.SingleSpaRoot,Fr(Fr({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach(function(s){return s()}),delete e.updateResolves[t.name])},unmountFinished:function(){e.unmountResolves[t.name]&&(e.unmountResolves[t.name](),delete e.unmountResolves[t.name])}}),o)}const F0=e=>{const t=new uh;return function(r){if(!r)throw new Error("Microfrontend did not receive any properties !!");const o=cs(r.module.name);return u.jsx($a,{module:o,children:u.jsxs(mh,{client:t,children:[u.jsx(e,{...r}),u.jsx(Qf,{position:"top-right",reverseOrder:!0})]})})}},B0=({rootComponent:e,...t})=>k0({errorBoundary(n){return console.error(n),u.jsx(Us,{})},...t,rootComponent:F0(e)}),U0=e=>{const t={authUser:{id:"testuser",username:"testuser",displayName:"Test User",applications:[]},catalog:[],authentication:{passwordMethodEnabled:!0,registerEnabled:!0,invitationsEnabled:!0,resetPasswordExpiration:3e4,passwordConstraints:{lowerCaseRequired:!1,upperCaseRequired:!1,symbolRequired:!1,digitRequired:!1,minLength:0,maxLength:8},sessionExpiration:864e5,jwtSecret:"",sessionIncludeOrigUser:!1,impersonationMode:"cookie",canImpersonateNonExistentUsers:!1,providers:[]},platformVersion:"0.0.0"};Object.defineProperty(window,Rn,{value:e?Rd(t,e):t})},H0={flags:new Map,variants:new Map,isLoading:!1,error:null,checkFlag:()=>!1,getVariant:()=>null,refresh:async()=>{}},Wn=E.createContext(H0),Au=({gatewayUrl:e="",prefetchFlags:t=[],refreshInterval:n,children:r})=>{const[o,s]=E.useState(new Map),[i,a]=E.useState(new Map),[c,l]=E.useState(!1),[d,p]=E.useState(null),h=E.useCallback(async C=>{if(C.length!==0){l(!0),p(null);try{const x=`${e}/_/feature-flags/evaluate`,S=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({flagNames:C}),credentials:"include"});if(!S.ok)throw new Error(`Failed to fetch feature flags: ${S.status} ${S.statusText}`);const _=await S.json(),R=new Map,A=new Map;_.flags.forEach(T=>{R.set(T.flagName,T.enabled),T.variant!==void 0&&A.set(T.flagName,{variant:T.variant.name||null,payload:T.variant.payload})}),s(R),a(A)}catch(x){const S=x instanceof Error?x:new Error("Unknown error fetching feature flags");p(S),console.error("Error fetching feature flags:",S)}finally{l(!1)}}},[e]),m=E.useCallback(async()=>{t.length>0&&await h(t)},[t,h]);E.useEffect(()=>{t.length>0&&h(t)},[t,h]),E.useEffect(()=>{if(n&&n>0&&t.length>0){const C=setInterval(()=>{h(t)},n);return()=>{clearInterval(C)}}},[n,t,h]);const w=E.useCallback((C,x=!1)=>o.get(C)??x,[o]),f=E.useCallback(C=>i.get(C)??null,[i]),y=E.useMemo(()=>({flags:o,variants:i,isLoading:c,error:d,checkFlag:w,getVariant:f,refresh:m}),[o,i,c,d,w,f,m]);return u.jsx(Wn.Provider,{value:y,children:r})};Au.displayName="FeatureFlagsProvider";function Ou(e,t=!1,n=""){const r=E.useContext(Wn),[o,s]=E.useState(t),[i,a]=E.useState(!1);if(E.useEffect(()=>{const l=r.checkFlag(e,null);if(l!=null){s(l),a(!0);return}let d=!0;return(async()=>{try{const h=`${n}/_/feature-flags/${encodeURIComponent(e)}`,m=await fetch(h,{method:"GET",headers:{"Content-Type":"application/json"},credentials:"include"});if(!m.ok){console.warn(`Failed to fetch feature flag '${e}': ${m.status} ${m.statusText}`),d&&(s(t),a(!0));return}const w=await m.json();if(d){const f=typeof w.value=="boolean"?w.value:t;s(f),a(!0)}}catch(h){console.error(`Error fetching feature flag '${e}':`,h),d&&(s(t),a(!0))}})(),()=>{d=!1}},[e,t,n,r]),!i&&r.flags.size===0)return t;const c=r.checkFlag(e,null);return c??o}function W0(){const e=E.useContext(Wn);if(!e)throw new Error("useFeatureFlags must be used within a FeatureFlagsProvider. Wrap your component tree with <FeatureFlagsProvider> to use this hook.");return e}function V0(e,t=""){const n=E.useContext(Wn),[r,o]=E.useState(null),[s,i]=E.useState(void 0),[a,c]=E.useState(!0);E.useEffect(()=>{const d=n.getVariant(e);if(d!==null){o(d.variant),i(d.payload),c(!1);return}let p=!0;return(async()=>{c(!0);try{const m=`${t}/_/feature-flags/${encodeURIComponent(e)}`,w=await fetch(m,{method:"GET",headers:{"Content-Type":"application/json"},credentials:"include"});if(!w.ok){console.warn(`Failed to fetch variant for flag '${e}': ${w.status} ${w.statusText}`),p&&(o(null),i(void 0),c(!1));return}const f=await w.json();if(p){const y=typeof f.value=="string"?f.value:(f.value===null||f.value===void 0,null);o(y),i(void 0),c(!1)}}catch(m){console.error(`Error fetching variant for flag '${e}':`,m),p&&(o(null),i(void 0),c(!1))}})(),()=>{p=!1}},[e,t,n]);const l=n.getVariant(e);return l!==null?{variant:l.variant,payload:l.payload,isLoading:!1}:{variant:r,payload:s,isLoading:a}}const ju=({flag:e,children:t,fallback:n=null,invert:r=!1,gatewayUrl:o=""})=>{const s=Ou(e,!1,o);return(r?!s:s)?u.jsx(u.Fragment,{children:t}):u.jsx(u.Fragment,{children:n})};ju.displayName="FeatureFlagGuard";exports.Alert=no;exports.ApplicationIcon=Dc;exports.Authorized=ys;exports.Badge=vs;exports.Badges=bs;exports.Button=Dr;exports.ClipboardCheckIcon=Ic;exports.ClipboardIcon=Lc;exports.ConfirmDialog=du;exports.CopyToClipboardButton=_p;exports.Dialog=ie;exports.DropdownList=Gr;exports.EmptyState=Ks;exports.ErrorState=Us;exports.ExtendExtensionPoint=Wh;exports.ExtensionPoint=Tc;exports.EyeIcon=Dl;exports.FeatureFlagGuard=ju;exports.FeatureFlagsContext=Wn;exports.FeatureFlagsProvider=Au;exports.FieldGroup=Mc;exports.Input=zr;exports.InputError=Nc;exports.Label=$c;exports.List=Be;exports.ModulePlaceHolder=jc;exports.Pagination=Ws;exports.PaginationContent=Vs;exports.PaginationEllipsis=Gs;exports.PaginationItem=_n;exports.PaginationLink=Hn;exports.PaginationNext=zs;exports.PaginationPrevious=qs;exports.PasswordInput=ey;exports.Pill=xv;exports.PlatformEventListener=Yh;exports.PlatformEvents=ed;exports.PluralizeCounter=Qs;exports.SearchAutocomplete=Hc;exports.SearchInput=Cs;exports.Select=ws;exports.Show=ft;exports.Skeleton=Qr;exports.SkeletonList=zc;exports.Spinner=Al;exports.Switch=Ol;exports.Table=_u;exports.Tabs=Qg;exports.TabsContent=Zg;exports.TabsList=Kg;exports.TabsTrigger=Yg;exports.TextArea=Bc;exports.Tooltip=Pl;exports.authorized=Xh;exports.dropdownListStyles=Rt;exports.extensionPoint=qh;exports.getApplications=as;exports.getInitials=gd;exports.getOperations=Fa;exports.hasAccess=Ua;exports.initializeMicroFrontend=B0;exports.isPlatformCustomizationCompleted=rf;exports.isValidEmail=md;exports.logout=fd;exports.navigateTo=hd;exports.platformHaveAnyCustomization=nf;exports.setupTestEnvironment=U0;exports.useApplicationIcon=Ka;exports.useApplicationJSModule=Wr;exports.useApplicationMenu=Cd;exports.useApplicationUIModule=Qa;exports.useApplications=za;exports.useAuth=Ur;exports.useCatalog=Mn;exports.useCurrentApplication=us;exports.useCurrentApplicationName=Ya;exports.useCurrentJSModule=Od;exports.useDynamicFonts=rc;exports.useDynamicStyleSheet=nc;exports.useExtendExtensionPoint=ec;exports.useExtensionPoint=Ja;exports.useFeatureFlag=Ou;exports.useFeatureFlags=W0;exports.useGetPlatformTheme=tf;exports.useHasNoSession=ld;exports.useLocation=Ia;exports.useModule=cs;exports.useModuleCommonPaths=dd;exports.useModuleConfig=Ha;exports.useModuleConfigByName=Wa;exports.useModuleMetadata=Nn;exports.useMutableCatalog=sd;exports.useNotifications=fs;exports.useOperations=Ba;exports.usePAECustomizationsLoadingState=ef;exports.usePAEState=Br;exports.usePlatformCustomization=Jd;exports.usePlatformEventListener=tc;exports.useResource=Th;exports.useResourceActions=_c;exports.useServiceBaseURL=Za;exports.useServiceInvoker=ds;exports.useTenants=Bh;exports.useTrackEvent=Id;exports.useTrackEvents=Xa;exports.useUIApplications=Ga;exports.useUserState=Hh;exports.useVariant=V0;
|